GCP - Filestore Post Exploitation
Tip
Nauči & vežbaj AWS Hacking:
HackTricks Training AWS Red Team Expert (ARTE)
Nauči & vežbaj GCP Hacking:HackTricks Training GCP Red Team Expert (GRTE)
Nauči & vežbaj Az Hacking:HackTricks Training Azure Red Team Expert (AzRTE)
Podržite HackTricks
- Pogledajte subscription plans!
- Pridružite se 💬 Discord group or the telegram group or pratite nas na Twitter 🐦 @hacktricks_live.
- Podelite hacking tricks slanjem PR-ova na HackTricks i HackTricks Cloud github repos.
Filestore
Za više informacija o Filestore pogledajte:
Mount Filestore
Deljeni fajl sistem može sadržati osetljive informacije koje su interesantne iz perspektive napadača. Sa pristupom Filestore moguće je mount it:
Mount Filestore filesystem
```bash sudo apt-get update sudo apt-get install nfs-common # Check the share name showmount -eDa biste pronašli IP address filestore instance, proverite sekciju za enumeraciju na stranici:
Uklanjanje ograničenja i dobijanje dodatnih permissions
Ako attacker nije na IP address koji ima access na share, ali imate dovoljno permissions da ga izmenite, moguće je ukloniti ograničenja ili pristup nad njim. Takođe je moguće dodeliti više privilegija vašem IP address-u kako biste imali admin access nad share-om:
Ažuriraj Filestore instance da omogući access
```bash gcloud filestore instances update nfstest \ --zone=Contents of nfs.json
{
“–file-share”:
{
“capacity”: “1024”,
“name”: “
</details>
### Vraćanje backup-a
Ako postoji backup, moguće ga je **vratiti** u postojećoj ili u novoj instanci tako da njegovi **podaci postanu dostupni:**
<details>
<summary>Kreirajte novu instancu i vratite backup</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
Napravite backup i izvršite restore
Ako nemate pristup share-u i ne želite da ga menjate, moguće je kreirati backup od njega i restore izvršiti kako je ranije pomenuto:
Kreirajte backup i izvršite restore u novoj instance
```bash # Create share backup gcloud filestore backups createFollow the previous section commands to restore it and mount it
</details>
> [!TIP]
> Nauči & vežbaj 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;">\
> Nauči & vežbaj 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;">\
> Nauči & vežbaj 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>Podržite HackTricks</summary>
>
> - Pogledajte [**subscription plans**](https://github.com/sponsors/carlospolop)!
> - **Pridružite se** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **pratite** nas na **Twitter** 🐦 [**@hacktricks_live**](https://twitter.com/hacktricks_live)**.**
> - **Podelite hacking tricks slanjem PR-ova na** [**HackTricks**](https://github.com/carlospolop/hacktricks) i [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
>
> </details>
HackTricks Cloud

