Mischiever is a Linux-only C++ command-line tool for authorized LAN lab work, educational packet analysis, and controlled networking experiments. The current codebase is a menu-driven prototype with a shared session state, a small SQLite attack-history database, a libpcap traffic sniffer, and several raw-socket protocol modules. It is intended for networks you own or have explicit permission to test.
Use Mischiever only in a local lab, classroom, home network you control, or another environment where you have clear written permission.
Some modules can disrupt network connectivity, change local host networking state, or generate high packet volume. Do not run this tool against public targets, third-party networks, production networks, or devices you are not authorized to test.
The project does not currently include strong runtime guardrails such as rate limits, public-target blocking, per-module confirmations, or scoped firewall rollback. Treat every active module as potentially disruptive until those safeguards are added.
- Text-based main menu.
- Target configuration wizard.
- Current configuration display.
- Attack history view backed by SQLite.
- Automatic detection of the first active non-loopback IPv4 interface when possible.
The configuration flow stores values in a shared Session object:
- Interface.
- Target IP and MAC.
- Gateway IP and MAC.
- DHCP server IP.
- DNS server IP.
- DNS spoofing domain and redirect IP when DNS spoofing is selected.
The find command in configuration prompts can:
- Run a local
/24ping sweep based on the interface IP. - Read discovered hosts from
/proc/net/arp. - Detect the default gateway from
/proc/net/route. - Resolve MAC addresses through the local ARP cache.
- Read a DNS server from
/etc/resolv.conf. - Query the DHCP server through
nmcliwhen available, with gateway fallback.
- Uses
libpcapfor live packet capture. - Opens the selected interface in promiscuous mode.
- Writes timestamped
.pcapfiles undersniffs/. - Prints a simple IPv4 packet table for TCP, UDP, ICMP, and other IPv4 packets.
- Highlights packets involving the configured target IP.
- Attempts to set pcap file ownership back to the original sudo user using
SUDO_UIDandSUDO_GID.
The current modules are available through the menu:
- ARP spoofing: sends repeated forged ARP replies to the configured target and gateway. It enables IP forwarding and disables send redirects while active.
- ARP blackhole: uses the ARP poisoning flow and sets forwarding behavior so forwarded traffic is dropped.
- DNS spoofing: watches raw IPv4 UDP DNS queries and sends a forged A-record response when the requested name contains the configured domain. The menu requires ARP spoofing to be active first.
- DHCP starvation: sends DHCP Discover packets with randomized locally administered MAC addresses.
- DHCP release: sends repeated DHCP Release packets using the configured target IP/MAC and DHCP server IP.
- ICMP flood: sends ICMP Echo Request packets to the configured target IP.
- SYN flood: sends raw TCP SYN packets to the configured target IP on port 80.
- NAT table exhaustion simulation: sends randomized UDP traffic toward the configured gateway MAC from multiple threads.
These modules are for isolated, authorized lab testing only.
The application is organized around a small set of core components:
src/main.cpp: registers the Ctrl-C handler, constructsMenu, and starts the main loop.Menu: owns the sharedSession, the sniffer, and a vector of attack modules. It handles display, input, configuration, module selection, logging, and start/stop flow.Session: shared mutable state for interface, target, gateway, DHCP/DNS settings, module status flags,Database, andHelperFunctions.AttackModule: abstract interface implemented by protocol modules withrun(Session*),stop(), andget_name().Sniffer: backgroundlibpcapcapture and pcap writer.Database: SQLite wrapper for attack history.HelperFunctions: interface discovery, IP/MAC validation, local scanning, gateway/DNS/DHCP lookup, and Linux networking toggles.
Protocol implementations live in src/protocols/, with headers in src/headers/.
Mischiever is built with the provided Makefile.
Required:
- Linux.
g++with C++14 support.make.- POSIX/Linux networking headers.
libpcapdevelopment package.- SQLite3 development package.
- pthread support.
Runtime tools used by some features:
pingiptablessysctlnmclifor DHCP server detection when availablexdg-openorimvonly for optional local image easter eggs
sudo apt-get update
sudo apt-get install build-essential libpcap-dev libsqlite3-dev iptables network-managersudo pacman -S base-devel libpcap sqlite iptables networkmanagermakeThe Makefile currently compiles each source file, links the mischiever binary, and then removes intermediate object files.
Most features require root privileges or equivalent Linux capabilities because they use raw sockets, packet capture, and networking state changes.
sudo ./mischieverRun the binary from the repository root so relative paths resolve correctly:
mischiever_history.dbis created in the current working directory.- Packet captures are saved under
sniffs/. - Optional local image files are loaded from
misc/.
Depending on the selected module, Mischiever may:
- Open raw sockets with
AF_PACKET,AF_INET,SOCK_RAW, or protocol-specific raw sockets. - Open a live
libpcapcapture in promiscuous mode. - Create
sniffs/and write.pcapfiles. - Create or update
mischiever_history.db. - Read
/proc/net/arp,/proc/net/route, and/etc/resolv.conf. - Execute
pingduring host/MAC discovery. - Execute
nmcliduring DHCP server discovery. - Change
/proc/sys/net/ipv4/ip_forward. - Change
net.ipv4.conf.all.send_redirectsthroughsysctl. - Insert or delete an
iptablesrule for forwarded UDP destination port 53 during DNS spoofing. - Change the default
iptablesFORWARD policy during ARP blackhole mode.
Review your host networking state before and after lab runs, especially when using ARP, DNS, or blackhole modes.
Mischiever creates a SQLite database named mischiever_history.db. The current schema records:
- ID.
- Type.
- Date.
- Time.
- Attacker IP text.
- Victim IP text.
The database does not yet store full session configuration, duration, result status, errors, packet counts, interface, gateway, or pcap paths.
- The project is a prototype, not a hardened framework.
- There are no automated tests yet.
- There are no default rate limits or duration limits on high-volume modules.
- Safety checks are mostly documentation and menu flow, not enforced policy.
Menucurrently handles too many responsibilities: UI, configuration, module lookup, lifecycle, and logging.- Module selection is based on display-name string matching.
Sessionis a mutable state container with limited validation.- System-state cleanup is best effort and not fully scoped.
- ARP blackhole mode changes the global
iptablesFORWARD policy. - DNS parsing is simple and handles only straightforward query names.
- DNS domain matching uses substring matching.
- SYN packet construction is incomplete because TCP checksums are not calculated.
- The SYN target port is hardcoded to 80.
- The sniffer prints only shallow IPv4 protocol information.
make cleanremoves the binary,mischiever_history.db, and thesniffs/directory.
src/main.cpp Entry point and signal handler
src/menu.cpp Interactive menu and orchestration
src/helperfuncs.cpp Discovery, validation, and system helpers
src/database.cpp SQLite attack history
src/sniffer.cpp libpcap live capture and pcap writer
src/protocols/arp.cpp ARP spoofing and blackhole modes
src/protocols/dhcp.cpp DHCP starvation and release modes
src/protocols/dns.cpp DNS response spoofing
src/protocols/icmp.cpp ICMP Echo traffic generation
src/protocols/nat.cpp Gateway NAT table pressure simulation
src/protocols/syn.cpp TCP SYN traffic generation
src/headers/ Public headers for the above components
docs/ai/ AI-oriented project context and roadmap
misc/ Optional local image assets
sniffs/ Runtime pcap output directory
See docs/ai/PROJECT_CONTEXT.md, docs/ai/ARCHITECTURE.md, docs/ai/MODULE_REGISTRY.md, docs/ai/ROADMAP.md, and docs/ai/CODEX_NEXT_PROMPTS.md for a deeper technical map and planned improvement path.