-
-
Notifications
You must be signed in to change notification settings - Fork 7
HOGWASH - Karma AP #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Isonimus
wants to merge
19
commits into
0ct0sec:main
Choose a base branch
from
Isonimus:feature/karma
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Add hogwash.h with mode interface, SSID queue, station tracking - Add hogwash.cpp with probe monitoring, soft AP, station detection - Integrate HOGWASH_MODE into porkchop.h enum - Add K key binding and menu item in porkchop.cpp - Add mode handlers for start/stop/update/draw - Warning dialog similar to PIGGY BLUES pattern
- Add 4 XP events: HOGWASH_PROBE_NEW (+3), HOGWASH_HOOK (+25), HOGWASH_APPLE_HOOK (+35), HOGWASH_SESSION_5MIN (+10) - Add HogwashAchievement enum with 6 achievements using achievements2 field - Add unlockAchievement2(), hasAchievement2(), getAchievement2Name() helpers - Add lifetimeHooks, lifetimeProbes persistent counters - Add session counters: hogwashProbes, hogwashHooks, hogwashProbeXP - Implement anti-farm cap: max 200 XP from probes per session
- Add DEVIOUS to AvatarState enum - Add AVATAR_DEVIOUS_R frames: narrowed eyes (> >) and sly expression (~) - Add AVATAR_DEVIOUS_L frames: mirror of right-facing - Add DEVIOUS case to draw() switch statement
- Add onHogwashUpdate() method declaration
- Add 9 idle phrases ('come to papa...', 'trust me bro', etc.)
- Add 9 hook phrases ('GOTCHA!', 'yoink', 'GET OVER HERE', etc.)
- Add 5 status template phrases
- Add HOGWASH case to top bar (mode label) - Add HOGWASH case to main canvas drawing (avatar + mood) - Add bottom bar stats: P:probes U:unique H:hooked [SSID]
- Add hogwashCaptivePortal bool to WiFiConfig (default: false) - Add hogwashSSIDCycleMs uint16_t to WiFiConfig (default: 5000) - Add config load/save for both settings - Add 'Karma Portal' toggle to settings menu - Add 'SSID Cycle' value setting (1-30 seconds)
- Add section 3.4 - HOGWASH Mode (Karma AP) - Document probe capture, SSID cycling, XP events - Document achievements and settings - Renumber subsequent sections (3.5-3.14)
- Add DNS server to redirect all domains to AP IP (192.168.4.1) - Add HTTP server on port 80 to serve portal page - Add default portal HTML with pig branding and loading spinner - Add custom HTML support: load /portal.html from SD if exists - Handle captive portal detection endpoints: /generate_204 (Android), /hotspot-detect.html (iOS/macOS), /connecttest.txt and /success.txt (Windows) - Integrate into mode lifecycle: start/stop/update - Show 'KARMA+PORTAL' toast when portal enabled - RAM: 23.1%, Flash: 53.7%
- Expand HOGWASH README section with captive portal details: - Settings (Karma Portal, SSID Cycle) - How portal works (DNS redirect, HTTP server) - Custom HTML via /portal.html on SD card - Platform detection endpoints - Sound notifications - Add 10 captive portal tests (33 total now): - HTML loading (default vs custom) - Start/stop lifecycle - Idempotent start/stop - Android endpoints (/generate_204, /gen_204) - Apple endpoints (/hotspot-detect.html) - Windows endpoints (/connecttest.txt, /success.txt) - Unknown endpoint rejection
Changing SSID restarts the soft AP and disconnects all clients. Now SSID cycling only happens when hookedCount == 0, keeping hooked devices connected for captive portal and XP collection. Rotation resumes automatically when all clients disconnect.
The probe callback was immediately switching SSID when a new probe arrived, even if clients were connected. Now checks hookedCount before calling updateSoftAPSSID() in both: - update() periodic cycling - probeCallback() immediate switch Serial log now shows 'clients connected' when SSID change is skipped.
SSID rotation fixes: - Use WiFi.softAPgetStationNum() for real-time connected count - SSID pauses while clients connected, resumes on disconnect Logging improvements: - Remove verbose 5-second debug logs - Remove redundant probe logs - Add [RandomMAC] indicator when locally-administered MAC detected - Cleaner hook log format README updates: - Document smart behaviors (pause/resume, fast timeout) - Document MAC randomization and its effects on hook counting
Add 6 probe phrases that display when karma AP mimics a new SSID: - 'I am [SSID] now' - 'yes I'm [SSID]' - 'looking for [SSID]?' - '*becomes [SSID]*' - '[SSID]? never heard of it' - 'totally [SSID] rn' Long SSIDs are truncated to 12 chars with '...' for display.
… clients are hooked, HOGWASH now shows:- 60% status phrases ('2 hooked', 'karma: 2 souls')- 40% flavor phrases ('trust me bro', 'come to papa')This matches the variety seen in OINK mode and keeps the UImore interesting during prolonged hooking sessions.
…) was triggering mood peeks which overridemode-specific states. Removed the call from onHogwashUpdate() andadded HOGWASH_MODE case to Mood::update() switch to always show the DEVIOUS face while karma AP is running.
When 'Fixed SSID' is set in settings, HOGWASH mode operates as an Evil Twin attack instead of Karma AP: - Uses configured SSID instead of cycling probed SSIDs - Disables probe-based SSID switching - Toast shows 'EVIL TWIN' instead of 'KARMA ACTIVE' Implementation: - config: Added hogwashFixedSSID to WiFiConfig - settings: Added 'Fixed SSID' text input - hogwash: Check fixedSSID in start(), skip cycling when set README updated with mode documentation.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
HOGWASH Mode - Karma AP / Evil Twin Implementation
Summary
This PR introduces HOGWASH Mode, a new operational mode that implements a Karma Access Point attack. The pig listens for WiFi probe requests from nearby devices, extracts the SSIDs they're looking for, and broadcasts a matching fake AP to lure them in.
Features
Core Karma AP Functionality
[RandomMAC]when devices use randomized addressesCaptive Portal
/portal.htmlon SD card for custom pagesXP & Achievements System
HOGWASH_PROBE_NEWHOGWASH_HOOKHOGWASH_APPLE_HOOKHOGWASH_SESSION_5MIN6 New Achievements:
F1RST H00K- First device hookedK4RMA K1NG- 50 devices hooked lifetimeH0N3Y P0T- 5 devices connected simultaneouslyTR4P M4ST3R- 100 unique SSIDs captured4PPL3 P1CK3R- Hook 10 Apple devicesTR4FF1C W4RD3N- 30 minutes continuous operationAvatar & Mood
> >eyes,~expression)UI & Settings
P:probes U:unique H:hooked [SSID]Karma Portal: Toggle captive portal (default: OFF)SSID Cycle: 1-30 seconds (default: 5s)Fixed SSID: When set, HOGWASH mode operates as an Evil Twin attack instead of Karma APFiles Changed
New Files
src/modes/hogwash.cpp- Core implementation (~700 lines)src/modes/hogwash.h- Mode interface and structuresModified Files
src/core/porkchop.cpp/.h- Mode integration (K key binding)src/core/xp.cpp/.h- XP events and achievements2 fieldsrc/core/config.cpp/.h- Settings (portal toggle, cycle time)src/piglet/avatar.cpp/.h- DEVIOUS state and framessrc/piglet/mood.cpp/.h- Phrases and onHogwashUpdate()src/ui/display.cpp- UI elements and bottom barsrc/ui/settings_menu.cpp- New settings itemsREADME.md- Full documentationTests
test/test_hogwash/test_hogwash.cpp- 33 test cases covering:Technical Details
WiFi Stack
esp_wifi_set_inactive_time(10)for fast disconnect detectionMemory
Key Design Decisions
WiFi.softAPgetStationNum()for real-time client detectionDisclaimer
HOGWASH mode demonstrates Karma AP/Evil twin attacks for educational purposes only. Use responsibly on your own devices. The same legal considerations as PIGGY BLUES apply.
Testing
Commits (17 total)
See individual commit messages for detailed changes. Key commits:
a2e26a4- Core implementation38e89f9- Captive portal072af77- SSID rotation fixes88f00c7- DEVIOUS avatar persistence