Skip to content

Conversation

@MarkusOstermayer
Copy link

@MarkusOstermayer MarkusOstermayer commented Jan 18, 2026

Hey, this PR adds/changes the following

  • Updated challenges to the new manifest (021530e)
  • Adds the package archival services for debian and ubuntu images (8b4c712, 1026b29)
  • Removed all alpine based images (35eb948), instanced templates (0d3eb8f) and kernel-PWN (41a03eb)
  • Added preparsing for sagemath (56c544b)
  • Added file extensions (6e02f00)
  • Added templates for docker-compose.yml files (e13ac2a)
  • Changed templates to use the flag placed in the environment (aff947a, 8978a0a)
  • Added a new template for creating offline-challenges with dynamic flags (33a6f2c)

There are unfortunately a lot of changes in this PR.
We could also split it up into multiple PRs in order to make it easier to review.

Ported all debian and ubuntu based images to use the archival services.
In addition, all containers were switched from the docker-hashes to
timestamped images to give challenge authors a better feeling of how
old/new the image is.
I updated the pwn debian 12.11 template to debian 12.12.
Since the minor version changed, I renamed the folder do not include it.

Since this change might spark some discussion, this is a seperate commit
All minor versions have been updated, the table listing the versions in
the readme-md has been updated and .version has been updated.
This Commit adds file-extensions for files that are not binaries (e.g.
python or bash-files).
This was done because file-extensions are present for other challenges
aswell (e.g. the solidity or php template).

This closes #4
I accidentay removed too much in
ecd71ba, this commit adds it back in
This PR adds tempaltes for docker-compose-files that can be included in
the dist.
We are currently missing support from the makefile.
I had a copy-paste error in the manifest for the connection info.
removed old flag.txt, added new entrypoint to write the flag into a file
and start nsjail.
In all non-jail templates, all references to flag.txt have been removed
in the challenge subdirectory and the flag is being read from the
environment
Added a tempalte that dynamically gegerates challenge dists
@MarkusOstermayer
Copy link
Author

The manifest for offline-dynamic-python is still wrong, I'll fix that in the afternoon.

@MarkusOstermayer MarkusOstermayer marked this pull request as draft January 18, 2026 09:07
@h4ckd0tm3
Copy link

Great work! Will take a look at the changes today :)

One question:
Should this continoue to be maintained as a fork?
At this point we stray very far away from LosTemplates, although keeping compatibility we could consider making a Repo that is not a fork.

Copy link

@h4ckd0tm3 h4ckd0tm3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good so far, a few minor changes.
Regarding the solutions:
Might be that we need to rework the "find_flag" function again.
Hammer will provide the expected flag as env and I opted for a regex that matches generic flags as a fallback. Also open for input on that.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Further supporting the fact that this should be it's own repository I think.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Are we keeping the Makefiles now?
I am currently working non finishing the test command for hammer.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we keeping the Makefiles now?

The preferred method of testing going forward should (IMO) be hammer.
Since the makefiles are stripped down so much, we could offer them as a "alternative" to hammer.

The only issue is that the RARGS and the actual parameters that hammer uses may get out of sync.
But if the Makefiles aren't that popular among challenge creators, we can just remove them.


echo $FLAG > /jail/flag.txt
cat /jail/flag.txt

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
unset FLAG

@@ -1,2 +1,2 @@
#!/bin/sh
/usr/bin/stdbuf -i0 -o0 -e0 /app/challenge
/usr/bin/stdbuf -i0 -o0 -e0 /app/challenge.bash

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flag is never copied into the file.

Suggested change
/usr/bin/stdbuf -i0 -o0 -e0 /app/challenge.bash
echo $FLAG > /flag.txt
unset FLAG
/usr/bin/stdbuf -i0 -o0 -e0 /app/challenge.bash

RUN chmod +x /app/challenge
COPY challenge.bash /app/challenge.bash
RUN chmod +x /app/challenge.bash
COPY flag.txt /flag.txt

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove flag copy, as flag.txt does not exist anymore.
Moved to entrypoint.sh

Suggested change
COPY flag.txt /flag.txt

function: linear

connectinfo: >-
<code>snicat {{ infos['challenge_container']['1337']['hostname'] }}</code><br>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<code>snicat {{ infos['challenge_container']['1337']['hostname'] }}</code><br>
<a href="{{ infos['challenge_container']['1337']['hostname'] }}" target=_blank>{{ infos['challenge_container']['1337']['hostname'] }}</a>


connectinfo: >-
<code>snicat {{ infos['challenge_container']['1337']['hostname'] }}</code><br>
We recommend using <a href="https://github.com/CTFd/snicat" target="_blank">snicat</a> to connect to the challenge.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
We recommend using <a href="https://github.com/CTFd/snicat" target="_blank">snicat</a> to connect to the challenge.


echo $FLAG > /jail/flag.txt
cat /jail/flag.txt

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
unset FLAG


echo $FLAG > /jail/flag.txt
cat /jail/flag.txt

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
unset FLAG


echo $FLAG > /jail/flag.txt
cat /jail/flag.txt

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
unset FLAG

@MarkusOstermayer
Copy link
Author

Hey, thanks for the review.

Hammer will provide the expected flag as env and I opted for a regex that matches generic flags as a fallback.

Ah, I didn't know that. In this case, let's use your default and your regex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants