MCPcopy Index your code
hub / github.com/Teach2Breach/noldr

github.com/Teach2Breach/noldr @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
36 symbols 43 edges 2 files 4 documented · 11%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

noldr Library

This Rust library provides low-level functionality for working with Windows Portable Executable (PE) files and dynamic-link libraries (DLLs). It offers a set of tools for interacting with the Windows process environment, loading DLLs, and retrieving function addresses.

It was written to be used in a C2 implant for hiding API calls and limiting the number of dependencies in a DLL. There are no Windows API crates imported, not even for types.

This library was written for a very specific use case in mind. If you want something more robust, check out Kudaes DInvoke_rs.

Features

  • Retrieve the Thread Environment Block (TEB) and Process Environment Block (PEB)
  • Get the base address of loaded DLLs
  • Retrieve function addresses from DLLs
  • List all loaded DLLs in the current process
  • Load DLLs dynamically
  • Various Windows PE-related structures and types

Usage

Add this to your Cargo.toml:

[dependencies]
noldr = { git = "https://github.com/Teach2Breach/noldr.git", branch = "main" }

There is an example of how to use the library in the src/main.rs file.

note - You only need to load dlls that are not already loaded.

Example Image

Example Image

Please note that litcrypt is used to encrypt specific strings, so you will need to add that to your project as well and set a LITCRYPT_ENCRYPT_KEY environment variable. The value is arbitrary, but it must be set. If you encrypt the API names which you want to call, in the same way as shown in main.rs, then those strings will not be visible in the compiled program. It is highly recommended to use litcrypt.

Extension points exported contracts — how you extend this code

TypeKind (Interface)
(no doc) [9 implementers]
src/lib.rs

Core symbols most depended-on inside this repo

get_dll_address
called by 2
src/lib.rs
get_function_address
called by 2
src/lib.rs
list_all_dlls
called by 2
src/lib.rs
get_teb
called by 1
src/lib.rs
load_dll
called by 1
src/lib.rs
main
called by 0
src/main.rs
clone
called by 0
src/lib.rs
fmt
called by 0
src/lib.rs

Shape

Class 23
Function 7
Method 5
Interface 1

Languages

Rust100%

Modules by API surface

src/lib.rs35 symbols
src/main.rs1 symbols

For agents

$ claude mcp add noldr \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page