nettitude / PoshC2

A proxy aware C2 framework used to aid red teamers with post-exploitation and lateral movement.
BSD 3-Clause "New" or "Revised" License
1.81k stars 326 forks source link

Scripting improvements #201

Closed riskydissonance closed 4 years ago

riskydissonance commented 4 years ago
# tail ~/.zshrc                                                                                                                                                                                                                                                                        

function posh-dir(){
    cd `posh-project -g`
}

# posh-dir                                                                                                                                                                                                                                                                                       
drwxrwxrwx    - root  3 Nov 15:41 .
drwxr-xr-x    - root  3 Nov 14:16 ..
drwxrwxrwx    - root  3 Nov 15:00 downloads
drwxrwxrwx    - root  3 Nov 15:01 payloads
drwxrwxrwx    - root  3 Nov 15:00 reports
.rwxrwxrwx   80 root  3 Nov 15:39 .implant-history
.rwxrwxrwx   35 root  3 Nov 15:39 .top-history
.rwxrwxrwx 1.6k root  3 Nov 14:26 config.yml
.rwxrwxrwx 1.2k root  3 Nov 15:01 posh.crt
.rwxrwxrwx 1.7k root  3 Nov 15:01 posh.key
.rwxrwxrwx  18k root  3 Nov 15:41 poshc2_server.log
.rwxrwxrwx 106k root  3 Nov 15:41 PowershellC2.SQLite
.rwxrwxrwx 9.3k root  3 Nov 15:01 quickstart.txt
.rwxrwxrwx 3.2k root  3 Nov 15:00 rewrite-rules.txt
.rwxrwxrwx 201k root  3 Nov 15:42 webserver.log

(You have to add this to the shell init file as a function as scripts run in their own process, so changing directory has no affect on the actual current shell).