Adversarial CAPTCHAs

Chenghui Shi, Xiaogang Xu, Shouling Ji, Kai Bu, Jianhai Chen, Raheem Beyah, Ting Wang

TL;DR

This paper introduces "Adversarial CAPTCHAs," a novel defense mechanism that uses adversarial machine learning to create challenges that are easy for humans but nearly impossible for AI to solve. By shifting perturbations to the frequency domain, the authors create CAPTCHAs that remain secure even against sophisticated image-cleaning preprocessing, effectively turning an AI's own vulnerabilities into a robust security feature.

What Problem Does This Paper Address?

Traditional CAPTCHAs (Completely Automated Public Turing test to tell Computers and Humans Apart) are in an arms race. As deep learning models become more adept at image and text recognition, standard CAPTCHAs must become increasingly distorted to remain secure. However, this high level of distortion often makes them frustrating or impossible for humans to solve, leading to a poor user experience.

Existing research into "adversarial examples"—inputs specifically crafted to fool machine learning models while appearing unchanged to humans—offers a potential solution. The authors address the challenge of how to proactively apply these adversarial techniques to design CAPTCHAs that are highly secure against automated attacks without sacrificing usability for real people.

Methods

The authors developed aCAPTCHA, a modular framework for generating and evaluating both text-based and image-based adversarial CAPTCHAs.

Fig. 1. System overview of aCAPTCHA.

Key methodological innovations include:

  • Frequency Domain Perturbation (Text-based): The authors discovered that standard adversarial attacks in the spatial (pixel) domain are easily defeated by simple preprocessing like image binarization. To counter this, they proposed adding perturbations in the frequency domain using Fast Fourier Transforms (FFT). This creates global changes that are resilient to filtering but easily ignored by the human eye.
  • Human-Tolerable Noise (Image-based): While standard adversarial research aims for "human-imperceptible" changes, CAPTCHAs can afford to be more aggressive. The authors introduced a noise level parameter ($K$) to inject "human-tolerable" perturbations, which are much harder for AI to overcome.
  • Modular Evaluation: The system integrates 10 preprocessing techniques (like blurring and edge enhancement) and 9 different machine learning attacks (including LeNet, ResNet, and VGG) to rigorously test the security of the generated CAPTCHAs.

Datasets

The study utilized two primary benchmark datasets:

  • MNIST: A collection of 70,000 handwritten digit images, used to generate and test text-based CAPTCHAs.
  • ImageNet (ILSVRC-2012): A large-scale database of labeled photographs, used for the image-based CAPTCHA scenarios.

Key Insights and Ideas

  • "Spear vs. Shield": The core philosophy is to use the inherent vulnerabilities of neural networks (their susceptibility to adversarial noise) as a defensive shield.
  • Resilience through FFT: By targeting the high-frequency components of an image, the adversarial noise becomes "baked into" the structure of the characters. This makes it nearly impossible for an attacker to "clean" the image using standard filters without also destroying the CAPTCHA itself.
  • Transferability as a Defense: Adversarial examples generated to fool one specific model often fool others. This property allows aCAPTCHA to be effective even when the defender doesn't know exactly what model an attacker might use.
  • Usability Balance: Humans are remarkably robust to global noise that completely baffles a Convolutional Neural Network (CNN). The authors leverage this cognitive gap to maintain high human success rates.

Key Results

The quantitative results demonstrate a massive leap in security:

  • Security Gains: For text-based CAPTCHAs, the Success Attack Rate (SAR) of powerful models like LeNet dropped from 95.87% on normal CAPTCHAs to nearly 0% on adversarial versions.
  • Preprocessing Resilience: Even when attackers used advanced image cleaning (Filter + Binarization), the adversarial CAPTCHAs remained highly effective. For example, while standard attacks could be "cleaned" to achieve high success, the frequency-based adversarial versions kept attack success rates extremely low (often <10% for DNNs and 0% for traditional ML).
Table showing the performance of adversarial CAPTCHAs against various attacks after image filtering and binarization.
  • Usability: In a study with 125 volunteers, human success rates for adversarial text CAPTCHAs remained high at 88% (compared to 92.8% for normal ones). For image-based CAPTCHAs, humans actually became faster at solving adversarial versions over time as they grew familiar with the task.

Limitations and Future Work

The authors acknowledge several areas for further development:

  • Human Labor Attacks: aCAPTCHA is designed to stop bots, not "CAPTCHA farms" where humans are paid to solve challenges. Complementary systems are needed to address this.
  • Quantifying "Human-Tolerable": There is currently no mathematical standard for what constitutes "human-tolerable" noise. Future work could focus on formalizing this threshold to automate the generation process further.
  • Scope: The current study focuses on text and image CAPTCHAs. Extending these adversarial principles to audio and video-based challenges is a promising next step.
  • Adaptive Attackers: While the system is robust against current black-box attacks, the authors suggest that future work should continue to explore how attackers might use "ensemble adversarial training" to try and bypass these defenses.

Summary updated

Abstract

Following the principle of to set one's own spear against one's own shield, we study how to design adversarial CAPTCHAs in this paper. We first identify the similarity and difference between adversarial CAPTCHA generation and existing hot adversarial example (image) generation research. Then, we propose a framework for text-based and image-based adversarial CAPTCHA generation on top of state-of-the-art adversarial image generation techniques. Finally, we design and implement an adversarial CAPTCHA generation and evaluation system, named aCAPTCHA, which integrates 10 image preprocessing techniques, 9 CAPTCHA attacks, 4 baseline adversarial CAPTCHA generation methods, and 8 new adversarial CAPTCHA generation methods. To examine the performance of aCAPTCHA, extensive security and usability evaluations are conducted. The results demonstrate that the generated adversarial CAPTCHAs can significantly improve the security of normal CAPTCHAs while maintaining similar usability. To facilitate the CAPTCHA security research, we also open source the aCAPTCHA system, including the source code, trained models, datasets, and the usability evaluation interfaces.
BibTeX
@article{shi2022adversarial,
  author = {Chenghui Shi and Xiaogang Xu and Shouling Ji and Kai Bu and Jianhai Chen and Raheem Beyah and Ting Wang},
  title = {{Adversarial CAPTCHAs}},
  journal = {IEEE Trans. Cybernetics},
  year = {2022},
  doi = {10.1109/tcyb.2021.3071395},
}
Figure