@vixentael
mln records
0
360
720
1,080
1,440
1,800
February April June August October December February
https://www.itgovernance.co.uk/blog/category/cyber-security/
Million of records leaked per month
2018/2019
Slide 22
Slide 22 text
@vixentael
mln records
0
360
720
1,080
1,440
1,800
February April June August October December February
https://www.itgovernance.co.uk/blog/category/cyber-security/
Million of records leaked per month
2018/2019
@vixentael
https://www.wired.com/story/2018-worst-hacks-so-far/
credentials
geo-locations
health data
financial data
kids locations
cars remote control
sex toys remote control
Slide 25
Slide 25 text
@vixentael
Most large leaks are caused
by poor architectural decisions.
Slide 26
Slide 26 text
@vixentael
wrong assumptions and trust models
no tests / penetration tests
lack of understanding the data life cycle
GTD / speed
Why?
Slide 27
Slide 27 text
@vixentael
Sensitive Data
Life Cycle
Slide 28
Slide 28 text
@vixentael
is any kind of data, that will break
business objectives or prosperity of those
who use data, if leaked.
Sensitive data –
Slide 29
Slide 29 text
@vixentael
Sensitive data depends on business
personally identifiable information (PII)
device logs and application data
medical & finance data
likes & preferences
…
https://www.cossacklabs.com/blog/what-we-need-to-encrypt-cheatsheet.html
Slide 30
Slide 30 text
@vixentael
Secure development
lifecycle methodology
MS SDL
OWASP S-SDLC
www.microsoft.com/en-us/sdl
www.owasp.org/index.php/
OWASP_Secure_Software_Development_
Lifecycle_Project
Risk evaluation
Risk assessment
Threat model
Security plan
Secure coding
Security verification
Secure operations
Incident response
Slide 31
Slide 31 text
@vixentael
web
frontend
users &
orders
mobile
frontend
web
admin
prediction
service
3rd party
analytics
items
payment
service
orders
processing
logistics API
user actions
analytics
layout
Slide 32
Slide 32 text
@vixentael
web
frontend
users &
orders
mobile
frontend
web
admin
prediction
service
3rd party
analytics
items
payment
service
orders
processing
logistics API
user actions
analytics
flow
Slide 33
Slide 33 text
@vixentael
web
frontend
users &
orders
mobile
frontend
web
admin
prediction
service
3rd party
analytics
items
payment
service
orders
processing
logistics API
user actions
analytics
actions
i
i
o o
p
i
p s
s
input processing
storage
output
p
Slide 34
Slide 34 text
@vixentael
Data classification
more sensitive / less sensitive
valued for users / for business
regulated / non-regulated
at rest / in motion
available for users / admins / support
Slide 35
Slide 35 text
@vixentael
data leakage,
tampering,
unauthorized
access
reputation risks
legal responsibility
financial damage
Risks to data
Slide 36
Slide 36 text
@vixentael
Data classification
users PII users payments
items description
sales schedule
financial reports
users preferences orders history
conversion analytics
TLS certs AWS access
staff accounts
login history
db access
company accounts
Slide 37
Slide 37 text
@vixentael
Data classification
users PII
users payments
items description
sales schedule
financial reports
users preferences
orders history
conversion analytics
TLS certs
AWS access
staff accounts
login history
db access
company accounts
u
p
$
t
u’
i
Slide 38
Slide 38 text
@vixentael
web
frontend
users &
orders
mobile
frontend
web
admin
prediction
service
3rd party
analytics
items
payment
service
orders
processing
logistics API
user actions
analytics
kinds of data
i
i
o o
p
i
p s
s
u
u
p
$
$
$
p
u
t $
u u’
i
u
p
Slide 39
Slide 39 text
@vixentael
Can we protect
everything everywhere?
Slide 40
Slide 40 text
@vixentael
– No.
Can we protect
everything everywhere?
Slide 41
Slide 41 text
@vixentael
Can we protect
everything everywhere?
– No.
– Risks impact
– Trust and threats
– Attack vectors
prioritization
Slide 42
Slide 42 text
@vixentael
Trust model (per node)
1. What kind of data it operates?
Slide 43
Slide 43 text
@vixentael
Trust model (per node)
1. What kind of data it operates?
2. Do we trust/control this node?
Slide 44
Slide 44 text
@vixentael
Trust model (per node)
1. What kind of data it operates?
2. Do we trust/control this node?
3. If needs sensitive plaintext, who stores the keys?
Slide 45
Slide 45 text
@vixentael
Trust model (per node)
1. What kind of data it operates?
2. Do we trust/control this node?
3. If needs sensitive plaintext, who stores the keys?
4. What are security controls?
Slide 46
Slide 46 text
@vixentael
web
frontend
users &
orders
mobile
frontend
web
admin
prediction
service
3rd party
analytics
items
payment
service
orders
processing
logistics API
user actions
analytics
trust model
☠
☠
☠
⚠
❇
⚠
⚠
⚠
⚠
⚠ ⚠
Slide 47
Slide 47 text
@vixentael
Trust model helps to understand
where to implement proper
security controls that prevent risks.
Slide 48
Slide 48 text
@vixentael
Security control –
a practical implementation of risk prevention
technique in your code and infrastructure.
Reactive:
- detect incident
- correct / limit damage
Proactive:
- prevent risk
Slide 49
Slide 49 text
@vixentael
Proactive controls
Data security encryption
Access security authentication, firewalls, OS
Node security
firewalls,
compartmentalization, OS
@vixentael
1. Identify sensitive data, understand sensitive data
lifecycle, classify data.
2. Identify risks to data.
3. Build trust model, understand risk impact.
4. Prioritize risk vectors.
5. Select and implement proper security controls for
exploitable high risk vectors (to prevent risks and to
identify leaks).
Infrastructural data protection 101
Slide 53
Slide 53 text
@vixentael
Principle of least privilege
(secure by default)
Slide 54
Slide 54 text
No content
Slide 55
Slide 55 text
@vixentael
Patterns
Slide 56
Slide 56 text
@vixentael
“Everyone Knows
Everything”
Slide 57
Slide 57 text
@vixentael
“Everyone Knows Everything”
1. Many components, everyone has access to database via
same API.
2. API without auth (brute-force ID to get info about objects).
3. Storing plaintext data.
4. Transferring back and forth all data (aka large JSON).
5. Transfer data in plaintext inside infrastructure.
6. Storing all data in the same place.
7. Logging everything (including secrets).
8. No monitoring for non-legit access.
@vixentael
1. Pseudonymization.
2. Anonymization.
3. Minimize lifecycle and scope.
“Narrowing and controlling trust”
% Limit data:
Slide 62
Slide 62 text
@vixentael
4. Don’t store all data in one place.
5. Don’t send all data if only some piece
needed.
“Narrowing and controlling trust”
% Limit data:
Slide 63
Slide 63 text
@vixentael
1. Encrypt data for exact use-case (to be
accessible by specific users/systems).
2. Store keys in trusted zone (KMS, Vault).
3. Proper key management: rotate, revoke,
backup.
“Narrowing and controlling trust”
& Encrypt data:
Slide 64
Slide 64 text
@vixentael
1. Separate API for each app.
2. Session handling, session expiration.
3. Encrypt transport inside network.
“Narrowing and controlling trust”
' Protect transport:
https://www.cossacklabs.com/avoid-ssl-for-your-next-app.html
Slide 65
Slide 65 text
@vixentael
1. Access to critical data.
2. Access to keys.
3. Unusual behavior.
4. Honey pots / honey tokens.
“Narrowing and controlling trust”
( Monitor everything:
@vixentael
ZKA is a design principle that enables
software to provide services over
protected client data without having an
unencrypted access to it.
“Zero Knowledge Architecture”
@vixentael
% all operations on encrypted data:
– CRUD
– control access to data from different users
– search (in encrypted data)
“Zero Knowledge Architecture”
$ E2EE clients
Slide 71
Slide 71 text
@vixentael
authentication
“Zero Knowledge Architecture”
data collaboration
messaging
https://www.cossacklabs.com/zero-knowledge-protocols-without-magic.html
Slide 72
Slide 72 text
@vixentael
Zero Knowledge
Architecture
Narrowing and
Controlling Trust
Everyone Knows
Everything
Slide 73
Slide 73 text
@vixentael
Tips, tricks, tools
Slide 74
Slide 74 text
@vixentael
Cover maximum risks using
minimum tools and processes.
Add details when system evolves.
Slide 75
Slide 75 text
@vixentael
Control and monitor perimeter.
Control and monitor intranet: between
networks, between hosts.
IDS & HIDS.
Firewalls / IDS
Slide 76
Slide 76 text
@vixentael
WAF
database firewalls
SQL firewalls
Data firewalls
Slide 77
Slide 77 text
@vixentael
Acra
https://github.com/cossacklabs/acra
Green SQL
https://github.com/larskanis/greensql-fw
Hexatier
http://www.hexatier.com/
Oracle database
firewall / TDE
http://www.oracle.com/
Data firewalls
Slide 78
Slide 78 text
@vixentael
Acra – Oracle for Postgres/MySQL
cossacklabs.com/acra/
github.com/cossacklabs/acra/
marketplace.digitalocean.com/apps/acra
Slide 79
Slide 79 text
@vixentael
SIEM
Aggregate logs into single point for
further analysis:
Triggers on leaking assets.
Triggers on typical attacks.
Correlation analysis.
Slide 80
Slide 80 text
@vixentael
Audit logs
On every access to sensitive data.
Non-falsiable.
Easy-to-analyze.
https://cloud.google.com/logging/docs/audit/
Slide 81
Slide 81 text
@vixentael
At rest encryption.
Separated encryption and decryption.
Use different keys for different clients.
Data encryption
Slide 82
Slide 82 text
@vixentael
Encryption libraries should
★ use strong & audited crypto
★ work everywhere
★ hide cryptographic details
★ be hard to mis-use
★ have integration with key storage
@vixentael
Data in motion protection
Well-configured TLS and
suitable per-usecase protocols.
Slide 85
Slide 85 text
@vixentael
Data in motion protection / TLS
private keys RSA-2048, ECDSA-256
obtain certificate from reliable CA
TLS v1.3-v1.2
use secure cipher suites
TLS_ECDHE_ECDSA_WITH_AES_2
56_GCM_SHA384
✅ enable Forward Secrecy
✅ enable HSTS (web)
github.com/ssllabs/research/wiki/SSL-and-TLS-
Deployment-Best-Practices
Rotate certificates often
Slide 86
Slide 86 text
@vixentael
Data in motion protection / protocols
axolotl
themis
noise
github.com/cossacklabs/themis
noiseprotocol.org
github.com/whispersystems/libsignal-protocol-c
Slide 87
Slide 87 text
@vixentael
Hermes
https://github.com/cossacklabs/hermes-core
ZeroKit
https://tresorit.com/zerokit
E2EE for data collaboration
Slide 88
Slide 88 text
@vixentael
Honey pots
fake sensitive data records
fake accounts
vulnerable nodes with open ports
fake API calls / API tokens / keys
+ triggers
}
https://hackernoon.com/poison-records-acra-eli5-d78250ef94f
@vixentael
1. Identify sensitive data, understand sensitive data
lifecycle, classify data.
2. Identify risks to data.
3. Build trust model, understand risk impact.
4. Prioritize risk vectors.
5. Select and implement proper security controls for
exploitable high risk vectors (to prevent risks and to
identify leaks).
Infrastructural data protection 101
Slide 92
Slide 92 text
@vixentael
It is secure.
It’s not broken yet.
Slide 93
Slide 93 text
Home reading :)
https://medium.com/@kshortridge/security-as-a-product-83a78c45ca27
Security as a Product
https://samnewman.io/talks/insecure-transit-microservice-security/
Insecure Transit - Microservice Security
https://medium.com/@cossacklabs/12-and-1-ideas-how-to-enhance-backend-data-security-4b8ceb5ccb88
12 and 1 ideas how to enhance backend data security
https://medium.freecodecamp.org/preventing-leaks-and-injections-in-your-database-be3743af7614
How to prevent database leaks and injections
Slide 94
Slide 94 text
My other security slides
github.com/vixentael/
my-talks
Slide 95
Slide 95 text
@vixentael
product engineer in security
and cryptography
OSS maintainer: Themis, Acra
cryptographic tools, security
consulting, training