-
Notifications
You must be signed in to change notification settings - Fork 104
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update description. Ensure script runs on Windows WSL
- Loading branch information
1 parent
7f62ea8
commit d018741
Showing
11 changed files
with
30 additions
and
20 deletions.
There are no files selected for viewing
48 changes: 29 additions & 19 deletions
48
...ormation_disclosure/Information_disclosure_in_version_control_history/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,52 @@ | ||
# Lab: Information disclosure in version control history | ||
# Write-up: Information disclosure in version control history @ PortSwigger Academy | ||
|
||
 | ||
|
||
This write-up for the lab *Information disclosure in version control history* is part of my walkthrough series for [PortSwigger's Web Security Academy](https://portswigger.net/web-security). | ||
|
||
**Learning path**: Server-side topics → Information disclosure | ||
|
||
Lab-Link: <https://portswigger.net/web-security/information-disclosure/exploiting/lab-infoleak-in-version-control-history> | ||
Difficulty: PRACTITIONER | ||
Python script: [script.py](script.py) NB: Not platform independent, works on Linux only (and perhaps on Mac). On Windows, it may run with WSL. | ||
Python script: [script.py](script.py) | ||
*The script is not platform-independent. It works on Linux and perhaps on Mac. To run it on Windows, it requires WSL (it may run on Cygwin or similar Linux-like environments).* | ||
|
||
## Known information | ||
## Lab description | ||
|
||
- Lab discloses information in its version control history | ||
- Goals: | ||
- Obtain administrator password | ||
- Delete user `carlos` | ||
 | ||
|
||
## Steps | ||
|
||
### Analysis | ||
As usual, the first step is to analyze the functionality of the lab application. In this lab, it is a shop website. | ||
|
||
The lab is again our favourite shop website. Browsing around does not reveal anything unusual. As we do not have known credentials, we need additional means of finding content. | ||
Browsing around does not reveal anything unusual. As I do not have any known credentials, I need additional means of finding content. | ||
|
||
This can be a wild guess based on the title, Burp's content discovery or any other directory search tool (e.g. gobuster, wfuzz, ...). Very quickly, it discovers an interesting directory: | ||
This can be a wild guess based on the title, Burp's content discovery or any other directory search tool (e.g. [gobuster](https://github.com/OJ/gobuster), [wfuzz](https://github.com/xmendez/wfuzz), ...). Very quickly, it discovers an interesting directory: | ||
|
||
 | ||
|
||
I quickly mirror the directory with wget to create a local copy with the following line: | ||
|
||
 | ||
 | ||
|
||
Now I change into that directory, check the git log and find an interesting commit message in the last commit: | ||
|
||
 | ||
|
||
So I move my working directory back to the commit before that: | ||
|
||
Checking the git log, an interesting commit message is shown in the last commit: | ||
 | ||
|
||
 | ||
A quick directory listing shows an interesting file with even more interesting content: | ||
|
||
So go back to the commit before: | ||
 | ||
|
||
 | ||
 | ||
|
||
And check the content of the file: | ||
Now it is simply a matter of logging in with `administrator:xdewmitje2uxb30llr06` and accessing the `Admin panel`: | ||
|
||
 | ||
 | ||
|
||
Now it is simply a matter of logging in with `administrator:ehr6dyudul3bxk8n3prd`, access the `Admin panel` and delete user `carlos` to solve the lab: | ||
After I delete user `carlos`, the lab updates to | ||
|
||
 | ||
 |
Binary file added
BIN
+23.4 KB
...isclosure/Information_disclosure_in_version_control_history/img/admin_panel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+0 Bytes
(100%)
...losure/Information_disclosure_in_version_control_history/img/admin_password.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+0 Bytes
(100%)
...nformation_disclosure_in_version_control_history/img/download_git_directory.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+14.8 KB
(180%)
...losure/Information_disclosure_in_version_control_history/img/get_old_commit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+0 Bytes
(100%)
...on_disclosure/Information_disclosure_in_version_control_history/img/git_log.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+6.31 KB
...osure/Information_disclosure_in_version_control_history/img/lab_description.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+36.9 KB
...ation_disclosure/Information_disclosure_in_version_control_history/img/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+7.28 KB
...Information_disclosure_in_version_control_history/img/old_directory_content.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+18.3 KB
(220%)
...on_disclosure/Information_disclosure_in_version_control_history/img/success.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters