• Stars
    star
    1,067
  • Rank 43,306 (Top 0.9 %)
  • Language
    C++
  • License
    MIT License
  • Created over 4 years ago
  • Updated about 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Socks5/4/4a Proxy support for Remote Desktop Protocol / Terminal Services / Citrix / XenApp / XenDesktop

Socks Over RDP / Socks Over Citrix

This tool adds the capability of a SOCKS proxy to Terminal Services (or Remote Desktop Services) and Citrix (XenApp/XenDesktop). It uses Dynamic Virtual Channel that enables us to communicate over an open RDP/Citrix connection without the need to open a new socket, connection or a port on a firewall.

How can I use it?

You need to install a plugin (.dll) on your client computer that you use to connect to the RDP/Citrix server. On the RDP/Citrix server you need to use the other half of the project the .exe, which creates the channel between the plugin and the server executable. More details can be found below. If you want to use it with Citrix/XenApp/XenDesktop please scroll to Citrix section.

How does this work?

If the DLL is properly registered, it will be loaded by the mstsc.exe (Remote Desktop Client) or Citrix Receiver every time it is started. When the server executable runs on the server side, it connects back to the DLL on a dynamic virtual channel, which is a feature of the Remote Desktop Protocol. After the channel is set up, a SOCKS Proxy will spin up on the client computer, by default on 127.0.0.1:1080. This service can be used as a SOCKS5 Proxy from any browser or tool.

Compatibility

Dynamic Virtual Channels were introduced in Window Server 2008 & Windows Vista SP1. These and anything newer than these should be good to go.
Right now the client works with mstsc.exe (Remote Desktop Client). In case you want to use it from Unix, give FreeRDP a try, it has released a similar module in about the same time as this tool was released.
Citrix supports the same underlying API as Microsoft, although not sure when it was introduced, it was before 2013 so the plugin should work with most Citrix solutions.

Installation

You can grab the whole project and compile it by yourself or just use the compiled binaries from the Releases section. It is important that the correct binary is used in all cases, please select the correct one for the corresponding architecture (if your client is 32bit but the server is 64bit then grab the 32bit dll and 64bit exe). The .dll needs to be placed on the client computer in any directory (for long-term use, it is recommended to copy it into the %SYSROOT%\system32\ or %SYSROOT%\SysWoW64\) and install it with the following command as an elevated user (a.k.a Administrator):

regsvr32.exe SocksOverRDP-Plugin.dll

If your user is not an administrator, you need to import the registry settings under your user too. Please use the SocksOverRDP-Plugin.reg file for that.

If you wish to remove it:

regsvr32.exe /u SocksOverRDP-Plugin.dll

Every time you connect to an RDP server from now on, this plugin will be loaded and will configure itself as it was specified in the registry (see below).

The .exe needs to be copied to the server and executed by any user.

Citrix / XenApp / XenDesktop

The tool works with Citrix Receiver that is used to connect to the Citrix server. Either an app or a full desktop can be provided to the user, the tool works in both cases if the plugin was correctly installed and the .exe server component was copied to and executed on the Citrix server.
Citrix seems to have 32-bit Citrix Receiver only. This means that if your operating system is 64-bit, and you have already registered the corresponding .dll, you need to unregister the .dll and use the 32-bit version. In case you use a 32-bit OS, you just register the .dll as mentioned above.
Please note that 64-bit windows has two regsvr32.exe, one in *%WINDIR%\system32* (x64) and the one in *%WINDIR%\SysWOW64* (x32), use the latter to register the 32-bit .dll, which will be automatically loaded by the Citrix Receiver upon execution. Everything else should be the same, please make sure you have followed the readme before opening issues on Github.

Options/Configuration

The server component (.exe) does not need any configuration or requires any arguments. Although there is one for verbosity:

PS C:\Users\SocksOverRDP\> .\SocksOverRDP-Server.exe -h
Socks Over RDP by Balazs Bucsay [[@xoreipeip]]

Usage: SocksOverRDP-Server.exe [-v]
-h              This help
-v              Verbose Mode

The client component (.dll) comes with preset settings, which is installed by the .dll itself when it is registered, or needs to be imported from the SocksOverRDP-Plugin.reg.

  • enabled: 0 disabled, 1 enabled (plugin only). By default it is enabled and will tell you in a messagebox every time you initiate a connection.
  • ip: which IP to connect to or bind to
  • port: which port to connect to or bind to

The client .dll reads all the options from the registry, the values can be found under the following key: HKEY_CURRENT_USER\SOFTWARE\Microsoft\Terminal Server Client\Default\AddIns\SocksOverRDP-Plugin

Every time the module is enabled and before the connection is made a reminder warning is showed. Just like this: warning

This warning ensures that the user knows about the plugin is loaded and with what settings.

Issues

In case the plugin does not load or the executable does not run because it is missing some DLLs for example the VCRUNTIME140.DLL, you might want to install the Visual C++ Redistributable for Visual Studio 2015 package.

Tested on Windows 11 ARM64: Redistributable

0x8002801c

On Windows 11 ARM64 (Macbook Pro M1) the following error message is shown at installation: The module SocksOverRDP-Plugin.dll was located bt the call to DllRegisterServer failed with error code 0x8002801c

Although this error is shown, the module is properly installed and can be used.

Security concerns

The server component (.exe) can be executed with any user, it will work with low privileged users as well, there are no security risks associated with this component at all.

The client component (.dll) by default is configured to listen only on localhost, if that is changed to for example 0.0.0.0 and there is no firewall or it is misconfigured, then it could result in a security issue, since other computers on the network can access the SOCKS Proxy and communicate over the RDP server.

Please note that the SOCKS Server is only up, when the RDP/Citrix connection is alive and the executable is running on the server.

Defence

To prevent users to use this tool the only known way is to disable Virtual Channels in the Remote Desktop Server configuration. Although this blocks the usage of this tool indeed, it also disables copy&paste, which might be a show stopper or a big annoyance for the users.

Although it is possible to disable the dynamic virtual channels in RDP, the following solution to do the same is ineffective for Citrix: https://support.citrix.com/article/CTX202153

More Repositories

1

ScoutSuite

Multi-Cloud Security Auditing Tool
Python
6,664
star
2

Scout2

Security auditing tool for AWS environments
Python
1,728
star
3

sobelow

Security-focused static analysis for the Phoenix Framework
Elixir
1,671
star
4

Winpayloads

Undetectable Windows Payload Generation
Python
1,519
star
5

demiguise

HTA encryption tool for RedTeams
Python
1,326
star
6

house

A runtime mobile application analysis toolkit with a Web GUI, powered by Frida, written in Python.
JavaScript
1,321
star
7

PMapper

A tool for quickly evaluating IAM permissions in AWS.
Python
1,279
star
8

redsnarf

RedSnarf is a pen-testing / red-teaming tool for Windows environments
PowerShell
1,182
star
9

featherduster

An automated, modular cryptanalysis tool; i.e., a Weapon of Math Destruction
Python
1,087
star
10

singularity

A DNS rebinding attack framework.
JavaScript
1,018
star
11

exploit_mitigations

Knowledge base of exploit mitigations available across numerous operating systems, architectures and applications and versions.
865
star
12

AutoRepeater

Automated HTTP Request Repeating With Burp Suite
Java
742
star
13

fuzzowski

the Network Protocol Fuzzer that we will want to use.
Python
719
star
14

aws-inventory

Discover resources created in an AWS account.
Python
703
star
15

BurpSuiteHTTPSmuggler

A Burp Suite extension to help pentesters to bypass WAFs or test their effectiveness using a number of techniques
Java
654
star
16

Sniffle

A sniffer for Bluetooth 5 and 4.x LE
C
648
star
17

sadcloud

A tool for standing up (and tearing down!) purposefully insecure cloud infrastructure
HCL
636
star
18

TriforceAFL

AFL/QEMU fuzzing with full-system emulation.
C
624
star
19

nmap-nse-vulnerability-scripts

NMAP Vulnerability Scanning Scripts
Lua
618
star
20

LoggerPlusPlus

Advanced Burp Suite Logging Extension
Java
608
star
21

nccfsas

Information released publicly by NCC Group's Full Spectrum Attack Simulation (FSAS) team.
C
598
star
22

freddy

Automatically identify deserialisation issues in Java and .NET applications by using active and passive scans
Java
572
star
23

phantap

Phantom Tap (PhanTap) - an β€˜invisible’ network tap aimed at red teams
C
560
star
24

azucar

Security auditing tool for Azure environments
PowerShell
559
star
25

tracy

A tool designed to assist with finding all sinks and sources of a web application and display these results in a digestible manner.
JavaScript
553
star
26

VCG

VisualCodeGrepper - Code security scanning tool.
Visual Basic .NET
523
star
27

Cyber-Defence

Information released publicly by NCC Group's Cyber Incident Response Team
Python
474
star
28

scrying

A tool for collecting RDP, web and VNC screenshots all in one place
Rust
450
star
29

autochrome

This tool downloads, installs, and configures a shiny new copy of Chromium.
HTML
431
star
30

wssip

Application for capturing, modifying and sending custom WebSocket data from client to server and vice versa.
JavaScript
425
star
31

blackboxprotobuf

Blackbox protobuf is a Burp Suite extension for decoding and modifying arbitrary protobuf messages without the protobuf type definition.
Python
380
star
32

idahunt

idahunt is a framework to analyze binaries with IDA Pro and hunt for things in IDA Pro
Python
376
star
33

autopwn

Specify targets and run sets of tools against them
Python
376
star
34

CrossSiteContentHijacking

Content hijacking proof-of-concept using Flash, PDF and Silverlight
HTML
372
star
35

Solitude

Solitude is a privacy analysis tool that enables anyone to conduct their own privacy investigations. Whether a curious novice or a more advanced researcher, Solitude makes the process of evaluating user privacy within an app accessible for everyone.
CSS
370
star
36

vlan-hopping---frogger

Easy 802.1Q VLAN Hopping
Shell
346
star
37

shocker

A tool to find and exploit servers vulnerable to Shellshock
Python
333
star
38

DriverBuddy

DriverBuddy is an IDA Python script to assist with the reverse engineering of Windows kernel drivers.
Python
331
star
39

WMIcmd

A command shell wrapper using only WMI for Microsoft Windows
C#
319
star
40

acCOMplice

Tools for discovery and abuse of COM hijacks
PowerShell
272
star
41

SusanRTTI

Another RTTI Parsing IDA plugin
Python
269
star
42

umap

The USB host security assessment tool
Python
265
star
43

metasploitavevasion

Metasploit AV Evasion Tool
Shell
257
star
44

keimpx

Check for valid credentials across a network over SMB
Python
256
star
45

umap2

Umap2 is the second revision of NCC Group's python based USB host security assessment tool.
Python
250
star
46

depthcharge

A U-Boot hacking toolkit for security researchers and tinkerers
Python
245
star
47

UPnP-Pentest-Toolkit

UPnP Pentest Toolkit for Windows
C#
244
star
48

GTFOBLookup

Offline command line lookup utility for GTFOBins (https://github.com/GTFOBins/GTFOBins.github.io), LOLBAS (https://github.com/LOLBAS-Project/LOLBAS), WADComs (https://wadcoms.github.io), and HijackLibs (https://hijacklibs.net/).
Python
238
star
49

G-Scout

Google Cloud Platform Security Tool
Python
232
star
50

asatools

Main repository to pull all NCC Group Cisco ASA-related tool projects.
Shell
224
star
51

cisco-SNMP-enumeration

Automated Cisco SNMP Enumeration, Brute Force, Configuration Download and Password Cracking
Shell
216
star
52

thetick

A simple embedded Linux backdoor.
Python
195
star
53

AWS-recipes

A number of Recipes for AWS
Python
195
star
54

kube-auto-analyzer

Kubernetes Auto Analyzer
HTML
192
star
55

TPMGenie

TPM Genie is an I2C bus interposer for discrete Trusted Platform Modules
C++
189
star
56

BinProxy

BinProxy is a proxy for arbitrary TCP connections. You can define custom message formats using the BinData gem.
Ruby
172
star
57

TriforceLinuxSyscallFuzzer

A linux system call fuzzer using TriforceAFL
C
170
star
58

DetectWindowsCopyOnWriteForAPI

Enumerate various traits from Windows processes as an aid to threat hunting
C++
168
star
59

pybeacon

A collection of scripts for dealing with Cobalt Strike beacons in Python
Python
167
star
60

BKScan

BlueKeep scanner supporting NLA
Shell
167
star
61

typofinder

A finder of domain typos showing country of IP address
Python
166
star
62

BLESuite

BLESuite is a Python package that provides an easier way to test Bluetooth Low Energy (BLE) device
Python
165
star
63

SteppingStones

A Red Team Activity Hub
Python
162
star
64

libslub

Python
161
star
65

tcpprox

A small command-line TCP proxy utility written in Python
Python
156
star
66

requests-racer

Small Python library that makes it easy to exploit race conditions in web apps with Requests.
Python
152
star
67

LazyDroid

bash script to facilitate some aspects of an Android application assessment
Shell
151
star
68

chuckle

An automated SMB relay exploitation script.
Shell
151
star
69

whalescan

Whalescan is a vulnerability scanner for Windows containers, which performs several benchmark checks, as well as checking for CVEs/vulnerable packages on the container
Python
143
star
70

gitpwnd

GitPwnd is a network penetration tool that lets you use a git repo for command and control of compromised machines
Python
139
star
71

Carnivore

Tool for assessing on-premises Microsoft servers authentication such as ADFS, Skype, Exchange, and RDWeb
C#
139
star
72

CollaboratorPlusPlus

Java
139
star
73

Change-Lockscreen

Offensive tool to trigger network authentications as SYSTEM
C#
138
star
74

Decoder-Improved

Improved decoder for Burp Suite
Java
134
star
75

OutlookLeakTest

The Outlook HTML Leak Test Project
C#
131
star
76

Wubes

Qubes containerization on Windows
Python
130
star
77

port-scan-automation

Automate NMAP Scans and Generate Custom Nessus Policies Automatically
Shell
128
star
78

Hodor

Hodor! Fuzzer..
Python
126
star
79

Zulu

The Zulu fuzzer
Python
125
star
80

WinShareEnum

Windows Share Enumerator
C#
121
star
81

memscan

Searches for strings, regex, credit card numbers of magnetic stripe card tracks in a Windows process's memory space
C#
120
star
82

ebpf

eBPF - extended Berkeley Packet Filter tooling
Python
120
star
83

argumentinjectionhammer

A Burp Extension designed to identify argument injection vulnerabilities.
Python
118
star
84

cq

Python
115
star
85

DroppedConnection

Python
113
star
86

SCOMDecrypt

SCOMDecrypt is a tool to decrypt stored RunAs credentials from SCOM servers
C#
112
star
87

GOATCasino

This is an intentionally vulnerable smart contract truffle deployment aimed at allowing those interested in smart contract security to exploit a wide variety of issues in a safe environment.
JavaScript
112
star
88

OneLogicalMyth_Shell

A HTA shell to assist with breakout assessments.
HTML
112
star
89

BLE-Replay

BLE-Replay is a Bluetooth Low Energy (BLE) peripheral assessment tool
Python
110
star
90

cloud_ip_ranges

Identify IP addresses owned by public cloud providers
Python
109
star
91

web3-decoder

Python
108
star
92

ccs

Python
107
star
93

WindowsDACLEnumProject

A collection of tools to enumerate and analyse Windows DACLs
C++
105
star
94

raccoon

Salesforce object access auditor
Python
104
star
95

DIBF

Windows NT ioctl bruteforcer and modular fuzzer
C++
103
star
96

go-pillage-registries

Pentester-focused Docker registry tool to enumerate and pull images
Go
103
star
97

DatajackProxy

Datajack Proxy allows you to intercept TLS traffic in native x86 applications across platforms
JavaScript
100
star
98

pcap-burp

Pcap importer for Burp
Java
100
star
99

jwt-reauth

Java
100
star
100

Berserko

Burp Suite extension to perform Kerberos authentication
Java
99
star