<--Back to Projects List

SVN Extractor

🚧 Work in Progress
This page is currently being updated as and when Anant gets time. Once it is fully updated, this message will be removed.
Image for SVN Extractor

TL;DR

🚀 What it does: Automated tool to extract hidden web resources from exposed .SVN directories

💡 Best for: Web penetration testers discovering hidden files and source code

🔍 Key features: Automated .SVN extraction, source code recovery, hidden file discovery


SVN Extractor is a specialized penetration testing tool designed to extract hidden web resources from exposed .SVN directories found on web servers. This tool automates the process of discovering and downloading files that may be inadvertently exposed through misconfigured SVN repositories, providing penetration testers with access to source code, hidden files, and sensitive information.

Project Overview

During web application penetration testing, testers often encounter exposed .SVN folders that contain valuable information about the application’s structure and source code. SVN Extractor automates the extraction process, making it easy to discover hidden files, access source code, and bypass certain access restrictions that might be in place.

Key Features

🔍 Comprehensive SVN Discovery

🚀 Advanced Extraction Capabilities

🛠️ Flexible Configuration

Usage

Basic Usage

python svn_extractor.py --url "http://example.com/.svn/"

Advanced Options

usage: svn_extractor.py [-h] --url TARGET [--debug] [--noextract] [--userlist]
                        [--wcdb] [--entries] [--proxy PROXY] [--match MATCH]

This program is used to extract the hidden SVN files from a webhost
considering either .svn entries file (<1.6) or wc.db (> 1.7) are available
online. This program actually automates the directory navigation and text
extraction process

optional arguments:
  -h, --help     show this help message and exit
  --url TARGET   Provide URL
  --debug        Provide debug information
  --noextract    Don't extract files just show content
  --userlist     show the usernames used for commit
  --wcdb         check only wcdb
  --entries      check only .svn/entries file
  --proxy PROXY  Provide HTTP Proxy in http(s)://host:port format
  --match MATCH  only download files that match regex

Examples

Basic extraction:

python svn_extractor.py --url "https://target.com/.svn/"

Extract with proxy:

python svn_extractor.py --url "https://target.com/.svn/" --proxy "http://proxy:8080"

Show usernames only:

python svn_extractor.py --url "https://target.com/.svn/" --userlist --noextract

Match specific files:

python svn_extractor.py --url "https://target.com/.svn/" --match "\.php$"

How It Works

1. SVN Version Detection

The tool automatically detects the SVN version by checking for:

2. Metadata Extraction

Depending on the SVN version:

3. File Recovery

The tool attempts multiple recovery methods:

4. Content Extraction

Technical Architecture

Core Components

Supported SVN Formats

Use Cases

Penetration Testing

Security Assessment

Digital Forensics

Project Impact

Community Adoption

Security Research Value

Technical Specifications

Requirements

File Recovery Methods

  1. Text-base Method: .svn/text-base/filename.svn-base
  2. Pristine Method: .svn/pristine/XX/CHECKSUM.svn-base
  3. Entries Parsing: Direct file listing from .svn/entries
  4. Database Query: SQLite queries against .svn/wc.db

Research and References

The tool builds upon research from multiple security professionals:

Academic References

Community Contributions

Security Considerations

Ethical Usage

Defensive Measures


Credit (C) Anant Shrivastava http://anantshri.info
Greets to Amol Naik, Akash Mahajan, Prasanna K, Lava Kumar for valuable inputs

A comprehensive tool for automated extraction of hidden web resources from exposed SVN directories during penetration testing engagements