Update gitstack_rce.md

GSoC/Meterpreter_Web_Console
Wei Chen 2018-03-27 12:59:49 -05:00
parent 2735ae57cb
commit df49345f5d
1 changed files with 17 additions and 10 deletions

View File

@ -1,25 +1,32 @@
## 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.
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](https://security.szurek.pl/gitstack-2310-unauthenticated-rce.html) 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.
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`.
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`
- [ ] `run`
* Install a vulnerable GitStack application
* `./msfconsole`
* `use exploit/windows/http/gitstack_rce`
* `set rhost <rhost>`
* `set verbose true`
8 `run`
Note: You may have to run the exploit multiple times since the powershell that is generate has to be under a certain size.
Note: You may have to run the exploit multiple times since the powershell that is generate has to
be under a certain size.
## Scenarios