Security Forem

Hitanshu Gedam
Hitanshu Gedam

Posted on

picoCTF "patchme.py" writeup

Here in this challenge we are given two files: 1) flag.txt.enc and, 2) patchme.flag.py
I used the webshell to solve this challenge. I created a directory to store these two file, cd into that directory and downloaded both the files via wget. I read the contents of the flag.txt.enc file and it didn't make any sense (as it should since it is encrypted). then I read the code of the patchme.flag.py via the cat command.
In the beginning of the code it said "THIS FUNCTION WILL NOT HELP YOU FIND THE FLAG". The second function level_1_pw_check() asks the user for the password and checks it with the required string for the password. If it matches, the flag will be shown. The if condition has our required password, we just have to concatenate the parts of the string into one string and that will be our password, once we feed the function with that password, we will have our flag.

pico webshell

Top comments (0)