天天看點

DVWA靶場 Brute Force 練習Low

DVWA靶場 Brute Force 練習

  • Low
    • Medium

Low

将等級調為Low

DVWA靶場 Brute Force 練習Low
DVWA靶場 Brute Force 練習Low

輸入任意的密碼 然後使用Burp Suite 進行抓包

發送到Intruder 子產品

點選clear

add 我們的密碼 讓他成為爆破點

DVWA靶場 Brute Force 練習Low
DVWA靶場 Brute Force 練習Low

然後點選 Attack進行攻擊

DVWA靶場 Brute Force 練習Low

發現 1234長度不同 1234很可能為改賬戶密碼

Medium

點選 View Source 檢視源代碼

下面展示一些

内聯代碼片

// A code block
var foo = 'bar';
           
<?php

if( isset( $_GET[ 'Login' ] ) ) {
    // Sanitise username input
    $user = $_GET[ 'username' ];
    $user = ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"],  $user ) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : ""));

    // Sanitise password input
    $pass = $_GET[ 'password' ];
    $pass = ((isset($GLOBALS["___mysqli_ston"]) && is_object($GLOBALS["___mysqli_ston"])) ? mysqli_real_escape_string($GLOBALS["___mysqli_ston"],  $pass ) : ((trigger_error("[MySQLConverterToo] Fix the mysql_escape_string() call! This code does not work.", E_USER_ERROR)) ? "" : ""));
    $pass = md5( $pass );

    // Check the database
    $query  = "SELECT * FROM `users` WHERE user = '$user' AND password = '$pass';";
    $result = mysqli_query($GLOBALS["___mysqli_ston"],  $query ) or die( '<pre>' . ((is_object($GLOBALS["___mysqli_ston"])) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false)) . '</pre>' );

    if( $result && mysqli_num_rows( $result ) == 1 ) {
        // Get users details
        $row    = mysqli_fetch_assoc( $result );
        $avatar = $row["avatar"];

        // Login successful
        echo "<p>Welcome to the password protected area {$user}</p>";
        echo "<img src=\"{$avatar}\" />";
    }
    else {
        // Login failed
        sleep( 2 );
        echo "<pre><br />Username and/or password incorrect.</pre>";
    }

    ((is_null($___mysqli_res = mysqli_close($GLOBALS["___mysqli_ston"]))) ? false : $___mysqli_res);
}

?> 
           

mysqli_real_escape_string(string,connection)

函數會對字元串string中的特殊符号(\x00,\n,\r,\,‘,“,\x1a)進行轉義

可以看到隻是對部分代碼進行過濾 依舊可以進行密碼爆破

sleep( 2 ); 休眠兩秒才能繼續試

繼續閱讀