Session-X π‘οΈ: Full-Stack OTP Exploitation & Server-Side OTP Bypass Toolkit
SESSION INTELLIGENCE β’ SECURITY ANALYSIS β’ AUTOMATION
A security-focused toolkit for session-related research, management, and authorized testing.
ENGINEERED FOR SECURITY RESEARCH β’ LABS β’ AUTHORIZED TESTING
Author: SYLHETYHACKVENGER (THE-ERROR808)
Purpose: Authorized Security Testing Only
Features β’ Installation β’ Usage β’ Capabilities β’ Output β’ Legal
Username: sylhetyhackvenger
password: error808
π Description Overview

Session-X is a professional-grade, full-stack OTP (One-Time Password) exploitation and server-side bypass assessment toolkit engineered for authorized penetration testers, bug bounty hunters, and red team operators. This advanced cybersecurity framework automates the entire OTP attack surface discovery and exploitation lifecycle β from intelligent JavaScript bundle harvesting and source map reconstruction, through endpoint enumeration and multi-vector payload fuzzing, to confirmed server-side OTP bypass validation with real-time sender/receiver/channel telemetry analysis. Built with an anti-false-positive confirmation engine that re-validates every discovered OTP leak across multiple requests, Session-X eliminates noise and delivers only high-confidence, actionable findings. The toolkit features universal country phone number support for 200+ nations, a 13-payload OTP verify bypass matrix across 3 header injection variants, WebSocket channel observation, CORS misconfiguration detection, secret scanning across HTML/JS/source-maps, comprehensive security header analysis, and dual JSON + Markdown + raw HTTP reporting. Session-X performs deep static analysis of JavaScript bundles to extract hidden API endpoints, WebSocket URLs, cloud service secrets (AWS, Firebase, Twilio, Stripe, SendGrid, JWT, HMAC), and OTP delivery provider fingerprints (Twilio, Nexmo, MessageBird, Plivo, SNS, Firebase). Every request, response, and finding is captured in forensic-grade evidence logs with confidence scoring, giving operators reproducible proof-of-concept documentation suitable for client reports and bug bounty submissions.
β‘ Key Features
Feature Description
π― Full-Stack Recon Automated login page analysis, form extraction, CSRF detection, redirect following
π JS Bundle Harvesting Deep static analysis of JavaScript files and inline scripts
πΊοΈ Source Map Recovery Automatic .map file detection and source content extraction
π Endpoint Discovery Intelligent API endpoint pattern matching from JS/HTML
π WebSocket Detection WS/WSS URL extraction and live channel observation
π‘οΈ Anti-False-Positive Engine Multi-request OTP leak confirmation with token similarity analysis
π± Universal Phone Builder Country selector for 200+ nations with dial code formatting
π― Verify Bypass Matrix 13 payload types Γ 3 header variants = 39 bypass combinations
π Secret Scanning AWS, Google, Firebase, Twilio, Stripe, SendGrid, JWT, HMAC detection
π‘ SMS/Channel Fingerprinting Detect Twilio, Nexmo, Plivo, SNS, Firebase and more
πͺ Cookie Security Analysis Secure/HttpOnly/SameSite flag auditing
π Security Header Audit HSTS, CSP, X-Frame-Options, Permissions-Policy, Referrer-Policy
π CORS Misconfig Detection Wildcard + credentials bypass detection
π Comprehensive Reporting JSON + Markdown + Raw HTTP exchange logs
π§΅ Concurrent Processing ThreadPoolExecutor for parallel JS analysis
π¨ Professional CLI UI Colorized, structured console output with severity indicators
π₯ Fire Description
Session-X is the ultimate full-stack OTP exploitation framework that tears apart modern
authentication flows piece by piece. It harvests every JavaScript bundle, recovers hidden
source maps, extracts buried API endpoints and WebSocket channels, and fingerprints cloud
SMS providers like Twilio and Firebase β then weaponizes that intelligence into a
relentless 7-stage assault on the target's OTP verification logic. With a 39-variant
bypass matrix covering null bytes, HPP, prototype pollution-style objects, negative
integers, overflow values, and X-Forwarded-For header injection, Session-X hunts for
the server-side validation flaws that let attackers skip the OTP entirely. Every leak
is confirmed twice to kill false positives, every finding is scored with confidence
weighting, and every request is logged as forensic-grade evidence. Whether you're
hunting a missing rate limit, a response header leak, a WebSocket broadcast flaw, or
a CSRF-less login form, Session-X turns an afternoon of manual testing into a
90-second automated kill chain β with JSON, Markdown, and raw HTTP reports ready
for your bounty submission. Built for operators who demand precision, depth, and
reproducible proof. This is not a scanner. This is a surgical strike.
π Table of Contents
- Description Overview
- Key Features
- Fire Description
- Requirements
- Installation
- Quick Start
- Usage
- Full Capabilities Β· Stage 1: Login Page Analysis Β· Stage 2: JS Bundle Harvesting Β· Stage 3: Credential Input Β· Stage 4: Login Form Submission Β· Stage 5: Endpoint Probing Β· Stage 6: Sender/Receiver Validation Β· Stage 7: Verify Bypass Matrix Β· Stage 8: WebSocket Observation
- OTP Detection Patterns
- Secret Scanning
- SMS Provider Fingerprinting
- Security Analysis Modules
- Bypass Payload Matrix
- Anti-False-Positive Engine
- Country Support
- Output Format
- Architecture
- Configuration
- Troubleshooting
- Legal Disclaimer
- Credits
π¦ Requirements
System Requirements
Β· Python: 3.8 or higher
Β· OS: Linux, macOS, Windows (WSL recommended)
Β· RAM: 512 MB minimum
Β· Network: Internet connection to target
Python Dependencies
requests>=2.25.0
urllib3>=1.26.0
beautifulsoup4>=4.9.0
lxml>=4.6.0
websocket-client>=1.0.0
colorama>=0.4.4
π Installation
Method 1: Quick Install
git clone https://github.com/SYLHETYHACKVENGER/Session-X
cd Session-X
pip install requests urllib3 beautifulsoup4 lxml websocket-client colorama
python3 sessionx.py
Method 2: Virtual Environment (Recommended)
git clone https://github.com/SYLHETYHACKVENGER/Session-X
cd Session-X
python3 -m venv venv
source venv/bin/activate # Linux/macOS
# venv\Scripts\activate # Windows
pip install -r requirements.txt
python3 sessionx.py
Method 3: One-Liner Setup
git clone https://github.com/sylhetyhackvenger/Session-X && cd Session-X && pip install requests urllib3 beautifulsoup4 lxml websocket-client colorama && python3 sessionx.py
Verify Installation
python3 -c "import requests, urllib3, bs4, lxml, websocket, colorama; print('β All dependencies installed')"
β‘ Quick Start
# 1. Clone and install
git clone https://github.com/sylhetyhackvenger/Session-X
cd Session-X
pip install -r requirements.txt
# 2. Run against an authorized target
python3 sessionx.py
# 3. Follow interactive prompts:
# - Accept legal notice (y)
# - Enter target URL (e.g., https://target.example.com)
# - Enter identity (email or phone)
# - Enter password (optional)
# - Watch the 8-stage automated assessment run
# - Review reports in otp_reports/
π― Usage
Interactive Flow
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β SESSION-X β Full-Stack OTP Exploitation Toolkit β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β 1. Legal Authorization Gate β
β 2. Target URL Input β
β 3. Automated 8-Stage Assessment β
β 4. Report Generation β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Example Session
$ python3 sessionx.py
[?] Do You Have Authorisation To Perform On A Real Target : y/n y
β Authorization confirmed.
[?] Target site URL: https://target.example.com
[TARGET] https://target.example.com
ββββββββ STAGE 1: FETCHING LOGIN PAGE ββββββββ
βΈ GET / (baseline) β REQUEST
Method : GET
URL : https://target.example.com
βΈ GET / (baseline) β RESPONSE
Status : 200 OK
Size : 45231 bytes
βΈ LOGIN / OTP FORMS DETECTED (2)
Form #1 β CSRF
Action : https://target.example.com/login
Method : POST
Inputs :
- name=email type=email
- name=password type=password
- name=csrf_token type=hidden
...
Target URL Formats
All of the following are accepted:
https://target.example.com
http://target.example.com
target.example.com # auto-prefixed with https://
https://target.example.com/login
https://api.target.example.com
Identity Input Formats
Type Example Notes
Email user@gmail.com Full email address
E.164 Phone +8801234567890 Must start with +
Local Phone 01111356732 Triggers country selector
π§° Full Capabilities
Session-X performs a comprehensive, 8-stage automated assessment. Each stage is documented below with what it detects, how it works, and what findings it produces.
Stage 1: Login Page Analysis
Purpose: Identify the target's authentication entry points and understand the form structure.
Capabilities:
Β· Fetch the target URL and follow redirects
Β· Parse HTML with BeautifulSoup + lxml for speed
Β· Extract all
Β· Detect login forms via heuristics:
Β· Presence of password, email, or tel input types
Β· Field names containing user, login, phone, mobile, identifier
Β· Fields containing otp, code, pin
Β· Detect CSRF protection (checks for csrf, csrf_token, _token, authenticity_token, csrfmiddlewaretoken, __RequestVerificationToken, xsrf)
Β· Flag POST forms missing CSRF tokens as medium severity findings
Β· Follow links containing login, signin, sign-in, auth
Β· Re-analyze followed login pages and merge their forms
Β· Analyze response security headers on every request
Β· Detect JavaScript SPA sites (no traditional form)
Β· Record discovered origins and the canonical login page URL
Findings Emitted:
Β· csrf (medium) β POST login form without CSRF token
Β· header (low) β Missing security headers
Β· cookie (low/medium) β Weak cookie flags
Β· cors (high) β Wildcard CORS with credentials
Β· header-leak (critical) β OTP in response header
Stage 2: JS Bundle Harvesting
Purpose: Extract every JS file, analyze source maps, and discover hidden endpoints, secrets, and WebSocket URLs.
Capabilities:
Β· Collect URLs<br> Β· Collect <script> inline blocks (captures blocks >50 chars)<br> Β· Collect <link rel="modulepreload"> and <link rel="preload"> JS<br> Β· Regex-scan HTML for absolute .js URLs<br> Β· Parallel download all JS bundles (8 concurrent workers)<br> Β· For each JS bundle:<br> Β· Extract API endpoints via regex:<br> Β· /api, /v1, /rest, /graphql, /gql, /auth, /user, /account, /otp, /sms, /verify, /phone, /email, /login, /signin, /register, /session, /token, /send, /call, /resend, /validate<br> Β· Extract full URLs matching https?://... with auth-related keywords<br> Β· Extract WebSocket URLs (ws:// and wss://)<br> Β· Extract API hostnames for CORS/referrer analysis<br> Β· Scan for secrets (see Secret Scanning)<br> Β· Fingerprint SMS providers (see SMS Provider Fingerprinting)<br> Β· Request {js_url}.map for source map recovery<br> Β· Parse source map sourcesContent and re-scan for:<br> Β· Additional API endpoints<br> Β· Additional URLs<br> Β· Additional secrets (flagged as map-secret)<br> Β· Scan inline scripts for the same patterns (flagged as inline-secret)<br> Β· Scan index.html for secrets (flagged as html-secret)</p> <p>Findings Emitted:</p> <p>Β· js-secret (high) β Secrets in JS bundle<br> Β· map-secret (high) β Secrets in source map<br> Β· inline-secret (high) β Secrets in inline script<br> Β· html-secret (critical) β Secrets in index.html</p> <p>Console Output Example:<br> </p> <div class="highlight"><pre class="highlight plaintext"><code>ββββββββ STAGE 2: JS BUNDLE + SOURCE MAP HARVESTING ββββββββ JS bundles: 12 Inline scripts: 3 [SMS/CHANNEL] https://target.example.com/app.js β ['twilio', 'sms'] [MAP] source map recovered: https://target.example.com/app.js.map Total endpoints discovered: 47 β /api/v1/otp/send β /api/v1/otp/verify β /api/auth/login β /api/user/profile ... </code></pre></div> <p></p> <hr> <p>Stage 3: Credential Input</p> <p>Purpose: Collect the identity used to run the OTP flow.</p> <p>Capabilities:</p> <p>Β· Accept email addresses (validates @ and . in domain)<br> Β· Accept full E.164 phone numbers (+ prefix, β₯8 digits)<br> Β· Accept local phone numbers (triggers interactive country selector)<br> Β· Accept optional password (blank = OTP-only flow)<br> Β· Store identity type (email vs phone) for downstream payload generation</p> <p>Interactive Country Selector (if local phone entered):<br> </p> <div class="highlight"><pre class="highlight plaintext"><code>ββββββββ COUNTRY SELECTOR (UNIVERSAL) ββββββββ Select your country by entering its serial number or short code (e.g. BD). 1. AF Afghanistan +93 2. AL Albania +355 3. DZ Algeria +213 ... 201. ZW Zimbabwe +263 [?] Enter country serial number or short code: BD Selected: Bangladesh (BD) dial=+880 [?] Enter local number (without country code, e.g. 01111356732): 01111356732 β Full international number: +8801111356732 [?] Confirm? (y/n): y </code></pre></div> <p></p> <p>Payload Key Aliasing: When submitting forms/endpoints, Session-X generates identity payloads using multiple field name aliases for maximum compatibility:</p> <p>Β· Email: email, identifier, username, login<br> Β· Phone: phone, mobile, msisdn, number, identifier, phoneNumber<br> Β· Password: password, pass<br> Β· OTP: otp, code, pin</p> <hr> <p>Stage 4: Login Form Submission</p> <p>Purpose: Submit the discovered login form with the user's identity and capture the response for OTP leakage analysis.</p> <p>Capabilities:</p> <p>Β· For each discovered form:<br> Β· Auto-populate fields by type and name:<br> Β· password β entered password or Password123!<br> Β· hidden β original value (preserves CSRF)<br> Β· email β user email or <a href="mailto:test@example.com">test@example.com</a><br> Β· tel/phone-like β user phone or +15551234567<br> Β· otp/code/pin β 000000<br> Β· user/login/identifier β user identity<br> Β· default β user identity<br> Β· Capture a baseline response (cached) for anti-FP comparison<br> Β· Submit and re-capture the actual response<br> Β· Print full request (method, URL, headers, body) and response (status, headers, cookies, body)<br> Β· Extract OTPs, SMS channels, and secrets from response<br> Β· Run header analysis<br> Β· Classify response as success, failure, or unknown with confidence<br> Β· If OTP-like strings found, re-confirm via 2 additional requests<br> Β· If confirmation passes β emit form-otp critical finding<br> Β· If confirmation fails β suppress with anti-FP warning</p> <p>Findings Emitted:</p> <p>Β· form-otp (critical) β OTP leaked in form response (only if confirmed)</p> <hr> <p>Stage 5: Login / Send-OTP Endpoint Probing</p> <p>Purpose: Probe discovered and guessed endpoints to find working OTP send/verify APIs.</p> <p>Candidate Sources:</p> <p>Β· All discovered endpoints matching: login, signin, sign-in, otp, send, verify, auth, resend, sms, call, register<br> Β· Plus 20+ hardcoded common paths:<br> </p> <div class="highlight"><pre class="highlight plaintext"><code> /login, /signin, /api/login, /api/auth/login /api/otp/send, /api/otp/verify, /api/auth/otp/send, /api/auth/otp/verify /send-otp, /verify-otp, /api/v1/otp/send, /api/v1/otp/verify /api/v1/auth/otp, /api/sms/send, /api/otp/resend, /api/auth/send-otp /api/auth/signin, /auth/otp, /api/user/login </code></pre></div> <p></p> <p>Capabilities:</p> <p>Β· For each candidate, try both POST and GET (in that order, stop at first response)<br> Β· Skip 404 and 5xx responses automatically<br> Β· Capture baseline before actual request<br> Β· Print full request/response for any interesting response<br> Β· Detect OTPs, SMS channels, secrets<br> Β· Run header analysis<br> Β· Classify verdict<br> Β· Confirm any OTP leak before flagging<br> Β· Emit channel finding if SMS channel confirmed with success verdict</p> <p>Findings Emitted:</p> <p>Β· endpoint-otp (critical) β OTP leaked from endpoint (only if confirmed)<br> Β· channel (info) β SMS/voice channel confirmed</p> <hr> <p>Stage 6: Sender / Receiver / Channel Validation</p> <p>Purpose: Run the full OTP send flow and analyze delivery telemetry.</p> <p>Capabilities:</p> <p>Β· Select up to 12 send-related endpoints<br> Β· For each:<br> Β· Capture baseline<br> Β· POST identity payload<br> Β· Print request/response<br> Β· Run header analysis<br> Β· Classify verdict<br> Β· Detect OTPs in response<br> Β· Confirm OTP leak<br> Β· Extract From, Sender headers<br> Β· Extract SMS provider fingerprints<br> Β· Print DELIVERY ANALYSIS block:<br> </p> <div class="highlight"><pre class="highlight plaintext"><code>βΈ DELIVERY ANALYSIS Receiver : +8801111356732 Country : Bangladesh (BD) +880 Sender : Twilio Channel : ['twilio', 'sms'] OTP value: ['482913'] Endpoint : https://target.example.com/api/otp/send Verdict : success (success kw=3, conf=0.90) </code></pre></div> <p></p> <p>Β· Emit delivery-leak critical finding with full telemetry</p> <p>Findings Emitted:</p> <p>Β· delivery-leak (critical) β OTP visible in send-response (only if confirmed)</p> <hr> <p>Stage 7: OTP Verify Bypass Matrix</p> <p>Purpose: Test 39 payload/header combinations against OTP verification endpoints to find server-side bypass flaws.</p> <p>Verify Endpoint Sources:</p> <p>Β· Discovered endpoints matching: verify, validate, check, confirm<br> Β· Fallback: /api/otp/verify, /verify-otp, /api/auth/otp/verify</p> <p>Payloads Tested (13 types):</p> <p>Label Value Rationale<br> empty "" Empty string bypass<br> null None Type confusion<br> zero 0 Zero bypass<br> true True Boolean bypass<br> neg -1 Negative integer<br> overflow 99999999999 Integer overflow<br> nullbyte "000000\x00" Null byte truncation<br> star "*" Wildcard match<br> spaces " " Whitespace trim<br> array ["000000"] Array type confusion<br> object {"v":"000000"} Object type confusion<br> hpp "000000&otp=111111" HTTP parameter pollution<br> baseline "123456" Control sample</p> <p>Header Variants (3):</p> <p>Label Headers Rationale<br> baseline {} Control<br> xff X-Forwarded-For: 127.0.0.1, X-Originating-IP: 127.0.0.1 IP spoofing / trusted bypass<br> debug X-Debug: 1, X-Requested-With: XMLHttpRequest Debug mode / AJAX</p> <p>Total: 13 Γ 3 = 39 bypass attempts per verify endpoint, up to 5 endpoints = 195 attempts.</p> <p>Capabilities:</p> <p>Β· Establish baseline failure state (with bogus OTP BOGUS000)<br> Β· For each combination:<br> Β· Submit and capture<br> Β· Classify verdict<br> Β· Compare response status and body vs baseline<br> Β· Print color-coded line (green = success, red = failure, yellow = unknown)<br> Β· If a combination returns success with differs=True and conf β₯ 0.6:<br> Β· Print full request/response<br> Β· Emit bypass critical finding with payload + header variant metadata</p> <p>Findings Emitted:</p> <p>Β· bypass (critical) β OTP bypass confirmed</p> <p>Console Output Example:<br> </p> <div class="highlight"><pre class="highlight plaintext"><code>ββββββββ STAGE 7: OTP VERIFY BYPASS MATRIX (confirmed) ββββββββ Baseline failure sample at https://target.example.com/api/otp/verify β 400 failure empty /baseline https://.../verify β 400 (differs=False, conf=0.95) failure null /baseline https://.../verify β 400 (differs=False, conf=0.95) unknown zero /baseline https://.../verify β 500 (differs=True, conf=0.20) success true /xff https://.../verify β 200 (differs=True, conf=0.70) ... </code></pre></div> <p></p> <hr> <p>Stage 8: WebSocket Channel Observation</p> <p>Purpose: Connect to discovered WebSockets and observe frames for OTP leakage.</p> <p>Capabilities:</p> <p>Β· Connect to up to 3 discovered WebSocket URLs<br> Β· Send a subscription message with identity:<br> </p> <div class="highlight"><pre class="highlight json"><code> <span class="p">{</span><span class="nl">"action"</span><span class="p">:</span> <span class="s2">"subscribe"</span><span class="p">,</span> <span class="nl">"identifier"</span><span class="p">:</span> <span class="s2">"<identity>"</span><span class="p">,</span> <span class="nl">"email"</span><span class="p">:</span> <span class="s2">"<identity>"</span><span class="p">,</span> <span class="nl">"phone"</span><span class="p">:</span> <span class="s2">"<identity>"</span><span class="p">}</span> </code></pre></div> <p></p> <p>Β· Listen for frames for 10 seconds<br> Β· Print each frame (truncated to 300 chars)<br> Β· Scan each frame for OTP patterns<br> Β· If OTP found β emit ws-leak critical finding</p> <p>Findings Emitted:</p> <p>Β· ws-leak (critical) β OTP in WebSocket frame</p> <hr> <p>π― OTP Detection Patterns</p> <p>Session-X uses 10 regex patterns to detect OTPs, targeting both structured API responses and freeform text:</p> <h1> <a name="pattern-target" href="#pattern-target" class="anchor"> </a> Pattern Target </h1> <p>1 "(?:otp|code|pin|token|...)"\s*:\s*"?([0-9A-Za-z-]{4,10})"? JSON fields<br> 2 (?:otp|code|...)=([0-9A-Za-z-]{4,10}) Query strings<br> 3 (?:otp|code|...)\s*(?:is|:|=|->)\s*([0-9A-Za-z-]{4,10}) Prose<br> 4 <input[^>]+(?:otp|code|pin)[^>]+value=<a href="https://dev.to[0-9A-Za-z-]{4,10}">"'</a>["'] HTML attributes<br> 5 name=<a href="https://dev.to?:otp|code|pin|verification_code">"'</a>["'][^>]+value=<a href="https://dev.to[0-9A-Za-z-]{4,10}">"'</a>["'] HTML attributes<br> 6 (?:var|let|const)\s+(?:otp|code|...)\s*=\s*["']?([0-9A-Za-z-]{4,10})["']? JS variables<br> 7 \b\d{3}[-\s]\d{3}\b XXX-XXX / XXX XXX<br> 8 \b[A-Z0-9]{2}-[A-Z0-9]{2}-[A-Z0-9]{2}\b XX-XX-XX<br> 9 \b\d{8}\b, \b\d{7}\b, \b\d{6}\b, \b\d{5}\b, \b\d{4}\b Numeric codes</p> <p>Filters:</p> <p>Β· Length must be 4β10<br> Β· Rejected as year: 19XX / 20XX (e.g., 2024, 1999)<br> Β· Deduplicated via set</p> <hr> <p>π Secret Scanning</p> <p>Type Regex Severity<br> AWS Key AKIA[0-9A-Z]{16} critical<br> Google API AIza[0-9A-Za-z-<em>]{35} high<br> Firebase firebase[a-z]<em>["\']?\s</em>[:=]\s*<a href="https://dev.to[^"']{20,}">"\'</a> high<br> Twilio SID AC[a-f0-9]{32} high<br> JWT eyJ........... high<br> Stripe Live sk_live</em>[0-9a-zA-Z]{24,} critical<br> SendGrid SG.[...]{22}.[...]{43} critical<br> HMAC (?:hmac|signing|otp)[\s_]?secret["\']?\s*[:=]\s*<a href="https://dev.to[A-Za-z0-9+/=]{16,}">"\'</a> high</p> <p>Secret values are truncated to 200 chars in findings (full value up to 5000 in evidence).</p> <hr> <p>π‘ SMS Provider Fingerprinting</p> <p>Session-X identifies OTP delivery providers from response bodies and JS bundles:</p> <p>Providers Detected:</p> <p>Β· twilio β Twilio<br> Β· nexmo / vonage β Vonage<br> Β· messagebird β MessageBird<br> Β· plivo β Plivo<br> Β· sinch β Sinch<br> Β· gupshup β Gupshup<br> Β· msg91 β MSG91<br> Β· aws sns / aws.sns β AWS SNS<br> Β· kaleyra β Kaleyra<br> Β· infobip β Infobip<br> Β· clickatell β Clickatell<br> Β· firebase β Firebase</p> <p>Channels Detected:</p> <p>Β· sms β SMS<br> Β· missed-call / missed call β Missed call OTP<br> Β· voice-otp / voice otp β Voice OTP<br> Β· ivr β IVR call<br> Β· flash-call / flash call β Flash call<br> Β· whatsapp β WhatsApp<br> Β· telegram β Telegram</p> <hr> <p>π‘οΈ Security Analysis Modules</p> <p>Security Header Audit</p> <p>Header Finding if Missing Severity<br> Strict-Transport-Security Missing HSTS β TLS downgrade risk low<br> Content-Security-Policy Missing CSP β XSS risk low<br> X-Frame-Options Missing X-Frame-Options β clickjacking risk low<br> X-Content-Type-Options Missing X-Content-Type-Options β MIME sniffing risk low<br> Referrer-Policy Missing Referrer-Policy β referrer leakage low<br> Permissions-Policy Missing Permissions-Policy low</p> <p>Cookie Security Audit</p> <p>For every Set-Cookie:</p> <p>Β· No Secure flag β medium (unless site is HTTP)<br> Β· No HttpOnly flag β medium<br> Β· No SameSite β low</p> <p>CORS Misconfiguration</p> <p>Β· Access-Control-Allow-Origin: * AND Access-Control-Allow-Credentials: true β high severity finding</p> <p>Response Header OTP Leak</p> <p>Detects OTPs in these headers:</p> <p>Β· X-OTP<br> Β· X-Verification-Code<br> Β· X-SMS-Code<br> Β· X-Debug-OTP</p> <p>Any hit β critical finding.</p> <hr> <p>π£ Bypass Payload Matrix</p> <p>Session-X's verify bypass matrix tests 39 combinations per endpoint:<br> </p> <div class="highlight"><pre class="highlight plaintext"><code> baseline xff debug empty β β β null β β β zero β β β true β β β neg β β β overflow β β β nullbyte β β β star β β β spaces β β β array β β β object β β β hpp β β β baseline β β β </code></pre></div> <p></p> <p>Confirmation Criteria:</p> <p>Β· Verdict = success<br> Β· Status code differs from baseline OR body differs from baseline<br> Β· Confidence β₯ 0.6</p> <p>All three criteria must pass to emit a finding.</p> <hr> <p>π§ͺ Anti-False-Positive Engine</p> <p>Session-X was built to eliminate noise. Every OTP leak is confirmed twice before being reported.</p> <p>How the Confirmer Works</p> <ol> <li>First detection: OTP(s) extracted from response</li> <li>Re-confirmation loop (2 additional requests): Β· Re-submit the same request Β· Extract OTPs from second response Β· Intersect with previous set Β· If intersection becomes empty β suppress entirely</li> <li>Result: Only OTPs that appear in every response are reported</li> </ol> <p>Body Diff Algorithm (for bypass detection)</p> <p>Β· Tokenize body into 4+ char word fragments<br> Β· Compute Jaccard similarity<br> Β· If similarity < 0.35 β "differs" = true<br> Β· Prevents false positives from session tokens or cache noise</p> <p>Classification Confidence Scoring</p> <p>Condition Verdict Confidence<br> HTTP 401/403/422/429 failure 0.95<br> HTTP 5xx unknown 0.20<br> Identical to baseline unknown 0.30<br> 2+ success keywords, 0 fail, 2xx success 0.60β0.95<br> 1+ fail keywords, 0 success failure 0.60β0.95<br> fail > success failure 0.60<br> success > fail success 0.50<br> Tie unknown 0.20</p> <p>Success Keywords: success, verified, welcome, dashboard, logged in, authenticated, valid, accepted, redirecting, access_token, session, logged-in, signed in, otp verified, verified successfully, authorized, otp sent, code sent, sent successfully, otp has been sent, check your, login successful, authentication successful</p> <p>Failure Keywords: invalid, wrong, incorrect, expired, failed, denied, try again, mismatch, error, blocked, locked, not found, unauthorized, bad request, does not match, not valid, invalid otp, invalid code, wrong otp, wrong code, expired otp, otp expired, verification failed, authentication failed, login failed</p> <hr> <p>π Country Support</p> <p>Session-X ships with a 200+ country dialing code database covering:</p> <p>Β· All African nations (54)<br> Β· All Asian nations (49)<br> Β· All European nations (44)<br> Β· All North American nations (23)<br> Β· All South American nations (12)<br> Β· All Oceanian nations (14)<br> Β· Caribbean and island territories</p> <p>Sample:</p> <p>Code Country Dial<br> BD Bangladesh +880<br> US United States +1<br> GB United Kingdom +44<br> IN India +91<br> PK Pakistan +92<br> NG Nigeria +234<br> BR Brazil +55<br> DE Germany +49<br> FR France +33<br> JP Japan +81<br> CN China +86<br> RU Russia +7<br> ZA South Africa +27<br> EG Egypt +20<br> MX Mexico +52<br> ... ... ...</p> <p>Entry Options:</p> <p>Β· By serial number (1β200+)<br> Β· By ISO code (BD, US, GB)</p> <p>Formatting:</p> <p>Β· Strips non-digits<br> Β· Removes leading 0<br> Β· Prepends dial code<br> Β· Returns E.164 format (e.g., +8801111356732)</p> <hr> <p>π Output Format</p> <p>All results are written to otp_reports/ with three timestamped files:</p> <ol> <li>report_YYYYMMDD_HHMMSS.json</li> </ol> <p>Full structured report:<br> </p> <div class="highlight"><pre class="highlight json"><code><span class="p">{</span> <span class="nl">"target"</span><span class="p">:</span> <span class="s2">"https://target.example.com"</span><span class="p">,</span> <span class="nl">"identity"</span><span class="p">:</span> <span class="s2">"+8801111356732"</span><span class="p">,</span> <span class="nl">"identity_type"</span><span class="p">:</span> <span class="s2">"phone"</span><span class="p">,</span> <span class="nl">"country"</span><span class="p">:</span> <span class="p">{</span><span class="nl">"name"</span><span class="p">:</span> <span class="s2">"Bangladesh"</span><span class="p">,</span> <span class="nl">"code"</span><span class="p">:</span> <span class="s2">"BD"</span><span class="p">,</span> <span class="nl">"dial"</span><span class="p">:</span> <span class="s2">"+880"</span><span class="p">}</span><span class="p">,</span> <span class="nl">"ts"</span><span class="p">:</span> <span class="s2">"2024-01-15T12:34:56Z"</span><span class="p">,</span> <span class="nl">"discovered"</span><span class="p">:</span> <span class="p">{</span> <span class="nl">"scripts"</span><span class="p">:</span> <span class="p">[</span><span class="s2">"https://.../app.js"</span><span class="p">,</span> <span class="s2">"..."</span><span class="p">]</span><span class="p">,</span> <span class="nl">"endpoints"</span><span class="p">:</span> <span class="p">[</span><span class="s2">"/api/v1/otp/send"</span><span class="p">,</span> <span class="s2">"/api/v1/otp/verify"</span><span class="p">,</span> <span class="s2">"..."</span><span class="p">]</span><span class="p">,</span> <span class="nl">"websockets"</span><span class="p">:</span> <span class="p">[</span><span class="s2">"wss://target.example.com/ws"</span><span class="p">]</span><span class="p">,</span> <span class="nl">"api_hosts"</span><span class="p">:</span> <span class="p">[</span><span class="s2">"api.target.example.com"</span><span class="p">]</span><span class="p">,</span> <span class="nl">"origins"</span><span class="p">:</span> <span class="p">[</span><span class="s2">"target.example.com"</span><span class="p">]</span> <span class="p">}</span><span class="p">,</span> <span class="nl">"http_history_count"</span><span class="p">:</span> <span class="mi">142</span><span class="p">,</span> <span class="nl">"findings"</span><span class="p">:</span> <span class="p">[</span> <span class="p">{</span> <span class="nl">"id"</span><span class="p">:</span> <span class="s2">"F001"</span><span class="p">,</span> <span class="nl">"kind"</span><span class="p">:</span> <span class="s2">"bypass"</span><span class="p">,</span> <span class="nl">"severity"</span><span class="p">:</span> <span class="s2">"critical"</span><span class="p">,</span> <span class="nl">"title"</span><span class="p">:</span> <span class="s2">"OTP bypass confirmed (empty/xff) at https://..."</span><span class="p">,</span> <span class="nl">"detail"</span><span class="p">:</span> <span class="s2">"Baseline status=400; bypass status=200; reason=..."</span><span class="p">,</span> <span class="nl">"evidence"</span><span class="p">:</span> <span class="s2">"..."</span><span class="p">,</span> <span class="nl">"extra"</span><span class="p">:</span> <span class="p">{</span><span class="nl">"endpoint"</span><span class="p">:</span> <span class="s2">"..."</span><span class="p">,</span> <span class="nl">"payload"</span><span class="p">:</span> <span class="s2">"empty"</span><span class="p">,</span> <span class="nl">"headers"</span><span class="p">:</span> <span class="s2">"xff"</span><span class="p">}</span><span class="p">,</span> <span class="nl">"confidence"</span><span class="p">:</span> <span class="mf">0.95</span><span class="p">,</span> <span class="nl">"ts"</span><span class="p">:</span> <span class="s2">"2024-01-15T12:35:12Z"</span> <span class="p">}</span> <span class="p">]</span> <span class="p">}</span> </code></pre></div> <p></p> <ol> <li>report_YYYYMMDD_HHMMSS.md</li> </ol> <p>Human-readable Markdown report:</p> <p>Β· Executive summary<br> Β· Identity + target metadata<br> Β· Discovered surface (scripts, endpoints, WS, hosts)<br> Β· Findings ranked by severity (critical β info)<br> Β· Each finding includes evidence block</p> <ol> <li>raw_http_YYYYMMDD_HHMMSS.txt</li> </ol> <p>Forensic-grade HTTP exchange log:<br> </p> <div class="highlight"><pre class="highlight plaintext"><code>===== EXCHANGE 1 (2024-01-15T12:34:56Z) ===== POST /api/v1/otp/send HTTP/1.1 Host: target.example.com User-Agent: Mozilla/5.0 ... Content-Type: application/json Content-Length: 87 {"phone": "+8801111356732", "identifier": "+8801111356732"} HTTP/1.1 200 OK Content-Type: application/json Server: nginx X-OTP: 482913 Content-Length: 64 {"success": true, "message": "OTP sent", "code": "482913"} </code></pre></div> <p></p> <hr> <p>ποΈ Architecture</p> <p>Module Layout<br> </p> <div class="highlight"><pre class="highlight plaintext"><code>sessionx.py βββ Banner & UI β βββ banner() β ASCII art + metadata β βββ hr() β Horizontal rule helper β βββ prompt() β Safe input() βββ Data β βββ COUNTRIES[] β 200+ country dial codes β βββ OTP_RE[] β 10 OTP detection patterns β βββ SMS_RE[] β SMS/channel patterns β βββ SECRETS{} β 8 secret regexes β βββ API_RE β API endpoint pattern β βββ URL_RE β Full URL pattern β βββ WS_RE β WebSocket URL pattern β βββ SUCCESS_KW[] β Success keyword list β βββ FAIL_KW[] β Failure keyword list βββ Utilities β βββ find_otps() β OTP extractor β βββ find_sms() β Channel extractor β βββ find_secrets() β Secret extractor β βββ safe_json() β Safe serializer β βββ analyze_headers() β Header audit β βββ raw_http_req() β Request formatter β βββ raw_http_resp() β Response formatter β βββ print_request()/print_response() βββ Classes β βββ Confirmer β Anti-FP engine β βββ Session β HTTP session wrapper β βββ Logger β Findings collector β βββ Hunter β Main orchestrator β βββ find_login_page() β βββ harvest_js() β βββ prompt_credentials() β βββ submit_login_form() β βββ probe_login_endpoints() β βββ trace_sender_receiver() β βββ bypass_verify() β βββ observe_websockets() β βββ report() βββ main() β CLI entry point </code></pre></div> <p></p> <p>Data Flow<br> </p> <div class="highlight"><pre class="highlight plaintext"><code>User Input β Hunter(target) β Stage 1 β Stage 2 β Stage 3 β Stage 4 β Stage 5 β Stage 6 β Stage 7 β Stage 8 β Logger.findings[] + Session.history[] β report() β JSON + MD + Raw HTTP </code></pre></div> <p></p> <hr> <p>βοΈ Configuration</p> <p>Tuning Parameters (in main())<br> </p> <div class="highlight"><pre class="highlight python"><code><span class="n">h</span> <span class="o">=</span> <span class="nc">Hunter</span><span class="p">(</span><span class="n">target</span><span class="p">,</span> <span class="n">delay</span><span class="o">=</span><span class="mf">0.3</span><span class="p">)</span> </code></pre></div> <p></p> <p>Parameter Default Description<br> delay 0.3 Sleep between requests (anti-rate-limit)<br> proxy None HTTP(S) proxy (<a href="http://127.0.0.1:8080">http://127.0.0.1:8080</a>)<br> auth None Authorization header value<br> cookie None Cookie header value<br> headers None Semicolon-delimited extra headers</p> <p>Custom Proxy Example<br> </p> <div class="highlight"><pre class="highlight python"><code><span class="n">h</span> <span class="o">=</span> <span class="nc">Hunter</span><span class="p">(</span> <span class="n">target</span><span class="p">,</span> <span class="n">proxy</span><span class="o">=</span><span class="s2">"http://127.0.0.1:8080"</span><span class="p">,</span> <span class="n">auth</span><span class="o">=</span><span class="s2">"Bearer eyJhbGciOiJIUzI1NiIs..."</span><span class="p">,</span> <span class="n">cookie</span><span class="o">=</span><span class="s2">"session=abc123; csrftoken=xyz"</span><span class="p">,</span> <span class="n">headers</span><span class="o">=</span><span class="s2">"X-Custom: value; X-Debug: 1"</span><span class="p">,</span> <span class="n">delay</span><span class="o">=</span><span class="mf">0.5</span> <span class="p">)</span> </code></pre></div> <p></p> <p>Report Directory</p> <p>Change via:<br> </p> <div class="highlight"><pre class="highlight python"><code><span class="n">h</span><span class="p">.</span><span class="nf">report</span><span class="p">(</span><span class="s2">"my_custom_reports_dir"</span><span class="p">)</span> </code></pre></div> <p></p> <hr> <p>π©Ί Troubleshooting</p> <p>Issue Cause Fix<br> ModuleNotFoundError: requests Missing deps pip install requests urllib3 beautifulsoup4 lxml websocket-client colorama<br> websocket-client not installed Missing websocket pip install websocket-client<br> SSL warnings flooding urllib3 Already suppressed in code<br> Target unreachable DNS/network Check URL, use http:// if no SSL<br> No forms detected SPA site Tool falls back to endpoint probing<br> No WebSockets discovered Static scan found none Tool skips Stage 8<br> All bypasses fail WAF/strong target Expected β tool tests, doesn't guarantee bypass<br> OTP strings suppressed Anti-FP rejected Increase tries in conf.confirm_otp_leak()<br> Rate limited Aggressive target Increase delay to 1.0+</p> <p>Enable Debug Logging</p> <p>Add at top of sessionx.py:<br> </p> <div class="highlight"><pre class="highlight python"><code><span class="k">import</span> <span class="n">logging</span> <span class="n">logging</span><span class="p">.</span><span class="nf">basicConfig</span><span class="p">(</span><span class="n">level</span><span class="o">=</span><span class="n">logging</span><span class="p">.</span><span class="no">DEBUG</span><span class="p">)</span> </code></pre></div> <p></p> <hr> <p>π Legal Disclaimer<br> </p> <div class="highlight"><pre class="highlight plaintext"><code>ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β LEGAL NOTICE β β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ£ β Session-X is provided for AUTHORIZED SECURITY TESTING ONLY. β β β β Unauthorized use of this tool against systems you do not β β own or have explicit WRITTEN permission to test is β β ILLEGAL in most jurisdictions, including but not limited β β to: β β β β β’ United States β Computer Fraud and Abuse Act (CFAA) β β β’ United Kingdom β Computer Misuse Act 1990 β β β’ European Union β Directive 2013/40/EU β β β’ Bangladesh β Digital Security Act 2018 β β β’ India β IT Act 2000, Section 66 β β β β By using this tool, you agree: β β β β 1. You have written authorization for the target. β β 2. You accept full legal responsibility. β β 3. The author is NOT liable for your actions. β β 4. You will not use this for malicious purposes. β β 5. You will respect the target's terms of service. β β β β This tool performs ACTIVE testing. It WILL be logged by β β the target. Use a VPN, rotate infrastructure, and follow β β your engagement's rules of engagement. β β β β If you do not have authorization, PRESS CTRL+C NOW. β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ </code></pre></div> <p></p> <p>Ethical Use Guidelines</p> <ol> <li>Always obtain written permission before testing</li> <li>Stay within scope defined in your engagement contract</li> <li>Report vulnerabilities responsibly to the target owner</li> <li>Do not exfiltrate data beyond what's needed to prove the finding</li> <li>Do not use leaked OTPs to access accounts you don't own</li> <li>Follow the target's disclosure policy (e.g., bug bounty program rules)</li> </ol> <hr> <p>π Credits</p> <div align="center"> Session-X Full-Stack OTP Exploitation & Server-Side OTP Bypass Toolkit Author: SYLHETYHACKVENGER (THE-ERROR808) --- Built with precision. Tested with discipline. Reported with integrity. </div> <hr> <p>π Appendix A: Finding Types Reference</p> <p>Kind Severity Trigger Evidence Contains<br> header low Missing security header Full headers JSON<br> cookie medium/low Weak cookie flags Cookie value<br> cors high ACAO=* + ACAC=true Full headers JSON<br> header-leak critical OTP in X-OTP etc. Full headers JSON<br> js-secret high Secret in JS bundle JS snippet<br> map-secret high Secret in source map Source content<br> inline-secret high Secret in inline script Script snippet<br> html-secret critical Secret in index.html HTML snippet<br> csrf medium POST form no CSRF Form inputs<br> form-otp critical OTP leaked in form response Response body<br> endpoint-otp critical OTP leaked from probed endpoint Response body<br> channel info SMS channel confirmed Response body<br> delivery-leak critical OTP visible in send-response Response + telemetry<br> bypass critical Verify bypass confirmed Response body<br> ws-leak critical OTP in WebSocket frame Frame content</p> <hr> <p>π Appendix B: Endpoint Guess List</p> <p>Session-X probes the following paths if JS harvesting doesn't surface enough:<br> </p> <div class="highlight"><pre class="highlight plaintext"><code>/login /signin /api/login /api/auth/login /api/otp/send /api/otp/verify /api/auth/otp/send /api/auth/otp/verify /send-otp /verify-otp /api/v1/otp/send /api/v1/otp/verify /api/v1/auth/otp /api/sms/send /api/otp/resend /api/auth/send-otp /api/auth/signin /auth/otp /api/user/login </code></pre></div> <p></p> <p>For send-OTP stage, additionally:<br> </p> <div class="highlight"><pre class="highlight plaintext"><code>/api/otp/send /api/auth/otp/send /send-otp /api/v1/otp/send /api/sms/send /api/otp/resend </code></pre></div> <p></p> <p>For verify stage fallback:<br> </p> <div class="highlight"><pre class="highlight plaintext"><code>/api/otp/verify /verify-otp /api/auth/otp/verify </code></pre></div> <p></p> <hr> <p>π Appendix C: Sample Findings</p> <p>Critical β OTP Bypass Confirmed<br> </p> <div class="highlight"><pre class="highlight plaintext"><code>[CRITICAL] OTP bypass confirmed (empty/xff) at https://target.example.com/api/otp/verify Baseline status=400; bypass status=200; reason=success kw=3 </code></pre></div> <p></p> <p>Evidence:<br> </p> <div class="highlight"><pre class="highlight json"><code><span class="p">{</span> <span class="nl">"endpoint"</span><span class="p">:</span> <span class="s2">"https://target.example.com/api/otp/verify"</span><span class="p">,</span> <span class="nl">"payload"</span><span class="p">:</span> <span class="s2">"empty"</span><span class="p">,</span> <span class="nl">"headers"</span><span class="p">:</span> <span class="s2">"xff"</span><span class="p">,</span> <span class="nl">"confidence"</span><span class="p">:</span> <span class="mf">0.90</span> <span class="p">}</span> </code></pre></div> <p></p> <p>Critical β Delivery Leak<br> </p> <div class="highlight"><pre class="highlight plaintext"><code>[CRITICAL] OTP visible in send-response from https://target.example.com/api/otp/send Receiver=+8801111356732 Country=BD OTPs=['482913'] Channel=['twilio'] Sender=Twilio </code></pre></div> <p></p> <p>High β Wildcard CORS<br> </p> <div class="highlight"><pre class="highlight plaintext"><code>[HIGH] Wildcard CORS + credentials ACAO=* + ACAC=true </code></pre></div> <p></p> <p>High β AWS Key in JS<br> </p> <div class="highlight"><pre class="highlight plaintext"><code>[HIGH] Secrets in JS: https://target.example.com/app.js {"aws_key": ["AKIA..."]} </code></pre></div> <p></p> <p>Medium β CSRF Missing<br> </p> <div class="highlight"><pre class="highlight plaintext"><code>[MEDIUM] Login form without CSRF token: https://target.example.com/login POST form has no CSRF field </code></pre></div> <p></p> <hr> <p>π Appendix D: Supported Secret Types<br> </p> <div class="highlight"><pre class="highlight plaintext"><code>βββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββββββββββ β Type β Regex Signature β βββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββββββββββ€ β AWS Key β AKIA[0-9A-Z]{16} β β Google API β AIza[0-9A-Za-z\-_]{35} β β Firebase β firebase[a-z]*["\']?\s*[:=]\s*["\'](...) β β Twilio SID β AC[a-f0-9]{32} β β JWT β eyJ...\....\.... β β Stripe Live β sk_live_[0-9a-zA-Z]{24,} β β SendGrid β SG\.[...]{22}\.[...]{43} β β HMAC Secret β (?:hmac|signing|otp)secret...(16+ chars) β βββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββββββββββββ </code></pre></div> <p></p> <hr> <p>π Appendix E: Version History</p> <p>Version Date Changes<br> 1.0.0 Current Initial release β full 8-stage assessment</p> <hr> <div align="center"> β If Session-X helped your assessment, star the repo! β Stay legal. Stay sharp. Stay dangerous. For authorized security testing only. </div>

Top comments (0)