# Cloud Attacks

## Amazon Web Service (AWS)

{% tabs %}
{% tab title="Subdomain s3" %}
Cloud-based object storage service. Allows objects to be stored in containers called buckets.

### Configuration

We can interact with S3 buckets with `awscli`. Let's start it and configure it with arbitrary values for all fields. _(This is because sometimes the target server is configured not to check authentication.)_

{% code overflow="wrap" %}
```bash
apt install awscli
```
{% endcode %}

{% code overflow="wrap" %}
```bash
aws configure # random value, es. temp
```
{% endcode %}

### Bucket

We list all S3 buckets hosted by the server.

{% code overflow="wrap" %}
```bash
aws --endpoint=http://s3.<DOMAIN> s3 ls
```
{% endcode %}

### Object

We list the common objects and prefixes in the specified bucket.

{% code overflow="wrap" %}
```bash
aws --endpoint=http://s3.<DOMAIN> s3 ls s3://<BUCKET>
```
{% endcode %}

### Download

We can download objects from the buckets.

{% code overflow="wrap" %}
```bash
aws --endpoint=http://s3.<DOMAIN> s3 cp s3://<BUCKET>/<FILE> ./<FILE>
```
{% endcode %}

### Upload

We can upload object into the buckets.

{% code overflow="wrap" %}
```bash
aws --endpoint=http://s3.<DOMAIN> s3 cp ./<FILE> s3://<BUCKET>/<WHERE>
```
{% endcode %}
{% endtab %}
{% endtabs %}
