-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
202 additions
and
86 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
category1: cloud | ||
related_menus: | ||
- title: Others | ||
id: others |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- | ||
title: Azure Pentesting | ||
description: | ||
tags: | ||
- Cloud | ||
refs: | ||
- https://pwnedlabs.io/labs/azure-blob-container-to-initial-access | ||
date: 2024-12-18 | ||
draft: false | ||
--- | ||
|
||
## Install Azure CLI | ||
|
||
To pentesting Azure, we need to install Azure CLI on our machine. See https://learn.microsoft.com/en-us/cli/azure/install-azure-cli for details. | ||
|
||
Additionally, the `Az` PowerShell module is useful. | ||
|
||
```bash | ||
Import-Module -Name Az | ||
``` | ||
|
||
<br /> | ||
|
||
## Azure Blob Storage | ||
|
||
Azure Blob Storage stores static files in the URL: `https://<account>.blob.core.windows.net/`. | ||
We can enumerate the target storage by accessing the following URLs in browser: | ||
|
||
```bash | ||
# Enumerate detailed information for the storage | ||
https://<account>.blob.core.windows.net/<container>?restype=container&comp=list | ||
|
||
# Enumerate directories | ||
https://<account>.blob.core.windows.net/<container>?restype=container&comp=list&delimiter=%2F | ||
|
||
# Enumerate version information | ||
https://<account>.blob.core.windows.net/<container>?restype=container&comp=list&include=versions | ||
# Specify version | ||
https://<account>.blob.core.windows.net/<container>/example.txt?versionid=2021-09-20T12:34:56.789Z | ||
``` | ||
|
||
<br /> | ||
|
||
## Active Directory | ||
|
||
Resources: [Microsoft Docs](https://learn.microsoft.com/en-us/powershell/module/az.resources/get-azaduser?view=azps-13.0.0) | ||
|
||
```bash | ||
# Get signin user | ||
Get-AzADUser -SignedIn | ||
|
||
# List users | ||
Get-AzADUser -First 10 -Select 'City' -AppendSelected | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
--- | ||
title: GCP (Google Cloud Platform) Pentesting | ||
description: | ||
tags: | ||
- Cloud | ||
refs: | ||
- https://pwnedlabs.io/labs/reveal-hidden-files-in-google-storage | ||
date: 2024-12-18 | ||
draft: false | ||
--- | ||
|
||
## Install Google Cloud CLI | ||
|
||
Before pentesting GCP, we need to install a dedicated CLI tool. See [the installation guide](https://cloud.google.com/sdk/docs/install) for details. | ||
After installed, login with your Google credential: | ||
|
||
```bash | ||
gcloud auth login | ||
``` | ||
|
||
<br /> | ||
|
||
## Google Storage | ||
|
||
Google Storage allows users to store static files in the URL: `https://storage.googleapis.com/<bucket-name>/`. | ||
We can enumerate the target storage as below: | ||
|
||
```bash | ||
# Enumerate accessible directories/files from outside. | ||
fuzz -u https://storage.googleapis.com/<bucket-name>/FUZZ -w wordlist.txt -fc 403 | ||
|
||
# Display directories/files | ||
gsutil ls gs://<bucket-name>/example/ | ||
|
||
# Download a file | ||
gsutil cp gs://<bucket-name>/example.txt | ||
|
||
# Get information for the bucket | ||
gsutil stat gs://<bucket-name>/index.html | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,37 @@ | ||
--- | ||
title: Crack 7z Password | ||
description: | ||
description: If a 7z file is protected with password, we can crack the password. | ||
tags: | ||
- Archive | ||
refs: | ||
date: 2023-11-28 | ||
date: 2024-12-18 | ||
draft: false | ||
--- | ||
|
||
## Crack | ||
|
||
```bash | ||
### 1. Convert to Hash | ||
|
||
First we need to convert the `.7z` file to hash. | ||
|
||
```sh | ||
7z2john example.7z > hash.txt | ||
# or | ||
/usr/share/john/7z2john.pl example.7z > hash.txt | ||
|
||
john --wordlist=wordlist.txt hash.txt | ||
``` | ||
|
||
If we got the error “`Can't locate Compress/Raw/Lzma.pm in @INC`...”, we need to install `libcompress-raw-lzma-perl` package so try: | ||
|
||
```bash | ||
sudo apt install libcompress-raw-lzma-perl | ||
``` | ||
|
||
### 2. Crack the Hash | ||
|
||
Now we can crack the hash with one of the commands below: | ||
|
||
```sh | ||
john --wordlist=wordlist.txt hash.txt | ||
# or | ||
hashcat -m 11600 hash.txt wordlist.txt | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.