Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
misfortune-cookie — Interactive PoC suite for CVE-2014-9222 (Misfortune Cookie) and related router exploits, featuring detection, auth bypass, DoS, and RCE modules with a scan mode for multiple vulnerabilities. | Kitploit
Tools/GitHubGitHub/luel-4013/misfortune-cookie
Embedded Systems SecurityReconnaissanceVulnerability ScannersIoT SecurityExploitationWeb Application ExploitationInformation GatheringPenetration TestingBinary Exploitation
GitHubluel-4013/misfortune-cookie

misfortune-cookie

Interactive PoC suite for CVE-2014-9222 (Misfortune Cookie) and related router exploits, featuring detection, auth bypass, DoS, and RCE modules with a scan mode for multiple vulnerabilities.

9h 38m agoNot yet reviewed

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share
View Repository

CVE-2014-9222 "Misfortune Cookie" PoC suite

Stack overflow in AllegroSoft RomPager's HTTP cookie handling (all versions < 4.34). A single unauthenticated request with a crafted Cookie: header corrupts memory. Effects: admin auth bypass, DoS/reboot, and (with firmware-specific offsets) remote code execution.

Use only against hardware you own or are explicitly authorized to test.

Interactive console (recommended)

root@kitploit:~
python3 main.py                # then set a target with [1]
python3 main.py http://192.168.1.1
root@kitploit:~
[1] Set / switch target
[2] Fingerprint target
[3] Detect vulnerability (safe, non-destructive)
[4] Authentication bypass (magic cookie)
[5] DoS / crash the device  (DESTRUCTIVE)
[6] RCE helper - derive cookie from firmware addresses
[7] Model / cookie table lookup
[8] Scan for all vulnerabilities (probe)
[A] Accellion FTA chain (CVE-2021-27101 / 27102)
[B] Huawei HG532 (CVE-2017-17215)
[C] MikroTik WinBox (CVE-2018-14847)

Every action prints what it will do first; DoS requires typing YES. The per-model fingerprint (realm) is auto-detected from the WWW-Authenticate header and matched against the cookie table.

Scan (option 8)

[8] probes a host against all four vulnerability families with non-destructive checks and prints which are reachable/likely vulnerable:

root@kitploit:~
python3 scan.py http://192.168.1.1
python3 scan.py http://192.168.1.1 --winbox-port 8291 --hg532-port 37215

Then run the matching menu entry ([3]/[4]/[A]/[B]/[C]) to exploit the confirmed one.

Additional PoCs (same console)

Alongside Misfortune Cookie, the console bundles PoCs for three other common embedded/appliance vulnerabilities:

  • [A] Accellion FTA (accellion_fta.py) - reproduces the UNC2546 chain described by Mandiant: recover the w1 secret via SQL injection through a crafted Host header (/courier/oauth.api), then trigger admin.pl to write an eval webshell, and verify it. 27103 (SSRF) / 27104 (post-auth cmd exec) are noted but not exercised by default.
  • [B] Huawei HG532 (huawei_hg532.py) - SOAP POST to /ctrlt/DeviceUpgrade_1 with $(<cmd>) in NewStatusURL, HTTP Digest auth dslf-config:admin; default command opens a telnet bind shell on 9999.
  • [C] MikroTik WinBox () - directory-traversal file read over the WinBox protocol; default reads and decrypts stored credentials ( XOR).

All additional PoCs require explicit confirmation in the console.

Standalone CLI (same engines)

root@kitploit:~
python3 detect.py http://192.168.1.1                      # safe check
python3 auth_bypass.py http://192.168.1.1                 # model auto-detected
python3 auth_bypass.py http://192.168.1.1 --restore       # re-enable auth
python3 auth_bypass.py http://192.168.1.1 --all           # try all known cookies
python3 auth_bypass.py http://192.168.1.1 --brute         # exhaustive (VERY slow, crashes)
python3 dos.py http://192.168.1.1                         # crash / reboot (DESTRUCTIVE)
python3 rce/derive_cookie.py 0x803E9A40 0x803AB30D        # addresses -> (num, pad)

Files

Magic cookie format

root@kitploit:~
Cookie: C<evilnum>=<pad "B" bytes><payload>;

evilnum and pad are firmware-specific. evilnum indexes RomPager's 0x28-byte cookie array (C_Array + evilnum*0x28 + pad = overwritten address). The per-model table merged from exploitdb 39739 and the Metasploit allegro_rompager_auth_bypass module is in common.py.

RCE path

Needs one exact firmware image. Steps (see rce/README.md): extract rootfs with binwalk, reverse the cookie parser in Ghidra to find the buffer -> saved $ra delta, derive (num, pad) with derive_cookie.py, validate the MIPS shellcode against a QEMU-emulated image before touching the live target.

References

  • https://nvd.nist.gov/vuln/detail/CVE-2014-9222
  • https://web.archive.org/web/20141231080506/http://mis.fortunecook.ie/
  • Metasploit: auxiliary/scanner/http/allegro_rompager_misfortune_cookie and auxiliary/admin/http/allegro_rompager_auth_bypass
  • ExploitDB 39739 (Misfortune Cookie auth remover)
Download Tool
VulnerabilityCVEWhat the probe does
RomPagerCVE-2014-9222HTTP banner + version vs 4.34
Huawei HG532CVE-2017-17215SOAP endpoint up + Digest realm
MikroTik WinBoxCVE-2018-14847live WinBox fileread (creds dumped)
Accellion FTACVE-2021-27101/104Accellion/oauth.api fingerprint
MenuCVETargetPort
[A]CVE-2021-27101/27102Accellion FTA80
[B]CVE-2017-17215Huawei HG53237215
[C]CVE-2018-14847MikroTik WinBox8291
mikrotik_winbox.py
flash/rw/store/user.dat
md5(user + "283i4jfkai3389")
filepurpose
main.pyinteractive console
ui.pybanner + UI helpers (header/info/warn/err/success/prompt/confirm)
common.pyfingerprinting, magic-cookie builder, per-model (num, pad) table
detect.pynon-destructive vulnerability check (version + canary-cookie)
scan.pyprobe a target against all four vuln families (option 8)
auth_bypass.pymagic-cookie auth bypass with realm auto-detection
dos.pyoversized-cookie stack smash -> watchdog reboot
accellion_fta.pyCVE-2021-27101/27102 SQLi -> webshell chain
huawei_hg532.pyCVE-2017-17215 SOAP command injection
mikrotik_winbox.pyCVE-2018-14847 WinBox file read / credential dump
rce/derive_cookie.pyturn C_Array + target address into (num, pad)
rce/README.mdfull RCE methodology + exploit math
rce/references/31C3 slides, NCC whitepaper, demystified writeups, layout tables