AlpacaHack Logo

Tag: Jail

Sign InSign Up
Jail

Jail challenges are about escaping from some kind of restricted execution environment (= jail). Players take advantage of the fact that the given environment or restrictions are not perfect, aiming to achieve unintended operations.

In particular, challenges related to Python language features are called Pyjail challenges. (automatically translated from Japanese)

minaminao
·Updated Apr 24, 2026
Jail Challenges

jailiaj

Daily AlpacaHackTopic: JailReleased: Jan 6, 2026

304 solves
Misc

by

minaminao

minaminao

n ko so pa to ma to pa so ko n

Beginner Hint: What Is Jail? (AI-translated)
  • AlpacaHack currently focuses on four categories: Crypto, Pwn, Rev, and Web. Challenges from other fields are classified under the Misc category.
  • This challenge belongs to the Misc category, and more specifically, it is one of the challenges called Jail.
  • Jail sometimes appears as its own independent category, including in SECCON Quals.
  • Jail challenges are themed around escaping from some kind of restricted execution environment, or "jail."
  • If you can take advantage of imperfections in the given environment or restrictions and perform an unintended action, you can obtain the flag.
  • Jail challenges related especially to Python language features are called Pyjail.
Beginner Hint: First Step (AI-translated)
  • If you read the script, you can see that after checking whether the input is a palindrome, it executes that input with eval.
  • flag.txt is placed at ./flag.txt by the Dockerfile.
  • First, think about an easier version of this challenge where the palindrome-checking assert statement does not exist.
  • In that case, you could simply input print(open("flag.txt").read()) to read the flag.
  • While keeping in mind the question "How can I construct a palindromic payload?", try looking into Python language features and experimenting locally to observe their behavior.
jailiaj.tar.gz

Please sign in to submit the flag.

descriptionsolveswriteups