Situation:
- Limited to windows network
- Not able to use SSH for pivoting.
- Need to use tools available to Windows for this situation
SocksOverRDP is an example of one such tool. https://github.com/nccgroup/SocksOverRDP
Uses DVC Dynamic Virtual Channels from RDP service feature in windows.
- Responsible for tunneling packets over an RDP connection
- EX:
- Clipboard data
- Audio sharing
- Feature can be used to tunnel arbitrary packets over a network.
- SocksOverRDP uses this feature to tunnel custom packets and proxy through it.
We use the tool proxifier as our proxy server.
https://www.proxifier.com/
Binaries: https://github.com/nccgroup/SocksOverRDP/releases https://www.proxifier.com/download/#win-tab
We can then connect to the target using xfreerdp and copy the SocksOverRDPx64.zip file to the target. From the Windows target, we will then need to load the SocksOverRDP.dll using regsvr32.exe.
C:\Users\htb-student\Desktop\SocksOverRDP-x64> regsvr32.exe SocksOverRDP-Plugin.dll
just search for RDP in search to open rdp client.
Now we can connect to 172.16.5.19 over RDP using mstsc.exe, and we should receive a prompt that the SocksOverRDP plugin is enabled, and it will listen on 127.0.0.1:1080. We can use the credentials victor:pass@123 to connect to 172.16.5.19.

We need to transfer SocksOverRDPx64.zip or just SocksOverRDP-Server.exe to 172.16.5.19 then we can start SocksOverRDP-Server.exe with admin privileges
.\SocksOverRDP-Server.exe
When we go back to foothold target and check with netstat we will see SOCKS listener started on 127.0.0.1:1080
netstat -antb | findstr 1080
After listener is started, transfer Proxifier to Win10 target (on 10.129.x.x network) and configure it to forward all packets to 127.0.0.1:1080
- Proxifier will route traffic thru given host and port.
- With proxifier configured/running, we start
mstsc.exeand it will useProxifierto pivot all our traffic via127.0.0.1:1080which will tunnel it over RDP to172.16.5.19and route it to172.16.6.155usingSocksOverRDP-server.exe


When interacting with our RDP sessions on an engagement, we may find ourselves contending with slow performance in a given session, especially if we are managing multiple RDP sessions simultaneously. If this is the case, we can access the Experience tab in mstsc.exe and set Performance to Modem.