SlideShare a Scribd company logo
TRESEC MEETUP
Secure design best practices and
design patterns
Henry Haverinen, February 5, 2019
| © INSTA
| © INSTA
AVIATIONDEFENCE ANALYTICS CYBERRESPONSE AUTOMATION
SOLUTIONS WORTH YOUR TRUST
PROFITABLE GROWTH AND CONTINUITY
GLOBAL AND LOCAL TECHNOLOGY AND PARTNER NETWORK
C5ISR
Training Systems &
Simulation
Secure Software
Development
AI, Advanced
Analytics and Data
Driven solutions for
mobile machinery
and process industry
Partner for Security
Aware
Organizations
SOC, Secure
Identity, Network
Security
Next Generation
Emergency
Response Centers
Virtual Control
Room
Automation and
electrification
solutions, lifecycle
services
Aviation technology
solutions, services
and lifecycle
solutions
UAV training,
operation services
SECURE DIGITALIZATION
| © INSTA
Henry Haverinen
Leads technology and R&D at Intopalo Digital
Software leader, SDL specialist, cybersecurity
architect, product manager, SAFe 4 Certified Agilist,
Doctor of Science (Technology)
Connect with me on LinkedIn at
https://www.linkedin.com/in/henryhaverinen/
About the speaker
| © INSTA
Outline
Secure design best practices and design patterns – what are they?
A few examples
How to include them in the development process
Discussion – How do you apply them? What would you recommend to try out?
| © INSTA| © INSTA
Secure design best
practices
| © INSTA
Secure design best practices
Rules of thumb on secure design
Many best practices work on different levels: from system design to software design
High level and simple
A certain best practice might not apply to all situations. Different best practices may
give contradicting advice. Adult supervision is recommended!
You’ll also hear excuses and explanations that are not valid reasons to ignore secure
design best practices.
| 7
| © INSTA
Secure design best practices
• Keep It Simple, Stupid (KISS)
• Defense in depth
• Attack surface reduction
• Principle of least privilege
• Use proven components and
designs
• No single points of failure
• Complete mediation
• Input validation and error handling
• Good enough security
• Data privacy design considerations
• Fail safe and fail secure
• Open design
• Psychological acceptability
• Secure by default
• Separation of duties
| © INSTA
Attack surface reduction:
• Turn off unnecessary functionality,
ports, services etc.
• Reduce the amount of code running
• Reduce entry points available to
untrusted users
• Prefer a whitelist approach instead of
blacklisting
Attack surface reduction
| © INSTA
Attack surface reduction:
• Turn off unnecessary functionality,
ports, services etc.
• Reduce the amount of code running
• Reduce entry points available to
untrusted users
• Prefer a whitelist approach instead of
blacklisting
Example of using this practice – Remove
all development time features, debug
ports etc. or document their presence
and the need to protect them.
Examples of not following this practice –
Allowing direct maintenance remote
access with RDP or SSH to all individual
hosts of the system, rather than
implementing a separate intermediate
host, so called “bastion host” or “jump
host”
Attack surface reduction
| © INSTA
Complete mediation: A software system
that requires access checks to an object
each time a subject requests access for
objects; decreases the chances of
mistakenly giving elevated permissions
to the subject.
• Explicit deny: any function that is not
specifically authorized is denied by
default.
Complete mediation
| © INSTA
Complete mediation: A software system
that requires access checks to an object
each time a subject requests access for
objects; decreases the chances of
mistakenly giving elevated permissions
to the subject.
• Explicit deny: any function that is not
specifically authorized is denied by
default.
Example of using this practice – the
system does not rely on a previous
access control check done at login time,
but it performs an authorization check
on every REST API call.
Examples of not following this practice –
The developer assumes a certain
sequence of actions in a complex use
case such as purchasing, and performs
an authorization check only when the
user starts the sequence
Complete mediation
| © INSTA| © INSTA
Secure design
patterns
| © INSTA
Secure design patterns
There are certain problems that occur time after time in system architecture design
and software design.
A security design pattern is a general reusable solution to a commonly occurring
problem.
A commonly
occuring design
problem
Design pattern:
Problem description,
solution description,
example uses
| © INSTA
How to use a legacy component in a secure way?
The Wrapper pattern – the problem
| © INSTA
Introduce a wrapper component that
implements a well-tested secure
interface.
Invoke the legacy component only via
the wrapper. Ensure that the wrapper
cannot be invoked directly.
Source:
Kenneth van Wyk, Mark Graff, ”Secure
Coding: Principles and Practices”,
O’Reilly Media 2009
Example uses of this pattern –
Wrapping a legacy command line
application or a RESTful service.
The Wrapper pattern
External entity
Without wrapper
With wrapper
Legacy
Application
Legacy
Application
External entity
Wrapper
| © INSTA
A large program requires elevated privileges, which increases the attack surface.
How can the impacts of a compromise be minimized?
Distrustful decomposition – the problem
| © INSTA
Decompose the application into smaller
mutually untrusting programs that need
less privileges
Pay attention to the parts that
communicate with external entities
Source:
Secure Design Patterns, Technical report
by Software Engineering Institute
Example uses of this pattern –
The qmail and Postfix mail systems use
multiple processes.
Distrustful decomposition
Peer
component 1
Without this pattern
With this parttern
Monolithic
application
Peer
component 2
Peer
component 1
Peer
component 2
Interface 1
process
Interface 2
process
Internal
processing
(privileged)
| © INSTA
How to separate functionality that requries elevated privileges from functionality
that does not require elevated privileges?
How to take advantage of existing user verification and process separation
functionalities available in the operating system?
Defer to kernel – the problem
| © INSTA
Decompose the application into a basic
client server architecture. The server runs
with elevated privileges and uses existing
kernel functionality to verify users.
Examples: The Unix client-server program
interface (UCSPI), Securable Objects on
Windows.
Source: Secure Design Patterns, Technical
report by Software Engineering Institute
Defer to kernel
Client application
External entity
Server
application
OS Kernel
(1) Request
(2) User ID
verification request
(3) User ID
verification results
(4) Server response
| © INSTA| © INSTA
OK – so how do we
use these in
practice?
| © INSTA
How to make these concepts real for your team, idea 1/3
Start with training the team
| © INSTA
How to make these concepts real for your team, idea 2/3
Which best practices or patterns are relevant will depend on your team
1. Start with a small set of relevant best practices and patterns
2. Extend the set based on feedback, lessons learned, retros, incidents
| © INSTA
How to make these concepts real for your team, idea 3/3
Consider secure design reviews
1. Review whether the selected set of best practices have been followed
(I have done this in practice and this seems to work)
2. Review whether it would have been useful to apply some of the selected secure
design patterns
(I haven’t tried this in pratice – I have some doubts of whether this would be
useful)
A security design review can produce trails of usage for compliance
| © INSTA
Discussion
How do you apply secure design best practices and design patterns?
Your recommendations?
| 25

More Related Content

PPTX
An Easy To Deploy Penetration Testing Platform
PPTX
Technical Writing for Consultants
PPTX
Agile and Secure SDLC
PDF
Review of network diagram
PDF
2019 10-app gate sdp 101 09a
PDF
Juniper competitive cheatsheet
PPTX
24may 1200 valday eric anklesaria 'secure sdlc – core banking'
PDF
Threat Modeling for System Builders and System Breakers - Dan Cornell of Deni...
An Easy To Deploy Penetration Testing Platform
Technical Writing for Consultants
Agile and Secure SDLC
Review of network diagram
2019 10-app gate sdp 101 09a
Juniper competitive cheatsheet
24may 1200 valday eric anklesaria 'secure sdlc – core banking'
Threat Modeling for System Builders and System Breakers - Dan Cornell of Deni...

What's hot (20)

PDF
Air defense wireless_vulnerability_assessement_module_spec_sheet
PDF
It's 2012 and My Network Got Hacked - Omar Santos
PPTX
Integrating Security Across SDLC Phases
PDF
Security Development Lifecycle Tools
PPTX
2016 virus bulletin
PPTX
Dev secops indonesia-devsecops as a service-Amien Harisen
PDF
Shift Left Security
PPTX
Assessing network security
DOCX
Backtrack manual Part1
PPTX
Devsec ops
PPTX
Check Point sizing security
PDF
Open Source Security for Newbies - Best Practices
PDF
Architecting Secure Web Systems
PDF
National Cyber Range (Ranka)
PDF
IRJET- A Defense System Against Application Layer Ddos Attacks with Data Secu...
PPT
checkpoint
PPTX
451 and Endgame - Zero breach Tolerance: Earliest protection across the attac...
PPTX
Security and DevOps Overview
PPTX
Ten Security Product Categories You've Probably Never Heard Of
PDF
Symantec Endpoint Suite
Air defense wireless_vulnerability_assessement_module_spec_sheet
It's 2012 and My Network Got Hacked - Omar Santos
Integrating Security Across SDLC Phases
Security Development Lifecycle Tools
2016 virus bulletin
Dev secops indonesia-devsecops as a service-Amien Harisen
Shift Left Security
Assessing network security
Backtrack manual Part1
Devsec ops
Check Point sizing security
Open Source Security for Newbies - Best Practices
Architecting Secure Web Systems
National Cyber Range (Ranka)
IRJET- A Defense System Against Application Layer Ddos Attacks with Data Secu...
checkpoint
451 and Endgame - Zero breach Tolerance: Earliest protection across the attac...
Security and DevOps Overview
Ten Security Product Categories You've Probably Never Heard Of
Symantec Endpoint Suite
Ad

Similar to Secure design best practices and design patterns (20)

PDF
The 5 Layers of Security Testing by Alan Koch
PDF
The 5 Layers of Security Testing by Alan Koch
PPT
Security patterns and model driven architecture
PPTX
Security architecture design patterns iltam 2018 - ofer rivlin
PPTX
PPT
Secure Software Design and programming.ppt
PPT
Software Security in the Real World
PPTX
Ethical Hacking Conference 2015- Building Secure Products -a perspective
PPTX
Architecting for Security Resilience
PPTX
Ryan Elkins - Simple Security Defense to Thwart an Army of Cyber Ninja Warriors
KEY
Application Security Done Right
PPTX
Aligning Application Security to Compliance
PPT
Security_Updates_cybersecuirty ppt presentation.ppt
PDF
Security Checkpoints in Agile SDLC
PPTX
Security engineering 101 when good design & security work together
PDF
AppSec in an Agile World
PDF
An Introduction to Secure Application Development
PDF
OWASP Secure Coding Quick Reference Guide
PPTX
Web appsec and it’s 10 best SDLC practices
PDF
What Every Developer And Tester Should Know About Software Security
The 5 Layers of Security Testing by Alan Koch
The 5 Layers of Security Testing by Alan Koch
Security patterns and model driven architecture
Security architecture design patterns iltam 2018 - ofer rivlin
Secure Software Design and programming.ppt
Software Security in the Real World
Ethical Hacking Conference 2015- Building Secure Products -a perspective
Architecting for Security Resilience
Ryan Elkins - Simple Security Defense to Thwart an Army of Cyber Ninja Warriors
Application Security Done Right
Aligning Application Security to Compliance
Security_Updates_cybersecuirty ppt presentation.ppt
Security Checkpoints in Agile SDLC
Security engineering 101 when good design & security work together
AppSec in an Agile World
An Introduction to Secure Application Development
OWASP Secure Coding Quick Reference Guide
Web appsec and it’s 10 best SDLC practices
What Every Developer And Tester Should Know About Software Security
Ad

Recently uploaded (20)

PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
Essential Infomation Tech presentation.pptx
PDF
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Nekopoi APK 2025 free lastest update
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
AI in Product Development-omnex systems
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PPTX
L1 - Introduction to python Backend.pptx
PDF
Understanding Forklifts - TECH EHS Solution
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PDF
PTS Company Brochure 2025 (1).pdf.......
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
top salesforce developer skills in 2025.pdf
Wondershare Filmora 15 Crack With Activation Key [2025
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Essential Infomation Tech presentation.pptx
Adobe Premiere Pro 2025 (v24.5.0.057) Crack free
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Nekopoi APK 2025 free lastest update
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
AI in Product Development-omnex systems
How to Migrate SBCGlobal Email to Yahoo Easily
L1 - Introduction to python Backend.pptx
Understanding Forklifts - TECH EHS Solution
VVF-Customer-Presentation2025-Ver1.9.pptx
Softaken Excel to vCard Converter Software.pdf
EN-Survey-Report-SAP-LeanIX-EA-Insights-2025.pdf
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PTS Company Brochure 2025 (1).pdf.......
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
top salesforce developer skills in 2025.pdf

Secure design best practices and design patterns

  • 1. TRESEC MEETUP Secure design best practices and design patterns Henry Haverinen, February 5, 2019
  • 3. | © INSTA AVIATIONDEFENCE ANALYTICS CYBERRESPONSE AUTOMATION SOLUTIONS WORTH YOUR TRUST PROFITABLE GROWTH AND CONTINUITY GLOBAL AND LOCAL TECHNOLOGY AND PARTNER NETWORK C5ISR Training Systems & Simulation Secure Software Development AI, Advanced Analytics and Data Driven solutions for mobile machinery and process industry Partner for Security Aware Organizations SOC, Secure Identity, Network Security Next Generation Emergency Response Centers Virtual Control Room Automation and electrification solutions, lifecycle services Aviation technology solutions, services and lifecycle solutions UAV training, operation services SECURE DIGITALIZATION
  • 4. | © INSTA Henry Haverinen Leads technology and R&D at Intopalo Digital Software leader, SDL specialist, cybersecurity architect, product manager, SAFe 4 Certified Agilist, Doctor of Science (Technology) Connect with me on LinkedIn at https://www.linkedin.com/in/henryhaverinen/ About the speaker
  • 5. | © INSTA Outline Secure design best practices and design patterns – what are they? A few examples How to include them in the development process Discussion – How do you apply them? What would you recommend to try out?
  • 6. | © INSTA| © INSTA Secure design best practices
  • 7. | © INSTA Secure design best practices Rules of thumb on secure design Many best practices work on different levels: from system design to software design High level and simple A certain best practice might not apply to all situations. Different best practices may give contradicting advice. Adult supervision is recommended! You’ll also hear excuses and explanations that are not valid reasons to ignore secure design best practices. | 7
  • 8. | © INSTA Secure design best practices • Keep It Simple, Stupid (KISS) • Defense in depth • Attack surface reduction • Principle of least privilege • Use proven components and designs • No single points of failure • Complete mediation • Input validation and error handling • Good enough security • Data privacy design considerations • Fail safe and fail secure • Open design • Psychological acceptability • Secure by default • Separation of duties
  • 9. | © INSTA Attack surface reduction: • Turn off unnecessary functionality, ports, services etc. • Reduce the amount of code running • Reduce entry points available to untrusted users • Prefer a whitelist approach instead of blacklisting Attack surface reduction
  • 10. | © INSTA Attack surface reduction: • Turn off unnecessary functionality, ports, services etc. • Reduce the amount of code running • Reduce entry points available to untrusted users • Prefer a whitelist approach instead of blacklisting Example of using this practice – Remove all development time features, debug ports etc. or document their presence and the need to protect them. Examples of not following this practice – Allowing direct maintenance remote access with RDP or SSH to all individual hosts of the system, rather than implementing a separate intermediate host, so called “bastion host” or “jump host” Attack surface reduction
  • 11. | © INSTA Complete mediation: A software system that requires access checks to an object each time a subject requests access for objects; decreases the chances of mistakenly giving elevated permissions to the subject. • Explicit deny: any function that is not specifically authorized is denied by default. Complete mediation
  • 12. | © INSTA Complete mediation: A software system that requires access checks to an object each time a subject requests access for objects; decreases the chances of mistakenly giving elevated permissions to the subject. • Explicit deny: any function that is not specifically authorized is denied by default. Example of using this practice – the system does not rely on a previous access control check done at login time, but it performs an authorization check on every REST API call. Examples of not following this practice – The developer assumes a certain sequence of actions in a complex use case such as purchasing, and performs an authorization check only when the user starts the sequence Complete mediation
  • 13. | © INSTA| © INSTA Secure design patterns
  • 14. | © INSTA Secure design patterns There are certain problems that occur time after time in system architecture design and software design. A security design pattern is a general reusable solution to a commonly occurring problem. A commonly occuring design problem Design pattern: Problem description, solution description, example uses
  • 15. | © INSTA How to use a legacy component in a secure way? The Wrapper pattern – the problem
  • 16. | © INSTA Introduce a wrapper component that implements a well-tested secure interface. Invoke the legacy component only via the wrapper. Ensure that the wrapper cannot be invoked directly. Source: Kenneth van Wyk, Mark Graff, ”Secure Coding: Principles and Practices”, O’Reilly Media 2009 Example uses of this pattern – Wrapping a legacy command line application or a RESTful service. The Wrapper pattern External entity Without wrapper With wrapper Legacy Application Legacy Application External entity Wrapper
  • 17. | © INSTA A large program requires elevated privileges, which increases the attack surface. How can the impacts of a compromise be minimized? Distrustful decomposition – the problem
  • 18. | © INSTA Decompose the application into smaller mutually untrusting programs that need less privileges Pay attention to the parts that communicate with external entities Source: Secure Design Patterns, Technical report by Software Engineering Institute Example uses of this pattern – The qmail and Postfix mail systems use multiple processes. Distrustful decomposition Peer component 1 Without this pattern With this parttern Monolithic application Peer component 2 Peer component 1 Peer component 2 Interface 1 process Interface 2 process Internal processing (privileged)
  • 19. | © INSTA How to separate functionality that requries elevated privileges from functionality that does not require elevated privileges? How to take advantage of existing user verification and process separation functionalities available in the operating system? Defer to kernel – the problem
  • 20. | © INSTA Decompose the application into a basic client server architecture. The server runs with elevated privileges and uses existing kernel functionality to verify users. Examples: The Unix client-server program interface (UCSPI), Securable Objects on Windows. Source: Secure Design Patterns, Technical report by Software Engineering Institute Defer to kernel Client application External entity Server application OS Kernel (1) Request (2) User ID verification request (3) User ID verification results (4) Server response
  • 21. | © INSTA| © INSTA OK – so how do we use these in practice?
  • 22. | © INSTA How to make these concepts real for your team, idea 1/3 Start with training the team
  • 23. | © INSTA How to make these concepts real for your team, idea 2/3 Which best practices or patterns are relevant will depend on your team 1. Start with a small set of relevant best practices and patterns 2. Extend the set based on feedback, lessons learned, retros, incidents
  • 24. | © INSTA How to make these concepts real for your team, idea 3/3 Consider secure design reviews 1. Review whether the selected set of best practices have been followed (I have done this in practice and this seems to work) 2. Review whether it would have been useful to apply some of the selected secure design patterns (I haven’t tried this in pratice – I have some doubts of whether this would be useful) A security design review can produce trails of usage for compliance
  • 25. | © INSTA Discussion How do you apply secure design best practices and design patterns? Your recommendations? | 25