Knife
Personal Rating: Easy
Last updated
Personal Rating: Easy
Last updated
Starting off with basic enum:
Open Ports: 22, 80
webserver: Apache httpd 2.4.41
ssh server: OpenSSH 8.2p1
dirb scan:
//403
//same as index
//same as index
The sourcecode of index has interesting parts at the end, is it possibly injectable?
I found this path.getBoundingClientRect();
I also started an ssh bruteforce with hydra, just to have it running in the background
Wappalyzer plugin: PHP 8.1.0, Apache 2.4.41, Google Font API, Ubuntu
This php remote code execution exploit worked after checking the php version:
This exploit was a php backdoor and the payload was very simple:
I got the user james. I found an SUID binary as well: ./opt/chef-workstation/bin/knife
Looking through the "knife" script, I found "chef 16.10.8", which is vulnerable to a privilege escalation.
This was the final payload, which was simple too: