You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Insecure Source Code Management/Bazaar.md
+2-3
Original file line number
Diff line number
Diff line change
@@ -2,20 +2,19 @@
2
2
3
3
> Bazaar (also known as bzr ) is a free, distributed version control system (DVCS) that helps you track project history over time and collaborate seamlessly with others. Developed by Canonical, Bazaar emphasizes ease of use, a flexible workflow, and rich features to cater to both individual developers and large teams.
Copy file name to clipboardExpand all lines: Insecure Source Code Management/Mercurial.md
+2-4
Original file line number
Diff line number
Diff line change
@@ -2,24 +2,22 @@
2
2
3
3
> Mercurial (also known as hg from the chemical symbol for mercury) is a distributed version control system (DVCS) designed for efficiency and scalability. Developed by Matt Mackall and first released in 2005, Mercurial is known for its speed, simplicity, and ability to handle large codebases.
4
4
5
-
6
5
## Summary
7
6
8
7
*[Tools](#tools)
9
8
*[rip-hg.pl](#rip-hgpl)
10
9
*[References](#references)
11
10
12
-
13
11
## Tools
14
12
15
13
### rip-hg.pl
16
14
17
15
*[kost/dvcs-ripper/master/rip-hg.pl](https://raw.githubusercontent.com/kost/dvcs-ripper/master/rip-hg.pl) - Rip web accessible (distributed) version control systems: SVN/GIT/HG...
16
+
18
17
```powershell
19
18
docker run --rm -it -v /path/to/host/work:/work:rw k0st/alpine-dvcs-ripper rip-hg.pl -v -u
20
19
```
21
20
22
-
23
21
## References
24
22
25
-
* [my-chemical-romance - siunam - Feb 13, 2023](https://siunam321.github.io/ctf/LA-CTF-2023/Web/my-chemical-romance/)
23
+
* [my-chemical-romance - siunam - Feb 13, 2023](https://siunam321.github.io/ctf/LA-CTF-2023/Web/my-chemical-romance/)
> Insecure Source Code Management (SCM) can lead to several critical vulnerabilities in web applications and services. Developers often rely on SCM systems like Git and Subversion (SVN) to manage their source code versions. However, poor security practices, such as leaving .git and .svn folders in production environments exposed to the internet, can pose significant risks.
4
-
3
+
> Insecure Source Code Management (SCM) can lead to several critical vulnerabilities in web applications and services. Developers often rely on SCM systems like Git and Subversion (SVN) to manage their source code versions. However, poor security practices, such as leaving .git and .svn folders in production environments exposed to the internet, can pose significant risks.
5
4
6
5
## Summary
7
6
@@ -13,21 +12,19 @@
13
12
*[Labs](#labs)
14
13
*[References](#references)
15
14
16
-
17
15
## Methodology
18
16
19
-
Exposing the version control system folders on a web server can lead to severe security risks, including:
17
+
Exposing the version control system folders on a web server can lead to severe security risks, including:
20
18
21
-
-**Source Code Leaks** : Attackers can download the entire source code repository, gaining access to the application's logic.
22
-
-**Sensitive Information Exposure** : Embedded secrets, configuration files, and credentials might be present within the codebase.
23
-
-**Commit History Exposure** : Attackers can view past changes, revealing sensitive information that might have been previously exposed and later mitigated.
24
-
19
+
***Source Code Leaks** : Attackers can download the entire source code repository, gaining access to the application's logic.
20
+
***Sensitive Information Exposure** : Embedded secrets, configuration files, and credentials might be present within the codebase.
21
+
***Commit History Exposure** : Attackers can view past changes, revealing sensitive information that might have been previously exposed and later mitigated.
25
22
26
-
The first step is to gather information about the target application. This can be done using various web reconnaissance tools and techniques.
23
+
The first step is to gather information about the target application. This can be done using various web reconnaissance tools and techniques.
27
24
28
25
***Manual Inspection** : Check URLs manually by navigating to common SCM paths.
29
-
*http://target.com/.git/
30
-
*http://target.com/.svn/
26
+
*Git: `http://target.com/.git/`
27
+
*SVN: `http://target.com/.svn/`
31
28
32
29
***Automated Tools** : Refer to the page related to the specific technology.
33
30
@@ -41,14 +38,12 @@ location /.git {
41
38
}
42
39
```
43
40
44
-
For example in Git, the exploitation technique doesn't require to list the content of the `.git` folder (http://target.com/.git/), the data extraction can still be conducted when files can be read.
45
-
41
+
For example in Git, the exploitation technique doesn't require to list the content of the `.git` folder (`http://target.com/.git/`), the data extraction can still be conducted when files can be read.
46
42
47
43
## Labs
48
44
49
45
*[Root Me - Insecure Code Management](https://www.root-me.org/fr/Challenges/Web-Serveur/Insecure-Code-Management)
50
46
51
-
52
47
## References
53
48
54
-
-[Hidden directories and files as a source of sensitive information about web application - Apr 30, 2017](https://github.com/bl4de/research/tree/master/hidden_directories_leaks)
49
+
*[Hidden directories and files as a source of sensitive information about web application - Apr 30, 2017](https://github.com/bl4de/research/tree/master/hidden_directories_leaks)
Copy file name to clipboardExpand all lines: Insecure Source Code Management/Subversion.md
+7-5
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# Subversion
2
2
3
-
> Subversion (often abbreviated as SVN) is a centralized version control system (VCS) that has been widely used in the software development industry. Originally developed by CollabNet Inc. in 2000, Subversion was designed to be an improved version of CVS (Concurrent Versions System) and has since gained significant traction for its robustness and reliability.
3
+
> Subversion (often abbreviated as SVN) is a centralized version control system (VCS) that has been widely used in the software development industry. Originally developed by CollabNet Inc. in 2000, Subversion was designed to be an improved version of CVS (Concurrent Versions System) and has since gained significant traction for its robustness and reliability.
4
4
5
5
## Summary
6
6
@@ -10,7 +10,8 @@
10
10
11
11
## Tools
12
12
13
-
*[anantshri/svn-extractor](https://github.com/anantshri/svn-extractor) - Simple script to extract all web resources by means of .SVN folder exposed over network.
13
+
*[anantshri/svn-extractor](https://github.com/anantshri/svn-extractor) - Simple script to extract all web resources by means of .SVN folder exposed over network.
14
+
14
15
```powershell
15
16
python svn-extractor.py --url "url with .svn available"
1. Download the svn database from http://server/path_to_vulnerable_site/.svn/wc.db
25
+
1. Download the svn database from `http://server/path_to_vulnerable_site/.svn/wc.db`
26
+
25
27
```powershell
26
28
INSERT INTO "NODES" VALUES(1,'trunk/test.txt',0,'trunk',1,'trunk/test.txt',2,'normal',NULL,NULL,'file',X'2829',NULL,'$sha1$945a60e68acc693fcb74abadb588aac1a9135f62',NULL,2,1456056344886288,'bl4de',38,1456056261000000,NULL,NULL);
0 commit comments