{
  "api_version": "1.0.0",
  "slug": "rea-ctf-masked-squares-flag-checker",
  "url": "https://reversedwithai.com/p/rea-ctf-masked-squares-flag-checker",
  "markdown_url": "https://reversedwithai.com/p/rea-ctf-masked-squares-flag-checker.md",
  "json_url": "https://reversedwithai.com/p/rea-ctf-masked-squares-flag-checker.json",
  "title": "Solved a DownUnderCTF flag checker by extracting its rules with REA and Z3",
  "tagline": "A CTF checker turned into 26 equations and solved.",
  "summary": "The REA project shows an agent using REA and Ghidra to pull 26 mask-and-target rules out of a DownUnderCTF binary and solve them, then confirming the answer on the original program.",
  "target": {
    "name": "DownUnderCTF masked squares flag checker",
    "type": "research",
    "type_label": "Research and benchmarks"
  },
  "platform": "Linux x64",
  "models": [],
  "tools": [
    "REA",
    "Ghidra",
    "Z3"
  ],
  "outcome": "works",
  "outcome_label": "Works",
  "human_effort": null,
  "time_spent": null,
  "cost": null,
  "license": null,
  "checks": {
    "source_available": "yes",
    "repro_steps": "yes",
    "real_hardware": null,
    "independently_verified": null
  },
  "author": {
    "name": "REA project (morluto)",
    "url": "https://github.com/morluto/rea"
  },
  "sources": {
    "repository": "https://github.com/morluto/rea",
    "writeup": "https://rea.tools/showcase/ctf/",
    "discussions": [],
    "all": [
      "https://github.com/morluto/rea",
      "https://rea.tools/showcase/ctf/"
    ]
  },
  "image": {
    "url": "https://covers.reversedwithai.com/rea-ctf-masked-squares-flag-checker.webp",
    "credit": "Image: rea.tools"
  },
  "commit_history": {
    "commits": 8057,
    "ai_commits": 1015,
    "ai_days": 40,
    "first_ai_commit": "2026-08-10",
    "last_ai_commit": "2026-11-14",
    "credited_models": [
      {
        "name": "Claude Opus 5.5",
        "commits": 676
      },
      {
        "name": "Cursor",
        "commits": 266
      },
      {
        "name": "factory-droid[bot]",
        "commits": 50
      },
      {
        "name": "Codex",
        "commits": 12
      }
    ]
  },
  "added_at": "2026-10-15T04:03:43.376414+00:00",
  "updated_at": "2026-10-15T04:03:43.376414+00:00",
  "sources_reviewed_at": "2026-10-15T04:03:43.376414+00:00",
  "reviewed_by": "editor",
  "human_notes": null,
  "reproduce": null,
  "body_md": "The REA project published a case study that solves an easy reverse engineering challenge from DownUnderCTF, a flag checker built on masked squares. A coding agent with REA connected to Ghidra finds the check, extracts its rules and solves them, then runs the original program to confirm.\n\n### How it was done\n\nThe page says the run used REA with Ghidra 12.1.4 on Linux x64. The agent opened the binary, searched strings, followed cross references to the checking code and analysed the functions. It then pulled 26 mask-and-target rules out of the binary and solved them as equations with Z3. The page does not name the model or the agent.\n\n### Results\n\nThe recovered answer made the original program print \"Correct!\". Changing one character made it print \"Incorrect!\" and exit with code 255. The page says the answer matches the organisers' published metadata, and the run was done on 8 October 2026. The challenge comes from DownUnderCTF's public 2023 repository, and REA's evidence notes are linked from the page.",
  "ai_use_excerpts": null
}
