hacktricks/network-services-pentesting/3690-pentesting-subversion-svn-server.md
2023-07-07 23:42:27 +00:00

412 lines
18 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<details>
<summary><a href="https://cloud.hacktricks.xyz/pentesting-cloud/pentesting-cloud-methodology"><strong>☁️ HackTricks Cloud ☁️</strong></a> -<a href="https://twitter.com/hacktricks_live"><strong>🐦 Twitter 🐦</strong></a> - <a href="https://www.twitch.tv/hacktricks_live/schedule"><strong>🎙️ Twitch 🎙️</strong></a> - <a href="https://www.youtube.com/@hacktricks_LIVE"><strong>🎥 Youtube 🎥</strong></a></summary>
- **サイバーセキュリティ企業**で働いていますか? **HackTricksで会社を宣伝**したいですか?または、**最新バージョンのPEASSを入手したり、HackTricksをPDFでダウンロード**したいですか?[**SUBSCRIPTION PLANS**](https://github.com/sponsors/carlospolop)をチェックしてください!
- [**The PEASS Family**](https://opensea.io/collection/the-peass-family)を見つけてください。独占的な[**NFT**](https://opensea.io/collection/the-peass-family)のコレクションです。
- [**公式のPEASSHackTricksのグッズ**](https://peass.creator-spring.com)を手に入れましょう。
- **[💬](https://emojipedia.org/speech-balloon/) Discordグループ**に参加するか、[**telegramグループ**](https://t.me/peass)に参加するか、**Twitter**で**フォロー**してください[**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
- **ハッキングのトリックを共有するには、[hacktricksリポジトリ](https://github.com/carlospolop/hacktricks)と[hacktricks-cloudリポジトリ](https://github.com/carlospolop/hacktricks-cloud)**にPRを提出してください。
</details>
# 基本情報
Subversionは、現在利用可能な多くのバージョン管理オプションの1つです。よくSVNと略されます。\
Subversionは、プロジェクトの現在のバージョンと過去のバージョンを管理するために使用されます。Subversionは、オープンソースの集中型バージョン管理システムです。Apacheのライセンスの下で提供されています。ソフトウェアのバージョンとリビジョン管理システムとも呼ばれています。
**デフォルトポート:** 3690
```
PORT STATE SERVICE
3690/tcp open svnserve Subversion
```
## バナーグラビング
Banner Grabbingバナーグラビングは、ネットワークサービスのペンテストにおいて非常に有用なテクニックです。このテクニックは、ターゲットのサーバーからバナー情報を取得することで、サービスのバージョンや設定情報を特定することができます。
バナーグラビングは、通常、TelnetやNetcatなどのツールを使用して実行されます。以下は、バナーグラビングの手順です。
1. ターゲットのサーバーに対して、TelnetやNetcatを使用して接続します。
2. 接続が確立されたら、サーバーからの応答を確認します。
3. 応答には、サービスのバージョンや設定情報が含まれる場合があります。
4. 取得した情報を分析し、脆弱性や攻撃の可能性を特定します。
バナーグラビングは、サービスの脆弱性を特定するために使用されることがあります。特定のバージョンのサービスに既知の脆弱性がある場合、攻撃者はその脆弱性を悪用してサーバーに侵入することができます。
バナーグラビングは、サービスのバージョンや設定情報を特定するためにも使用されます。これにより、攻撃者はより具体的な攻撃戦略を立てることができます。
バナーグラビングは、ネットワークサービスのペンテストにおいて基本的な手法の一つです。ペンテスターは、このテクニックを使用して、ターゲットのサーバーに関する重要な情報を収集することができます。
```
nc -vn 10.10.10.10 3690
```
## 列挙
### ポートスキャン
ポートスキャンは、対象のサーバー上で実行されているサービスを特定するために使用されます。以下のコマンドを使用して、ポートスキャンを実行できます。
```bash
nmap -p- <target_ip>
```
### サービスの特定
ポートスキャンの結果を使用して、実行中のサービスを特定します。以下のコマンドを使用して、サービスのバージョンを特定できます。
```bash
nmap -p <port> -sV <target_ip>
```
### SVNサーバーの特定
ポートスキャンの結果から、SVNサーバーを特定します。ポート番号3690がSVNサーバーのデフォルトポートです。
### SVNサーバーのバージョンの特定
以下のコマンドを使用して、SVNサーバーのバージョンを特定できます。
```bash
nmap -p 3690 -sV <target_ip>
```
### SVNサーバーの情報の収集
以下のコマンドを使用して、SVNサーバーから情報を収集できます。
```bash
svn info svn://<target_ip>:3690
```
### SVNリポジトリのブラウズ
以下のコマンドを使用して、SVNリポジトリをブラウズできます。
```bash
svn ls svn://<target_ip>:3690
```
### SVNリポジトリのダウンロード
以下のコマンドを使用して、SVNリポジトリをダウンロードできます。
```bash
svn checkout svn://<target_ip>:3690/<repository_name>
```
### SVNリポジトリのバージョンの特定
以下のコマンドを使用して、SVNリポジトリのバージョンを特定できます。
```bash
svnlook youngest <repository_path>
```
### SVNリポジトリのログの表示
以下のコマンドを使用して、SVNリポジトリのログを表示できます。
```bash
svn log svn://<target_ip>:3690/<repository_name>
```
### SVNリポジトリのファイルの表示
以下のコマンドを使用して、SVNリポジトリ内のファイルを表示できます。
```bash
svn cat svn://<target_ip>:3690/<repository_name>/<file_path>
```
### SVNリポジトリのファイルのダウンロード
以下のコマンドを使用して、SVNリポジトリ内のファイルをダウンロードできます。
```bash
svn export svn://<target_ip>:3690/<repository_name>/<file_path>
```
### SVNリポジトリのファイルの変更履歴の表示
以下のコマンドを使用して、SVNリポジトリ内のファイルの変更履歴を表示できます。
```bash
svn blame svn://<target_ip>:3690/<repository_name>/<file_path>
```
### SVNリポジトリのファイルの削除履歴の表示
以下のコマンドを使用して、SVNリポジトリ内のファイルの削除履歴を表示できます。
```bash
svn log --diff svn://<target_ip>:3690/<repository_name>/<file_path>
```
### SVNリポジトリのファイルの変更差分の表示
以下のコマンドを使用して、SVNリポジトリ内のファイルの変更差分を表示できます。
```bash
svn diff svn://<target_ip>:3690/<repository_name>/<file_path>
```
### SVNリポジトリのファイルの復元
以下のコマンドを使用して、SVNリポジトリ内のファイルを復元できます。
```bash
svn revert svn://<target_ip>:3690/<repository_name>/<file_path>
```
### SVNリポジトリのファイルの削除
以下のコマンドを使用して、SVNリポジトリ内のファイルを削除できます。
```bash
svn delete svn://<target_ip>:3690/<repository_name>/<file_path> -m "Delete file"
```
### SVNリポジトリのファイルの追加
以下のコマンドを使用して、SVNリポジトリにファイルを追加できます。
```bash
svn add svn://<target_ip>:3690/<repository_name>/<file_path> -m "Add file"
```
### SVNリポジトリのファイルの変更
以下のコマンドを使用して、SVNリポジトリ内のファイルを変更できます。
```bash
svn commit svn://<target_ip>:3690/<repository_name>/<file_path> -m "Modify file"
```
### SVNリポジトリのファイルのリネーム
以下のコマンドを使用して、SVNリポジトリ内のファイルをリネームできます。
```bash
svn move svn://<target_ip>:3690/<repository_name>/<old_file_path> svn://<target_ip>:3690/<repository_name>/<new_file_path> -m "Rename file"
```
### SVNリポジトリのファイルのコピー
以下のコマンドを使用して、SVNリポジトリ内のファイルをコピーできます。
```bash
svn copy svn://<target_ip>:3690/<repository_name>/<source_file_path> svn://<target_ip>:3690/<repository_name>/<destination_file_path> -m "Copy file"
```
### SVNリポジトリのファイルのマージ
以下のコマンドを使用して、SVNリポジトリ内のファイルをマージできます。
```bash
svn merge svn://<target_ip>:3690/<repository_name>/<source_file_path> svn://<target_ip>:3690/<repository_name>/<destination_file_path> -m "Merge file"
```
### SVNリポジトリのファイルのロック
以下のコマンドを使用して、SVNリポジトリ内のファイルをロックできます。
```bash
svn lock svn://<target_ip>:3690/<repository_name>/<file_path> -m "Lock file"
```
### SVNリポジトリのファイルのアンロック
以下のコマンドを使用して、SVNリポジトリ内のファイルのロックを解除できます。
```bash
svn unlock svn://<target_ip>:3690/<repository_name>/<file_path> -m "Unlock file"
```
### SVNリポジトリのファイルのプロパティの表示
以下のコマンドを使用して、SVNリポジトリ内のファイルのプロパティを表示できます。
```bash
svn proplist svn://<target_ip>:3690/<repository_name>/<file_path>
```
### SVNリポジトリのファイルのプロパティの設定
以下のコマンドを使用して、SVNリポジトリ内のファイルのプロパティを設定できます。
```bash
svn propset svn:<property_name> <property_value> svn://<target_ip>:3690/<repository_name>/<file_path> -m "Set property"
```
### SVNリポジトリのファイルのプロパティの削除
以下のコマンドを使用して、SVNリポジトリ内のファイルのプロパティを削除できます。
```bash
svn propdel svn:<property_name> svn://<target_ip>:3690/<repository_name>/<file_path> -m "Delete property"
```
### SVNリポジトリのファイルのプロパティの変更
以下のコマンドを使用して、SVNリポジトリ内のファイルのプロパティを変更できます。
```bash
svn propedit svn:<property_name> svn://<target_ip>:3690/<repository_name>/<file_path> -m "Edit property"
```
### SVNリポジトリのファイルのプロパティの表示再帰的
以下のコマンドを使用して、SVNリポジトリ内のファイルのプロパティを再帰的に表示できます。
```bash
svn proplist -R svn://<target_ip>:3690/<repository_name>
```
### SVNリポジトリのファイルのプロパティの設定再帰的
以下のコマンドを使用して、SVNリポジトリ内のファイルのプロパティを再帰的に設定できます。
```bash
svn propset -R svn:<property_name> <property_value> svn://<target_ip>:3690/<repository_name> -m "Set property"
```
### SVNリポジトリのファイルのプロパティの削除再帰的
以下のコマンドを使用して、SVNリポジトリ内のファイルのプロパティを再帰的に削除できます。
```bash
svn propdel -R svn:<property_name> svn://<target_ip>:3690/<repository_name> -m "Delete property"
```
### SVNリポジトリのファイルのプロパティの変更再帰的
以下のコマンドを使用して、SVNリポジトリ内のファイルのプロパティを再帰的に変更できます。
```bash
svn propedit -R svn:<property_name> svn://<target_ip>:3690/<repository_name> -m "Edit property"
```
### SVNリポジトリのファイルの検索
以下のコマンドを使用して、SVNリポジトリ内のファイルを検索できます。
```bash
svn list -R svn://<target_ip>:3690/<repository_name> | grep <search_term>
```
### SVNリポジトリのファイルの検索正規表現
以下のコマンドを使用して、正規表現を使用してSVNリポジトリ内のファイルを検索できます。
```bash
svn list -R svn://<target_ip>:3690/<repository_name> | grep -E "<regex_pattern>"
```
### SVNリポジトリのファイルの検索大文字と小文字を区別しない
以下のコマンドを使用して、大文字と小文字を区別せずにSVNリポジトリ内のファイルを検索できます。
```bash
svn list -R svn://<target_ip>:3690/<repository_name> | grep -i "<search_term>"
```
### SVNリポジトリのファイルの検索正規表現、大文字と小文字を区別しない
以下のコマンドを使用して、正規表現を使用して大文字と小文字を区別せずにSVNリポジトリ内のファイルを検索できます。
```bash
svn list -R svn://<target_ip>:3690/<repository_name> | grep -i -E "<regex_pattern>"
```
### SVNリポジトリのファイルの検索ファイル名のみ
以下のコマンドを使用して、ファイル名のみを検索してSVNリポジトリ内のファイルを表示できます。
```bash
svn list -R svn://<target_ip>:3690/<repository_name> | grep -o "<search_term>"
```
### SVNリポジトリのファイルの検索ファイル名のみ、正規表現
以下のコマンドを使用して、正規表現を使用してファイル名のみを検索してSVNリポジトリ内のファイルを表示できます。
```bash
svn list -R svn://<target_ip>:3690/<repository_name> | grep -o -E "<regex_pattern>"
```
### SVNリポジトリのファイルの検索ファイル名のみ、大文字と小文字を区別しない
以下のコマンドを使用して、大文字と小文字を区別せずにファイル名のみを検索してSVNリポジトリ内のファイルを表示できます。
```bash
svn list -R svn://<target_ip>:3690/<repository_name> | grep -o -i "<search_term>"
```
### SVNリポジトリのファイルの検索ファイル名のみ、正規表現、大文字と小文字を区別しない
以下のコマンドを使用して、正規表現を使用して大文字と小文字を区別せずにファイル名のみを検索してSVNリポジトリ内のファイルを表示できます。
```bash
svn list -R svn://<target_ip>:3690/<repository_name> | grep -o -i -E "<regex_pattern>"
```
### SVNリポジトリのファイルの検索ファイルパスのみ
以下のコマンドを使用して、ファイルパスのみを検索してSVNリポジトリ内のファイルを表示できます。
```bash
svn list -R svn://<target_ip>:3690/<repository_name> | grep "<search_term>"
```
### SVNリポジトリのファイルの検索ファイルパスのみ、正規表現
以下のコマンドを使用して、正規表現を使用してファイルパスのみを検索してSVNリポジトリ内のファイルを表示できます。
```bash
svn list -R svn://<target_ip>:3690/<repository_name> | grep -E "<regex_pattern>"
```
### SVNリポジトリのファイルの検索ファイルパスのみ、大文字と小文字を区別しない
以下のコマンドを使用して、大文字と小文字を区別せずにファイルパスのみを検索してSVNリポジトリ内のファイルを表示できます。
```bash
svn list -R svn://<target_ip>:3690/<repository_name> | grep -i "<search_term>"
```
### SVNリポジトリのファイルの検索ファイルパスのみ、正規表現、大文字と小文字を区別しない
以下のコマンドを使用して、正規表現を使用して大文字と小文字を区別せずにファイルパスのみを検索してSVNリポジトリ内のファイルを表示できます。
```bash
svn list -R svn://<target_ip>:3690/<repository_name> | grep -i -E "<regex_pattern>"
```
### SVNリポジトリのファイルの検索ファイルパスのみ、正規表現、大文字と小文字を区別しない、一致しないものを表示
以下のコマンドを使用して、正規表現を使用して大文字と小文字を区別せずにファイルパスのみを検索してSVNリポジトリ内
```bash
svn ls svn://10.10.10.203 #list
svn log svn://10.10.10.203 #Commit history
svn checkout svn://10.10.10.203 #Download the repository
svn up -r 2 #Go to revision 2 inside the checkout folder
```
<details>
<summary><a href="https://cloud.hacktricks.xyz/pentesting-cloud/pentesting-cloud-methodology"><strong>☁️ HackTricks Cloud ☁️</strong></a> -<a href="https://twitter.com/hacktricks_live"><strong>🐦 Twitter 🐦</strong></a> - <a href="https://www.twitch.tv/hacktricks_live/schedule"><strong>🎙️ Twitch 🎙️</strong></a> - <a href="https://www.youtube.com/@hacktricks_LIVE"><strong>🎥 Youtube 🎥</strong></a></summary>
- **サイバーセキュリティ会社**で働いていますか? **HackTricksで会社を宣伝**したいですか?または、**PEASSの最新バージョンにアクセスしたり、HackTricksをPDFでダウンロード**したいですか?[**SUBSCRIPTION PLANS**](https://github.com/sponsors/carlospolop)をチェックしてください!
- [**The PEASS Family**](https://opensea.io/collection/the-peass-family)を見つけてください。独占的な[**NFT**](https://opensea.io/collection/the-peass-family)のコレクションです。
- [**公式のPEASSHackTricksのグッズ**](https://peass.creator-spring.com)を手に入れましょう。
- [**💬**](https://emojipedia.org/speech-balloon/) [**Discordグループ**](https://discord.gg/hRep4RUj7f)または[**Telegramグループ**](https://t.me/peass)に**参加**するか、**Twitter**で**フォロー**してください[**🐦**](https://github.com/carlospolop/hacktricks/tree/7af18b62b3bdc423e11444677a6a73d4043511e9/\[https:/emojipedia.org/bird/README.md)[**@carlospolopm**](https://twitter.com/hacktricks_live)**.**
- **ハッキングのトリックを共有するには、[hacktricksリポジトリ](https://github.com/carlospolop/hacktricks)と[hacktricks-cloudリポジトリ](https://github.com/carlospolop/hacktricks-cloud)**にPRを提出してください。
</details>