In a capture-the-flag (CTF) competition, participants earn points by solving security tasks such as cryptography, web vulnerability analysis and reverse engineering to obtain flags. The format is widely used for security training and recruiting, and in AI it is also used as a benchmark task for evaluating models' cybersecurity capabilities.
Outside security, the name refers to an outdoor game in which two teams try to seize the other team's flag.