RDP-Stealer is a tool designed to capture clear-text credentials during Remote Desktop Protocol (RDP) sessions by injecting a DLL into the mstsc.exe
process. This method enables credential extraction when a user logs in via RDP, facilitating lateral movement within a network.
This tool uses rdptheif.dll
for the injection process and requires inject.exe
to be executed before a user logs in. The captured credentials are stored for later retrieval.
- Captures clear-text credentials during RDP login.
- Injects
rdptheif.dll
into the target RDP session using theinject.exe
tool. - Continuously monitors active sessions to capture credentials in real-time.
- Efficiently captures credentials compared to verbose keylogger outputs.
- Ensure that the
rdptheaf.dll
file is available on the target machine in the correct directory (e.g.,C:\Tools\RdpThief.dll
). - Update the path in the
inject.cs
file to reflect the correct location of the DLL. - Compile
inject.exe
with the appropriate architecture for the target machine.
When a user (e.g., dave
) logs into a server (app01
), and another user (e.g., admin
) initiates an RDP session from app01
to a domain controller (dc01
), RDP-Stealer intercepts the credentials of the admin in clear text. This is achieved by injecting rdptheif.dll
into the RDP process (mstsc.exe
) and monitoring the session for credential data.
Unlike a generic keylogger that captures every keystroke and produces large, verbose outputs, RDP-Stealer focuses specifically on credential capture, providing clear and actionable results.
-
Prepare the Files
- Ensure
rdptheif.dll
is placed in the correct path (update the path ininject.cs
if necessary). - Compile the
inject.cs
file from the repository with the correct architecture (32-bit or 64-bit).
- Ensure
-
Deploy & Run the Tool
- Log into the server
appsrv01
asdave
. - Copy the compiled executable (
Inject.exe
) toC:\Tools\
. - Start an RDP session using
mstsc.exe
(Remote Desktop Connection). - Run
Inject.exe
before theadmin
user logs in via RDP. - Use
mstsc
to log in todc01
as theadmin
user.
- Log into the server
-
Extract Captured Credentials
The captured credentials will be stored in a binary file (data.bin
) within the temporary folder. You can view the contents of the file by running:type C:\Users\dave\AppData\Local\Temp\6\data.bin
- Log in to
appsrv01
asdave
. - Compile and copy
Inject.exe
to the target machine'sC:\Tools\
directory. - Run
Inject.exe
onappsrv01
. - Open
mstsc.exe
and log in todc01
as theadmin
user. - The tool will capture the
admin
user's credentials and store them indata.bin
.
- Always run
Inject.exe
before the user logs in for proper credential capture. - This tool works for live RDP sessions and will monitor active or new sessions to extract credentials.
- Ensure you have administrative privileges to perform process injection and capture credentials.
- Requires administrative privileges on the target machine.
- Injection must occur before the RDP session starts to capture credentials. So if you are doing pentesting then start this exe in mostly used workstsions where high valued target may log in and check next day.
RDP-Stealer is a specialized tool for capturing clear-text credentials during RDP sessions using DLL injection. It simplifies the process of obtaining credentials in real-time, allowing security testers and ethical hackers to assess the security of RDP implementations. Ensure proper configuration of the necessary files and enjoy clean, actionable credential dumps during live sessions.