3 minute read
Cheating is a part of competitions, especially cash-prize is involved. The player experience is particularly frustrating, so we try to minimize some of the common cases of cheating.
We’ve concentrated on the two most common cases, namely ShareFlag and FlagHoarding:
We redefine the submit
method of the dynamic_iac
challenge to verify the generated flag against the current source.
Here’s the algorithm:
flowchart LR Submission --> A{Instance On ?} A -->|True| B{Instance I flag ?} A -->|False| Expired B -->|True| C{submission == I.flag} B -->|False| D{CTFd C flag ?} C -->|True| Correct C -->|False| D D -->|True| E{submission == C.flag} D -->|False| Incorrect E -->|True| Correct E -->|False| Incorrect %% I/O Submission Expired Correct Incorrect
On the submit
method, we get all informations of the instance on chall-manager.
Addressing the shareflag issue is crucial to maintaining fairness in CTF competitions. By redefining the submission process with methods like the dynamic_iac challenge, we ensure that only legitimate efforts are rewarded, preserving the true spirit and integrity of the competition.
That’s simple: if we generate the flag on CTFd, each team can submit any generated flag, which doesn’t address the shareflag issue.
There are two main reasons for this requirement:
As we said before, the CTFd Flag system allows users to submit the same flag. We use this system to prevent connection error or latency with chall-manager or if the generated flag is invalid for synthax error (we choose the extended ASCII so it should not happen).