Cyber security

DllNotificationInjection – Exploring A Novel Threadless Process Injection Technique

DllNotificationInection is a POC of a new “threadless” process injection technique that works by utilizing the concept of DLL Notification Callbacks in local and remote processes.

An accompanying blog post with more details is available here

How It Works?

DllNotificationInection works by creating a new LDR_DLL_NOTIFICATION_ENTRY in the remote process.

It inserts it manually into the remote LdrpDllNotificationList by patching of the List.Flink of the list head and the List.Blink of the first entry (now second) of the list.

Our new LDR_DLL_NOTIFICATION_ENTRY will point to a custom trampoline shellcode (built with @C5pider‘s ShellcodeTemplate project) that will restore our changes and execute a malicious shellcode in a new thread using TpWorkCallback.

After manually registering our new entry in the remote process we just need to wait for the remote process to trigger our DLL Notification Callback by loading or unloading some DLL.

This obviously doesn’t happen in every process regularly so prior work finding suitable candidates for this injection technique is needed.

From my brief searching, it seems that RuntimeBroker.exe and explorer.exe are suitable candidates for this, although I encourage you to find others as well.

OPSEC Notes

This is a POC. In order for this to be OPSEC safe and evade AV/EDR products, some modifications are needed. For example, I used RWX when allocating memory for the shellcodes – don’t be lazy (like me) and change those.

One also might want to replace OpenProcessReadProcessMemory and WriteProcessMemory with some lower level APIs and use Indirect Syscalls or (shameless plug) HWSyscalls.

Maybe encrypt the shellcodes or even go the extra mile and modify the trampoline shellcode to suit your needs, or at least change the default hash values in @C5pider‘s ShellcodeTemplate project which was utilized to create the trampoline shellcode.

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

PromptFoo – Streamlining LLM Application Development And Security Testing

An innovative tool designed to revolutionize the testing, evaluation, and security of LLM applications. This…

1 day ago

AdbNet – Mastering Android Device Exploitation

A sophisticated tool designed for exploiting vulnerabilities in Android devices. This article dives into the…

2 days ago

SeamlessPass – Bridging Kerberos Authentication With Microsoft 365 Access

SeamlessPass is a tool designed to obtain Microsoft 365 access tokens using on-premises Active Directory…

2 days ago

Awesome Forensics – The Forensic Analyst’s Toolkit An In-Depth Exploration

Comprehensive guide to the tools and resources pivotal in the world of forensic analysis. From…

2 days ago

CVEScannerV2 – Enhancing Network Security With Nmap Vulnerability Detection Script

An advanced Nmap script designed to detect potential vulnerabilities in network services. This article delves…

2 days ago

File Tunnel – Innovative TCP Connection Tunneling via Files

A powerful tool designed to tunnel TCP connections through a file. Ideal for circumventing firewalls…

2 days ago