Skip to main content

Contribute

← Back to the Practice Hub

This is our guide on how you can create your own challenges or edit existing ones for this website! We believe in open-source educational hacking, so anyone can create and submit challenges to our Practice Hub.

Getting Started

Our GitHub repository is available here. We have a custom-built React infrastructure specifically for auto-mapping and rendering interactive CTF practice challenges.

Challenges

Creating a New Challenge

To make your own challenge, first fork the repository and clone it to your device.

Our systems dynamically generate Challenge Hubs out of the folders you provide them. To add a practice challenge, navigate to docs/[CategoryName]/[Level_Name]/ and place your .md file there.

Create a markdown document (.md extension) securely inside the respective difficulty folder. Name it to your challenge's ID. Then, copy-paste the template below into your document:

No Imports Required

Because our Practice Hub renders challenges natively through a custom React engine, you do NOT need to add any React import statements (like import PasswordForm...) at the top of your file! The template below is fully ready to use out-of-the-box.

note

Make sure to replace every field in ALL CAPS with your challenge's information!

Reveal Template
---
description: CHALLENGE-CATEGORY | DIFFICULTY - CHALLENGE NAME
tags: [DIFFICULTY-TAG-LOWERCASE]
---

# CHALLENGE-NAME
DESCRIPTION-FIELD-FROM-ABOVE-COPY-PASTED-HERE

## Challenge
CHALLENGE-DESCRIPTION-HERE

<!--- This is a file download, you can have multiple --->
<a href="/assets/CATEGORY/FILE" download class="download-btn-link">
<button type="button" class="download-btn">Download FILE</button>
</a>

<!--- This is an answer submission form, you can have multiple --->
<PasswordForm hash="ANSWER-HASH-GOES-HERE" algorithm="sha512" challengeName="UNIQUE-CHALLENGE-ID-HERE" />

## Solution
<details>
<summary>Solution Guide</summary>

SOLUTION GUIDE HERE, LEAVE BLANK LINE ABOVE. DO NOT INCLUDE ANSWERS HERE, ONLY HOW TO SOLVE.
</details>

## Credits
- Author(s): YOUR NAME(S)

If you have any downloadable files or images, place them natively next to your .md file in the same directory, or in an local assets subfolder. Our automated challenge generator will automatically discover, compress, and natively bundle your local assets to safely map into the React UI!

Make sure to convert your flag(s) to SHA-512 (can be done at a site like this) and put it in the hash="" property of the PasswordForm component.

note

Make sure to DM one of the officers with the answer(s) to the challenge! This is required for approval!

And you're done! Make a pull request to the development branch and an officer will validate and approve you!

Editing an Existing Challenge

Do you want to fix a challenge or update solution guide? Since all challenges are standard markdown files simply located in docs/, you can easily click the "Edit this page" links, fork the repository, edit the file locally, and submit a pull request to the development branch. Our officer team will review the changes and publish them!

Resources Hub

We also maintain an open-source library of educational writeups and guides in our Resources Hub.

To contribute a resource, simply place your completely standard markdown (.md or .mdx) files inside our resources/ physical directory structure. Unlike Practice challenges, the Resources Hub runs natively entirely through Docusaurus! Because of this:

  1. You can organize folders in any nested hierarchy you desire.
  2. If you are importing specialized React components to interactive elements natively in MDX, you must explicitly declare your imports.

Have Questions?

Reach out to us on our Discord server! If you want to communicate privately, DM our website admin or email us at hello@thehackpack.org.