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

LitterBox : The Ultimate Sandbox Environment For Malware Testing And Red Team Operations

Your malware's favorite sandbox - where red teamers come to bury their payloads. A sandbox…

37 minutes ago

Heap Exploitation Training : A Comprehensive Guide From Basics To Advanced Techniques

This article delves into our comprehensive training program designed to teach you the intricacies of…

37 minutes ago

BloodHound.py : Installation, Usage, And Features

BloodHound.py is a Python based ingestor for BloodHound, based on Impacket. The code in this…

37 minutes ago

100 Days Of Rust 2025 : From Incident Response To Linux System Programming

In 2025 I wanted to try something new. In addition to a traditional 100 days…

3 days ago

Presenterm : Revolutionizing Terminal-Based Presentations With Markdown

presenterm lets you create presentations in markdown format and run them from your terminal, with…

3 days ago

JailbreakEval : Automating the Evaluation Of Language Model Security

Jailbreak is an attack that prompts a language model to give actionable responses to harmful…

3 days ago