From 4b728a3f2d1e6c058322fd329ca0c097d1c4f5e4 Mon Sep 17 00:00:00 2001 From: AlessandroZ Date: Fri, 16 Nov 2018 17:22:48 +0100 Subject: [PATCH] Updated Basic Usage (markdown) --- Basic-Usage.md | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/Basic-Usage.md b/Basic-Usage.md index ca6c6fd..3945fc6 100644 --- a/Basic-Usage.md +++ b/Basic-Usage.md @@ -19,7 +19,7 @@ This is even true for modules ! For example if you want to know how to use the pyexec module type : ```code ->> run pyexec -h +>> pyexec -h usage: pyexec [-h] [--file ] [-c ] execute python code on a remote system @@ -40,13 +40,13 @@ download interactive_shell memory_exec persistence exit keylogger migrate port_scan pyshell socks5proxy get_info linux_pers mimikatz portfwd screenshot upload getprivs linux_stealth mouselogger process_kill search webcamsnap ->> run load_package +>> load_package _sqlite3 linux_stealth psutil pupyimporter pyshell sqlite3 interactive_shell netcreds ptyshell pupymemexec pywintypes27.dll vidcap linux_pers portscan pupwinutils pupyutils scapy ``` ```code ->> run pyexec - +>> pyexec - --code --file --help -c -h >> run pyexec --file / /bin/ /etc/ /lib/ /libx32/ /media/ /proc/ /sbin/ /sys/ /var/ @@ -56,15 +56,15 @@ linux_pers portscan pupwinutils pupyutils scap ## Escape your arguments Every command in pupy shell uses a unix-like escaping syntax. If you need a space in one of your arguments you need to put your argument between quotes. ```code ->> run shell_exec 'tasklist /V' +>> shell_exec 'tasklist /V' ``` If you send a Windows path, you need to double the backquotes or put everything between quotes. ```code ->> run download 'C:\Windows\System32\cmd.exe' +>> download 'C:\Windows\System32\cmd.exe' ``` or ```code ->> run download C:\\Windows\\System32\\cmd.exe +>> download C:\\Windows\\System32\\cmd.exe ``` @@ -125,6 +125,24 @@ To interact with one client, use the `sessions -i` command. You can find all the available filtering parameters using the `get_info` module. +## Run commands after getting a new session +These commands should be specify on the [pupy.conf](https://github.com/n1nj4sec/pupy/blob/unstable/pupy/pupy.conf.default) file after the [on_connect](https://github.com/n1nj4sec/pupy/blob/unstable/pupy/pupy.conf.default#L135) statement. +To run these modules for each new sessions, all commands should start by **any** (or by *) and should have different names. +``` +[on_connect] +any_1 = beroot +any_2 = lazagne +``` +Another way should be to include an entire category like so +``` +[on_connect] +* = include:default_commands + +[default_commands] +any_1 = beroot +any_2 = lazagne +``` + ## Run local commands Start your command with a `!` ```