Below we try to use Sqlmap for injection at medium level.
First, to detect the presence of an injection point, execute the following command:
Sqlmap.py-u Http://192.168.80.1/dvwa/vulnerabilities/sqli/?id=1&Submit=Submit
The test results did not find the injection point, because DVWA needed to be logged in before it could be used, so a cookie for the current session was needed to maintain the connection state during the infiltration process. Use Burpsuite to intercept packets and get cookies.
650) this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;padding-left:0px; padding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" image "border=" 0 "alt=" image "src=" http ://s3.51cto.com/wyfs02/m02/77/01/wkiom1zg2kgqj9haaad_q_zcbac862.png "height=" 145 "/>
Add the--cookie parameter to the SQLMAP and continue with the injection.
Sqlmap.py-u "Http://192.168.80.1/dvwa/vulnerabilities/sqli/?id=1&Submit=Submit"--cookie= "security=medium; phpsessid=2f120ee00f32798d11de936832312549 "
This successfully detects the injection point.
650) this.width=650; "Style=" background-image:none;border-bottom:0px;border-left:0px;padding-left:0px; padding-right:0px;border-top:0px;border-right:0px;padding-top:0px; "title=" image "border=" 0 "alt=" image "src=" http ://s3.51cto.com/wyfs02/m00/77/01/wkiom1zg2kob6b34aae66touvxi509.png "height=" 296 "/>
A separate series of posts will be sent to Sqlmap and Burpsuite.
This article from "a pot of turbid wine" blog, reproduced please contact the author!
DVWA Series 4 using Sqlmap for medium level injection