Crates.io | catsploit |
lib.rs | catsploit |
version | 0.1.2 |
source | src |
created_at | 2023-03-02 15:43:05.674104 |
updated_at | 2023-03-02 16:58:30.672582 |
description | An open-source modern exploitation framework inspired by Metasploit |
homepage | https://github.com/tirax-lab/catsploit/tree/main/catsploit |
repository | https://github.com/tirax-lab/catsploit/tree/main/catsploit |
max_upload_size | |
id | 798957 |
size | 88,209 |
Catsploit is an open-source modern exploitation framework inspired by Metasploit.
Catsploit is currently in early development and the project is aiming to attract contributors who are interested in building the next generation exploitation framework in Rust. The project is intended to stay 100% open-source with no premium version, and is licensed under GPLv3.
To install as a crate: cargo install catsploit
To build from source:
git clone https://github.com/tirax-lab/catsploit
cd catsploit/catsploit
cargo build --release
sudo cp ./target/release/catsploit /usr/local/bin
In this exploitation a virtual machine with Metasploitable2 is running at 172.16.187.128
, which has a vulnerable VSFTPD
server running:
nc_mkfifo_reverse_tcp
payload has its LHOST
set to 172.16.1.1
which is where VMware routes back to the host machineVSFTPD
exploit has its RHOST
set to 172.16.187.128
and the default RPORT
is 21
for the FTP serverrun
is called, the exploit runs and the payload runs a pretask which starts a listening TCP server for the shell connectioncatsploit
directory contains only the code to create the CLI app, such as the user input loop and dealing with setting module options. catsploit
interacts with the catsploit_lib
librarycatsploit_lib
directory contains the library. catsploit_lib
contains the functional code for carrying out tasks with Catsploit. For example the Exploit
trait and also the individual modules such as the Vsftpd234Backdoor
exploitThis structure of a split between the CLI app and the library allows other custom applications to hook into catsploit_lib
and use its functionality. For example an axum
server could be written in the future to allow calling of catsploit_lib
code from a website.
Some points on automated testing within Catsploit:
catsploit_lib/src/core/exploit/remote_tcp.rs
, tests are written for the both connect
and custom_connect
but not for opts
. A test could be written for opts
that iterates through the values looking for RHOST
etc., but this makes the changing the opts
function more involved for not much benefitprint_exploit
in catsploit/src/cli/info.rs
show_exploits
in catsploit/src/cli/cmd/show.rs
takes a boolean indicating if the function is running in a test or not, to prevent it from printing the full exploit table to STDOUT during tests. There may be possible ways to block the STDOUT printing in the tests using closures etc., that wouldn't need to modify the show_exploits
function signature. The added complexity and development time for that isn't worth it to avoid a simple parameter change.To run tests for both the catsploit library and the CLI application:
cargo test --manifest-path=catsploit_lib/Cargo.toml && cargo test --manifest-path=catsploit/Cargo.toml