Messy code ahead!
This project was built quickly and contains a critical bug. While the implant connects back to the teamserver and waits for commands, attempting to send a command using the client results in a signature verification error. Check the TODO file for more details.
Feel free to debug it (you can use the JSON file in the .vscode directory) and fix it if you want to use Namora (Naked Mole Rat).
Namora is a Command and Control (C2) framework written in Rust, inspired by various GitHub projects.
The Cargo workspace consists of three components:
- Windows Agent (Implant)
- Server (Teamserver)
- CLI Client (GUI planned using
eguiorSlint)
- End-to-End Encryption: Communication between the server and implant is secured using ECDH and XChaCha20Poly1305.
- Authentication: Ensured via ed25519-dalek signatures. The agent authenticates its signature to the server.
- Agent Management: Supports up to 20 agents, registered in a Postgres database.
- Requires a Postgres database for storing agent data.
- You can use tools like pgAdmin for easier database management.
- Configure the server port and database URL in the source code or use environment variables.
- Run the server from the terminal.
- The client sends commands to the implant via the server.
- The server authenticates the client's signature before relaying commands to the agent.
The Windows implant is designed as a stealthy, persistent backdoor with advanced post-exploitation capabilities.
It includes several shellcode loading techniques and EDR evasion mechanisms.
- Threadless Injection
- Thread Encryption
- Dynamic NTAPI Resolution
- Indirect Syscalls:
- Callstack Spoofing
- Syscall Parameter Spoofing (via VEH and breakpoints)
- VEH Syscalls
- NTDLL.dll Unhooking
- Module Fluctuation: Loads a fresh copy of
ntdll.dlland hides it from EDRs. - Sleep Obfuscation: Uses ROP chains.
- PPID Spoofing
- BlockDLLs & ACG
- Executes staged PowerShell scripts or direct commands with AMSI and ETW bypass.
- Loads .NET assemblies and BOFs using CoffeeLdr.
This project was inspired by and built upon the following amazing repositories:
- Dinvoke-rs, Shelter, and Unwinder
- SnapInject
- NovaLdr
- Black Hat Rust Code
- Rust for Malware Development
- AMSI Bypass & PowerShell Execution
Yes, it might sound like overkill, but this project was a learning exercise in malware development with Rust.
Feedback and constructive criticism are always welcome!
