All Projects → knight0x07 → ImpulsiveDLLHijack

knight0x07 / ImpulsiveDLLHijack

Licence: other
C# based tool which automates the process of discovering and exploiting DLL Hijacks in target binaries. The Hijacked paths discovered can later be weaponized during Red Team Operations to evade EDR's.

Programming Languages

C#
18002 projects
C++
36643 projects - #6 most used programming language
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to ImpulsiveDLLHijack

goblin
一款适用于红蓝对抗中的仿真钓鱼系统
Stars: ✭ 844 (+227.13%)
Mutual labels:  cybersecurity, redteam, redteam-tools
Some Pentesters SecurityResearchers RedTeamers
Some Pentesters, Security Researchers, Red Teamers which i learned from them a lot...
Stars: ✭ 60 (-76.74%)
Mutual labels:  redteam, redteam-tools
OSINTBookmarks
OSINT Bookmarks for Firefox / Chrome / Edge / Safari
Stars: ✭ 34 (-86.82%)
Mutual labels:  cybersecurity, redteam
dummyDLL
Utility for hunting UAC bypasses or COM/DLL hijacks that alerts on the exported function that was consumed.
Stars: ✭ 35 (-86.43%)
Mutual labels:  dll-hijacking, redteam
Ntlmrecon
Enumerate information from NTLM authentication enabled web endpoints 🔎
Stars: ✭ 252 (-2.33%)
Mutual labels:  cybersecurity, redteam
phisherprice
All In One Pentesting Tool For Recon & Auditing , Phone Number Lookup , Header , SSH Scan , SSL/TLS Scan & Much More.
Stars: ✭ 38 (-85.27%)
Mutual labels:  cybersecurity, redteam-tools
NIST-to-Tech
An open-source listing of cybersecurity technology mapped to the NIST Cybersecurity Framework (CSF)
Stars: ✭ 61 (-76.36%)
Mutual labels:  cybersecurity, redteam
URL-obfuscator
Python Program to obfuscate URLs to make Phishing attacks more difficult to detect. Uses Active open redirect list and other URL obfuscation techniques.
Stars: ✭ 101 (-60.85%)
Mutual labels:  cybersecurity, redteam-tools
AttackSurfaceManagement
Discover the attack surface and prioritize risks with our continuous Attack Surface Management (ASM) platform - Sn1per Professional #pentest #redteam #bugbounty
Stars: ✭ 45 (-82.56%)
Mutual labels:  cybersecurity, redteam-tools
Jasmin-Ransomware
Jasmin Ransomware is an advanced red team tool (WannaCry Clone) used for simulating real ransomware attacks. Jasmin helps security researchers to overcome the risk of external attacks.
Stars: ✭ 84 (-67.44%)
Mutual labels:  cybersecurity, redteam-tools
Fudgec2
FudgeC2 - a command and control framework designed for team collaboration and post-exploitation activities.
Stars: ✭ 191 (-25.97%)
Mutual labels:  cybersecurity, redteam
Behold3r
👻Behold3r -- 收集指定网站的子域名,并可监控指定网站的子域名更新情况,发送变更报告至指定邮箱
Stars: ✭ 29 (-88.76%)
Mutual labels:  cybersecurity, redteam
Cypheroth
Automated, extensible toolset that runs cypher queries against Bloodhound's Neo4j backend and saves output to spreadsheets.
Stars: ✭ 179 (-30.62%)
Mutual labels:  cybersecurity, redteam
github-watchman
Monitoring GitHub for sensitive data shared publicly
Stars: ✭ 60 (-76.74%)
Mutual labels:  cybersecurity, redteam
Oscp Pentest Methodologies
备考 OSCP 的各种干货资料/渗透测试干货资料
Stars: ✭ 166 (-35.66%)
Mutual labels:  cybersecurity, redteam
Slack Watchman
Monitoring your Slack workspaces for sensitive information
Stars: ✭ 159 (-38.37%)
Mutual labels:  cybersecurity, redteam
Gitlab Watchman
Monitoring GitLab for sensitive data shared publicly
Stars: ✭ 127 (-50.78%)
Mutual labels:  cybersecurity, redteam
Powershell Red Team
Collection of PowerShell functions a Red Teamer may use to collect data from a machine
Stars: ✭ 155 (-39.92%)
Mutual labels:  cybersecurity, redteam
MurMurHash
This little tool is to calculate a MurmurHash value of a favicon to hunt phishing websites on the Shodan platform.
Stars: ✭ 79 (-69.38%)
Mutual labels:  cybersecurity, redteam
RedBook
基于Threathunting-book基础上完善的狩猎视角红队handbook
Stars: ✭ 56 (-78.29%)
Mutual labels:  cybersecurity, redteam

ImpulsiveDLLHijack

C# based tool which automates the process of discovering and exploiting DLL Hijacks in target binaries. The Hijacked paths discovered can later be weaponized during RedTeam Operations to evade EDR's.

1. Methodological Approach :

The tool basically acts on automating following stages performed for DLL Hijacking:

  • Discovery - Finding Potentially Vulnerable DLL Hijack paths
  • Exploitation - Confirming whether the Confirmatory DLL was been loaded from the Hijacked path leading to a confirmation of 100% exploitable DLL Hijack!

Discovery Methodology :

  • Provide Target binary path to ImpulsiveDLLHijack.exe
  • Automation of ProcMon along with the execution of Target binary to find Potentially Vulnerable DLL Hijackable paths.

Exploitation Methodology :

  • Parse Potentially Vulnerable DLL Hijack paths from CSV generated automatically via ProcMon.

  • Copy the Confirmatory DLL (as per the PE architecture) to the hijack paths one by one and execute the Target Binary for predefined time period simultaneously.

  • As the DLL hijacking process is in progress following are the outputs which can be gathered from the Hijack Scenario:

    • The Confirmatory DLL present on the potentially vulnerable Hijackable Path is loaded by the Target Binary we get following output on the console stating that the DLL Hijack was successful - DLL Hijack Successful -> DLLName: | <Target_binary_name>
    • The Confirmatory DLL present on the potentially vulnerable Hijackable Path is not loaded by the Target Binary we get following output on the console stating that the DLL Hijack was unsuccessful - DLL Hijack Unsuccessful -> <DLL_Path>

    Entry Point Not Found Scenarios:

    • The Confirmatory DLL present on the potentially vulnerable Hijackable Path is not loaded by the Target Binary as the Entry Point of the DLL is different from our default entry point "DllMain" throwing an error - "Entry Point Not Found", we get following output on the console stating that the DLL Hijack was hijackable if the entry point was correct -> DLL Hijack Successful -> [Entry Point Not Found - Manual Analysis Required!]: <Hijack_path>
    • The Confirmatory DLL present on the potentially vulnerable Hijackable Path is executed by the Target Binary even after the Entry Point of the DLL is different from our default entry point "DllMain" throwing an error "Entry Point Not Found", we get following output on the console stating that the DLL Hijack was success even after the entry point was not correct -> DLL Hijack Successful -> [Entry Point Not Found]: <Hijack_path>

Note: The "Entry Point not found" Error is been handled by the code programmatically no need to close the MsgBox manually :) # Rather this would crash the code further****

  • Once the DLL Hijacking process is completed for every Potentially Vulnerable DLL Hijack path we get the final output on the console as well as in a text file (C:\DLLLogs\output_logs.txt) in the following format:

    • <DLLHijack_path> --> DLL Hijack Successful (if the Hijack was successful)
    • <DLLHijack_path> --> DLL Hijack Unuccessful (if the Hijack was unsuccessful)
    • <DLLHijack_path> --> DLL Hijack Successful [Entry Point Not Found - Manual Analysis Required] (if the Entry point was not found but can be successful after manual analysis)
    • <DLLHijack_path> --> DLL Hijack Successful [Entry Point Not Found] (if the hijack was successful even after the entry point was not found)
    • <DLLHijack_path> --> Copy: Access to Path is Denied (Access denied)

**These Confirmed DLL Hijackable paths can later be weaponized during a Red Team Engagement to load a Malicious DLL Implant via a legitimate executable (such as OneDrive,Firefox,MSEdge,"Bring your own LOLBINs" etc.) and bypass State of the art EDR's as most of them fail to detect DLL Hijacking as assessed by George Karantzas and Constantinos Patsakis as mentioned in there research paper: https://arxiv.org/abs/2108.10422

2. Prerequisites:

  • Procmon.exe -> https://docs.microsoft.com/en-us/sysinternals/downloads/procmon
  • Custom Confirmatory DLL's :
    • These are DLL files which assist the tool to get the confirmation whether the DLL's are been successfully loaded from the identified hijack path
    • Compiled from the MalDLL project provided above (or use the precompiled binaries if you trust me!)
    • 32Bit dll name should be: maldll32.dll
    • 64Bit dll name should be: maldll64.dll
    • Install NuGet Package:** PeNet** -> https://www.nuget.org/packages/PeNet/ (Prereq while compiling the ImpulsiveDLLHijack project)

Note: i & ii prerequisites should be placed in the ImpulsiveDLLHijacks.exe's directory itself.

  • Build and Setup Information:

    • ImpulsiveDLLHijack

      • Clone the repository in Visual Studio
      • Once project is loaded in Visual Studio go to "Project" --> "Manage NuGet packages" --> Browse for packages and install "PeNet" -> https://www.nuget.org/packages/PeNet/
      • Build the project!
      • The ImpulsiveDLLHijack.exe will be inside the bin directory.
    • And for Confirmatory DLL's:

      • Clone the repository in Visual Studio
      • Build the project with x86 and x64
      • Rename x86 release as maldll32.dll and x64 release as maldll64.dll
    • Setup: Copy the Confirmatory DLL's (maldll32 & maldll64) in the ImpulsiveDLLHijack.exe directory & then execute ImpulsiveDLLHijack.exe :))

3. Usage:

usage

4. Examples:

  • Target Executable: OneDrive.exe

  • Stage: Discovery

first

  • Stage: Exploitation

    • Successful DLL Hijacks:

    success_one

    • Unsuccessful DLL Hijacks:

    unsuccessful

    • DLL is not loaded as the entry point is not identical! Manual Analysis might make it a successful DLL Hijack :)

    entrypoint_not_found

    • DLL Hijack successful even after unidentical entry point!

    entry_pointnot found - but dll is executed

  • Stage: Final Results and Logs

    • C:\DLLLogs\output_logs.txt:

    output_logs

Thankyou, Feedback would be greatly appreciated! - knight!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].