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

cowsay jail

Daily AlpacaHackTopic: JailReleased: Oct 13, 2026

59 solves
Misc

by

tan90909090

tan90909090

The cowsay command is a great command for emphasizing a text!

🦙 < flag is at /flag.txt.

Beginner Hint: Approach to Solving the Challenge
  • It seems difficult to read /flag.txt using only the cowsay command. In this challenge, the shell=True argument is specified for subprocess.run. Let's consider how we leverage that to execute other commands using characters not included in the deny_list.
  • Even if we can execute other commands, passing arguments is difficult because deny_list contains spaces. Let's try to find a way to represent spaces using characters not included in deny_list.
cowsay-jail.tar.gz

Please sign in to submit the flag.

descriptionsolveswriteups