GCP - Filestore Post Exploitation
Tip
学んで実践する AWS Hacking:
HackTricks Training AWS Red Team Expert (ARTE)
学んで実践する GCP Hacking:HackTricks Training GCP Red Team Expert (GRTE)
学んで実践する Az Hacking:HackTricks Training Azure Red Team Expert (AzRTE)
HackTricks をサポートする
- subscription plans を確認してください!
- 参加する 💬 Discord group または telegram group に参加するか、Twitter 🐦 @hacktricks_live をフォローしてください。
- Share hacking tricks by submitting PRs to the HackTricks and HackTricks Cloud github repos.
Filestore
For more information about Filestore check:
Filestoreをマウントする
共有のファイルシステムは攻撃者の観点から興味深い機密情報を含んでいる可能性があります。Filestoreにアクセスできれば、マウントすることが可能です:
Filestoreのファイルシステムをマウント
```bash sudo apt-get update sudo apt-get install nfs-common # Check the share name showmount -eFilestore インスタンスの IP アドレスを見つけるには、ページの列挙セクションを確認してください:
制限を解除して追加の権限を取得
もし攻撃者が共有にアクセスできる IP アドレスにいないが、共有を変更するのに十分な権限がある場合、アクセス制限を解除したりアクセス権を変更したりすることが可能です。自分の IP アドレスに対してより多くの権限を付与して、共有に対する管理者アクセスを得ることもできます:
Filestore インスタンスを更新してアクセスを許可する
```bash gcloud filestore instances update nfstest \ --zone=Contents of nfs.json
{
“–file-share”:
{
“capacity”: “1024”,
“name”: “
</details>
### バックアップを復元する
バックアップがある場合、既存のインスタンスまたは新しいインスタンスに**復元する**ことで、その**情報にアクセス可能になります:**
<details>
<summary>新しいインスタンスを作成してバックアップを復元する</summary>
```bash
# Create a new filestore if you don't want to modify the old one
gcloud filestore instances create <new-instance-name> \
--zone=<zone> \
--tier=STANDARD \
--file-share=name=vol1,capacity=1TB \
--network=name=default,reserved-ip-range=10.0.0.0/29
# Restore a backups in a new instance
gcloud filestore instances restore <new-instance-name> \
--zone=<zone> \
--file-share=<instance-file-share-name> \
--source-backup=<backup-name> \
--source-backup-region=<backup-region>
# Follow the previous section commands to mount it
バックアップを作成して復元する
もし共有にアクセスできず、それを変更したくない場合は、それをバックアップとして作成し、前述のように復元することができます:
新しいインスタンスにバックアップを作成して復元する
```bash # Create share backup gcloud filestore backups createFollow the previous section commands to restore it and mount it
</details>
> [!TIP]
> 学んで実践する AWS Hacking:<img src="../../../../../images/arte.png" alt="" style="width:auto;height:24px;vertical-align:middle;">[**HackTricks Training AWS Red Team Expert (ARTE)**](https://hacktricks-training.com/courses/arte)<img src="../../../../../images/arte.png" alt="" style="width:auto;height:24px;vertical-align:middle;">\
> 学んで実践する GCP Hacking: <img src="../../../../../images/grte.png" alt="" style="width:auto;height:24px;vertical-align:middle;">[**HackTricks Training GCP Red Team Expert (GRTE)**](https://hacktricks-training.com/courses/grte)<img src="../../../../../images/grte.png" alt="" style="width:auto;height:24px;vertical-align:middle;">\
> 学んで実践する Az Hacking: <img src="../../../../../images/azrte.png" alt="" style="width:auto;height:24px;vertical-align:middle;">[**HackTricks Training Azure Red Team Expert (AzRTE)**](https://hacktricks-training.com/courses/azrte)<img src="../../../../../images/azrte.png" alt="" style="width:auto;height:24px;vertical-align:middle;">
>
> <details>
>
> <summary>HackTricks をサポートする</summary>
>
> - [**subscription plans**](https://github.com/sponsors/carlospolop) を確認してください!
> - **参加する** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) または [**telegram group**](https://t.me/peass) に参加するか、**Twitter** 🐦 [**@hacktricks_live**](https://twitter.com/hacktricks_live) をフォローしてください。
> - **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
>
> </details>
HackTricks Cloud

