Translated ['.github/pull_request_template.md', 'src/pentesting-cloud/az

This commit is contained in:
Translator
2024-12-31 19:16:19 +00:00
parent 7770a50092
commit ea3a11546a
244 changed files with 8714 additions and 11561 deletions

View File

@@ -2,17 +2,17 @@
{{#include ../../banners/hacktricks-training.md}}
## Basic Information
## 基本情報
**Before start pentesting** a Digital Ocean environment there are a few **basics things you need to know** about how DO works to help you understand what you need to do, how to find misconfigurations and how to exploit them.
**Digital Ocean環境のペンテストを始める前に**、DOの動作について知っておくべき**基本的なこと**がいくつかあります。これにより、何をすべきか、誤設定を見つける方法、そしてそれをどのように悪用するかを理解するのに役立ちます。
Concepts such as hierarchy, access and other basic concepts are explained in:
階層、アクセス、その他の基本的な概念については、以下に説明されています:
{{#ref}}
do-basic-information.md
{{#endref}}
## Basic Enumeration
## 基本的な列挙
### SSRF
@@ -20,28 +20,22 @@ do-basic-information.md
https://book.hacktricks.xyz/pentesting-web/ssrf-server-side-request-forgery/cloud-ssrf
{{#endref}}
### Projects
### プロジェクト
To get a list of the projects and resources running on each of them from the CLI check:
CLIから各プロジェクトで実行されているプロジェクトとリソースのリストを取得するには、以下を確認してください
{{#ref}}
do-services/do-projects.md
{{#endref}}
### Whoami
```bash
doctl account get
```
## Services Enumeration
## サービス列挙
{{#ref}}
do-services/
{{#endref}}
{{#include ../../banners/hacktricks-training.md}}

View File

@@ -1,139 +1,127 @@
# DO - Basic Information
# DO - 基本情報
{{#include ../../banners/hacktricks-training.md}}
## Basic Information
## 基本情報
DigitalOcean is a **cloud computing platform that provides users with a variety of services**, including virtual private servers (VPS) and other resources for building, deploying, and managing applications. **DigitalOcean's services are designed to be simple and easy to use**, making them **popular among developers and small businesses**.
DigitalOceanは、**ユーザーにさまざまなサービスを提供するクラウドコンピューティングプラットフォーム**です。これには、仮想プライベートサーバーVPSや、アプリケーションの構築、展開、管理のためのその他のリソースが含まれます。**DigitalOceanのサービスはシンプルで使いやすいように設計されており、**開発者や小規模ビジネスの間で**人気があります**。
Some of the key features of DigitalOcean include:
DigitalOceanの主な機能には以下が含まれます
- **Virtual private servers (VPS)**: DigitalOcean provides VPS that can be used to host websites and applications. These VPS are known for their simplicity and ease of use, and can be quickly and easily deployed using a variety of pre-built "droplets" or custom configurations.
- **Storage**: DigitalOcean offers a range of storage options, including object storage, block storage, and managed databases, that can be used to store and manage data for websites and applications.
- **Development and deployment tools**: DigitalOcean provides a range of tools that can be used to build, deploy, and manage applications, including APIs and pre-built droplets.
- **Security**: DigitalOcean places a strong emphasis on security, and offers a range of tools and features to help users keep their data and applications safe. This includes encryption, backups, and other security measures.
- **仮想プライベートサーバー(VPS**DigitalOceanは、ウェブサイトやアプリケーションをホストするために使用できるVPSを提供しています。これらのVPSは、そのシンプルさと使いやすさで知られており、さまざまな事前構築された「ドロップレット」やカスタム構成を使用して迅速かつ簡単に展開できます。
- **ストレージ**DigitalOceanは、オブジェクトストレージ、ブロックストレージ、管理されたデータベースなど、ウェブサイトやアプリケーションのデータを保存および管理するために使用できるさまざまなストレージオプションを提供しています。
- **開発および展開ツール**DigitalOceanは、APIや事前構築されたドロップレットを含む、アプリケーションを構築、展開、管理するために使用できるさまざまなツールを提供しています。
- **セキュリティ**DigitalOceanはセキュリティを重視しており、ユーザーがデータやアプリケーションを安全に保つためのさまざまなツールや機能を提供しています。これには、暗号化、バックアップ、その他のセキュリティ対策が含まれます。
Overall, DigitalOcean is a cloud computing platform that provides users with the tools and resources they need to build, deploy, and manage applications in the cloud. Its services are designed to be simple and easy to use, making them popular among developers and small businesses.
全体として、DigitalOceanは、ユーザーがクラウドでアプリケーションを構築、展開、管理するために必要なツールとリソースを提供するクラウドコンピューティングプラットフォームです。そのサービスはシンプルで使いやすいように設計されており、開発者や小規模ビジネスの間で人気があります。
### Main Differences from AWS
### AWSとの主な違い
One of the main differences between DigitalOcean and AWS is the **range of services they offer**. **DigitalOcean focuses on providing simple** and easy-to-use virtual private servers (VPS), storage, and development and deployment tools. **AWS**, on the other hand, offers a **much broader range of services**, including VPS, storage, databases, machine learning, analytics, and many other services. This means that AWS is more suitable for complex, enterprise-level applications, while DigitalOcean is more suited to small businesses and developers.
DigitalOceanとAWSの主な違いの1つは、**提供するサービスの範囲**です。**DigitalOceanはシンプルで**使いやすい仮想プライベートサーバーVPS、ストレージ、開発および展開ツールの提供に焦点を当てています。**AWS**は、VPS、ストレージ、データベース、機械学習、分析、その他多くのサービスを含む**はるかに広範なサービスを提供しています**。これは、AWSが複雑なエンタープライズレベルのアプリケーションにより適している一方で、DigitalOceanは小規模ビジネスや開発者により適していることを意味します。
Another key difference between the two platforms is the **pricing structure**. **DigitalOcean's pricing is generally more straightforward and easier** to understand than AWS, with a range of pricing plans that are based on the number of droplets and other resources used. AWS, on the other hand, has a more complex pricing structure that is based on a variety of factors, including the type and amount of resources used. This can make it more difficult to predict costs when using AWS.
2つのプラットフォームのもう1つの重要な違いは、**価格構造**です。**DigitalOceanの価格は一般的により明確で理解しやすい**もので、使用するドロップレットやその他のリソースの数に基づいたさまざまな価格プランがあります。一方、AWSは、使用するリソースの種類や量など、さまざまな要因に基づいたより複雑な価格構造を持っています。これにより、AWSを使用する際のコスト予測が難しくなることがあります。
## Hierarchy
## 階層
### User
### ユーザー
A user is what you expect, a user. He can **create Teams** and **be a member of different teams.**
ユーザーは、あなたが期待する通りのユーザーです。彼は**チームを作成**し、**異なるチームのメンバーになることができます。**
### **Team**
### **チーム**
A team is a group of **users**. When a user creates a team he has the **role owner on that team** and he initially **sets up the billing info**. **Other** user can then be **invited** to the team.
チームは**ユーザーのグループ**です。ユーザーがチームを作成すると、彼はそのチームの**オーナーの役割を持ち**、最初に**請求情報を設定します**。**他の**ユーザーはそのチームに**招待される**ことができます。
Inside the team there might be several **projects**. A project is just a **set of services running**. It can be used to **separate different infra stages**, like prod, staging, dev...
チーム内にはいくつかの**プロジェクト**が存在する場合があります。プロジェクトは単に**実行中のサービスのセット**です。これは、prodstagingdevなど、異なるインフラの段階を**分離するために使用できます**。
### Project
### プロジェクト
As explained, a project is just a container for all the **services** (droplets, spaces, databases, kubernetes...) **running together inside of it**.\
A Digital Ocean project is very similar to a GCP project without IAM.
前述のように、プロジェクトはすべての**サービス**ドロップレット、スペース、データベース、Kubernetesなどが**一緒に実行されるためのコンテナ**です。\
Digital Oceanのプロジェクトは、IAMなしのGCPプロジェクトに非常に似ています。
## Permissions
## 権限
### Team
### チーム
Basically all members of a team have **access to the DO resources in all the projects created within the team (with more or less privileges).**
基本的に、チームのすべてのメンバーは、**チーム内で作成されたすべてのプロジェクトのDOリソースにアクセスできます特権の有無にかかわらず**
### Roles
### 役割
Each **user inside a team** can have **one** of the following three **roles** inside of it:
チーム内の各**ユーザー**は、次の3つの**役割**のいずれかを持つことができます:
| Role | Shared Resources | Billing Information | Team Settings |
| ---------- | ---------------- | ------------------- | ------------- |
| **Owner** | Full access | Full access | Full access |
| **Biller** | No access | Full access | No access |
| **Member** | Full access | No access | No access |
| 役割 | 共有リソース | 請求情報 | チーム設定 |
| ---------- | ------------ | --------- | ---------- |
| **オーナー** | フルアクセス | フルアクセス | フルアクセス |
| **ビラー** | アクセスなし | フルアクセス | アクセスなし |
| **メンバー** | フルアクセス | アクセスなし | アクセスなし |
**Owner** and **member can list the users** and check their **roles** (biller cannot).
**オーナー**と**メンバーはユーザーをリストし**、その**役割を確認できます**(ビラーはできません)。
## Access
## アクセス
### Username + password (MFA)
### ユーザー名 + パスワード(MFA
As in most of the platforms, in order to access to the GUI you can use a set of **valid username and password** to **access** the cloud **resources**. Once logged in you can see **all the teams you are part** of in [https://cloud.digitalocean.com/account/profile](https://cloud.digitalocean.com/account/profile).\
And you can see all your activity in [https://cloud.digitalocean.com/account/activity](https://cloud.digitalocean.com/account/activity).
ほとんどのプラットフォームと同様に、GUIにアクセスするには、**有効なユーザー名とパスワードのセット**を使用して**クラウドリソースにアクセス**できます。ログインすると、[https://cloud.digitalocean.com/account/profile](https://cloud.digitalocean.com/account/profile)で**自分が参加しているすべてのチーム**を見ることができます。\
また、[https://cloud.digitalocean.com/account/activity](https://cloud.digitalocean.com/account/activity)で自分のすべての活動を見ることができます。
**MFA** can be **enabled** in a user and **enforced** for all the users in a **team** to access the team.
**MFA**はユーザーに**有効化**でき、**チーム**内のすべてのユーザーに**強制**してチームにアクセスさせることができます。
### API keys
In order to use the API, users can **generate API keys**. These will always come with Read permissions but **Write permission are optional**.\
The API keys look like this:
### APIキー
APIを使用するために、ユーザーは**APIキーを生成**できます。これらは常に読み取り権限が付与されますが、**書き込み権限はオプションです**。\
APIキーは次のようになります
```
dop_v1_1946a92309d6240274519275875bb3cb03c1695f60d47eaa1532916502361836
```
The cli tool is [**doctl**](https://github.com/digitalocean/doctl#installing-doctl). Initialise it (you need a token) with:
CLIツールは[**doctl**](https://github.com/digitalocean/doctl#installing-doctl)です。これを初期化します(トークンが必要です):
```bash
doctl auth init # Asks for the token
doctl auth init --context my-context # Login with a different token
doctl auth list # List accounts
```
デフォルトでは、このトークンはMacの`/Users/<username>/Library/Application Support/doctl/config.yaml`に平文で書き込まれます。
By default this token will be written in clear-text in Mac in `/Users/<username>/Library/Application Support/doctl/config.yaml`.
### スペースアクセスキー
### Spaces access keys
These are keys that give **access to the Spaces** (like S3 in AWS or Storage in GCP).
They are composed by a **name**, a **keyid** and a **secret**. An example could be:
これらは**スペースへのアクセス**を提供するキーですAWSのS3やGCPのStorageのように
それらは**名前**、**keyid**、および**秘密**で構成されています。例としては次のようになります:
```
Name: key-example
Keyid: DO00ZW4FABSGZHAABGFX
Secret: 2JJ0CcQZ56qeFzAJ5GFUeeR4Dckarsh6EQSLm87MKlM
```
### OAuthアプリケーション
### OAuth Application
OAuthアプリケーションは**Digital Oceanへのアクセスを許可**されることがあります。
OAuth applications can be granted **access over Digital Ocean**.
[https://cloud.digitalocean.com/account/api/applications](https://cloud.digitalocean.com/account/api/applications)で**OAuthアプリケーションを作成**し、[https://cloud.digitalocean.com/account/api/access](https://cloud.digitalocean.com/account/api/access)で全ての**許可されたOAuthアプリケーション**を確認することができます。
It's possible to **create OAuth applications** in [https://cloud.digitalocean.com/account/api/applications](https://cloud.digitalocean.com/account/api/applications) and check all **allowed OAuth applications** in [https://cloud.digitalocean.com/account/api/access](https://cloud.digitalocean.com/account/api/access).
### SSHキー
### SSH Keys
[https://cloud.digitalocean.com/account/security](https://cloud.digitalocean.com/account/security)の**コンソール**から**Digital OceanチームにSSHキーを追加**することができます。
It's possible to add **SSH keys to a Digital Ocean Team** from the **console** in [https://cloud.digitalocean.com/account/security](https://cloud.digitalocean.com/account/security).
このようにして、**新しいドロップレットを作成すると、SSHキーが設定**され、パスワードなしで**SSH経由でログイン**できるようになります(新しく[アップロードされたSSHキーはセキュリティ上の理由から既存のドロップレットには設定されません](https://docs.digitalocean.com/products/droplets/how-to/add-ssh-keys/to-existing-droplet/))。
This way, if you create a **new droplet, the SSH key will be set** on it and you will be able to **login via SSH** without password (note that newly [uploaded SSH keys aren't set in already existent droplets for security reasons](https://docs.digitalocean.com/products/droplets/how-to/add-ssh-keys/to-existing-droplet/)).
### Functions Authentication Token
The way **to trigger a function via REST API** (always enabled, it's the method the cli uses) is by triggering a request with an **authentication token** like:
### 関数認証トークン
**REST API経由で関数をトリガーする方法**常に有効で、cliが使用する方法は、**認証トークン**を使ってリクエストをトリガーすることです。
```bash
curl -X POST "https://faas-lon1-129376a7.doserverless.co/api/v1/namespaces/fn-c100c012-65bf-4040-1230-2183764b7c23/actions/functionname?blocking=true&result=true" \
-H "Content-Type: application/json" \
-H "Authorization: Basic MGU0NTczZGQtNjNiYS00MjZlLWI2YjctODk0N2MyYTA2NGQ4OkhwVEllQ2t4djNZN2x6YjJiRmFGc1FERXBySVlWa1lEbUxtRE1aRTludXA1UUNlU2VpV0ZGNjNqWnVhYVdrTFg="
-H "Content-Type: application/json" \
-H "Authorization: Basic MGU0NTczZGQtNjNiYS00MjZlLWI2YjctODk0N2MyYTA2NGQ4OkhwVEllQ2t4djNZN2x6YjJiRmFGc1FERXBySVlWa1lEbUxtRE1aRTludXA1UUNlU2VpV0ZGNjNqWnVhYVdrTFg="
```
## ログ
## Logs
### ユーザーログ
### User logs
**ユーザーのログ**は[**https://cloud.digitalocean.com/account/activity**](https://cloud.digitalocean.com/account/activity)にあります。
The **logs of a user** can be found in [**https://cloud.digitalocean.com/account/activity**](https://cloud.digitalocean.com/account/activity)
### チームログ
### Team logs
**チームのログ**は[**https://cloud.digitalocean.com/account/security**](https://cloud.digitalocean.com/account/security)にあります。
The **logs of a team** can be found in [**https://cloud.digitalocean.com/account/security**](https://cloud.digitalocean.com/account/security)
## References
## 参考文献
- [https://docs.digitalocean.com/products/teams/how-to/manage-membership/](https://docs.digitalocean.com/products/teams/how-to/manage-membership/)
{{#include ../../banners/hacktricks-training.md}}

View File

@@ -1,11 +1,7 @@
# DO - Permissions for a Pentest
# DO - ペンテストのための権限
{{#include ../../banners/hacktricks-training.md}}
DO doesn't support granular permissions. So the **minimum role** that allows a user to review all the resources is **member**. A pentester with this permission will be able to perform harmful activities, but it's what it's.
DOは細かい権限をサポートしていません。したがって、ユーザーがすべてのリソースを確認できる**最小の役割**は**メンバー**です。この権限を持つペンテスターは有害な活動を行うことができますが、それが現実です。
{{#include ../../banners/hacktricks-training.md}}

View File

@@ -1,23 +1,19 @@
# DO - Services
# DO - サービス
{{#include ../../../banners/hacktricks-training.md}}
DO offers a few services, here you can find how to **enumerate them:**
DOはいくつかのサービスを提供しています。ここではそれらを**列挙する方法**を見つけることができます:
- [**Apps**](do-apps.md)
- [**Container Registry**](do-container-registry.md)
- [**Databases**](do-databases.md)
- [**Droplets**](do-droplets.md)
- [**Functions**](do-functions.md)
- [**Images**](do-images.md)
- [**アプリ**](do-apps.md)
- [**コンテナレジストリ**](do-container-registry.md)
- [**データベース**](do-databases.md)
- [**ドロップレット**](do-droplets.md)
- [**関数**](do-functions.md)
- [**イメージ**](do-images.md)
- [**Kubernetes (DOKS)**](do-kubernetes-doks.md)
- [**Networking**](do-networking.md)
- [**Projects**](do-projects.md)
- [**Spaces**](do-spaces.md)
- [**Volumes**](do-volumes.md)
- [**ネットワーキング**](do-networking.md)
- [**プロジェクト**](do-projects.md)
- [**スペース**](do-spaces.md)
- [**ボリューム**](do-volumes.md)
{{#include ../../../banners/hacktricks-training.md}}

View File

@@ -2,18 +2,17 @@
{{#include ../../../banners/hacktricks-training.md}}
## Basic Information
## 基本情報
[From the docs:](https://docs.digitalocean.com/glossary/app-platform/) App Platform is a Platform-as-a-Service (PaaS) offering that allows developers to **publish code directly to DigitalOcean** servers without worrying about the underlying infrastructure.
[ドキュメントから:](https://docs.digitalocean.com/glossary/app-platform/) App Platformは、開発者が**DigitalOcean**サーバーに直接コードを**公開**できるプラットフォーム・アズ・ア・サービスPaaSです。基盤となるインフラストラクチャについて心配する必要はありません。
You can run code directly from **github**, **gitlab**, **docker hub**, **DO container registry** (or a sample app).
**github****gitlab**、**docker hub**、**DOコンテナレジストリ**(またはサンプルアプリ)から直接コードを実行できます。
When defining an **env var** you can set it as **encrypted**. The only way to **retreive** its value is executing **commands** inside the host runnig the app.
**env var**を定義する際には、**暗号化**されたものとして設定できます。その値を**取得**する唯一の方法は、アプリを実行しているホスト内で**コマンド**を実行することです。
An **App URL** looks like this [https://dolphin-app-2tofz.ondigitalocean.app](https://dolphin-app-2tofz.ondigitalocean.app)
### Enumeration
**App URL**は次のようになります [https://dolphin-app-2tofz.ondigitalocean.app](https://dolphin-app-2tofz.ondigitalocean.app)
### 列挙
```bash
doctl apps list # You should get URLs here
doctl apps spec get <app-id> # Get yaml (including env vars, might be encrypted)
@@ -21,18 +20,13 @@ doctl apps logs <app-id> # Get HTTP logs
doctl apps list-alerts <app-id> # Get alerts
doctl apps list-regions # Get available regions and the default one
```
> [!CAUTION]
> **Apps doesn't have metadata endpoint**
> **アプリにはメタデータエンドポイントがありません**
### RCE & Encrypted env vars
### RCE & 暗号化された環境変数
To execute code directly in the container executing the App you will need **access to the console** and go to **`https://cloud.digitalocean.com/apps/<app-id>/console/<app-name>`**.
アプリを実行しているコンテナ内で直接コードを実行するには、**コンソールへのアクセス**が必要で、**`https://cloud.digitalocean.com/apps/<app-id>/console/<app-name>`**に移動します。
That will give you a **shell**, and just executing **`env`** you will be able to see **all the env vars** (including the ones defined as **encrypted**).
これにより、**シェル**が得られ、**`env`**を実行することで、**すべての環境変数****暗号化**されたものを含む)を見ることができます。
{{#include ../../../banners/hacktricks-training.md}}

View File

@@ -2,14 +2,13 @@
{{#include ../../../banners/hacktricks-training.md}}
## Basic Information
## 基本情報
DigitalOcean Container Registry is a service provided by DigitalOcean that **allows you to store and manage Docker images**. It is a **private** registry, which means that the images that you store in it are only accessible to you and users that you grant access to. This allows you to securely store and manage your Docker images, and use them to deploy containers on DigitalOcean or any other environment that supports Docker.
DigitalOcean Container Registryは、**Dockerイメージを保存および管理することを可能にする**、DigitalOceanが提供するサービスです。これは**プライベート**レジストリであり、保存したイメージはあなたと、あなたがアクセスを許可したユーザーのみがアクセスできます。これにより、Dockerイメージを安全に保存および管理し、DigitalOceanやDockerをサポートする他の環境でコンテナをデプロイするために使用できます。
When creating a Container Registry it's possible to **create a secret with pull images access (read) over it in all the namespaces** of Kubernetes clusters.
### Connection
Container Registryを作成する際には、Kubernetesクラスターのすべてのネームスペースで**プルイメージアクセス(読み取り)を持つシークレットを作成することが可能です**。
### 接続
```bash
# Using doctl
doctl registry login
@@ -19,9 +18,7 @@ docker login registry.digitalocean.com
Username: <paste-api-token>
Password: <paste-api-token>
```
### Enumeration
### 列挙
```bash
# Get creds to access the registry from the API
doctl registry docker-config
@@ -29,9 +26,4 @@ doctl registry docker-config
# List
doctl registry repository list-v2
```
{{#include ../../../banners/hacktricks-training.md}}

View File

@@ -2,22 +2,19 @@
{{#include ../../../banners/hacktricks-training.md}}
## Basic Information
## 基本情報
With DigitalOcean Databases, you can easily **create and manage databases in the cloud** without having to worry about the underlying infrastructure. The service offers a variety of database options, including **MySQL**, **PostgreSQL**, **MongoDB**, and **Redis**, and provides tools for administering and monitoring your databases. DigitalOcean Databases is designed to be highly scalable, reliable, and secure, making it an ideal choice for powering modern applications and websites.
DigitalOcean Databasesを使用すると、基盤となるインフラストラクチャを気にすることなく、**クラウド内でデータベースを簡単に作成および管理**できます。このサービスは、**MySQL**、**PostgreSQL**、**MongoDB**、および**Redis**など、さまざまなデータベースオプションを提供し、データベースの管理および監視のためのツールを提供します。DigitalOcean Databasesは、高いスケーラビリティ、信頼性、およびセキュリティを備えており、現代のアプリケーションやウェブサイトを支える理想的な選択肢です。
### Connections details
### 接続の詳細
When creating a database you can select to configure it **accessible from a public network**, or just from inside a **VPC**. Moreover, it request you to **whitelist IPs that can access it** (your IPv4 can be one).
The **host**, **port**, **dbname**, **username**, and **password** are shown in the **console**. You can even download the AD certificate to connect securely.
データベースを作成する際に、**パブリックネットワークからアクセス可能**にするか、**VPC**内からのみアクセス可能にするかを選択できます。さらに、**アクセスできるIPをホワイトリストに登録する**必要がありますあなたのIPv4がその一つになる可能性があります
**ホスト**、**ポート**、**dbname**、**ユーザー名**、および**パスワード**は、**コンソール**に表示されます。安全に接続するためにAD証明書をダウンロードすることもできます。
```bash
sql -h db-postgresql-ams3-90864-do-user-2700959-0.b.db.ondigitalocean.com -U doadmin -d defaultdb -p 25060
```
### Enumeration
### 列挙
```bash
# Databse clusters
doctl databases list
@@ -39,9 +36,4 @@ doctl databases backups <db-id> # List backups of DB
# Pools
doctl databases pool list <db-id> # List pools of DB
```
{{#include ../../../banners/hacktricks-training.md}}

View File

@@ -2,47 +2,46 @@
{{#include ../../../banners/hacktricks-training.md}}
## Basic Information
## 基本情報
In DigitalOcean, a "droplet" is a v**irtual private server (VPS)** that can be used to host websites and applications. A droplet is a **pre-configured package of computing resources**, including a certain amount of CPU, memory, and storage, that can be quickly and easily deployed on DigitalOcean's cloud infrastructure.
DigitalOceanにおいて、「ドロップレット」はv**irtual private server (VPS)**であり、ウェブサイトやアプリケーションをホストするために使用できます。ドロップレットは、特定のCPU、メモリ、ストレージの量を含む**事前構成されたコンピューティングリソースのパッケージ**であり、DigitalOceanのクラウドインフラストラクチャ上に迅速かつ簡単に展開できます。
You can select from **common OS**, to **applications** already running (such as WordPress, cPanel, Laravel...), or even upload and use **your own images**.
**一般的なOS**や、すでに稼働している**アプリケーション**WordPresscPanelLaravelなど)を選択することができ、または**自分のイメージ**をアップロードして使用することもできます。
Droplets support **User data scripts**.
ドロップレットは**ユーザーデータスクリプト**をサポートしています。
<details>
<summary>Difference between a snapshot and a backup</summary>
<summary>スナップショットとバックアップの違い</summary>
In DigitalOcean, a snapshot is a point-in-time copy of a Droplet's disk. It captures the state of the Droplet's disk at the time the snapshot was taken, including the operating system, installed applications, and all the files and data on the disk.
DigitalOceanにおいて、スナップショットはドロップレットのディスクの時点コピーです。スナップショットが取得された時点でのドロップレットのディスクの状態をキャプチャし、オペレーティングシステム、インストールされたアプリケーション、ディスク上のすべてのファイルとデータを含みます。
Snapshots can be used to create new Droplets with the same configuration as the original Droplet, or to restore a Droplet to the state it was in when the snapshot was taken. Snapshots are stored on DigitalOcean's object storage service, and they are incremental, meaning that only the changes since the last snapshot are stored. This makes them efficient to use and cost-effective to store.
スナップショットは、元のドロップレットと同じ構成の新しいドロップレットを作成するためや、スナップショットが取得された時点の状態にドロップレットを復元するために使用できます。スナップショットはDigitalOceanのオブジェクトストレージサービスに保存され、増分であるため、最後のスナップショット以降の変更のみが保存されます。これにより、効率的に使用でき、コスト効果も高くなります。
On the other hand, a backup is a complete copy of a Droplet, including the operating system, installed applications, files, and data, as well as the Droplet's settings and metadata. Backups are typically performed on a regular schedule, and they capture the entire state of a Droplet at a specific point in time.
一方、バックアップはドロップレットの完全なコピーであり、オペレーティングシステム、インストールされたアプリケーション、ファイル、データ、さらにドロップレットの設定とメタデータを含みます。バックアップは通常、定期的に実行され、特定の時点でのドロップレットの全体の状態をキャプチャします。
Unlike snapshots, backups are stored in a compressed and encrypted format, and they are transferred off of DigitalOcean's infrastructure to a remote location for safekeeping. This makes backups ideal for disaster recovery, as they provide a complete copy of a Droplet that can be restored in the event of data loss or other catastrophic events.
スナップショットとは異なり、バックアップは圧縮され暗号化された形式で保存され、DigitalOceanのインフラストラクチャからリモートの場所に転送されて安全に保管されます。これにより、バックアップは災害復旧に理想的であり、データ損失やその他の重大なイベントが発生した場合に復元できるドロップレットの完全なコピーを提供します。
In summary, snapshots are point-in-time copies of a Droplet's disk, while backups are complete copies of a Droplet, including its settings and metadata. Snapshots are stored on DigitalOcean's object storage service, while backups are transferred off of DigitalOcean's infrastructure to a remote location. Both snapshots and backups can be used to restore a Droplet, but snapshots are more efficient to use and store, while backups provide a more comprehensive backup solution for disaster recovery.
要約すると、スナップショットはドロップレットのディスクの時点コピーであり、バックアップはドロップレットの完全なコピーで、設定とメタデータを含みます。スナップショットはDigitalOceanのオブジェクトストレージサービスに保存され、バックアップはDigitalOceanのインフラストラクチャからリモートの場所に転送されます。スナップショットとバックアップの両方はドロップレットを復元するために使用できますが、スナップショットは使用と保存がより効率的であり、バックアップは災害復旧のためのより包括的なバックアップソリューションを提供します。
</details>
### Authentication
### 認証
For authentication it's possible to **enable SSH** through username and **password** (password defined when the droplet is created). Or **select one or more of the uploaded SSH keys**.
認証のために、ユーザー名と**パスワード**(ドロップレット作成時に定義されたパスワード)を通じて**SSHを有効にする**ことが可能です。または、**アップロードされたSSHキーの1つ以上を選択**することもできます。
### Firewall
### ファイアウォール
> [!CAUTION]
> By default **droplets are created WITHOUT A FIREWALL** (not like in oder clouds such as AWS or GCP). So if you want DO to protect the ports of the droplet (VM), you need to **create it and attach it**.
> デフォルトでは**ドロップレットはファイアウォールなしで作成されます**AWSやGCPなどの他のクラウドとは異なります。したがって、DOがドロップレットVMのポートを保護することを望む場合は、**作成して接続する**必要があります。
More info in:
詳細は以下を参照してください:
{{#ref}}
do-networking.md
{{#endref}}
### Enumeration
### 列挙
```bash
# VMs
doctl compute droplet list # IPs will appear here
@@ -68,18 +67,13 @@ doctl compute certificate list
# Snapshots
doctl compute snapshot list
```
> [!CAUTION]
> **Droplets have metadata endpoints**, but in DO there **isn't IAM** or things such as role from AWS or service accounts from GCP.
> **Dropletsにはメタデータエンドポイントがありますが、DOには** IAM **やAWSのロール、GCPのサービスアカウントのようなものはありません。**
### RCE
With access to the console it's possible to **get a shell inside the droplet** accessing the URL: **`https://cloud.digitalocean.com/droplets/<droplet-id>/terminal/ui/`**
コンソールにアクセスすると、**URLにアクセスすることでドロップレット内でシェルを取得することが可能です**: **`https://cloud.digitalocean.com/droplets/<droplet-id>/terminal/ui/`**
It's also possible to launch a **recovery console** to run commands inside the host accessing a recovery console in **`https://cloud.digitalocean.com/droplets/<droplet-id>/console`**(but in this case you will need to know the root password).
**`https://cloud.digitalocean.com/droplets/<droplet-id>/console`**にアクセスしてホスト内でコマンドを実行するための**リカバリーコンソール**を起動することも可能です(ただし、この場合はルートパスワードを知っている必要があります)。
{{#include ../../../banners/hacktricks-training.md}}

View File

@@ -2,39 +2,34 @@
{{#include ../../../banners/hacktricks-training.md}}
## Basic Information
## 基本情報
DigitalOcean Functions, also known as "DO Functions," is a serverless computing platform that lets you **run code without having to worry about the underlying infrastructure**. With DO Functions, you can write and deploy your code as "functions" that can be **triggered** via **API**, **HTTP requests** (if enabled) or **cron**. These functions are executed in a fully managed environment, so you **don't need to worry** about scaling, security, or maintenance.
DigitalOcean Functions、または「DO Functions」として知られるこのサービスは、**基盤となるインフラストラクチャを気にせずにコードを実行できる**サーバーレスコンピューティングプラットフォームです。DO Functionsを使用すると、**API**、**HTTPリクエスト**(有効な場合)または**cron**を介して**トリガー**できる「関数」としてコードを書いてデプロイできます。これらの関数は完全に管理された環境で実行されるため、**スケーリング、セキュリティ、またはメンテナンスを気にする必要はありません**。
In DO, to create a function first you need to **create a namespace** which will be **grouping functions**.\
Inside the namespace you can then create a function.
DOで関数を作成するには、まず**名前空間を作成**する必要があります。これが**関数をグループ化**します。\
その名前空間内で関数を作成できます。
### Triggers
The way **to trigger a function via REST API** (always enabled, it's the method the cli uses) is by triggering a request with an **authentication token** like:
### トリガー
**REST APIを介して関数をトリガーする方法**常に有効で、cliが使用する方法は、**認証トークン**を使用してリクエストをトリガーすることです。
```bash
curl -X POST "https://faas-lon1-129376a7.doserverless.co/api/v1/namespaces/fn-c100c012-65bf-4040-1230-2183764b7c23/actions/functionname?blocking=true&result=true" \
-H "Content-Type: application/json" \
-H "Authorization: Basic MGU0NTczZGQtNjNiYS00MjZlLWI2YjctODk0N2MyYTA2NGQ4OkhwVEllQ2t4djNZN2x6YjJiRmFGc1FERXBySVlWa1lEbUxtRE1aRTludXA1UUNlU2VpV0ZGNjNqWnVhYVdrTFg="
-H "Content-Type: application/json" \
-H "Authorization: Basic MGU0NTczZGQtNjNiYS00MjZlLWI2YjctODk0N2MyYTA2NGQ4OkhwVEllQ2t4djNZN2x6YjJiRmFGc1FERXBySVlWa1lEbUxtRE1aRTludXA1UUNlU2VpV0ZGNjNqWnVhYVdrTFg="
```
To see how is the **`doctl`** cli tool getting this token (so you can replicate it), the **following command shows the complete network trace:**
この**`doctl`** CLIツールがこのトークンをどのように取得しているかを確認するために再現できるように、**次のコマンドは完全なネットワークトレースを表示します:**
```bash
doctl serverless connect --trace
```
**When HTTP trigger is enabled**, a web function can be invoked through these **HTTP methods GET, POST, PUT, PATCH, DELETE, HEAD and OPTIONS**.
**HTTPトリガーが有効な場合**、ウェブ関数はこれらの**HTTPメソッド GET、POST、PUT、PATCH、DELETE、HEAD、OPTIONS**を通じて呼び出すことができます。
> [!CAUTION]
> In DO functions, **environment variables cannot be encrypted** (at the time of this writing).\
> I couldn't find any way to read them from the CLI but from the console it's straight forward.
> DO関数では、**環境変数は暗号化できません**(この執筆時点で)。\
> CLIからそれらを読む方法は見つかりませんでしたが、コンソールからは簡単です。
**Functions URLs** look like this: `https://<random>.doserverless.co/api/v1/web/<namespace-id>/default/<function-name>`
### Enumeration
**関数のURL**は次のようになります: `https://<random>.doserverless.co/api/v1/web/<namespace-id>/default/<function-name>`
### 列挙
```bash
# Namespace
doctl serverless namespaces list
@@ -53,12 +48,7 @@ doctl serverless activations result <activation-id> # get only the response resu
# I couldn't find any way to get the env variables form the CLI
```
> [!CAUTION]
> There **isn't metadata endpoint** from the Functions sandbox.
> Functionsサンドボックスには**メタデータエンドポイントがありません**。
{{#include ../../../banners/hacktricks-training.md}}

View File

@@ -2,22 +2,16 @@
{{#include ../../../banners/hacktricks-training.md}}
## Basic Information
## 基本情報
DigitalOcean Images are **pre-built operating system or application images** that can be used to create new Droplets (virtual machines) on DigitalOcean. They are similar to virtual machine templates, and they allow you to **quickly and easily create new Droplets with the operating system** and applications that you need.
DigitalOcean Imagesは、**新しいDroplets仮想マシンをDigitalOcean上で作成するために使用できる、事前構築されたオペレーティングシステムまたはアプリケーションのイメージ**です。これらは仮想マシンのテンプレートに似ており、**必要なオペレーティングシステム**とアプリケーションを持つ新しいDropletsを**迅速かつ簡単に作成する**ことを可能にします。
DigitalOcean provides a wide range of Images, including popular operating systems such as Ubuntu, CentOS, and FreeBSD, as well as pre-configured application Images such as LAMP, MEAN, and LEMP stacks. You can also create your own custom Images, or use Images from the community.
DigitalOceanは、UbuntuCentOSFreeBSDなどの人気のあるオペレーティングシステムや、LAMPMEAN、LEMPスタックなどの事前構成されたアプリケーションイメージを含む、幅広いImagesを提供しています。また、自分自身のカスタムImagesを作成したり、コミュニティからのImagesを使用したりすることもできます。
When you create a new Droplet on DigitalOcean, you can choose an Image to use as the basis for the Droplet. This will automatically install the operating system and any pre-installed applications on the new Droplet, so you can start using it right away. Images can also be used to create snapshots and backups of your Droplets, so you can easily create new Droplets from the same configuration in the future.
### Enumeration
DigitalOceanで新しいDropletを作成する際には、Dropletの基盤として使用するImagesを選択できます。これにより、新しいDropletにオペレーティングシステムと事前インストールされたアプリケーションが自動的にインストールされるため、すぐに使用を開始できます。Imagesは、Dropletsのスナップショットやバックアップを作成するためにも使用できるため、将来的に同じ構成から新しいDropletsを簡単に作成できます。
### 列挙
```
doctl compute image list
```
{{#include ../../../banners/hacktricks-training.md}}

View File

@@ -2,19 +2,18 @@
{{#include ../../../banners/hacktricks-training.md}}
## Basic Information
## 基本情報
### DigitalOcean Kubernetes (DOKS)
DOKS is a managed Kubernetes service offered by DigitalOcean. The service is designed to **deploy and manage Kubernetes clusters on DigitalOcean's platform**. The key aspects of DOKS include:
DOKSは、DigitalOceanが提供するマネージドKubernetesサービスです。このサービスは、**DigitalOceanのプラットフォーム上でKubernetesクラスターをデプロイおよび管理するために設計されています**。DOKSの主な特徴は以下の通りです
1. **Ease of Management**: The requirement to set up and maintain the underlying infrastructure is eliminated, simplifying the management of Kubernetes clusters.
2. **User-Friendly Interface**: It provides an intuitive interface that facilitates the creation and administration of clusters.
3. **Integration with DigitalOcean Services**: It seamlessly integrates with other services provided by DigitalOcean, such as Load Balancers and Block Storage.
4. **Automatic Updates and Upgrades**: The service includes the automatic updating and upgrading of clusters to ensure they are up-to-date.
### Connection
1. **管理の容易さ**基盤となるインフラストラクチャのセットアップと維持の必要がなくなり、Kubernetesクラスターの管理が簡素化されます。
2. **ユーザーフレンドリーなインターフェース**:クラスターの作成と管理を容易にする直感的なインターフェースを提供します。
3. **DigitalOceanサービスとの統合**Load BalancersBlock Storageなど、DigitalOceanが提供する他のサービスとシームレスに統合されます。
4. **自動更新とアップグレード**:サービスには、クラスターを最新の状態に保つための自動更新とアップグレードが含まれています。
### 接続
```bash
# Generate kubeconfig from doctl
doctl kubernetes cluster kubeconfig save <cluster-id>
@@ -22,9 +21,7 @@ doctl kubernetes cluster kubeconfig save <cluster-id>
# Use a kubeconfig file that you can download from the console
kubectl --kubeconfig=/<pathtodirectory>/k8s-1-25-4-do-0-ams3-1670939911166-kubeconfig.yaml get nodes
```
### Enumeration
### 列挙
```bash
# Get clusters
doctl kubernetes cluster list
@@ -35,9 +32,4 @@ doctl kubernetes cluster node-pool list <cluster-id>
# Get DO resources used by the cluster
doctl kubernetes cluster list-associated-resources <cluster-id>
```
{{#include ../../../banners/hacktricks-training.md}}

View File

@@ -1,49 +1,35 @@
# DO - Networking
# DO - ネットワーキング
{{#include ../../../banners/hacktricks-training.md}}
### Domains
### ドメイン
```bash
doctl compute domain list
doctl compute domain records list <domain>
# You can also create records
```
### Reserverd IPs
### 予約済みIP
```bash
doctl compute reserved-ip list
doctl compute reserved-ip-action unassign <ip>
```
### Load Balancers
### ロードバランサー
```bash
doctl compute load-balancer list
doctl compute load-balancer remove-droplets <id> --droplet-ids 12,33
doctl compute load-balancer add-forwarding-rules <id> --forwarding-rules entry_protocol:tcp,entry_port:3306,...
```
### VPC
```
doctl vpcs list
```
### Firewall
> [!CAUTION]
> By default **droplets are created WITHOUT A FIREWALL** (not like in oder clouds such as AWS or GCP). So if you want DO to protect the ports of the droplet (VM), you need to **create it and attach it**.
> デフォルトでは**ドロップレットはファイアウォールなしで作成されます**AWSやGCPなどの他のクラウドとは異なります。したがって、DOがドロップレットVMのポートを保護することを望む場合は、**作成して接続する必要があります**
```bash
doctl compute firewall list
doctl compute firewall list-by-droplet <droplet-id>
doctl compute firewall remove-droplets <fw-id> --droplet-ids <droplet-id>
```
{{#include ../../../banners/hacktricks-training.md}}

View File

@@ -2,26 +2,20 @@
{{#include ../../../banners/hacktricks-training.md}}
## Basic Information
## 基本情報
> project is just a container for all the **services** (droplets, spaces, databases, kubernetes...) **running together inside of it**.\
> For more info check:
> プロジェクトは、すべての**サービス**(ドロップレット、スペース、データベース、クバネティス...)が**内部で一緒に実行される**ためのコンテナです。\
> 詳細については、次を確認してください:
{{#ref}}
../do-basic-information.md
{{#endref}}
### Enumeration
It's possible to **enumerate all the projects a user have access to** and all the resources that are running inside a project very easily:
### 列挙
ユーザーがアクセスできるすべてのプロジェクトと、プロジェクト内で実行されているすべてのリソースを**簡単に列挙する**ことが可能です:
```bash
doctl projects list # Get projects
doctl projects resources list <proj-id> # Get all the resources of a project
```
{{#include ../../../banners/hacktricks-training.md}}

View File

@@ -2,25 +2,24 @@
{{#include ../../../banners/hacktricks-training.md}}
## Basic Information
## 基本情報
DigitalOcean Spaces are **object storage services**. They allow users to **store and serve large amounts of data**, such as images and other files, in a scalable and cost-effective way. Spaces can be accessed via the DigitalOcean control panel, or using the DigitalOcean API, and are integrated with other DigitalOcean services such as Droplets (virtual private servers) and Load Balancers.
DigitalOcean Spacesは**オブジェクトストレージサービス**です。ユーザーは**大量のデータ**(画像やその他のファイルなど)をスケーラブルでコスト効率の良い方法で**保存および提供**することができます。SpacesはDigitalOceanのコントロールパネルまたはDigitalOcean APIを介してアクセスでき、Droplets仮想プライベートサーバーやLoad Balancersなどの他のDigitalOceanサービスと統合されています。
### Access
### アクセス
Spaces can be **public** (anyone can access them from the Internet) or **private** (only authorised users). To access the files from a private space outside of the Control Panel, we need to generate an **access key** and **secret**. These are a pair of random tokens that serve as a **username** and **password** to grant access to your Space.
Spacesは**公開**(誰でもインターネットからアクセス可能)または**非公開**(認可されたユーザーのみ)にすることができます。コントロールパネルの外部からプライベートスペースのファイルにアクセスするには、**アクセスキー**と**シークレット**を生成する必要があります。これらは、あなたのSpaceへのアクセスを許可するための**ユーザー名**と**パスワード**として機能する一対のランダムトークンです。
A **URL of a space** looks like this: **`https://uniqbucketname.fra1.digitaloceanspaces.com/`**\
Note the **region** as **subdomain**.
**スペースのURL**は次のようになります: **`https://uniqbucketname.fra1.digitaloceanspaces.com/`**\
**サブドメイン**としての**リージョン**に注意してください。
Even if the **space** is **public**, **files** **inside** of it can be **private** (you will be able to access them only with credentials).
**スペース**が**公開**であっても、その中の**ファイル**は**非公開**である可能性があります(資格情報がないとアクセスできません)。
However, **even** if the file is **private**, from the console it's possible to share a file with a link such as `https://fra1.digitaloceanspaces.com/uniqbucketname/filename?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=DO00PL3RA373GBV4TRF7%2F20221213%2Ffra1%2Fs3%2Faws4_request&X-Amz-Date=20221213T121017Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=6a183dbc42453a8d30d7cd2068b66aeb9ebc066123629d44a8108115def975bc` for a period of time:
ただし、**ファイルが非公開**であっても、コンソールからは次のようなリンクを使用してファイルを共有することが可能です: `https://fra1.digitaloceanspaces.com/uniqbucketname/filename?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=DO00PL3RA373GBV4TRF7%2F20221213%2Ffra1%2Fs3%2Faws4_request&X-Amz-Date=20221213T121017Z&X-Amz-Expires=3600&X-Amz-SignedHeaders=host&X-Amz-Signature=6a183dbc42453a8d30d7cd2068b66aeb9ebc066123629d44a8108115def975bc` 一定の期間で:
<figure><img src="../../../images/image (277).png" alt=""><figcaption></figcaption></figure>
### Enumeration
### 列挙
```bash
# Unauthenticated
## Note how the region is specified in the endpoint
@@ -42,9 +41,4 @@ aws s3 ls --endpoint=https://fra1.digitaloceanspaces.com s3://uniqbucketname
## It's also possible to generate authorized access to buckets from the API
```
{{#include ../../../banners/hacktricks-training.md}}

View File

@@ -2,18 +2,12 @@
{{#include ../../../banners/hacktricks-training.md}}
## Basic Information
## 基本情報
DigitalOcean volumes are **block storage** devices that can be **attached to and detached from Droplets**. Volumes are useful for **storing data** that needs to **persist** independently of the Droplet itself, such as databases or file storage. They can be resized, attached to multiple Droplets, and snapshot for backups.
### Enumeration
DigitalOceanのボリュームは、**ブロックストレージ**デバイスであり、**Dropletsに接続および切断**できます。ボリュームは、データベースやファイルストレージなど、Droplet自体とは独立して**永続化**する必要がある**データの保存**に便利です。サイズ変更が可能で、複数のDropletsに接続でき、バックアップ用にスナップショットを作成できます。
### 列挙
```
compute volume list
```
{{#include ../../../banners/hacktricks-training.md}}