Rust-based Security Research Lab β Passive Wi-Fi auditing, packet fuzzing, Discord security bots, cryptography toolkit, and kernel-level research, all written in safe, high-performance Rust.
rust Β· security Β· cybersecurity Β· wifi Β· wireless-security Β· penetration-testing Β· 802.11 Β· pcap Β· cryptography Β· merkle-tree Β· fuzzing Β· discord-bot
rust-security-suminworld is a Cargo workspace containing practical security tools and educational research modules. Every crate compiles with zero warnings, passes cargo clippy cleanly, and ships with unit + integration tests (64 tests total).
| π High Performance | Async I/O via Tokio, zero-cost abstractions |
| π‘οΈ Memory Safe | Ownership & borrowing eliminate buffer overflows and use-after-free |
| π§ͺ Well Tested | 64 tests across all workspace members |
| π Clean Code | 0 compiler warnings, 0 clippy lints, cargo fmt enforced |
| π§© Modular | Each tool is an independent crate β build and run individually |
| Crate | Type | Description |
|---|---|---|
port_scanner |
π§ Tool | High-performance async TCP port scanner (Tokio + Semaphore) |
discord_audit_bot |
π§ Tool | Discord server security audit bot (Serenity) |
packet-match-fuzz |
π§ Tool | KMP pattern matcher & mutation fuzzer for packet payloads |
wifi_audit |
π§ Tool | Passive 802.11 Wi-Fi auditor (Beacon / Probe analysis) |
crypto |
π¬ Research | Educational cryptography: Caesar, VigenΓ¨re, XOR, Feistel, RSA, FNV-1a |
merkle |
π¬ Research | SHA-256 Merkle tree with domain-separated hashing & inclusion proofs |
kernel-features |
π¬ Research | Rust-for-Linux language features study (Field Projection, In-place Init, Arbitrary Self Types) |
β οΈ All tools are for educational and authorized security testing only.
- Rust β₯ 1.75 β install via rustup
- libpcap (for
wifi_audit):# Ubuntu / Debian sudo apt install -y libpcap-dev build-essential # macOS brew install libpcap
git clone https://github.com/sumin-world/rust-security-suminworld.git
cd rust-security-suminworld
# Build everything
cargo build --release
# Run all 64 tests
cargo test
# Lint check (should produce 0 warnings)
cargo clippy --all-targets# Port scanner
cargo run -p port_scanner -- 192.168.1.1 --range 1-1024 --fast
# Discord bot (set token first)
cp .env.example tools/discord_audit_bot/.env # then fill in DISCORD_TOKEN
cargo run -p discord_audit_bot
# Wi-Fi audit (requires monitor mode + root)
sudo cargo run -p wifi_audit -- --iface wlan0mon
# Crypto demo (Caesar, Vigenère, XOR, Feistel, FNV, entropy)
cargo run -p research-crypto --example demo
# Packet fuzzing library
cargo test -p packet-match-fuzzAsync TCP port scanner using Tokio with configurable concurrency and timeout.
# Scan common ports
cargo run -p port_scanner -- scanme.nmap.org -p 22,80,443
# Fast scan (top 1024 ports, 1024 concurrent, 200ms timeout)
cargo run -p port_scanner -- 10.0.0.1 --fastTests: 19 unit tests covering parse_range, parse_ports_list, dedup_sort, preview_ports.
Modular Discord security bot built with Serenity. Refactored from a single 1,191-line file into five clean modules:
| Module | Responsibility |
|---|---|
main.rs |
Entry point & Serenity client setup |
models.rs |
SecurityReport, SecurityLevel, AppState structs |
scanner.rs |
SecurityScanner β audit logic & report formatting |
handler.rs |
EventHandler β Discord command dispatch |
helpers.rs |
Embed builders, account_age_days utility |
Full KMP-based pattern-matching and mutation-fuzzing library for packet payloads:
| Module | Purpose |
|---|---|
kmp.rs |
KMP string matcher β find_all, find_first, contains |
stream.rs |
Streaming matcher that retains state across packet chunks |
fuzz.rs |
Mutation fuzzer (BitFlip, ByteReplace, ByteInsert, ByteDelete, ChunkShuffle) |
Tests: 15 unit tests + 1 doc-test.
Passive 802.11 auditing tool β captures Beacon frames, Probe Requests, and Probe Responses via libpcap in monitor mode.
sudo cargo run -p wifi_audit -- --iface wlan0mon --list-clientsEducational implementations with comprehensive tests:
| Module | Algorithms |
|---|---|
classical.rs |
Caesar cipher, Vigenère cipher |
symmetric.rs |
XOR cipher, Feistel network |
asymmetric.rs |
RSA (MillerβRabin, modular exponentiation) |
hash.rs |
FNV-1a hash, hash-chain with reduction |
utils.rs |
Hex encoding, Shannon entropy, random BigUint |
Tests: 18 unit tests. Demo: cargo run -p research-crypto --example demo
SHA-256 Merkle tree with domain-separated hashing (leaf 0x00 prefix vs internal 0x01 prefix) for second-preimage resistance.
from_leaves()β build from arbitrary byte slicesroot()β get the 32-byte root hashproof(index)β generate inclusion proofverify(root, leaf, proof, index)β static verificationleaf_count()β number of leaves
Tests: 7 tests (4 unit + 3 integration).
Executable examples exploring Rust language features needed for Linux kernel development:
| Example | Feature |
|---|---|
field_projection |
Struct field projection through smart pointers |
inplace_init |
In-place initialization (avoiding large stack copies) |
smart_pointers |
Arbitrary self types for custom smart pointers |
limitations |
Current limitations & development timeline |
Tests: 4 unit tests. Docs: research/kernel-features/docs/
β οΈ Educational only. Run exclusively on hardware you own.
The poCs/cache/ directory contains a C-based Flush+Reload cache side-channel proof-of-concept:
| File | Role |
|---|---|
victim_sim.c |
Victim: repeatedly accesses a probe array indexed by a secret byte |
flush_reload_attacker.c |
Attacker: uses clflush + rdtscp to measure access times |
flush_reload_attacker_csv.c |
Attacker variant: outputs iter,cycles CSV for analysis |
# Compile
gcc -O2 -o victim_sim poCs/cache/victim_sim.c
gcc -O2 -o attacker poCs/cache/flush_reload_attacker_csv.c
# Run
./victim_sim &
VICTIM_PID=$!
./attacker > /tmp/flush_reload_data.csv
kill $VICTIM_PIDCache hits (~1,000 cycles) vs cache misses (>100,000 cycles) reveal whether the victim accessed the targeted memory line.
rust-security-suminworld/
βββ Cargo.toml # Workspace manifest (shared deps, profiles)
βββ tools/
β βββ port_scanner/ # Async TCP port scanner
β βββ discord_audit_bot/ # Discord security audit bot (5 modules)
β βββ packet-match-fuzz/ # KMP matcher + mutation fuzzer
β βββ wifi_audit/ # Passive 802.11 auditor
βββ research/
β βββ crypto/ # Educational cryptography toolkit
β βββ merkle/ # SHA-256 Merkle tree
β βββ kernel-features/ # Rust-for-Linux feature study
βββ poCs/
β βββ cache/ # Flush+Reload side-channel PoC (C)
βββ docs/
β βββ learning_notes.md # Study notes
β βββ LEGAL_NOTICE.md # Legal & ethical guidance
βββ .github/workflows/ci.yml # CI pipeline
βββ CONTRIBUTING.md
βββ CODE_OF_CONDUCT.md
βββ SECURITY.md
βββ LICENSE # MIT
| Metric | Value |
|---|---|
| Compiler warnings | 0 |
| Clippy lints | 0 |
| Test count | 64 (all passing) |
| Test failures | 0 |
| Formatting | cargo fmt enforced |
| Crate | Tests |
|---|---|
port_scanner |
19 |
crypto |
18 |
packet-match-fuzz |
16 |
merkle |
7 |
kernel-features |
4 |
| Total | 64 |
- Async TCP port scanner with CLI
- Discord security audit bot (modular architecture)
- KMP packet pattern matcher & mutation fuzzer
- Passive Wi-Fi audit tool (802.11)
- Educational cryptography toolkit
- SHA-256 Merkle tree with domain separation
- Rust-for-Linux kernel features study
- Flush+Reload cache side-channel PoC
- Hash Cracker β dictionary attacks, rainbow tables
- Web Fuzzer β directory discovery, parameter injection
- Log Analyzer β multi-format parsing, anomaly detection
- Packet Sniffer β real-time protocol decoding
Contributions of all levels are welcome! See CONTRIBUTING.md for details.
# Development workflow
cargo fmt --all # Format
cargo clippy --all-targets # Lint
cargo test # TestPlease ensure your PR introduces zero new warnings and includes tests for new functionality.
All tools are intended exclusively for:
- π Educational purposes β learning cybersecurity concepts
- π‘οΈ Authorized testing β only on systems you own or have explicit permission to test
- π¬ Security research β improving defensive capabilities
The authors assume no liability for misuse. Users are solely responsible for ensuring compliance with applicable laws. See LEGAL_NOTICE.md and SECURITY.md.
MIT β free for commercial and personal use.
| π¦ Repository | github.com/sumin-world/rust-security-suminworld |
| π Issues | Report a bug |
| π Rust Book | doc.rust-lang.org/book |
| β‘ Tokio | tokio.rs |
| π RustCrypto | github.com/RustCrypto |