Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Arsenal is just a quick inventory and launcher for hacking programs

License

Notifications You must be signed in to change notification settings

kasem545/arsenal

Repository files navigation

Arsenal

Arsenal is just a quick inventory, reminder and launcher for pentest commands.
This project written by pentesters for pentesters simplify the use of all the hard-to-remember commands

In arsenal you can search for a command, select one and it's prefilled directly in your terminal. This functionality is independent of the shell used. Indeed arsenal emulates real user input (with TTY arguments and IOCTL) so arsenal works with all shells and your commands will be in the history.

You have to enter arguments if needed, but arsenal supports global variables.
For example, during a pentest we can set the variable ip to prefill all commands using an ip with the right one.

To do that you just have to enter the following command in arsenal:

>set ip=10.10.10.10

Authors:

  • Guillaume Muh
  • mayfly

Maintaner:

  • kasem545

This project is inspired by navi (https://github.com/denisidoro/navi) because the original version was in bash and too hard to understand to add features

Arsenal new features

  • New colors
  • Add tmux new pane support (with -t)
  • Add tmux pane selector for multiple panes/windows
  • Add default values in cheatsheets commands with <argument|default_value>
  • Support description inside cheatsheets
  • New categories and Tags
  • New cheatsheets
  • Add yml support (thx @0xswitch )
  • Add fzf support with ctrl+t (thx @mgp25)
  • Add prefix to commands generated (with -f)

Keyboard Shortcuts

Main Menu (Command Selection)

Shortcut Action
Ctrl+E Edit command directly
Ctrl+Y Copy selected command to clipboard
Ctrl+R Toggle history filter
Ctrl+F Toggle favorites filter
Ctrl+P Pin/unpin command to favorites
Tab Auto-complete command
Enter Select command and fill arguments
Esc/F10 Exit arsenal

Arguments Menu (Variable Filling)

Shortcut Action
Ctrl+E Edit full command directly
Ctrl+Y Copy command to clipboard
Ctrl+T Fuzzy file selector (requires pyfzf)
Tab Auto-complete argument / Next argument
↑/↓ Navigate between arguments
Enter Confirm and execute
Esc Return to command list

Command Editor (Ctrl+E)

Shortcut Action
Ctrl+U Clear line
Ctrl+Y Copy command to clipboard
Enter Confirm edited command
Esc Cancel and return

Install & Launch

  • with pipx :
pipx install git+https://github.com/kasem545/arsenal@dev
  • run (we also advice you to add this alias : alias a='arsenal')
arsenal
  • manually:
git clone --branch dev https://github.com/kasem545/arsenal.git
cd arsenal
pip install -e .

Inside your .bashrc or .zshrc add the path to run to help you do that you could launch the addalias.sh script

./addalias.sh

Launch in tmux mode

arsenal -t # launch arsenal in tmux mode
arsenal -t -e # tmux mode with direct execution (auto-press Enter)

Tmux Pane Selector

When running in tmux mode with multiple panes or windows open, arsenal will show a pane selector allowing you to choose where to send the command:

 Session Win Window Name Pane Path
> arsenal 0 main 1 /home/user/project
 dev 0 code 0 /home/user/code
 dev 1 logs 0 /var/log

Pane Selector Shortcuts:

Key Action
Enter Send command to selected pane
Esc Cancel and return to command list
s Create new sub-pane (horizontal split in current window)
p Create new pane (opens new tmux window)
↑/↓ Navigate pane list

If only one other pane exists, the selector is shown so you can choose to send there or create a new pane. arsenal -t # if you launch arsenal in a tmux window with one pane, it will split the window and send the command to the otherpane without quitting arsenal # if the window is already split the command will be send to the other pane without quitting arsenal arsenal -t -e # just like the -t mode but with direct execution in the other pane without quitting arsenal


## Add external cheatsheets
You could add your own cheatsheets inside the my_cheats folder or in the ~/.cheats folder.
You could also add additional paths to the file `<arsenal_home>/arsenal/modules/config.py`,
arsenal reads `.md` (MarkDown), `.rst` (RestructuredText), `yml` (yaml), `.cheat`

CHEATS_PATHS = [ join(BASEPATH, "my_cheats"), # DEFAULT join(HOMEPATH, ".cheats") ]


Cheatsheets examples are in `<arsenal_home>/my_cheats`: `README.md` and `README.rst`
## Add a prefix commands generated
In order to prefix commands generated by arsenal you need to set the `arsenal_prefix_cmd` global variable. 
For example if you need your commands to be prefixed with `proxychains -q`:

set arsenal_prefix_cmd=proxychains -q


then you can start run arsenal with the prefix option:
```bash
arsenal -f

Troubleshooting

If you got on error on color init try :

export TERM='xterm-256color'

--

If you have the following exception when running Arsenal:

ImportError: cannot import name 'FullLoader'

First, check that requirements are installed:

pip install -r requirements.txt

If the exception is still there:

pip install -U PyYAML

--

If you encounter an exception similar to the following (contains TIOCSTI in strace) when running Arsenal:

[...]
 fcntl.ioctl(stdin, termios.TIOCSTI, c)
OSError: [Errno 5] Input/output error

Then you may need to re-enable TIOCSTI. Please run the following commands as root to fix this issue on the current session :

sysctl -w dev.tty.legacy_tiocsti=1

If you want this workaround to survive a reboot, add the following configuration to sysctl.conf file and reboot :

echo "dev.tty.legacy_tiocsti=1" >> /etc/sysctl.conf

Mindmap

  • Active Directory Mindmap

    Active_Directory_mindmap

  • AD mindmap black version

  • Exchange Mindmap (thx to @snovvcrash)

  • Active directory ACE mindmap

About

Arsenal is just a quick inventory and launcher for hacking programs

Resources

License

Stars

Watchers

Forks

Languages

  • Python 95.7%
  • Shell 4.3%

AltStyle によって変換されたページ (->オリジナル) /