espilon-source/espilon_bot/components/mod_redteam/rt_karma.h
Eun0us 2315979db0
Some checks failed
Discord Push Notification / notify (push) Has been cancelled
ε - Add WiFi offensive capabilities to mod_redteam
Phase 1 of v0.4.0 offensive modules:

- Promiscuous dispatcher (rt_promisc): shared IRAM callback multiplexer
  for stealth scan, karma, capture — solves single-callback ESP-IDF limit
- Attack manager (rt_attack): mutual exclusion ensuring only one
  offensive operation runs at a time
- Deauth refactored to use shared promisc dispatcher + attack lock
- Stealth passive scan migrated to promisc dispatcher
- Karma attack (rt_karma): probe request listener + probe response
  injection + rogue SoftAP with most-requested SSID + DNS responder
- WPA handshake capture (rt_capture): EAPOL frame capture via
  promiscuous DATA filter, 4-way handshake identification, optional
  deauth burst to trigger reconnection
- Kconfig: RT_BEACON, RT_KARMA, RT_CAPTURE toggle options
- 5 new C2 commands: rt_karma, rt_karma_stop, rt_karma_clients,
  rt_capture, rt_capture_stop (14 total in mod_redteam)
2026-03-01 02:08:28 +01:00

44 lines
1022 B
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* rt_karma.h
* Karma attack — respond to WiFi probe requests with matching SSIDs
* to lure clients into connecting to our rogue AP.
*/
#pragma once
#include <stdbool.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
#define RT_KARMA_MAX_CLIENTS 32
/* Info about a client that sent a probe request */
typedef struct {
uint8_t mac[6];
char ssid[33]; /* SSID they were looking for */
int64_t first_seen_ms;
int64_t last_seen_ms;
bool connected; /* true if they connected to our AP */
} rt_karma_client_t;
/*
* Start karma listener.
* duration_s 0 = run until rt_karma_stop(), >0 = auto-stop after N seconds
*/
void rt_karma_start(uint32_t duration_s);
/* Stop karma and tear down the rogue AP. */
void rt_karma_stop(void);
/* True if karma is running. */
bool rt_karma_is_active(void);
/* Get list of clients that sent probe requests. Returns count. */
int rt_karma_get_clients(rt_karma_client_t *out, int max_count);
#ifdef __cplusplus
}
#endif