ctf-writeup/b01lers CTF 2023/abhs
Muhammad Daffa a1e03a758b feat: added picoCTF 2023-04-01 16:50:03 +07:00
..
images feat: added 4 CTFs 2023-03-20 06:17:07 +07:00
README.md feat: added picoCTF 2023-04-01 16:50:03 +07:00

README.md

abhs

Just a warmup.

nc abhs.bctf23-codelab.kctf.cloud 1337

About the Challenge

We have been given a server. But if we input a command, the server will sort the characters. For example the command bash, then the server will execute it as absh

How to Solve?

First, we try to execute env command and the result is

env

As you can see there is an interesting environment variable called _ and the value is /usr/bin/python3

If we input _$ on the server. The server will be executing a /usr/bin/python3

python

But we still can't do anything, we will force the python to open a prompt using -i switches

-i

Now we input _$ -i into the server and the result is

prompt

You can import os package to run OS command without any restriction

flag

bctf{gr34t_I_gu3ss_you_g0t_that_5orted_out:P}