|
1
|
- Steve Lipner
- Director of Security Engineering Strategy
- Security Business Unit
- Microsoft Corporation
|
|
2
|
- Who Am I?
- What is SWI?
- SD3 + c
- Secure Development Process
- Threat Models
- Relative Attack Surface
- Open Questions
|
|
3
|
- SLipner@microsoft.com
- Been at Microsoft for 3.5 years
- Started working in security in 1970
- Experience includes A1 systems, firewalls, consulting, other stuff
- Pragmatic
- A chief conspirator!
|
|
4
|
- Secure Windows Initiative
- Work across Microsoft
- Focus on securing products
- Security Features != Secure Features
- Two sub-groups
- Defensive SWI
- Offensive SWI
|
|
5
|
|
|
6
|
|
|
7
|
|
|
8
|
|
|
9
|
|
|
10
|
- You cannot build secure applications unless you understand threats
- Adding security features does not mean you have secure software
- “We use SSL!”
- Find issues before the code is created
- Find different bugs than code review and testing
- Implementation bugs vs higher-level design issues
- Approx 50% of issues come from threat models
|
|
11
|
- Create model of app (DFD, UML etc)
- Build a list of assets that require protection
- Categorize threats to each attack target node with STRIDE
- Spoofing, Tampering, Repudiation,
Info Disclosure, Denial of Service, Elevation of Privilege
- Build threat tree for each threat
- Derived from hardware fault trees
- Rank threats by risk
- Risk = Potential * Damage
- DREAD: Damage potential, Reproducibility, Exploitability, Affected
Users, Discoverability
|
|
12
|
|
|
13
|
|
|
14
|
|
|
15
|
|
|
16
|
|
|
17
|
- Threat types have mitigation techniques
- Spoofing
- Authentication (authn), good credential storage
- Tampering
- Authorization (authz), MAC, signing
- Repudiation
- Authn, Authz, signing, logging, trusted third party
- Info Disclosure
- Denial of Service
- Elev of Priv
- Don’t run with elevated privs
|
|
18
|
|
|
19
|
|
|
20
|
- Threat models help you determine the most ‘dangerous’ portions of the
application
- Prioritize security push efforts
- Prioritize on-going code reviews
- Help determine the defense mechanisms to use
- Determine data flow
- “All input is evil, until proven otherwise”
|
|
21
|
- Testers have problems
- Most are not security testers (read: evil)
- What needs testing?
- How do you test?
- Each threat in the model must have a test plan
- The threat model helps drive testing concepts
- Allows for Whitehat and Blackhat testing
- Prove the mitigations work
- Prove they don’t work :-)
|
|
22
|
- Mitigation techniques have blackhat testing techniques
- Spoofing
- Authentication
- Brute force creds, cred replay, downgrade to less secure authn, view
creds on wire
- Good credential storage
- Use Information Disclosure attacks
- Tampering
- Authorization
- MAC, signing
- Tamper and re-hash?
- Create invalid hash data
- Force app to use less secure protocol (no SSL)
|
|
23
|
- Repudiation
- Authn & Authz
- See Spoofing and Tampering
- Signing
- Logging
- Prevent auditing, spoof log entries (CR/LF)
- Trusted third party
- Info Disclosure
- NOTE: Is there any PII/sensitive data in the data?
- Authorization
- Encryption
- View on-the-wire data
- Kill process and scavenge for sensitive data
- Failure leads to disclosure in error messages
|
|
24
|
- Denial of Service
- Filtering
- Authn & Authz
- See Spoofing and tampering
- Resource pressure
- Elev of Priv
- Don’t run with elevated privs
|
|
25
|
- Scenario-driven
- Note infrastructure mitigating techniques vs. application mitigating
techniques
- Determine privilege to initiate data flow
- Helps determine chance of attack
- Be wary of unauthenticated data flows
- Attackers follow the path of least resistance
- All information disclosure threats are potentially privacy issues
- Any non-mitigated threat is a potential vulnerability
- All security features must mitigate one or more threats
- Work on the higher-risk items first
|
|
26
|
- Simple way of measuring potential for attack
- Goal of a product should be to reduce attack surface
- Lower privilege
- Turn features off
- Defense in depth
- Does not address code quality
- Hard to compare dissimilar products
- On-going work by Microsoft Research
|
|
27
|
|
|
28
|
- Open sockets
- Open RPC endpoints
- Open named pipes
- Services
- Services running by default
- Services running as SYSTEM
- Active Web handlers
- Active ISAPI Filters
- Dynamic Web pages
- Executable vdirs
- Enabled Accounts
- Enabled Accounts in admin group
- Null Sessions to pipes and shares
- Guest account enabled
- Weak ACLs in FS
- Weak ACLs in Registry
- Weak ACLs on shares
- Scripting
|
|
29
|
|
|
30
|
- 20+ services off by default
- 20+ services run in lower privilege
- IIS6 off by default
- Minimal functionality by default
- All code runs in low privilege by default
- More restrictive ACLs throughout
- Internet Explorer is an “HTML 3.2” browser
- “.” directory no longer searched first
- No games installed
- UDDI Server written in C#
- All Active Directory traffic is signed/sealed
- SMB packet signing for Domain Controller traffic
- Defense in depth measures
- ‘safer’ string handling functions
- OS compiled with VC++ /GS flag
- Detects some kinds of stack-based buffer overruns at run time
- Impersonation privilege
|
|
31
|
- Not to inject security bugs into the code in the first place!
- Short term: remove existing flaws
- Longer term: don’t add flaws to the code
- You can’t do this through code review
- …or testing
- They only remove existing flaws
- You have to teach people to do the right things…!
- You must change the process!
|
|
32
|
- Turkish has four letter ‘I’s
- i (U+0069) I (U+0049) ı (U+0131) İ (U+0130)
- In Turkish locale UC("file")==FİLE
|
|
33
|
- Who Am I?
- What is SWI?
- SD3 + c
- Secure Development Process
- Threat Models
- Relative Attack Surface
|
|
34
|
- When is a threat model complete?
- How does privacy apply to TMs?
- A more complete taxonomy of mitigation techniques and technologies
- A more complete taxonomy of attack techniques
- Is Relative Attack Surface accurate?
|
|
35
|
|
|
36
|
|
|
37
|
- Damage Potential
- Minor [1] → Complete Subversion [10]
- Reproducibility
- Rare [1] → Every Time [10]
- Exploitability
- NSA Only [1] → My Mom [10]
- Affected Users
- Discoverability
- Very Subtle [1] → Already on Bugtraq [10]
|