Exploitation Tools

RWX_MEMORY_HUNT_AND_INJECTION_DV : Exploiting OneDrive.exe To Inject Shellcode Without New RWX Allocations

Abusing Windows fork API and OneDrive.exe process to inject the malicious shellcode without allocating new RWX memory region.

This technique is finding RWX region in already running processes in this case OneDrive.exe and Write shellcode into that region and execute it without calling VirtualProtect, VirtualAllocEx, VirtualAlloc.

Usage

Just compile the program and run the (EXE) without any paremeter.

Steps

  • Find the OneDrive.exe in running processes.
  • Get the handle of OneDrive.exe.
  • Query remote process memory information.
  • look for RWX memory regions.
  • Write shellcode into found region of OneDrive.exe
  • Fork OneDrive.exe into a new process.
  • Set the forked process’s start address to the cloned shellcode.
  • Terminate the cloned process after execution.

Shellcode

This technique will work with ntdll based shellcode which is not dependent on any section. I used to generate my shellcode.

Shellcode Creation

  • Edit the shellcode template file funtion ‘shellcode_template’ according to instructions given on
  • Compile the code and open .EXE file in any hex editor (HxD)
  • Extract the .text section and use that in given project file.
  • To extract the shellcode there are other methods also explained in the repository.
Varshini

Varshini is a Cyber Security expert in Threat Analysis, Vulnerability Assessment, and Research. Passionate about staying ahead of emerging Threats and Technologies.

Recent Posts

Xenon : A New Tool In The Mythic Framework

Xenon is a Windows agent designed for the Mythic framework, inspired by tools like Cobalt…

14 hours ago

OSCP : Navigating The Essential Toolkit For Penetration Testing

The OSCP (Offensive Security Certified Professional) certification is a highly respected credential in the cybersecurity…

14 hours ago

Famatech Advanced IP Scanner Or Advanced Port Scanner Usage

Famatech offers two powerful network management tools: Advanced IP Scanner and Advanced Port Scanner. Both…

14 hours ago

ELF Loader And PS5-JAR-Loader : Tools For Enhanced Functionality

In the realm of PlayStation 5 (PS5) development, two significant tools have emerged to enhance…

14 hours ago

C2IntelFeeds : Enhancing Cybersecurity With Threat Intelligence

C2IntelFeeds is a powerful tool designed to provide actionable threat intelligence to cybersecurity professionals. It…

15 hours ago

goLAPS : The Ultimate Guide To Managing LAPS Passwords with Golang

goLAPS is a tool designed to interact with the Local Administrator Password Solution (LAPS) in…

18 hours ago