Designing stack agnostic, modern, secure architectures Eugene - - PowerPoint PPT Presentation

designing stack agnostic modern secure architectures
SMART_READER_LITE
LIVE PREVIEW

Designing stack agnostic, modern, secure architectures Eugene - - PowerPoint PPT Presentation

Designing stack agnostic, modern, secure architectures Eugene Pilyankevich, Chief Technical Officer, Cossack Labs #whoami / Speaker intro Infosec since mid-90s. Designed, supervised development of banking data processing, risk


slide-1
SLIDE 1

Designing stack agnostic, modern, secure architectures

Eugene Pilyankevich,

Chief Technical Officer, Cossack Labs

slide-2
SLIDE 2

#whoami / Speaker intro

  • Infosec since mid-90s.
  • Designed, supervised development of banking data processing,

risk management DSS, cryptographic libraries, high-load services.

  • Protected some state secrets, banking data, critical

infrastructures, patient records, transactions and payment data.

  • CTO, co-founder at Cossack Labs - data security solutions

provider (www.cossacklabs.com)

  • Life-long interest in how big systems fail and stand against failure.
slide-3
SLIDE 3

Designing stack agnostic, modern, secure architectures

slide-4
SLIDE 4

stack agnostic, modern, secure

Sounds a bit like CAP theorem, isn’t it?

slide-5
SLIDE 5
  • 1. Stack agnostic = Architecture that is not limited with certain

implementations or availability of certain types of infrastructure;

Sounds a bit like CAP theorem, isn’t it?

slide-6
SLIDE 6
  • 1. Stack agnostic = Architecture that is not limited with certain

implementations or availability of certain types of infrastructure;

  • 2. Modern = Architecture that enables modern design

approaches and addresses modern, relevant risks and threat models;

Sounds a bit like CAP theorem, isn’t it?

slide-7
SLIDE 7
  • 1. Stack agnostic = Architecture that is not limited with certain

implementations or availability of certain types of infrastructure;

  • 2. Modern = Architecture that enables modern design

approaches and addresses modern, relevant risks and threat models;

  • 3. Secure = Resilient against chosen risks;

Sounds a bit like CAP theorem, isn’t it?

slide-8
SLIDE 8
  • 1. Stack agnostic
  • 2. Modern
  • 3. Secure

SA + M + S

slide-9
SLIDE 9

How do we get to SA + M + S ?

Step 1. Understand goals of security architecture, why do we need it, what is the value and the benefit? Step 2. Understand necessary design and implementation steps in practical context. Step 3. Understand and overcome limitations during both design and implementation.

slide-10
SLIDE 10

How do we get to SA + M + S ?

Part 1. Why do we need security architectures? Why can’t we just build ISMS or just address OWASP Top 10? Part 2. Building blocks of security architecture. Risk management, attack surface, balancing tradeoffs. Part 3. Typical approaches to resolving conflicts and

  • vercoming limitations while preserving SA, M & S.
slide-11
SLIDE 11

Why we need security architecture?

WHY? WHY?

slide-12
SLIDE 12

Let’s start with a story.

slide-13
SLIDE 13

Not an easy target

ISO 27000 A+ rating in banking security compliance Annual audits and frequent pentests … in 2008 we pretty much ahead of the game, we thought.

slide-14
SLIDE 14

Perfect user fraud prevention solution.

  • Cookie / Session / IP binding
  • Concurrent session matching
  • Concurrent query analysis
  • Rate limiting
  • Terms of service enforcement
  • Browser fingerprinting
  • Complex JS wizardry

Defenders Attackers Yeah, right, let’s see what they came up with now.

slide-15
SLIDE 15

Perfect user fraud prevention solution.

  • Cookie / Session / IP binding
  • Concurrent session matching
  • Concurrent query analysis
  • Rate limiting
  • Terms of service enforcement
  • Browser fingerprinting
  • Complex JS wizardry
  • Charge customers per request
  • Void abuser’s contracts

Defenders Attackers

😠

slide-16
SLIDE 16

Perfect user fraud prevention solution.

  • Cookie / Session / IP binding
  • Concurrent session matching
  • Concurrent query analysis
  • Rate limiting
  • Terms of service enforcement
  • Browser fingerprinting
  • Complex JS wizardry
  • Charge customers per request
  • Void abuser’s contracts

Defenders Attackers Account misuse and fraud drop below 5% within 180 days.

slide-17
SLIDE 17

Perfect user fraud prevention solution.

  • Cookie / Session / IP binding
  • Concurrent session matching
  • Concurrent query analysis
  • Rate limiting
  • Terms of service enforcement
  • Browser fingerprinting
  • Complex JS wizardry
  • Charge customers per request
  • Void abuser’s contracts

Defenders ”Prevent it with more code” – engineer’s decision.

👉

slide-18
SLIDE 18

Perfect user fraud prevention solution.

  • Cookie / Session / IP binding
  • Concurrent session matching
  • Concurrent query analysis
  • Rate limiting
  • Terms of service enforcement
  • Browser fingerprinting
  • Complex JS wizardry
  • Charge customers per request
  • Void abuser’s contracts

Defenders ”Prevent it with more code” – engineer’s decision.

👉

”Prevent it closer to the risks” – manager’s decision

👉

slide-19
SLIDE 19

Now prevent injections on public front

  • Input sanitization: front-end
  • Input sanitization: back-end
  • mod.security config with 2K LOC
  • f custom rules.

Defenders Attackers The front-end is written in PHP, yeah right.

slide-20
SLIDE 20

Now prevent injections on public front

  • Input sanitization: front-end
  • Input sanitization: back-end
  • mod.security config with 2K LOC
  • f custom rules.
  • Prepared statements.
  • Materialized views.
  • Domain model, 4-layer validation.

Defenders Attackers Why it stopped failing in new funny ways now?

slide-21
SLIDE 21

Now prevent injections on public front

  • Input sanitization: front-end
  • Input sanitization: back-end
  • mod.security config with 2K LOC
  • f custom rules.
  • Prepared statements.
  • Materialized views.
  • Domain model, 4-layer validation.

Defenders Security engineer’s decision.

👉

slide-22
SLIDE 22

Now prevent injections on public front

  • Input sanitization: front-end
  • Input sanitization: back-end
  • mod.security config with 2K LOC
  • f custom rules.
  • Prepared statements.
  • Materialized views.
  • Domain model, 4-layer validation.

Defenders Security engineer’s decisions.

👉

System architect’s decisions.

👉

slide-23
SLIDE 23
  • Equifax.
  • Heartland Payment Systems.
  • JP Morgan.
  • RSA Security.
  • Operation Aurora victims:

Google, Juniper, other non- confirmed high-profile targets.

Why do large companies struggle with this?

slide-24
SLIDE 24
  • “Big companies are hard, big infrastructures are harder to

enforce good policies in”

  • “Unexpected attack vector under novel threat model

accompanied with forces we were not yet prepared to meet”

Why do large companies struggle with this?

slide-25
SLIDE 25
  • “Big companies are hard, big infrastructures are harder to

enforce good policies in”

  • “Unexpected attack vector under novel threat model

accompanied with forces we were not yet prepared to meet”

  • On a long enough timeline, the survival rate for everyone

drops to zero

Why do large companies struggle with this?

slide-26
SLIDE 26
  • “Big companies are hard, big infrastructures are harder to

enforce good policies in”

  • “Unexpected attack vector under novel threat model

accompanied with forces we were not yet prepared to meet”

  • On a long enough timeline, the survival rate for everyone

drops to zero

  • ¯\_(ツ)_/¯

Why do large companies struggle with this?

slide-27
SLIDE 27

WHY?

1/5

slide-28
SLIDE 28

Humans are unpredictable Technology is broken Poor design decisions

slide-29
SLIDE 29

Humans are unpredictable Technology is broken Poor design decisions

slide-30
SLIDE 30

WHY?

2/5

slide-31
SLIDE 31

”How to get this security goal done and that security concern eliminated?”

Poor design decisions

slide-32
SLIDE 32

WHY?

3/5

slide-33
SLIDE 33

Has negative business value* Is hard to grok* Is confusing and contradictory* Security…

slide-34
SLIDE 34

Has negative business value* Is hard to grok* Is confusing and contradictory* Security…

Unle less you’re emp mplo loyed in in the he in infosec in industry, , whe here it it gets eve ven worse.

slide-35
SLIDE 35

WHY?

4/5

slide-36
SLIDE 36

You never know if something is secure or not

slide-37
SLIDE 37

You never know if something is secure or not … until it’s broken.

slide-38
SLIDE 38

You never know if something is secure or not … until it’s broken. Then it’s definitely not secure.

slide-39
SLIDE 39

Known Known Known Unknown Unknown Known Unknown Unknown 4 types of knowing

slide-40
SLIDE 40

Known Known Known Unknown Unknown Known Unknown Unknown 4 types of knowing

slide-41
SLIDE 41

4 types of knowing in security Confusion Doubt Fear Risk aversion

slide-42
SLIDE 42

WHY?

5/5

slide-43
SLIDE 43

In absence of clear mental model people make poor decisions about risky and complex systems because risk brings affect & bias. Thinking about 100 things at the same time is quite frustrating. In absence of well-communicated design principles and acceptance criteria mind is prone to emotional affect. Ability to think systems and ability to think risk is quite domain-specific if you’re not conscious about it.

slide-44
SLIDE 44

People make more mistakes about risky things under pressure in absence of simple guiding principle.

slide-45
SLIDE 45
slide-46
SLIDE 46

Remember story I started with?

Manager’s decisions. Security engineer’s decisions. Software engineer’s decisions. System architect’s decisions.

🤕

slide-47
SLIDE 47

Remember story I started with?

Manager’s decisions. Security engineer’s decisions. Software engineer’s decisions. System architect’s decisions. What is bad for us? How to prevent that “bad”? What my stack suggest to do? What is the right systematic way?

slide-48
SLIDE 48

Remember the giants?

ht https://cloud ud.google.com/ m/beyo yond ndcorp/ #r #res esea earchPa Paper ers

Google: r revised t the AC a architecture.

slide-49
SLIDE 49

Security architecture 101: Intro 👊

slide-50
SLIDE 50
  • 1. Prevent damage to business
  • 2. Manage risks cost-efficiently

We want understandable and implementable decision system that allows us to:

Goals of security architecture?

slide-51
SLIDE 51

Combination of security decisions. What is security architecture?

slide-52
SLIDE 52

Combination of security decisions, which makes actual system’s risks manageable. What is security architecture?

slide-53
SLIDE 53

Combination of security decisions, which makes actual system’s risks manageable in a chosen manner, efficiently. What is security architecture?

slide-54
SLIDE 54

Combination of security decisions, which makes actual system’s risks manageable in a chosen manner, efficiently, while maintaining all other quality attributes of a system on acceptable level. What is security architecture?

slide-55
SLIDE 55
  • Understand and manage the risks
  • Understand and manage attack surface
  • Balance tradeoffs

How to design the security architecture?

slide-56
SLIDE 56

Before we do these three things, security effort is just re-painting this door in fancy colors.

slide-57
SLIDE 57

Security architecture 101: Intro Understanding risks 👊

slide-58
SLIDE 58

Building secure architecture is similar to building scalable and resilient architecture. It’s the set of risks that is different, but the approach is the same – you design against the chosen valid risks for you.

slide-59
SLIDE 59 https://ivychapel.ink/posts/two-types-of-engineering-for-resiliency/

NASA US Navy You?

slide-60
SLIDE 60

Risk should be:

Measured Managed

slide-61
SLIDE 61

Risk should be:

Measured Managed Quantitatively Adequately

slide-62
SLIDE 62

Appetite/governance Assessment Treatment Acceptance Identification Monitoring Mitigation

slide-63
SLIDE 63

Questions:

  • What is more important to protect and how? Why?
  • Should we spend more on this or on that?

Valuable approaches:

  • OWASP RAF
  • FAIR
  • NIST RMF

Risk management

  • COBIT 5
  • OCTAVA
slide-64
SLIDE 64

Risks ~ Problem probability Probable damage

slide-65
SLIDE 65

Remember: One in a million is next Tuesday.

https://blogs.msdn.microsoft.com/larryosterman/2004/03/30/one-in-a-million-is-next-tuesday/
slide-66
SLIDE 66

Security architecture 101: Intro Understanding risks Understanding attack surface 👊

slide-67
SLIDE 67

Understanding attack surface

Your sensitive assets

Bad people

👼

Bad people

👼

slide-68
SLIDE 68

Understanding attack surface

Attack surface

slide-69
SLIDE 69

Attack Surface is every possible way attacker can induce chosen type of loss to your system.

Understanding attack surface

slide-70
SLIDE 70

Instead of “protecting every system”, you can to focus on protecting the attack surface. Attack surface is your friend

slide-71
SLIDE 71
  • Attackers look for assets.
  • Defenders protect boxes.

Understanding attack surface

slide-72
SLIDE 72
  • Attackers look for assets.
  • Defenders protect boxes.

Understanding attack surface

  • Attackers think in graphs.
  • Defenders think in lists.
slide-73
SLIDE 73
  • Attackers look for assets.
  • Defenders protect boxes.

Understanding attack surface

  • Attackers think in graphs.
  • Defenders think in lists.

Not prioritized by risk L Prioritized by damage L

slide-74
SLIDE 74

Note: An unfair asymmetry

  • To win against attacker, you need to ensure that every vector
  • n attack surface is protected.
  • Attacker to win against you, needs to find one (in worst case

several) unprotected attack vectors.

slide-75
SLIDE 75
  • Assessing attack surface.
  • Minimizing attack surface.
  • Controlling attack surface.
  • Monitoring attack surface.
  • Drills.

Managing attack surface

slide-76
SLIDE 76

Security architecture 101: Intro Understanding risks Attack surface Balancing tradeoffs 👊

slide-77
SLIDE 77
slide-78
SLIDE 78

Risk impact Cost Balancing tradeoffs

slide-79
SLIDE 79

Risk impact Cost Usability Balancing tradeoffs

slide-80
SLIDE 80

Risk impact Cost Usability Maintainability Balancing tradeoffs

slide-81
SLIDE 81

Risk impact Cost Usability Maintainability Flexibility Balancing tradeoffs

slide-82
SLIDE 82
  • This is not A vs B relationship: security + usability.

Balancing tradeoffs

slide-83
SLIDE 83
  • This is not A vs B relationship: security + usability.
  • Pick your battles – you can’t have all NFRs in a perfect shape.

Balancing tradeoffs

slide-84
SLIDE 84
  • This is not A vs B relationship: security + usability.
  • Pick your battles – you can’t have all NFRs in a perfect shape.
  • Seek solutions that have:

Both acceptable risk impact and acceptable baseline qualities for all NFRs.

Balancing tradeoffs

slide-85
SLIDE 85

Designing for security:

understanding and overcoming limitations

slide-86
SLIDE 86

In theory, there is no difference between theory and practice. In practice, there is.

Yogi Berra, New York Yankees, catcher, coach and manager

slide-87
SLIDE 87

Attack surface is always too big.

slide-88
SLIDE 88

Attack surface is always too big.

  • Real attack surface is always just crazy big.
  • Variety of technologies, tools and assets is crazy big.
  • The only thing that is not crazy big?
  • Staff and security budget.
slide-89
SLIDE 89

Attack surface is always too big.

  • Example: two power grid monitoring efforts.

Humongous limitations, mad scale, bad legacy. … security?

slide-90
SLIDE 90

Attack surface is always too big.

  • Example: optimizing SIEM coverage.

Need more signals, got less eyes. Review risk model and decrease the scope (for real).

slide-91
SLIDE 91

Prioritize! You can’t fix everything.

slide-92
SLIDE 92

Prioritize! You can’t fix everything. Choose your battles.

slide-93
SLIDE 93

Is it secure? Trust levels

1. Ultimate “secure”. 2. Nothing is “provably secure” in absolute terms. 3. Raising the bar, raising cost 4. Controlling attack flow.

slide-94
SLIDE 94

Sometimes requirements conflict with each other!

slide-95
SLIDE 95

Conflicts arise when each problem / risk has separate solution / control. Conflicts disappear when solutions in system address root causes of problems and risks.

https://ivychapel.ink/posts/on-avoiding-band-aid-security/
slide-96
SLIDE 96
  • Example: optimizing SIEM coverage.

Data leakage through audit logs.

slide-97
SLIDE 97
  • Example: optimizing SIEM coverage.

Data leakage through audit logs. PCI logging requirements vs GDPR requirements.

slide-98
SLIDE 98
  • Example: optimizing SIEM coverage.

Data leakage through audit logs. PCI logging requirements vs GDPR requirements. Logs are data as well.

slide-99
SLIDE 99
  • Example: optimizing SIEM coverage.

Data leakage through audit logs. PCI logging requirements vs GDPR requirements. Logs are data as well. Should we protect them?

slide-100
SLIDE 100

No requirements = infinite rabbit hole.

slide-101
SLIDE 101

Things you don’t need (yet) to succeed

slide-102
SLIDE 102

You don’t need most of security tools (yet).

slide-103
SLIDE 103

You don’t need most of security tools (yet). That’s just more attack surface.

slide-104
SLIDE 104

You don’t need most of security tools (yet). That’s just more attack surface. And more complexity.

slide-105
SLIDE 105
slide-106
SLIDE 106

Good architecture is both decision framework and design guide. It not

  • nly addresses the risks, it reduces

complexity.

slide-107
SLIDE 107

If you’re focused on the risks and attack surface of sensitive assets, technology and stack is rarely an issue.

slide-108
SLIDE 108

Example: IAM + SSO + Zero Trust on top of legacy AD/LDAP system with a dozen of applications you can’t mostly update.

slide-109
SLIDE 109

Recap

slide-110
SLIDE 110

Combination of security decisions, which makes actual system’s risks manageable in a chosen manner, efficiently, while maintaining all other quality attributes of a system on acceptable level. What is security architecture?

slide-111
SLIDE 111

Set of high-level decisions that simplify security choices, yet drive it in the right direction in coordinated way. What is security architecture? TL;DR:

slide-112
SLIDE 112
  • Risk management:
  • Attack surface management:
  • Balance tradeoffs:

SA + M + S M + S SA + S

How to design a security architecture?

slide-113
SLIDE 113

Design against risks Choose your battles wisely Remove conflicts

How to design a security architecture?

  • Risk management:
  • Attack surface management:
  • Balance tradeoffs:
slide-114
SLIDE 114

Business, tech decisions Tech, architecture decisions Architecture decisions

How to design a security architecture?

  • Risk management:
  • Attack surface management:
  • Balance tradeoffs:
slide-115
SLIDE 115

There are various directions for security improvement:

  • Improve risk management / risk posture.
  • Add security controls and tools.
slide-116
SLIDE 116

Security architecture enables systematic risk treatment that is informed by both to make implementation fit both engineering and business FRs and NFRs.

slide-117
SLIDE 117

Thank you!

cossacklabs.com / ivychapel.ink / 9gunpi