Thursday, March 22, 2012

RDP Over Tor

Привет мои товарищи России

Sometimes I like to use Tor for stuff. Sometimes that stuff is the Remote Desktop Protocol

This requires you have TOR setup and know how to use it and aren't an idiot that thinks just turning on TOR will make you invisible to the world.

You'll also need a handy little program called socat:
----------
UPDATE
----------
Since this is the most popular post I have (I'm looking at you Russia) I figured I'd be a decent guy and find the socat binaries on the web and link to them.
 
Here's the link for Socat:
Socat Binaries For Windows 
(French description on top, scroll to the bottom for English)
Respect to the Blog of the Nice Kiwi.

Extract that into one folder and add script from below.
Toss until evenly coated.

You'll need to adjust path for where TOR is installed for you.

-=The Script=-

@echo off
set c=%random%
if %c% GTR 15 goto less
if %c% LEQ 15 goto rainbow
:less
set c=%c:~1%
if %c% LEQ 15 goto rainbow
if %c% GTR 15 goto less
:rainbow
if %c% EQU 1 color 01
if %c% EQU 2 color 0A
if %c% EQU 3 color 03
if %c% EQU 4 color 04
if %c% EQU 5 color 05
if %c% EQU 6 color 0D
if %c% EQU 7 color 07
if %c% EQU 8 color 0F
if %c% EQU 9 color 09
if %c% EQU 10 color 02
if %c% EQU 11 color 0B
if %c% EQU 12 color 0C
if %c% EQU 13 color 06
if %c% EQU 14 color 0E
if %c% EQU 15 color 09
cls
Title Starting TOR
Echo Connecting to the DarkWebs
start "TOR" /DC:\progra~1\vidali~1\tor\tor.exe
cls
Title Meow~~~
echo ************
echo RDP over TOR
echo ************
echo +Enter Victim Address:
set /p victim=
cls
title Meow~~~ +%victim%
echo +Enter Victim Port:    *default 3389
set /p port=
cls
title Meow~~~ +%victim%:%port%
echo +Enter Local Port to Listen on: *ex: 1234
set /p lport=
cls
title Meow~~~ +%victim%:%port% from 127.0.0.1:%lport%
echo #Give a CTRL+C to bail
echo +Launching MSTSC for you...
start mstsc /V:127.0.0.1:%lport%
echo +Connecting...
socat TCP4-LISTEN:%lport%,fork SOCKS4A:localhost:%victim%:%port%,socksport=9050
exit


***************
*BONUS STAGE*
***************
Same script except I got rid of the auto launch of mstsc and changed RDP to VNC in the text.

-=The Script=-
@echo off
@echo off
set c=%random%
if %c% GTR 15 goto less
if %c% LEQ 15 goto rainbow
:less
set c=%c:~1%
if %c% LEQ 15 goto rainbow
if %c% GTR 15 goto less
:rainbow
if %c% EQU 1 color 01
if %c% EQU 2 color 0A
if %c% EQU 3 color 03
if %c% EQU 4 color 04
if %c% EQU 5 color 05
if %c% EQU 6 color 0D
if %c% EQU 7 color 07
if %c% EQU 8 color 0F
if %c% EQU 9 color 09
if %c% EQU 10 color 02
if %c% EQU 11 color 0B
if %c% EQU 12 color 0C
if %c% EQU 13 color 06
if %c% EQU 14 color 0E
if %c% EQU 15 color 09
cls
Title Starting TOR
Echo Connecting to the DarkWebs
start "TOR" /DC:\progra~1\vidali~1\tor\tor.exe
cls
Title Meow~~~
echo ************
echo VNC over TOR
echo ************
echo +Enter Victim Address:
set /p victim=
cls
title Meow~~~ +%victim%
echo +Enter Victim Port:    *default 5900
set /p port=
cls
title Meow~~~ +%victim%:%port%
echo +Enter Local Port to Listen on: *ex: 1234
set /p lport=
cls
title Meow~~~ +%victim%:%port% from 127.0.0.1:%lport%
echo Connect VNC to 127.0.0.1:%lport%
echo +Connecting...
socat TCP4-LISTEN:%lport%,fork SOCKS4A:localhost:%victim%:%port%,socksport=9050
exit


Change your ports and any program that can run through SOCKS can be run through TOR with these scripts and socat.

No comments:

Post a Comment

All comments moderated.
Comments like "sweet dude" or "this is awesome" or "thanks" will be denied,
if you've got something genuinely interesting to say, say it. Other than that just sit back and bask in the glory.