CACTI: Captcha Avoidance via Client-side TEE Integration

Yoshimichi Nakatsuka, Ercan Ozturk, Andrew Paverd, Gene Tsudik

TL;DR

CACTI (Captcha Avoidance via Client-side TEE Integration) is a system that allows legitimate users to skip annoying CAPTCHAs by using their device's hardware security features. By generating cryptographic "rate-proofs" within a Trusted Execution Environment (TEE), a user can prove they aren't a bot simply by demonstrating they haven't performed a specific action too frequently, all while maintaining strict user privacy.

What Problem Does This Paper Address?

CAPTCHAs are the "necessary evil" of the web. Designed to distinguish humans from bots, they have become increasingly frustrating as bots get better at solving them using AI or "CAPTCHA farms" (cheap human labor). Furthermore, modern "invisible" solutions like Google’s reCAPTCHA raise significant privacy concerns, as they often rely on tracking user behavior and cookies across the web.

The authors identify a missed opportunity: most modern laptops and smartphones already contain Trusted Execution Environments (TEEs)—like Intel SGX or ARM TrustZone—which are isolated hardware "enclaves" that can run code securely even if the rest of the operating system is compromised. The paper asks: Can we use this hardware-rooted trust to prove a user is legitimate without making them click on fire hydrants?

Methods

The core of CACTI is the rate-proof. Instead of proving "intelligence," a user proves "moderation." If a user can prove they have only visited a site three times in the last hour, they are likely a human, not a bot trying to scrape data or brute-force a login.

Key technical components include:

  • TEE-Based Rate-Proofs: The TEE maintains a secure, tamper-proof list of timestamps for specific actions. When a server challenges the user, the TEE generates a signed statement (the rate-proof) confirming the user is below a certain threshold.
  • Storage Optimization: TEEs have very limited secure memory. CACTI uses a combination of Hash Chains and Merkle Hash Trees (MHT) to store the bulk of the timestamp data in an untrusted local database (SQLite) while keeping only a small "root" hash inside the TEE to ensure the data hasn't been rolled back or modified.
  • Privacy-Preserving Attestation: To prevent servers from tracking individual hardware IDs, CACTI uses Group Signatures (specifically Intel’s EPID). This allows a server to verify that a proof came from a genuine TEE without knowing which specific device sent it.
  • Implementation: The authors built a proof-of-concept using a Chrome browser extension, a native host application, and an Intel SGX enclave.

Datasets

The paper does not use a traditional machine learning training dataset. Instead, it evaluates the system using:

  • Open-source CAPTCHA libraries: dchest/captcha and produck/svg-captcha were used to establish a baseline for server-side processing time.
  • Real-world Traffic Analysis: The authors measured the bandwidth and network behavior of Google’s reCAPTCHA to compare it against CACTI’s overhead.
  • Synthetic Benchmarks: Performance was tested across varying scales, such as 10,000 timestamps in a single list or 4,096 different lists, to ensure the system scales to heavy web users.

Key Insights and Ideas

  • From Intelligence to Economics: Traditional CAPTCHAs try to find a task bots can't do. CACTI shifts the focus to rate-limiting. By making it impossible for a single TEE to generate proofs at a high frequency, it forces botnets to buy more hardware, significantly increasing the cost of an attack.
  • The "Express Checkout" Model: CACTI isn't meant to be a total replacement. If a user doesn't have a TEE or exceeds their "human" rate, the system simply falls back to a standard CAPTCHA.
  • Solving the TEE Storage Gap: The use of Merkle Hash Trees to manage "infinite" timestamps outside the TEE while maintaining hardware-level integrity is a clever solution to the "small enclave memory" problem.
  • Privacy by Design: Unlike reCAPTCHA, CACTI sends information only to the visited website, not a third-party provider, and uses group signatures to prevent cross-site tracking.

Key Results

  • Speed: Generating and verifying a CACTI rate-proof takes less than 0.25 seconds. For comparison, a human typically takes about 10 seconds to solve a visual CAPTCHA.
  • Bandwidth Efficiency: CACTI reduces bandwidth overhead by over 98% compared to image-based CAPTCHA systems (approx. 2 KB vs. 170 KB).
  • Scalability: Even with 10,000 stored timestamps, the latency remains well under the threshold of human perception.

Limitations and Future Work

  • Hardware Dependency: CACTI requires a TEE. While common in newer devices, it is not yet universal, meaning the fallback to traditional CAPTCHAs remains necessary for now.
  • The "Trusted UI" Gap: Currently, CACTI proves the device is behaving, but not necessarily that a human triggered the action (e.g., malware could theoretically ask the TEE for a proof). The authors suggest that future integration with "Trusted User Interface" hardware (where the TEE controls the screen/mouse directly) could solve this.
  • Cuckoo Attacks: A sophisticated attacker with a "farm" of thousands of physical TEE-enabled devices could still bypass the system, though the authors argue this is much more expensive than current software-based botting.
  • Provisioning Authorities: The system relies on a Provisioning Authority (PA) to manage group keys. While designed for privacy, users must still trust the PA to some degree.

Summary updated

BibTeX
@inproceedings{nakatsuka2021cacti,
  author = {Yoshimichi Nakatsuka and Ercan Ozturk and Andrew Paverd and Gene Tsudik},
  title = {{CACTI: Captcha Avoidance via Client-side TEE Integration}},
  booktitle = {USENIX Security},
  year = {2021},
  url = {https://openreview.net/forum?id=x6vpDNR06rS},
}
Figure