Programming

Programming Challenges for CTF and Security

Write small programs to transform data, automate investigation, and solve security tasks that do not scale by hand.

What you will learn

  • Parse and transform evidence
  • Break investigations into testable steps
  • Automate repetitive security analysis

Programming challenges

47 challenges available.

Programming Level 1

09. Python Automation - File Reading

In security work, programming is essential for processing large amounts of data. In this challenge, you'll use Python…

Programming Level 2

API Requests - Find the Highest-Profit Trade

Start the stock API on localhost:9102, find the transaction with the largest sell_price - buy_price across all…

Programming Level 2

Python Practice - Bulk Base64 Stream Decoding

data.txt contains 100+ Base64 strings. Exactly one decodes to the FLAG injected at startup; decode every line to find…

Programming Level 2

Python Practice - Conditional CSV Sales Filtering

Runtime-generated data.txt is a sales CSV. The notes of the one row with amount >= 10000, status completed, and a SEC-…

Programming Level 2

Python Practice - Compound JSON User Query

In runtime-generated JSON data.txt, find the only user whose role is admin, active is true, and email contains…

Programming Level 2

Python Practice - Target-IP Access Log Tracing

Runtime-generated data.txt is a 1200-line access log. Filter for 192.168.1.100 and find the FLAG among those lines.

Programming Level 2

Python Automation - Bulk Base64 Decoding

data.txt holds 100+ base64-encoded strings, one per line. Decode them all and find the flag (the line starting with…

Programming Level 2

Python Automation - CSV Sales Filtering

data.txt is a sales CSV (transaction_id,date,product_id,amount,status,notes). Find the single transaction with amount…

Programming Level 2

Python Automation - JSON User Query

data.txt is JSON containing many users. Find the single user whose role is admin, active is true, and email contains…

Programming Level 2

Python Automation - Access Log Parsing

data.txt is an access log of 1000+ lines. Extract the lines from IP 192.168.1.100 and find the flag (FLAG{...}) among…

Programming Level 2

Python Automation - Password Hash Cracking

data.txt holds many sha256 hashes. The flag was split into ordered chunks; each chunk is hashed as…

Programming Level 2

Programming - Bash Job Log Analysis

jobs.log is generated from the FLAG injected at startup. Filter successful archive jobs, order parts, reverse values,…

Programming Level 2

Programming - PIN Brute Force

vault.json is generated from the FLAG injected at startup. Brute-force the 0000–9999 PIN SHA-256 and XOR-decrypt with…

Programming Level 2

Programming - Hash Verification and Decryption

artifact-manifest.json is generated from the FLAG injected at startup. Verify each data SHA-256, XOR-decrypt with…

Programming Level 2

Programming - Binary TLV Parsing

capture.bin is generated from the FLAG injected at startup. Parse KBIN TLV records and XOR-decode type 0x42 with 0x5A…

Programming Level 2

Regular Expressions - The One-Time Golden Glyph

Extract every KINO-four-digits-four-uppercase glyph from data.txt, identify the one occurring once, and submit it to…

Programming Level 3

Python Automation - SQLite Database Analysis

data.db is a business SQLite database (users / orders / audit_log). The flag hides in the security_note of the single…

Programming Level 3

Python Automation - Custom Cipher Decryption

cipher.txt holds the flag encrypted with a custom cipher (hex). Encryption applies per byte: add (key), xor…

Programming Level 3

Python Automation - Encrypted ZIP Password Cracking

secret.zip is a ZIP encrypted with a weak password and contains flag.txt. Use the shipped wordlist.txt and Python's…

Programming Level 3

Algorithms - BFS Shortest Path Through a Maze

Use BFS to find the shortest path from S to E in data.txt, then submit the UDLR move sequence to challenge.py. A…

Programming Level 3

Programming - SQLite Evidence Database

evidence.db is generated from the FLAG injected at startup. JOIN users/access_log and Base64-decode the top…

Programming Level 3

Programming - Web Scraping Graph Traversal

site.json is generated from the FLAG injected at startup. Follow ordered link-graph comments and join Base64 fragments…

Programming Level 3

Programming - ZIP Password Recovery

archive.json is generated from the FLAG injected at startup. Find the wordlist password matching password_sha256 and…

Programming Level 3

Programming - Packet Log Analysis

capture.txt is generated from the FLAG injected at startup. Select flow=exfil payload_hex and XOR-decrypt with 0x5A to…