A novel CAPTCHA solver framework using deep skipping Convolutional Neural Networks

Shida Lu, Kai Huang, Talha Meraj, Hafiz Tayyab RaufPeerJ Comput. Sci 2022

TL;DR

This paper introduces a novel CAPTCHA solver framework utilizing a skip-connection-based Convolutional Neural Network (CNN). By incorporating skip connections and a robust 5-fold cross-validation strategy, the proposed model achieves improved accuracy in breaking text-based CAPTCHAs, highlighting the vulnerability of current CAPTCHA designs and paving the way for more secure authentication methods.

What Problem Does This Paper Address?

CAPTCHAs (Completely Automated Public Turing Test to tell Computers and Humans Apart) are a cornerstone of web security, designed to distinguish human users from automated bots. However, as AI and computer vision techniques advance, many CAPTCHA designs are becoming increasingly vulnerable to sophisticated "CAPTCHA breakers." Traditional Optical Character Recognition (OCR) methods, while effective for simpler CAPTCHAs, struggle with more complex variations. This paper addresses the challenge of developing more robust CAPTCHA solvers that can effectively break state-of-the-art CAPTCHAs, thereby informing the design of more secure CAPTCHA systems that can better resist automated attacks. The authors note that existing studies often focus on specific datasets, limiting their generalizability, and that validation schemes can sometimes be biased.

Methods

The core of this research is a novel CAPTCHA solver framework built upon a Convolutional Neural Network (CNN) architecture enhanced with skip connections. These skip connections are designed to preserve and pass pictorial information from earlier layers to later layers, allowing the network to learn from a richer set of features. This is a departure from traditional CNNs where information can be lost through successive pooling and convolutional layers.

The framework also incorporates several key steps:

  • Data Normalization: Various image processing techniques are employed to prepare the CAPTCHA images for the deep learning model. This includes grayscale conversion, binarization, and erosion to enhance character clarity and remove noise or intersecting lines.
  • Character Segmentation: Individual characters are isolated from the CAPTCHA images. This is crucial for an OCR-type approach where each character is recognized independently.
  • Skip-Connection CNN: The proposed CNN architecture features skip connections that link earlier layers to later ones, enabling the network to capture both low-level and high-level features.
  • 5-Fold Cross-Validation: To mitigate bias and ensure a more reliable evaluation, a 5-fold cross-validation strategy is implemented. This involves splitting the dataset into five parts, training on four, and testing on the remaining one, repeating this process five times. The final results are an average of these five folds, providing a more robust measure of performance.
  • Batch Normalization: This technique is used to stabilize and accelerate the training of the deep neural network by normalizing the inputs to layers.

Datasets

The study utilizes two publicly available datasets from Kaggle:

  • d₁ (Five-character Dataset): Contains 1,040 images, with 19 distinct character types. The original image dimensions are 50x200x3.
  • d₂ (Four-character Dataset): Contains 9,955 images, with 32 distinct character types. The original image dimensions are 24x72x3.

After preprocessing and segmentation, each character is resized to 20x24 pixels for both datasets. The paper notes that these are publicly available datasets, contributing to the robustness of their findings.

Key Insights and Ideas

  • The Power of Skip Connections: The integration of skip connections in the CNN architecture proved crucial for capturing complex features and improving recognition accuracy, especially for CAPTCHAs with overlapping text or intricate designs.
  • Robust Validation is Key: The 5-fold cross-validation approach significantly enhances the reliability of the results by minimizing bias and ensuring that the model's performance is evaluated across different subsets of the data. This is highlighted as a more robust method compared to single-fold validation.
  • Dataset Characteristics Matter: The study observed that the five-character dataset (d₁), despite having fewer images, presented more challenges due to overlapping text and fewer character types. Conversely, the four-character dataset (d₂), with more images and character types but less complex inter-character interference, yielded higher accuracy. This suggests that CAPTCHA complexity, not just the number of characters or images, is a critical factor in its security.
  • Vulnerability of Current Designs: The high accuracy achieved by the proposed solver on both datasets indicates that many current text-based CAPTCHA designs are still vulnerable to advanced deep learning techniques, even with some level of distortion.

Key Results

The proposed skip-connection-based CNN framework demonstrated promising results on both datasets:

  • Five-character Dataset (d₁): Achieved an overall accuracy of 85.52% and an overall F1-score of 85.97%. The 'Y' character showed the highest accuracy (95.82% F1-score), while the 'M' character was the least accurate (62.08% accuracy).
  • Four-character Dataset (d₂): Achieved a significantly higher overall accuracy of 98.82% and an overall F1-score of 98.846%. Most characters in this dataset were recognized with over 97% accuracy.

The paper also presents a comparison with state-of-the-art methods in Table 6, showing that their proposed method, particularly with the 5-fold validation, achieves competitive or superior results, especially considering the robustness of their validation scheme.

Limitations and Future Work

  • Dataset Specificity: While the study uses publicly available datasets, the authors acknowledge that the proposed model's performance might vary on other, unseen CAPTCHA datasets.
  • Complexity vs. Security: The study highlights that while the four-character dataset (d₂) yielded higher accuracy for the solver, it might be considered less secure due to its simpler structure and higher frequency of characters. This implies a trade-off between CAPTCHA complexity and human usability.
  • Future Work: The authors suggest several avenues for future research:
  • Data Augmentation: Applying more advanced data augmentation techniques to create more challenging CAPTCHAs.
  • Robust Data Creation: Developing more robust methods for generating CAPTCHA datasets, potentially incorporating intersecting lines and other complex features.
  • Multi-lingual CAPTCHAs: Extending the framework to solve CAPTCHAs in other languages.
  • Improved Validation: Further exploring validation techniques to ensure even greater confidence in results.
  • Other CAPTCHA Types: Investigating the application of similar deep learning models to other types of CAPTCHAs (e.g., image-based, reCAPTCHA).

Summary updated

BibTeX
@article{lu2022novel,
  author = {Shida Lu and Kai Huang and Talha Meraj and Hafiz Tayyab Rauf},
  title = {{A novel CAPTCHA solver framework using deep skipping Convolutional Neural Networks}},
  journal = {PeerJ Comput. Sci.},
  year = {2022},
  doi = {10.7717/peerj-cs.879},
}
Figure