百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
D

DLLHijackHunter

> 测试质量
开源

自动化的 DLL 入侵检测、验证和确认。将本地配置错误转化为武器化的、已确认的攻击路径。

395 stars0 点赞1 次浏览
访问官网GitHub

工具介绍

自动化的 DLL 入侵检测、验证和确认。将本地配置错误转化为武器化的、已确认的攻击路径。

DLLHijackHunter

By ProjectMerai

Automated DLL Hijacking Discovery, Validation, and Confirmation

Turning local misconfigurations into weaponized, confirmed attack paths.


Overview

DLLHijackHunter is an automated Windows DLL hijacking detection tool that goes beyond static analysis. It discovers, validates, and confirms DLL hijacking opportunities using a multi-phase pipeline:

  1. Discovery — Enumerates binaries across services, scheduled tasks, startup items, COM objects, and AutoElevate UAC bypass vectors
  2. Filtration — Eliminates false positives through intelligent hard and soft gates
  3. Canary Confirmation — Deploys a harmless canary DLL and triggers the binary to prove the hijack works
  4. Scoring & Reporting — Ranks findings by exploitability with a tiered confidence system

Most DLL hijacking tools stop at “this DLL might be hijackable.” DLLHijackHunter attempts to validate it, cross-reference it against known exploit intelligence, and confirm real execution paths where possible.


Architecture

…

Key Features

Hijack Type Coverage

Type Description Stealth Status
Phantom DLL doesn't exist anywhere on disk High Implemented
Search Order Place DLL earlier in the Windows search order High Implemented
Side-Loading Abuse legitimate app loading DLLs from its directory High Implemented (AutoElevate copy-to-temp path)
.local Redirect Hijack via .local directory redirection High Implemented
ENV PATH Weaponization of writable directories in system PATH High Implemented (curated service/DLL map)
AppInit DLLs AppInit_DLLs registry abuse Low Implemented
AppCert DLLs AppCertDLLs registry abuse (loads into every CreateProcess/WinExec caller) Low Implemented
CWD Current Working Directory hijack Low Planned — not currently produced by any discovery path

IFEO Debugger entries are enumerated and the referenced binary is analyzed for DLL imports, but there is no dedicated IFEO/KnownDLL-bypass hijack type — those are not advertised as standalone detections.

UAC Bypass Discovery

DLLHijackHunter includes dedicated UAC bypass discovery:

  • Manifest AutoElevate — Scans System32 and SysWOW64 for EXEs with true in embedded manifests
  • COM AutoElevation — Scans HKLM\SOFTWARE\Classes\CLSID for COM objects with Elevation\Enabled=1
  • Side-Load Simulation — For AutoElevate binaries that do not call SetDllDirectory or SetDefaultDllDirectories, simulates the “copy EXE to writable folder + drop DLL” attack path

Targeted Vulnerability Knowledge Base

  • Targeted vulnerability mapping — Cross-references discovered imports against a bundled snapshot of the HijackLibs dataset (≈590 documented DLL entries spanning ≈700 vulnerable executables), embedded as Resources/hijacklibs.json. A match boosts confidence and links the finding to its HijackLibs reference page; the absence of a match means nothing. The dataset is data-driven — refresh it by re-downloading https://hijacklibs.net/api/hijacklibs.json over that resource (no code changes required). Dataset © the HijackLibs project and contributors.
  • Automated PATH exploitation — Evaluates writable PATH folders and generates hijack candidates for a curated map of native Windows services known to search PATH for missing DLLs
  • Expanded phantom DLL hunting — Searches for a library of high-value phantom DLL opportunities across multiple categories

Filter Pipeline

The pipeline reduces false positives through two stages:

Hard Gates

  • API set schema filtering (api-ms-*, ext-ms-*)
  • KnownDLL filtering
  • Attacker-relative ACL writability validation — a path counts as writable only if an unprivileged principal (Users / Authenticated Users / Everyone, plus leak-proof sub-admin service accounts like LOCAL SERVICE/NETWORK SERVICE) has effective write rights. Crucially, this is computed independently of the token the tool runs under, so running elevated does not make System32/Program Files look writable. This is what makes elevated runs meaningful for LPE triage.

Soft Gates

  • WinSxS manifest penalty
  • Privilege delta analysis
  • LoadLibraryEx mitigation checks
  • Signature validation checks
  • Graceful error-handling penalties

Canary Confirmation

Instead of guessing, DLLHijackHunter attempts to prove hijacks work:

…

The canary DLL:

  • Ships precompiled for both x64 and x86, embedded in the scanner, so no compiler is required at scan time. The correct architecture is selected to match the victim's bitness and extracted on demand.
  • Is self-locating: it derives its confirmation-file path at runtime from its own loaded module path (%ProgramData%\DLLHijackHunter\canary_.confirm), so one binary serves every candidate. The scanner computes the same hash from the deploy path and polls for that file.
  • Uses a file-based confirmation mechanism
  • Captures execution metadata such as user, integrity level, and privilege indicators
  • Contains no malicious payload; it is strictly a detection and validation mechanism
  • Statically links the CRT, so it has no runtime dependency (ucrtbase/vcruntime) on the victim host.

The bundled binaries are built from the auditable source at src/DLLHijackHunter/Resources/canary_src.c and can be regenerated with Resources/build_canary.bat (requires the MSVC C++ toolchain; the scanner does not).

Functional-proxy exception: When a search-order hijack targets a DLL that exists and exposes exports, keeping the host alive after confirmation requires an export-forwarding proxy. DLLHijackHunter generates this proxy at runtime through PE surgery — it grafts a synthesised .edata section onto the precompiled embedded canary entirely in-process, with no compiler required. The correct forwarder strings are computed from the victim DLL's export table and encoded directly into the binary. Phantom-DLL and other no-export candidates skip this step entirely; no toolchain is ever needed.

Signing: The embedded canaries are unsigned. Code-signing them (so they load under stricter policies and are attributable) requires a signing certificate and is left as a release-time step for the maintainer.

Export-forwarding proxy canaries

Proxy canaries are generated via runtime PE synthesis (no compiler required) and have been validated against real targets including services and scheduled tasks running as NT AUTHORITY\SYSTEM. The following edge cases can still cause a proxy canary to report inconclusive even when the underlying hijack is valid:

  • ordinal-only exports (name table absent)
  • decorated export names (calling-convention mangling mismatches)
  • loader/runtime assumptions in the target process that require the real DLL to be resident

A failed proxy canary does not mean the hijack path is impossible — it means execution confirmation is inconclusive for that specific target.


Load-Order Verification (--verify-load)

An opt-in, standard-user verification that sits between the filter pipeline and canary phase. For each applicable candidate it briefly writes a benign probe DLL to the writable hijack position, then asks the real Windows loader — in a short-lived child process — to resolve the DLL by name. Where the loader resolves determines the verdict:

  • Verified win — the loader picks the writable position. The search-order claim is proven (this corroboration lets the finding reach the High tier; canary execution remains the only path to Confirmed).
  • Loses to protected — the loader picks a KnownDLL, the System32 copy, or a SxS-redirected copy instead. The position is almost certainly not hijackable, so the candidate is heavily demoted. This catches the classic false positives a static search-order calculator misses (e.g. a .local/search-order "finding" for ntdll.dll that KnownDLLs makes unexploitable).

Design and safety notes:

  • Runs in a child process so a name already loaded into the scanner can't short-circuit the result, and so any load side effect or crash is isolated. No elevation required.
  • Each probe is placed, resolved, and then removed; any pre-existing file is backed up and restored.
  • It models the modern LOAD_LIBRARY_SEARCH ordering, so it is only applied to Phantom / Search-Order / Side-Load candidates. .local, PATH, and AppInit/AppCert candidates use different mechanics and are reported as Skipped.
  • It writes files transiently to candidate positions (medium-impact); leave it off for fully passive, read-only triage.
powershell
# Standard-user triage with loader-verified search order (no canary, no ETW)
.\DLLHijackHunter.exe --lpe-only --no-canary --no-etw --verify-load

Comparison

Feature DLLHijackHunter Robber DLLSpy WinPEAS Procmon
Automated discovery ✅ ✅ ✅ ✅ ❌
Phantom DLL detection ✅ ❌ ✅ ❌ ✅
Search order analysis ✅ ❌ ❌ ❌ ❌
ACL-based writability check ✅ Partial ❌ Basic ❌
ETW real-time monitoring ✅ ❌ ❌ ❌ ✅
Canary confirmation ✅¹ ❌ ❌ ❌ ❌
Privilege escalation check ✅ ❌ ❌ ❌ ❌
UAC bypass discovery ✅ ❌ ❌ ❌ ❌
False positive reduction ✅² None Basic None None
Reboot persistence check ✅³ ❌ ❌ ❌ ❌
Proxy DLL generation ✅⁴ ❌ ❌ ❌ ❌
Confidence scoring ✅ ❌ ❌ ❌ ❌
Auto trigger (svc/task/COM) ✅⁵ ❌ ❌ ❌ ❌
HTML/JSON reporting ✅ ❌ ❌ TXT ❌
Threat intel correlation ✅⁶ ❌ ❌ ❌ ❌
Automated PATH exploits ✅ ❌ ❌ ❌ ❌
Target-specific scanning ✅ ❌ ❌ ❌ ✅
Self-contained binary ✅ ❌ ❌ ✅ ❌

¹ Precompiled dual-arch canaries are embedded — no compiler needed to confirm a load. Export-forwarding proxies are also generated at runtime via PE surgery — no compiler required; MSVC is a stripped-build fallback only when the embedded precompiled canary binary is absent from the assembly resources.

² Via attacker-relative ACL writability (see Filter Pipeline). It reduces — it does not eliminate — false positives; soft-gate heuristics (manifest/SxS/LoadLibraryEx) still carry uncertainty. Unverified static findings are now capped below the High tier.

³ Derived from auto-start status, not a verified reboot test.

⁴ Export-forwarding proxies are generated via runtime PE synthesis (no compiler required); edge cases such as ordinal-only exports or decorated names may limit confirmation on specific targets.

⁵ Service/Task/COM triggers only; UAC-bypass findings are not canary-triggered.

⁶ Backed by a bundled snapshot of the HijackLibs dataset (~590 entries); refreshable from hijacklibs.net.


Usage

Prerequisites

  • Windows 10/11 or Windows Server 2016+
  • .NET 8.0 or 10.0 Runtime (or use a self-contained build)
  • Administrator privileges recommended (required for ETW, canary deployment, and some service triggers)

Build

powershell
git clone https://github.com/ghostvectoracademy/DLLHijackHunter.git
cd DLLHijackHunter

# Build (self-contained single file)
dotnet publish src/DLLHijackHunter/DLLHijackHunter.csproj `
    -c Release -r win-x64 --self-contained `
    -p:PublishSingleFile=true -o ./publish

# Or use the build script
.\build.ps1

Quick Start

powershell
# Full aggressive scan (recommended, requires admin)
.\DLLHijackHunter.exe --profile aggressive

# Safe scan (no file drops, no triggers)
.\DLLHijackHunter.exe --profile safe

# UAC bypass focused scan
.\DLLHijackHunter.exe --profile uac-bypass

# Target a specific binary
.\DLLHijackHunter.exe --target "C:\Program Files\MyApp\app.exe"

# Target by filename (partial match)
.\DLLHijackHunter

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

C#bug-bountybugbountybugbounty-toolcybersecurity

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类测试质量
定价开源

> 相关工具

J
Jest
JavaScript 测试框架
P
Playwright
现代端到端测试框架
E
eslint-plugin-test-selectors
Enforces that data-test-id attributes are added to interactive DOM elements (JSX) to help with UI testing. JSX only.