Skip to content

vwalsh/pentester-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 

Repository files navigation

README

Requirements

  1. nodejs
  2. npm

Contributions

  1. before each git commit, run npm run lint from the pentester-app folder and attempt to cleanup any errors and warnings
    1. linting will change the code so you'll likely need to git add . ../ again
  2. git branching isn't necessary as this is a small project. working off main is just fine. use a resonably descriptive git commit message and all is well.

Installing Nodejs via N

sudo mkdir -p /usr/local/n
sudo chown -R $(whoami) /usr/local/n
sudo mkdir -p /usr/local/bin /usr/local/lib /usr/local/include /usr/local/share
sudo chown -R $(whoami) /usr/local/bin /usr/local/lib /usr/local/include /usr/local/share

curl -fsSL https://raw.githubusercontent.com/tj/n/master/bin/n | bash -s lts

node --version
npm --version

Getting Started

cd pentester-app
npm install

# to update the assets required for selecting an http file to download:
# the path is an absolute path to the given location of pentesting tools that might be useful to serve over http for downloading
#  on a target machine.
npm run dirtree -- '/home/kali/oscp/tools'


npm run dev

Adding or Editing Commands.json

src/assets/commands.json contains the information for the commands available on the Tools page. To add or edit is mostly the same process, however a few things should be known up front.

  1. The web app New Command ui does NOT write to the commands.json file. That must be done from a terminal (suggest using ./json.sh).
  2. The New Command ui has limited validation of input data. This will improve over time. Until then, consider what each value is intended for and read the relevant help section.
  3. To save any changes you must add the new json element to the commands.json base array, or overwrite an existing element.
  4. Manual editing of commands.json data is not suggested as the New Command ui works quite well. Be sure to test any edits before making a PR so that the entire app isn't broken due to poorly formatted json.

Helpful Commands

Here are some helpful commands for various tasks relating to updating the json.

# consider installing jq for json processing, this is not a default on kali
sudo apt install jq

# source code base directory
cd pentester-app

# using the custom json.sh script, learn about it's options via help.
# NOTE: this script mostly uses the clipboard via the xclip utility.
#     this means that it flows nicely with the New Command tool by coping the new/updated json
#     and then running ./json.sh with the appropriate flag.
./json.sh -h

Example: Updating an existing set of commands

Goal: using the existing commands, update the file-enumeration commands.

# start by finding the index of the file enumeration commands by searching for 'enum'
./json.sh -f enum

# this returns:
# "4 file-+-smb-enumeration"
# 
# The '4' indicates the index, which is needed for the next commands

# copy the json (at index 4) into the clipboard
./json.sh -c 4

# goto the web browser, to the New Command section of this web app and paste the json into the textfield

# when editing is finished, copy the json from the New Command json textfield, then:
# this will insert the json into the index 4 (index of the file enumeration commands)
./json.sh -i 4

Example: Adding a new command to the commands json

Goal: Create a new command and add it to the json properly

# start by creating the json in the web app via the New Command ui
# copy the json with the copy button on the New Command page, then:
# this will append the current clipboard json to the commands.json if it's valid json data.
./json.sh -a

About

Pentesting tools helper gui

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages