SECURITY IN
THE AGE OF FRAMEWORKS
LUKA KLADARIC // L@K.HR // @KLL
1 — FSec 2016
SECURITY IN THE AGE OF FRAMEWORKS LUKA KLADARIC // L@K.HR // @KLL - - PowerPoint PPT Presentation
SECURITY IN THE AGE OF FRAMEWORKS LUKA KLADARIC // L@K.HR // @KLL 1 FSec 2016 2 FSec 2016 ONCE UPON A TIME... 3 FSec 2016 WE WROTE OUR OWN CODE 4 FSec 2016 ALL OF IT. 5 FSec 2016 so we knew what was in it. we knew every
THE AGE OF FRAMEWORKS
LUKA KLADARIC // L@K.HR // @KLL
1 — FSec 2016ONCE UPON A TIME...
3 — FSec 2016WE WROTE OUR OWN CODE
4 — FSec 2016so we knew what was in it. we knew every little bit.
6 — FSec 2016Today we "know better" than to code everything from scratch
9 — FSec 2016So we rely on frameworks
10 — FSec 2016and libraries & a bunch of 3rd party code
11 — FSec 2016we outsource authentication...
12 — FSec 2016logging...
13 — FSec 2016database interaction...
14 — FSec 2016API connectivity...
15 — FSec 2016everything that isn't strictly unique to the problem we're solving
16 — FSec 2016this presents a RTFM problem
17 — FSec 2016How does this problem manifest itself?
18 — FSec 2016Story time! (Demo 1)
19 — FSec 2016Example Co builds their first webapp > an internal dashboard at control.example.com > authentication?
20 — FSec 2016But if the servers only ever see HTTP, how will they know about HTTPS?
24 — FSec 2016Spoiler: they won't (not by default anyway)
25 — FSec 2016What we'd like to see
26 — FSec 2016Fixes: > respect X-Forwarded-Proto header
29 — FSec 2016watch out for various components treating security headers differently
30 — FSec 2016> SSL config change triggers audit
31 — FSec 2016> remove http from oauth whitelist
32 — FSec 2016> HSTS headers1
1 HTTP Strict Transport Security 33 — FSec 2016difficult to catch, browsers don't report this as bad behavior
34 — FSec 2016Story time! (Demo 2)
35 — FSec 2016if you've ever set up oAuth
38 — FSec 2016for multiple apps
39 — FSec 2016against the same provider
40 — FSec 2016... did you bother setting up separate oAuth clients?
41 — FSec 2016yeah.
42 — FSec 2016Story time! (demo 3)
44 — FSec 2016How is cookie signed
46 — FSec 2016Flask
47 — FSec 2016Django
48 — FSec 2016SECRET_KEY being configured badly is next to impossible to catch
51 — FSec 2016All of these combined mean:
52 — FSec 2016spear phishing vector
53 — FSec 2016privilege escalation
54 — FSec 2016forced insecure comms
55 — FSec 2016attacker traffic indistinguishable from regular traffic
56 — FSec 2016the LB here isn't to blame
57 — FSec 2016people have ancient bookmarks pointing to http
58 — FSec 2016ALL THINGS BEING EQUAL BUT RUNNING ON A SINGLE MACHINE THIS WOULD STILL BE A VULNERABLE SETUP
59 — FSec 2016Story time! (Demo 4)
61 — FSec 2016CSRF protection disabled
IT COMES WITH THE THING LEAVE CSRF PROTECTION ALONE
63 — FSec 2016UNDERSTAND THE STUFF YOU USE BETTER.
64 — FSec 2016BE MORE VIGILANT WITH CODE REVIEWS
ON SECURITY-IMPACTING STUFF
65 — FSec 2016BRING IN A FRESH PAIR OF EYES
EVERY ONCE IN A WHILE
66 — FSec 2016This talk is not an endorsement to roll everything yourself.
67 — FSec 2016LUKA KLADARIC // L@K.HR // @KLL
68 — FSec 2016