Upgrade to Pro — share decks privately, control downloads, hide ads and more …

How They Hacked Your DevOps - Risk Mitigation in Development Environments

How They Hacked Your DevOps - Risk Mitigation in Development Environments

https://www.amirootyet.com/

In the fast-paced DevOps environments, security must keep up. But how? This talk presents the expanded attack surface in CI/CD workflows, highlights frequently observed security risks, and discusses practical mitigation. Audience will walk away with a holistic view of security in DevOps ecosystems.

Pranshu Bajpai

February 17, 2023
Tweet

More Decks by Pranshu Bajpai

Other Decks in Technology

Transcript

  1. About PhD, Computer Science, Michigan State University Principal Security Architect,

    Motorola Solutions Inc Speaker: DEFCON, GrrCon, ToorCon, APWG eCrime, IACP, CascadiaJS, Bsides, IEEE SecDev etc. @amirootyet in/pranshubajpai/ amirootyet.com Research: Malware, Threats, Forensics, Applied Crypto, DevOps, Cloud Security, Data Science
  2. Disclaimer opinions are my own; not those of my employer

    tools shown are merely a means to an end @amirootyet
  3. Automated Testing 1 Build 2 Deploy Test Env 3 Further

    Testing 4 Deploy Prod 5 Modern DevOps Continuous and Seamless Software Delivery CI/CD Pipeline @amirootyet
  4. Automated Testing 1 Build 2 Deploy Test Env 3 Further

    Testing 4 Deploy Prod 5 Modern DevOps Continuous and Seamless Software Delivery CI/CD Pipeline Security?? Security?? Security?? @amirootyet
  5. Automated Testing 1 Build 2 Deploy Test Env 3 Further

    Testing 4 Deploy Prod 5 Modern DevOps Continuous and Seamless Software Delivery security
  6. Pre-Commit Hooks 1 Pre-Build 2 Post-Build 3 Deploy Test Env

    4 Deploy Prod 5 Enter DevSecOps Shift Security Left CI/CD Pipeline Secrets Management SCA & SAST DAST IaC Security @amirootyet
  7. Dependency Management A lot of software that exists in our

    application is external code Vulnerabilities can trickle down via third party libraries Software Composition Analysis (SCA) hunts for vulnerable components Application Internal Code @amirootyet
  8. Static Analysis Security Testing White box automated testing of internal

    code Good for a first pass at security tests to fix obvious potential vulnerabilities False negatives exist + requires some security training Beware of the false positives and alert fatigue!
  9. Dynamic Analysis Security Testing Gray box automated testing of deployed

    application Able to detect deployment related security risks May require complex configuration False negatives on blind and/or asynchronous bugs
  10. IaC Security Create and maintain secure infrastructure Secure configuration of

    provisioned infrastructure Secure deployment of application within infrastructure
  11. Secrets Management Secrets are necessary for authentication Secrets can be

    exposed throughout the pipeline Exposure can be difficult to detect since secrets come in all shapes, sizes, forms
  12. Build Systems Ephemeral versus persistent build systems Risk of vulnerable

    third party extensions Importance of patch management and hardening Least privileges in build environments
  13. Build 2 Solarwinds Attack Scenario Is MSBuild.exe running? ElfHash(name) =

    0x53D525 Is Orion being built? Extract CLI args from MSBuild.exe Extract directory path of Orion Replace a source code file Perform hash verification check @amirootyet
  14. Overreaching permissions Lingering stale accounts Local accounts created outside the

    scope of policies that enforce security practices in the pipelines Peer review all changes Access Control
  15. Documentation Encourage and incentivize teams to document Little documentation is

    better than no documentation Do not seek perfection while documenting
  16. You still need documentation, even it's all in your head

    "I AM the documentation" "But the auditors need documentation" When in doubt, always follow your documentation "Documentation? Ain't no dev got time for that!" @amirootyet
  17. Artifacts Signing < 5% are signing code* *Source: Newman, Meyers,

    and Torres-Arias, “Sigstore: Signing is for Everyone,” ACM CCS, 2022 Not Signing 96% Signing 4%
  18. Securing Modern CI/CD Pipeline Source: "Blueprint for building modern, secure

    software development pipelines", Veracode/Venafi https://github.com/Venafi/blueprint-securesoftwarepipeline
  19. Build processes are automated and rapid Log and monitor events

    in SIEM systems to enable threat detection and response Adversaries persist where logs are absent Collect metrics on vulnerability management Visibility
  20. Listen. Don't preach. Understand developer perspectives and constraints Suggest viable

    solutions within those constraints Provide implementation details to enable devsecops Create and support a security champions program Partnership (Security DevOps) Thou shalt sign thy code
  21. The Golden Order of Impact Buy-in from stakeholders People Well-defined

    and easily adopted Process Effective, efficient, and fast execution Tools @amirootyet
  22. Attack surface is wider than ever. Realign security efforts to

    incorporate the complexities Implement automated and manual security solutions. Tune, assess, evaluate, relearn, improve, repeat Do not fixate on tools: People > Process > Tools Identify gaps using a visual framework. Separate truth from marketing claims DevSecOps appears to artificially inject "security" into "devops." Security is an organic part of devops! Conclusion