Assignment #6 - Usable security

Deadline: 17.05.2026 23:59:59 Brno time
Points: 6 points
Discussion forum: here
Submit: here

In this assignment, you will first break provided CAPTCHA images, then design an improved CAPTCHA with respect to usable security (hard for bots, readable for humans), test the improved CAPTCHA design with the same solver and evaluate both CAPTCHA designs.

You need to implement an Optical Character Recognition (OCR) solution that processes CAPTCHA images, extracts the text using OCR, and evaluates the accuracy by comparing the extracted text from the CAPTCHA.

You are given the following for the homework:

Detailed Instructions

  1. Implement a CAPTCHA solver using OCR by completing solver.py. The following parts need to be implemented inside the template:
    1. Importing the required libraries
    2. Defining a function to solve a CAPTCHA image
    3. Setting the path to the CAPTCHA folder
    4. Solve 20 captchas (read text in png image using OCR) and evaluate
    5. Calculating the OCR accuracy by comparing filenames to extracted text
    6. Saving the results to a JSON file

  2. Use your solver to try to bypass the provided CAPTCHA images and calculate the OCR accuracy by comparing extracted text to the filenames. (expected is at least 50% accuracy).

  3. Edit 20 CAPTCHA images to make them harder for OCR to solve, while keeping them readable for humans (decrease OCR accuracy). Possible improvements include adding noise, distortion, overlapping characters, varying fonts, or obfuscation layers. For improving the CAPTCHA design, you are free to use any techniques or tools.

  4. Use the same solver to try to bypass the improved CAPTCHA images and measure the new accuracy. (expected is lower accuracy than in step 2.).

  5. Write a report using the provided HW Report Template that includes:
    1. The OCR accuracy on the original CAPTCHAs
    2. The OCR accuracy on the improved CAPTCHAs
    3. An evaluation comparing both CAPTCHA designs from a usable security perspective (human usability vs. OCR resistance)

Note

The solver solver.py generates a results.json file containing the accuracy evaluation of the OCR on CAPTCHA images.

Deliverables

Required structure of the submitted uco.zip archive

Scoring Rubric (Total: 6 points)


CAPTCHA Solving and Accuracy Evaluation (2 points)


Proposed CAPTCHA Redesign and Justification (1.5 points)


Evaluation of New CAPTCHA Design (1.5 points)


Clarity and Presentation (1 point)


Total: 6 Points