AlpacaHack Logo

Challenges

Sign InSign Up

Rows:

CHALLENGEAUTHORS

SOLVES

(CURRENT)

SOLVE RATE

(AT CONTEST TIME)

AlpacaHack 2100

Daily AlpacaHack

admin

1761

solves

-

1574

solves

-

Daily AlpacaHack

934

solves

-

AlpacaHack Round 2 (Web)

628

solves

Top 28%

= 84/300 users

Daily AlpacaHack

623

solves

-

Daily AlpacaHack

606

solves

-

SECCON Beginners CTF 2024

542

solves

Top 73%

= 683/928 teams

Daily AlpacaHack

409

solves

-

Daily AlpacaHack

406

solves

-

Daily AlpacaHack

375

solves

-

Daily AlpacaHack

367

solves

-

echo

AlpacaHack Round 1 (Pwn)

363

solves

Top 32%

= 56/174 users

Daily AlpacaHack

349

solves

-

Daily AlpacaHack

342

solves

-

Daily AlpacaHack

337

solves

-

Daily AlpacaHack

331

solves

-

Encoding Basics

Daily AlpacaHack

331

solves

-

🐈

Daily AlpacaHack

323

solves

-

Bars

Daily AlpacaHack

318

solves

-

108

Daily AlpacaHack

306

solves

-

Rows:

permission denied

Daily AlpacaHackTopic: File PermissionReleased: Apr 29, 2026

76 solves
Misc
Hard

by

minaminao

minaminao

cat: flag.txt: Permission denied

Beginner Hint 1 (AI-translated)
  • If you connect with nc, you will see that a shell starts up.
  • If you read chal.sh, you can see that flag.txt is created before the shell starts.
  • After that, the permissions of flag.txt are set to 400.
  • These commands are executed by the root user.
  • So 400 means that only the root user can read the file.
  • Then runuser -u nobody -- sh starts a shell as the nobody user.
  • However, if you run cat flag.txt, you get Permission denied, so you cannot read the flag.
  • So how can you read the flag?
Beginner Hint 2 (AI-translated)
  • This is a more meta hint, but why does chal.sh bother setting the permissions of flag.txt in the first place?
  • The permissions of chal.sh are specified in the Dockerfile.
  • In the same way, it should also be possible to set the permissions of flag.txt in the Dockerfile.
  • Think about what behavioral difference is created between setting permissions in the Dockerfile and setting them later in chal.sh.
permission-denied.tar.gz
descriptionsolveswriteups