Zurück zum Ranking

Windows rootkit for Intel x64 with 25+ features, demonstrating rootkit techniques compatible with all Windows 10 and Windows 11 versions.

cppcybersecurityinfoseckernelred-teamredteamrootkitwindowswindows-rootkitscyber-securitydriver
Sterne-Wachstum
Sterne
2.4k
Forks
358
Wochenwachstum
Issues
0
1k2k
Mai 2022Sept. 2023Feb. 2025Juli 2026
README

Nidhogg

Logo

image image

Nidhogg is a multi-functional rootkit to showcase the variety of operations that can be done from kernel space. The goal of Nidhogg is to provide an all-in-one and easy-to-use rootkit with multiple helpful functionalities for operations. Besides that, it can also easily be integrated with your C2 framework.

Nidhogg can work on any version of x64 Windows 10 and Windows 11.

This repository contains a kernel driver with a C++ program to communicate with it.

If you want to know more, check out the wiki for a detailed explanation.

Current Features

[!IMPORTANT]
All the features have been fully tested up to Windows 11 25H2. If you encounter a problem, please open an issue after checking there isn't already an open issue.

  • Process hiding and unhiding
  • Process elevation
  • Process protection (anti-kill and dumping)
  • Bypass memory scanners (e.g. pe-sieve)
  • Thread hiding and unhiding
  • Thread protection (anti-kill)
  • File protection (anti-deletion and overwriting)
  • Registry keys and values protection (anti-deletion and overwriting)
  • Registry keys and values hiding
  • Listing currently protected or hidden processes, threads, files, ports, registry keys and values
  • Function patching
  • Built-in AMSI bypass
  • Built-in ETW patch
  • Process signature (PP/PPL) modification
  • Can be reflectively loaded
  • Shellcode Injection
    • APC
    • NtCreateThreadEx
  • DLL Injection
    • APC
    • NtCreateThreadEx
  • Listing kernel callbacks
    • ObCallbacks
    • Process and thread creation routines
    • Image loading routines
    • Registry callbacks
  • Removing and restoring kernel callbacks
  • Disabling / Enabling ETW providers (e.g. ETW-TI)
  • Module hiding and unhiding
  • Driver hiding and unhiding
  • Credential Dumping
  • Port hiding and unhiding
  • Nidhogg Object File (NOF) for kernel-mode COFF execution

Reflective loading

[!WARNING]
When doing reflective loading, there are features that will be disabled by default and the automatic graceful unload of hidden modules and unhooking callbacks will not work as well. It is the user's responsibility to ensure to manually unload any hidden modules upon process termination and unhook any callbacks if the target driver is unloading. Failing to do so may lead to system instability or crashes.

Since version v0.3, Nidhogg can be reflectively loaded with kdmapper but because PatchGuard will be automatically triggered if the driver registers callbacks, Nidhogg will not register any callback. Meaning, that if you are loading the driver reflectively these features will be disabled by default:

  • Process protection
  • Thread protection
  • Registry operations

Nidhogg Object File (NOF)

Since version v2.0, Nidhogg has a new capability named "Nidhogg Object File" (NOF) for kernel-mode COFF execution. This means, you can write your own kernel-mode code and compile it to a COFF file which has access to:

  • Windows kernel (ntoskrnl) API
  • Syscalls
  • Nidhogg's API (coming in v2.1)

This feature is not compatible with Virtualization Based Security (VBS) as it violates both HVCI and kCFG.

Script Execution (DEPRECATED IN V2.0)

Since version v1.0, Nidhogg can execute NidhoggScripts - a tool that allows one to execute a couple of commands one after another, thus, creating playbooks for Nidhogg. To see how to write one check out the wiki.

Due to hard maintainability and the fact that it isn't a popular feature, it has been deprecated in version v2.0 and will be removed in the next major release. It will be replaced with another capability named "Nidhogg Object File" (NOF) for kernel-mode COFF execution, which will have access to Nidhogg's API.

Initial Operations (DEPRECATED IN V2.0)

Since version v1.0, Nidhogg can execute NidhoggScripts as initial operations as well. Meaning, that if it spots the file out.ndhg in the root of the project directory (the same directory as the Python file) it will execute the file each time the driver is running.

Due to hard maintainability and the fact that it isn't a popular feature, it has been deprecated in version v2.0 and will be removed in the next major release. It will be replaced with another capability named "Nidhogg Object File" (NOF) for kernel-mode COFF execution, which will have access to Nidhogg's API.

PatchGuard triggering features

[!CAUTION]
The following features are known to trigger PatchGuard, you can still use them at your own risk.

  • Process hiding
  • File protecting
  • Driver hiding

Basic Usage

To see the available commands you can run NidhoggClient.exe or look at the wiki for detailed information regarding how to use each command, the parameters it takes and how it works.

NidhoggClient.exe

# Simple usage: Hiding a process
NidhoggClient.exe process hide 3110

Setup

Building the client

To compile the client, you will need to have Visual Studio 2022 installed and then just build the project like any other Visual Studio project.

Building the driver

To compile the project, you will need the following tools:

Clone the repository and build the project:

git clone https://github.com/Idov31/Nidhogg.git --recurse-submodules

Driver Testing

To test it in your testing environment run those commands with elevated cmd:

bcdedit /set testsigning on

After rebooting, create a service and run the driver:

sc create nidhogg type= kernel binPath= C:\Path\To\Driver\Nidhogg.sys
sc start nidhogg

Debugging

To debug the driver in your testing environment run this command with elevated cmd and reboot your computer:

bcdedit /debug on

After the reboot, you can see the debugging messages in tools such as DebugView.

Resources

Contributions

Thanks a lot to those people who contributed to this project:

BlackOfWorld    0nlyDev    SLiNv    Grovvik

Ähnliche Repositories
practical-tutorials/project-based-learning

Curated list of project-based tutorials

PythonPyPIMIT Licensetutorialproject
274.6k35.4k
CyC2018/CS-Notes

:books: 技术面试必备基础知识、Leetcode、计算机操作系统、计算机网络、系统设计

algorithmleetcode
cyc2018.xyz
184.8k50.8k
fffaraz/awesome-cpp

A curated list of awesome C++ (or C) frameworks, libraries, resources, and shiny things. Inspired by awesome-... stuff.

MIT Licensecppcppcon
fffaraz.github.io/awesome-cpp/
72.4k8.3k
youngyangyang04/leetcode-master

《代码随想录》LeetCode 刷题攻略:200道经典题目刷题顺序,共60w字的详细图解,视频难点剖析,50余张思维导图,支持C++,Java,Python,Go,JavaScript等多语言版本,从此算法学习不再迷茫!🔥🔥 来看看,你会发现相见恨晚!🚀

Shellleetcodeprogrammer
62k12.3k
azl397985856/leetcode

LeetCode Solutions: A Record of My Problem Solving Journey.( leetcode题解,记录自己的leetcode解题之路。)

JavaScriptnpmOtheralgorithmleetcode
leetcode-solution-leetcode-pp.gitbook.io/leetcode-solution/
55.8k9.4k
WerWolv/ImHex

🔍 A Hex Editor for Reverse Engineers, Programmers and people who value their retinas when working at 3 AM.

C++GNU General Public License v2.0hex-editorreverse-engineering
imhex.werwolv.net
54.2k2.4k
ClickHouse/ClickHouse

ClickHouse® is a real-time analytics database management system

C++Apache License 2.0dbmsolap
clickhouse.com
48.8k8.7k
Light-City/CPlusPlusThings

C++那些事

C++cpluspluscpp
light-city.github.io/stories_things/
43.3k8.8k
LizardByte/Sunshine

Self-hosted game stream host for Moonlight.

C++GNU General Public License v3.0game-streaming-servergame-stream
app.lizardbyte.dev/Sunshine/
39.5k2.1k
aseprite/aseprite

Animated sprite editor & pixel art tool (Windows, macOS, Linux)

C++animationpixel-art
aseprite.org
38.2k8.4k
huihut/interview

📚 C/C++ 技术面试基础知识总结,包括语言、程序库、数据结构、算法、系统、网络、链接装载库等知识及面试经验、招聘、内推等信息。This repository is a summary of the basic knowledge of recruiting job seekers and beginners in the direction of C/C++ technology, including language, program library, data structure, algorithm, system, network, link loading library, interview experience, recruitment, recommendation, etc.

C++Otherinterviewinterview-questions
interview.huihut.com
38.1k8.1k
doocs/leetcode

🔥LeetCode solutions in any programming language | 多种编程语言实现 LeetCode、《剑指 Offer(第 2 版)》、《程序员面试金典(第 6 版)》题解

JavaMavenCreative Commons Attribution Share Alike 4.0 Internationalalgorithmscpp
leetcode.doocs.org
36.3k9.4k