# yaml-language-server: $schema=../../schemas/dsomm-schema-implementation.json --- Implementation: Infrastructure Hardening: Usage of containers: uuid: 3a94d55e-fd82-4996-9eb3-20d23ff2a873 risk: Through a vulnerability in one service on a server, the attacker gains access to other services running on the same server. measure: Applications are running in a dedicated and isolated virtualized environments. difficultyOfImplementation: knowledge: 3 time: 3 resources: 5 usefulness: 3 level: 2 implementation: [] references: samm2: - O-EM-A-1 iso27001-2017: - Virtual environments are not explicitly covered by ISO 27001 - too specific - 13.1.3 iso27001-2022: - Virtual environments are not explicitly covered by ISO 27001 - too specific - 8.22 comments: "" Backup: uuid: 5c61fd6b-8106-4c68-ac28-a8a42f1c67dc risk: If errors are experienced during the deployment process you want to deploy an old release. However, due to changes in the database this is often unfeasible. measure: Performing automated periodical backups are used. Backup before deployment can help facilitate deployments whilst testing the backup restore processes. difficultyOfImplementation: knowledge: 1 time: 2 resources: 1 usefulness: 4 level: 2 implementation: - $ref: src/assets/YAML/default/implementations.yaml#/implementations/a-complete-backup-of - $ref: src/assets/YAML/default/implementations.yaml#/implementations/a-point-in-time-reco dependsOn: - 74938a3f-1269-49b9-9d0f-c43a79a1985a # Defined deployment process references: samm2: - TODO iso27001-2017: - 12.3 - 14.2.6 iso27001-2022: - 8.13 - 8.31 comments: "" Filter outgoing traffic: uuid: 6df508ef-86fc-4c22-bd9f-646c3127ce7d risk: A compromised infrastructure component might try to send out stolen data. measure: Having a whitelist and explicitly allowing egress traffic provides the ability to stop unauthorized data leakage. difficultyOfImplementation: knowledge: 3 time: 3 resources: 3 usefulness: 2 level: 3 dependsOn: [] implementation: - $ref: src/assets/YAML/default/implementations.yaml#/implementations/open-policy-agent - $ref: src/assets/YAML/default/implementations.yaml#/implementations/firewalls references: samm2: - O-EM-A-2 iso27001-2017: - Virtual environments are not explicitly covered by ISO 27001 - too specific - 13.1.3 iso27001-2022: - Virtual environments are not explicitly covered by ISO 27001 - too specific - 8.22 comments: "" Immutable infrastructure: uuid: 48e92bb1-fdba-40e8-b6c2-35de0d431833 risk: The availability of IT systems might be disturbed due to components failures measure: Redundancies in the IT systems difficultyOfImplementation: knowledge: 2 time: 2 resources: 1 usefulness: 3 level: 3 dependsOn: - 8b994601-575e-4ea5-b228-accb18c8e514 # Infrastructure as Code implementation: - $ref: src/assets/YAML/default/implementations.yaml#/implementations/remove-direct-access references: samm2: - O-EM-A-2 iso27001-2017: - Not explicitly covered by ISO 27001 - too specific - 17.2.1 iso27001-2022: - Not explicitly covered by ISO 27001 - too specific - 8.14 comments: "" Infrastructure as Code: uuid: 8b994601-575e-4ea5-b228-accb18c8e514 risk: No tracking of changes in systems might lead to errors in the configuration. In additions, it might lead to unauthorized changes. An examples is jenkins. measure: Systems are setup by code. A full environment can be provisioned. In addition, software like Jenkins 2 can be setup and configured in in code too. The code should be stored in a version control system. difficultyOfImplementation: knowledge: 3 time: 5 resources: 4 usefulness: 4 level: 3 implementation: - $ref: src/assets/YAML/default/implementations.yaml#/implementations/gitops - $ref: src/assets/YAML/default/implementations.yaml#/implementations/ansible - $ref: src/assets/YAML/default/implementations.yaml#/implementations/chef - $ref: src/assets/YAML/default/implementations.yaml#/implementations/puppet - $ref: src/assets/YAML/default/implementations.yaml#/implementations/jenkinsfile references: samm2: - O-EM-A-2 iso27001-2017: - Not explicitly covered by ISO 27001 - too specific - 12.1.1 - 12.1.2 iso27001-2022: - Not explicitly covered by ISO 27001 - too specific - 5.37 - 8.32 comments: "" Isolated networks for virtual environments: uuid: 4ce24abd-8ba6-494c-828d-4d193e28e4a1 risk: Virtual environments in default settings are able to access other virtual environments on the network stack. By using virtual machines, it is often possible to connect to other virtual machines. By using docker, one bridge is used by default so that all containers on one host can communicate with each other. measure: The communication between virtual environments is controlled and regulated. difficultyOfImplementation: knowledge: 3 time: 3 resources: 3 usefulness: 5 level: 2 dependsOn: [] implementation: - $ref: src/assets/YAML/default/implementations.yaml#/implementations/istio - $ref: src/assets/YAML/default/implementations.yaml#/implementations/bridges - $ref: src/assets/YAML/default/implementations.yaml#/implementations/firewalls references: samm2: - O-EM-A-1 iso27001-2017: - Virtual environments are not explicitly covered by ISO 27001 - too specific - 13.1.3 iso27001-2022: - Virtual environments are not explicitly covered by ISO 27001 - too specific - 8.22 comments: "" Limitation of system events: uuid: e5386abf-9154-4752-a1a8-c3a8900f732d risk: System events (system calls) can lead to privilege escalation. measure: System calls are limited. difficultyOfImplementation: knowledge: 2 time: 2 resources: 1 usefulness: 5 level: 3 dependsOn: - 1cd5e4b8-be36-4726-adc7-d8f843f47ac8 # Audit of system events implementation: - $ref: src/assets/YAML/default/implementations.yaml#/implementations/seccomp - $ref: src/assets/YAML/default/implementations.yaml#/implementations/strace - $ref: src/assets/YAML/default/implementations.yaml#/implementations/falco references: samm2: - O-EM-A-2 iso27001-2017: - System hardening is not explicitly covered by ISO 27001 - too specific iso27001-2022: - ISO 27001:2022 mapping is missing comments: "" Production near environments are used by developers: uuid: e14de741-94b3-447c-8b07-eea947d82e61 risk: In case an errors occurs in production, the developer need to be able to create a production near environment on a local development environment. measure: Usage of infrastructure as code helps to create a production near environment. The developer needs to be trained in order to setup a local development environment. In addition, it should be possible to create production like test data. Often personal identifiable information is anonymized in order to comply with data protection laws. difficultyOfImplementation: knowledge: 3 time: 3 resources: 3 usefulness: 4 level: 4 dependsOn: - 67e1a9aa-9fbf-4ec5-a2de-400f01960c51 # Automated deployment process - 8b994601-575e-4ea5-b228-accb18c8e514 # Infrastructure as Code implementation: [] references: samm2: - O-EM-A-2 iso27001-2017: - 12.1.4 - 17.2.1 iso27001-2022: - 8.31 - 8.14 comments: "" Baseline Hardening of the environment: uuid: 5992c38c-8597-4035-89db-d15820d81c3a risk: Using default configurations for a cluster environment leads to potential risks. measure: Harden environments according to best practices. Level 1 and partially level 2 from hardening practices like 'CIS Kubernetes Bench for Security' should be considered. difficultyOfImplementation: knowledge: 4 time: 3 resources: 2 usefulness: 4 level: 2 implementation: - $ref: src/assets/YAML/default/implementations.yaml#/implementations/cis-kubernetes-benchmark - $ref: src/assets/YAML/default/implementations.yaml#/implementations/cis-docker-benchmark - $ref: src/assets/YAML/default/implementations.yaml#/implementations/for-example-for-cont - $ref: src/assets/YAML/default/implementations.yaml#/implementations/attack-matrix-cloud - $ref: src/assets/YAML/default/implementations.yaml#/implementations/attack-matrix-containers - $ref: src/assets/YAML/default/implementations.yaml#/implementations/attack-matrix-kubern - $ref: src/assets/YAML/default/implementations.yaml#/implementations/defend-the-core-kubernetes references: samm2: - O-EM-A-1 iso27001-2017: - system hardening is not explicitly covered by ISO 27001 - too specific - 13.1.3 iso27001-2022: - ISO 27001:2022 mapping is missing comments: "" Hardening of the Environment: uuid: dcf9601b-b4f2-4e25-9143-e39af75f7c33 risk: Using default configurations for a cluster environment leads to potential risks. measure: Harden environments according to best practices. Level 2 and partially level 3 from hardening practices like 'CIS Kubernetes Bench for Security' should be considered. difficultyOfImplementation: knowledge: 4 time: 4 resources: 2 usefulness: 3 level: 4 implementation: - $ref: src/assets/YAML/default/implementations.yaml#/implementations/cis-kubernetes-benchmark - $ref: src/assets/YAML/default/implementations.yaml#/implementations/cis-docker-benchmark - $ref: src/assets/YAML/default/implementations.yaml#/implementations/for-example-for-cont - $ref: src/assets/YAML/default/implementations.yaml#/implementations/attack-matrix-cloud - $ref: src/assets/YAML/default/implementations.yaml#/implementations/attack-matrix-containers - $ref: src/assets/YAML/default/implementations.yaml#/implementations/attack-matrix-kubern - $ref: src/assets/YAML/default/implementations.yaml#/implementations/defend-the-core-kubernetes references: samm2: - O-EM-A-2 iso27001-2017: - Hardening is not explicitly covered by ISO 27001 - too specific - 13.1.3 iso27001-2022: - Hardening is not explicitly covered by ISO 27001 - too specific - 8.22 comments: "" Usage of a chaos technology: uuid: f8e80f18-2503-4e3e-b3bc-7f67bb28defe risk: Due to manual changes on a system, they are not replaceable anymore. In case of a crash it might happen that a planned redundant system is unavailable. In addition, it is hard to replay manual changes. measure: A randomized periodically shutdown of systems makes sure, that nobody will perform manual changes to a system. difficultyOfImplementation: knowledge: 3 time: 5 resources: 5 usefulness: 3 level: 4 implementation: - $ref: src/assets/YAML/default/implementations.yaml#/implementations/chaosmonkey references: samm2: - O-EM-A-3 iso27001-2017: - Not explicitly covered by ISO 27001 - too specific - 17.1.3 iso27001-2022: - Not explicitly covered by ISO 27001 - too specific - 5.29 comments: "" Usage of an security account: uuid: 746025a6-dbfb-4087-a000-e46acab64ee1 risk: Having security auditing in the same account as infrastructure and applications at the cloud provide might cause evil administrators (or threat actors taking over an account of an administrator) to alter evidence like audit logs. measure: Usage of a separate account dedicated for security activities. difficultyOfImplementation: knowledge: 3 time: 2 resources: 3 usefulness: 4 level: 2 implementation: "" references: samm2: - I-SD-B-2 iso27001-2017: - 10.1 iso27001-2022: - ISO 27001:2022 mapping is missing comments: "" Usage of edge encryption at transit: uuid: ad23be9c-5661-4f1f-81a3-5a5dc7061629 risk: Evil actors might be able to perform a man in the middle attack and sniff confidential information (e.g. authentication factors like passwords). measure: |- By using encryption at the edge of traffic in transit, it is impossible or at least harder to sniff credentials or information being outside of the organization. Using standard secure protocols like HTTPS is recommended. difficultyOfImplementation: knowledge: 2 time: 2 resources: 1 usefulness: 4 level: 1 implementation: "" references: samm2: - I-SD-B-2 iso27001-2017: - 10.1 iso27001-2022: - 8.24 comments: "" Usage of encryption at rest: uuid: 0ff45fb8-7eef-46ed-9b3a-84c955cd7060 risk: Evil actors might be able to access data and read information, e.g. from physical hard disks. measure: By using encryption at rest, it is impossible or at least harder to to read information. difficultyOfImplementation: knowledge: 2 time: 2 resources: 1 usefulness: 4 level: 2 implementation: "" references: samm2: - I-SD-B-2 iso27001-2017: - 10.1 iso27001-2022: - 8.24 comments: "" Usage of internal encryption at transit: uuid: ecb0184c-6bc9-45da-bbbb-a983797ffc93 risk: Evil actors within the organization of traffic in transit might be able to perform a man in the middle attack and sniff confidential information (e.g. authentication factors like passwords) measure: By using encryption internally, e.g. inside of a cluster, it is impossible or at least harder to sniff credentials. difficultyOfImplementation: knowledge: 3 time: 4 resources: 3 usefulness: 4 level: 3 implementation: "" references: samm2: - I-SD-B-2 iso27001-2017: - 10.1 iso27001-2022: - 8.24 comments: "" Usage of security by default for components: uuid: 11b3848e-e931-4146-a35d-35409ada24ee risk: Components (images, libraries, applications) are not hardened. measure: Hardening of components is important, specially for image on which other teams base on. Hardening should be performed on the operation system and on the services inside (e.g. Nginx or a Java-Application). difficultyOfImplementation: knowledge: 4 time: 3 resources: 1 usefulness: 3 level: 3 implementation: - $ref: src/assets/YAML/default/implementations.yaml#/implementations/for-applications-ch - $ref: src/assets/YAML/default/implementations.yaml#/implementations/managing-secrets - $ref: src/assets/YAML/default/implementations.yaml#/implementations/crypto - $ref: src/assets/YAML/default/implementations.yaml#/implementations/authentication dependsOn: - f6f7737f-25a9-4317-8de2-09bf59f29b5b # Defined build process references: samm2: - O-EM-A-2 iso27001-2017: - not explicitly covered by ISO 27001 - too specific iso27001-2022: - ISO 27001:2022 mapping is missing comments: "" Usage of test and production environments: uuid: bfdacb52-1e3f-431d-ae72-d844a5e86415 risk: Security tests are not running regularly because test environments are missing measure: A test and a production like environment is used difficultyOfImplementation: knowledge: 3 time: 3 resources: 5 usefulness: 4 level: 2 dependsOn: - 74938a3f-1269-49b9-9d0f-c43a79a1985a # Defined deployment process implementation: [] references: samm2: - O-EM-A-1 iso27001-2017: - Not explicitly covered by ISO 27001 - too specific - 12.1.4 - 17.2.1 iso27001-2022: - Not explicitly covered by ISO 27001 - too specific - 8.31 - 8.14 comments: "" Virtual environments are limited: uuid: 760f1056-b0ee-4f22-a35b-f65446f944ca risk: Denial of service (internally by an attacker or unintentionally by a bug) on one service effects other services measure: All virtual environments are using resource limits on hard disks, memory and CPU difficultyOfImplementation: knowledge: 2 time: 2 resources: 3 usefulness: 3 level: 2 dependsOn: - 3a94d55e-fd82-4996-9eb3-20d23ff2a873 # Usage of containers implementation: [] references: samm2: - O-EM-A-1 iso27001-2017: - Virtual environments are not explicitly covered by ISO 27001 - too specific - 12.1.3 - 13.1.3 - 17.2.1 iso27001-2022: - Virtual environments are not explicitly covered by ISO 27001 - too specific - 8.6 - 8.22 - 8.14 comments: "" WAF baseline: uuid: f0e01814-3b88-4bd0-a3a9-f91db001d20b risk: Vulnerable input, such as exploits, can infiltrate the application via numerous entry points, posing a significant security threat. measure: Implementing a web application firewall (WAF) is a critical security control. At a baseline level, the objective is to finely balance the reduction of false positives, maintaining user experience, against a potential increase in the less noticeable false negatives. Begin with the WAF in a monitoring state to understand the traffic and threats. Progressively enforce blocking actions based on intelligence gathered, ensuring minimal disruption to legitimate traffic. description: | A baseline WAF configuration provides essential defense against common vulnerabilities, acting as a first line of automated threat detection and response. Steps: - Configure WAF in alert mode to establish traffic patterns - Analyze alerts and adjust sensitivity to optimize for fewer false positives - Gradually switch to a proactive blocking stance as confidence in the accuracy of the rules increases It's crucial to monitor and update the WAF configuration to adapt to evolving threats and minimize the potential for both false positives and false negatives. There are debates on how useful a WAF is for APIs. difficultyOfImplementation: knowledge: 3 time: 4 resources: 3 usefulness: 3 level: 3 dependsOn: - e1f37abb-d848-4a3a-b3df-65e91a89dcb7 # Context-aware output encoding implementation: - $ref: src/assets/YAML/default/implementations.yaml#/implementations/api-myths references: samm2: - O-EM-A-1 iso27001-2017: - Hardening is not explicitly covered by ISO 27001 - too specific - 13.1.3 iso27001-2022: - Hardening is not explicitly covered by ISO 27001 - too specific - 8.22 comments: WAF medium: uuid: f0e01814-3b88-4bd0-a3a9-f91db001d20b-medium risk: The threat from malicious inputs remains high, with exploits seeking to exploit any vulnerabilities present at the various points of entry to the application. measure: A WAF deployed with a medium level of protection strengthens the security posture by striking a more advanced balance between the detection of genuine threats and the minimization of false alarms. Maintain the WAF in alert mode initially to ensure a comprehensive understanding of potential threats. With a medium-level configuration, the WAF settings are refined for greater precision in threat detection, with a stronger emphasis on security without significantly impacting legitimate traffic. description: | A medium-level WAF configuration builds upon the baseline to offer a more nuanced and responsive defense mechanism against a wider array of threats. Sample steps: - Implement an enhanced set of WAF rules based on baseline data - Continuous monitoring and fine-tuning of the WAF configuration - Develop a strategic incident response plan utilizing WAF insights The medium configuration requires diligent management and continuous improvement to address new vulnerabilities while maintaining the integrity of application access. There are debates on how useful a WAF is for APIs. difficultyOfImplementation: knowledge: 4 time: 5 resources: 4 usefulness: 3 level: 4 dependsOn: - f0e01814-3b88-4bd0-a3a9-f91db001d20b # WAF baseline implementation: - $ref: src/assets/YAML/default/implementations.yaml#/implementations/api-myths references: samm2: - O-EM-A-2 iso27001-2017: - Hardening is not explicitly covered by ISO 27001 - too specific - 13.1.3 iso27001-2022: - Hardening is not explicitly covered by ISO 27001 - too specific - 8.22 comments: WAF Advanced: uuid: f0e01814-3b88-4bd0-a3a9-f91db001d20b-advanced risk: The presence of sophisticated threats necessitates a robust defense strategy where application inputs are meticulously scrutinized for security breaches, including advanced persistent threats and zero-day vulnerabilities. measure: An advanced WAF protection level includes rigorous input validation, rejecting any parameters not explicitly required, and custom rule sets that are dynamically updated in response to emerging threats. The advanced WAF setup is designed to ensure all data is in the correct format and any superfluous input parameters are automatically rejected. It includes machine learning algorithms to detect anomalies, custom-developed rules for real-time traffic analysis, and seamless integration with existing security infrastructures to adapt to the ever-changing threat landscape. description: | This advanced configuration goes beyond typical WAF implementations by enforcing strict input format checks and parameter validation to prevent any unauthorized or malformed data from compromising the application. Sample Steps: - Implement strict data type and format validation rules to ensure only correctly formatted data is processed. - Establish a denylist for all parameters that are not explicitly required, blocking them by default. - Develop and continuously refine custom rulesets based on the application's traffic patterns, user behavior, and known vulnerabilities. - Integrate machine learning algorithms to enhance anomaly detection and automatic rule adjustment. - Correlate and analyze WAF logs with other security systems like SIEM for comprehensive threat intelligence. - Conduct regular red team exercises to test and validate the effectiveness of the WAF configurations against simulated advanced attack scenarios. - Activate automated threat response mechanisms to immediately neutralize detected threats. Embracing an advanced WAF setup requires a proactive approach, with continuous improvement and updating of security measures to ensure all inputs are scrutinized and validated, thus maintaining a resilient security posture against sophisticated attacks. There are debates on how useful a WAF is for APIs. difficultyOfImplementation: knowledge: 5 time: 5 resources: 5 usefulness: 4 level: 5 dependsOn: - f0e01814-3b88-4bd0-a3a9-f91db001d20b-medium # WAF medium implementation: - $ref: src/assets/YAML/default/implementations.yaml#/implementations/api-myths references: samm2: - O-EM-A-2 iso27001-2017: - Hardening is not explicitly covered by ISO 27001 - too specific - 13.1.3 iso27001-2022: - Hardening is not explicitly covered by ISO 27001 - too specific - 8.22 comments: