Chm0d
Category: System
Description
Catch-22: a problematic situation for which the only solution is denied by a circumstance inherent in the problem.
Credentials: user:password123
> Deploy on deploy.heroctf.fr
Format : Hero{flag}
Author : Alol
Write-up
- Upon accessing the remote server, we discovered a flag file located at 
/flag.txt. - Unfortunately, the permissions on the file were set to 
000, which means we were unable to read its contents. We attempted to change the permissions using thechmodutility, but to our dismay, thechmodutility itself had permissions set to000too.
 - We came across a StackExchange post that explained the 
chmodutility is essentially a wrapper for thechmodsystem call, and any programming language with achmodwrapper could achieve the same result. - Fortunately, the server had a Perl interpreter, so we were able to utilize a Perl command to change the permissions of 
/flag.txt. - The command we used was: 
perl -e 'chmod 0755, "/flag.txt"'. - By executing this command, we successfully changed the permissions of 
/flag.txt, allowing us to read its contents and obtain the flag. 
Flag: Hero{chmod_1337_would_have_been_easier}