Exploiting Version Control Systems
AI Generated Summary
AI Generated Content Disclaimer
Note: This summary is AI-generated and may contain inaccuracies, errors, or omissions. If you spot any issues, please contact the site owner for corrections. Errors or omissions are unintended.
The presentation, Exploiting Version Control Systems: Pillaging for Fun and Profit, shows how developers who deploy code through version control systems expose their entire source repositories when VCS metadata directories ship to production web servers. The deck covers what VCS deployment is, why it is worth exploiting, the folder signatures and predictable files of Git, SVN, Mercurial, and Bazaar, the available extraction tools, and live demos of pillaging source code with directory listing both enabled and disabled.
Summary
The deck frames version control systems as the hip, developers’ way of deploying code, with support for auto-deployment on commit. The motivation slide keeps it simple: it is fun, and it is like a golden ticket, with auto-deployment making it more hip when available.
A VCS 101 table maps each system to its signature hidden folder: Git uses .git, SVN uses .svn, and Mercurial uses .hg, with Bazaar’s .bzr also appearing in the predictable files list. Detection relies on predictable files: .git/HEAD for Git, .hg/requires for Mercurial, and .bzr/README for Bazaar. The .gitignore file is singled out as the robots.txt of VCS, since it reveals the file and directory names the developer chose to exclude from version control.
The tools section names three options, with honest ordering: SVN-extractor, which handles only SVN and sits on top because the presenter wrote it; DVCS-pillage, which lacks SVN support; and dvcs-ripper, an alternative implementation that covers SVN too. The demo section then runs twice, once with directory listing enabled on the web server and once with it disabled, followed by a dedicated SVN demo, closing with a “phew, demo done” slide.
For bulk checking, the deck shares a quick-checks shell script that reads a list of targets and probes each with curl: .svn/entries over HTTP and HTTPS (using curl -k for the latter), then .svn/wc.db over both protocols, printing the check labels as it goes. The talk wraps with a question slide and the standard trainer and speaker bio slide listing Blackhat USA, NullCon, g0s, c0c0n, and RootConf as training venues.
Key Themes
- VCS-based deployment: version control is the developers’ way of deploying code, and auto-deployment on commit is common in modern workflows.
- Why exploit it: exposed repositories are like a golden ticket, handing over source code, and auto-deployment availability sweetens the finding further.
- Folder signatures: .git for Git, .svn for SVN, .hg for Mercurial, and .bzr for Bazaar mark a deployed repository.
- Predictable detection files: .git/HEAD, .hg/requires, and .bzr/README confirm each system’s presence without directory listing.
- The .gitignore leak: the file acts as the robots.txt of VCS, advertising what the developer considered worth excluding.
- Tooling options: SVN-extractor for SVN, DVCS-pillage for Git and Mercurial, and dvcs-ripper as an alternative covering all three.
- Listing on versus off: directory listing enabled makes pillaging trivial browsing; disabled still falls to predictable paths and extraction tools.
- Bulk reconnaissance: a curl-based shell script checks .svn/entries and .svn/wc.db over HTTP and HTTPS across a list of hosts.
Notable Points
- VCS folder map: Git uses .git, SVN uses .svn, Mercurial uses .hg.
- Predictable files for detection: .git/HEAD, .hg/requires, and .bzr/README.
- SVN-extractor is written by the presenter and handles only SVN repositories.
- DVCS-pillage supports Git and Mercurial but lacks SVN support.
- dvcs-ripper is an alternative implementation that covers SVN as well.
- Demos were run in two configurations: directory listing enabled and directory listing disabled, plus a separate SVN scenario.
- The quick-checks script probes
http://$p/.svn/entries,https://$p/.svn/entries(withcurl -k),http://$p/.svn/wc.db, andhttps://$p/.svn/wc.dbfor each host in an input file. - The bio slide lists trainer credits including Blackhat USA, NullCon, g0s, c0c0n, and RootConf, with speaker credits at Nullcon, c0c0n, ClubHack, and RootConf.
Notable Quotes
“The hip / developers way of deploying code”
“Supports Auto-Deployment on commit”
“Coz its fun”
“Its like a golden ticket”
“Auto-deployment if available makes it more hip.”
“SVN-extractor (Only SVN) (on top coz i wrote it)”
“NOTE: ALL DEMO’s are prepared while in sleep deprived state.”















