CATSploit:一款基于CATS的自动化渗透测试执行工具

894 篇文章 2 订阅
838 篇文章 0 订阅

2024软件测试面试刷题,这个小程序(永久刷题),靠它快速找到工作了!(刷题APP的天花板)_软件测试刷题小程序-CSDN博客文章浏览阅读3k次,点赞86次,收藏13次。你知不知道有这么一个软件测试面试的刷题小程序。里面包含了面试常问的软件测试基础题,web自动化测试、app自动化测试、接口测试、性能测试、自动化测试、安全测试及一些常问到的人力资源题目。最主要的是他还收集了像阿里、华为这样的大厂面试真题,还有互动交流板块……_软件测试刷题小程序​编辑https://blog.csdn.net/AI_Green/article/details/134931243?spm=1001.2014.3001.5502​编辑https://blog.csdn.net/AI_Green/article/details/134931243?spm=1001.2014.3001.5502​编辑https://blog.csdn.net/AI_Green/article/details/134931243?spm=1001.2014.3001.5502https://blog.csdn.net/AI_Green/article/details/134931243?spm=1001.2014.3001.5502https://blog.csdn.net/AI_Green/article/details/134931243?spm=1001.2014.3001.5502https://blog.csdn.net/AI_Green/article/details/134931243?spm=1001.2014.3001.5502​编辑https://blog.csdn.net/AI_Green/article/details/134931243?spm=1001.2014.3001.5502https://blog.csdn.net/AI_Green/article/details/134931243?spm=1001.2014.3001.5502​编辑https://blog.csdn.net/AI_Green/article/details/134931243?spm=1001.2014.3001.5502icon-default.png?t=N7T8https://blog.csdn.net/AI_Green/article/details/134931243?spm=1001.2014.3001.5502

关于CATSploit

CATSploit是一款基于CATS的自动化渗透测试执行工具,该工具基于网络攻击技术评分(CATS)方法实现其功能,可以在无需渗透测试人员操作的情况下,自动对目标应用执行安全渗透测试。

图片

在执行渗透测试的过程中,广大安全研究人员首先需要针对目标系统的特征选择合适的测试技术,而CATSploit能够使用扫描工具收集目标系统的各种信息,其中包括操作系统、开放端口和软件版本等,并计算目标系统的各种安全评分。通过分析和选择适当的测试向量,CATSploit能够帮助我们在不具备专业渗透测试技术的情况下选择最合适的方法对目标系统执行自动化渗透测试。

工具运行机制

CATSploit能够按照下列操作序列自动执行渗透测试任务:

1、信息收集和输入之前收集的信息:首先,该工具会收集目标系统的相关信息。CATSploit不仅支持使用nmap和OpenVAS来收集目标系统的信息,还支持输入预先收集的目标系统信息;

2、计算渗透测试技术得分值:使用前一阶段获得的信息和渗透测试技术数据库,计算每种渗透测试技术的捕获性(eVc)和可探测性(eVd)评估值。对于每个目标设备,计算每个渗透测试技术的值;

3、渗透测试技术选择:通过使用之前的评分并根据预定义的策略选择渗透测试技术并创建渗透测试场景;

4、渗透测试执行:CATSploit可以根据前一阶段构建的渗透测试场景执行渗透测试技术。除此之外,CATSploit还会使用Metasploit框架和Metasploit API来执行实际的渗透测试;

工具要求

Kali Linux 2023.2a

Python

工具安装

Kali Linux发行版默认会安装好Metasploit、Nmap、OpenVAS和Python环境。

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

$ git clone https://github.com/catsploit/catsploit.git

然后切换到项目目录中,配置好工具帮助组件,并执行工具安装脚本即可:

$ cd catsploit
$ git clone https://github.com/catsploit/cats-helper.git
$ sudo ./setup.sh

工具配置

CATSploit需要进行服务器和客户端配置,服务器会在启动时读取JSON配置文件config.json,我们需要根据实际情况修改相关数据:

DBMS

  • dbname: CATSploit的数据库名称

  • user: PostgreSQL的用户名

  • password: PostgreSQL的密码

  • host: 如果你的数据库托管在远程主机,则指定远程主机的IP地址

SCENARIO

generator.maxscenarios: 需要计算的最大渗透测试场景数量 (*)

ATACKPF

  • msfpassword: MSFRPCD的密码

  • openvas.user: PostgreSQL的用户名

  • openvas.password: PostgreSQL的密码

  • openvas.maxhosts: 同时测试的主机数最大数量 (*)

  • openvas.maxchecks: 同时测试的条目数最大数量 (*)

ATTACKDB

attack_db_dir: 存储AtackSteps 的文件夹路径

其中(*)标记的参数需要根据研究人员设备情况调整。

工具使用

下列命令可启动CATSploit服务器:

$ python cats_server.py -c [CONFIG_FILE]

接下来,打开另一个命令行终端,开启客户端程序,并初始化与服务器端的连接:

$ python catsploit.py -s [SOCKET_PATH]

成功连接服务器后,初始化工具,会话将会启动:​​​​​​​​​​​​​​

_________ ___________ __ _ __
/ ____/ |/_ __/ ___/____ / /___ (_) /_
/ / / /| | / / \__ \/ __ \/ / __ \/ / __/
/ /___/ ___ |/ / ___/ / /_/ / / /_/ / / /_
\____/_/ |_/_/ /____/ .___/_/\____/_/\__/
/_/


[*] Connecting to cats-server
[*] Done.
[*] Initializing server
[*] Done.
catsploit>

客户端可以执行多种命令,每一个命令都可以使用-h选项来查看对应的帮助信息:​​​​​​​

usage: [-h] {host,scenario,scan,plan,attack,post,reset,help,exit} ...


positional arguments:
{host,scenario,scan,plan,attack,post,reset,help,exit}


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

下面给出的是该工具的常用命令参数信息:

host list:show information about the hostsusage:  host list [-h]options:-h, --help       显示命令帮助信息和退出host detail:show more information about one hostusage:  host detail [-h] host_idpositional arguments:host_id          要查看信息的主机IDoptions:-h, --help       显示命令帮助信息和退出scenario list:show information about the scenariosusage:  scenario list [-h]options:-h, --help       显示命令帮助信息和退出scenario detail:show more information about one scenariousage:  scenario detail [-h] scenario_idpositional arguments:scenario_id      要查看信息的场景IDoptions:-h, --help       显示命令帮助信息和退出scan:run network-scan and security-scanusage:  scan [-h] [--port PORT] target_host [target_host ...]positional arguments:target_host      要扫描的IP地址options:-h, --help       显示命令帮助信息和退出--port PORT      要扫描的端口plan:planning attack scenariosusage:  plan [-h] src_host_id dst_host_idpositional arguments:src_host_id      源主机dst_host_id      目标主机options:-h, --help       显示命令帮助信息和退出attack:execute attack scenariousage:  attack [-h] scenario_idpositional arguments:scenario_id      需要执行的渗透测试场景IDoptions:-h, --help       显示命令帮助信息和退出post find-secret:find confidential information files that can be performed on the pwned hostusage:  post find-secret [-h] host_idpositional arguments:host_id          需要寻找凭证信息的主机IDoptions:-h, --help       显示命令帮助信息和退出reset:reset data on the serverusage:  reset [-h] {system} ...positional arguments:{system}         重置系统options:-h, --help  显示命令帮助信息和退出exit:exit CATSploitusage:  exit [-h]options:-h, --help  显示命令帮助信息和退出

工具使用样例

在下面的演示样例中,我们将使用CATSploit扫描目标网络,并计划渗透测试策略和场景,最终执行渗透测试:

catsploit> scan 192.168.0.0/24

Network Scanning ... 100%

[*] Total 2 hosts were discovered.

Vulnerability Scanning ... 100%

[*] Total 14 vulnerabilities were discovered.

catsploit> host list

┏━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━┓

┃ hostID   ┃ IP             ┃ Hostname ┃ Platform                         ┃ Pwned ┃

┡━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━┩

│ attacker │ 0.0.0.0        │ kali     │ kali 2022.4                      │ True  │

│ h_exbiy6 │ 192.168.0.10   │          │ Linux 3.10 - 4.11                │ False │

│ h_nhqyfq │ 192.168.0.20   │          │ Microsoft Windows 7 SP1          │ False │

└──────────┴────────────────┴──────────┴──────────────────────────────────┴───────┘

 

 

catsploit> host detail h_exbiy6

┏━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━┓

┃ hostID   ┃ IP           ┃ Hostname ┃ Platform     ┃ Pwned ┃

┡━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━┩

│ h_exbiy6 │ 192.168.0.10 │ ubuntu   │ ubuntu 14.04 │ False │

└──────────┴──────────────┴──────────┴──────────────┴───────┘

 

[IP address]

┏━━━━━━━━━━━━━━┳━━━━━━━━━━┳━━━━━━┳━━━━━━━━━━━━┓

┃ ipv4         ┃ ipv4mask ┃ ipv6 ┃ ipv6prefix ┃

┡━━━━━━━━━━━━━━╇━━━━━━━━━━╇━━━━━━╇━━━━━━━━━━━━┩

│ 192.168.0.10 │          │      │            │

└──────────────┴──────────┴──────┴────────────┘

 

[Open ports]

┏━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓

┃ ip           ┃ proto ┃ port ┃ service     ┃ product      ┃ version                    ┃

┡━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩

│ 192.168.0.10 │ tcp   │ 21   │ ftp         │ ProFTPD      │ 1.3.5                      │

│ 192.168.0.10 │ tcp   │ 22   │ ssh         │ OpenSSH      │ 6.6.1p1 Ubuntu 2ubuntu2.10 │

│ 192.168.0.10 │ tcp   │ 80   │ http        │ Apache httpd │ 2.4.7                      │

│ 192.168.0.10 │ tcp   │ 445  │ netbios-ssn │ Samba smbd   │ 3.X - 4.X                  │

│ 192.168.0.10 │ tcp   │ 631  │ ipp         │ CUPS         │ 1.7                        │

└──────────────┴───────┴──────┴─────────────┴──────────────┴────────────────────────────┘

 

[Vulnerabilities]

┏━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┓

┃ ip           ┃ proto ┃ port ┃ vuln_name                                                           ┃ cve            ┃

┡━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━┩

│ 192.168.0.10 │ tcp   │ 0    │ TCP Timestamps Information Disclosure                               │ N/A            │

│ 192.168.0.10 │ tcp   │ 21   │ FTP Unencrypted Cleartext Login                                     │ N/A            │

│ 192.168.0.10 │ tcp   │ 22   │ Weak MAC Algorithm(s) Supported (SSH)                               │ N/A            │

│ 192.168.0.10 │ tcp   │ 22   │ Weak Encryption Algorithm(s) Supported (SSH)                        │ N/A            │

│ 192.168.0.10 │ tcp   │ 22   │ Weak Host Key Algorithm(s) (SSH)                                    │ N/A            │

│ 192.168.0.10 │ tcp   │ 22   │ Weak Key Exchange (KEX) Algorithm(s) Supported (SSH)                │ N/A            │

│ 192.168.0.10 │ tcp   │ 80   │ Test HTTP dangerous methods                                         │ N/A            │

│ 192.168.0.10 │ tcp   │ 80   │ Drupal Core SQLi Vulnerability (SA-CORE-2014-005) - Active Check    │ CVE-2014-3704  │

│ 192.168.0.10 │ tcp   │ 80   │ Drupal Coder RCE Vulnerability (SA-CONTRIB-2016-039) - Active Check │ N/A            │

│ 192.168.0.10 │ tcp   │ 80   │ Sensitive File Disclosure (HTTP)                                    │ N/A            │

│ 192.168.0.10 │ tcp   │ 80   │ Unprotected Web App / Device Installers (HTTP)                      │ N/A            │

│ 192.168.0.10 │ tcp   │ 80   │ Cleartext Transmission of Sensitive Information via HTTP            │ N/A            │

│ 192.168.0.10 │ tcp   │ 80   │ jQuery < 1.9.0 XSS Vulnerability                                    │ CVE-2012-6708  │

│ 192.168.0.10 │ tcp   │ 80   │ jQuery < 1.6.3 XSS Vulnerability                                    │ CVE-2011-4969  │

│ 192.168.0.10 │ tcp   │ 80   │ Drupal 7.0 Information Disclosure Vulnerability - Active Check      │ CVE-2011-3730  │

│ 192.168.0.10 │ tcp   │ 631  │ SSL/TLS: Report Vulnerable Cipher Suites for HTTPS                  │ CVE-2016-2183  │

│ 192.168.0.10 │ tcp   │ 631  │ SSL/TLS: Report Vulnerable Cipher Suites for HTTPS                  │ CVE-2016-6329  │

│ 192.168.0.10 │ tcp   │ 631  │ SSL/TLS: Report Vulnerable Cipher Suites for HTTPS                  │ CVE-2020-12872 │

│ 192.168.0.10 │ tcp   │ 631  │ SSL/TLS: Deprecated TLSv1.0 and TLSv1.1 Protocol Detection          │ CVE-2011-3389  │

│ 192.168.0.10 │ tcp   │ 631  │ SSL/TLS: Deprecated TLSv1.0 and TLSv1.1 Protocol Detection          │ CVE-2015-0204  │

└──────────────┴───────┴──────┴─────────────────────────────────────────────────────────────────────┴────────────────┘

 

[Users]

┏━━━━━━━━━━━┳━━━━━━━┓

┃ user name ┃ group ┃

┡━━━━━━━━━━━╇━━━━━━━┩

└───────────┴───────┘

 

 

catsploit> plan attacker h_exbiy6

Planning attack scenario...100%

[*] Done. 15 scenarios was planned.

[*] To check each scenario, try 'scenario list' and/or 'scenario detail'.

catsploit> scenario list

┏━━━━━━━━━━━━━┳━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓

┃ scenario id ┃ src host ip ┃ target host ip ┃ eVc   ┃ eVd   ┃ steps ┃ first attack step             ┃

┡━━━━━━━━━━━━━╇━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━╇━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩

│ 3d3ivc      │ 0.0.0.0     │ 192.168.0.10   │ 1.0   │ 32.0  │ 1     │ exploit/multi/http/jenkins_s… │

│ 5gnsvh      │ 0.0.0.0     │ 192.168.0.10   │ 1.0   │ 53.76 │ 2     │ exploit/multi/http/jenkins_s… │

│ 6nlxyc      │ 0.0.0.0     │ 192.168.0.10   │ 0.0   │ 48.32 │ 2     │ exploit/multi/http/jenkins_s… │

│ 8jos4z      │ 0.0.0.0     │ 192.168.0.10   │ 0.7   │ 72.8  │ 2     │ exploit/multi/http/jenkins_s… │

│ 8kmmts      │ 0.0.0.0     │ 192.168.0.10   │ 0.0   │ 32.0  │ 1     │ exploit/multi/elasticsearch/… │

│ agjmma      │ 0.0.0.0     │ 192.168.0.10   │ 0.0   │ 24.0  │ 1     │ exploit/windows/http/managee… │

│ joglhf      │ 0.0.0.0     │ 192.168.0.10   │ 70.0  │ 60.0  │ 1     │ auxiliary/scanner/ssh/ssh_lo… │

│ rmgrof      │ 0.0.0.0     │ 192.168.0.10   │ 100.0 │ 32.0  │ 1     │ exploit/multi/http/drupal_dr… │

│ xuowzk      │ 0.0.0.0     │ 192.168.0.10   │ 0.0   │ 24.0  │ 1     │ exploit/multi/http/struts_dm… │

│ yttv51      │ 0.0.0.0     │ 192.168.0.10   │ 0.01  │ 53.76 │ 2     │ exploit/multi/http/jenkins_s… │

│ znv76x      │ 0.0.0.0     │ 192.168.0.10   │ 0.01  │ 53.76 │ 2     │ exploit/multi/http/jenkins_s… │

└─────────────┴─────────────┴────────────────┴───────┴───────┴───────┴───────────────────────────────┘

 

catsploit> scenario detail rmgrof

┏━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━┓

┃ src host ip ┃ target host ip ┃ eVc   ┃ eVd  ┃

┡━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━┩

│ 0.0.0.0     │ 192.168.0.10   │ 100.0 │ 32.0 │

└─────────────┴────────────────┴───────┴──────┘

 

[Steps]

┏━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━┓

┃ # ┃ step                                  ┃ params                ┃

┡━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━┩

│ 1 │ exploit/multi/http/drupal_drupageddon │ RHOSTS: 192.168.0.10  │

│   │                                       │ LHOST: 192.168.10.100 │

└───┴───────────────────────────────────────┴───────────────────────┘

 

 

catsploit> attack rmgrof

> ~

> ~

> Metasploit Console Log

> ~

> ~

[+] Attack scenario succeeded!

 

 

catsploit> exit

Bye.

项目地址

CATSploit:

https://github.com/catsploit/catsploit

行动吧,在路上总比一直观望的要好,未来的你肯定会感谢现在拼搏的自己!如果想学习提升找不到资料,没人答疑解惑时,请及时加入群: 759968159,里面有各种测试开发资料和技术可以一起交流哦。

最后: 下方这份完整的软件测试视频教程已经整理上传完成,需要的朋友们可以自行领取【保证100%免费】

软件测试面试文档

我们学习必然是为了找到高薪的工作,下面这些面试题是来自阿里、腾讯、字节等一线互联网大厂最新的面试资料,并且有字节大佬给出了权威的解答,刷完这一套面试资料相信大家都能找到满意的工作。在这里插入图片描述

在这里插入图片描述

  • 11
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值