Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
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.

FeedsContactPrivacy© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
CVE-2019-5420 — A vulnerability can allow an attacker to guess the automatically generated development mode secret token. | Kitploit
Tools/GitHubGitHub/j4k0m/cve-2019-5420
Encryption/Decryption ToolsPassword AttacksVulnerability AnalysisWeb Application ExploitationPenetration Testing
GitHubj4k0m/cve-2019-5420

CVE-2019-5420

A vulnerability can allow an attacker to guess the automatically generated development mode secret token.

View Repository
5395 years agoNot yet reviewed
Share

CVE-2019-5420

A vulnerability can allow an attacker to guess the automatically generated development mode secret token.

Ruby-on-Rails when it is running in development mode. In development mode, it is possible for an attacker to guess the key used to secure the sessions.

Decryption:

Key Generate:

Rails uses 3 environments (development,test,production), when an application uses development mode you are able to guess secret token and decrypt the encrypted session.

The key used to protect session is derived from the application's name.

Example:

rails new Jakom

Jakom: Application Name.

By this we can guess the key is output of the generation method:

PKDF2_HMAC_SHA1[ MD5 [ APPNAME + "::Application" ] , salt: "authenticated encrypted cookie" , iterations: 1000 , key's length: 32 ]

As we can see here:

key = pbkdf2_hmac("sha1", md5_name.encode("utf-8"), "authenticated encrypted cookie".encode("utf-8"), 1000, 32)

Decrypt the session with the key:

In Rails, sessions are encrypted with AES-265-GCM, if you have the key you can decrypt/encrypt sessions.

Last thing you will need is the format of the session:

BASE64 [ DATA ] -- BASE64 [ IV ] -- BASE64 [ AUTH_TAG ]

Decrypt example:

As we can see here:

data = binascii.hexlify(base64.b64decode(base64_data.split("--")[0])).decode("utf-8")
iv = binascii.hexlify(base64.b64decode(base64_data.split("--")[1])).decode("utf-8")
tag = binascii.hexlify(base64.b64decode(base64_data.split("--")[2])).decode("utf-8")

The first part of the session cookie is the encrypted data, the second part is the IV, the third part is the GCM tag (Authentication Tag). With those informations we can decrypt our sessions directly: image

Example:

image

Download Tool

Most Popular

View all →

Discover the most used tools by our community.

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 The ultimate OSINT toolkit: investigation graph, confidence scoring, alias families, map, timeline and reports. 49 modules, 400+ sites, no API keys required.

    717
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock One-Tap Execution App (CVE-2026-43499)

    504
  • 3

    ARTEX

    baarai/artex

    LLM multi-agent autonomous penetration testing platform with planner/worker agents, asset and exploration graphs, MITM traffic recording, and vulnerability retesting.

    402
  • 4

    redforge

    cybersecurity91/redforge

    Browser-side red team toolkit with 102 offline tools for recon, payload generation, credential attacks, crypto, encoding and engagement reporting.

    342
  • 5

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    The system of action for AI-native cybersecurity—where intent becomes governed execution, evidence becomes operational memory, and every operation improves the next.

    260
  • 6

    antifox

    antifox-ai/antifox

    AI multi-agent autonomous penetration testing platform that runs recon, attack-surface discovery, exploitation validation and evidence-backed report delivery.

    259

Explore all tools

Browse our collection of tools

View all tools →