Exploitation Tools

RdpStrike – Harnessing PIC And Hardware Breakpoints For Credential Extraction

The RdpStrike is basically a mini project I built to dive deep into Positional Independent Code (PIC) referring to a blog post written by C5pider, chained with RdpThief tool created by 0x09AL. The project aims to extract clear text passwords from mstsc.exe, and the shellcode uses Hardware Breakpoint to hook APIs. It is a complete positional independent code, and when the shellcode injects into the mstsc.exe process, it is going to put Hardware Breakpoint onto three different APIs (SspiPrepareForCredReadCryptProtectMemory, and CredIsMarshaledCredentialW), ultimately capturing any clear-text credentials and then saving them to a file.

An aggressor script makes sure to monitor for new processes; if the process mstsc is spawned, it injects the shellcode into it.

When the aggressor script is loaded on CobaltStrike, three new commands will be available:

rdpstrike_enable – Enables the heartbeat check of new mstsc.exe processes and injects into them.
rdpstrike_disable – Disables the heartbeat check of new mstsc.exe but is not going to remove the hooks and free the shellcode.
rdpstrike_dump – Reads the file and prints the extracted credentials if any.

IOCs

  • It uses the cobaltstrike inbuilt shellcode injector. Easily detected by kernel callback function PsSetCreateThreadNotifyRoutine/PsSetCreateThreadNotifyRoutineEx
  • The hooks are placed using GetThreadContext & SetThreadContext the calls are executed from an un-backed memory.
  • The shellcode writes a file in TEMP (C:\Windows\Temp) with a name as {7C6A0555-C7A9-4E26-9744-5C2526EA3039}.dat
  • There is also a call to LoadLibraryA loading dpapi.dll which is again from un-backed memory.
  • NtQuerySystemInformation syscall is used to to get a list of threads in the process.
Tamil S

Tamil has a great interest in the fields of Cyber Security, OSINT, and CTF projects. Currently, he is deeply involved in researching and publishing various security tools with Kali Linux Tutorials, which is quite fascinating.

Recent Posts

Exploit Street – Navigating The New Terrain Of Windows LPEs

Exploit-Street, where we dive into the ever-evolving world of cybersecurity with a focus on Local…

24 hours ago

ShadowDumper – Advanced Techniques For LSASS Memory Extraction

Shadow Dumper is a powerful tool used to dump LSASS (Local Security Authority Subsystem Service)…

2 days ago

Shadow-rs : Harnessing Rust’s Power For Kernel-Level Security Research

shadow-rs is a Windows kernel rootkit written in Rust, demonstrating advanced techniques for kernel manipulation…

2 weeks ago

ExecutePeFromPngViaLNK – Advanced Execution Of Embedded PE Files via PNG And LNK

Extract and execute a PE embedded within a PNG file using an LNK file. The…

3 weeks ago

Red Team Certification – A Comprehensive Guide To Advancing In Cybersecurity Operations

Embark on the journey of becoming a certified Red Team professional with our definitive guide.…

3 weeks ago

CVE-2024-5836 / CVE-2024-6778 : Chromium Sandbox Escape via Extension Exploits

This repository contains proof of concept exploits for CVE-2024-5836 and CVE-2024-6778, which are vulnerabilities within…

4 weeks ago