logo

Academy

DocumentationSubmit a solutionRepository structure

Hack structure

Where the ctf-hacking solutions are in the repository, and what each file of a challenge folder is for.

This page gives the structure of the hack folder, and the purpose of each file in a challenge folder. Read it before you send your first ctf-hacking solution.

The repository keeps the hack solutions in this structure:

Structure

This folder stores the hacking challenges.

hack/
└── <site>/
    └── <challenge-id>/
        ├── LINK.lst
        ├── OTHERS.lst                    (only for a challenge that has one)
        ├── <gitlab-username>.feature     (solution file)
        ├── <gitlab-username>.yml         (YAML file)
        └── <gitlab-username>/            (optional folder for your scripts)
            └── <gitlab-username>.<ext>   (script or exploit that you used)

Example

hack/
└── 247ctf/
    └── hidden-painting/
        ├── LINK.lst
        ├── OTHERS.lst
        ├── friendglak.feature
        ├── friendglak.yml
        └── friendglak/
            └── friendglak.py

Steps

1. Rules

  • The name of a file or a folder must have 35 characters or less.

  • The name must be in lower case, and it must have no special character.

  • Use a dash (-) in place of a space.

  • Sometimes a folder name is already in use for a different category on the same platform. An example is a challenge and a machine with the same name. In that condition, add the category as a suffix after a dash: <name>-<category>. The suffix must use the category name of the platform, such as machine, sherlock or challenge. The full name must still have 35 characters or less. The commit message must say that the folder name has a category suffix, because of the name collision.

    For example, ransom/ is already in use for the challenge. Then make ransom-machine/ for the machine.

2. Files

The challenge folder holds the files below. You add a solution file and a YAML file with your GitLab username. You can also add a folder with that name for your scripts. The other files belong to the challenge, and all the talents of that challenge share them.

  • LINK.lst. This file contains the URL of the challenge. It must have only one line. The URL must give an HTTP 200 response, with no redirection.

  • OTHERS.lst. This file contains the external solutions of that challenge. Do not read them, and do not use them to solve the challenge. External solutions gives the rules of this file. A hacking challenge folder sometimes has no OTHERS.lst, because no external solution is on the internet yet.

3. New challenge folders

You sometimes send the first solution of a challenge. Then you create the challenge folder, and you create LINK.lst in it.

CAUTION: Your pipeline fails if the challenge folder has no LINK.lst, or if LINK.lst is empty.

On this page