• No results found

Secure development and the SDLC. Presented By Jerry

N/A
N/A
Protected

Academic year: 2021

Share "Secure development and the SDLC. Presented By Jerry"

Copied!
47
0
0

Loading.... (view fulltext now)

Full text

(1)

Secure development

and the SDLC

Presented By Jerry Hoff

@jerryhoff

(2)

Email: [email protected] Twitter: @jerryhoff

Agenda

Part 1: The Big Picture

Part 2: Web Attacks

Part 3: Secure Development

(3)

Email: [email protected] Twitter: @jerryhoff

(4)

Email: [email protected] Twitter: @jerryhoff

(5)
(6)
(7)
(8)
(9)

Email: [email protected] Twitter: @jerryhoff

why?

warum?

perche?

(10)

Email: [email protected] Twitter: @jerryhoff

Web Site /

(11)

Email: [email protected] Twitter: @jerryhoff

Custom Code

Frameworks & Libs Language Support

Application Server Web Server

(12)

Email: [email protected] Twitter: @jerryhoff

HTTP, HTML, JavaScript, CSS Cookies, SVG, Plugins, Add-ons

iFrames, Flash, WebSockets

Client side database…

}

20 year old legacy!

(13)

Email: [email protected] Twitter: @jerryhoff

Vulnerability

Weakness that can be exploited to

cause harm

Each vulnerability has a “impact”

(14)

Email: [email protected] Twitter: @jerryhoff DB WWW Injection Authentication Access Control Vulnerable Libraries Forge HTTP Headers Abuse Business Logic

Security Configuration Accept Forged Requests

Jsess

Malicious JavaScript (XSS) Generate Forged Requests Stolen Clicks (ClickJacking) Steal Cookie

Guess Cookie Reuse Cookies

(15)

Email: [email protected] Twitter: @jerryhoff

OWASP Top 10 2013

Big daddy of all web risk


documents

Do not base your security


program on a “Top 10” list


- Hoff’s Law

(16)

Email: [email protected] Twitter: @jerryhoff

Current “Top 10”

A1 Injection

A2 Broken Auth and Session Management A3 Cross-Site Scripting (XSS)

A4 Insecure Direct Object References A5 Security Misconfiguration

A6 Sensitive Data Exposure

A7 Missing Function Level Access Control A8 Cross-Site Request Forgery (CSRF)

A9 Using Known Vulnerable Components A10 Unvalidated Redirects and Forwards

(17)

Email: [email protected] Twitter: @jerryhoff

OWASP ASVS

Application Security

Verification Standard (2014)

Superb checklist

DOWNLOAD THIS NOW


(your homework)

(18)

Email: [email protected] Twitter: @jerryhoff

V2. Authentication


V3. Session Management
 V4. Access Control


V5. Malicious Input Handling 
 V7. Cryptography at Rest


V8. Error Handling and Logging 
 V9. Data Protection


V10. Communications
 V11. HTTP


V13. Malicious Controls
 V15. Business Logic


V16. File and Resource
 V17. Mobile

(19)

Email: [email protected] Twitter: @jerryhoff

Risk

Risk = vuln likelihood * vuln impact

Typically ranked “

critical

” through “

low

Risk based approach = assign each

(20)

Email: [email protected] Twitter: @jerryhoff

Security Control

Mitigates an vulnerability

For each major vulnerability, 


there is a corresponding security control

Examples: cookie flag, http header,

(21)

Email: [email protected] Twitter: @jerryhoff

End of Part 1: 


(22)

Email: [email protected] Twitter: @jerryhoff

Part 2: 


Web Attacks

(23)

Email: [email protected] Twitter: @jerryhoff

Am I Secure?

bin ich sicher?

(24)

Email: [email protected] Twitter: @jerryhoff

Advanced Google Search

(25)

Email: [email protected] Twitter: @jerryhoff

Finding file types

site:example.com filetype:___

Sometimes determine technologies (asp, php, jsp,

aspx, cfm, pl)

find interesting file types

(.pdf, .docx, .xlsx, .txt, .readme)

find very interesting file types 


(26)

Email: [email protected] Twitter: @jerryhoff

Getting more specific

inurl:

Searches for keywords in URL

Use this to find all “wordpress” login

(27)

Email: [email protected] Twitter: @jerryhoff

(28)

Email: [email protected] Twitter: @jerryhoff • Web Server • SSL • Namespace Provider • Email • Hosting • CMS

• Analytics & Tracking • JavaScript Library

• Document Info • Encoding

• Server Information

(29)

Email: [email protected] Twitter: @jerryhoff

(30)

Email: [email protected] Twitter: @jerryhoff

End of Part 2:

Web Attacks

(31)

Email: [email protected] Twitter: @jerryhoff

Part 3: 


(32)

Email: [email protected] Twitter: @jerryhoff

This is a big topic…

großes Thema…

(33)

Email: [email protected] Twitter: @jerryhoff

(34)

Email: [email protected] Twitter: @jerryhoff

Authentication

Centralize!

Shiro / Spring Security Active Directory

Single Sign On / Access Management

Authorization

Centralize!

External / URL based (Siteminder) Application / URL based (Filters)

Authorization Annotations

Session Management Protection Session Cookie (httponly, secure,

timeouts, cryptographically strong)

Database / SQL Injection Parameterization / ORM

(35)

Email: [email protected] Twitter: @jerryhoff

Malicious Input Centralized, standardized input validation

Contextual encoding of all untrusted input

Crypto

Hashing: SHA-2 (soon SHA-3) Symmetric: AES

Asymmetric: RSA, ECC

Protect Keys: Don’t store in DB, use file system protections, read only, key rotation policy

Error Handling / Logging No details in error messages

Log all the things!

Data Protection No Cache

No Autocomplete

Communcation HTTPS all the things (appropriately configured)

3rd Party Libraries Track all 3rd party libs in deployment

(36)

Email: [email protected] Twitter: @jerryhoff

(37)

Email: [email protected] Twitter: @jerryhoff

Android

Android Application


Secure Design / 


Secure Coding Guidebook

July 2014

450+ page document

Japan Smartphone Security

Association (JSSEC) Secure Coding

Group

(38)

Email: [email protected] Twitter: @jerryhoff

Struts 1: cleartext password in datasource config

Struts 2: using auto-executed plugins that are picked up from the classpath Android custom permission, exported receiver/provider/service,

insecure version, touchjacking)

Hibernate: cleartext password in connection config JSF: client state saving config

JSF: developer mode enabled config

JPA: cleartext password in connection config J2EE: auto-executed web fragments

J2EE: verb tampering (HTTP Verb bypass) J2EE: session expiration

J2EE: secure / httponly flags J2EE: error page

J2EE: url rewriting

WebSphere: serve servlets by class name

(39)

Email: [email protected] Twitter: @jerryhoff

Browser Security

• Strict-Transport-Security: Enforces HTTPS • X-Frame-Options: Anti-clickjacking

• X-XSS-Protection: Anti-Reflected XSS

• Content-Security-Policy: Anti-XSS, etc..

• X-Content-Type: “nosniff”, prevents browser from

guessing a content-type

(40)

Email: [email protected] Twitter: @jerryhoff

Part 4: 


(41)
(42)
(43)

Email: [email protected] Twitter: @jerryhoff

Maturity

• Assess your organization based on a maturity model

• Pick a target level based on organizational risk tolerance • Plan a path to achieve the target level

• Direction: top-down (C-Level) - cascade to BA,

Architects, Developers, QA, Deployment…

(44)

Email: [email protected] Twitter: @jerryhoff

Often overlooked…

Standardized security controls

Secure coding guidelines

Dependency management

(45)

Email: [email protected] Twitter: @jerryhoff

Example: Mozilla Playdoh

(46)

Email: [email protected] Twitter: @jerryhoff

Backlog

What about existing

applications?

Quantify the risk 


(risk-based approach)

(47)

Email: [email protected] Twitter: @jerryhoff

That’s it!

http://www.computerworld.com/author/jerry-hoff/

https://www.youtube.com/user/AppsecTutorialSeries

[email protected]

@jerryhoff

References

Related documents

We investigated the legacy effect of drought on microbial activity, biomass and composition, and tested whether mixed planting mitigated against the e ffect of drought on

"While the magician shows a wooden box to be absolutely empty, the assistant removes the marble clock and replaces the glass dome on stand.. The magician proves the clock to

Thus, the molecular formula of an analyte can be obtained either from the intensity pattern of the isotopic peaks or by accurate molar mass determination from high resolution

Threat Modeling, STRIDE, Security Principles, Guidelines for Secure Software Development, Security Architecture, Software Attack Surface, Secure Software Development Lifecycle

An integer or real value can be converted into a character string using a write operation. The string is provided as the output variable instead of a file unit number. The

132 Thus, the indefinite financial, economic, and trade sanctions were unilaterally imposed by the developed States of Ratanka and CUP against the developing

config Additional configuration settings such as http authentication ( authenticate ), additional headers (add_headers), cookies (set_cookies) etc.. See config for full details and

If v adopts a sentiment polarity opposite to that of the content diffused from u, this again may be due to: (i) the influential power of u, (ii) the cynicalness of v, and (iii)