Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/documentation/modules/post/linux/gather/haserl_read.md
Views: 11789
Vulnerable Application
Haserl is an unmaintained tool to use LUA as CGI in web servers. On Linux, when haserl is suid root, it will attempt to drop its privilege to the uid/gid of the owner of the cgi script, similar to suexec in Apache.
Haserl could have been a thing of the past, but it's used in Alpine Linux' Alpine Configuration Framework, which is commonly used on this distribution.
This module exploits the fact that calling haserl on a file will make it not only change the effective UID, but also display the content of the file.
This has been fixed in version 0.9.36.
Prerequisites
Install Alpine Linux
Install haserl
Verification Steps
Start msfconsole
Get a shell
Do:
use post/linux/gather/haserl_read
Set
SESSION
Do:
run
orexploit
Verify that the file was successfully downloaded
Options
RFILE
Remote file to download, defaults to /etc/shadow
.