SlideShare a Scribd company logo
Designing Flexibility in
Software to Increase
Security
Larry Moore, CISSP CISA
October 22, 2015
About
Code A Code A’
Time
The only constant in business is change.
What is Flexibility?
Software design that promotes modularity and can be
easily modified to adjust to internal and external
changes such as customer demands, architecture
modification, regulatory compliance modifications or
other factors while maintaining a consistent proactive
security posture.
Best during the requirements analysis phase and
followed through during design and implementation
Quality = Security
Outside Influences
• Operating system changes
• Deprecated API’s
• Architecture changes (motherboard)
• New laws and/or regulatory requirements
• PCI testing procedures change over time
• Outside legitimate hacks
• Third party and customer demands
• Business changes such as new opportunities
• Competition
Security & Flexibility
• Changes in security protocols
• OUT: SSL; IN: TLS
• OUT: MD5; IN: SHA
• SecurityNOW Podcasts
• 499: InstantCryptor
• Incorrect security implementation, encryption without authentication
• 530: Doing it Wrong
• Four examples of companies making security mistakes
PCI
Flexibility Advantages
• Improved scalability
• Lower maintenance costs
• The cost of fixing errors after a system is operational is up to 30
times greater than if the error was caught during system testing.
• Lieblein, E. (see Reference at end)
• Extends lifecycle
• Reduces impact to customers
• Your career!
Flexibility Disadvantages
• More easily abused especially by management
• Additional overhead
• Additional size
• Lower performance
• Generally decreasing because of increasing processor
speed
• Integrity may be impacted because of generalization of
data structures
Timeline - 1977
• Factors in Software Quality
• Griffiss Air Force Base and General Electric, NY
• “This report has stressed the methodology of deriving and validating the normalization
functions to encourage the application of these techniques to other software development.
Use on future developments will add to the data base for the establishment of generalized
normalization function…toward a higher quality product.”
• Flexibility was included in the top list of 11 out of 55 software quality factors. It extends to
Accessibility, Adaptability, Augmentability, Expandability, Extensibility, Modifiability
• Effort required to modify an operational program
• A system that is not flexible costs more and takes longer to change.
• Focuses on:
• Identify a set of quality factors
• Metrics throughout the development cycle
• Communicate results to senior management (Air Force)
Factors in Software Quality
• Flexibility vs. Integrity: Flexibility requires very
general and flexible data structures. This
increases the data security problem.
• May be mitigated through XML
Cost to
Fix
Time
Impact to fix after
delivery
Business Resistance
• Be first on the market
• First is not always best; others may learn at your expense
• Sell it now, fix it later
• Generally higher help desk costs
• Limited budgets
• Regulatory requirements and customer feedback
• Four types of business risk:
• Finance: Loss of customers or revenue
• Reputation: Loss of trust or loss due to competition or public opinion (true or false)
• Compliance: Fines or penalties; loss of business
• Certainty of non-compliance vs. possibility of a breach
• Liability: Civil litigation
Architectural Changes
Architecture Release
Microprosessor
Bits
8088 1979 8
8086
80286
1978
1984
16
80386 1985 32
Current
2001 -
2003
64
Architectural Changes
If unsigned int x in C equals….
x = 0xFFFF
—OR—
x = (unsigned int) -1
0xFFFF -1
16 Bit 0xFFFF 0xFFFF
32 Bit 0x0000FFFF 0xFFFFFFFF
64 Bit 0X000000000000FFFF 0xFFFFFFFFFFFFFFFF
Example
Integrity
OS/2 Postscript Driver
1.0 to < 2.1
Caught between…
Management OS/2 VendorsMe
OS/2 Postscript Driver
2.1 & later
Standards
• Define the framework and use it
• Encapsulation
• Possible even with non-object oriented code
• Minimize the use of global variables
• Try to predict changes
• Polymorphism
• Common interfaces
• Set short-term definable goals and include metrics
• Involve various business units to ensure proper scope
• Enforce scope
• Include dependencies in your requirements and plan for the possibility of requirements failures
Standards
• Creation
• Zero all buffer contents
• Nullify all pointers
• Set all variables to a Non-Defined or Not-In-Use state
• Consider hashes or algorithms for immutable values; check periodically
• Use
• Proper read and write interfaces
• Verify all data before modifications outside of your code
• Restrict access of values via interfaces
• Use proper error return values
• Deletion
• Most of the same as Creation
• Remember: Data must be under your control only between Creation and Deletion
Why Standards?
• Designing standards into the earliest versions forces
customers to adhere appropriately
• Once customers use your product they’re, in a sense, “locked”
onto your standards
• Customers will sacrifice security and may blame you if there
are any vulnerabilities
• Changing products can be expensive and time-consuming.
That will likely create dissatisfaction with your product
• Customers will expect change but only to a certain point
Static Code Analysis
• PROS
• Great for low-cost identification of clear errors
• Variety of software engineers approach threats from different perspectives
They also contain a variety of experiences.
• Excellent way of improving development skills by learning from other experts
• CONS
• “Static” focuses on immediate issues yet misses many strategic goals
• Not very useful to identify vulnerabilities “from a 30,000 foot level”
• Many people have missed vulnerabilities
• Heartbleed and Shellshock
Modularity
• A technique that emphasizes separating program functionality into
independent, interchangeable modules
• Data trust only exists directly between trusted modules
• Trust is broken any time an outside process “touches” data for a
trusted module
• Global data is kept to an absolute minimum
• Verify, verify, verify!
• Document, document, document!
• Enforce standards rules
Modularity
• Object-oriented code
• Methods are declared private by default an only lowered to a
less secure level when necessary.
• Any data that is declared public or protected is to be
considered untrusted. Declare data as either only when
absolutely necessary.
• Public methods are more trustworthy to “shield” internal data
thus permitting internal changes when necessary.
• Deprecated public access points may be retained if needed
for backward compatibility.
Modularity
Process
(Private)
Conversion
• Core process is shielded from the rest of the program
• Conversion or sanitization process ensures that code is
protected
• Modifications are primarily processed by the converter
then by the internal process
• The “separation process” enables easier development
Modularity
Function A (old)
Function B (new)
Process
(Private)
Modularity Example
• Example: Alexander D’Alessandro
• Note the apostrophe
• O’Hara (Ohara), D’Abo, Smith-Jones, etc.
Example
#define UNDEFINED_AGE ((unsigned int) -1)
#defined MIN_AGE 0 /* newborn */
#defined MAX_AGE 100
unsigned int current_age;
Creation and Deletion
current_age = UNDEFINED_AGE;
Example
if (current_age == UNDEFINED_AGE)
{
}
else if (current_age >= MIN_AGE && current_age <= MAX_AGE)
{
}
else
{
<error handling>
}
/* First iteration will never be true since ‘current_age’ is */
/* unsigned. */
/* UNDEFINED_AGE will be included in this context */
if (current_age < MIN_AGE && current_age > MAX_AGE)
{
<error handling>
}
else
{
}
Agile Methodology
• Agile is a more flexible
• Implements more object-oriented software development through smaller, more
incremental work
• Encourages simplicity
• Enables faster changes
• Involves cross-platform teams across the enterprise
• Baseline for:
• Scrum
• Extreme programming (XP)
• Rational Unified Process (RUP)
• The Waterfall model is still used today but is not very effective in modular design.
What About Security?
• Modularity…
• Enforces standards
• Developers will bypass standards if you permit it
• Developers will “hack” public data (not melovantly) if permitted
• Your manager will likely prefer to keep your customers
happy over security. Accept it!
• Permits you to make internal changes with little or no impact to the
customer
• Migrating from one security protocol to another
Career Recommendations
• Never disclose sensitive or private information
• Read and understand all NDA agreements. Obey them!
• Err on the side of caution
• Metrics are critical
• Ease of modifying code
• Minimum number of defects per line of code
• “Forward thinking”
• “Security is the focal point of my development!”
Questions?
Larry Moore
larry.moore.cissp@gmail.com
https://www.linkedin.com/in/lawrencemoore
Recommendations
• The Power of Ten - Rules for Developing Safety Critical Code
• Gerard J. Holzmann, NASA JPL Laboratory for Reliable Software;
2006
• Formalizing Space Shuttle Software Requirements
• Judith Crow, Computer Science Laboratory, 1996
• Two case studies in which requirements for new flight software
subsystems on NASA's Space Shuttle were analyzed using
mechanically supported formal methods.
• The Economic Impacts of Inadequate Infrastructure for Software Testing
• NIST, May 2002
References
• Adrian, David; Bhargavan, Karthikeyan, et. al; Imperfect
Forward Secrecy: How Diffie-Hellman Fails in Practice
• Agile Modeling:
http://www.agilemodeling.com/essays/agileModelingRUP
.htm
• Lieblein, E., “Computer Software: Problem and Possible
Solutions”, CENTACS USAECOM Memorandum, 7
November 1972
• Factors in Software Quality:
http://www.dtic.mil/dtic/tr/fulltext/u2/a049055.pdf

More Related Content

PPT
FLIGHT Amsterdam Presentation - From Protex to Hub
PPTX
Security Design Concepts
PDF
Flight WEST 2018 Presentation - A Buyer Investor Playbook for Successfully Na...
PDF
FLIGHT Amsterdam Presentation - Open Source License Management in the Black D...
PDF
Open Architecture: The Key to Aviation Security
PDF
NetWrix Change Reporter Suite - Product Review by Don Jones
PPTX
Top 5 identity management challenges and solutions
PPTX
File system auditing who accessed what files and where
FLIGHT Amsterdam Presentation - From Protex to Hub
Security Design Concepts
Flight WEST 2018 Presentation - A Buyer Investor Playbook for Successfully Na...
FLIGHT Amsterdam Presentation - Open Source License Management in the Black D...
Open Architecture: The Key to Aviation Security
NetWrix Change Reporter Suite - Product Review by Don Jones
Top 5 identity management challenges and solutions
File system auditing who accessed what files and where

What's hot (20)

PPTX
Top 10 critical changes to audit in your it infrastructure
PPTX
Top 5 critical changes to audit for active directory
PPTX
Design Like a Pro: Machine Learning Basics
PPTX
Managing Security in Agile Culture
PPTX
Design Like a Pro: Scripting Best Practices
PDF
Security in the Software Development Life Cycle (SDLC)
PPTX
Adressing nonfunctional requirements with agile practices
PPTX
CISSP - Chapter 3 - CPU Architecture
PPTX
CISSP Chapter 1 BCP
PPTX
Social Distance Your IBM i from Cybersecurity Risk
PPTX
How to achieve Continous Delivery
PDF
CNIT 125 Ch 4. Security Engineering (Part 1)
PPTX
CISSP Chapter 7 - Security Operations
PDF
CISSP Prep: Ch 6. Identity and Access Management
PDF
Putting the Sec into DevOps
PDF
Decision Matrix for IoT Product Development
PPT
Validating Non Functional Requirements
PPT
Capturing Measurable Non Functional Requirements
PPTX
Non-Functional Requirements Are Important (with Explanatory Notes)
PPTX
Design Like a Pro: SCADA Security Guidelines
Top 10 critical changes to audit in your it infrastructure
Top 5 critical changes to audit for active directory
Design Like a Pro: Machine Learning Basics
Managing Security in Agile Culture
Design Like a Pro: Scripting Best Practices
Security in the Software Development Life Cycle (SDLC)
Adressing nonfunctional requirements with agile practices
CISSP - Chapter 3 - CPU Architecture
CISSP Chapter 1 BCP
Social Distance Your IBM i from Cybersecurity Risk
How to achieve Continous Delivery
CNIT 125 Ch 4. Security Engineering (Part 1)
CISSP Chapter 7 - Security Operations
CISSP Prep: Ch 6. Identity and Access Management
Putting the Sec into DevOps
Decision Matrix for IoT Product Development
Validating Non Functional Requirements
Capturing Measurable Non Functional Requirements
Non-Functional Requirements Are Important (with Explanatory Notes)
Design Like a Pro: SCADA Security Guidelines
Ad

Similar to Designing Flexibility in Software to Increase Security (20)

PPT
SOFTWARE QUALITY ASSURANCE, PAOLA DI MAIO
PDF
The Open Closed Principle - Part 1 - The Original Version
PDF
Caring about Code Quality
PDF
Software systems engineering PRINCIPLES
PPT
SOFWARE QUALITY, INTRODUCTION
PPT
3. quality.ppt
PPT
Software engineering introduction
PPT
Twelve practices of XP_Se lect5 btech
PDF
1. introducción a la Ingeniería de Software (UTM 2071)
PPTX
Capability Building for Cyber Defense: Software Walk through and Screening
PPTX
Non Functional Requirement.
PPTX
Clean code presentation
PDF
The Open-Closed Principle - the Original Version and the Contemporary Version
PPTX
Software Design
PPT
CH 1 The Scope of Object Oriented SE.ppt
PPT
Cnpm bkdn
PDF
Clean Code V2
PDF
S.O.L.I.D xp
PDF
Writing S.O.L.I.D Code
PPTX
PRESENTATION of Software Engineering.pptx
SOFTWARE QUALITY ASSURANCE, PAOLA DI MAIO
The Open Closed Principle - Part 1 - The Original Version
Caring about Code Quality
Software systems engineering PRINCIPLES
SOFWARE QUALITY, INTRODUCTION
3. quality.ppt
Software engineering introduction
Twelve practices of XP_Se lect5 btech
1. introducción a la Ingeniería de Software (UTM 2071)
Capability Building for Cyber Defense: Software Walk through and Screening
Non Functional Requirement.
Clean code presentation
The Open-Closed Principle - the Original Version and the Contemporary Version
Software Design
CH 1 The Scope of Object Oriented SE.ppt
Cnpm bkdn
Clean Code V2
S.O.L.I.D xp
Writing S.O.L.I.D Code
PRESENTATION of Software Engineering.pptx
Ad

Recently uploaded (20)

PDF
How Creative Agencies Leverage Project Management Software.pdf
PDF
Nekopoi APK 2025 free lastest update
PDF
Understanding Forklifts - TECH EHS Solution
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PDF
System and Network Administration Chapter 2
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
Transform Your Business with a Software ERP System
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
AI in Product Development-omnex systems
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PPTX
Essential Infomation Tech presentation.pptx
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
How Creative Agencies Leverage Project Management Software.pdf
Nekopoi APK 2025 free lastest update
Understanding Forklifts - TECH EHS Solution
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
System and Network Administration Chapter 2
Internet Downloader Manager (IDM) Crack 6.42 Build 41
Transform Your Business with a Software ERP System
Operating system designcfffgfgggggggvggggggggg
2025 Textile ERP Trends: SAP, Odoo & Oracle
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
How to Migrate SBCGlobal Email to Yahoo Easily
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Odoo Companies in India – Driving Business Transformation.pdf
Odoo POS Development Services by CandidRoot Solutions
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
AI in Product Development-omnex systems
Navsoft: AI-Powered Business Solutions & Custom Software Development
Essential Infomation Tech presentation.pptx
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf

Designing Flexibility in Software to Increase Security

  • 1. Designing Flexibility in Software to Increase Security Larry Moore, CISSP CISA October 22, 2015
  • 2. About Code A Code A’ Time The only constant in business is change.
  • 3. What is Flexibility? Software design that promotes modularity and can be easily modified to adjust to internal and external changes such as customer demands, architecture modification, regulatory compliance modifications or other factors while maintaining a consistent proactive security posture. Best during the requirements analysis phase and followed through during design and implementation Quality = Security
  • 4. Outside Influences • Operating system changes • Deprecated API’s • Architecture changes (motherboard) • New laws and/or regulatory requirements • PCI testing procedures change over time • Outside legitimate hacks • Third party and customer demands • Business changes such as new opportunities • Competition
  • 5. Security & Flexibility • Changes in security protocols • OUT: SSL; IN: TLS • OUT: MD5; IN: SHA • SecurityNOW Podcasts • 499: InstantCryptor • Incorrect security implementation, encryption without authentication • 530: Doing it Wrong • Four examples of companies making security mistakes PCI
  • 6. Flexibility Advantages • Improved scalability • Lower maintenance costs • The cost of fixing errors after a system is operational is up to 30 times greater than if the error was caught during system testing. • Lieblein, E. (see Reference at end) • Extends lifecycle • Reduces impact to customers • Your career!
  • 7. Flexibility Disadvantages • More easily abused especially by management • Additional overhead • Additional size • Lower performance • Generally decreasing because of increasing processor speed • Integrity may be impacted because of generalization of data structures
  • 8. Timeline - 1977 • Factors in Software Quality • Griffiss Air Force Base and General Electric, NY • “This report has stressed the methodology of deriving and validating the normalization functions to encourage the application of these techniques to other software development. Use on future developments will add to the data base for the establishment of generalized normalization function…toward a higher quality product.” • Flexibility was included in the top list of 11 out of 55 software quality factors. It extends to Accessibility, Adaptability, Augmentability, Expandability, Extensibility, Modifiability • Effort required to modify an operational program • A system that is not flexible costs more and takes longer to change. • Focuses on: • Identify a set of quality factors • Metrics throughout the development cycle • Communicate results to senior management (Air Force)
  • 9. Factors in Software Quality • Flexibility vs. Integrity: Flexibility requires very general and flexible data structures. This increases the data security problem. • May be mitigated through XML Cost to Fix Time Impact to fix after delivery
  • 10. Business Resistance • Be first on the market • First is not always best; others may learn at your expense • Sell it now, fix it later • Generally higher help desk costs • Limited budgets • Regulatory requirements and customer feedback • Four types of business risk: • Finance: Loss of customers or revenue • Reputation: Loss of trust or loss due to competition or public opinion (true or false) • Compliance: Fines or penalties; loss of business • Certainty of non-compliance vs. possibility of a breach • Liability: Civil litigation
  • 11. Architectural Changes Architecture Release Microprosessor Bits 8088 1979 8 8086 80286 1978 1984 16 80386 1985 32 Current 2001 - 2003 64
  • 12. Architectural Changes If unsigned int x in C equals…. x = 0xFFFF —OR— x = (unsigned int) -1 0xFFFF -1 16 Bit 0xFFFF 0xFFFF 32 Bit 0x0000FFFF 0xFFFFFFFF 64 Bit 0X000000000000FFFF 0xFFFFFFFFFFFFFFFF
  • 17. Standards • Define the framework and use it • Encapsulation • Possible even with non-object oriented code • Minimize the use of global variables • Try to predict changes • Polymorphism • Common interfaces • Set short-term definable goals and include metrics • Involve various business units to ensure proper scope • Enforce scope • Include dependencies in your requirements and plan for the possibility of requirements failures
  • 18. Standards • Creation • Zero all buffer contents • Nullify all pointers • Set all variables to a Non-Defined or Not-In-Use state • Consider hashes or algorithms for immutable values; check periodically • Use • Proper read and write interfaces • Verify all data before modifications outside of your code • Restrict access of values via interfaces • Use proper error return values • Deletion • Most of the same as Creation • Remember: Data must be under your control only between Creation and Deletion
  • 19. Why Standards? • Designing standards into the earliest versions forces customers to adhere appropriately • Once customers use your product they’re, in a sense, “locked” onto your standards • Customers will sacrifice security and may blame you if there are any vulnerabilities • Changing products can be expensive and time-consuming. That will likely create dissatisfaction with your product • Customers will expect change but only to a certain point
  • 20. Static Code Analysis • PROS • Great for low-cost identification of clear errors • Variety of software engineers approach threats from different perspectives They also contain a variety of experiences. • Excellent way of improving development skills by learning from other experts • CONS • “Static” focuses on immediate issues yet misses many strategic goals • Not very useful to identify vulnerabilities “from a 30,000 foot level” • Many people have missed vulnerabilities • Heartbleed and Shellshock
  • 21. Modularity • A technique that emphasizes separating program functionality into independent, interchangeable modules • Data trust only exists directly between trusted modules • Trust is broken any time an outside process “touches” data for a trusted module • Global data is kept to an absolute minimum • Verify, verify, verify! • Document, document, document! • Enforce standards rules
  • 22. Modularity • Object-oriented code • Methods are declared private by default an only lowered to a less secure level when necessary. • Any data that is declared public or protected is to be considered untrusted. Declare data as either only when absolutely necessary. • Public methods are more trustworthy to “shield” internal data thus permitting internal changes when necessary. • Deprecated public access points may be retained if needed for backward compatibility.
  • 23. Modularity Process (Private) Conversion • Core process is shielded from the rest of the program • Conversion or sanitization process ensures that code is protected • Modifications are primarily processed by the converter then by the internal process • The “separation process” enables easier development
  • 24. Modularity Function A (old) Function B (new) Process (Private)
  • 25. Modularity Example • Example: Alexander D’Alessandro • Note the apostrophe • O’Hara (Ohara), D’Abo, Smith-Jones, etc.
  • 26. Example #define UNDEFINED_AGE ((unsigned int) -1) #defined MIN_AGE 0 /* newborn */ #defined MAX_AGE 100 unsigned int current_age; Creation and Deletion current_age = UNDEFINED_AGE;
  • 27. Example if (current_age == UNDEFINED_AGE) { } else if (current_age >= MIN_AGE && current_age <= MAX_AGE) { } else { <error handling> } /* First iteration will never be true since ‘current_age’ is */ /* unsigned. */ /* UNDEFINED_AGE will be included in this context */ if (current_age < MIN_AGE && current_age > MAX_AGE) { <error handling> } else { }
  • 28. Agile Methodology • Agile is a more flexible • Implements more object-oriented software development through smaller, more incremental work • Encourages simplicity • Enables faster changes • Involves cross-platform teams across the enterprise • Baseline for: • Scrum • Extreme programming (XP) • Rational Unified Process (RUP) • The Waterfall model is still used today but is not very effective in modular design.
  • 29. What About Security? • Modularity… • Enforces standards • Developers will bypass standards if you permit it • Developers will “hack” public data (not melovantly) if permitted • Your manager will likely prefer to keep your customers happy over security. Accept it! • Permits you to make internal changes with little or no impact to the customer • Migrating from one security protocol to another
  • 30. Career Recommendations • Never disclose sensitive or private information • Read and understand all NDA agreements. Obey them! • Err on the side of caution • Metrics are critical • Ease of modifying code • Minimum number of defects per line of code • “Forward thinking” • “Security is the focal point of my development!”
  • 32. Recommendations • The Power of Ten - Rules for Developing Safety Critical Code • Gerard J. Holzmann, NASA JPL Laboratory for Reliable Software; 2006 • Formalizing Space Shuttle Software Requirements • Judith Crow, Computer Science Laboratory, 1996 • Two case studies in which requirements for new flight software subsystems on NASA's Space Shuttle were analyzed using mechanically supported formal methods. • The Economic Impacts of Inadequate Infrastructure for Software Testing • NIST, May 2002
  • 33. References • Adrian, David; Bhargavan, Karthikeyan, et. al; Imperfect Forward Secrecy: How Diffie-Hellman Fails in Practice • Agile Modeling: http://www.agilemodeling.com/essays/agileModelingRUP .htm • Lieblein, E., “Computer Software: Problem and Possible Solutions”, CENTACS USAECOM Memorandum, 7 November 1972 • Factors in Software Quality: http://www.dtic.mil/dtic/tr/fulltext/u2/a049055.pdf