pyro57000 02022fc160 added command to build the cobalt strike
portscan command based off of the scope
in general notes
2024-12-19 09:54:12 -06:00
2023-12-21 21:53:34 +00:00
2024-12-18 13:15:13 -06:00

pentest_tool

A quick little tool to manage which projects you're on and manage distrobox containers for each environment.

In order to use this tool you'll want to have distrobox set up and have a "template" box you've created that has all yoru tools installed and what not, you'll likely also want to have a folder full of your other custom tools that you get from git hub, this makes it easier.

The distroboxes it sets up will have the prjoect files folder for the project mounted at /pentest and folder you use for custom tools (like the ones you clone from github) at /tools so getting to your files for the project is as easy as cd /pentest!

General Use case and flow

I'm not very good at organization. In order to keep track of all the things needed for pentest engagements and keep client data separated from other client data I worte this tool to do it for me. Basically I have a distrobox for each engagement, a folder to keep files related to the engagement, and a separate folder full of my markdown notes for the engagement. An example is below

Current engagements: client1 internal pentest, client 2 internal pentest

/home/pyro/

  • pentests

    • current
      • client1
        • internal_pentest
          • file_exfil
          • exploit.py
          • etc
      • client2
        • internal_pentest
          • file_exfil
          • exploits
          • etc
    • upcomming
    • writing
  • notes

    • current
      • client1
        • internal_pentest
          • general_notes.md
          • to_do.md
          • findings.md
          • enumeration_notes.md
          • attack_notes.md
      • client2
        • internal_pentest
          • general_notes.md
          • to_do.md
          • findings.md
          • enumeration_notes.md
          • attack_notes.md
    • upcomming
    • writing
  • tools

    • bloodhound-linux-x86_64_4.3.1
    • bofhound
    • burp_extensions
    • ek45
    • etc

This tool automatically creates the file structure, and if you use the start_pentest option populates the markdown note files with the templates I use.

For example if I get a new internal pentest engagement for client 3 but it hasn't started yet I'll start by creating the folder and note structure using option 4 in the menu system. This would create the folder structure and notes templates in the /home/pyro/pentests/upcomming/client3/internal_pentest and /home/pyro/notes/upcomming/client3/internal_pentest folders respectively. It does not create the distrobox or add it to the tracked project list yet.

Once the engagement starts I'd run option 6 "import new project - and set up new distrobox" from the menu system. It will ask if you have an existing folder structure to copy over, since I created that structure before with option 4 I would answer y, yes, or anything with the letter y in it. Then it prompts you to past the path to the folders to copy over. Here I browse to /home/pyro/pentests/upcomming in dolphin. I right click on the client3 folder and select "copy path" and then paste that into the terminal. I repeat this process for the notes folder.

It then attempts to guess the client name and project name based on the folder structure, and asks you to confirm. If its correct the project object will be created, the folders will be copied, and a new distrobox will be set up. If it is not correct it will prompt you to correct it, then copy the files, create a new project object, and setup a new distrobox. At the moment it is not very fault tollerant and will fail if there is an existing folder with the same name. I plan to fix that later, but haven't gotten around to it yet. Once the distro box is set up (this takes a while) it will return you to the main menu.

During the test I use the menu system to spawn new terminals in the distrobox created for the engagement, use the various file generation options to get data in easily usable format for attack operations, etc.

Once the project is done and I'm ready to clean up the distrobox I use option 7 "Remove Project" to delete the distrobox. Eventually this will also move the files to the writing folders, but I haven't implemented that yet.

Installation

  1. download the latest executable from the releases in github.
  2. copy this executable to a folder on your $PATH such as /usr/bin.
  3. ensure you have a folder to keep your project files in created.
  4. ensure you have a foldder to keep your notes in created.
  5. ensure you have a distrobox created with all the tools and configurations you want.
  6. run the tool and follow the on screen prompts.

Manual Building instructions

  1. clone this repository git clone https://github.com/Pyro57000/pentest_tool.git
  2. cd into the nested "pentest_tool" folder cd pentest_tool/pentest_tool
  3. use cargo to build the release binary cargo build --release
  4. follow the same installation instructions, skipping the step where you download the release binary.
Description
A quick little tool to manage which projects you're on and manage distrobox containers for each environment.
Readme GPL-3.0 124 MiB
Languages
Rust 100%