CrackMapExec icon indicating copy to clipboard operation
CrackMapExec copied to clipboard

Feature: Bash auto completion

Open vdun opened this issue 7 years ago • 1 comments

vdun avatar Feb 27 '17 02:02 vdun

Hey @vdun I've skeleton'd out the attached file here. Feel free to help fill in the details.
It'll need some thinking through on the command hierarchy to provide context-sensitive suggestions, but it's a start.

The example command would be:

cme <tab><tab>
cme smb <tab>
cme smb target 10.10.10.10 <tab><tab>
cme smb target 10.10.10.10 -M <tab><tab>
cme smb target 10.10.10.10 -M empire_exec<tab>
cme smb target 10.10.10.10 -M empire_exec -o LISTENER=

Drop it in /etc/bash_completion.d as just 'cme' without the txt extension. Run '. /etc/bash_completion' to load or reload it.

root@kali:~# cme 
http   mssql  smb    ssh    
root@kali:~# cme smb target 10.10.10.10 -
--clear-obfscripts  --groups            --loggedon-users    -p                  --server-port       --wmi
-d                  -H                  --lsa               --pass-pol          --sessions          --wmi-namespace
--disks             -id                 -M                  --rid-brute         --shares            -x
--exec-method       -L                  --no-output         --sam               --spider            -X
--force-ps32        --local-auth        --ntds              --server            -u                  
--gen-relay-list    --local-groups      --obfs              --server-host       --users             
root@kali:~# cme smb target 10.10.10.10 -M 
empire_exec                gpp_autologin              mimikatz_enum_vault_creds  slinky
enum_avproducts            gpp_password               mimikittenz                test_connection
enum_chrome                invoke_sessiongopher       multirdp                   tokens
get_keystrokes             invoke_vnc                 netripper                  uac
get_netdomaincontroller    met_inject                 pe_inject                  wdigest
get_netrdpsession          mimikatz                   rdp                        web_delivery
get_timedscreenshot        mimikatz_enum_chrome       shellcode_inject           
root@kali:~# cme smb target 10.10.10.10 -M empire_exec -o LISTENER=

NotMedic avatar Jun 21 '18 12:06 NotMedic