37
The Operationalisation of Security DevSecOps

SecDevOps - The Operationalisation of Security

Embed Size (px)

Citation preview

Page 1: SecDevOps -  The Operationalisation of Security

The Operationalisation of Security

DevSecOps

Page 2: SecDevOps -  The Operationalisation of Security

What is DevOps?

• DevOps is a model that blurs the lines between dev and IT operations & consolidates historically segregated management functions to improve efficiency and responsiveness.

• It allows dev teams to automate their build, testing, and deployment processes.

• Often referred to as Continuous Integration (CI) & Continuous Deployment (CD).

Page 3: SecDevOps -  The Operationalisation of Security

DevOps Security

Page 4: SecDevOps -  The Operationalisation of Security

What is DevSecOps?

Page 5: SecDevOps -  The Operationalisation of Security

Automate!!! Automate!!! Automate!!!

Page 6: SecDevOps -  The Operationalisation of Security

YOU FOOL! It’s not about the

tools,it’s about the CULTURE!

Page 7: SecDevOps -  The Operationalisation of Security

This Is Not DevSecOps

Page 8: SecDevOps -  The Operationalisation of Security

This Is Not DevSecOps

Page 9: SecDevOps -  The Operationalisation of Security

This Is DevSecOps

“It’s the concept of using tools and processes to facilitate collaboration between the engineers who deliver the code / systems and those who must maintain and secure it / them.”

Page 10: SecDevOps -  The Operationalisation of Security
Page 11: SecDevOps -  The Operationalisation of Security

“say cloud again, i dare you!”

SAAS, SDN, ALM, CI, CD, Full Stack, Virtualisation, Cloud, hyper-segregation

Page 12: SecDevOps -  The Operationalisation of Security

Infrastructure As Code

Page 13: SecDevOps -  The Operationalisation of Security

Security as Code Software Defined Security

ASVS 2014 Web Application Standard!

17!!

V2: Authentication Verification Requirements

The table below defines the corresponding verification requirements that apply for each of the verification levels. Verification requirements for Level 0 are not defined by this standard.

AUTHENTICATION VERIFICATION REQUIREMENT LEVELS

1 2 3

V2.1 Verify all pages and resources require authentication except those specifically intended to be public (Principle of complete mediation).

V2.2 Verify all password fields do not echo the user’s password when it is entered.

V2.4 Verify all authentication controls are enforced on the server side.

V2.5 Verify all authentication controls (including libraries that call external authentication services) have a centralized implementation.

V2.6 Verify all authentication controls fail securely to ensure attackers cannot log in.

V2.7 Verify password entry fields allow or encourage the use of passphrases, and do not prevent long passphrases or highly complex passwords being entered, and provide a sufficient minimum strength to protect against the use of commonly chosen passwords.

V2.8 Verify all account identity authentication functions (such as registration, update profile, forgot username, forgot password, disabled / lost token, help desk or IVR) that might regain access to the account are at least as resistant to attack as the primary authentication mechanism.

V2.9 Verify users can safely change their credentials using a mechanism that is at least as resistant to attack as the primary authentication mechanism.

V2.12 Verify that all authentication decisions are logged. This should include requests with missing required information, needed for security investigations.

V2.13 Verify that account passwords are salted using a salt that is unique to that account (e.g., internal user ID, account creation) and use bcrypt, scrypt or PBKDF2 before storing the password.

ASVS 2014 Web Application Standard!

23!!

V5: Malicious Input Handling Verification Requirements

The table below defines the corresponding verification requirements that apply for each of the verification levels. Verification requirements for Level 0 are not defined by this standard.

INPUT VALIDATION VERIFICATION REQUIREMENT LEVELS

1 2 3

V5.1 Verify that the runtime environment is not susceptible to buffer overflows, or that security controls prevent buffer overflows.

V5.3 Verify that all input validation failures result in input rejection.

V5.4 Verify that a character set, such as UTF-8, is specified for all sources of input.

V5.5 Verify that all input validation or encoding routines are performed and enforced on the server side.

V5.6 Verify that a single input validation control is used by the application for each type of data that is accepted.

V5.7 Verify that all input validation failures are logged.

V5.8 Verify that all input data is canonicalized for all downstream decoders or interpreters prior to validation.

V5.10 Verify that the runtime environment is not susceptible to SQL Injection, or that security controls prevent SQL Injection.

V5.11 Verify that the runtime environment is not susceptible to LDAP Injection, or that security controls prevent LDAP Injection.

V5.12 Verify that the runtime environment is not susceptible to OS Command Injection, or that security controls prevent OS Command Injection.

V5.13 Verify that the runtime environment is not susceptible to XML External Entity attacks or that security controls prevents XML External Entity attacks.

ASVS 2014 Web Application Standard!

19!!

V3: Session Management Verification Requirements

The table below defines the corresponding verification requirements that apply for each of the verification levels. Verification requirements for Level 0 are not defined by this standard.

SESSION MANAGEMENT VERIFICATION REQUIREMENT LEVELS

1 2 3

V3.1 Verify that the framework’s default session management control implementation is used by the application.

V3.2 Verify that sessions are invalidated when the user logs out.

V3.3 Verify that sessions timeout after a specified period of inactivity.

V3.4 Verify that sessions timeout after an administratively-configurable maximum time period regardless of activity (an absolute timeout).

V3.5 Verify that all pages that require authentication to access them have logout links.

V3.6 Verify that the session id is never disclosed other than in cookie headers; particularly in URLs, error messages, or logs. This includes verifying that the application does not support URL rewriting of session cookies.

V3.7 Verify that the session id is changed on login to prevent session fixation.

V3.8 Verify that the session id is changed upon re-authentication.

V3.10 Verify that only session ids generated by the application framework are recognized as valid by the application.

V3.11 Verify that authenticated session tokens are sufficiently long and random to withstand session guessing attacks.

V3.12 Verify that authenticated session tokens using cookies have their path set to an appropriately restrictive value for that site. The domain cookie attribute

ASVS 2014 Web Application Standard!

21!!

V4: Access Control Verification Requirements

The table below defines the corresponding verification requirements that apply for each of the verification levels. Verification requirements for Level 0 are not defined by this standard.

ACCESS CONTROL VERIFICATION REQUIREMENT LEVELS

1 2 3

V4.1 Verify that users can only access secured functions or services for which they possess specific authorization.

V4.2 Verify that users can only access secured URLs for which they possess specific authorization.

V4.3 Verify that users can only access secured data files for which they possess specific authorization.

V4.4 Verify that direct object references are protected, such that only authorized objects or data are accessible to each user (for example, protect against direct object reference tampering).

V4.5 Verify that directory browsing is disabled unless deliberately desired.

V4.8 Verify that access controls fail securely.

V4.9 Verify that the same access control rules implied by the presentation layer are enforced on the server side for that user role, such that controls and parameters cannot be re-enabled or re-added from higher privilege users.

V4.10 Verify that all user and data attributes and policy information used by access controls cannot be manipulated by end users unless specifically authorized.

V4.11 Verify that all access controls are enforced on the server side.

V4.12 Verify that there is a centralized mechanism (including libraries that call external authorization services) for protecting access to each type of protected resource.

http://benchmarks.cisecurity.org

CIS Amazon Linux 2014.09-2015.03 Benchmark

v1.1.0 - 07-06-2015

 

Information Supplement: Requirement 6.6 Code Reviews and Application Firewalls Clarified

Release date: 2008-04-15

 

Standard: Data Security Standard (DSS) Requirement: 6.6 Date: February 2008

Page 14: SecDevOps -  The Operationalisation of Security

Recipe

mysql_service 'default' do version '5.7' bind_address '0.0.0.0' port '3306' data_dir '/data' initial_root_password 'Ch4ng3me' action [:create, :start] end

Page 15: SecDevOps -  The Operationalisation of Security

class mysql ( root_password => 'Ch4ng3me', port => '3306', ) { package { 'mysql-server': ensure => present, } service { 'mysql': ensure => running, } [...] }

Recipe

Page 16: SecDevOps -  The Operationalisation of Security

control_group 'Example' do control 'SSH' do it 'should be listening on port 22' do expect(port(22)).to be_listening end it 'disables root logins over ssh' do expect(file('/etc/ssh/sshd_config')).to contain('PermitRootLogin no') end end end

Recipe

Page 17: SecDevOps -  The Operationalisation of Security

Continous Integration

Page 18: SecDevOps -  The Operationalisation of Security

gauntlt / mittn / BDD-Security

Security test frameworks using gherkin/cucumber like syntax, they use the concept of “behaviour driven / test driven development”.

They all use a natural language in a Given, When, Then format to describe security requirements as a story.

Scenario: The app should not have XSS Meta: @id scan_xss Given a fresh scanner with all policies disabled And the attack strength is set to High And the Cross-Site-Scripting policy is enabled When the scanner is run And false positives described in: tables/false_positives.table are removed Then no Medium or higher risk vulnerabilities should be present

Page 19: SecDevOps -  The Operationalisation of Security
Page 20: SecDevOps -  The Operationalisation of Security
Page 21: SecDevOps -  The Operationalisation of Security

Sec Dev Tec BizDevSecOps

Page 22: SecDevOps -  The Operationalisation of Security

Secure is a possible state that is probabilistically unachievable.

However the reward in the pursuit of the state can be measured by your ability to deter, minimise, detect, respond and recover from adversaries.

Page 23: SecDevOps -  The Operationalisation of Security
Page 24: SecDevOps -  The Operationalisation of Security
Page 25: SecDevOps -  The Operationalisation of Security

Security Champion

Page 26: SecDevOps -  The Operationalisation of Security
Page 27: SecDevOps -  The Operationalisation of Security
Page 28: SecDevOps -  The Operationalisation of Security

exploit/multi/http/jenkins_script_console

auxiliary/scanner/http/jenkins_login

auxiliary/gather/jenkins_cred_recovery

auxiliary/scanner/http/jenkins_enum

auxiliary/scanner/http/jenkins_command

exploit/linux/misc/jenkins_java_deserialize

Page 29: SecDevOps -  The Operationalisation of Security

auxiliary/scanner/http/gitlab_user_enum.rb

auxiliary/scanner/http/gitlab_login.rb

exploit/multi/http/gitlab_shell_exec.rb

Page 30: SecDevOps -  The Operationalisation of Security

what are you doing Dave?

exploit/multi/http/splunk_upload_app_exec

exploit/multi/http/splunk_mappy_exec

auxiliary/scanner/http/splunk_web_login

Page 31: SecDevOps -  The Operationalisation of Security

SDN: OF, OVSDB, PCEP, I2RS, BGP-LS, OMI, XMPP, LISP, SNMP, EEM, ACI

Each of these protocols has their own methods of securing the communications to network elements:

DCI: NVGRE, STT, VXLAN, OTV, L2MP), TRILL-based protocols (Cisco FabricPath, Juniper QFabric, Brocade VCS Fabric), SPB

API: Python, Java, C, REST, XML, JSON

Page 32: SecDevOps -  The Operationalisation of Security
Page 33: SecDevOps -  The Operationalisation of Security
Page 34: SecDevOps -  The Operationalisation of Security

Security Engineering

DevSecOps

Security Science

Experiment, Automate & Test

Security Operations

Compliance Operations

Hunt, Detect & Contain

Respond, Manage & Train

Learn, Measure & Forecast

Page 35: SecDevOps -  The Operationalisation of Security

DevSecOps is not just about tooling and automation - culture is key to success

DevSecOps is reshaping security, for the better

It allows for security to be seen as an enabler, not a blocker within your business

Embracing DevSecOps can positively impact your security culture

It isn’t a silver bullet and it doesn’t ‘solve’ security

Page 36: SecDevOps -  The Operationalisation of Security

www.DevSecCon.com

www.DevSecOps.org

www.CodeAsCraft.com

Page 37: SecDevOps -  The Operationalisation of Security

@mwrlabs | @mwrinfosecurity