SlideShare uma empresa Scribd logo
1 de 75
Security Engineering 101:
When good design &
security work together
Wendy Knox Everette - @wendyck
O’Reilly Software Architecture
June 13, 2019
Who am I?
Senior Security Advisor
in the Risk Advisory
Services group at
Leviathan Security
Group in Seattle.
Software developer &
security nerd.
@wendyck
What is security engineering,
isn’t it just secure coding
standards?
And how does secure
development fit into a
company’s broader security
program?
What are some of the big issues we’re
concerned about?
- Authentication and authorization
- Information disclosure
- Tampering, Repudiation
- Authentication and authorization
- Spoofing & impersonation
- Evading permissions checks
- Unauthorized access
- Credential theft
- Credential stuffing
- Information disclosure
- From your service
- Via XSS, from your users
- Tampering, Repudiation
- Web Parameter Tampering
- Modifying data within your system
- Taking actions as another user
Security during the design
& planning phase
Design your
security
requirements
Often these are partially
defined by a space you’re
working within or a service that
you integrate with.
But what else do you need to
account for?
Threat
modeling/
interestingness
Is your product interesting
because of data it collects, who
it connects, or what it can do?
How can it be abused? Does it
enable fraud?
Do you allow photo
uploads?
i.e. Can I upload malware
as a review attachment
and just use your s3
hosting?
https://twitter.com/beauwoods/status/1125516366965092352
Design flaws: little to big
● Trusting user text input
● Trusting user headers sent in http
requests
● That API can only be called internally….
Are you sure?
● Installing 3rd party libraries (innocuous
now, can it turn malicious? How would you
know?)
● Rolling your own crypto
● Authentication: make your own? (what are
your authentication flows, how are you
storing creds?) vs using an OAUTH
(privacy risk for your user?)
Not Building
Granular Access
Control
Granular access controls help avoid the
anti-pattern of making every engineer at
your company an admin in your platform
Begin with the expectation of multiple
permissions levels, as bolting on a multi-
level structure on a code base with a lot of
“if user_type > 1” checks is painful.
Carefully encapsulating your auth code
and permissions checks will help make
your system more resilient
Don’t roll your
own Encryption
Encryption
https://twitter.com/tdierks/status/1112377964942028805
Don’t roll your own
crypto
Don’t write complex
parsers
Language-theoretic Security, or langsec,
is one of the causes of application security
vulnerabilities today.
- Parsing or unparsing bugs
- Caused by software failing to
correctly handle inputs
- You have these in your code base
https://twitter.com/perrymetzger/status/1092525703021633538
Parse errors
1. “insufficient recognition, where input-checking logic is unfit to validate a
program’s assumptions about inputs”
2. “Parser differentials, wherein two or more components of a system fail to
interpret input equivalently”
From The Seven Turrets of Babel: A Taxonomy of LangSec Errors and How to
Expunge Them http://langsec.org/papers/langsec-cwes-secdev2016.pdf
More Lang Sec papers & discussion: http://langsec.org/
Don’t roll your own parser
“But I just need to pull out this bit of data”........ 4 years later, we have a pile of
exploits duct-taped together into an essential piece of code that I can’t take down.
What causes these issues?
1. Input recognition and validation code scattered throughout your code
2. The code doesn’t match the programmers' assumptions about safety and
validity of data
-langsec.org
“for complex input languages the problem of
full recognition of valid or expected inputs
may be UNDECIDABLE, in which case no
amount of input-checking code or testing will
suffice to secure the program”
-http://langsec.org/
Please make our pen testers’ lives harder
https://twitter.com/perrymetzger/status/1092528170354573312
Don’t use poor
authentication
Do users log into your system?
How do you secure their
credentials and how do you
help them protect their
accounts?
Not just a good design principle, it makes your
code easier to update (to patch emergent
security issues), helps you build good
permissions models, and protects resources
from each other.
Don’t ignore
encapsulation
Don’t ignore
observability
Doesn’t just help you improve
the software’s performance, it
can be critical to discovering
and remediating security
incidents.
Language choice is not really security neutral
● Use after free and heap corruption vulnerabilities are super useful for building
exploits
● Memory safe languages like Rust protect you in ways that C can’t
● If you’d like to regularly be appalled by these issues, here’s the Twitter
account you want: https://twitter.com/@LazyFishBarrel
That’s a lot to cover!
Think of this as an introduction to the
types of security issues you should
consider as you design software.
There are too many resources to list
here, but the OWASP Top 10 and the
OWASP Mobile Top 10 are decent
places to start
https://www.owasp.org/index.php/Category:OWA
SP_Top_Ten_Project
OWASP Top 10
1. Injection
2. Broken Authentication
3. Sensitive Data Exposure
4. XML External Entities (XXE)
5. Broken Access Control
6. Security Misconfiguration
7. Cross-Site Scripting (XSS)
8. Insecure Deserialization
9. Using Components with Known Vulnerabilities
10.Insufficient Logging & Monitoring
https://www.owasp.org/index.php/Category:OWASP_Top_Ten_Project
Getting it right at this
stage is critical
Writing secure code
At the implementation
stage
Now that you’ve established your security
standards, how do we make sure that the
code is produced to those standards?
Addressing
security early
and often
Do developers in your organization know what areas of
your code are security sensitive?
Are your engineers empowered to ask for security
reviews?
Build good
working
relationships
How are interactions
between developers
and security?
Do they think you just
write vulns all day long?
Do you think they
always say no?
How do you talk about
risks that you need to
take?
What do your conversations about risk
look like?
Document and
train
How do you enforce consistent
escaping of user input?
What are your access control
standards?
Do you have style guides that
help prevent LangSec-style
parsing issues?
Role specific
security training
Start with some basic application
security training for everyone
Can your application security
engineers offer ongoing classes,
send people out to classes?
We’ve found that teaching PMs
some basics can be a force
multiplier- they will recognize
security sensitive areas and
engage resources.
Ownership
Are engineers empowered to request
changes when they see a security impact?
Do your teams see customer reports? Do
you share pen test report findings? Bug
bounty findings?
Familiarity
Can you play OWASP JuiceShop or
another CTF to learn what security issues
look like?
● https://www.owasp.org/index.php/O
WASP_Juice_Shop_Project
What tools can
we use?
Dynamic &
Static analysis
Static analysis
tools
● Start here
● Source-code analysis that
hunts for errors in the
source code
Dynamic
analysis
● Injecting flaws into the
executing source code
● Fuzzing inputs
● Verifying authentication
state
Code reviews
Requiring security
specific code reviews
for some types of
changes will help catch
some classes of bugs
Readable &
modular code is
more secure
Your users are
probably going
to find the best
bugs
Canaries &
launch flags
You want to see
over time that the
CLASSES of bugs
you're still shipping
are getting more
complex
It’s not just code
Accounts,
Secrets,
Configuration
Defaults
Clouds are so
secure!
Private keys & Data access -
these are both critical to the
security level of your cloud
hosted system
GitHub’s blog on their
scanning for auth tokens:
https://github.blog/2018-10-17-behind-
the-scenes-of-github-token-scanning/
Backup files & configurations still around?
Do you store user uploaded data?
How often do you patch- how old is the longest
running process you have?
Are you running VMs when you should run
lamdas?
AWS
Configurations
& Risk
https://magoo.github.io/model-risk-aws/
https://magoo.github.io/model-risk-aws/
How do you secure
authentication
materials?
The AWS Permissions
Underwear Theorem
https://twitter.com/QuinnyPig/status/1120780385460391939
Deployment
Monitoring &
alerting
How do you know the health of
your system?
Do you have enough logging to
for useful incident response
capabilities?
What are you
logging?
Where?
Do you have logs of user
access to sensitive data?
Do you know where people
connected from?
What timezone are your
logs in? Are all your logs in
the same timezone?
Who has write access to
logs?
Change Management
How does your organization know what’s changed
in your production environment?
Who has the ability to make those changes?
“You can’t secure
what you don’t know
you own”
● What’s the process for creating
new internet exposed endpoints?
Don’t make this so onerous that
people route around it - the
Shadow IT problem can make
things worse
● What tools do people in your
organization use that can create
internet exposed endpoints
(Salesforce?)
Post Launch
Maintainability
(patching your
code)
Can you update your code easily?
Can other people who use your
code update it easily?
How are non-
emergent security
issues fixed?
If it’s not a sev 1 emergent issue, what’s your mean time
to rolling out a patch?
Do you track whether security issues on your backlog
are being exploited or impacting users?
How is technical debt
prioritized and tracked?
Do you constantly push out new features and
ignore older sections of your code?
Who is assigned maintenance work - is it the
least experienced developer on your team? Or
do you have one engineer who is always
saddled with fixing the oldest code?
Vulnerability management
(applying their patches)
How do you find out about updates to libraries you
incorporate?
● Github vulnerability alerts if you’re on Github
○ https://help.github.com/en/articles/about-security-alerts-for-
vulnerable-dependencies
Patching
timelines
Can you commit to timelines to
roll out critical patches?
In summary….
Hopefully your team is doing a lot of these things, and hopefully you’ve gotten
some new ideas to dig into.
The biggest force multiplier we’ve found is to educate & empower everyone in
your organization to be responsible for the security of your environment.
Thank you & Questions
Please don’t forget to rate this session!
Wendy Knox Everette
@wendyck
Leviathan Security Group
https://www.leviathansecurity.com/

Mais conteúdo relacionado

Mais procurados

Cloud Security vs Security in the Cloud
Cloud Security vs Security in the CloudCloud Security vs Security in the Cloud
Cloud Security vs Security in the CloudTjylen Veselyj
 
OWASP Québec: Threat Modeling Toolkit - Jonathan Marcil
OWASP Québec: Threat Modeling Toolkit - Jonathan MarcilOWASP Québec: Threat Modeling Toolkit - Jonathan Marcil
OWASP Québec: Threat Modeling Toolkit - Jonathan MarcilJonathan Marcil
 
Security Hole #12 Lviv SoftServe-Symphony Solutions "Lockpicking Authentication"
Security Hole #12 Lviv SoftServe-Symphony Solutions "Lockpicking Authentication"Security Hole #12 Lviv SoftServe-Symphony Solutions "Lockpicking Authentication"
Security Hole #12 Lviv SoftServe-Symphony Solutions "Lockpicking Authentication"Nazar Tymoshyk, CEH, Ph.D.
 
Threat modeling web application: a case study
Threat modeling web application: a case studyThreat modeling web application: a case study
Threat modeling web application: a case studyAntonio Fontes
 
Threat modeling the security of the enterprise
Threat modeling the security of the enterpriseThreat modeling the security of the enterprise
Threat modeling the security of the enterpriseRafal Los
 
Web Application Security Testing
Web Application Security TestingWeb Application Security Testing
Web Application Security TestingMarco Morana
 
Threat modelling(system + enterprise)
Threat modelling(system + enterprise)Threat modelling(system + enterprise)
Threat modelling(system + enterprise)abhimanyubhogwan
 
Gubarevich Peter - 11-Feb-2016 - Show IT 2016 @Bratislava
Gubarevich Peter - 11-Feb-2016 - Show IT 2016 @BratislavaGubarevich Peter - 11-Feb-2016 - Show IT 2016 @Bratislava
Gubarevich Peter - 11-Feb-2016 - Show IT 2016 @BratislavaPeter Gubarevich
 
Application Whitelisting - Complementing Threat centric with Trust centric se...
Application Whitelisting - Complementing Threat centric with Trust centric se...Application Whitelisting - Complementing Threat centric with Trust centric se...
Application Whitelisting - Complementing Threat centric with Trust centric se...Osama Salah
 
Application Threat Modeling
Application Threat ModelingApplication Threat Modeling
Application Threat ModelingMarco Morana
 
Penetration Testing, Auditing & Standards Issue : 02_2012-1
Penetration Testing, Auditing & Standards Issue : 02_2012-1Penetration Testing, Auditing & Standards Issue : 02_2012-1
Penetration Testing, Auditing & Standards Issue : 02_2012-1Falgun Rathod
 
Introduction to security testing
Introduction to security testingIntroduction to security testing
Introduction to security testingNagasahas DS
 
"CERT Secure Coding Standards" by Dr. Mark Sherman
"CERT Secure Coding Standards" by Dr. Mark Sherman"CERT Secure Coding Standards" by Dr. Mark Sherman
"CERT Secure Coding Standards" by Dr. Mark ShermanRinaldi Rampen
 
Developing a Threat Modeling Mindset
Developing a Threat Modeling MindsetDeveloping a Threat Modeling Mindset
Developing a Threat Modeling MindsetRobert Hurlbut
 
Web Application Penetration Testing Introduction
Web Application Penetration Testing IntroductionWeb Application Penetration Testing Introduction
Web Application Penetration Testing Introductiongbud7
 
Secure develpment 2014
Secure develpment 2014Secure develpment 2014
Secure develpment 2014Ariel Evans
 
Mobile security services 2012
Mobile security services 2012Mobile security services 2012
Mobile security services 2012Tjylen Veselyj
 
An Introduction to Secure Application Development
An Introduction to Secure Application DevelopmentAn Introduction to Secure Application Development
An Introduction to Secure Application DevelopmentChristopher Frenz
 

Mais procurados (20)

Cloud Security vs Security in the Cloud
Cloud Security vs Security in the CloudCloud Security vs Security in the Cloud
Cloud Security vs Security in the Cloud
 
OWASP Québec: Threat Modeling Toolkit - Jonathan Marcil
OWASP Québec: Threat Modeling Toolkit - Jonathan MarcilOWASP Québec: Threat Modeling Toolkit - Jonathan Marcil
OWASP Québec: Threat Modeling Toolkit - Jonathan Marcil
 
Secure coding-guidelines
Secure coding-guidelinesSecure coding-guidelines
Secure coding-guidelines
 
Security Hole #12 Lviv SoftServe-Symphony Solutions "Lockpicking Authentication"
Security Hole #12 Lviv SoftServe-Symphony Solutions "Lockpicking Authentication"Security Hole #12 Lviv SoftServe-Symphony Solutions "Lockpicking Authentication"
Security Hole #12 Lviv SoftServe-Symphony Solutions "Lockpicking Authentication"
 
Threat modeling web application: a case study
Threat modeling web application: a case studyThreat modeling web application: a case study
Threat modeling web application: a case study
 
Threat modeling the security of the enterprise
Threat modeling the security of the enterpriseThreat modeling the security of the enterprise
Threat modeling the security of the enterprise
 
Web Application Security Testing
Web Application Security TestingWeb Application Security Testing
Web Application Security Testing
 
Threat modelling(system + enterprise)
Threat modelling(system + enterprise)Threat modelling(system + enterprise)
Threat modelling(system + enterprise)
 
Gubarevich Peter - 11-Feb-2016 - Show IT 2016 @Bratislava
Gubarevich Peter - 11-Feb-2016 - Show IT 2016 @BratislavaGubarevich Peter - 11-Feb-2016 - Show IT 2016 @Bratislava
Gubarevich Peter - 11-Feb-2016 - Show IT 2016 @Bratislava
 
Application Whitelisting - Complementing Threat centric with Trust centric se...
Application Whitelisting - Complementing Threat centric with Trust centric se...Application Whitelisting - Complementing Threat centric with Trust centric se...
Application Whitelisting - Complementing Threat centric with Trust centric se...
 
Application Threat Modeling
Application Threat ModelingApplication Threat Modeling
Application Threat Modeling
 
Penetration Testing, Auditing & Standards Issue : 02_2012-1
Penetration Testing, Auditing & Standards Issue : 02_2012-1Penetration Testing, Auditing & Standards Issue : 02_2012-1
Penetration Testing, Auditing & Standards Issue : 02_2012-1
 
Introduction to security testing
Introduction to security testingIntroduction to security testing
Introduction to security testing
 
"CERT Secure Coding Standards" by Dr. Mark Sherman
"CERT Secure Coding Standards" by Dr. Mark Sherman"CERT Secure Coding Standards" by Dr. Mark Sherman
"CERT Secure Coding Standards" by Dr. Mark Sherman
 
Security-testing presentation
Security-testing presentationSecurity-testing presentation
Security-testing presentation
 
Developing a Threat Modeling Mindset
Developing a Threat Modeling MindsetDeveloping a Threat Modeling Mindset
Developing a Threat Modeling Mindset
 
Web Application Penetration Testing Introduction
Web Application Penetration Testing IntroductionWeb Application Penetration Testing Introduction
Web Application Penetration Testing Introduction
 
Secure develpment 2014
Secure develpment 2014Secure develpment 2014
Secure develpment 2014
 
Mobile security services 2012
Mobile security services 2012Mobile security services 2012
Mobile security services 2012
 
An Introduction to Secure Application Development
An Introduction to Secure Application DevelopmentAn Introduction to Secure Application Development
An Introduction to Secure Application Development
 

Semelhante a Security engineering 101 when good design & security work together

Building an AppSec Team Extended Cut
Building an AppSec Team Extended CutBuilding an AppSec Team Extended Cut
Building an AppSec Team Extended CutMike Spaulding
 
Mike Spaulding - Building an Application Security Program
Mike Spaulding - Building an Application Security ProgramMike Spaulding - Building an Application Security Program
Mike Spaulding - Building an Application Security Programcentralohioissa
 
Elementary-Information-Security-Practices
Elementary-Information-Security-PracticesElementary-Information-Security-Practices
Elementary-Information-Security-PracticesOctogence
 
Application Security - Your Success Depends on it
Application Security - Your Success Depends on itApplication Security - Your Success Depends on it
Application Security - Your Success Depends on itWSO2
 
How to Secure Web Apps — A Web App Security Checklist
How to Secure Web Apps — A Web App Security ChecklistHow to Secure Web Apps — A Web App Security Checklist
How to Secure Web Apps — A Web App Security ChecklistPixel Crayons
 
Security by the numbers
Security by the numbersSecurity by the numbers
Security by the numbersEoin Keary
 
Continuous security testing - sharing responsibility
Continuous security testing - sharing responsibilityContinuous security testing - sharing responsibility
Continuous security testing - sharing responsibilityVodqaBLR
 
Top 20 certified ethical hacker interview questions and answer
Top 20 certified ethical hacker interview questions and answerTop 20 certified ethical hacker interview questions and answer
Top 20 certified ethical hacker interview questions and answerShivamSharma909
 
Project Quality-SIPOCSelect a process of your choice and creat.docx
Project Quality-SIPOCSelect a process of your choice and creat.docxProject Quality-SIPOCSelect a process of your choice and creat.docx
Project Quality-SIPOCSelect a process of your choice and creat.docxwkyra78
 
For Business's Sake, Let's focus on AppSec
For Business's Sake, Let's focus on AppSecFor Business's Sake, Let's focus on AppSec
For Business's Sake, Let's focus on AppSecLalit Kale
 
Break it while you make it: writing (more) secure software
Break it while you make it: writing (more) secure softwareBreak it while you make it: writing (more) secure software
Break it while you make it: writing (more) secure softwareLeigh Honeywell
 
Java Application Development Vulnerabilities
Java Application Development VulnerabilitiesJava Application Development Vulnerabilities
Java Application Development VulnerabilitiesNarola Infotech
 
Appsec2013 assurance tagging-robert martin
Appsec2013 assurance tagging-robert martinAppsec2013 assurance tagging-robert martin
Appsec2013 assurance tagging-robert martindrewz lin
 
Security is our duty and we shall deliver it - White Paper
Security is our duty and we shall deliver it - White PaperSecurity is our duty and we shall deliver it - White Paper
Security is our duty and we shall deliver it - White PaperMohd Anwar Jamal Faiz
 
Manoj Purandare - Application Security - Secure Code Assessment Program - Pre...
Manoj Purandare - Application Security - Secure Code Assessment Program - Pre...Manoj Purandare - Application Security - Secure Code Assessment Program - Pre...
Manoj Purandare - Application Security - Secure Code Assessment Program - Pre...Manoj Purandare ☁
 
Manoj Purandare - Application Security - Secure Code Assessment Program - Pre...
Manoj Purandare - Application Security - Secure Code Assessment Program - Pre...Manoj Purandare - Application Security - Secure Code Assessment Program - Pre...
Manoj Purandare - Application Security - Secure Code Assessment Program - Pre...Manoj Purandare ☁
 
Manoj Purandare - Application Security - Secure Code Assessment Program - Pre...
Manoj Purandare - Application Security - Secure Code Assessment Program - Pre...Manoj Purandare - Application Security - Secure Code Assessment Program - Pre...
Manoj Purandare - Application Security - Secure Code Assessment Program - Pre...Manoj Purandare ☁
 
SCS DevSecOps Seminar - State of DevSecOps
SCS DevSecOps Seminar - State of DevSecOpsSCS DevSecOps Seminar - State of DevSecOps
SCS DevSecOps Seminar - State of DevSecOpsStefan Streichsbier
 

Semelhante a Security engineering 101 when good design & security work together (20)

Building an AppSec Team Extended Cut
Building an AppSec Team Extended CutBuilding an AppSec Team Extended Cut
Building an AppSec Team Extended Cut
 
Mike Spaulding - Building an Application Security Program
Mike Spaulding - Building an Application Security ProgramMike Spaulding - Building an Application Security Program
Mike Spaulding - Building an Application Security Program
 
Elementary-Information-Security-Practices
Elementary-Information-Security-PracticesElementary-Information-Security-Practices
Elementary-Information-Security-Practices
 
Application Security - Your Success Depends on it
Application Security - Your Success Depends on itApplication Security - Your Success Depends on it
Application Security - Your Success Depends on it
 
How to Secure Web Apps — A Web App Security Checklist
How to Secure Web Apps — A Web App Security ChecklistHow to Secure Web Apps — A Web App Security Checklist
How to Secure Web Apps — A Web App Security Checklist
 
Security by the numbers
Security by the numbersSecurity by the numbers
Security by the numbers
 
Arved sandstrom - the rotwithin - atlseccon2011
Arved sandstrom - the rotwithin - atlseccon2011Arved sandstrom - the rotwithin - atlseccon2011
Arved sandstrom - the rotwithin - atlseccon2011
 
Continuous security testing - sharing responsibility
Continuous security testing - sharing responsibilityContinuous security testing - sharing responsibility
Continuous security testing - sharing responsibility
 
Top 20 certified ethical hacker interview questions and answer
Top 20 certified ethical hacker interview questions and answerTop 20 certified ethical hacker interview questions and answer
Top 20 certified ethical hacker interview questions and answer
 
Project Quality-SIPOCSelect a process of your choice and creat.docx
Project Quality-SIPOCSelect a process of your choice and creat.docxProject Quality-SIPOCSelect a process of your choice and creat.docx
Project Quality-SIPOCSelect a process of your choice and creat.docx
 
For Business's Sake, Let's focus on AppSec
For Business's Sake, Let's focus on AppSecFor Business's Sake, Let's focus on AppSec
For Business's Sake, Let's focus on AppSec
 
Break it while you make it: writing (more) secure software
Break it while you make it: writing (more) secure softwareBreak it while you make it: writing (more) secure software
Break it while you make it: writing (more) secure software
 
Java Application Development Vulnerabilities
Java Application Development VulnerabilitiesJava Application Development Vulnerabilities
Java Application Development Vulnerabilities
 
Appsec2013 assurance tagging-robert martin
Appsec2013 assurance tagging-robert martinAppsec2013 assurance tagging-robert martin
Appsec2013 assurance tagging-robert martin
 
Software Myths
Software MythsSoftware Myths
Software Myths
 
Security is our duty and we shall deliver it - White Paper
Security is our duty and we shall deliver it - White PaperSecurity is our duty and we shall deliver it - White Paper
Security is our duty and we shall deliver it - White Paper
 
Manoj Purandare - Application Security - Secure Code Assessment Program - Pre...
Manoj Purandare - Application Security - Secure Code Assessment Program - Pre...Manoj Purandare - Application Security - Secure Code Assessment Program - Pre...
Manoj Purandare - Application Security - Secure Code Assessment Program - Pre...
 
Manoj Purandare - Application Security - Secure Code Assessment Program - Pre...
Manoj Purandare - Application Security - Secure Code Assessment Program - Pre...Manoj Purandare - Application Security - Secure Code Assessment Program - Pre...
Manoj Purandare - Application Security - Secure Code Assessment Program - Pre...
 
Manoj Purandare - Application Security - Secure Code Assessment Program - Pre...
Manoj Purandare - Application Security - Secure Code Assessment Program - Pre...Manoj Purandare - Application Security - Secure Code Assessment Program - Pre...
Manoj Purandare - Application Security - Secure Code Assessment Program - Pre...
 
SCS DevSecOps Seminar - State of DevSecOps
SCS DevSecOps Seminar - State of DevSecOpsSCS DevSecOps Seminar - State of DevSecOps
SCS DevSecOps Seminar - State of DevSecOps
 

Mais de Wendy Knox Everette

FedRAMP Is Broken (And here's how to fix it)
FedRAMP Is Broken (And here's how to fix it)FedRAMP Is Broken (And here's how to fix it)
FedRAMP Is Broken (And here's how to fix it)Wendy Knox Everette
 
Weaponizing Your Fitness Tracker Against You_ Health, Fitness, & Location Tra...
Weaponizing Your Fitness Tracker Against You_ Health, Fitness, & Location Tra...Weaponizing Your Fitness Tracker Against You_ Health, Fitness, & Location Tra...
Weaponizing Your Fitness Tracker Against You_ Health, Fitness, & Location Tra...Wendy Knox Everette
 
Lets talk about soc2s, baby! BSidesLV 2021
Lets talk about soc2s, baby! BSidesLV 2021Lets talk about soc2s, baby! BSidesLV 2021
Lets talk about soc2s, baby! BSidesLV 2021Wendy Knox Everette
 
Vendors, and Risk, and Tigers, and Bears, Oh My: How to Create a Vendor Revie...
Vendors, and Risk, and Tigers, and Bears, Oh My: How to Create a Vendor Revie...Vendors, and Risk, and Tigers, and Bears, Oh My: How to Create a Vendor Revie...
Vendors, and Risk, and Tigers, and Bears, Oh My: How to Create a Vendor Revie...Wendy Knox Everette
 
BSidesPDX "An update from the crypto wars 2.0"
BSidesPDX "An update from the crypto wars 2.0"BSidesPDX "An update from the crypto wars 2.0"
BSidesPDX "An update from the crypto wars 2.0"Wendy Knox Everette
 
Incident Response and the Attorney Client Privilege - ShmooCon 2019
Incident Response and the Attorney Client Privilege - ShmooCon 2019Incident Response and the Attorney Client Privilege - ShmooCon 2019
Incident Response and the Attorney Client Privilege - ShmooCon 2019Wendy Knox Everette
 
Meet the hackers: Seattle Tech Law CLE December 2018
Meet the hackers: Seattle Tech Law CLE December 2018Meet the hackers: Seattle Tech Law CLE December 2018
Meet the hackers: Seattle Tech Law CLE December 2018Wendy Knox Everette
 
SeaSec East: Green Locks For You & Me
SeaSec East: Green Locks For You & MeSeaSec East: Green Locks For You & Me
SeaSec East: Green Locks For You & MeWendy Knox Everette
 
Fingerprints, Passcodes, and Self Incrimination - BSides Nova
Fingerprints, Passcodes, and Self Incrimination - BSides NovaFingerprints, Passcodes, and Self Incrimination - BSides Nova
Fingerprints, Passcodes, and Self Incrimination - BSides NovaWendy Knox Everette
 
Regulatory Nets vs the Fishing Hook of Litigation - BSides Las Vegas 2017
Regulatory Nets vs the Fishing Hook of Litigation - BSides Las Vegas 2017Regulatory Nets vs the Fishing Hook of Litigation - BSides Las Vegas 2017
Regulatory Nets vs the Fishing Hook of Litigation - BSides Las Vegas 2017Wendy Knox Everette
 
Security Vulnerabilities, the Current State of Consumer Protection Law, & how...
Security Vulnerabilities, the Current State of Consumer Protection Law, & how...Security Vulnerabilities, the Current State of Consumer Protection Law, & how...
Security Vulnerabilities, the Current State of Consumer Protection Law, & how...Wendy Knox Everette
 

Mais de Wendy Knox Everette (13)

FedRAMP Is Broken (And here's how to fix it)
FedRAMP Is Broken (And here's how to fix it)FedRAMP Is Broken (And here's how to fix it)
FedRAMP Is Broken (And here's how to fix it)
 
Weaponizing Your Fitness Tracker Against You_ Health, Fitness, & Location Tra...
Weaponizing Your Fitness Tracker Against You_ Health, Fitness, & Location Tra...Weaponizing Your Fitness Tracker Against You_ Health, Fitness, & Location Tra...
Weaponizing Your Fitness Tracker Against You_ Health, Fitness, & Location Tra...
 
Lets talk about soc2s, baby! BSidesLV 2021
Lets talk about soc2s, baby! BSidesLV 2021Lets talk about soc2s, baby! BSidesLV 2021
Lets talk about soc2s, baby! BSidesLV 2021
 
Vendors, and Risk, and Tigers, and Bears, Oh My: How to Create a Vendor Revie...
Vendors, and Risk, and Tigers, and Bears, Oh My: How to Create a Vendor Revie...Vendors, and Risk, and Tigers, and Bears, Oh My: How to Create a Vendor Revie...
Vendors, and Risk, and Tigers, and Bears, Oh My: How to Create a Vendor Revie...
 
BSidesPDX "An update from the crypto wars 2.0"
BSidesPDX "An update from the crypto wars 2.0"BSidesPDX "An update from the crypto wars 2.0"
BSidesPDX "An update from the crypto wars 2.0"
 
Incident Response and the Attorney Client Privilege - ShmooCon 2019
Incident Response and the Attorney Client Privilege - ShmooCon 2019Incident Response and the Attorney Client Privilege - ShmooCon 2019
Incident Response and the Attorney Client Privilege - ShmooCon 2019
 
Meet the hackers: Seattle Tech Law CLE December 2018
Meet the hackers: Seattle Tech Law CLE December 2018Meet the hackers: Seattle Tech Law CLE December 2018
Meet the hackers: Seattle Tech Law CLE December 2018
 
SeaSec East: Green Locks For You & Me
SeaSec East: Green Locks For You & MeSeaSec East: Green Locks For You & Me
SeaSec East: Green Locks For You & Me
 
Green Locks for You and Me
Green Locks for You and MeGreen Locks for You and Me
Green Locks for You and Me
 
An Encyclopedia of Wiretaps
An Encyclopedia of WiretapsAn Encyclopedia of Wiretaps
An Encyclopedia of Wiretaps
 
Fingerprints, Passcodes, and Self Incrimination - BSides Nova
Fingerprints, Passcodes, and Self Incrimination - BSides NovaFingerprints, Passcodes, and Self Incrimination - BSides Nova
Fingerprints, Passcodes, and Self Incrimination - BSides Nova
 
Regulatory Nets vs the Fishing Hook of Litigation - BSides Las Vegas 2017
Regulatory Nets vs the Fishing Hook of Litigation - BSides Las Vegas 2017Regulatory Nets vs the Fishing Hook of Litigation - BSides Las Vegas 2017
Regulatory Nets vs the Fishing Hook of Litigation - BSides Las Vegas 2017
 
Security Vulnerabilities, the Current State of Consumer Protection Law, & how...
Security Vulnerabilities, the Current State of Consumer Protection Law, & how...Security Vulnerabilities, the Current State of Consumer Protection Law, & how...
Security Vulnerabilities, the Current State of Consumer Protection Law, & how...
 

Último

FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756dollysharma2066
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTbhaskargani46
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdfSuman Jyoti
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Bookingdharasingh5698
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesPrabhanshu Chaturvedi
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordAsst.prof M.Gokilavani
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VDineshKumar4165
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)simmis5
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...roncy bisnoi
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01KreezheaRecto
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptDineshKumar4165
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Christo Ananth
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...ranjana rawat
 

Último (20)

FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377877756
 
Generative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPTGenerative AI or GenAI technology based PPT
Generative AI or GenAI technology based PPT
 
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank  Design by Working Stress - IS Method.pdfIntze Overhead Water Tank  Design by Working Stress - IS Method.pdf
Intze Overhead Water Tank Design by Working Stress - IS Method.pdf
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 BookingVIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
VIP Call Girls Ankleshwar 7001035870 Whatsapp Number, 24/07 Booking
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Walvekar Nagar Call Me 7737669865 Budget Friendly No Advance Booking
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and Properties
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete RecordCCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
CCS335 _ Neural Networks and Deep Learning Laboratory_Lab Complete Record
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Thermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - VThermal Engineering-R & A / C - unit - V
Thermal Engineering-R & A / C - unit - V
 
Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)Java Programming :Event Handling(Types of Events)
Java Programming :Event Handling(Types of Events)
 
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
Call Girls Pimpri Chinchwad Call Me 7737669865 Budget Friendly No Advance Boo...
 
Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01Double rodded leveling 1 pdf activity 01
Double rodded leveling 1 pdf activity 01
 
Thermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.pptThermal Engineering -unit - III & IV.ppt
Thermal Engineering -unit - III & IV.ppt
 
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
Call for Papers - Educational Administration: Theory and Practice, E-ISSN: 21...
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
The Most Attractive Pune Call Girls Manchar 8250192130 Will You Miss This Cha...
 

Security engineering 101 when good design & security work together

  • 1. Security Engineering 101: When good design & security work together Wendy Knox Everette - @wendyck O’Reilly Software Architecture June 13, 2019
  • 2. Who am I? Senior Security Advisor in the Risk Advisory Services group at Leviathan Security Group in Seattle. Software developer & security nerd. @wendyck
  • 3. What is security engineering, isn’t it just secure coding standards? And how does secure development fit into a company’s broader security program?
  • 4. What are some of the big issues we’re concerned about? - Authentication and authorization - Information disclosure - Tampering, Repudiation
  • 5. - Authentication and authorization - Spoofing & impersonation - Evading permissions checks - Unauthorized access - Credential theft - Credential stuffing
  • 6. - Information disclosure - From your service - Via XSS, from your users
  • 7. - Tampering, Repudiation - Web Parameter Tampering - Modifying data within your system - Taking actions as another user
  • 8. Security during the design & planning phase
  • 9. Design your security requirements Often these are partially defined by a space you’re working within or a service that you integrate with. But what else do you need to account for?
  • 10. Threat modeling/ interestingness Is your product interesting because of data it collects, who it connects, or what it can do? How can it be abused? Does it enable fraud?
  • 11. Do you allow photo uploads?
  • 12. i.e. Can I upload malware as a review attachment and just use your s3 hosting?
  • 14. Design flaws: little to big ● Trusting user text input ● Trusting user headers sent in http requests ● That API can only be called internally…. Are you sure? ● Installing 3rd party libraries (innocuous now, can it turn malicious? How would you know?) ● Rolling your own crypto ● Authentication: make your own? (what are your authentication flows, how are you storing creds?) vs using an OAUTH (privacy risk for your user?)
  • 16. Granular access controls help avoid the anti-pattern of making every engineer at your company an admin in your platform
  • 17. Begin with the expectation of multiple permissions levels, as bolting on a multi- level structure on a code base with a lot of “if user_type > 1” checks is painful.
  • 18. Carefully encapsulating your auth code and permissions checks will help make your system more resilient
  • 19. Don’t roll your own Encryption
  • 21. Don’t roll your own crypto
  • 22. Don’t write complex parsers Language-theoretic Security, or langsec, is one of the causes of application security vulnerabilities today. - Parsing or unparsing bugs - Caused by software failing to correctly handle inputs - You have these in your code base
  • 24. Parse errors 1. “insufficient recognition, where input-checking logic is unfit to validate a program’s assumptions about inputs” 2. “Parser differentials, wherein two or more components of a system fail to interpret input equivalently” From The Seven Turrets of Babel: A Taxonomy of LangSec Errors and How to Expunge Them http://langsec.org/papers/langsec-cwes-secdev2016.pdf More Lang Sec papers & discussion: http://langsec.org/
  • 25. Don’t roll your own parser “But I just need to pull out this bit of data”........ 4 years later, we have a pile of exploits duct-taped together into an essential piece of code that I can’t take down.
  • 26. What causes these issues? 1. Input recognition and validation code scattered throughout your code 2. The code doesn’t match the programmers' assumptions about safety and validity of data -langsec.org
  • 27. “for complex input languages the problem of full recognition of valid or expected inputs may be UNDECIDABLE, in which case no amount of input-checking code or testing will suffice to secure the program” -http://langsec.org/
  • 28. Please make our pen testers’ lives harder https://twitter.com/perrymetzger/status/1092528170354573312
  • 29. Don’t use poor authentication Do users log into your system? How do you secure their credentials and how do you help them protect their accounts?
  • 30. Not just a good design principle, it makes your code easier to update (to patch emergent security issues), helps you build good permissions models, and protects resources from each other. Don’t ignore encapsulation
  • 31. Don’t ignore observability Doesn’t just help you improve the software’s performance, it can be critical to discovering and remediating security incidents.
  • 32. Language choice is not really security neutral ● Use after free and heap corruption vulnerabilities are super useful for building exploits ● Memory safe languages like Rust protect you in ways that C can’t ● If you’d like to regularly be appalled by these issues, here’s the Twitter account you want: https://twitter.com/@LazyFishBarrel
  • 33. That’s a lot to cover! Think of this as an introduction to the types of security issues you should consider as you design software. There are too many resources to list here, but the OWASP Top 10 and the OWASP Mobile Top 10 are decent places to start https://www.owasp.org/index.php/Category:OWA SP_Top_Ten_Project
  • 34. OWASP Top 10 1. Injection 2. Broken Authentication 3. Sensitive Data Exposure 4. XML External Entities (XXE) 5. Broken Access Control 6. Security Misconfiguration 7. Cross-Site Scripting (XSS) 8. Insecure Deserialization 9. Using Components with Known Vulnerabilities 10.Insufficient Logging & Monitoring https://www.owasp.org/index.php/Category:OWASP_Top_Ten_Project
  • 35. Getting it right at this stage is critical
  • 37. At the implementation stage Now that you’ve established your security standards, how do we make sure that the code is produced to those standards?
  • 38. Addressing security early and often Do developers in your organization know what areas of your code are security sensitive? Are your engineers empowered to ask for security reviews?
  • 39. Build good working relationships How are interactions between developers and security? Do they think you just write vulns all day long? Do you think they always say no? How do you talk about risks that you need to take?
  • 40. What do your conversations about risk look like?
  • 41. Document and train How do you enforce consistent escaping of user input? What are your access control standards? Do you have style guides that help prevent LangSec-style parsing issues?
  • 42. Role specific security training Start with some basic application security training for everyone Can your application security engineers offer ongoing classes, send people out to classes? We’ve found that teaching PMs some basics can be a force multiplier- they will recognize security sensitive areas and engage resources.
  • 43. Ownership Are engineers empowered to request changes when they see a security impact? Do your teams see customer reports? Do you share pen test report findings? Bug bounty findings?
  • 44. Familiarity Can you play OWASP JuiceShop or another CTF to learn what security issues look like? ● https://www.owasp.org/index.php/O WASP_Juice_Shop_Project
  • 47. Static analysis tools ● Start here ● Source-code analysis that hunts for errors in the source code
  • 48. Dynamic analysis ● Injecting flaws into the executing source code ● Fuzzing inputs ● Verifying authentication state
  • 49. Code reviews Requiring security specific code reviews for some types of changes will help catch some classes of bugs
  • 50. Readable & modular code is more secure
  • 51. Your users are probably going to find the best bugs
  • 53. You want to see over time that the CLASSES of bugs you're still shipping are getting more complex
  • 56. Clouds are so secure! Private keys & Data access - these are both critical to the security level of your cloud hosted system GitHub’s blog on their scanning for auth tokens: https://github.blog/2018-10-17-behind- the-scenes-of-github-token-scanning/
  • 57. Backup files & configurations still around? Do you store user uploaded data? How often do you patch- how old is the longest running process you have? Are you running VMs when you should run lamdas?
  • 59.
  • 61. How do you secure authentication materials?
  • 62. The AWS Permissions Underwear Theorem https://twitter.com/QuinnyPig/status/1120780385460391939
  • 64. Monitoring & alerting How do you know the health of your system? Do you have enough logging to for useful incident response capabilities?
  • 65. What are you logging? Where? Do you have logs of user access to sensitive data? Do you know where people connected from? What timezone are your logs in? Are all your logs in the same timezone? Who has write access to logs?
  • 66. Change Management How does your organization know what’s changed in your production environment? Who has the ability to make those changes?
  • 67. “You can’t secure what you don’t know you own” ● What’s the process for creating new internet exposed endpoints? Don’t make this so onerous that people route around it - the Shadow IT problem can make things worse ● What tools do people in your organization use that can create internet exposed endpoints (Salesforce?)
  • 69. Maintainability (patching your code) Can you update your code easily? Can other people who use your code update it easily?
  • 70. How are non- emergent security issues fixed? If it’s not a sev 1 emergent issue, what’s your mean time to rolling out a patch? Do you track whether security issues on your backlog are being exploited or impacting users?
  • 71. How is technical debt prioritized and tracked? Do you constantly push out new features and ignore older sections of your code? Who is assigned maintenance work - is it the least experienced developer on your team? Or do you have one engineer who is always saddled with fixing the oldest code?
  • 72. Vulnerability management (applying their patches) How do you find out about updates to libraries you incorporate? ● Github vulnerability alerts if you’re on Github ○ https://help.github.com/en/articles/about-security-alerts-for- vulnerable-dependencies
  • 73. Patching timelines Can you commit to timelines to roll out critical patches?
  • 74. In summary…. Hopefully your team is doing a lot of these things, and hopefully you’ve gotten some new ideas to dig into. The biggest force multiplier we’ve found is to educate & empower everyone in your organization to be responsible for the security of your environment.
  • 75. Thank you & Questions Please don’t forget to rate this session! Wendy Knox Everette @wendyck Leviathan Security Group https://www.leviathansecurity.com/

Notas do Editor

  1. I’m a software developer & a security engineer, working as a senior security advisor at Leviathan Security Group in Seattle I work with smaller cloud hosted companies on a variety of security topics- this can range from ensuring that their cloud environments are well secured to helping with software design and code reviews to designing risk management processes. You can find me on twitter at @wendyck
  2. We’re going to take a look at how to improve the security of the code that your team writes & how application security fits into a broader security stance. And we’re going to look at ways that security and development teams can work together. Application security, which we’ll focus on, is distinct from other areas like network security, but is still a very broad field that covers everything from devsecops to coding flaws.
  3. Most of you aren’t security experts here, and I can’t teach you everything about app sec in 40 minutes, so I’ll go through a few of the biggest concerns at a high level. Our goal here will really be to think about the types of problems that cause a lot of security vulnerabilities, and give you some starting points for more research. So when we talk about application security, there are some broad classes of vulnerabilities that we’re concerned with like authenticating people and services, protecting sensitive information from leaking, and maintaining the integrity of the information in our systems.
  4. Who can access things & how is a core security concern. If your system is a single public web page, you still have authorization concerns. You’ll need to restrict access to make changes to that page only to your authorized developers. Spoofing vulnerabilities are flaws that allow users to take actions as other users. Facebook had a spoofing flaw last in their “view your profile page as” functionality. The “view as” functionality was meant to allow users to see what information on their page was visible to others, but they could then steal access tokens of the user they were viewing as. Credential stuffing is a newish attack, where users take username & password combinations leaked in prior data breaches and try them on different websites. Because so many people re-use passwords, this works surprisingly often. If the site doesn’t implement multifactor authentication or other protections, then the attackers can access the accounts.
  5. Are you protecting your data from being read by users who shouldn’t have access to it? Can you assert that no one has made changes that they shouldn’t have permissions to perform? What about information about your services? What about error messages your website produces? Can attackers enumerate accounts on your system by entering an email address & password, and then checking the error message to see if it says “incorrect email” or “incorrect password”? This can allow attackers to determine whether an account exists on the system & is a form of information disclosure
  6. There are many ways attackers can tamper with your system. For instance, web parameter tampering is a way that attackers can modify hidden input form fields, cookies, headers, or anything else sent over the wire to your web application. Cross Site Request Forgery is a form of this attack, where attackers craft a url that causes a system to make some change, like adding an address to an address book, and then getting an unsuspecting user’s browser to load that url & have the action occur
  7. So let’s start with one of the most important things we can do- incorporate security concerns into the planning and design phase. Shifting security reviews as early in the process as possible is one of the best ways to better secure your systems. Even better is not just getting external reviews as an add-on, but starting to think about security as something each team is responsible for
  8. In addition to capturing feature requirements, like what a new user sign up flow should look like, we should capture important information about the security aspects of the system. For a new user sign up, do we understand how to build the web forms to protect against XSS? How will new user credentials be stored? Do we integrate with an external authentication system? Try to make sure everyone understands these requirements before we start coding. You might also have regulatory requirements, or security guarantees that you have to make to partners or other parties who you integrate with.These will probably affect the controls you need to incorporate and the features you have to support.
  9. Before we come up with any more security requirements, we should do some threat modeling. This sounds like a scary hacker thing, but really…. It’s just thinking creatively about how to misuse tools and poking at the assumptions that we’ve made. It’s a form of thinking creatively & it can be really fun.
  10. So let’s do a simple threat model, just so that we can see how easy it can be. Let’s say that your website wants to start allowing customers to upload photos on reviews. Awesome! More engaging content! We’re going to dive in and start tweaking the layout, updating user prompts, and doing all the work to add this form to our website. But what else are we allowing? Have we just looked at the happy path through the review writing process? How could this be abused?
  11. What happens if non-photo files are uploaded? What if the user uploads photos but never publishes the reviews they’re attached to? Do those files just sit on s3 forever? Can they be externally linked to? Can I use your photo hosting to host malware? Do you ever scan over your file upload services and see what’s being stored? Do you look at access logs? Do you check the referrer headers to see what is linking to content that you host?
  12. Threat modeling like this is sadly really too rare in most software development planning cycles. We’re driven by requirements and metrics, and there’s often no specific home in planning cycles for the consideration of how to break or misuse what we’re building. Oftentimes fraud and abuse are uncovered only after something has been live for a while. Or sometimes you have people on your team who can come up with these misuse patterns, but their bugs may get triaged out of releases. Making a point to surface and address these concerns early will make your products safer and more secure.
  13. As we do this threat modeling, what are some other examples of misuse and abuse that we might want to think about? What are we trusting that we shouldn’t? What assumptions have we encoded into the system? Trusting anything that comes into our system Misconfigurations and Misunderstanding who can reach our systems 3rd party javascript libraries that get turned into malware droppers or bitcoin miners after they’ve achieved sufficient uptake Designing your own encryption methods and using it to encrypt sensitive information Using a login system without thinking about the risks and tradeoffs that your implementation brings with it
  14. Let’s dig into a few of these areas where security design flaws lurk. Access Control is a big one that we need to think about early. Re-doing a poorly designed access control system later can be incredibly painful. Living with a weak one can mean playing whack a mole with security issues.
  15. Do you have only regular users and then admins who can see everything on your platform? What if you now want to hire content moderators? Do you have to give them admin, even though they don’t need to see user payment information?
  16. Some design considerations here to think about include checking authorization when you grant access to a resource. Do you need a network call, and how do you fail if that doesn’t succeed? What does the check look like? You should design to support multiple levels of authentication even if you don’t build them all now so that you don’t have to begin all over again when you add those content moderators.
  17. Try to create one, or a small number, of access granting functions. Don’t rewrite this code over and over, because that causes bugs to slip in. Separate business logic, if you can. Try to avoid using numeric labels for permissions levels. When it’s late at night, and you have to fix a problem, will you remember if Admin is 0, or 1, or 2?
  18. Here’s a design consideration that’s closely related to access control. Unfortunately, this is one security control that engineers LOVE to work on. Writing software that does your encryption & decryption is really attractive to a lot of software developers.
  19. Here’s the biggest design flaw around encryption: trying to do it yourself. Don’t roll your own crypto. Check with your organization’s security experts about how to encrypt and decrypt information. Use standard encryption libraries. Do not implement your own algorithms to encrypt.
  20. But seriously. Cryptography has to be tested and validated by experts. Tiny issues that are easy to miss can lead to an unraveling of the entire encryption scheme. If you have read about the way the Allies cracked the German enigma machine, it’s a great story and is a wonderful example of the way that numerous small flaws can lead to plaintext recovery
  21. “Don’t roll your own crypto” is well known. But parsing errors are still somewhat esoteric, despite underlying a large number of app sec issues. Input handling bugs are an entire class of issue that encompasses classic vulnerabilities like XSS and SQL Injection. Almost all of these can be rolled up into the meta issue of lang sec parse & unparse bugs. Langsec.org defines these issues as a meta class of problems stemming from “ad hoc programming of input handling at all layers of network stacks”
  22. Well known security vulnerabilities like Heartbleed are lang sec issues. If you’re writing code that has to interpret any form of input, you probably just code up some solution to extract what you need from it and move on. But these can break down with malicious inputs. This tweet is from a thread that does a great job of explaining lang sec issues
  23. Parsing errors usually fall into these two buckets. first one is generally made worse by starting to work with the input that you have before you’ve finished parsing the entire input - this is basically at the root of the SQL injection class of bugs Secondly, when you have two pieces of code that need to respond in the same way to a given input, but run different parsing code, some inputs may lead to different, and unexpected, outcomes
  24. This should be as well known as “don’t roll your own crypto” - vulnerabilities lurk in underdeveloped parsers. And once you’ve written one, it can be extremely difficult to rip it out and replace it, leading to a vulnerable-patch-vulnerable-try to patch and create new vulns - try to patch again - vulnerable- patch cycle that can be never ending
  25. Langsec.org collects papers and other information about these issues, and they define two top level problems that lead to these bugs. First, separating the parsing around your codebase makes it hard to fully validate before you take action; for an extremely simple example of this, think of SQL injection issues, where we start the query on the database before we’ve fully extracted the incoming query string and confirmed that it’s not malicious. Secondly, the code that you wrote doesn’t do what you think it does. It does only what you told it to do. This is kind of simplistic, because this is really the root cause of all software bugs, but it leads to nasty implications here
  26. If the input you’re parsing is sufficiently complex, it’s possible that we can never fully validate it, especially as your input grammar approaches Turing completeness. You should try to make your acceptable inputs as minimal as possible where you can. Where you can’t, understand that this is going to be an issue and think about how to defend against it with mitigating controls, if you can.
  27. From the same twitter thread - these vulnerabilities exist all over because people are permissive with their parsing, they use partially parsed inputs, and they make assumptions about how cases are handled when connecting components. To wrap this up, Inputs you expect should be fully defined during your design phase, ideally with a grammar Fully validate all inputs before you take action on them in your code
  28. Next, Authentication is another component that can be great to outsource if at all possible. Supporting SSO through SAML is a much better security choice than building your own stack to handle login, log out, password change, forgot password, account storage, and so forth. User interfaces can have a big impact on security here. For instance, if you write your own login, do you have a password strength meter for users? Do you allow pasting text into the password field, so that users can use password managers?
  29. Encapsulation is another good design pattern regardless of security concerns. It has a broad security impact across access controls, preventing information disclosure, and enabling you to work on small sections of your code. More modular code is more maintainable code, which helps you respond to security issues quickly and contain the impact.
  30. Monitoring and alerting are important not just for catching outages or performance issues, but also to detect security incidents. This can require a lot of tuning, because you don’t want to be flooded with false positives. For instance, you don’t necessarily want to be paged every time someone performs a search with an angle bracket character. But you would want to be alerted if a web resource started making massive requests, well above your expected volume, against a database that holds your customer account information. That could be an attacker who found a sql injection bug and is exfiltrating your customer information.
  31. This is a controversial topic, but if you’re designing a system from scratch, and you have the chance to use a memory safe language, think about doing so. Memory corruption bugs are loved by exploit developers, and starving them of these resources is a good way to improve the security of your product. At the same time, be careful about choosing trendy language that most of your programmers don’t know, as you can end up without the necessary expertise to keep it up to date if your experts leave.
  32. This was a lot of content, and wasn’t nearly enough time to teach you how to design to handle all these challenges. As you begin to dive into these issues, the OWASP top 10 list can be a helpful guide.
  33. These are the current web owasp top 10. Many of the issues that we’ve discussed mostly fit into these buckets, and these are a great start as a checklist of security issues to validate your systems against. When you design your security requirements for a new feature, take time to make sure that you’ve thought about whether of these bugs could occur in the new code. If you’re writing a new search display page, you’ll want to think about XSS. But you also want to consider if you have enough logging. And you’ll want to make sure that the search engine you use isn’t one that’s vulnerable. And could the search surface information that the user shouldn’t have access to see? It can be an incredibly useful exercise to sit down with your team & make up your own custom ranking of these issues. If you don’t use XML, but do get XSS issues, then you should move XSS higher in your personalized ranking.
  34. Fixing security issues at the design phase is infinitely more effective than trying to mitigate them after the code is finished and nearly ready to deploy. Every compensating control we don’t have to put in place, because the problem was caught early, is a big win.
  35. So now that we’ve talked about the design phase, let’s discuss the fun part where we write code.
  36. Developing security standards for your projects is great, but then oftentimes reality hits as deadlines loom and you’re working through sprint cycles to iterate and launch. All the concerns we just went over are still going to come into play - security issues can’t just be designed away with a good set of requirements, unfortunately. But we can follow some practices that should have a security positive impact on our software.
  37. Empowering your engineers to be responsible for the security of your code is one of the biggest wins. Do they have security experts to reach out to, and can they engage them when they need to? How well does your development team and the security team work together?
  38. Do you get value from pairing with your security team, or are they always a roadblock for you? Do you know how to explain to the security team why you need to do something?
  39. The security team should be helping you to make decisions about what security concerns to prioritize, but they need to understand what goals you’re trying to achieve. Can you explain to them what metrics you’re seeking to affect, and what approaches you’ve already tried, and what problems you saw? They should also be able to explain the security impact to you of various choices you’re considering. Do you want to use a new javascript library to assist with image resizing on your reviews page? What do they tell you about the risks of incorporating this into your website?
  40. Make sure your team can find documentation on your security requirements and your standards. Ensure that they know what resources they can engage with. Also put effort into keeping this up to date, as new threats emerge. Train your senior engineers to recognize patterns that cause security problems so that they can catch issues in code reviews.
  41. Start with basic security training - that raises awareness - with all your developers. If you have some security enthusiasts in your engineering team, have them create an hour long training and give it every few months. Maybe it just presents the OWASP top 10. Expand as you can. Don’t forget people outside your core technical staff like PMs or customer support engineers - they might not need to the same technical training about parsing, but teaching them about user input issues can go a long way to empowering them to spot issues early
  42. It doesn’t work to assume that someone else in the process owns the security of your code or your systems and to rely on external checks. One of the best ways to help your teams understand security impacts in the code they write is to familiarize them with real world reported issues and empower them to tackle similar concerns that come across in your codebase. If you have a bug bounty program, do they get involved with assigning an impact to reported issues? Do they have a way to see customer reports of bugs? If you have a Security Operations Center, or SOC, have they ever visited to see what alerts are being raised?
  43. We’ve found that setting teams up with a purposely vulnerable system to hack on like Juice Shop is a great tool. They learn how easy some of these exploits are, and they can explore new vulnerabilities they haven’t seen before. There are many online CTFs beyond just Juice Shop, and you might consider giving teams time to play with them, or do a group project where you tackle them together. Teamwork is really helpful here, because these can be discouraging if you don’t know the tricks for attacks just yet. Get several engineers together to research potential attacks and brainstorm how to iterate from an attack that works on one level to the next.
  44. In addition to training, there are some tools we can put to use in our organizations to improve our security
  45. If you have automated tests and deployment pipelines, static & dynamic analysis can be great tools to add in. They often don’t get used because of the worry of false positives and the tuning required, but they’re incredibly helpful.
  46. Static analysis tools help ensure that secure coding policies are being followed. They’re language specific, so you’ll need to find one for the programming language that you use. They scan your source code for issues like numerical errors, input validation, race conditions, path traversals, pointers problems and dereferences
  47. Dynamic analysis, in contrast, is a form of run-time verification. These tools monitor application behavior for memory corruption, user privilege issues, and other critical security problems. Often times they have to be trained by giving them a set of urls and credentials, or a fuzzing corpus. These can be harder to hook into a deployment pipeline, but automating these against your builds on a regular basis will help to turn up issues
  48. Code reviews are a really underrated tool. This is where you can enforce standards, such using the same code to perform permission checks, making sure that XSS protections haven’t been accidentally disengaged, and reviewing for adequate logging and error messages. Pull in your security engineers for reviews when you work in sensitive areas. Work to teach your teams what to look for to prevent security issues. For instance, if they see parsers, or code that is trusting user input, or performing permissions checks in non-standard ways, what do they do?
  49. This makes sense, right? If you have to go into an unfamiliar area of your code base to fix an issue, can you cleanly make the fix without causing a regression? What if the change you made altered some property that provided a security assurance? How would you know?
  50. This is almost always true. Users break everything. They fall way off the happy path.
  51. So to take advantage of our users finding all those issues for us, we can launch software in controlled ways that enable us to detect and respond to problems. Canary launches are pushed just to a few onlines with heightened alerting on them, and help you detect issues early. If no emergent issues are detected, you can do a wider rollout. Launch flags can help you slowly roll out code then enable it for greater numbers of people. They’re also great if you detect an issue, as you can turn off just that feature instead of having to debate rolling back
  52. The goal through all of this is to build more resilient code, and make it harder for developers to accidentally cause security issues. We want to make sure that we improve our processes and pick up the low hanging fruit. For instance, if you find that your engineers frequently cause XSS issues when they fix html entity display bugs, what could we do to break this loop? We could create checklists for code reviews - is the sanitize function called correctly every time? And we can run static analysis and dynamic analysis tools that check for XSS. We can make sure that we test the code against XSS inputs before we launch it to the customer base. All of these are ways to catch an issue and interrupt the vulnerability from reaching the onlines.
  53. Security engineering isn’t just about software flaws.
  54. No matter where your product lives, account lifecycle, configuration management and protecting secrets are going to be concern. Hosting in the cloud removes many older security concerns, like building physical security controls to secure server farms. But, it introduces a host of new ones.
  55. “Just run it in AWS” is a really appealing solution, and for most systems it’s a great choice, security wise. But it brings new issues. For instance Would you know if someone checked your AWS secret access key into a public github repo? Are you sure that all the databases and s3 buckets that you have are protected from being accessed by the public?
  56. There are many more problems with cloud hosting that you should plan for. Some of these are old problems, like backups and patching. Some are new ones - have you looked at the available cloud services and figured out how to use the ones that really fit your use the best, or are you just replicating your old data centers into cloud environments/ If you can move something in a lamda, you’re in a much better space from a security perspective. Although there are still access control and account permissions to configure, a lot of the overhead around patching and securing machines is handled for you
  57. There are a lot of great tools out there that will help you lock down your cloud environments. Azure and AWS offer some great tooling, and there are independent ones like this great short questionnaire that help you get a handle on the level of risk you’re taking on based on your configurations.
  58. This is a pretty typical response pattern for a small SAAS company. They use a bastion, but they don’t require 2FA on all GitHub accounts. They have CloudTrail turned on, but they’re not sure if any one configured it.
  59. This is a sample response for this set of answers to the questionnaire. It weights different question & answer sets differently, and keys off some interactions, as some configurations can become more dangerous in the absence of other controls. So this is a nice tool to play with just to see where you might be able to get some wins by tightening up some controls. [Timing - go run this?]
  60. One of the biggest wins you can make in a cloud environment is handling secrets and keys in a mature way. How hard is it for you to rotate secrets? Do you use AWS Secret Manager or AWS KMS? And how quickly can you offboard an engineer’s access when they leave your company? Could an engineer getting phished put your root AWS credentials at risk?
  61. This is definitely true at many more SAAS companies than you would expect.
  62. Now let’s move to launching our secure code.
  63. Once we’ve launched, we need to be able to detect issues and respond appropriately. Here’s where our logging and alarming are critical. How do we know if there are issues in the system? Who gets alerted and how? If there was a security incident, could you reconstruct what happened?
  64. Logging configuration is an entire topic of its own. If you don’t do incident response tabletops or respond to real issues, you may not realize how little you can reconstruct from the logs in your environment. Even worse, if all your systems log into different time zones, you may need to do a lot of processing to normalize the data and construct time lines to find out what happened. What do the permissions on your logs look like? Could an attacker modify them, hiding what they did? How would you detect this?
  65. Change management is a really critical and often neglected security control. Maturing this area is one of the process improvements to focus on. Could you detect a backdoor that one of your programmers inserted into your codebase? How many people have to sign off on each code change before it reaches production? Can you look back and determine who made the commits that launched on a given day, and what tests and code reviews were done on them?
  66. Security engineers love to claim that asset management is the key to protecting everything. As software developers, we can sometimes think that this doesn’t apply to our area. But your teammates probably create new microservices or new marketing blogs. These are new endpoints- do you track them? And does your organization allow you or other employees to create tools through Salesforce or similar applications that can expose data to the internet?
  67. So wrapping up, now that we’ve launched our software and it’s live, we still have security concerns to handle.
  68. Do you have the ability to easily push updates to your production environments?
  69. Many teams have good oncall processes for handling high priority bugs that emerge, but lower priority issues linger in their backlog and never end up getting addressed. Even worse, some issues can be logged into a backlog at a time when they’re low risk, but then an exploit is released that takes advantage of them, or another bug is found that can be chained with the original issue to create a higher severity problem. Do you have some way to discover these events, and reprioritize?
  70. This has a major impact on your security stance. Many teams give technical debt cleanup work to the least experienced team members, while others outsource it, and others make just a few veteran coders primarily responsible for tackling issues in the oldest sections of the code. None of these strategies will really set you up for success.
  71. It’s not just code that you wrote that needs to be updated. Third party libraries that you depend on can have security issues in them that are patched, and you’ll need to track and manage the rollout of these updates.
  72. Do you have expected timelines for pushing these patches to your production systems? Do you patch in your test environments?