DVWA之BRUTE Force(爆库)
<?php if( isset( $_GET[ ‘Login‘ ] ) ) { // Get username $user = $_GET[ ‘username‘ ]; // Get password $pass = $_GET[ ‘password‘ ]; $pass = md5( $pass ); // Check the database $query = "SELECT * FROM `users` WHERE user = ‘$user‘ AND password = ‘$pass‘;"; $result = mysql_query( $query ) or die( ‘<pre>‘ . mysql_error() . ‘</pre>‘ ); if( $result && mysql_num_rows( $result ) == 1 ) { // Get users details $avatar = mysql_result( $result, 0, "avatar" ); // Login successful echo "<p>Welcome to the password protected area {$user}</p>"; echo "<img src=\"{$avatar}\" />"; } else { // Login failed echo "<pre><br />Username and/or password incorrect.</pre>"; } mysql_close(); } ?>
分析这个代码,很容易发现,没有过滤机制,那么很简单的利用’#,就可以直接验证admin用户是否存在,且密码随意填写
然后我们可以利用burnsuit