DEV Community

Cover image for SessionX is a powerful full-stack OTP security testing toolkit to explore authentication weaknesses, server-side bypass vulnerabilities.

SessionX is a powerful full-stack OTP security testing toolkit to explore authentication weaknesses, server-side bypass vulnerabilities.

Session-X πŸ›‘οΈ: Full-Stack OTP Exploitation & Server-Side OTP Bypass Toolkit

Session-X
Security Research
Open Source
Stars
Forks
Issues
Last Commit

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.
Enter fullscreen mode Exit fullscreen mode

πŸ“‹ Table of Contents

  1. Description Overview
  2. Key Features
  3. Fire Description
  4. Requirements
  5. Installation
  6. Quick Start
  7. Usage
  8. 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
  9. OTP Detection Patterns
  10. Secret Scanning
  11. SMS Provider Fingerprinting
  12. Security Analysis Modules
  13. Bypass Payload Matrix
  14. Anti-False-Positive Engine
  15. Country Support
  16. Output Format
  17. Architecture
  18. Configuration
  19. Troubleshooting
  20. Legal Disclaimer
  21. 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
Enter fullscreen mode Exit fullscreen mode

πŸš€ 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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

Verify Installation

python3 -c "import requests, urllib3, bs4, lxml, websocket, colorama; print('βœ“ All dependencies installed')"
Enter fullscreen mode Exit fullscreen mode

⚑ 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/
Enter fullscreen mode Exit fullscreen mode

Banner 2

🎯 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                                   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
Enter fullscreen mode Exit fullscreen mode

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
...
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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

elements and their input fields
Β· 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 &gt;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&#39;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 &quot;&quot; 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 &quot;000000\x00&quot; Null byte truncation<br> star &quot;*&quot; Wildcard match<br> spaces &quot; &quot; Whitespace trim<br> array [&quot;000000&quot;] Array type confusion<br> object {&quot;v&quot;:&quot;000000&quot;} Object type confusion<br> hpp &quot;000000&amp;otp=111111&quot; HTTP parameter pollution<br> baseline &quot;123456&quot; 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">"&lt;identity&gt;"</span><span class="p">,</span> <span class="nl">"email"</span><span class="p">:</span> <span class="s2">"&lt;identity&gt;"</span><span class="p">,</span> <span class="nl">"phone"</span><span class="p">:</span> <span class="s2">"&lt;identity&gt;"</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 &quot;(?:otp&#124;code&#124;pin&#124;token&#124;...)&quot;\s*:\s*&quot;?([0-9A-Za-z-]{4,10})&quot;? JSON fields<br> 2 (?:otp&#124;code&#124;...)=([0-9A-Za-z-]{4,10}) Query strings<br> 3 (?:otp&#124;code&#124;...)\s*(?:is&#124;:&#124;=&#124;-&gt;)\s*([0-9A-Za-z-]{4,10}) Prose<br> 4 <input[^>]+(?:otp&#124;code&#124;pin)[^&gt;]+value=<a href="https://dev.to[0-9A-Za-z-]{4,10}">&quot;&#39;</a>[&quot;&#39;] HTML attributes<br> 5 name=<a href="https://dev.to?:otp&#124;code&#124;pin&#124;verification_code">&quot;&#39;</a>[&quot;&#39;][^&gt;]+value=<a href="https://dev.to[0-9A-Za-z-]{4,10}">&quot;&#39;</a>[&quot;&#39;] HTML attributes<br> 6 (?:var&#124;let&#124;const)\s+(?:otp&#124;code&#124;...)\s*=\s*[&quot;&#39;]?([0-9A-Za-z-]{4,10})[&quot;&#39;]? 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>[&quot;\&#39;]?\s</em>[:=]\s*<a href="https://dev.to[^&quot;']{20,}">&quot;\&#39;</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&#124;signing&#124;otp)[\s_]?secret[&quot;\&#39;]?\s*[:=]\s*<a href="https://dev.to[A-Za-z0-9+/=]{16,}">&quot;\&#39;</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&#39;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 &lt; 0.35 β†’ &quot;differs&quot; = 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 &gt; success failure 0.60<br> success &gt; 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 &amp; 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&#39;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&#39;s needed to prove the finding</li> <li>Do not use leaked OTPs to access accounts you don&#39;t own</li> <li>Follow the target&#39;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&#39;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)