chaos:一款整合了ChatGPT的源IP扫描工具
创始人
2025-07-03 00:11:35
0

关于chaos

chaos是一款功能强大的源IP地址扫描工具,该工具整合了ChatGPT的功能,主要面向的是安全渗透测试人员和漏洞Hunter。

这里所说的源IP,指的是通过第三方公开服务托管的网站所使用的最终公共IP目的地址。

功能介绍

1、支持多线程以实现高性能运行;

2、实时状态更新和进度条,适用于大规模扫描;

3、针对各种场景和限制设置了灵活的用户参数选项;

4、减少数据集以缩短扫描时间;

5、易于使用;

6、支持CSV格式输出;

工具安装

由于该工具基于纯Python 3开发,因此我们首先需要在本地设备上安装并配置好Python 3环境。接下来,广大研究人员可以使用下列命令将该项目源码克隆至本地:

git clone https://github.com/r57-labs/chaos.git

然后切换到项目目录中,使用pip3命令安装该工具所需的其他依赖组件,并激活虚拟环境:

pip3 install -U pip setuptools virtualenv

virtualenv env

source env/bin/activate

(env) pip3 install -U -r ./requirements.txt

最后,运行下列命令即可开始使用chaos:

(env) ./chaos.py -h

工具参数选项

-h, --help             显示工具帮助信息和退出

-f FQDN, --fqdn FQDN  FQDN文件路径,每一个FQDN单独一行

-i IP, --ip IP            HTTP请求的IP地址,逗号分隔

-a AGENT, --agent AGENT  请求的User-Agent Header值

-C, --csv              将CSV输出追加到OUTPUT_FILE.csv

-D, --dns             在请求之前对FQDN/IP值执行fwd/rev DNS查询

-j JITTER, --jitter JITTER   设置随机延迟间隔,单位为秒

-o OUTPUT, --output OUTPUT  将控制台输出追加到文件中

-p PORTS, --ports PORTS   要使用的TCP端口列表,逗号分隔,默认为"80,443"

-P, --no-prep          不使用`GET /`对每一个IP/端口执行预扫描,使用`Host: {IP:Port}` Header执行预扫描以去除无响应的主机

-r, --randomize        随机化要测试的IP/端口列表

-s SLEEP, --sleep SLEEP   在线程执行完后要休眠的时间,单位为秒

-t TIMEOUT, --timeout TIMEOUT   等待未响应主机的时间,单位为秒

-T, --test            测试模式,不发送任何请求

-v, --verbose         启用Verbose模式输出

-x, --singlethread    单线程执行,针对1-2个核心的系统,默认线程数=核心数-1

工具使用样例

本地主机测试

启用Python HTTP服务器:

% python3 -u -m http.server 8001

Serving HTTP on :: port 8001 (http://[::]:8001/) ...

启动ncat(HTTP检测为SSL),使用循环执行检测:

% while true; do ncat -lvp 8443 -c 'printf "HTTP/1.0 204 Plaintext OK\n\n\n"'; done

Ncat: Version 7.94 ( https://nmap.org/ncat )

Ncat: Listening on [::]:8443

Ncat: Listening on 0.0.0.0:8443

以SSL启动ncat:

% while true; do ncat --ssl -lvp 8444 -c 'printf "HTTP/1.0 202 OK\n\n\n"'; done    

Ncat: Version 7.94 ( https://nmap.org/ncat )

Ncat: Generating a temporary 2048-bit RSA key. Use --ssl-key and --ssl-cert to use a permanent one.

Ncat: SHA-1 fingerprint: 0208 1991 FA0D 65F0 608A 9DAB A793 78CB A6EC 27B8

Ncat: Listening on [::]:8444

Ncat: Listening on 0.0.0.0:8444

准备一个FQDN文件:

% cat ../test_localhost_fqdn.txt

www.example.com

localhost.example.com

localhost.local

localhost

notreally.arealdomain

准备一个IP文件/列表:

% cat ../test_localhost_ips.txt

127.0.0.1

127.0.0.0/29

not_an_ip_addr

-6.a

=4.2

::1

执行扫描:

% ./chaos.py -f ../test_localhost_fqdn.txt -i ../test_localhost_ips.txt,::1/126 -p 8001,8443,8444 -x -s0.2 -t1   

2023-06-21 12:48:33 [WARN] Ignoring invalid FQDN value: localhost.local

2023-06-21 12:48:33 [WARN] Ignoring invalid FQDN value: localhost

2023-06-21 12:48:33 [WARN] Ignoring invalid FQDN value: notreally.arealdomain

2023-06-21 12:48:33 [WARN] Error: invalid IP address or CIDR block =4.2

2023-06-21 12:48:33 [WARN] Error: invalid IP address or CIDR block -6.a

2023-06-21 12:48:33 [WARN] Error: invalid IP address or CIDR block not_an_ip_addr

2023-06-21 12:48:33 [INFO] * ----  ---- *

2023-06-21 12:48:33 [INFO] * Version: 0.9.4

2023-06-21 12:48:33 [INFO] * FQDN file: ../test_localhost_fqdn.txt

2023-06-21 12:48:33 [INFO] * FQDNs loaded: ['www.example.com', 'localhost.example.com']

2023-06-21 12:48:33 [INFO] * IP input value(s): ../test_localhost_ips.txt,::1/126

2023-06-21 12:48:33 [INFO] * Addresses parsed from IP inputs: 12

2023-06-21 12:48:33 [INFO] * Port(s): 8001,8443,8444

2023-06-21 12:48:33 [INFO] * Thread(s): 1

2023-06-21 12:48:33 [INFO] * Sleep value: 0.2

2023-06-21 12:48:33 [INFO] * Timeout: 1.0

2023-06-21 12:48:33 [INFO] * User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/98.0.4758.80 Safari/537.36 ch4*0s/0.9.4

2023-06-21 12:48:33 [INFO] * ----  ---- *

2023-06-21 12:48:33 [INFO] 36 unique address/port addresses for testing

Prep Tests: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 36/36 [00:29<00:00,  1.20it/s]

2023-06-21 12:49:03 [INFO] 9 IP/ports verified, reducing test dataset from 72 entries

2023-06-21 12:49:03 [INFO] 18 pending tests remain after pre-testing

2023-06-21 12:49:03 [INFO] Queuing 18 threads

  ++RCVD++ (200 OK) www.example.com @ :::8001                                                                                                                                                    

  ++RCVD++ (204 Plaintext OK) www.example.com @ :::8443                                                                                                                                          

  ++RCVD++ (202 OK) www.example.com @ :::8444                                                                                                                                                    

  ++RCVD++ (200 OK) www.example.com @ ::1:8001                                                                                                                                                   

  ++RCVD++ (204 Plaintext OK) www.example.com @ ::1:8443                                                                                                                                         

  ++RCVD++ (202 OK) www.example.com @ ::1:8444                                                                                                                                                   

  ++RCVD++ (200 OK) www.example.com @ 127.0.0.1:8001                                                                                                                                             

  ++RCVD++ (204 Plaintext OK) www.example.com @ 127.0.0.1:8443                                                                                                                                   

  ++RCVD++ (202 OK) www.example.com @ 127.0.0.1:8444                                                                                                                                             

  ++RCVD++ (200 OK) localhost.example.com @ :::8001                                                                                                                                              

  ++RCVD++ (204 Plaintext OK) localhost.example.com @ :::8443                                                                                                                                    

  ++RCVD++ (202 OK) localhost.example.com @ :::8444                                                                                                                                              

  ++RCVD++ (200 OK) localhost.example.com @ ::1:8001                                                                                                                                             

  ++RCVD++ (204 Plaintext OK) localhost.example.com @ ::1:8443                                                                                                                                   

  ++RCVD++ (202 OK) localhost.example.com @ ::1:8444                                                                                                                                             

  ++RCVD++ (200 OK) localhost.example.com @ 127.0.0.1:8001                                                                                                                                       

  ++RCVD++ (204 Plaintext OK) localhost.example.com @ 127.0.0.1:8443                                                                                                                             

  ++RCVD++ (202 OK) localhost.example.com @ 127.0.0.1:8444                                                                                                                                       

Origin Scan: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 18/18 [00:06<00:00,  2.76it/s]

2023-06-21 12:49:09 [RSLT] Results from 5 FQDNs:

  ::1

    ::1:8444 => (202 / OK)

    ::1:8443 => (204 / Plaintext OK)

    ::1:8001 => (200 / OK)

 

  127.0.0.1

    127.0.0.1:8001 => (200 / OK)

    127.0.0.1:8443 => (204 / Plaintext OK)

    127.0.0.1:8444 => (202 / OK)

 

  ::

    :::8001 => (200 / OK)

    :::8443 => (204 / Plaintext OK)

    :::8444 => (202 / OK)

 

  www.example.com

    :::8001 => (200 / OK)

    :::8443 => (204 / Plaintext OK)

    :::8444 => (202 / OK)

    ::1:8001 => (200 / OK)

    ::1:8443 => (204 / Plaintext OK)

    ::1:8444 => (202 / OK)

    127.0.0.1:8001 => (200 / OK)

    127.0.0.1:8443 => (204 / Plaintext OK)

    127.0.0.1:8444 => (202 / OK)

 

  localhost.example.com

    :::8001 => (200 / OK)

    :::8443 => (204 / Plaintext OK)

    :::8444 => (202 / OK)

    ::1:8001 => (200 / OK)

    ::1:8443 => (204 / Plaintext OK)

    ::1:8444 => (202 / OK)

    127.0.0.1:8001 => (200 / OK)

    127.0.0.1:8443 => (204 / Plaintext OK)

    127.0.0.1:8444 => (202 / OK)

 

 

rst@r57 chaos %

工具运行截图

许可证协议

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

项目地址

chaos:【GitHub传送门】

参考资料

https://r57labs.com/labs_chaos

本文作者:Alpha_h4ck, 转载请注明来自FreeBuf.COM

相关内容

热门资讯

如何允许远程连接到MySQL数... [[277004]]【51CTO.com快译】默认情况下,MySQL服务器仅侦听来自localhos...
如何利用交换机和端口设置来管理... 在网络管理中,总是有些人让管理员头疼。下面我们就将介绍一下一个网管员利用交换机以及端口设置等来进行D...
施耐德电气数据中心整体解决方案... 近日,全球能效管理专家施耐德电气正式启动大型体验活动“能效中国行——2012卡车巡展”,作为该活动的...
20个非常棒的扁平设计免费资源 Apple设备的平面图标PSD免费平板UI 平板UI套件24平图标Freen平板UI套件PSD径向平...
德国电信门户网站可实时显示全球... 德国电信周三推出一个门户网站,直观地实时提供其安装在全球各地的传感器网络检测到的网络攻击状况。该网站...
为啥国人偏爱 Mybatis,... 关于 SQL 和 ORM 的争论,永远都不会终止,我也一直在思考这个问题。昨天又跟群里的小伙伴进行...
《非诚勿扰》红人闫凤娇被曝厕所... 【51CTO.com 综合消息360安全专家提醒说,“闫凤娇”、“非诚勿扰”已经被黑客盯上成为了“木...
2012年第四季度互联网状况报... [[71653]]  北京时间4月25日消息,据国外媒体报道,全球知名的云平台公司Akamai Te...