Skip to content

Latest commit

 

History

History
34 lines (25 loc) · 1.13 KB

File metadata and controls

34 lines (25 loc) · 1.13 KB

absolutely relative

Points: 250

Category

General Skills

Question

In a filesystem, everything is relative ¯\_(ツ)_/¯. Can you find a way to get a flag from this program? You can find it in /problems/absolutely-relative_1_15eb86fcf5d05ec169cc417d24e02c87 on the shell server. Source.

Hint

Do you have to run the program in the same directory? (⊙.☉)7

Ever used a text editor? Check out the program 'nano'

Solution

Reading the source code, the binary wants a file permission.txt with the contents yes in it.

Just open the web shell, create the file in a directory which you have write permissions.

Run the binary from current directory.

$ pwd
/home/Platy
$ echo -n "yes" > permissions.txt
$ /problems/absolutely-relative_1_15eb86fcf5d05ec169cc417d24e02c87/absolutely-relative
You have the write permissions.
picoCTF{3v3r1ng_1$_r3l3t1v3_a97be50e}

This works because the file flag.txt is referenced using an absolute path while the permission.txt is being referenced from your local directory.

Flag

picoCTF{3v3r1ng_1$_r3l3t1v3_a97be50e}