Arved sandstrom - the rotwithin - atlseccon2011

Atlantic Security Conference
Atlantic Security ConferenceAtlantic Security Conference
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
1 von 21

Recomendados

TUD CS4105 | 2015 | Lecture 1 von
TUD CS4105 | 2015 | Lecture 1TUD CS4105 | 2015 | Lecture 1
TUD CS4105 | 2015 | Lecture 1Eelco Visser
3.1K views70 Folien
us-16-Nipravsky-Certificate-Bypass-Hiding-And-Executing-Malware-From-A-Digita... von
us-16-Nipravsky-Certificate-Bypass-Hiding-And-Executing-Malware-From-A-Digita...us-16-Nipravsky-Certificate-Bypass-Hiding-And-Executing-Malware-From-A-Digita...
us-16-Nipravsky-Certificate-Bypass-Hiding-And-Executing-Malware-From-A-Digita...Tom Nipravsky
221 views15 Folien
Secure Coding and Threat Modeling von
Secure Coding and Threat ModelingSecure Coding and Threat Modeling
Secure Coding and Threat ModelingMiriam Celi, CISSP, GISP, MSCS, MBA
2.3K views50 Folien
A successful application security program - Envision build and scale von
A successful application security program - Envision build and scaleA successful application security program - Envision build and scale
A successful application security program - Envision build and scalePriyanka Aash
806 views59 Folien
Software Security Engineering von
Software Security EngineeringSoftware Security Engineering
Software Security EngineeringMarco Morana
3.4K views50 Folien
7 Steps to Threat Modeling von
7 Steps to Threat Modeling7 Steps to Threat Modeling
7 Steps to Threat ModelingDanny Wong
8.1K views10 Folien

Más contenido relacionado

Was ist angesagt?

Application Threat Modeling von
Application Threat ModelingApplication Threat Modeling
Application Threat ModelingMarco Morana
14.2K views36 Folien
Security Training: #3 Threat Modelling - Practices and Tools von
Security Training: #3 Threat Modelling - Practices and ToolsSecurity Training: #3 Threat Modelling - Practices and Tools
Security Training: #3 Threat Modelling - Practices and ToolsYulian Slobodyan
14.1K views54 Folien
Null bachav von
Null bachavNull bachav
Null bachavNaga Venkata Sunil Alamuri
3.1K views60 Folien
Security Best Practices von
Security Best PracticesSecurity Best Practices
Security Best PracticesClint Edmonson
1.3K views79 Folien
STRIDE And DREAD von
STRIDE And DREADSTRIDE And DREAD
STRIDE And DREADchuckbt
31.8K views8 Folien
Introduction to Application Security Testing von
Introduction to Application Security TestingIntroduction to Application Security Testing
Introduction to Application Security TestingMohamed Ridha CHEBBI, CISSP
2.2K views38 Folien

Was ist angesagt?(20)

Application Threat Modeling von Marco Morana
Application Threat ModelingApplication Threat Modeling
Application Threat Modeling
Marco Morana14.2K views
Security Training: #3 Threat Modelling - Practices and Tools von Yulian Slobodyan
Security Training: #3 Threat Modelling - Practices and ToolsSecurity Training: #3 Threat Modelling - Practices and Tools
Security Training: #3 Threat Modelling - Practices and Tools
Yulian Slobodyan14.1K views
STRIDE And DREAD von chuckbt
STRIDE And DREADSTRIDE And DREAD
STRIDE And DREAD
chuckbt31.8K views
ОЛЬГА АКСЬОНЕНКО «Безпечна розробка програмного забезпечення в Agile проектах... von GoQA
ОЛЬГА АКСЬОНЕНКО «Безпечна розробка програмного забезпечення в Agile проектах...ОЛЬГА АКСЬОНЕНКО «Безпечна розробка програмного забезпечення в Agile проектах...
ОЛЬГА АКСЬОНЕНКО «Безпечна розробка програмного забезпечення в Agile проектах...
GoQA35 views
Threat Modeling to Reduce Software Security Risk von Security Innovation
Threat Modeling to Reduce Software Security RiskThreat Modeling to Reduce Software Security Risk
Threat Modeling to Reduce Software Security Risk
Security Innovation5.5K views
Software Security Initiatives von Marco Morana
Software Security InitiativesSoftware Security Initiatives
Software Security Initiatives
Marco Morana4.5K views
Threat Modeling And Analysis von Lalit Kale
Threat Modeling And AnalysisThreat Modeling And Analysis
Threat Modeling And Analysis
Lalit Kale5K views
Secure Design: Threat Modeling von Cigital
Secure Design: Threat ModelingSecure Design: Threat Modeling
Secure Design: Threat Modeling
Cigital2.7K views
Security Culture from Concept to Maintenance: Secure Software Development Lif... von Dilum Bandara
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...
Dilum Bandara2.2K views
Mobile application security and threat modeling von Shantanu Mitra
Mobile application security and threat modelingMobile application security and threat modeling
Mobile application security and threat modeling
Shantanu Mitra1.5K views
Presentation on vulnerability analysis von Asif Anik
Presentation on vulnerability analysisPresentation on vulnerability analysis
Presentation on vulnerability analysis
Asif Anik2K views
Vulnerability Assesment von Dedi Dwianto
Vulnerability AssesmentVulnerability Assesment
Vulnerability Assesment
Dedi Dwianto3.7K views
Developing a Threat Modeling Mindset von Robert Hurlbut
Developing a Threat Modeling MindsetDeveloping a Threat Modeling Mindset
Developing a Threat Modeling Mindset
Robert Hurlbut358 views
5 things i wish i knew about sast (DSO-LG July 2021) von Michael Man
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)
Michael Man145 views

Destacado

Campus party jennifer von
Campus party jenniferCampus party jennifer
Campus party jenniferdanielalopesx
101 views7 Folien
話我家鄉 von
話我家鄉話我家鄉
話我家鄉awcc
657 views2 Folien
DS - Portnox_Unique Advantages von
DS - Portnox_Unique AdvantagesDS - Portnox_Unique Advantages
DS - Portnox_Unique AdvantagesJason Newell
148 views2 Folien
coretec von
coreteccoretec
coretecgreenflooringsupply
43 views6 Folien
家鄉的名勝古蹟與特產 von
家鄉的名勝古蹟與特產家鄉的名勝古蹟與特產
家鄉的名勝古蹟與特產awcc
4.3K views6 Folien
2007lv Nac Big Pic[1] von
2007lv Nac Big Pic[1]2007lv Nac Big Pic[1]
2007lv Nac Big Pic[1]gerardgoubert
294 views1 Folie

Destacado(20)

話我家鄉 von awcc
話我家鄉話我家鄉
話我家鄉
awcc657 views
DS - Portnox_Unique Advantages von Jason Newell
DS - Portnox_Unique AdvantagesDS - Portnox_Unique Advantages
DS - Portnox_Unique Advantages
Jason Newell148 views
家鄉的名勝古蹟與特產 von awcc
家鄉的名勝古蹟與特產家鄉的名勝古蹟與特產
家鄉的名勝古蹟與特產
awcc4.3K views
Loppupuheenvuoro - seminaari 26.10.2016 von Kokeileva Suomi
Loppupuheenvuoro - seminaari 26.10.2016Loppupuheenvuoro - seminaari 26.10.2016
Loppupuheenvuoro - seminaari 26.10.2016
Kokeileva Suomi446 views
Ley de gas ideal, constante universal de gases y gases reales von UACJ
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
UACJ7.3K views
Corporate profile quadrant knowledge solutions von Samuel D'souza
Corporate profile quadrant knowledge solutionsCorporate profile quadrant knowledge solutions
Corporate profile quadrant knowledge solutions
Samuel D'souza151 views
10 Mandamentos - Aula 11 - 10º mandamento von Elder Moraes
10 Mandamentos - Aula 11 - 10º mandamento10 Mandamentos - Aula 11 - 10º mandamento
10 Mandamentos - Aula 11 - 10º mandamento
Elder Moraes1.1K views

Similar a Arved sandstrom - the rotwithin - atlseccon2011

10 Tips to Keep Your Software a Step Ahead of the Hackers von
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 HackersCheckmarx
497 views2 Folien
Software security testing von
Software security testingSoftware security testing
Software security testingnehabsairam
310 views18 Folien
Application Security Testing for Software Engineers: An approach to build sof... von
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
21.6K views59 Folien
An Introduction to Secure Application Development von
An Introduction to Secure Application DevelopmentAn Introduction to Secure Application Development
An Introduction to Secure Application DevelopmentChristopher Frenz
1.1K views26 Folien
Criterion 1A - 4 - MasteryPros and Cons Thoroughly compares the von
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 theCruzIbarra161
3 views40 Folien
Lecture Course Outline and Secure SDLC.ppt von
Lecture Course Outline and Secure SDLC.pptLecture Course Outline and Secure SDLC.ppt
Lecture Course Outline and Secure SDLC.pptDrBasemMohamedElomda
7 views40 Folien

Similar a Arved sandstrom - the rotwithin - atlseccon2011(20)

10 Tips to Keep Your Software a Step Ahead of the Hackers von Checkmarx
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
Checkmarx497 views
Software security testing von nehabsairam
Software security testingSoftware security testing
Software security testing
nehabsairam310 views
Application Security Testing for Software Engineers: An approach to build sof... von Michael Hidalgo
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 Hidalgo21.6K views
An Introduction to Secure Application Development von Christopher Frenz
An Introduction to Secure Application DevelopmentAn Introduction to Secure Application Development
An Introduction to Secure Application Development
Christopher Frenz1.1K views
Criterion 1A - 4 - MasteryPros and Cons Thoroughly compares the von CruzIbarra161
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
CruzIbarra1613 views
Mike Spaulding - Building an Application Security Program von centralohioissa
Mike Spaulding - Building an Application Security ProgramMike Spaulding - Building an Application Security Program
Mike Spaulding - Building an Application Security Program
centralohioissa1.1K views
Building an AppSec Team Extended Cut von Mike Spaulding
Building an AppSec Team Extended CutBuilding an AppSec Team Extended Cut
Building an AppSec Team Extended Cut
Mike Spaulding219 views
Manoj Purandare - Application Security - Secure Code Assessment Program - Pre... von 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... von 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... von 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...
Security engineering 101 when good design & security work together von Wendy Knox Everette
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
Software Security Testing von ankitmehta21
Software Security TestingSoftware Security Testing
Software Security Testing
ankitmehta211.2K views
Defensive coding practices is one of the most critical proactive s von LinaCovington707
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 von IJCSEA Journal
PROPOSING SECURITY REQUIREMENT PRIORITIZATION FRAMEWORKPROPOSING SECURITY REQUIREMENT PRIORITIZATION FRAMEWORK
PROPOSING SECURITY REQUIREMENT PRIORITIZATION FRAMEWORK
IJCSEA Journal12 views
Security Services and Approach by Nazar Tymoshyk von SoftServe
Security Services and Approach by Nazar TymoshykSecurity Services and Approach by Nazar Tymoshyk
Security Services and Approach by Nazar Tymoshyk
SoftServe540 views

Más de Atlantic Security Conference

Adam w. mosher - geo tagging - atlseccon2011 von
Adam w. mosher - geo tagging - atlseccon2011Adam w. mosher - geo tagging - atlseccon2011
Adam w. mosher - geo tagging - atlseccon2011Atlantic Security Conference
402 views32 Folien
Andrew kozma - security 101 - atlseccon2011 von
Andrew kozma - security 101 - atlseccon2011Andrew kozma - security 101 - atlseccon2011
Andrew kozma - security 101 - atlseccon2011Atlantic Security Conference
239 views17 Folien
Henry stern - turning point on war on spam - atlseccon2011 von
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 - atlseccon2011Atlantic Security Conference
524 views60 Folien
Jean pier talbot - web is the battlefield - atlseccon2011 von
Jean pier talbot - web is the battlefield - atlseccon2011Jean pier talbot - web is the battlefield - atlseccon2011
Jean pier talbot - web is the battlefield - atlseccon2011Atlantic Security Conference
165 views29 Folien
Dean carey - data loss-prevention - atlseccon2011 von
Dean carey - data loss-prevention - atlseccon2011Dean carey - data loss-prevention - atlseccon2011
Dean carey - data loss-prevention - atlseccon2011Atlantic Security Conference
258 views26 Folien
Joe power - managing risk through compliance - atlseccon2011 von
Joe power - managing risk through compliance - atlseccon2011Joe power - managing risk through compliance - atlseccon2011
Joe power - managing risk through compliance - atlseccon2011Atlantic Security Conference
162 views8 Folien

Más de Atlantic Security Conference(13)

Último

Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda... von
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...ShapeBlue
93 views13 Folien
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas... von
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...Bernd Ruecker
50 views69 Folien
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ... von
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...ShapeBlue
97 views28 Folien
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ... von
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...ShapeBlue
121 views15 Folien
Keynote Talk: Open Source is Not Dead - Charles Schulz - Vates von
Keynote Talk: Open Source is Not Dead - Charles Schulz - VatesKeynote Talk: Open Source is Not Dead - Charles Schulz - Vates
Keynote Talk: Open Source is Not Dead - Charles Schulz - VatesShapeBlue
178 views15 Folien
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue von
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlueMigrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlueShapeBlue
147 views20 Folien

Último(20)

Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda... von ShapeBlue
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...
Hypervisor Agnostic DRS in CloudStack - Brief overview & demo - Vishesh Jinda...
ShapeBlue93 views
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas... von Bernd Ruecker
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
iSAQB Software Architecture Gathering 2023: How Process Orchestration Increas...
Bernd Ruecker50 views
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ... von ShapeBlue
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
How to Re-use Old Hardware with CloudStack. Saving Money and the Environment ...
ShapeBlue97 views
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ... von ShapeBlue
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...
Backroll, News and Demo - Pierre Charton, Matthias Dhellin, Ousmane Diarra - ...
ShapeBlue121 views
Keynote Talk: Open Source is Not Dead - Charles Schulz - Vates von ShapeBlue
Keynote Talk: Open Source is Not Dead - Charles Schulz - VatesKeynote Talk: Open Source is Not Dead - Charles Schulz - Vates
Keynote Talk: Open Source is Not Dead - Charles Schulz - Vates
ShapeBlue178 views
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue von ShapeBlue
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlueMigrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue
Migrating VMware Infra to KVM Using CloudStack - Nicolas Vazquez - ShapeBlue
ShapeBlue147 views
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha... von ShapeBlue
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
Mitigating Common CloudStack Instance Deployment Failures - Jithin Raju - Sha...
ShapeBlue113 views
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R... von ShapeBlue
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R...Setting Up Your First CloudStack Environment with Beginners Challenges - MD R...
Setting Up Your First CloudStack Environment with Beginners Challenges - MD R...
ShapeBlue105 views
Extending KVM Host HA for Non-NFS Storage - Alex Ivanov - StorPool von ShapeBlue
Extending KVM Host HA for Non-NFS Storage -  Alex Ivanov - StorPoolExtending KVM Host HA for Non-NFS Storage -  Alex Ivanov - StorPool
Extending KVM Host HA for Non-NFS Storage - Alex Ivanov - StorPool
ShapeBlue56 views
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue von ShapeBlue
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue
2FA and OAuth2 in CloudStack - Andrija Panić - ShapeBlue
ShapeBlue75 views
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti... von ShapeBlue
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...
DRaaS using Snapshot copy and destination selection (DRaaS) - Alexandre Matti...
ShapeBlue69 views
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N... von James Anderson
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
GDG Cloud Southlake 28 Brad Taylor and Shawn Augenstein Old Problems in the N...
James Anderson142 views
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava... von ShapeBlue
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...
Centralized Logging Feature in CloudStack using ELK and Grafana - Kiran Chava...
ShapeBlue74 views
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit... von ShapeBlue
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...
Transitioning from VMware vCloud to Apache CloudStack: A Path to Profitabilit...
ShapeBlue86 views
"Surviving highload with Node.js", Andrii Shumada von Fwdays
"Surviving highload with Node.js", Andrii Shumada "Surviving highload with Node.js", Andrii Shumada
"Surviving highload with Node.js", Andrii Shumada
Fwdays49 views
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue von ShapeBlue
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlueCloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue
CloudStack Managed User Data and Demo - Harikrishna Patnala - ShapeBlue
ShapeBlue68 views

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