SlideShare une entreprise Scribd logo
1  sur  21
Télécharger pour lire hors ligne
The Rot Within
Why Application Security Starts With Tested, Reliable and Transparent Code
The Rot Within
My point today is that, if we wish to count lines of code,
we should not regard them as ‘lines produced’ but as
‘lines spent’: the current conventional wisdom is so
foolish as to book that count on the wrong side of the
ledger.
EdsgerW. Dijkstra
Companies spend millions of dollars on firewalls,
encryption and secure access devices, and it’s money
wasted, because none of these measures address the
weakest link in the security chain.
Kevin Mitnick
Topics
  Introduction
  Definitions
  General Concepts – Areas of Concern
  Presentation Core Theme
  Security Development Lifecycle
  Standards
  Some Considerations in Detail
  Conclusions
Definitions
  Security – confidentiality, integrity, availability, authenticity, non-
repudiation (first 3 are CIA triad)
  SecDLC – Security Development Lifecycle
  SDLC - Software Development Lifecycle
  Attack Surface –
  Subset of software system resources that an attacker can use to attack
the system
  Code that can be run by unauthenticated users
  Vulnerability – weakness that can be used to cause harm to asset
  Threat – anything that can cause harm
  Risk – likelihood that a threat will use a vulnerability to cause harm
  Control – how a risk is mitigated (my emphasis here is on logical/
technical controls)
Things could be worse…
Some Areas of Concern
Category/Class Category/Class
Authentication E-Commerce Payments
Authorization Web Services
DataValidation Phishing
Configuration Management Denial of Service Attacks
Session Management Error Handling
Sensitive Information Data Integrity
Logging & Auditing
Interpreter Injection
File System
Database Access
Cryptography
Administrative Interfaces
Core Theme
  Software development is not simple; secure software
development is more difficult still.
  Application security can’t be bolted on after the fact by
“security” developers.
  All programmers must understand security.
  Organization must be mature enough to field a working
SDLC before it can consider a SecDLC.
  Secure applications are “self-defending”.
  Security in a software application must be pervasive and
in depth.
  Many of the highest priority risks are due to bad code,
not malicious attackers or acts of God.
Other Observations
  Secure code starts with good code.
  If code is riddled with defects, is poorly-documented and
poorly tested, and the implementation only loosely
corresponds to requirements & design, it is not possible
to secure it.
  If the organization is not mature enough to support a
credible software development lifecycle, it cannot support
a security development lifecycle either.
  No such thing as “sort of secure” or “partially secure”.
Requirements
  Requirements: not only what an application must do, but
what it must not.
  Define security objectives and requirements
  An objective is fairly high-level
  Requirements describe the objective in detail
  Categories: identity, financial, reputation, privacy & regulatory,
availability (SLAs)
  Keep security requirements separate from functional
requirements
  Complement use cases with misuse cases.
  Use knowledge of risks and mitigation strategies to start work
on security test plan
Design 1
  Understand security policies and regulations
  Establish components/layers/packages & boundaries
  Includes shared and external components
  Includes other applications on same server or accessing same
databases
  Understand data flows and interconnections
  Understand the security of single components
  Identify attack surface
  Perform threat analysis (risk modeling)
  Principle of least privilege
Design 2
  Choose a development methodology
  Any will do provided that you’ve got one
  Understand the security features and published guidelines
for the OS, managed platform, language, libraries/
frameworks etc
  Establish/select coding standards & principles
  Clearly identify design work that addresses security
requirements
  Review source code control & configuration management
  Complete the security test plan
Implementation
  Secure implementation demands a higher quality of design than
what is commonly seen today.
  Establish a philosophy of security:
  Enforce least privilege as default.
  All coding guidelines suggest this.
  Assume that if design does not explicitly require use of another
component, then that use is not permitted.
  This includes libraries and frameworks.
  Don’t guess at design intent: if required design information is absent
make a formal request to have that corrected.
  Frequent code reviews, tests, and static analysis.
  Don’t change the understood system/component
interconnections inadvertently.
SDLC Testing
  Normal software testing – despite the popular misconception
that it’s all about finding defects – is a QC measure used to
verify that a product fulfils the requirements.
  Functional security testing is the security analog of this conventional
process.
  Most security testing is the opposite – here we look for
functionality that’s not supposed to be present.
  Negative requirements: what shouldn’t happen
  Risk-based testing focuses on testing against negative requirements
  Rank the risks before planning testing
  Understand the assumptions of the developers
  Testing of all types starts when there is code to test.
Developer Standards
  All regulations, laws, organizational policies, e.g.
  COBIT, ISO 27002, ISO 17799, PCI (DSS), HIPAA, SOX
  Possibly TCSEC, ITSEC, CTCPEC -> Common Criteria
  Coding Guidelines
  By language, API, framework etc.
  Secure Design Guidelines, e.g.
  OWASP Security Design Guidelines
  Threat Risk Modelling System documentation
  Secure Coding Guidelines, e.g.
  Secure Coding Guidelines for the Java Programming Language
  OWASP Secure Coding Practices
  Secure Testing Guidelines, e.g.
  OWASP Testing Guide
Security Code Review
  Single most effective technique for identifying security problems.
  Use together with automated tools and manual penetration testing.
  Security code review is a way of ensuring that the application is “self-
defending”:
  Verify that security controls are present;
  Verify that the controls work as intended;
  Verify that the controls are used where needed.
  Reviewer(s) need to be familiar with:
  Code – language(s) and technologies used
  Context – need threat model
  Audience – intended users of application, other actors
  Importance – required availability of application
  Define a checklist
  Varying levels of review formality – pick the one that suits the moment
  Build review phases into the Software Development Lifecycle
  Understand the attack surface
Enforcing Authorizations 1
  Assumption: web pages are secured (e.g. web.xml, Web.Config). Now we
want to secure actions/methods, using either declarative or programmatic
methods.
  Example 1:ASP.NET MVC authorization filter –
[Authorize(Roles=“Admin”)]
Public ActionResult DoAdminAction() { …various code… }
  Example 2: Java EE – JSF Web Tier Programmatic
FacesContext.getCurrentInstance().getExternalContext
().isUserInRole(“role”)
  Example 3: Java EE – JSF Web Tier Rendering
Seam s:hasRole EL, ICEFaces renderedOnUserRole, or custom
user code
  Example 4: J2EE/Java EE – EJBs
  J2EE 1.4 and prior has declarative authorizations
  Java EE 5/6 have @DenyAll, @PermitAll, @RolesAllowed, @DeclareRoles,
@RunAs annotations for classes/methods.
Enforcing Authorizations 2
  The Authorization Disconnect: only the correct roles can
execute specific code…but there are limited or no
controls on what that code is or does.
  Consider platform/language security managers if available
  Follow the detailed design; don’t stray.
  Code reviews during detailed design and implementation
are essential.
  Static analysis can be used to help identify both calling,
and called, code.
  Defense in depth
Database Access
  Many J2EE/JavaEE and .NET applications use a common
database login
  This can work if the application and schema are rigorously
architected to implement proper security (roles wrt data
access) and auditing;
  Enforcing access permissions can be simplified in code if a
database access layer (DAL) is designed.
  Other alternatives include:
  Each application user has own database login;
  Proxy authentication to provide user context;
  Row-level access (e.g. pgacl, OracleVirtual Private Databases).
Logging
  Who did what when
  What:
  Authentication attempts;
  Authorization requests;
  CRUD operations on data – SQL or similar is often sufficient;
consider with DB auditing;
  Other events of security import.
  Should be possible to form audit trail of user actions.
  Protect logs as you would other data.
  Do not log confidential data.
  Logs must be useful: analysis and reporting tools.
  Test logs through incident response team exercises.
Errors & Exceptions
  Fail securely –
  Application should not fail into an insecure state
  Assess when user sessions should be invalidated
  Error handling should not provide attacker with
information.This includes “human” information that could
be used in a social exploit
  Use generic error pages
  Leverage the framework error-handling
  Keep debugging information in secure logs
  Centralize error handling to help prevent information
leakage
Conclusions
  Build security in from the start
  Appraise the risks realistically
  The greatest security risk you have could be your
software developers
  Corrupted or missing data doesn’t care who did it or
how it happened
  Secure code is reliable code
  Every software developer must be a security developer

Contenu connexe

Tendances

Application Threat Modeling
Application Threat ModelingApplication Threat Modeling
Application Threat Modeling
Marco Morana
 
Security Training: #3 Threat Modelling - Practices and Tools
Security Training: #3 Threat Modelling - Practices and ToolsSecurity Training: #3 Threat Modelling - Practices and Tools
Security Training: #3 Threat Modelling - Practices and Tools
Yulian Slobodyan
 

Tendances (20)

Application Threat Modeling
Application Threat ModelingApplication Threat Modeling
Application Threat Modeling
 
Security Training: #3 Threat Modelling - Practices and Tools
Security Training: #3 Threat Modelling - Practices and ToolsSecurity Training: #3 Threat Modelling - Practices and Tools
Security Training: #3 Threat Modelling - Practices and Tools
 
Null bachav
Null bachavNull bachav
Null bachav
 
Security Best Practices
Security Best PracticesSecurity Best Practices
Security Best Practices
 
STRIDE And DREAD
STRIDE And DREADSTRIDE And DREAD
STRIDE And DREAD
 
Introduction to Application Security Testing
Introduction to Application Security TestingIntroduction to Application Security Testing
Introduction to Application Security Testing
 
Application Threat Modeling
Application Threat ModelingApplication Threat Modeling
Application Threat Modeling
 
ОЛЬГА АКСЬОНЕНКО «Безпечна розробка програмного забезпечення в Agile проектах...
ОЛЬГА АКСЬОНЕНКО «Безпечна розробка програмного забезпечення в Agile проектах...ОЛЬГА АКСЬОНЕНКО «Безпечна розробка програмного забезпечення в Agile проектах...
ОЛЬГА АКСЬОНЕНКО «Безпечна розробка програмного забезпечення в Agile проектах...
 
Threat Modeling to Reduce Software Security Risk
Threat Modeling to Reduce Software Security RiskThreat Modeling to Reduce Software Security Risk
Threat Modeling to Reduce Software Security Risk
 
Software Security Initiatives
Software Security InitiativesSoftware Security Initiatives
Software Security Initiatives
 
Threat Modeling And Analysis
Threat Modeling And AnalysisThreat Modeling And Analysis
Threat Modeling And Analysis
 
Secure Design: Threat Modeling
Secure Design: Threat ModelingSecure Design: Threat Modeling
Secure Design: Threat Modeling
 
Security Culture from Concept to Maintenance: Secure Software Development Lif...
Security Culture from Concept to Maintenance: Secure Software Development Lif...Security Culture from Concept to Maintenance: Secure Software Development Lif...
Security Culture from Concept to Maintenance: Secure Software Development Lif...
 
Mobile application security and threat modeling
Mobile application security and threat modelingMobile application security and threat modeling
Mobile application security and threat modeling
 
Presentation on vulnerability analysis
Presentation on vulnerability analysisPresentation on vulnerability analysis
Presentation on vulnerability analysis
 
Software security engineering
Software security engineeringSoftware security engineering
Software security engineering
 
Vulnerability Assesment
Vulnerability AssesmentVulnerability Assesment
Vulnerability Assesment
 
Developing a Threat Modeling Mindset
Developing a Threat Modeling MindsetDeveloping a Threat Modeling Mindset
Developing a Threat Modeling Mindset
 
5 things i wish i knew about sast (DSO-LG July 2021)
5 things i wish i knew about sast (DSO-LG July 2021)5 things i wish i knew about sast (DSO-LG July 2021)
5 things i wish i knew about sast (DSO-LG July 2021)
 
Threat Modeling: Best Practices
Threat Modeling: Best PracticesThreat Modeling: Best Practices
Threat Modeling: Best Practices
 

En vedette

話我家鄉
話我家鄉話我家鄉
話我家鄉
awcc
 
DS - Portnox_Unique Advantages
DS - Portnox_Unique AdvantagesDS - Portnox_Unique Advantages
DS - Portnox_Unique Advantages
Jason Newell
 
家鄉的名勝古蹟與特產
家鄉的名勝古蹟與特產家鄉的名勝古蹟與特產
家鄉的名勝古蹟與特產
awcc
 
2007lv Nac Big Pic[1]
2007lv Nac Big Pic[1]2007lv Nac Big Pic[1]
2007lv Nac Big Pic[1]
gerardgoubert
 
Ley de gas ideal, constante universal de gases y gases reales
Ley de gas ideal, constante universal de gases y gases realesLey de gas ideal, constante universal de gases y gases reales
Ley de gas ideal, constante universal de gases y gases reales
UACJ
 
Mohamed_El-Tokhy_Resume_last
Mohamed_El-Tokhy_Resume_lastMohamed_El-Tokhy_Resume_last
Mohamed_El-Tokhy_Resume_last
Mohamed El-Tokhy
 

En vedette (20)

Campus party jennifer
Campus party jenniferCampus party jennifer
Campus party jennifer
 
話我家鄉
話我家鄉話我家鄉
話我家鄉
 
DS - Portnox_Unique Advantages
DS - Portnox_Unique AdvantagesDS - Portnox_Unique Advantages
DS - Portnox_Unique Advantages
 
coretec
coreteccoretec
coretec
 
家鄉的名勝古蹟與特產
家鄉的名勝古蹟與特產家鄉的名勝古蹟與特產
家鄉的名勝古蹟與特產
 
2007lv Nac Big Pic[1]
2007lv Nac Big Pic[1]2007lv Nac Big Pic[1]
2007lv Nac Big Pic[1]
 
Campus party (1)
Campus party (1)Campus party (1)
Campus party (1)
 
WorkSafe ACT Site Inspection
WorkSafe ACT Site InspectionWorkSafe ACT Site Inspection
WorkSafe ACT Site Inspection
 
Aldair1
Aldair1Aldair1
Aldair1
 
Loppupuheenvuoro - seminaari 26.10.2016
Loppupuheenvuoro - seminaari 26.10.2016Loppupuheenvuoro - seminaari 26.10.2016
Loppupuheenvuoro - seminaari 26.10.2016
 
Ley de gas ideal, constante universal de gases y gases reales
Ley de gas ideal, constante universal de gases y gases realesLey de gas ideal, constante universal de gases y gases reales
Ley de gas ideal, constante universal de gases y gases reales
 
Carlos Conde : AWS Game Days - TIAD Paris
Carlos Conde : AWS Game Days - TIAD ParisCarlos Conde : AWS Game Days - TIAD Paris
Carlos Conde : AWS Game Days - TIAD Paris
 
TIAD 2016 : ITiocracy
TIAD 2016 : ITiocracyTIAD 2016 : ITiocracy
TIAD 2016 : ITiocracy
 
Corporate profile quadrant knowledge solutions
Corporate profile quadrant knowledge solutionsCorporate profile quadrant knowledge solutions
Corporate profile quadrant knowledge solutions
 
Tiad : Continuous Learning
Tiad : Continuous LearningTiad : Continuous Learning
Tiad : Continuous Learning
 
TIAD : Automation day by Jerôme Labat
TIAD : Automation day by Jerôme LabatTIAD : Automation day by Jerôme Labat
TIAD : Automation day by Jerôme Labat
 
TIAD : DevOps & continuous delivery dans le cloud
TIAD : DevOps & continuous delivery dans le cloudTIAD : DevOps & continuous delivery dans le cloud
TIAD : DevOps & continuous delivery dans le cloud
 
10 Mandamentos - Aula 11 - 10º mandamento
10 Mandamentos - Aula 11 - 10º mandamento10 Mandamentos - Aula 11 - 10º mandamento
10 Mandamentos - Aula 11 - 10º mandamento
 
Case Fiksu Kalasatama
Case Fiksu KalasatamaCase Fiksu Kalasatama
Case Fiksu Kalasatama
 
Mohamed_El-Tokhy_Resume_last
Mohamed_El-Tokhy_Resume_lastMohamed_El-Tokhy_Resume_last
Mohamed_El-Tokhy_Resume_last
 

Similaire à Arved sandstrom - the rotwithin - atlseccon2011

10 Tips to Keep Your Software a Step Ahead of the Hackers
10 Tips to Keep Your Software a Step Ahead of the Hackers10 Tips to Keep Your Software a Step Ahead of the Hackers
10 Tips to Keep Your Software a Step Ahead of the Hackers
Checkmarx
 
Application Security Testing for Software Engineers: An approach to build sof...
Application Security Testing for Software Engineers: An approach to build sof...Application Security Testing for Software Engineers: An approach to build sof...
Application Security Testing for Software Engineers: An approach to build sof...
Michael Hidalgo
 
4_25655_SE731_2020_1__2_1_Lecture 1 - Course Outline and Secure SDLC.ppt
4_25655_SE731_2020_1__2_1_Lecture 1 - Course Outline and Secure SDLC.ppt4_25655_SE731_2020_1__2_1_Lecture 1 - Course Outline and Secure SDLC.ppt
4_25655_SE731_2020_1__2_1_Lecture 1 - Course Outline and Secure SDLC.ppt
gealehegn
 
Criterion 1A - 4 - MasteryPros and Cons Thoroughly compares the
Criterion 1A - 4 - MasteryPros and Cons Thoroughly compares theCriterion 1A - 4 - MasteryPros and Cons Thoroughly compares the
Criterion 1A - 4 - MasteryPros and Cons Thoroughly compares the
CruzIbarra161
 
Lecture Course Outline and Secure SDLC.ppt
Lecture Course Outline and Secure SDLC.pptLecture Course Outline and Secure SDLC.ppt
Lecture Course Outline and Secure SDLC.ppt
DrBasemMohamedElomda
 
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
 
Security engineering 101 when good design & security work together
Security engineering 101  when good design & security work togetherSecurity engineering 101  when good design & security work together
Security engineering 101 when good design & security work together
Wendy Knox Everette
 
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
wkyra78
 
Software Security Testing
Software Security TestingSoftware Security Testing
Software Security Testing
ankitmehta21
 
Defensive coding practices is one of the most critical proactive s
Defensive coding practices is one of the most critical proactive sDefensive coding practices is one of the most critical proactive s
Defensive coding practices is one of the most critical proactive s
LinaCovington707
 

Similaire à Arved sandstrom - the rotwithin - atlseccon2011 (20)

10 Tips to Keep Your Software a Step Ahead of the Hackers
10 Tips to Keep Your Software a Step Ahead of the Hackers10 Tips to Keep Your Software a Step Ahead of the Hackers
10 Tips to Keep Your Software a Step Ahead of the Hackers
 
Software security testing
Software security testingSoftware security testing
Software security testing
 
Application Security Testing for Software Engineers: An approach to build sof...
Application Security Testing for Software Engineers: An approach to build sof...Application Security Testing for Software Engineers: An approach to build sof...
Application Security Testing for Software Engineers: An approach to build sof...
 
4_25655_SE731_2020_1__2_1_Lecture 1 - Course Outline and Secure SDLC.ppt
4_25655_SE731_2020_1__2_1_Lecture 1 - Course Outline and Secure SDLC.ppt4_25655_SE731_2020_1__2_1_Lecture 1 - Course Outline and Secure SDLC.ppt
4_25655_SE731_2020_1__2_1_Lecture 1 - Course Outline and Secure SDLC.ppt
 
An Introduction to Secure Application Development
An Introduction to Secure Application DevelopmentAn Introduction to Secure Application Development
An Introduction to Secure Application Development
 
Criterion 1A - 4 - MasteryPros and Cons Thoroughly compares the
Criterion 1A - 4 - MasteryPros and Cons Thoroughly compares theCriterion 1A - 4 - MasteryPros and Cons Thoroughly compares the
Criterion 1A - 4 - MasteryPros and Cons Thoroughly compares the
 
Lecture Course Outline and Secure SDLC.ppt
Lecture Course Outline and Secure SDLC.pptLecture Course Outline and Secure SDLC.ppt
Lecture Course Outline and Secure SDLC.ppt
 
Threat modelling(system + enterprise)
Threat modelling(system + enterprise)Threat modelling(system + enterprise)
Threat modelling(system + enterprise)
 
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
 
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...
 
Security engineering 101 when good design & security work together
Security engineering 101  when good design & security work togetherSecurity engineering 101  when good design & security work together
Security engineering 101 when good design & security work together
 
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
 
Security Testing Approach for Web Application Testing.pdf
Security Testing Approach for Web Application Testing.pdfSecurity Testing Approach for Web Application Testing.pdf
Security Testing Approach for Web Application Testing.pdf
 
Software Security Testing
Software Security TestingSoftware Security Testing
Software Security Testing
 
Thick Client Penetration Testing Modern Approaches and Techniques.pdf
Thick Client Penetration Testing Modern Approaches and Techniques.pdfThick Client Penetration Testing Modern Approaches and Techniques.pdf
Thick Client Penetration Testing Modern Approaches and Techniques.pdf
 
Defensive coding practices is one of the most critical proactive s
Defensive coding practices is one of the most critical proactive sDefensive coding practices is one of the most critical proactive s
Defensive coding practices is one of the most critical proactive s
 
PROPOSING SECURITY REQUIREMENT PRIORITIZATION FRAMEWORK
PROPOSING SECURITY REQUIREMENT PRIORITIZATION FRAMEWORKPROPOSING SECURITY REQUIREMENT PRIORITIZATION FRAMEWORK
PROPOSING SECURITY REQUIREMENT PRIORITIZATION FRAMEWORK
 

Plus de Atlantic Security Conference

Plus de Atlantic Security Conference (13)

Adam w. mosher - geo tagging - atlseccon2011
Adam w. mosher - geo tagging - atlseccon2011Adam w. mosher - geo tagging - atlseccon2011
Adam w. mosher - geo tagging - atlseccon2011
 
Andrew kozma - security 101 - atlseccon2011
Andrew kozma - security 101 - atlseccon2011Andrew kozma - security 101 - atlseccon2011
Andrew kozma - security 101 - atlseccon2011
 
Henry stern - turning point on war on spam - atlseccon2011
Henry stern - turning point on war on spam - atlseccon2011Henry stern - turning point on war on spam - atlseccon2011
Henry stern - turning point on war on spam - atlseccon2011
 
Jean pier talbot - web is the battlefield - atlseccon2011
Jean pier talbot - web is the battlefield - atlseccon2011Jean pier talbot - web is the battlefield - atlseccon2011
Jean pier talbot - web is the battlefield - atlseccon2011
 
Dean carey - data loss-prevention - atlseccon2011
Dean carey - data loss-prevention - atlseccon2011Dean carey - data loss-prevention - atlseccon2011
Dean carey - data loss-prevention - atlseccon2011
 
Joe power - managing risk through compliance - atlseccon2011
Joe power - managing risk through compliance - atlseccon2011Joe power - managing risk through compliance - atlseccon2011
Joe power - managing risk through compliance - atlseccon2011
 
Jonathan raymond 2010 rotman telus - atlseccon2011
Jonathan raymond   2010 rotman telus - atlseccon2011Jonathan raymond   2010 rotman telus - atlseccon2011
Jonathan raymond 2010 rotman telus - atlseccon2011
 
Ron perris compliance-v-security - atlseccon2011
Ron perris   compliance-v-security - atlseccon2011Ron perris   compliance-v-security - atlseccon2011
Ron perris compliance-v-security - atlseccon2011
 
Wayne richard - pia risk management - atlseccon2011
Wayne richard - pia risk management - atlseccon2011Wayne richard - pia risk management - atlseccon2011
Wayne richard - pia risk management - atlseccon2011
 
Winston morton - intrusion prevention - atlseccon2011
Winston morton - intrusion prevention - atlseccon2011Winston morton - intrusion prevention - atlseccon2011
Winston morton - intrusion prevention - atlseccon2011
 
Robert beggs incident response teams - atlseccon2011
Robert beggs   incident response teams - atlseccon2011Robert beggs   incident response teams - atlseccon2011
Robert beggs incident response teams - atlseccon2011
 
Larry fermi generic nac overview-expanded - atlseccon2011
Larry fermi   generic nac overview-expanded - atlseccon2011Larry fermi   generic nac overview-expanded - atlseccon2011
Larry fermi generic nac overview-expanded - atlseccon2011
 
Rafal m. los wh1t3 rabbit - ultimate hack - layers 8 & 9 of the osi model -...
Rafal m. los   wh1t3 rabbit - ultimate hack - layers 8 & 9 of the osi model -...Rafal m. los   wh1t3 rabbit - ultimate hack - layers 8 & 9 of the osi model -...
Rafal m. los wh1t3 rabbit - ultimate hack - layers 8 & 9 of the osi model -...
 

Dernier

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Dernier (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 

Arved sandstrom - the rotwithin - atlseccon2011

  • 1. The Rot Within Why Application Security Starts With Tested, Reliable and Transparent Code
  • 2. The Rot Within My point today is that, if we wish to count lines of code, we should not regard them as ‘lines produced’ but as ‘lines spent’: the current conventional wisdom is so foolish as to book that count on the wrong side of the ledger. EdsgerW. Dijkstra Companies spend millions of dollars on firewalls, encryption and secure access devices, and it’s money wasted, because none of these measures address the weakest link in the security chain. Kevin Mitnick
  • 3. Topics   Introduction   Definitions   General Concepts – Areas of Concern   Presentation Core Theme   Security Development Lifecycle   Standards   Some Considerations in Detail   Conclusions
  • 4. Definitions   Security – confidentiality, integrity, availability, authenticity, non- repudiation (first 3 are CIA triad)   SecDLC – Security Development Lifecycle   SDLC - Software Development Lifecycle   Attack Surface –   Subset of software system resources that an attacker can use to attack the system   Code that can be run by unauthenticated users   Vulnerability – weakness that can be used to cause harm to asset   Threat – anything that can cause harm   Risk – likelihood that a threat will use a vulnerability to cause harm   Control – how a risk is mitigated (my emphasis here is on logical/ technical controls)
  • 5. Things could be worse…
  • 6. Some Areas of Concern Category/Class Category/Class Authentication E-Commerce Payments Authorization Web Services DataValidation Phishing Configuration Management Denial of Service Attacks Session Management Error Handling Sensitive Information Data Integrity Logging & Auditing Interpreter Injection File System Database Access Cryptography Administrative Interfaces
  • 7. Core Theme   Software development is not simple; secure software development is more difficult still.   Application security can’t be bolted on after the fact by “security” developers.   All programmers must understand security.   Organization must be mature enough to field a working SDLC before it can consider a SecDLC.   Secure applications are “self-defending”.   Security in a software application must be pervasive and in depth.   Many of the highest priority risks are due to bad code, not malicious attackers or acts of God.
  • 8. Other Observations   Secure code starts with good code.   If code is riddled with defects, is poorly-documented and poorly tested, and the implementation only loosely corresponds to requirements & design, it is not possible to secure it.   If the organization is not mature enough to support a credible software development lifecycle, it cannot support a security development lifecycle either.   No such thing as “sort of secure” or “partially secure”.
  • 9. Requirements   Requirements: not only what an application must do, but what it must not.   Define security objectives and requirements   An objective is fairly high-level   Requirements describe the objective in detail   Categories: identity, financial, reputation, privacy & regulatory, availability (SLAs)   Keep security requirements separate from functional requirements   Complement use cases with misuse cases.   Use knowledge of risks and mitigation strategies to start work on security test plan
  • 10. Design 1   Understand security policies and regulations   Establish components/layers/packages & boundaries   Includes shared and external components   Includes other applications on same server or accessing same databases   Understand data flows and interconnections   Understand the security of single components   Identify attack surface   Perform threat analysis (risk modeling)   Principle of least privilege
  • 11. Design 2   Choose a development methodology   Any will do provided that you’ve got one   Understand the security features and published guidelines for the OS, managed platform, language, libraries/ frameworks etc   Establish/select coding standards & principles   Clearly identify design work that addresses security requirements   Review source code control & configuration management   Complete the security test plan
  • 12. Implementation   Secure implementation demands a higher quality of design than what is commonly seen today.   Establish a philosophy of security:   Enforce least privilege as default.   All coding guidelines suggest this.   Assume that if design does not explicitly require use of another component, then that use is not permitted.   This includes libraries and frameworks.   Don’t guess at design intent: if required design information is absent make a formal request to have that corrected.   Frequent code reviews, tests, and static analysis.   Don’t change the understood system/component interconnections inadvertently.
  • 13. SDLC Testing   Normal software testing – despite the popular misconception that it’s all about finding defects – is a QC measure used to verify that a product fulfils the requirements.   Functional security testing is the security analog of this conventional process.   Most security testing is the opposite – here we look for functionality that’s not supposed to be present.   Negative requirements: what shouldn’t happen   Risk-based testing focuses on testing against negative requirements   Rank the risks before planning testing   Understand the assumptions of the developers   Testing of all types starts when there is code to test.
  • 14. Developer Standards   All regulations, laws, organizational policies, e.g.   COBIT, ISO 27002, ISO 17799, PCI (DSS), HIPAA, SOX   Possibly TCSEC, ITSEC, CTCPEC -> Common Criteria   Coding Guidelines   By language, API, framework etc.   Secure Design Guidelines, e.g.   OWASP Security Design Guidelines   Threat Risk Modelling System documentation   Secure Coding Guidelines, e.g.   Secure Coding Guidelines for the Java Programming Language   OWASP Secure Coding Practices   Secure Testing Guidelines, e.g.   OWASP Testing Guide
  • 15. Security Code Review   Single most effective technique for identifying security problems.   Use together with automated tools and manual penetration testing.   Security code review is a way of ensuring that the application is “self- defending”:   Verify that security controls are present;   Verify that the controls work as intended;   Verify that the controls are used where needed.   Reviewer(s) need to be familiar with:   Code – language(s) and technologies used   Context – need threat model   Audience – intended users of application, other actors   Importance – required availability of application   Define a checklist   Varying levels of review formality – pick the one that suits the moment   Build review phases into the Software Development Lifecycle   Understand the attack surface
  • 16. Enforcing Authorizations 1   Assumption: web pages are secured (e.g. web.xml, Web.Config). Now we want to secure actions/methods, using either declarative or programmatic methods.   Example 1:ASP.NET MVC authorization filter – [Authorize(Roles=“Admin”)] Public ActionResult DoAdminAction() { …various code… }   Example 2: Java EE – JSF Web Tier Programmatic FacesContext.getCurrentInstance().getExternalContext ().isUserInRole(“role”)   Example 3: Java EE – JSF Web Tier Rendering Seam s:hasRole EL, ICEFaces renderedOnUserRole, or custom user code   Example 4: J2EE/Java EE – EJBs   J2EE 1.4 and prior has declarative authorizations   Java EE 5/6 have @DenyAll, @PermitAll, @RolesAllowed, @DeclareRoles, @RunAs annotations for classes/methods.
  • 17. Enforcing Authorizations 2   The Authorization Disconnect: only the correct roles can execute specific code…but there are limited or no controls on what that code is or does.   Consider platform/language security managers if available   Follow the detailed design; don’t stray.   Code reviews during detailed design and implementation are essential.   Static analysis can be used to help identify both calling, and called, code.   Defense in depth
  • 18. Database Access   Many J2EE/JavaEE and .NET applications use a common database login   This can work if the application and schema are rigorously architected to implement proper security (roles wrt data access) and auditing;   Enforcing access permissions can be simplified in code if a database access layer (DAL) is designed.   Other alternatives include:   Each application user has own database login;   Proxy authentication to provide user context;   Row-level access (e.g. pgacl, OracleVirtual Private Databases).
  • 19. Logging   Who did what when   What:   Authentication attempts;   Authorization requests;   CRUD operations on data – SQL or similar is often sufficient; consider with DB auditing;   Other events of security import.   Should be possible to form audit trail of user actions.   Protect logs as you would other data.   Do not log confidential data.   Logs must be useful: analysis and reporting tools.   Test logs through incident response team exercises.
  • 20. Errors & Exceptions   Fail securely –   Application should not fail into an insecure state   Assess when user sessions should be invalidated   Error handling should not provide attacker with information.This includes “human” information that could be used in a social exploit   Use generic error pages   Leverage the framework error-handling   Keep debugging information in secure logs   Centralize error handling to help prevent information leakage
  • 21. Conclusions   Build security in from the start   Appraise the risks realistically   The greatest security risk you have could be your software developers   Corrupted or missing data doesn’t care who did it or how it happened   Secure code is reliable code   Every software developer must be a security developer