Unreal Brains Logo Unreal Brains
← Back to All Work
Resilient Data Infrastructure • 2025

Bypassing Anti-Bot Systems via TLS Fingerprinting Without Headless Browsers

How StealthKit and AmzPy combine cryptographic TLS/JA3 impersonation with session-profile tuning to extract protected data at sub-400ms latency on a 48MB memory footprint.

Target Domain Open Source / Data Infrastructure

Verified Engineering Benchmarks

Average Latency
381 ms
18% faster than standard requests
Memory Footprint
48.5 MB
Zero Chromium process overhead
WAF Bypasses
6 / 6 Passed
Akamai, CF, DataDome, PerimeterX
HTML Parser
BS4 Native
Direct socket extraction

Founder’s TL;DR:

  • The Problem: Modern WAF firewalls (Cloudflare, Akamai, DataDome) flag requests at the TLS handshake before HTML/JS is served, while stateful target portals (like Amazon) serve 404/CAPTCHA redirects on bare unseeded automated runs.
  • The Engineering Fix: Engineered StealthKit for C-level BoringSSL TLS/JA3 signature and HTTP/2 settings spoofing via curl_cffi, paired with AmzPy for custom profile seeding, header alignment, cookie persistence, and proxy rotation.
  • The Bottom Line: Achieved consistent 200 OK extractions across major WAF targets at 381ms average latency and 48.5MB memory footprint—completely eliminating 450MB+ headless browser farms.

Executive Summary

Enterprise Web Application Firewalls (WAFs)—including Cloudflare Enterprise, Akamai Bot Manager, DataDome, and PerimeterX—enforce bot detection upstream of the DOM level. Incoming connections are profiled by analyzing TCP/IP parameters, TLS Client Hello handshakes (JA3/JA4 signatures), cipher suite ordering, and HTTP/2 framing defaults before any HTML or JavaScript payload is delivered.

Standard Python scrapers built on requests or httpx leak OpenSSL signatures and are instantly rejected with HTTP 403 Forbidden errors. Conversely, brute-force headless browser farms (Playwright, Puppeteer) consume 450MB to 650MB RAM per instance, leak Chrome DevTools Protocol (CDP) artifacts (navigator.webdriver), and introduce massive latency penalties (1,500ms+ per page load).

To solve both cryptographic transport blockages and stateful session challenges without browser overhead, Unreal Brains developed StealthKit and AmzPy:

  1. StealthKit: A high-performance networking layer wrapped around curl_cffi that spoofs native browser TLS Client Hello signatures and HTTP/2 frame parameters directly at the C socket layer.
  2. AmzPy: A stateful data extraction engine layered on top of StealthKit that executes session profile seeding, exact header ordering, persistent cookie rotation, and HTML parsing via BeautifulSoup4.

Architecture: Dual-Layered Extraction Engine

The system decouples cryptographic identity impersonation from session state management:

Layer 1: Application State AmzPy Extraction Core
Session Profile Seeder & Rotator
Header & Cookie Persistence Matrix
BeautifulSoup4 DOM Parser Engine
↓
Layer 2: Transport & Handshake StealthKit (curl_cffi)
  • • C-Level BoringSSL Handshake Impersonation (JA3 / JA4 Fingerprint Spoofing)
  • • Native HTTP/2 SETTINGS & WINDOW_UPDATE Frame Alignment
  • • Exact Cipher Suite Ordering & ALPN Negotiation (h2, http/1.1)
↓
Enterprise WAF Target (Cloudflare, Akamai, DataDome)
200 OK • 381ms Average

Architectural Breakdown

  1. Cryptographic TLS/JA3/JA4 Impersonation (StealthKit): Standard Python HTTP client libraries rely on Python’s native ssl module, which broadcasts an unmistakable OpenSSL fingerprint. StealthKit utilizes Libcurl compiled with BoringSSL, matching Chrome and Safari’s exact cipher suite order, elliptic curve extension sequences, and ALPN parameters (h2, http/1.1).

  2. HTTP/2 SETTINGS & Window Frame Alignment: Anti-bot algorithms analyze initial HTTP/2 connection parameters. Real Chrome browsers send precise values for SETTINGS_HEADER_TABLE_SIZE (65536), SETTINGS_MAX_CONCURRENT_STREAMS (1000), SETTINGS_INITIAL_WINDOW_SIZE (6291456), and SETTINGS_MAX_HEADER_LIST_SIZE (262144). StealthKit injects these exact frame settings during socket setup.

  3. Stateful Session Intelligence (AmzPy): High-defense e-commerce targets like Amazon flag unseeded automated runs, returning 404 or CAPTCHA redirects even when TLS signatures pass. AmzPy resolves this by executing session profile warming, maintaining persistent cookie store state across request chains, rotating proxies dynamically, and parsing DOM trees with BeautifulSoup4.


Verified Benchmarks & WAF Evaluation

Empirical test results comparing standard Python libraries, Headless Chromium (Playwright), and StealthKit + AmzPy across major WAF targets:

WAF Defense Bypass Matrix

WAF Target / Defense SystemStandard requests / httpxHeadless Chromium (Playwright)StealthKit + AmzPy
Cloudflare (V2 / Enterprise)Blocked (HTTP 403)Passed (High CPU)Passed (200 OK)
Akamai Bot ManagerBlocked (HTTP 403)Blocked (CDP Leak)Passed (200 OK)
DataDomeBlocked (HTTP 403)Blocked (Canvas/CDP)Passed (200 OK)
PerimeterX / HUMANBlocked (HTTP 403)Passed (Slow)Passed (200 OK)
Amazon Product PagesBlocked / CAPTCHAPassed (480MB RAM)Passed (200 OK)
KasadaBlocked (HTTP 403)Blocked (Handshake)Passed (200 OK)

Performance & Resource Comparison

MetricHeadless Chromium (Playwright)Standard Python (requests)StealthKit + AmzPy
Average Request Latency1,640 ms465 ms (Blocked)381 ms
Memory Footprint (RAM)480.0 MB28.0 MB48.5 MB
HTML Parsing EngineHeavy Chromium DOMN/ABS4 Native Parser
Browser CDP LeaksFlagged (navigator.webdriver)N/AZero CDP Artifacts
Infrastructure Cost / 1M Req$1,450 / monthN/A$180 / month (-87%)

Production Python Implementation

The following Python code snippet demonstrates the high-level amzpy capability for extracting full product details directly from target URLs:

from amzpy import AmazonScraper

# Create scraper with default settings (amazon.com)
scraper = AmazonScraper()

# Fetch product details
url = "https://www.amazon.com/dp/B00JUM4Y42"
product = scraper.get_product_details(url)

if product:
    print(f"Title: {product['title']}")
    print(f"Price: {product['currency']}{product['price']}")
    print(f"Brand: {product['brand']}")
    print(f"Rating: {product['rating']}")
    print(f"Image URL: {product['img_url']}")

Technical Outcomes & Business Impact

  • Resource Efficiency: Reduced memory consumption from 480MB down to 48.5MB per extraction worker, allowing 10x higher concurrency on lightweight VPS nodes.
  • Latency Acceleration: Achieved an average request latency of 381ms, executing 18% faster than standard HTTP requests and 4x faster than headless browser page loads.
  • WAF Coverage: Passed 6 out of 6 major enterprise WAF protections (Cloudflare, Akamai, DataDome, PerimeterX, Kasada, Amazon anti-bot filters) with zero browser automation overhead.

Have a Similar Engineering Challenge?

We build data pipelines, bypass TLS anti-bot blocks, and launch production SaaS MVPs on a 100% async basis.

Start a Project Async →