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/exploit/windows/http/gitstack_rce.md
Views: 11789
Description
An unauthenticated remote code execution vulnerability exists in GitStack through v2.3.10. This module exploits the vulnerability by sending unauthenticated REST API requests to put the application in a vulnerable state, if needed, before sending a request to trigger the exploit. These configuration changes are undone before the module exits. The module has been tested on GitStack v2.3.10.
Vulnerable Application
In vulnerable versions of GitStack, a flaw in Authentication.class.php
allows unauthenticated remote code execution since $_SERVER['PHP_AUTH_PW']
is passed directly to an exec
function.
To exploit the vulnerability, the repository web interface must be enabled, a repository must exist, and a user must have access to the repository.
Note: A passwd file should be created by GitStack for local user accounts. Default location: C:\GitStack\data\passwdfile
.
Verification Steps
Install a vulnerable GitStack application
./msfconsole
use exploit/windows/http/gitstack_rce
set rhost <rhost>
set verbose true
8run
Note: You may have to run the exploit multiple times since the powershell that is generate has to be under a certain size.