Program Misuse
cat
I just set the SUID bit on /usr/bin/cat.
Try to use it to read the flag!
We can just cat
the flag.
hacker@program-misuse~level1:/$ cat /flag
more
I just set the SUID bit on /usr/bin/more.
Try to use it to read the flag!
The more
utility is used to view the text files in the command prompt, displaying one screen at a time in case the file is large
hacker@program-misuse~level2:/$ more /flag
less
I just set the SUID bit on /usr/bin/less.
Try to use it to read the flag!
hacker@program-misuse~level3:/$ less /flag
tail
I just set the SUID bit on /usr/bin/tail.
Try to use it to read the flag!
hacker@program-misuse~level4:/$ tail /flag
head
I just set the SUID bit on /usr/bin/head.
Try to use it to read the flag!
hacker@program-misuse~level5:/$ head /flag
sort
I just set the SUID bit on /usr/bin/sort.
Try to use it to read the flag!
hacker@program-misuse~level6:/$ sort /flag
vim
I just set the SUID bit on /usr/bin/vim.
Try to use it to read the flag!
hacker@program-misuse~level7:/$ vim /flag
emacs
I just set the SUID bit on /usr/bin/emacs.
Try to use it to read the flag!
hacker@program-misuse~level8:/$ emacs /flag
nano
I just set the SUID bit on /usr/bin/nano.
Try to use it to read the flag!
hacker@program-misuse~level9:/$ nano /flag
rev
I just set the SUID bit on /usr/bin/rev.
Try to use it to read the flag!
The rev
utility reverses the order of characters within a file.
hacker@program-misuse~level10:/$ rev /flag
The flag is reversed. In order to get the correct ordered flag, we have to pipe the above command with another rev
.
hacker@program-misuse~level10:/$ rev /flag | rev
od
I just set the SUID bit on /usr/bin/od.
Try to use it to read the flag!
The od
utility gives an octal dump of the data provided through STDIN.
If we provide the -c
option, od
will dump the ASCII representation.
hacker@program-misuse~level11:/$ od -c /flag
hd
I just set the SUID bit on /usr/bin/hd.
Try to use it to read the flag!
The hd
utility gives an hexadecimal dump of the data provided through STDIN.
hacker@program-misuse~level12:/$ hd /flag
xxd
I just set the SUID bit on /usr/bin/xxd.
Try to use it to read the flag!
The xxd
creates a hex dump of the input provided through STDIN.
hacker@program-misuse~level13:/$ xxd /flag