ctf-writeup/2023/b01lers CTF 2023/abhs
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
README.md feat: grouped the challs 2024-01-09 16:59:32 +07:00

README.md

abhs

Just a warmup.

nc abhs.bctf23-codelab.kctf.cloud 1337

About the Challenge

We were 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}