Using compromised computer as a proxy with ncat 10-04-2012, 05:16 PM
#1
Basics
ncat is a netcat clone developed by nmap team. It has more functions than the original netcat, one of the most interesting ones being an ability to quickly set up HTTP proxies. This is an ncat specific funtcions, it won't work with netcat
Purpose
Proxies are good for anonymity, obviously. Setting up a proxy on a compromised computer might be a good way to gain a foothold into target LAN, especially if IP whitelists are in use.
How to do it
You need to know what ports are open. Check it with nmap. Also, if you have access to firewall config you can actually open additional ports. Then you need to get ncat into target computer. If target computer is running Windows, just download this http://nmap.org/dist/ncat-portable-5.59BETA1.zip. If it's Linux, you'll need to download RPM with either source or binaries and install (will usually require root). Then you need to make it so that on startup it will execute this command:
You can use this proxy for your browser, you set it up as any other proxy. You can also use this proxy for ncat with this command:
Remember that it doesn't accept some HTTP methods. You won't be able to use PUT, DELETE etc. only GET, POST, HEAD and CONNECT.
ncat is a netcat clone developed by nmap team. It has more functions than the original netcat, one of the most interesting ones being an ability to quickly set up HTTP proxies. This is an ncat specific funtcions, it won't work with netcat
Purpose
Proxies are good for anonymity, obviously. Setting up a proxy on a compromised computer might be a good way to gain a foothold into target LAN, especially if IP whitelists are in use.
How to do it
You need to know what ports are open. Check it with nmap. Also, if you have access to firewall config you can actually open additional ports. Then you need to get ncat into target computer. If target computer is running Windows, just download this http://nmap.org/dist/ncat-portable-5.59BETA1.zip. If it's Linux, you'll need to download RPM with either source or binaries and install (will usually require root). Then you need to make it so that on startup it will execute this command:
Code:
ncat -l [port] -proxy-type http --[login]:[pass]Code:
ncat -proxy [victim IP]:[port] -proxy-type http --[login]:[pass]
(This post was last modified: 10-04-2012, 05:16 PM by digitkharel.)

![[+]](https://sinister.li/images/modern/collapse_collapsed.png)


