Skip to content

Script to quickly build folder structure and run basic nmaps for pentest boxes

Notifications You must be signed in to change notification settings

pharo-sec/AutoBox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

AutoBox Bash Script

I got tired of running the same commands over and over again and decided to automate first few steps when starting on a new pentest lab machine. I create Autobox to create a directory named after the machine I'm attacking as well create several sub-driectories to help organize my files while working.

The script currently accepts two total arguments:

  • The name of the machine
  • The IP of the machine

It will then run a full port scan nmap against the host, save the output, extract the open ports, run an nmap service scan (-sV -sC), and finally save the output of the commands to loca files and generate markdown files to help organize note-taking.

I also added a little scp command that prints after the script completes to help move the files to another machine if need be (I take my notes on my Windows machine, but work in a Kali VM, so this is really helpful for me)

Usage

$ ./AutoBox.sh [MACHINE]

It will then prompt for the IP of the machine

Script Running

It will create a directory within your current working directory named after the machine name given, inside this directory it creates several subdirectories:

  • nmap: The nmap commands store their outputs here
  • enumeration: A place to store your enumeration tools output
  • shell: Files and methods required to gain a foothold on the machine
  • priv-esc: Files and methods required to escalate privileges on the machine

Created Directories

The script also creates template markdown files for each step of in the attack chain

Example Markdown File

Rendered Example

Rendered Markdown File

Future Upgrades

I want to add more logic to the script to run more enumeration commands depending on the services identified, specifically:

  • SMB
    • enum4linux
    • nmap SMB vuln scan
    • smbmap
  • HTTP
    • Directory Bruteforce
    • Nikto

About

Script to quickly build folder structure and run basic nmaps for pentest boxes

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages