mirror of
https://github.com/HackTricks-wiki/hacktricks-cloud.git
synced 2026-07-28 22:51:09 -07:00
Translated ['', 'src/pentesting-cloud/azure-security/az-services/az-stor
This commit is contained in:
@@ -2,54 +2,54 @@
|
||||
|
||||
{{#include ../../../banners/hacktricks-training.md}}
|
||||
|
||||
## 기본 정보
|
||||
## Basic Information
|
||||
|
||||
Azure Storage Accounts는 Microsoft Azure의 핵심 서비스로, blobs(binary large objects), files, queues, tables를 포함한 다양한 데이터 유형을 위한 확장 가능하고, 안전하며, 고가용성인 cloud **storage**를 제공합니다. 이들은 이러한 서로 다른 storage 서비스를 하나의 namespace 아래 묶는 container 역할을 하여 관리가 쉽습니다.
|
||||
Azure Storage Accounts는 Microsoft Azure의 핵심 서비스로, blobs(binary large objects), files, queues, tables를 포함한 다양한 데이터 유형을 위한 확장 가능하고 안전하며 가용성이 높은 cloud **storage**를 제공합니다. 이들은 이러한 서로 다른 storage services를 하나의 namespace 아래 묶는 컨테이너 역할을 하여 관리가 쉽습니다.
|
||||
|
||||
**주요 configuration 옵션**:
|
||||
**Main configuration options**:
|
||||
|
||||
- 모든 storage account는 Azure 전체에서 **고유한 이름**을 가져야 합니다.
|
||||
- 모든 storage account는 **region** 또는 Azure extended zone에 배포됩니다.
|
||||
- 더 나은 성능을 위해 storage account의 **premium** 버전을 선택할 수 있습니다.
|
||||
- rack, drive, datacenter **failure**에 대비하기 위해 **4가지 유형의 redundancy** 중에서 선택할 수 있습니다.
|
||||
- Every storage account must have a **uniq name across all Azure**.
|
||||
- Every storage account is deployed in a **region** or in an Azure extended zone
|
||||
- It's possible to select the **premium** version of the storage account for better performance
|
||||
- It's possible to select among **4 types of redundancy to protect** against rack, drive and datacenter **failures**.
|
||||
|
||||
**Security configuration 옵션**:
|
||||
**Security configuration options**:
|
||||
|
||||
- **Require secure transfer for REST API operations**: storage와의 모든 communication에서 TLS를 요구합니다.
|
||||
- **Allows enabling anonymous access on individual containers**: 그렇지 않으면 향후 anonymous access를 활성화할 수 없습니다.
|
||||
- **Enable storage account key access**: 그렇지 않으면 Shared Keys를 통한 access가 금지됩니다.
|
||||
- **Require secure transfer for REST API operations**: Require TLS in any communication with the storage
|
||||
- **Allows enabling anonymous access on individual containers**: If not, it won't be possible to enable anonymous access in the future
|
||||
- **Enable storage account key access**: If not, access with Shared Keys will be forbidden
|
||||
- **Minimum TLS version**
|
||||
- **Permitted scope for copy operations**: 모든 storage account에서 허용, 같은 Entra tenant의 모든 storage account에서 허용, 또는 같은 virtual network의 private endpoints가 있는 storage account에서 허용.
|
||||
- **Permitted scope for copy operations**: Allow from any storage account, from any storage account from the same Entra tenant or from storage account with private endpoints in the same virtual network.
|
||||
|
||||
**Blob Storage 옵션**:
|
||||
**Blob Storage options**:
|
||||
|
||||
- **Allow cross-tenant replication**
|
||||
- **Access tier**: Hot(자주 access되는 데이터), Cool 및 Cold(드물게 access되는 데이터)
|
||||
- **Access tier**: Hot (frequently access data), Cool and Cold (rarely accessed data)
|
||||
|
||||
**Networking 옵션**:
|
||||
**Networking options**:
|
||||
|
||||
- **Network access**:
|
||||
- 모든 networks에서 허용
|
||||
- 선택된 virtual networks와 IP addresses에서 허용
|
||||
- public access를 비활성화하고 private access 사용
|
||||
- **Private endpoints**: virtual network에서 storage account로의 private connection을 허용합니다.
|
||||
- Allow from all networks
|
||||
- Allow from selected virtual networks and IP addresses
|
||||
- Disable public access and use private access
|
||||
- **Private endpoints**: It allows a private connection to the storage account from a virtual network
|
||||
|
||||
**Data protection 옵션**:
|
||||
**Data protection options**:
|
||||
|
||||
- **Point-in-time restore for containers**: container를 이전 상태로 복원할 수 있습니다.
|
||||
- versioning, change feed, blob soft delete가 활성화되어 있어야 합니다.
|
||||
- **Enable soft delete for blobs**: 삭제된 blobs(덮어쓴 경우도 포함)에 대해 일 단위 retention period를 설정합니다.
|
||||
- **Enable soft delete for containers**: 삭제된 containers에 대해 일 단위 retention period를 설정합니다.
|
||||
- **Enable soft delete for file shares**: 삭제된 file shared에 대해 일 단위 retention period를 설정합니다.
|
||||
- **Enable versioning for blobs**: blobs의 이전 versions를 유지합니다.
|
||||
- **Enable blob change feed**: blobs에 대한 create, modification, delete 변경 로그를 유지합니다.
|
||||
- **Enable version-level immutability support**: account-level에서 time-based retention policy를 설정할 수 있으며, 이는 모든 blob versions에 적용됩니다.
|
||||
- Version-level immutability support와 point-in-time restore for containers는 동시에 활성화할 수 없습니다.
|
||||
- **Point-in-time restore for containers**: Allows to restore containers to an earlier state
|
||||
- It requires versioning, change feed, and blob soft delete to be enabled.
|
||||
- **Enable soft delete for blobs**: It enables a retention period in days for deleted blobs (even overwritten)
|
||||
- **Enable soft delete for containers**: It enables a retention period in days for deleted containers
|
||||
- **Enable soft delete for file shares**: It enables a retention period in days for deleted file shared
|
||||
- **Enable versioning for blobs**: Maintain previous versions of your blobs
|
||||
- **Enable blob change feed**: Keep logs of create, modification, and delete changes to blobs
|
||||
- **Enable version-level immutability support**: Allows you to set time-based retention policy on the account-level that will apply to all blob versions.
|
||||
- Version-level immutability support and point-in-time restore for containers cannot be enabled simultaneously.
|
||||
|
||||
**Encryption configuration 옵션**:
|
||||
**Encryption configuration options**:
|
||||
|
||||
- **Encryption type**: Microsoft-managed keys(MMK) 또는 Customer-managed keys(CMK)를 사용할 수 있습니다.
|
||||
- **Enable infrastructure encryption**: data를 "더 높은 security를 위해" 이중 암호화할 수 있습니다.
|
||||
- **Encryption type**: It's possible to use Microsoft-managed keys (MMK) or Customer-managed keys (CMK)
|
||||
- **Enable infrastructure encryption**: Allows to double encrypt the data "for more security"
|
||||
|
||||
### Storage endpoints
|
||||
|
||||
@@ -64,19 +64,19 @@ Azure Storage Accounts는 Microsoft Azure의 핵심 서비스로, blobs(binary l
|
||||
|
||||
### Public Exposure
|
||||
|
||||
"Allow Blob public access"가 **활성화**되어 있으면(기본적으로 비활성화), container를 만들 때 다음이 가능합니다:
|
||||
If "Allow Blob public access" is **enabled** (disabled by default), when creating a container it's possible to:
|
||||
|
||||
- blobs를 읽을 수 있도록 **public access 부여**(이름을 알아야 함).
|
||||
- container blobs를 **list**하고 이를 **read**할 수 있습니다.
|
||||
- 완전히 **private**하게 만들 수 있습니다.
|
||||
- Give **public access to read blobs** (you need to know the name).
|
||||
- **List container blobs** and **read** them.
|
||||
- Make it fully **private**
|
||||
|
||||
<figure><img src="https://lh7-rt.googleusercontent.com/slidesz/AGV_vUfoetUnYBPWQpRrWNnnlbqWpl8Rdoaeg5uBrCVlvcNDlnKwQHjZe8nUb2SfPspBgbu-lCZLmUei-hFi_Jl2eKbaxUtBGTjdUSDmkrcwr90VZkmuMjk9tyh92p75btfyzGiUTa0-=s2048?key=m8TV59TrCFPlkiNnmhYx3aZt" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
### Static website (`$web`) exposure & leaked secrets
|
||||
|
||||
- **Static websites**는 region-specific endpoint를 통해 특수한 `$web` container에서 제공되며, 예를 들어 `https://<account>.z13.web.core.windows.net/`와 같습니다.
|
||||
- `$web` container는 blob API에서 `publicAccess: null`을 반환할 수 있지만, 파일은 여전히 static site endpoint를 통해 접근 가능하므로, 그 안에 config/IaC artifact를 두면 secrets가 leak될 수 있습니다.
|
||||
- 빠른 audit workflow:
|
||||
- **Static websites** are served from the special `$web` container over a region-specific endpoint such as `https://<account>.z13.web.core.windows.net/`.
|
||||
- The `$web` container may report `publicAccess: null` via the blob API, but files are still reachable through the static site endpoint, so dropping config/IaC artifacts there can leak secrets.
|
||||
- Quick audit workflow:
|
||||
```bash
|
||||
# Identify storage accounts with static website hosting enabled
|
||||
az storage blob service-properties show --account-name <acc-name> --auth-mode login
|
||||
@@ -89,19 +89,19 @@ az storage blob download -c '$web' --name iac/terraform.tfvars --file /dev/stdou
|
||||
```
|
||||
### 익명 blob 노출 감사
|
||||
|
||||
- 데이터를 노출할 수 있는 **storage accounts**를 찾습니다: `az storage account list | jq -r '.[] | select(.properties.allowBlobPublicAccess==true) | .name'`. `allowBlobPublicAccess`가 `false`이면 containers를 public으로 바꿀 수 없습니다.
|
||||
- **위험한 accounts**를 검사해 flag와 다른 취약한 설정을 확인합니다: `az storage account show --name <acc> --query '{allow:properties.allowBlobPublicAccess, minTls:properties.minimumTlsVersion}'`.
|
||||
- flag가 활성화된 경우 **container 수준 노출**을 열거합니다:
|
||||
- 데이터에 노출될 수 있는 **storage accounts**를 찾습니다: `az storage account list | jq -r '.[] | select(.properties.allowBlobPublicAccess==true) | .name'`. `allowBlobPublicAccess`가 `false`이면 container를 public으로 만들 수 없습니다.
|
||||
- 위험한 account를 검사해 플래그와 다른 약한 설정을 확인합니다: `az storage account show --name <acc> --query '{allow:properties.allowBlobPublicAccess, minTls:properties.minimumTlsVersion}'`.
|
||||
- 플래그가 활성화된 경우 container 수준 노출을 열거합니다:
|
||||
```bash
|
||||
az storage container list --account-name <acc> \
|
||||
--query '[].{name:name, access:properties.publicAccess}'
|
||||
```
|
||||
- `"Blob"`: 익명 reads는 **blob name이 알려진 경우에만** 허용됨 (listing 없음).
|
||||
- `"Container"`: 익명 **list + read** of every blob.
|
||||
- `"Blob"`: 익명 read는 **blob 이름이 알려진 경우에만** 허용됩니다(목록 조회 불가).
|
||||
- `"Container"`: 모든 blob에 대한 익명 **list + read**.
|
||||
- `null`: private; authentication required.
|
||||
- **credentials 없이 access 증명**:
|
||||
- If `publicAccess` is `Container`, anonymous listing works: `curl "https://<acc>.blob.core.windows.net/<container>?restype=container&comp=list"`.
|
||||
- For both `Blob` and `Container`, anonymous blob download works when the name is known:
|
||||
- **credentials 없이 access를 증명**:
|
||||
- `publicAccess`가 `Container`인 경우, 익명 listing이 동작합니다: `curl "https://<acc>.blob.core.windows.net/<container>?restype=container&comp=list"`.
|
||||
- `Blob`와 `Container` 둘 다에서, blob 이름을 알고 있으면 익명 blob download가 동작합니다:
|
||||
```bash
|
||||
az storage blob download -c <container> -n <blob> --account-name <acc> --file /dev/stdout
|
||||
# or via raw HTTP
|
||||
@@ -109,31 +109,31 @@ curl "https://<acc>.blob.core.windows.net/<container>/<blob>"
|
||||
```
|
||||
### Connect to Storage
|
||||
|
||||
접속할 수 있는 **storage**를 찾았다면 [**Microsoft Azure Storage Explorer**](https://azure.microsoft.com/es-es/products/storage/storage-explorer/) 도구를 사용해 접근할 수 있습니다.
|
||||
연결할 수 있는 **storage**를 찾으면 [**Microsoft Azure Storage Explorer**](https://azure.microsoft.com/es-es/products/storage/storage-explorer/) 도구를 사용해 접근할 수 있다.
|
||||
|
||||
## Access to Storage <a href="#about-blob-storage" id="about-blob-storage"></a>
|
||||
|
||||
### RBAC
|
||||
|
||||
**RBAC roles**를 사용하는 Entra ID principals로 storage accounts에 접근할 수 있으며, 이것이 권장되는 방법입니다.
|
||||
**RBAC roles**를 사용해 Entra ID principals로 storage accounts에 접근하는 것이 가능하며, 이것이 권장되는 방법이다.
|
||||
|
||||
### Access Keys
|
||||
|
||||
storage accounts에는 접근에 사용할 수 있는 access keys가 있습니다. 이는 storage account에 대한 f**ull access를 제공합니다.**
|
||||
storage accounts에는 접근에 사용할 수 있는 access keys가 있으며, 이를 사용해 접근할 수 있다. 이것은 **storage account에 대한 완전한 접근 권한**을 제공한다.
|
||||
|
||||
<figure><img src="../../../images/image (5).png" alt=""><figcaption></figcaption></figure>
|
||||
|
||||
### **Shared Keys & Lite Shared Keys**
|
||||
|
||||
[**Shared Keys**](https://learn.microsoft.com/en-us/rest/api/storageservices/authorize-with-shared-key)를 생성해 access keys로 서명하고, signed URL을 통해 특정 resources에 대한 access를 authorize할 수 있습니다.
|
||||
[**Shared Keys**](https://learn.microsoft.com/en-us/rest/api/storageservices/authorize-with-shared-key)를 생성해 access keys로 서명하면, signed URL을 통해 특정 리소스에 대한 access를 승인할 수 있다.
|
||||
|
||||
> [!NOTE]
|
||||
> `CanonicalizedResource` 부분은 storage services resource (URI)를 나타냅니다. 그리고 URL의 어떤 부분이 encoded되어 있다면, `CanonicalizedResource` 안에서도 encoded되어야 합니다.
|
||||
> `CanonicalizedResource` 부분은 storage services resource (URI)를 나타낸다. URL의 어느 부분이든 encoded 되어 있다면, `CanonicalizedResource` 내부에서도 encoded 되어야 한다.
|
||||
|
||||
> [!NOTE]
|
||||
> 이것은 요청을 authenticate하기 위해 `az` cli에서 기본적으로 **used by default by `az` cli** 사용됩니다. Entra ID principal credentials를 사용하게 하려면 `--auth-mode login` param을 지정하세요.
|
||||
> 이것은 요청 인증을 위해 `az` cli에서 기본적으로 **사용된다**. Entra ID principal credentials를 사용하게 하려면 `--auth-mode login` param을 지정하라.
|
||||
|
||||
- 다음 정보를 signing하여 blob, queue 및 file services용 **shared key**를 생성할 수 있습니다:
|
||||
- 다음 정보를 서명하여 blob, queue and file services용 **shared key**를 생성할 수 있다:
|
||||
```bash
|
||||
StringToSign = VERB + "\n" +
|
||||
Content-Encoding + "\n" +
|
||||
@@ -150,7 +150,7 @@ Range + "\n" +
|
||||
CanonicalizedHeaders +
|
||||
CanonicalizedResource;
|
||||
```
|
||||
- 다음 정보를 서명하여 **table services용 shared key**를 생성할 수 있습니다:
|
||||
- 다음 정보를 서명하여 **shared key for table services**를 생성할 수 있습니다:
|
||||
```bash
|
||||
StringToSign = VERB + "\n" +
|
||||
Content-MD5 + "\n" +
|
||||
@@ -158,7 +158,7 @@ Content-Type + "\n" +
|
||||
Date + "\n" +
|
||||
CanonicalizedResource;
|
||||
```
|
||||
- 다음 정보를 서명하여 **blob, queue 및 file services용 lite shared key**를 생성할 수 있습니다:
|
||||
- **blob, queue, file services**용 **lite shared key**를 다음 정보를 서명하여 생성할 수 있습니다:
|
||||
```bash
|
||||
StringToSign = VERB + "\n" +
|
||||
Content-MD5 + "\n" +
|
||||
@@ -172,7 +172,7 @@ CanonicalizedResource;
|
||||
StringToSign = Date + "\n"
|
||||
CanonicalizedResource
|
||||
```
|
||||
그런 다음, key를 사용하려면 Authorization header에서 다음 syntax를 따르며 사용할 수 있습니다:
|
||||
그다음, key를 사용하려면 Authorization header에서 다음 syntax를 따르시면 됩니다:
|
||||
```bash
|
||||
Authorization="[SharedKey|SharedKeyLite] <AccountName>:<Signature>"
|
||||
#e.g.
|
||||
@@ -186,24 +186,24 @@ Content-Length: 0
|
||||
```
|
||||
### **Shared Access Signature** (SAS)
|
||||
|
||||
Shared Access Signatures (SAS)는 Azure Storage 계정의 resource에 **특정 permissions를 부여**하면서 계정의 access keys를 노출하지 않는, secure하고 time-limited된 URLs입니다. access keys가 모든 resource에 대한 전체 administrative access를 제공하는 반면, SAS는 permissions(read 또는 write 같은)을 지정하고 expiration time을 정의하여 granular control을 가능하게 합니다.
|
||||
Shared Access Signatures (SAS)는 Azure Storage 계정의 access keys를 노출하지 않고 **resource에 접근할 수 있는 특정 permissions를 부여하는** 안전한 시간 제한 URL입니다. access keys가 모든 resource에 대한 전체 administrative access를 제공하는 반면, SAS는 permissions를 지정하고 만료 시간을 정의함으로써 세밀한 제어를 가능하게 합니다.
|
||||
|
||||
#### SAS Types
|
||||
|
||||
- **User delegation SAS**: **Entra ID principal**에서 생성되며, 이 principal이 SAS에 서명하고 user의 permissions를 SAS로 delegate합니다. **blob and data lake storage**에서만 사용할 수 있습니다 ([docs](https://learn.microsoft.com/en-us/rest/api/storageservices/create-user-delegation-sas)). 생성된 user delegated SAS는 모두 **revoke**할 수 있습니다.
|
||||
- user가 가진 permissions보다 더 많은 permissions로 delegation SAS를 생성하는 것은 가능해 보일 수 있습니다. 그러나 principal에 그 permissions가 없으면 동작하지 않습니다 (no privesc).
|
||||
- **Service SAS**: storage account **access keys** 중 하나로 서명됩니다. 단일 storage service 내의 특정 resource에 대한 access를 부여하는 데 사용할 수 있습니다. key가 renewed되면 SAS는 더 이상 작동하지 않습니다.
|
||||
- **Account SAS**: 이것도 storage account **access keys** 중 하나로 서명됩니다. storage account services(Blob, Queue, Table, File) 전반의 resources에 대한 access를 부여하며 service-level operations를 포함할 수 있습니다.
|
||||
- **User delegation SAS**: 이는 **Entra ID principal**에서 생성되며, 이 principal이 SAS를 sign하고 user의 permissions를 SAS로 delegate합니다. **blob and data lake storage**에서만 사용할 수 있습니다 ([docs](https://learn.microsoft.com/en-us/rest/api/storageservices/create-user-delegation-sas)). 생성된 모든 user delegated SAS를 **revoke**할 수 있습니다.
|
||||
- 사용자의 권한보다 "더 많은" permissions를 가진 delegation SAS를 생성할 수 있는 것처럼 보일 수 있습니다. 그러나 principal이 해당 permissions를 가지고 있지 않으면 동작하지 않습니다(privesc 없음).
|
||||
- **Service SAS**: storage account의 **access keys** 중 하나를 사용해 sign됩니다. 단일 storage service 내의 특정 resource에 대한 access를 부여하는 데 사용할 수 있습니다. key가 renewed되면 SAS는 동작을 멈춥니다.
|
||||
- **Account SAS**: 이것도 storage account의 **access keys** 중 하나로 sign됩니다. storage account services(Blob, Queue, Table, File) 전반의 resource에 대한 access를 부여하며 service-level operations를 포함할 수 있습니다.
|
||||
|
||||
**access key**로 서명된 SAS URL은 다음과 같습니다:
|
||||
**access key**로 sign된 SAS URL은 다음과 같습니다:
|
||||
|
||||
- `https://<container_name>.blob.core.windows.net/newcontainer?sp=r&st=2021-09-26T18:15:21Z&se=2021-10-27T02:14:21Z&spr=https&sv=2021-07-08&sr=c&sig=7S%2BZySOgy4aA3Dk0V1cJyTSIf1cW%2Fu3WFkhHV32%2B4PE%3D`
|
||||
|
||||
**user delegation**으로 서명된 SAS URL은 다음과 같습니다:
|
||||
**user delegation**으로 sign된 SAS URL은 다음과 같습니다:
|
||||
|
||||
- `https://<container_name>.blob.core.windows.net/testing-container?sp=r&st=2024-11-22T15:07:40Z&se=2024-11-22T23:07:40Z&skoid=d77c71a1-96e7-483d-bd51-bd753aa66e62&sktid=fdd066e1-ee37-49bc-b08f-d0e152119b04&skt=2024-11-22T15:07:40Z&ske=2024-11-22T23:07:40Z&sks=b&skv=2022-11-02&spr=https&sv=2022-11-02&sr=c&sig=7s5dJyeE6klUNRulUj9TNL0tMj2K7mtxyRc97xbYDqs%3D`
|
||||
|
||||
몇 가지 **http params**에 주의하세요:
|
||||
몇 가지 **http params**에 주목하세요:
|
||||
|
||||
- **`se`** param은 SAS의 **expiration date**를 나타냅니다
|
||||
- **`sp`** param은 SAS의 **permissions**를 나타냅니다
|
||||
@@ -211,42 +211,42 @@ Shared Access Signatures (SAS)는 Azure Storage 계정의 resource에 **특정 p
|
||||
|
||||
#### SAS permissions
|
||||
|
||||
SAS를 생성할 때는 부여할 permissions를 지정해야 합니다. SAS가 생성되는 object에 따라 포함될 수 있는 permissions가 달라질 수 있습니다. 예를 들면:
|
||||
SAS를 생성할 때 부여해야 하는 permissions를 지정해야 합니다. SAS를 생성하는 대상 objet에 따라 포함될 수 있는 permissions가 다를 수 있습니다. 예를 들면:
|
||||
|
||||
- (a)dd, (c)reate, (d)elete, (e)xecute, (f)ilter_by_tags, (i)set_immutability_policy, (l)ist, (m)ove, (r)ead, (t)ag, (w)rite, (x)delete_previous_version, (y)permanent_delete
|
||||
|
||||
## SFTP Support for Azure Blob Storage
|
||||
|
||||
Azure Blob Storage는 이제 SSH File Transfer Protocol (SFTP)를 지원하여, custom solutions나 third-party products 없이도 Blob Storage로 직접 secure file transfer와 management를 가능하게 합니다.
|
||||
Azure Blob Storage는 이제 SSH File Transfer Protocol (SFTP)을 지원하며, 맞춤형 솔루션이나 third-party products 없이도 Blob Storage로 직접 안전한 file transfer와 관리를 가능하게 합니다.
|
||||
|
||||
### Key Features
|
||||
|
||||
- Protocol Support: SFTP는 hierarchical namespace (HNS)로 구성된 Blob Storage accounts에서 동작합니다. 이는 blobs를 directories와 subdirectories로 정리하여 탐색을 더 쉽게 합니다.
|
||||
- Security: SFTP는 authentication에 local user identities를 사용하며 RBAC나 ABAC와 통합되지 않습니다. 각 local user는 다음 방식으로 authenticate할 수 있습니다:
|
||||
- Protocol Support: SFTP는 hierarchical namespace (HNS)로 구성된 Blob Storage accounts에서 동작합니다. 이는 더 쉬운 탐색을 위해 blobs를 directories와 subdirectories로 조직합니다.
|
||||
- Security: SFTP는 local user identities를 사용할 수 있지만, authorization을 위해 Microsoft Entra ID 기반 access와 Azure RBAC도 지원합니다. 즉, local SFTP users를 만들지 않고도 일반적인 Blob Storage data-plane roles로 access를 부여할 수 있습니다. local users는 다음을 통해 authenticate할 수 있습니다:
|
||||
- Azure-generated passwords
|
||||
- Public-private SSH key pairs
|
||||
- Granular Permissions: Read, Write, Delete, List 같은 permissions를 최대 100개의 containers에 대해 local users에게 할당할 수 있습니다.
|
||||
- Networking Considerations: SFTP connections는 port 22를 통해 이루어집니다. Azure는 SFTP traffic을 secure하기 위해 firewalls, private endpoints, virtual networks 같은 network configurations를 지원합니다.
|
||||
- Granular Permissions: Read, Write, Delete, List 같은 permissions는 최대 100개의 containers에 대해 local users에게 할당할 수 있습니다.
|
||||
- Networking Considerations: SFTP connections는 port 22를 통해 만들어집니다. Azure는 SFTP traffic을 보호하기 위해 firewalls, private endpoints, virtual networks 같은 network configurations를 지원합니다.
|
||||
|
||||
### Setup Requirements
|
||||
|
||||
- Hierarchical Namespace: storage account를 생성할 때 HNS가 활성화되어 있어야 합니다.
|
||||
- Supported Encryption: Microsoft Security Development Lifecycle (SDL) 승인 cryptographic algorithms(예: rsa-sha2-256, ecdsa-sha2-nistp256)를 요구합니다.
|
||||
- Hierarchical Namespace: storage account를 생성할 때 HNS가 enabled되어 있어야 합니다.
|
||||
- Supported Encryption: Microsoft Security Development Lifecycle (SDL) approved cryptographic algorithms(예: rsa-sha2-256, ecdsa-sha2-nistp256)이 필요합니다.
|
||||
- SFTP Configuration:
|
||||
- storage account에서 SFTP를 enable합니다.
|
||||
- 적절한 permissions를 가진 local user identities를 생성합니다.
|
||||
- 사용자의 home directories를 설정하여 container 내에서의 시작 위치를 정의합니다.
|
||||
- local-user access의 경우, 적절한 permissions를 가진 local user identities를 만듭니다.
|
||||
- local users의 경우, container 내에서 시작 위치를 정의하도록 home directories를 구성합니다.
|
||||
|
||||
### Permissions
|
||||
|
||||
| Permission | Symbol | Description |
|
||||
| ---------------------- | ------ | ------------------------------------ |
|
||||
| **Read** | `r` | 파일 내용을 읽습니다. |
|
||||
| **Read** | `r` | 파일 내용을 읽습니다. |
|
||||
| **Write** | `w` | 파일을 업로드하고 directories를 생성합니다. |
|
||||
| **List** | `l` | directories의 contents를 나열합니다. |
|
||||
| **Delete** | `d` | 파일 또는 directories를 삭제합니다. |
|
||||
| **Create** | `c` | 파일 또는 directories를 생성합니다. |
|
||||
| **Modify Ownership** | `o` | owning user 또는 group을 변경합니다. |
|
||||
| **List** | `l` | directories의 내용을 나열합니다. |
|
||||
| **Delete** | `d` | 파일 또는 directories를 삭제합니다. |
|
||||
| **Create** | `c` | 파일 또는 directories를 생성합니다. |
|
||||
| **Modify Ownership** | `o` | 소유 user 또는 group을 변경합니다. |
|
||||
| **Modify Permissions** | `p` | 파일 또는 directories의 ACLs를 변경합니다. |
|
||||
|
||||
## Enumeration
|
||||
@@ -379,7 +379,7 @@ az storage account local-user list \
|
||||
{{#tab name="Az PowerShell" }}
|
||||
|
||||
<details>
|
||||
<summary>Az PowerShell 열거</summary>
|
||||
<summary>Az PowerShell enumeration</summary>
|
||||
```powershell
|
||||
# Get storage accounts
|
||||
Get-AzStorageAccount | fl
|
||||
@@ -442,13 +442,13 @@ New-AzStorageBlobSASToken `
|
||||
{{#endtab }}
|
||||
{{#endtabs }}
|
||||
|
||||
### File Shares
|
||||
### 파일 공유
|
||||
|
||||
{{#ref}}
|
||||
az-file-shares.md
|
||||
{{#endref}}
|
||||
|
||||
## Privilege Escalation
|
||||
## 권한 상승
|
||||
|
||||
{{#ref}}
|
||||
../az-privilege-escalation/az-storage-privesc.md
|
||||
@@ -471,6 +471,7 @@ az-file-shares.md
|
||||
- [https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blobs-introduction](https://learn.microsoft.com/en-us/azure/storage/blobs/storage-blobs-introduction)
|
||||
- [https://learn.microsoft.com/en-us/azure/storage/common/storage-sas-overview](https://learn.microsoft.com/en-us/azure/storage/common/storage-sas-overview)
|
||||
- [https://learn.microsoft.com/en-us/azure/storage/blobs/secure-file-transfer-protocol-support](https://learn.microsoft.com/en-us/azure/storage/blobs/secure-file-transfer-protocol-support)
|
||||
- [https://learn.microsoft.com/en-us/azure/storage/blobs/secure-file-transfer-protocol-support-entra-id-based-access](https://learn.microsoft.com/en-us/azure/storage/blobs/secure-file-transfer-protocol-support-entra-id-based-access)
|
||||
- [Holiday Hack Challenge 2025 – Spare Key (Azure static website SAS leak)](https://0xdf.gitlab.io/holidayhack2025/act1/spare-key)
|
||||
- [Holiday Hack Challenge 2025: Blob Storage (Storage Secrets)](https://0xdf.gitlab.io/holidayhack2025/act1/blob-storage)
|
||||
- [https://learn.microsoft.com/en-us/cli/azure/storage/account](https://learn.microsoft.com/en-us/cli/azure/storage/account)
|
||||
|
||||
Reference in New Issue
Block a user