SlideShare a Scribd company logo
SESSION ID:
#RSAC
Gary McGraw, Ph.D.
How to Avoid the Top Ten
Software Security Flaws
ASD-T09
Chief Technology Officer
Cigital
@cigitalgem
#RSAC
@cigitalgem
#RSAC
@cigitalgem
IEEE CSD Mission
 The IEEE CSD will gather software security expertise from
industry, academia, and government. The CSD provides guidance
on:
 Recognizing software system designs that are likely vulnerable to
compromise.
 Designing and building software systems with strong, identifiable
security properties.
#RSAC
@cigitalgem
On Bugs, Flaws, and Defects
 Customized static rules
 Commercial SCA tools:
Fortify, Ounce Labs,
Coverity, Cigital SCA
BUGS FLAWS
 Architectural risk analysis
gets() attacker in the
middle
#RSAC
@cigitalgem
Avoiding the Top Ten Flaws
1) Earn or give, but never assume, trust
2) Use an authentication mechanism that
cannot be bypassed or tampered with
3) Authorize after you authenticate
4) Strictly separate data and control
instructions, and never process control
instructions received from untrusted sources
5) Define an approach that ensures all data are
explicitly validated
6) Use cryptography correctly
7) Identify sensitive data and how they should
be handled
8) Always consider the users
9) Understand how integrating external
components changes your attack surface
10) Be flexible when considering future changes
to objects and actors
#RSAC
@cigitalgem
1. Earn or give, but never assume, trust
 Make sure all data from an
untrusted client are validated
 Assume data are compromised
 Avoid authorization, access
control, policy enforcement, and
use of sensitive data in client code
#RSAC
@cigitalgem2. Use an authentication mechanism that
can’t be bypassed
 Prevent the user from changing
identity without re-authentication,
once authenticated.
 Consider the strength of the
authentication a user has
provided before taking action
 Make use of time outs
 Do not stray past the big three
 Something you are
 Something you have
 Something you know
 Avoid shared resources like IP
numbers and MAC addresses
 Avoid predictable tokens
#RSAC
@cigitalgem
3. Authorize after you authenticate
 Perform authorization as an
explicit check
 Re-use common infrastructure for
conducting authorization checks
 Authorization depends on a given
set of privileges, and on the
context of the request
 Failing to revoke authorization can
result in authenticated users
exercising out-of-date
authorizations
#RSAC
@cigitalgem
4. Strictly separate data and control
instructions, and never process control
instructions from untrusted sources
 Utilize hardware capabilities to
enforce separation of code and
data
 Know and use appropriate
compiler/linker security flags
 Expose methods or endpoints that
consume structured types
 Co-mingling data and control
instructions in a single entity is
bad
 Beware of injection-prone APIs
 XSS, SQL injection, shell injection
 Watch out for (eval)
#RSAC
@cigitalgem5. Define an approach that ensures all data
are explicitly validated
 Ensure that comprehensive data
validation actually takes place
 Make security review of the
validation scheme possible
 Use a centralized validation
mechanism and canonical data
forms (avoid strings)
 Watch out for assumptions about
data
 Avoid blacklisting, use whitelisting
#RSAC
@cigitalgem
6. Use cryptography correctly
 Use standard algorithms and
libraries
 Centralize and re-use
 Design for crypto agility
 Get help from real experts
 Getting crypto right is VERY hard
 Do not roll your own
 Watch out for key management
issues
 Avoid non-random “randomness”
#RSAC
@cigitalgem7. Identify sensitive data and how they
should be handled
 Know where your sensitive data
are
 Classify your data into categories
 Consider data controls
 File, memory, database protection
 Plan for change over time
 Do not forget that data sensitivity
is often context sensitive
 Confidentiality is not data
protection
 Watch out for trust boundaries
#RSAC
@cigitalgem
8. Always consider the users
 Think about: deployment,
configuration, use, update
 Know that security is an emergent
property of the system
 Consider user culture, experience,
biases, …
 Make things secure by default
 Security is not a feature!
 Don’t impose too much security
 Don’t assume the users care
about security
 Don’t let the users make security
decisions
#RSAC
@cigitalgem9. Understand how integrating external
components changes your attack surface
 Test your components for security
 Include external components and
dependencies in review
 Isolate components
 Keep an eye out for public
security information about
components
 Composition is dangerous
 Security risk can be inherited
 Open source is not secure
 Don’t trust until you have applied
and reviewed controls
 Watch out for extra functionality
#RSAC
@cigitalgem10. Be flexible when considering future
changes to objects and actors
 Design for change
 Consider security updates
 Make use of code signing and
code protection
 Allow isolation and toggling
 Have a plan for “secret
compromise” recovery
 Watch out for fragile and/or brittle
security
 Be careful with code signing and
system administration/operation
 Keeping secrets is hard
 Crypto breaks
#RSAC
@cigitalgem
Avoiding the Top Ten Flaws
1) Earn or give, but never assume, trust
2) Use an authentication mechanism that
cannot be bypassed or tampered with
3) Authorize after you authenticate
4) Strictly separate data and control
instructions, and never process control
instructions received from untrusted sources
5) Define an approach that ensures all data are
explicitly validated
6) Use cryptography correctly
7) Identify sensitive data and how they should
be handled
8) Always consider the users
9) Understand how integrating external
components changes your attack surface
10) Be flexible when considering future changes
to objects and actors
#RSAC
@cigitalgem
Center for Secure Design Contributors
#RSAC
@cigitalgem
SearchSecurity + Silver Bullet
www.searchsecurity.com
No-nonsense monthly security
column by Gary McGraw
www.cigital.com/~gem/writing
www.cigital.com/silverbullet
#RSAC
@cigitalgem
Apply Slide
 Download the IEEE CSD document: http://bit.ly/ieee-
CSD
 Adapt the flaw avoidance advice to your organization
 Copy Twitter
 Copy Google
 Create design patterns that eradicate classes of bugs
 Join the Center for Secure Design!

More Related Content

PDF
Implementing An Automated Incident Response Architecture
PDF
Westjets Security Architecture Made Simple We Finally Got It Right
PDF
Achieving Defendable Architectures Via Threat Driven Methodologies
PDF
Making Threat Intelligence Actionable Final
PDF
Orchestrating Software Defined Networks To Disrupt The Apt Kill Chain
PDF
Threat Intelligence Is Like Three Day Potty Training
PDF
Wireless Infusion Pumps: Securing Hospitals’ Most Ubiquitous Medical Device
PDF
The Rise of the Purple Team
Implementing An Automated Incident Response Architecture
Westjets Security Architecture Made Simple We Finally Got It Right
Achieving Defendable Architectures Via Threat Driven Methodologies
Making Threat Intelligence Actionable Final
Orchestrating Software Defined Networks To Disrupt The Apt Kill Chain
Threat Intelligence Is Like Three Day Potty Training
Wireless Infusion Pumps: Securing Hospitals’ Most Ubiquitous Medical Device
The Rise of the Purple Team

What's hot (20)

PDF
Realities of Data Security
PDF
Rapid Threat Modeling Techniques
PDF
Applying Auto-Data Classification Techniques for Large Data Sets
PDF
Breaking and entering how and why dhs conducts penetration tests
PDF
Cloud Breach – Preparation and Response
PDF
Security precognition chaos engineering in incident response
PDF
The Seven Most Dangerous New Attack Techniques, and What's Coming Next
PDF
Attacks on Critical Infrastructure: Insights from the “Big Board”
PDF
Wfh security risks - Ed Adams, President, Security Innovation
PDF
Building a Next-Generation Security Operations Center (SOC)
PDF
Evidence-Based Security: The New Top Five Controls
PDF
From SIEM to SOC: Crossing the Cybersecurity Chasm
PDF
Pulling our-socs-up
PDF
Threat intel- -content-curation-organizing-the-path-to-successful-detection
PDF
Advanced red teaming all your badges are belong to us
PDF
A New Security Paradigm for IoT (Internet of Threats)
PDF
DTS Solution - Building a SOC (Security Operations Center)
PPTX
Security operation center (SOC)
PDF
What Is Next-Generation Endpoint Security and Why Do You Need It?
PDF
Insights from-NSAs-cybersecurity-threat-operations-center
Realities of Data Security
Rapid Threat Modeling Techniques
Applying Auto-Data Classification Techniques for Large Data Sets
Breaking and entering how and why dhs conducts penetration tests
Cloud Breach – Preparation and Response
Security precognition chaos engineering in incident response
The Seven Most Dangerous New Attack Techniques, and What's Coming Next
Attacks on Critical Infrastructure: Insights from the “Big Board”
Wfh security risks - Ed Adams, President, Security Innovation
Building a Next-Generation Security Operations Center (SOC)
Evidence-Based Security: The New Top Five Controls
From SIEM to SOC: Crossing the Cybersecurity Chasm
Pulling our-socs-up
Threat intel- -content-curation-organizing-the-path-to-successful-detection
Advanced red teaming all your badges are belong to us
A New Security Paradigm for IoT (Internet of Threats)
DTS Solution - Building a SOC (Security Operations Center)
Security operation center (SOC)
What Is Next-Generation Endpoint Security and Why Do You Need It?
Insights from-NSAs-cybersecurity-threat-operations-center
Ad

Viewers also liked (20)

PPTX
Php security
PPTX
Introduction to Web security
PDF
Nullcon Jailbreak CTF 2012,Walkthrough by Team Loosers
PPTX
Hackers versus Developers and Secure Web Programming
PDF
Top 10 Web App Security Risks
PPT
Web Application Security
PDF
PHP and Application Security - OWASP Road Show 2013
PDF
Php web app security (eng)
ODP
Security In PHP Applications
PDF
Php web backdoor obfuscation
PDF
Essentials of Web Application Security: what it is, why it matters and how to...
PDF
Code obfuscation, php shells & more
PDF
PHP Secure Programming
PDF
Application Security on a Dime: A Practical Guide to Using Functional Open So...
PPTX
Web application security
PDF
PHP Backdoor: The rise of the vuln
PPTX
Exploiting parameter tempering attack in web application
PDF
A Simple Laboratory Environment for Real World Offensive Security Education
PDF
PDF
Attack All the Layers: What's Working during Pentests (OWASP NYC)
Php security
Introduction to Web security
Nullcon Jailbreak CTF 2012,Walkthrough by Team Loosers
Hackers versus Developers and Secure Web Programming
Top 10 Web App Security Risks
Web Application Security
PHP and Application Security - OWASP Road Show 2013
Php web app security (eng)
Security In PHP Applications
Php web backdoor obfuscation
Essentials of Web Application Security: what it is, why it matters and how to...
Code obfuscation, php shells & more
PHP Secure Programming
Application Security on a Dime: A Practical Guide to Using Functional Open So...
Web application security
PHP Backdoor: The rise of the vuln
Exploiting parameter tempering attack in web application
A Simple Laboratory Environment for Real World Offensive Security Education
Attack All the Layers: What's Working during Pentests (OWASP NYC)
Ad

Similar to How To Avoid The Top Ten Software Security Flaws (20)

PPT
How to Avoid the Top Ten Software Security Flaws
PDF
Collaborative security : Securing open source software
PPTX
API Security: Assume Possible Interference
PDF
Introducing a Security Program to Large Scale Legacy Products
PDF
RSA 2016 Realities of Data Security
PDF
GitHub: Secure Software Development for Financial Services
PPTX
Cybersecurity model and top cloud security controls for product development e...
PDF
Securing 100 products - How hard can it be?
PDF
Security Checkpoints in Agile SDLC
PDF
Embedded Systems Security: Building a More Secure Device
PDF
Embedded Systems Security: Building a More Secure Device
PDF
Practical appsec lessons learned in the age of agile and DevOps
PDF
RSA 2015 Realities of Private Cloud Security
PDF
Streamlining AppSec Policy Definition.pptx
PDF
Dos and Don'ts of DevSecOps
PPTX
Information security software security presentation.pptx
PDF
RSA ASIA 2014 - Internet of Things
PPT
csce201 - software - sec Basic Security.ppt
PDF
Red team-view-gaps-in-the-serverless-application-attack-surface
PPTX
Ryan Elkins - Simple Security Defense to Thwart an Army of Cyber Ninja Warriors
How to Avoid the Top Ten Software Security Flaws
Collaborative security : Securing open source software
API Security: Assume Possible Interference
Introducing a Security Program to Large Scale Legacy Products
RSA 2016 Realities of Data Security
GitHub: Secure Software Development for Financial Services
Cybersecurity model and top cloud security controls for product development e...
Securing 100 products - How hard can it be?
Security Checkpoints in Agile SDLC
Embedded Systems Security: Building a More Secure Device
Embedded Systems Security: Building a More Secure Device
Practical appsec lessons learned in the age of agile and DevOps
RSA 2015 Realities of Private Cloud Security
Streamlining AppSec Policy Definition.pptx
Dos and Don'ts of DevSecOps
Information security software security presentation.pptx
RSA ASIA 2014 - Internet of Things
csce201 - software - sec Basic Security.ppt
Red team-view-gaps-in-the-serverless-application-attack-surface
Ryan Elkins - Simple Security Defense to Thwart an Army of Cyber Ninja Warriors

More from Priyanka Aash (20)

PPTX
AI Code Generation Risks (Ramkumar Dilli, CIO, Myridius)
PDF
From Chatbot to Destroyer of Endpoints - Can ChatGPT Automate EDR Bypasses (1...
PDF
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
PDF
Oh, the Possibilities - Balancing Innovation and Risk with Generative AI.pdf
PDF
Lessons Learned from Developing Secure AI Workflows.pdf
PDF
Cyber Defense Matrix Workshop - RSA Conference
PDF
A Constitutional Quagmire - Ethical Minefields of AI, Cyber, and Privacy.pdf
PDF
Securing AI - There Is No Try, Only Do!.pdf
PDF
GenAI Opportunities and Challenges - Where 370 Enterprises Are Focusing Now.pdf
PDF
Coordinated Disclosure for ML - What's Different and What's the Same.pdf
PDF
10 Key Challenges for AI within the EU Data Protection Framework.pdf
PDF
Techniques for Automatic Device Identification and Network Assignment.pdf
PDF
Keynote : Presentation on SASE Technology
PDF
Keynote : AI & Future Of Offensive Security
PDF
Redefining Cybersecurity with AI Capabilities
PDF
Demystifying Neural Networks And Building Cybersecurity Applications
PDF
Finetuning GenAI For Hacking and Defending
PDF
(CISOPlatform Summit & SACON 2024) Kids Cyber Security .pdf
PDF
(CISOPlatform Summit & SACON 2024) Regulation & Response In Banks.pdf
PDF
(CISOPlatform Summit & SACON 2024) Cyber Insurance & Risk Quantification.pdf
AI Code Generation Risks (Ramkumar Dilli, CIO, Myridius)
From Chatbot to Destroyer of Endpoints - Can ChatGPT Automate EDR Bypasses (1...
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
Oh, the Possibilities - Balancing Innovation and Risk with Generative AI.pdf
Lessons Learned from Developing Secure AI Workflows.pdf
Cyber Defense Matrix Workshop - RSA Conference
A Constitutional Quagmire - Ethical Minefields of AI, Cyber, and Privacy.pdf
Securing AI - There Is No Try, Only Do!.pdf
GenAI Opportunities and Challenges - Where 370 Enterprises Are Focusing Now.pdf
Coordinated Disclosure for ML - What's Different and What's the Same.pdf
10 Key Challenges for AI within the EU Data Protection Framework.pdf
Techniques for Automatic Device Identification and Network Assignment.pdf
Keynote : Presentation on SASE Technology
Keynote : AI & Future Of Offensive Security
Redefining Cybersecurity with AI Capabilities
Demystifying Neural Networks And Building Cybersecurity Applications
Finetuning GenAI For Hacking and Defending
(CISOPlatform Summit & SACON 2024) Kids Cyber Security .pdf
(CISOPlatform Summit & SACON 2024) Regulation & Response In Banks.pdf
(CISOPlatform Summit & SACON 2024) Cyber Insurance & Risk Quantification.pdf

Recently uploaded (20)

PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Machine learning based COVID-19 study performance prediction
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Approach and Philosophy of On baking technology
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Modernizing your data center with Dell and AMD
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PPTX
Cloud computing and distributed systems.
PDF
Spectral efficient network and resource selection model in 5G networks
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
Diabetes mellitus diagnosis method based random forest with bat algorithm
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Machine learning based COVID-19 study performance prediction
The Rise and Fall of 3GPP – Time for a Sabbatical?
The AUB Centre for AI in Media Proposal.docx
Approach and Philosophy of On baking technology
20250228 LYD VKU AI Blended-Learning.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
Modernizing your data center with Dell and AMD
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Reach Out and Touch Someone: Haptics and Empathic Computing
NewMind AI Weekly Chronicles - August'25 Week I
Cloud computing and distributed systems.
Spectral efficient network and resource selection model in 5G networks
“AI and Expert System Decision Support & Business Intelligence Systems”
Unlocking AI with Model Context Protocol (MCP)
Mobile App Security Testing_ A Comprehensive Guide.pdf
Per capita expenditure prediction using model stacking based on satellite ima...

How To Avoid The Top Ten Software Security Flaws

  • 1. SESSION ID: #RSAC Gary McGraw, Ph.D. How to Avoid the Top Ten Software Security Flaws ASD-T09 Chief Technology Officer Cigital @cigitalgem
  • 3. #RSAC @cigitalgem IEEE CSD Mission  The IEEE CSD will gather software security expertise from industry, academia, and government. The CSD provides guidance on:  Recognizing software system designs that are likely vulnerable to compromise.  Designing and building software systems with strong, identifiable security properties.
  • 4. #RSAC @cigitalgem On Bugs, Flaws, and Defects  Customized static rules  Commercial SCA tools: Fortify, Ounce Labs, Coverity, Cigital SCA BUGS FLAWS  Architectural risk analysis gets() attacker in the middle
  • 5. #RSAC @cigitalgem Avoiding the Top Ten Flaws 1) Earn or give, but never assume, trust 2) Use an authentication mechanism that cannot be bypassed or tampered with 3) Authorize after you authenticate 4) Strictly separate data and control instructions, and never process control instructions received from untrusted sources 5) Define an approach that ensures all data are explicitly validated 6) Use cryptography correctly 7) Identify sensitive data and how they should be handled 8) Always consider the users 9) Understand how integrating external components changes your attack surface 10) Be flexible when considering future changes to objects and actors
  • 6. #RSAC @cigitalgem 1. Earn or give, but never assume, trust  Make sure all data from an untrusted client are validated  Assume data are compromised  Avoid authorization, access control, policy enforcement, and use of sensitive data in client code
  • 7. #RSAC @cigitalgem2. Use an authentication mechanism that can’t be bypassed  Prevent the user from changing identity without re-authentication, once authenticated.  Consider the strength of the authentication a user has provided before taking action  Make use of time outs  Do not stray past the big three  Something you are  Something you have  Something you know  Avoid shared resources like IP numbers and MAC addresses  Avoid predictable tokens
  • 8. #RSAC @cigitalgem 3. Authorize after you authenticate  Perform authorization as an explicit check  Re-use common infrastructure for conducting authorization checks  Authorization depends on a given set of privileges, and on the context of the request  Failing to revoke authorization can result in authenticated users exercising out-of-date authorizations
  • 9. #RSAC @cigitalgem 4. Strictly separate data and control instructions, and never process control instructions from untrusted sources  Utilize hardware capabilities to enforce separation of code and data  Know and use appropriate compiler/linker security flags  Expose methods or endpoints that consume structured types  Co-mingling data and control instructions in a single entity is bad  Beware of injection-prone APIs  XSS, SQL injection, shell injection  Watch out for (eval)
  • 10. #RSAC @cigitalgem5. Define an approach that ensures all data are explicitly validated  Ensure that comprehensive data validation actually takes place  Make security review of the validation scheme possible  Use a centralized validation mechanism and canonical data forms (avoid strings)  Watch out for assumptions about data  Avoid blacklisting, use whitelisting
  • 11. #RSAC @cigitalgem 6. Use cryptography correctly  Use standard algorithms and libraries  Centralize and re-use  Design for crypto agility  Get help from real experts  Getting crypto right is VERY hard  Do not roll your own  Watch out for key management issues  Avoid non-random “randomness”
  • 12. #RSAC @cigitalgem7. Identify sensitive data and how they should be handled  Know where your sensitive data are  Classify your data into categories  Consider data controls  File, memory, database protection  Plan for change over time  Do not forget that data sensitivity is often context sensitive  Confidentiality is not data protection  Watch out for trust boundaries
  • 13. #RSAC @cigitalgem 8. Always consider the users  Think about: deployment, configuration, use, update  Know that security is an emergent property of the system  Consider user culture, experience, biases, …  Make things secure by default  Security is not a feature!  Don’t impose too much security  Don’t assume the users care about security  Don’t let the users make security decisions
  • 14. #RSAC @cigitalgem9. Understand how integrating external components changes your attack surface  Test your components for security  Include external components and dependencies in review  Isolate components  Keep an eye out for public security information about components  Composition is dangerous  Security risk can be inherited  Open source is not secure  Don’t trust until you have applied and reviewed controls  Watch out for extra functionality
  • 15. #RSAC @cigitalgem10. Be flexible when considering future changes to objects and actors  Design for change  Consider security updates  Make use of code signing and code protection  Allow isolation and toggling  Have a plan for “secret compromise” recovery  Watch out for fragile and/or brittle security  Be careful with code signing and system administration/operation  Keeping secrets is hard  Crypto breaks
  • 16. #RSAC @cigitalgem Avoiding the Top Ten Flaws 1) Earn or give, but never assume, trust 2) Use an authentication mechanism that cannot be bypassed or tampered with 3) Authorize after you authenticate 4) Strictly separate data and control instructions, and never process control instructions received from untrusted sources 5) Define an approach that ensures all data are explicitly validated 6) Use cryptography correctly 7) Identify sensitive data and how they should be handled 8) Always consider the users 9) Understand how integrating external components changes your attack surface 10) Be flexible when considering future changes to objects and actors
  • 17. #RSAC @cigitalgem Center for Secure Design Contributors
  • 18. #RSAC @cigitalgem SearchSecurity + Silver Bullet www.searchsecurity.com No-nonsense monthly security column by Gary McGraw www.cigital.com/~gem/writing www.cigital.com/silverbullet
  • 19. #RSAC @cigitalgem Apply Slide  Download the IEEE CSD document: http://bit.ly/ieee- CSD  Adapt the flaw avoidance advice to your organization  Copy Twitter  Copy Google  Create design patterns that eradicate classes of bugs  Join the Center for Secure Design!