6

Py3webFuzz:一个针对Web应用模糊测试的Python3模块

 3 years ago
source link: https://www.freebuf.com/sectool/258806.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

iMFnEvi.jpg!mobile

Py3webFuzz

Py3webFuzz是一个针对Web应用模糊测试的Python3模块,该工具基于pywebfuzz开发,Py3webfuzz是一个Python3模块,可以帮助广大研究人员通过暴力破解、模糊测试和其他安全分析技术轻松识别出目标Web应用程序以及Web服务中潜在的安全漏洞。该模块可以提供常见的测试值、生成器和其他实用工具,以期在研究人员对Web应用程序、API接口和开发Web漏洞利用测试用例的过程中提供帮助。

为了便于使用,Py3webFuzz提供了fuzzdb和其他一些用Python类、方法和函数实现的其他源代码。fuzzdb项目可以提供各种模糊测试所用的测试值,这将使得在我们在自己的漏洞利用和PoC中使用这些值时变得更加容易和方便。

工具安装

使用Python setuptools

点击【 这里 】跳转至PyPI官方库。

广大研究人员可以使用下列命令将该项目源码克隆至本地:

$ git clone https://github.com/jangelesg/py3webfuzz.git

$ cd py3webfuzz/

接下来,在命令行窗口中运行下列命令通过setup.py完成工具安装:

$ python setup.py install

如果你想自行管理已安装的包,可以使用easy_install来实现:

$ easy_install py3webfuzz_VERSION.tar.gz

除此之外,直接使用指向了Web上托管tar.gz包的链接来进行Py3webfuzz安装:

$ easy_install URL_package

完成上述操作之后,我们就可以开始使用Py3webfuzz了。

如何在代码中使用Py3webfuzz

首先,该项目源码的子目录中提供了某些测试样例。

测试样例一:

# 访问、使用和编码SQLi测试值

# 导入代码库

from py3webfuzz import fuzzdb

from py3webfuzz import utils, encoderFuncs

# 实例化一个类对象,使您可以访问一组SQLi测试值

sqli_detect_payload = fuzzdb.Attack.AttackPayloads.SQLi.Detect()

# 通过列表访问这些值t

for index, payload in enumerate(sqli_detect_payload.Generic_SQLI):

    print(f"Payload: {index} Value: {payload}")

    # 使用编码器,您可以获得不同的编码来开发漏洞利用样例

    print(f"SQLi Char Encode: {encoderFuncs.sqlchar_encode(payload)}")

测试样例二:

# 向目标发送HTTP请求Send HTTP request to your target

# 导入代码库

from py3webfuzz import utils

# 自定义目标和Header

location = "http://127.0.0.1:8080/WebGoat/start.mvc#lesson/WebGoatIntroduction.lesson"

    headers = {"Host": "ssl.scroogle.org", "User-Agent": \

               "Mozilla/4.0 (compatible; MSIE 4.01; AOL 4.0; Mac_68K)",

               "Content-Type": "application/x-www-form-urlencoded"}

# 此时,你将得到一个包含了所有渗透测试元素的字典对象

# "headers": response.headers, "content": response.content, "status_code": response.status_code,

# 'json': response.json, "text": response.text, "time": f"Total in seconds: {time}"

res = utils.make_request(location, headers=headers, method="get")

# 打印响应信息

print(res)

工具运行截图

bEFj6by.jpg!mobile

zyARjy.jpg!mobile

ayQBbmV.jpg!mobile

工具使用演示

JjuuEnb.gif!mobile

famyq2a.gif!mobile

项目地址

Py3webFuzz:【 GitHub传送门


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK