Skip to content

Latest commit

 

History

History
165 lines (124 loc) · 13.1 KB

File metadata and controls

165 lines (124 loc) · 13.1 KB

Attack Tree Analysis for goharbor/harbor

Objective: To gain unauthorized access to sensitive data or control over the application and its environment by exploiting vulnerabilities or misconfigurations within the Harbor container registry and its integration with the application.

Attack Tree Visualization

High-Risk Sub-Tree:

  • Attack Goal: Compromise Application via Harbor [CRITICAL NODE - Goal]
    • AND
        1. Exploit Harbor Weaknesses [CRITICAL NODE - Entry Point] [HIGH-RISK PATH]
        • OR
          • 1.1. Exploit Harbor Software Vulnerabilities [HIGH-RISK PATH]
            • AND
              • 1.1.1.1. Publicly Disclosed CVEs (e.g., NVD, Harbor Security Advisories) [CRITICAL NODE - Vulnerability Info]
              • AND
                • 1.1.2. Exploit Vulnerable Harbor Components [CRITICAL NODE - Exploit Target] [HIGH-RISK PATH]
                  • OR
                    • 1.1.2.1. Harbor Core Services (Registry, UI, API, Job Service, etc.) [CRITICAL NODE - Core Services] [HIGH-RISK PATH]
                  • AND
                    • 1.1.3. Attack Vectors
                    • OR
                    • 1.1.3.1. Network Exploitation (Remote Code Execution, Server-Side Request Forgery) [CRITICAL NODE - RCE Vector] [HIGH-RISK PATH]
                    • 1.1.3.2. Web Interface Exploitation (Cross-Site Scripting, Cross-Site Request Forgery, Injection) [CRITICAL NODE - Web Exploit Vector] [HIGH-RISK PATH]
                    • 1.1.3.3. API Exploitation (Authentication Bypass, Authorization Flaws, Injection) [CRITICAL NODE - API Exploit Vector] [HIGH-RISK PATH]
          • 1.2. Exploit Harbor Misconfigurations [CRITICAL NODE - Entry Point] [HIGH-RISK PATH]
            • AND
              • 1.2.1.1. Weak Authentication/Authorization Settings [CRITICAL NODE - Auth Misconfig] [HIGH-RISK PATH]
                • OR
                  • 1.2.1.1.1. Default Credentials (if not changed) [CRITICAL NODE - Default Creds] [HIGH-RISK PATH]
              • AND
                • 1.2.1.2. Insecure Network Configuration [CRITICAL NODE - Network Misconfig] [HIGH-RISK PATH]
                  • OR
                    • 1.2.1.2.1. Harbor Exposed to Public Internet without proper hardening [CRITICAL NODE - Public Exposure] [HIGH-RISK PATH]
              • AND
                • 1.2.1.3. Insecure Storage Configuration
                  • OR
                    • 1.2.1.3.1. Publicly Accessible Storage Buckets (if used for image storage) [CRITICAL NODE - Public Storage] [HIGH-RISK PATH]
        1. Leverage Harbor Compromise to Attack Application [CRITICAL NODE - Escalation Point] [HIGH-RISK PATH]
        • OR
          • 2.1. Malicious Image Injection/Manipulation [CRITICAL NODE - Primary Attack Vector] [HIGH-RISK PATH]
            • AND
              • 2.1.1. Gain Write Access to Harbor Project [CRITICAL NODE - Prerequisite Access]
              • AND
                • 2.1.2. Inject Malicious Image [CRITICAL NODE - Malicious Payload]
              • AND
                • 2.1.3. Application Pulls and Executes Malicious Image [CRITICAL NODE - Execution] [HIGH-RISK PATH]
                  • AND
                    • 2.1.3.2. Application Vulnerable to Exploits within Malicious Image (e.g., RCE) [CRITICAL NODE - Application Vulnerability] [HIGH-RISK PATH]

Attack Vectors: * Targeting known software vulnerabilities in Harbor components. * Exploiting misconfigurations in Harbor's setup and environment.

Attack Vectors: * Leveraging publicly disclosed Common Vulnerabilities and Exposures (CVEs) affecting Harbor. * Exploiting zero-day vulnerabilities (less common but possible).

Attack Vectors: * Utilizing information from National Vulnerability Database (NVD) or Harbor Security Advisories to identify known vulnerabilities. * Scanning Harbor instances for known vulnerable versions of software components.

Attack Vectors: * Targeting vulnerabilities in Harbor Core Services (Registry, UI, API, Job Service, etc.). * Exploiting vulnerabilities in Harbor's dependencies (Go libraries, database, Redis, etc.). * Leveraging vulnerabilities in the underlying Operating System or Infrastructure if directly exposed.

Attack Vectors: * Exploiting vulnerabilities in the Harbor Registry service to manipulate image storage or metadata. * Targeting vulnerabilities in the Harbor UI for Cross-Site Scripting (XSS) or other web-based attacks. * Exploiting vulnerabilities in the Harbor API for authentication bypass, authorization flaws, or injection attacks. * Targeting vulnerabilities in the Harbor Job Service to execute arbitrary code or disrupt operations.

Attack Vectors: * Exploiting Remote Code Execution (RCE) vulnerabilities in Harbor services to gain control of the Harbor server. * Leveraging Server-Side Request Forgery (SSRF) vulnerabilities to access internal resources or perform actions on behalf of the Harbor server.

Attack Vectors: * Performing Cross-Site Scripting (XSS) attacks on the Harbor UI to execute malicious scripts in users' browsers. * Executing Cross-Site Request Forgery (CSRF) attacks to perform unauthorized actions on behalf of authenticated users. * Exploiting injection vulnerabilities (e.g., SQL Injection, Command Injection) in the web interface.

Attack Vectors: * Bypassing authentication mechanisms in the Harbor API to gain unauthorized access. * Exploiting authorization flaws to access resources or perform actions beyond granted permissions. * Leveraging injection vulnerabilities (e.g., SQL Injection, Command Injection) in the API endpoints.

Attack Vectors: * Identifying and exploiting weak authentication and authorization settings. * Leveraging insecure network configurations that expose Harbor to unnecessary risks. * Exploiting insecure storage configurations that could lead to data breaches.

Attack Vectors: * Attempting to use default credentials if they have not been changed. * Exploiting weak password policies to crack user passwords. * Bypassing or manipulating insecure Access Control Lists (ACLs) to gain unauthorized access.

Attack Vectors: * Trying known default usernames and passwords for Harbor administrative accounts.

Attack Vectors: * Exploiting Harbor instances directly exposed to the public internet without proper hardening. * Leveraging weak network segmentation to move laterally from a compromised Harbor instance to other parts of the network.

Attack Vectors: * Directly targeting publicly accessible Harbor instances with vulnerability scans and exploits. * Attempting brute-force attacks against publicly exposed login interfaces.

Attack Vectors: * Accessing publicly accessible cloud storage buckets (e.g., AWS S3, Azure Blob Storage, Google Cloud Storage) used by Harbor to store container images. * Downloading and analyzing container images from publicly accessible storage buckets to find sensitive data or vulnerabilities.

Attack Vectors: * Using a compromised Harbor instance as a stepping stone to attack the applications that rely on it. * Injecting malicious container images into Harbor to compromise applications pulling images from it.

Attack Vectors: * Gaining write access to a Harbor project to upload and manipulate container images. * Injecting backdoored images with the same tags as legitimate images to trick applications into pulling malicious versions. * Uploading new malicious images and attempting to trick applications into pulling them.

Attack Vectors: * Waiting for applications to automatically pull and deploy the injected malicious images. * Exploiting vulnerabilities within the malicious image to gain control of the application's runtime environment.

Attack Vectors: * Crafting malicious container images that exploit known vulnerabilities in the application's runtime environment or dependencies. * Including malicious payloads in container images that execute upon container startup, leading to Remote Code Execution (RCE) within the application's context.