SlideShare a Scribd company logo
1 of 34
Started In Security
Now I’m Here
Christopher Grayson (OSCE)
Tales from a hacker-turned-code-monkey
INTRODUCTION
3
WHOAMI
4
What Are We Talking About?
• A journey from security to software
• Going from software to security seems to be
more common
• No formal development training, so lots of
“learning opportunities”
5
Why Are We Talking About It?
• Differences in perspective yield valuable
lessons
• The security field has a problem w/ only
chatting amongst themselves
• I want my headaches to prevent similar
headaches for my colleagues
6
Agenda
1. My Background
2. Core Security Concepts
3. Lessons Learned
4. Security Regression
5. Conclusion
A BIT OF BACKGROUND
8
It All Started With Mega Man X
• Parents in IT and psychology, raised a white-hat
hacker
• Mega Man X was my first teacher
• Starcraft map editor was my first exposure to
coding
• I thought I wanted to be a video game
developer
9
“Professional” Life And Beyond
• Brief stint in development at a marketing
company
• Landed a job as a research scientist on a DARPA
contract
• Got into security through a student org
• Broke into all the things, noticed a sorely
missing capability, left to build it
10
Web Sight High-level Architecture
• Massive, scalable data gathering platform
• Back-end written in Python, front-end in
Angular 2 (yay Typescript)
• Uses Redis, PostgreSQL, RabbitMQ, Celery,
Elasticsearch, Django Rest Framework
• Deployed in EC2, has been deployed on DO
• Used to use Docker
SECURITY CONCEPTS
12
Definitions Of Hacking
Give me a set of rules, and I’ll follow those rules and
accomplish something they weren’t meant to allow.
Finding the difference between what something was made to
do and what something can do.
- lavalamp
- xray
13
Principle Of Least Privilege
…in a particular abstraction layer of a computing
environment, every module must be able to access only the
information and resources that are necessary for its
legitimate purpose.
- Wikipedia
• Obvious
• Deceptively difficult
• Halting problem!
• Common causes for violation:
• Scope creep
• Unknown framework functionality
• Definition of hacking
14
OWASP Top 10
• Open Web Application Security Project
• Maintains a list of most common web
vulnerabilities by year
• Rarely changes year-to-year
• Common vulns we may touch on:
• Cross-site Scripting (XSS)
• Cross-site Request Forgery (CSRF)
• SQL Injection (SQLI)
<div></div><script>Alert(’Hi’);</script>
15
The Problem Of Injection / Data Confusion
• Many vulnerabilities can be tied to software confusing data for control
characters or packaging
• SQL Injection • Template Injection • Cross-site Scripting
userId = 1;
Expected
userId = 1 or 1=1;
Actual
$sql = “select * from users where userId =
“ . $_GET[“userId”] + “;”;
$result = mysql_query($sql);
Code
select * from users where userId = 1 or
1=1;
Result
user_name = “chris”
Expected
user_name = “{{ 2 + 2 }}”
Actual
template = “Hello there %s” % user_name
r_template = Template(template)
Code
Hello there {{ 2 + 2 }}
Result
user_name = “chris”
Expected
User_name =
“</div><script>Alert(‘Hi’);</script>”
Actual
<div> Hello {{user_name}} </div>
Code
Result
16
Fail Open vs. Fail Closed
• ”Fail closed” refers to a situation in which,
when an error occurs, execution is halted.
• ”Fail open” would instead allow processing to
continue.
• Security professionals love fail closed
• Software developers tend to prefer fail open
17
Complexity vs. Security
• At a theoretical level, complexity and security
have a strong inverse relationship
• Put simply, the more complex something is the
more difficult it is to secure
• Keep It Simple Stupid (KISS) has implications
for both ease of code maintenance and code
security
0
1
2
3
4
5
6
1 2 3 4 5
Complexity Security
LESSONS LEARNED
19
Where Does Security Fit?
• Initial architectural discussions
• QA step for sprints/releases/etc.
• Black/grey/white-box testing for software post-
deployment
• Developers should give security veto power
• Security professionals must consider realistic
constraints
20
Security Costs Time
• When in a tight spot, security is commonly one
of the first considerations to fall by the way-
side
• Any improvements to development speed
(enhanced devops, continuous integration)
should be considered security enhancements
• The ultimate cost of security with respect to
development is time
21
Full-featured == Dangerous
• Know. Your. Frameworks. Inside and out.
• If going from nothing to a full-fledged web app
takes a minimal amount of code, a LOT of
things are happening out of sight
• Architects must know the ins and outs of any
core frameworks they use
22
Full-featured == Dangerous (Django)
from django.contrib.auth.models import User, Group
from rest_framework import viewsets
from tutorial.quickstart.serializers import UserSerializer,
GroupSerializerclass
UserViewSet(viewsets.ModelViewSet):
""”
API endpoint that allows users to be viewed or edited.
""”
queryset = User.objects.all().order_by('-date_joined')
serializer_class = UserSerializerclass
GroupViewSet(viewsets.ModelViewSet):
""”
API endpoint that allows groups to be viewed or edited.
""”
queryset = Group.objects.all()
serializer_class = GroupSerializer
• Does this look familiar?
• Is this what you want?
• Full CRUD access to User instances
• Is there a field on User that
application users should not be
able to modify?
• Indirect Object Reference
class WelcomeController < ApplicationController
def index
render params[:id]
end
end
23
Full-featured == Dangerous (Ruby on Rails)
• RoR documented best practice
• Vulnerable to remote code
execution (CVE-2016-2098)
• Pass dictionary as parameter,
dictionary unpacked as keyword
arguments to render method,
supply template keyword
argument, code execution!
24
Single-page Apps == 
• Single page apps (SPAs) immediately protect
against severe vulnerabilities out of the box
• Cross-site request forgery
• Cross-site scripting
• Great separation of responsibilities
• Greatly reduced complexity of back-end
• Vulns in front-end only affect individual users
instead of entire user-base
25
Quick n’ Easy Security Gains
• Security Response Headers
• HTTP Strict Transport Security
• Content Security Policy
• Frame Options
• Content Sniffing
• Cross-site Scripting Protection
• Cookie Flags
• HTTP Only
• Secure
• SSL
• No excuse for no encryption
• Regular Expressions
• Strongest form of input validation
• HTML Entity Encoding
• De-fang all user input from injection
capabilities
• Object-relational Mapping (ORM)
• Let a framework handle database
interaction, avoid injection
26
Quick n’ Dirty Security Gotchas
• Improper Input Validation
• Blacklists are weak – always prefer
whitelists, regexes where possible
• Attackers rely on being able to submit
unexpected data
• User-generated Templates
• Back to the confusion between data
and control
• Authentication Back-end
• LDAP-based auth should not be publicly
exposed
• Automation
• Sensitive operations should only be
invoked manually
• Insufficient Randomness
• Sensitive random values (ie: activation
tokens, forgot password tokens, etc.)
must be securely random
• User Enumeration
• Feels innocuous, but a list of valid users
goes a long way for attackers
SECURITY REGRESSION
28
The Problem Of Regression
• Regression testing for codebases is a large
problem with a standardized solution
• Regression with respect to security is an even
larger problem
• Just because a vuln is fixed once does not
mean it remains fixed
29
Unit Testing To Address Regression
• Take the approach used to fix regression issues
in codebases and use it to address security
regression as well
• Integrate into deployment process to ensure
that security holes remain fixed for every
deployment
• Security teams can write unit tests, hand off to
developers, use TDD to improve security
30
Security Regression Testing
• Proper Input Validation
• Presence of Expected Security Headers
• Anti-automation
• Proper Access Control Enforcement
I am currently working on a base framework to provide this
functionality, to be released at QCon NYC (late June 2017)
CONCLUSION
32
Takeaways
• Security should be integrated into development efforts from square one
• Security is hard, and expecting developers to know how to do it properly
is a recipe for disaster
• There are many ”easy wins” for securing web apps, many of which have
been enumerated here
• The scope of unit testing can (and should) be expanded to include security
checks as a standardized practice
33
Additional Resources
• OWASP
• https://www.owasp.org/index.php/Main_Page
• So You Want To Be A Hacker?
• https://www.slideshare.net/ChrisGrayson/so-you-want-to-be-a-hacker
• Web Sight
• https://websight.io
• OWASP Secure SDLC Cheat Sheet
• https://www.owasp.org/index.php/Secure_SDLC_Cheat_Sheet
THANK YOU!
CHRIS@WEBSIGHT.IO
@_LAVALAMP

More Related Content

What's hot

Kali Linux - Falconer - ISS 2014
Kali Linux - Falconer - ISS 2014Kali Linux - Falconer - ISS 2014
Kali Linux - Falconer - ISS 2014TGodfrey
 
Introduction to red team operations
Introduction to red team operationsIntroduction to red team operations
Introduction to red team operationsSunny Neo
 
How to Build Your Own Physical Pentesting Go-bag
How to Build Your Own Physical Pentesting Go-bagHow to Build Your Own Physical Pentesting Go-bag
How to Build Your Own Physical Pentesting Go-bagBeau Bullock
 
Pentest Apocalypse
Pentest ApocalypsePentest Apocalypse
Pentest ApocalypseBeau Bullock
 
Visiting the Bear Den
Visiting the Bear DenVisiting the Bear Den
Visiting the Bear DenESET
 
Pwning the Enterprise With PowerShell
Pwning the Enterprise With PowerShellPwning the Enterprise With PowerShell
Pwning the Enterprise With PowerShellBeau Bullock
 
Defcon 22-wesley-mc grew-instrumenting-point-of-sale-malware
Defcon 22-wesley-mc grew-instrumenting-point-of-sale-malwareDefcon 22-wesley-mc grew-instrumenting-point-of-sale-malware
Defcon 22-wesley-mc grew-instrumenting-point-of-sale-malwarePriyanka Aash
 
Top Security Challenges Facing Credit Unions Today
Top Security Challenges Facing Credit Unions TodayTop Security Challenges Facing Credit Unions Today
Top Security Challenges Facing Credit Unions TodayChris Gates
 
All You Need is One - A ClickOnce Love Story - Secure360 2015
All You Need is One -  A ClickOnce Love Story - Secure360 2015All You Need is One -  A ClickOnce Love Story - Secure360 2015
All You Need is One - A ClickOnce Love Story - Secure360 2015NetSPI
 
Defcon 22-zoltan-balazs-bypass-firewalls-application-whiteli
Defcon 22-zoltan-balazs-bypass-firewalls-application-whiteliDefcon 22-zoltan-balazs-bypass-firewalls-application-whiteli
Defcon 22-zoltan-balazs-bypass-firewalls-application-whiteliPriyanka Aash
 
Attack All the Layers - What's Working in Penetration Testing
Attack All the Layers - What's Working in Penetration TestingAttack All the Layers - What's Working in Penetration Testing
Attack All the Layers - What's Working in Penetration TestingNetSPI
 
BASIC OVERVIEW OF KALI LINUX
BASIC OVERVIEW OF KALI LINUXBASIC OVERVIEW OF KALI LINUX
BASIC OVERVIEW OF KALI LINUXDeborah Akuoko
 
[CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland
[CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland[CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland
[CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani GolandCODE BLUE
 
A Google Event You Won't Forget
A Google Event You Won't ForgetA Google Event You Won't Forget
A Google Event You Won't ForgetBeau Bullock
 
PKI in DevOps: How to Deploy Certificate Automation within CI/CD
PKI in DevOps: How to Deploy Certificate Automation within CI/CDPKI in DevOps: How to Deploy Certificate Automation within CI/CD
PKI in DevOps: How to Deploy Certificate Automation within CI/CDDevOps.com
 
BSides Denver 2019 - Cloud Wars Episode V: The Cryptojacker Strikes Back
BSides Denver 2019 - Cloud Wars Episode V: The Cryptojacker Strikes BackBSides Denver 2019 - Cloud Wars Episode V: The Cryptojacker Strikes Back
BSides Denver 2019 - Cloud Wars Episode V: The Cryptojacker Strikes BackLacework
 
Linux/Unix Night - (PEN) Testing Toolkits (English)
Linux/Unix Night - (PEN) Testing Toolkits (English)Linux/Unix Night - (PEN) Testing Toolkits (English)
Linux/Unix Night - (PEN) Testing Toolkits (English)Jelmer de Reus
 

What's hot (20)

Kali Linux - Falconer - ISS 2014
Kali Linux - Falconer - ISS 2014Kali Linux - Falconer - ISS 2014
Kali Linux - Falconer - ISS 2014
 
Introduction to red team operations
Introduction to red team operationsIntroduction to red team operations
Introduction to red team operations
 
How to Build Your Own Physical Pentesting Go-bag
How to Build Your Own Physical Pentesting Go-bagHow to Build Your Own Physical Pentesting Go-bag
How to Build Your Own Physical Pentesting Go-bag
 
Pentest Apocalypse
Pentest ApocalypsePentest Apocalypse
Pentest Apocalypse
 
Visiting the Bear Den
Visiting the Bear DenVisiting the Bear Den
Visiting the Bear Den
 
Kali linux tutorial
Kali linux tutorialKali linux tutorial
Kali linux tutorial
 
Pwning the Enterprise With PowerShell
Pwning the Enterprise With PowerShellPwning the Enterprise With PowerShell
Pwning the Enterprise With PowerShell
 
Defcon 22-wesley-mc grew-instrumenting-point-of-sale-malware
Defcon 22-wesley-mc grew-instrumenting-point-of-sale-malwareDefcon 22-wesley-mc grew-instrumenting-point-of-sale-malware
Defcon 22-wesley-mc grew-instrumenting-point-of-sale-malware
 
Top Security Challenges Facing Credit Unions Today
Top Security Challenges Facing Credit Unions TodayTop Security Challenges Facing Credit Unions Today
Top Security Challenges Facing Credit Unions Today
 
All You Need is One - A ClickOnce Love Story - Secure360 2015
All You Need is One -  A ClickOnce Love Story - Secure360 2015All You Need is One -  A ClickOnce Love Story - Secure360 2015
All You Need is One - A ClickOnce Love Story - Secure360 2015
 
Defcon 22-zoltan-balazs-bypass-firewalls-application-whiteli
Defcon 22-zoltan-balazs-bypass-firewalls-application-whiteliDefcon 22-zoltan-balazs-bypass-firewalls-application-whiteli
Defcon 22-zoltan-balazs-bypass-firewalls-application-whiteli
 
Attack All the Layers - What's Working in Penetration Testing
Attack All the Layers - What's Working in Penetration TestingAttack All the Layers - What's Working in Penetration Testing
Attack All the Layers - What's Working in Penetration Testing
 
BASIC OVERVIEW OF KALI LINUX
BASIC OVERVIEW OF KALI LINUXBASIC OVERVIEW OF KALI LINUX
BASIC OVERVIEW OF KALI LINUX
 
[CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland
[CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland[CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland
[CB16] Facebook Malware: Tag Me If You Can by Ido Naor & Dani Goland
 
A Google Event You Won't Forget
A Google Event You Won't ForgetA Google Event You Won't Forget
A Google Event You Won't Forget
 
PKI in DevOps: How to Deploy Certificate Automation within CI/CD
PKI in DevOps: How to Deploy Certificate Automation within CI/CDPKI in DevOps: How to Deploy Certificate Automation within CI/CD
PKI in DevOps: How to Deploy Certificate Automation within CI/CD
 
Kali Linux Installation - VMware
Kali Linux Installation - VMwareKali Linux Installation - VMware
Kali Linux Installation - VMware
 
BSides Denver 2019 - Cloud Wars Episode V: The Cryptojacker Strikes Back
BSides Denver 2019 - Cloud Wars Episode V: The Cryptojacker Strikes BackBSides Denver 2019 - Cloud Wars Episode V: The Cryptojacker Strikes Back
BSides Denver 2019 - Cloud Wars Episode V: The Cryptojacker Strikes Back
 
Docker & Daily DevOps
Docker & Daily DevOpsDocker & Daily DevOps
Docker & Daily DevOps
 
Linux/Unix Night - (PEN) Testing Toolkits (English)
Linux/Unix Night - (PEN) Testing Toolkits (English)Linux/Unix Night - (PEN) Testing Toolkits (English)
Linux/Unix Night - (PEN) Testing Toolkits (English)
 

Viewers also liked

Grey H@t - Academic Year 2012-2013 Recap
Grey H@t - Academic Year 2012-2013 RecapGrey H@t - Academic Year 2012-2013 Recap
Grey H@t - Academic Year 2012-2013 RecapChristopher Grayson
 
Root the Box - An Open Source Platform for CTF Administration
Root the Box - An Open Source Platform for CTF AdministrationRoot the Box - An Open Source Platform for CTF Administration
Root the Box - An Open Source Platform for CTF AdministrationChristopher Grayson
 
Cloudstone - Sharpening Your Weapons Through Big Data
Cloudstone - Sharpening Your Weapons Through Big DataCloudstone - Sharpening Your Weapons Through Big Data
Cloudstone - Sharpening Your Weapons Through Big DataChristopher Grayson
 
You, and Me, and Docker Makes Three
You, and Me, and Docker Makes ThreeYou, and Me, and Docker Makes Three
You, and Me, and Docker Makes ThreeChristopher Grayson
 
CableTap - Wirelessly Tapping Your Home Network
CableTap - Wirelessly Tapping Your Home NetworkCableTap - Wirelessly Tapping Your Home Network
CableTap - Wirelessly Tapping Your Home NetworkChristopher Grayson
 
Grey H@t - Cross-site Request Forgery
Grey H@t - Cross-site Request ForgeryGrey H@t - Cross-site Request Forgery
Grey H@t - Cross-site Request ForgeryChristopher Grayson
 

Viewers also liked (8)

Grey H@t - DNS Cache Poisoning
Grey H@t - DNS Cache PoisoningGrey H@t - DNS Cache Poisoning
Grey H@t - DNS Cache Poisoning
 
Grey H@t - Academic Year 2012-2013 Recap
Grey H@t - Academic Year 2012-2013 RecapGrey H@t - Academic Year 2012-2013 Recap
Grey H@t - Academic Year 2012-2013 Recap
 
Root the Box - An Open Source Platform for CTF Administration
Root the Box - An Open Source Platform for CTF AdministrationRoot the Box - An Open Source Platform for CTF Administration
Root the Box - An Open Source Platform for CTF Administration
 
Cloudstone - Sharpening Your Weapons Through Big Data
Cloudstone - Sharpening Your Weapons Through Big DataCloudstone - Sharpening Your Weapons Through Big Data
Cloudstone - Sharpening Your Weapons Through Big Data
 
You, and Me, and Docker Makes Three
You, and Me, and Docker Makes ThreeYou, and Me, and Docker Makes Three
You, and Me, and Docker Makes Three
 
CableTap - Wirelessly Tapping Your Home Network
CableTap - Wirelessly Tapping Your Home NetworkCableTap - Wirelessly Tapping Your Home Network
CableTap - Wirelessly Tapping Your Home Network
 
Grey H@t - Cross-site Request Forgery
Grey H@t - Cross-site Request ForgeryGrey H@t - Cross-site Request Forgery
Grey H@t - Cross-site Request Forgery
 
So You Want to be a Hacker?
So You Want to be a Hacker?So You Want to be a Hacker?
So You Want to be a Hacker?
 

Similar to Started In Security Now I'm Here

Programming languages and techniques for today’s embedded andIoT world
Programming languages and techniques for today’s embedded andIoT worldProgramming languages and techniques for today’s embedded andIoT world
Programming languages and techniques for today’s embedded andIoT worldRogue Wave Software
 
Application security meetup k8_s security with zero trust_29072021
Application security meetup k8_s security with zero trust_29072021Application security meetup k8_s security with zero trust_29072021
Application security meetup k8_s security with zero trust_29072021lior mazor
 
Cyber security - It starts with the embedded system
Cyber security - It starts with the embedded systemCyber security - It starts with the embedded system
Cyber security - It starts with the embedded systemRogue Wave Software
 
Ryan Elkins - Simple Security Defense to Thwart an Army of Cyber Ninja Warriors
Ryan Elkins - Simple Security Defense to Thwart an Army of Cyber Ninja WarriorsRyan Elkins - Simple Security Defense to Thwart an Army of Cyber Ninja Warriors
Ryan Elkins - Simple Security Defense to Thwart an Army of Cyber Ninja WarriorsRyan Elkins
 
chap-1 : Vulnerabilities in Information Systems
chap-1 : Vulnerabilities in Information Systemschap-1 : Vulnerabilities in Information Systems
chap-1 : Vulnerabilities in Information SystemsKashfUlHuda1
 
The New Security Practitioner
The New Security PractitionerThe New Security Practitioner
The New Security PractitionerAdrian Sanabria
 
SCS DevSecOps Seminar - State of DevSecOps
SCS DevSecOps Seminar - State of DevSecOpsSCS DevSecOps Seminar - State of DevSecOps
SCS DevSecOps Seminar - State of DevSecOpsStefan Streichsbier
 
For Business's Sake, Let's focus on AppSec
For Business's Sake, Let's focus on AppSecFor Business's Sake, Let's focus on AppSec
For Business's Sake, Let's focus on AppSecLalit Kale
 
VMWare Tech Talk: "The Road from Rugged DevOps to Security Chaos Engineering"
VMWare Tech Talk: "The Road from Rugged DevOps to Security Chaos Engineering"VMWare Tech Talk: "The Road from Rugged DevOps to Security Chaos Engineering"
VMWare Tech Talk: "The Road from Rugged DevOps to Security Chaos Engineering"Aaron Rinehart
 
Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...
Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...
Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...Denim Group
 
TechTalk 2021: Peran IT Security dalam Penerapan DevOps
TechTalk 2021: Peran IT Security dalam Penerapan DevOpsTechTalk 2021: Peran IT Security dalam Penerapan DevOps
TechTalk 2021: Peran IT Security dalam Penerapan DevOpsDicodingEvent
 
Breaking Secure Mobile Applications - Hack In The Box 2014 KL
Breaking Secure Mobile Applications - Hack In The Box 2014 KLBreaking Secure Mobile Applications - Hack In The Box 2014 KL
Breaking Secure Mobile Applications - Hack In The Box 2014 KLiphonepentest
 
Enumerating software security design flaws throughout the ssdlc cosac - 201...
Enumerating software security design flaws throughout the ssdlc   cosac - 201...Enumerating software security design flaws throughout the ssdlc   cosac - 201...
Enumerating software security design flaws throughout the ssdlc cosac - 201...John M. Willis
 
Enumerating software security design flaws throughout the SSDLC
Enumerating software security design flaws throughout the SSDLCEnumerating software security design flaws throughout the SSDLC
Enumerating software security design flaws throughout the SSDLCJohn M. Willis
 
Building world-class security response and secure development processes
Building world-class security response and secure development processesBuilding world-class security response and secure development processes
Building world-class security response and secure development processesDavid Jorm
 
Addressing Cloud Security with OPA
Addressing Cloud Security with OPAAddressing Cloud Security with OPA
Addressing Cloud Security with OPADiemShin
 
Null application security in an agile world
Null application security in an agile worldNull application security in an agile world
Null application security in an agile worldStefan Streichsbier
 
Slide Deck CISSP Class Session 5
Slide Deck CISSP Class Session 5Slide Deck CISSP Class Session 5
Slide Deck CISSP Class Session 5FRSecure
 
Supply Chain Security for Developers.pdf
Supply Chain Security for Developers.pdfSupply Chain Security for Developers.pdf
Supply Chain Security for Developers.pdfssuserc5b30e
 
Succeeding-Marriage-Cybersecurity-DevOps final
Succeeding-Marriage-Cybersecurity-DevOps finalSucceeding-Marriage-Cybersecurity-DevOps final
Succeeding-Marriage-Cybersecurity-DevOps finalrkadayam
 

Similar to Started In Security Now I'm Here (20)

Programming languages and techniques for today’s embedded andIoT world
Programming languages and techniques for today’s embedded andIoT worldProgramming languages and techniques for today’s embedded andIoT world
Programming languages and techniques for today’s embedded andIoT world
 
Application security meetup k8_s security with zero trust_29072021
Application security meetup k8_s security with zero trust_29072021Application security meetup k8_s security with zero trust_29072021
Application security meetup k8_s security with zero trust_29072021
 
Cyber security - It starts with the embedded system
Cyber security - It starts with the embedded systemCyber security - It starts with the embedded system
Cyber security - It starts with the embedded system
 
Ryan Elkins - Simple Security Defense to Thwart an Army of Cyber Ninja Warriors
Ryan Elkins - Simple Security Defense to Thwart an Army of Cyber Ninja WarriorsRyan Elkins - Simple Security Defense to Thwart an Army of Cyber Ninja Warriors
Ryan Elkins - Simple Security Defense to Thwart an Army of Cyber Ninja Warriors
 
chap-1 : Vulnerabilities in Information Systems
chap-1 : Vulnerabilities in Information Systemschap-1 : Vulnerabilities in Information Systems
chap-1 : Vulnerabilities in Information Systems
 
The New Security Practitioner
The New Security PractitionerThe New Security Practitioner
The New Security Practitioner
 
SCS DevSecOps Seminar - State of DevSecOps
SCS DevSecOps Seminar - State of DevSecOpsSCS DevSecOps Seminar - State of DevSecOps
SCS DevSecOps Seminar - State of DevSecOps
 
For Business's Sake, Let's focus on AppSec
For Business's Sake, Let's focus on AppSecFor Business's Sake, Let's focus on AppSec
For Business's Sake, Let's focus on AppSec
 
VMWare Tech Talk: "The Road from Rugged DevOps to Security Chaos Engineering"
VMWare Tech Talk: "The Road from Rugged DevOps to Security Chaos Engineering"VMWare Tech Talk: "The Road from Rugged DevOps to Security Chaos Engineering"
VMWare Tech Talk: "The Road from Rugged DevOps to Security Chaos Engineering"
 
Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...
Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...
Threat Modeling the CI/CD Pipeline to Improve Software Supply Chain Security ...
 
TechTalk 2021: Peran IT Security dalam Penerapan DevOps
TechTalk 2021: Peran IT Security dalam Penerapan DevOpsTechTalk 2021: Peran IT Security dalam Penerapan DevOps
TechTalk 2021: Peran IT Security dalam Penerapan DevOps
 
Breaking Secure Mobile Applications - Hack In The Box 2014 KL
Breaking Secure Mobile Applications - Hack In The Box 2014 KLBreaking Secure Mobile Applications - Hack In The Box 2014 KL
Breaking Secure Mobile Applications - Hack In The Box 2014 KL
 
Enumerating software security design flaws throughout the ssdlc cosac - 201...
Enumerating software security design flaws throughout the ssdlc   cosac - 201...Enumerating software security design flaws throughout the ssdlc   cosac - 201...
Enumerating software security design flaws throughout the ssdlc cosac - 201...
 
Enumerating software security design flaws throughout the SSDLC
Enumerating software security design flaws throughout the SSDLCEnumerating software security design flaws throughout the SSDLC
Enumerating software security design flaws throughout the SSDLC
 
Building world-class security response and secure development processes
Building world-class security response and secure development processesBuilding world-class security response and secure development processes
Building world-class security response and secure development processes
 
Addressing Cloud Security with OPA
Addressing Cloud Security with OPAAddressing Cloud Security with OPA
Addressing Cloud Security with OPA
 
Null application security in an agile world
Null application security in an agile worldNull application security in an agile world
Null application security in an agile world
 
Slide Deck CISSP Class Session 5
Slide Deck CISSP Class Session 5Slide Deck CISSP Class Session 5
Slide Deck CISSP Class Session 5
 
Supply Chain Security for Developers.pdf
Supply Chain Security for Developers.pdfSupply Chain Security for Developers.pdf
Supply Chain Security for Developers.pdf
 
Succeeding-Marriage-Cybersecurity-DevOps final
Succeeding-Marriage-Cybersecurity-DevOps finalSucceeding-Marriage-Cybersecurity-DevOps final
Succeeding-Marriage-Cybersecurity-DevOps final
 

Recently uploaded

Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)Delhi Call girls
 
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...SUHANI PANDEY
 
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...SUHANI PANDEY
 
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.soniya singh
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebJames Anderson
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...APNIC
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...tanu pandey
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...Diya Sharma
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge GraphsEleniIlkou
 
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...SUHANI PANDEY
 
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.soniya singh
 
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl ServiceRussian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl Servicegwenoracqe6
 
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445ruhi
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxellan12
 

Recently uploaded (20)

Russian Call Girls in %(+971524965298 )# Call Girls in Dubai
Russian Call Girls in %(+971524965298  )#  Call Girls in DubaiRussian Call Girls in %(+971524965298  )#  Call Girls in Dubai
Russian Call Girls in %(+971524965298 )# Call Girls in Dubai
 
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Model Towh Delhi 💯Call Us 🔝8264348440🔝
 
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
WhatsApp 📞 8448380779 ✅Call Girls In Mamura Sector 66 ( Noida)
 
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
 
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
 
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Shahpur Jat Escort Service Delhi N.C.R.
 
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark WebGDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
GDG Cloud Southlake 32: Kyle Hettinger: Demystifying the Dark Web
 
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
'Future Evolution of the Internet' delivered by Geoff Huston at Everything Op...
 
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Sukhdev Vihar Delhi 💯Call Us 🔝8264348440🔝
 
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...Pune Airport ( Call Girls ) Pune  6297143586  Hot Model With Sexy Bhabi Ready...
Pune Airport ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready...
 
VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
VVVIP Call Girls In Connaught Place ➡️ Delhi ➡️ 9999965857 🚀 No Advance 24HRS...
 
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
₹5.5k {Cash Payment}New Friends Colony Call Girls In [Delhi NIHARIKA] 🔝|97111...
 
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
 
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
6.High Profile Call Girls In Punjab +919053900678 Punjab Call GirlHigh Profil...
 
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
VIP Model Call Girls NIBM ( Pune ) Call ON 8005736733 Starting From 5K to 25K...
 
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.
Call Now ☎ 8264348440 !! Call Girls in Rani Bagh Escort Service Delhi N.C.R.
 
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl ServiceRussian Call girl in Ajman +971563133746 Ajman Call girl Service
Russian Call girl in Ajman +971563133746 Ajman Call girl Service
 
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
Call Girls In Pratap Nagar Delhi 💯Call Us 🔝8264348440🔝
 
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
 
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptxAWS Community DAY Albertini-Ellan Cloud Security (1).pptx
AWS Community DAY Albertini-Ellan Cloud Security (1).pptx
 

Started In Security Now I'm Here

  • 1. Started In Security Now I’m Here Christopher Grayson (OSCE) Tales from a hacker-turned-code-monkey
  • 4. 4 What Are We Talking About? • A journey from security to software • Going from software to security seems to be more common • No formal development training, so lots of “learning opportunities”
  • 5. 5 Why Are We Talking About It? • Differences in perspective yield valuable lessons • The security field has a problem w/ only chatting amongst themselves • I want my headaches to prevent similar headaches for my colleagues
  • 6. 6 Agenda 1. My Background 2. Core Security Concepts 3. Lessons Learned 4. Security Regression 5. Conclusion
  • 7. A BIT OF BACKGROUND
  • 8. 8 It All Started With Mega Man X • Parents in IT and psychology, raised a white-hat hacker • Mega Man X was my first teacher • Starcraft map editor was my first exposure to coding • I thought I wanted to be a video game developer
  • 9. 9 “Professional” Life And Beyond • Brief stint in development at a marketing company • Landed a job as a research scientist on a DARPA contract • Got into security through a student org • Broke into all the things, noticed a sorely missing capability, left to build it
  • 10. 10 Web Sight High-level Architecture • Massive, scalable data gathering platform • Back-end written in Python, front-end in Angular 2 (yay Typescript) • Uses Redis, PostgreSQL, RabbitMQ, Celery, Elasticsearch, Django Rest Framework • Deployed in EC2, has been deployed on DO • Used to use Docker
  • 12. 12 Definitions Of Hacking Give me a set of rules, and I’ll follow those rules and accomplish something they weren’t meant to allow. Finding the difference between what something was made to do and what something can do. - lavalamp - xray
  • 13. 13 Principle Of Least Privilege …in a particular abstraction layer of a computing environment, every module must be able to access only the information and resources that are necessary for its legitimate purpose. - Wikipedia • Obvious • Deceptively difficult • Halting problem! • Common causes for violation: • Scope creep • Unknown framework functionality • Definition of hacking
  • 14. 14 OWASP Top 10 • Open Web Application Security Project • Maintains a list of most common web vulnerabilities by year • Rarely changes year-to-year • Common vulns we may touch on: • Cross-site Scripting (XSS) • Cross-site Request Forgery (CSRF) • SQL Injection (SQLI)
  • 15. <div></div><script>Alert(’Hi’);</script> 15 The Problem Of Injection / Data Confusion • Many vulnerabilities can be tied to software confusing data for control characters or packaging • SQL Injection • Template Injection • Cross-site Scripting userId = 1; Expected userId = 1 or 1=1; Actual $sql = “select * from users where userId = “ . $_GET[“userId”] + “;”; $result = mysql_query($sql); Code select * from users where userId = 1 or 1=1; Result user_name = “chris” Expected user_name = “{{ 2 + 2 }}” Actual template = “Hello there %s” % user_name r_template = Template(template) Code Hello there {{ 2 + 2 }} Result user_name = “chris” Expected User_name = “</div><script>Alert(‘Hi’);</script>” Actual <div> Hello {{user_name}} </div> Code Result
  • 16. 16 Fail Open vs. Fail Closed • ”Fail closed” refers to a situation in which, when an error occurs, execution is halted. • ”Fail open” would instead allow processing to continue. • Security professionals love fail closed • Software developers tend to prefer fail open
  • 17. 17 Complexity vs. Security • At a theoretical level, complexity and security have a strong inverse relationship • Put simply, the more complex something is the more difficult it is to secure • Keep It Simple Stupid (KISS) has implications for both ease of code maintenance and code security 0 1 2 3 4 5 6 1 2 3 4 5 Complexity Security
  • 19. 19 Where Does Security Fit? • Initial architectural discussions • QA step for sprints/releases/etc. • Black/grey/white-box testing for software post- deployment • Developers should give security veto power • Security professionals must consider realistic constraints
  • 20. 20 Security Costs Time • When in a tight spot, security is commonly one of the first considerations to fall by the way- side • Any improvements to development speed (enhanced devops, continuous integration) should be considered security enhancements • The ultimate cost of security with respect to development is time
  • 21. 21 Full-featured == Dangerous • Know. Your. Frameworks. Inside and out. • If going from nothing to a full-fledged web app takes a minimal amount of code, a LOT of things are happening out of sight • Architects must know the ins and outs of any core frameworks they use
  • 22. 22 Full-featured == Dangerous (Django) from django.contrib.auth.models import User, Group from rest_framework import viewsets from tutorial.quickstart.serializers import UserSerializer, GroupSerializerclass UserViewSet(viewsets.ModelViewSet): ""” API endpoint that allows users to be viewed or edited. ""” queryset = User.objects.all().order_by('-date_joined') serializer_class = UserSerializerclass GroupViewSet(viewsets.ModelViewSet): ""” API endpoint that allows groups to be viewed or edited. ""” queryset = Group.objects.all() serializer_class = GroupSerializer • Does this look familiar? • Is this what you want? • Full CRUD access to User instances • Is there a field on User that application users should not be able to modify? • Indirect Object Reference
  • 23. class WelcomeController < ApplicationController def index render params[:id] end end 23 Full-featured == Dangerous (Ruby on Rails) • RoR documented best practice • Vulnerable to remote code execution (CVE-2016-2098) • Pass dictionary as parameter, dictionary unpacked as keyword arguments to render method, supply template keyword argument, code execution!
  • 24. 24 Single-page Apps ==  • Single page apps (SPAs) immediately protect against severe vulnerabilities out of the box • Cross-site request forgery • Cross-site scripting • Great separation of responsibilities • Greatly reduced complexity of back-end • Vulns in front-end only affect individual users instead of entire user-base
  • 25. 25 Quick n’ Easy Security Gains • Security Response Headers • HTTP Strict Transport Security • Content Security Policy • Frame Options • Content Sniffing • Cross-site Scripting Protection • Cookie Flags • HTTP Only • Secure • SSL • No excuse for no encryption • Regular Expressions • Strongest form of input validation • HTML Entity Encoding • De-fang all user input from injection capabilities • Object-relational Mapping (ORM) • Let a framework handle database interaction, avoid injection
  • 26. 26 Quick n’ Dirty Security Gotchas • Improper Input Validation • Blacklists are weak – always prefer whitelists, regexes where possible • Attackers rely on being able to submit unexpected data • User-generated Templates • Back to the confusion between data and control • Authentication Back-end • LDAP-based auth should not be publicly exposed • Automation • Sensitive operations should only be invoked manually • Insufficient Randomness • Sensitive random values (ie: activation tokens, forgot password tokens, etc.) must be securely random • User Enumeration • Feels innocuous, but a list of valid users goes a long way for attackers
  • 28. 28 The Problem Of Regression • Regression testing for codebases is a large problem with a standardized solution • Regression with respect to security is an even larger problem • Just because a vuln is fixed once does not mean it remains fixed
  • 29. 29 Unit Testing To Address Regression • Take the approach used to fix regression issues in codebases and use it to address security regression as well • Integrate into deployment process to ensure that security holes remain fixed for every deployment • Security teams can write unit tests, hand off to developers, use TDD to improve security
  • 30. 30 Security Regression Testing • Proper Input Validation • Presence of Expected Security Headers • Anti-automation • Proper Access Control Enforcement I am currently working on a base framework to provide this functionality, to be released at QCon NYC (late June 2017)
  • 32. 32 Takeaways • Security should be integrated into development efforts from square one • Security is hard, and expecting developers to know how to do it properly is a recipe for disaster • There are many ”easy wins” for securing web apps, many of which have been enumerated here • The scope of unit testing can (and should) be expanded to include security checks as a standardized practice
  • 33. 33 Additional Resources • OWASP • https://www.owasp.org/index.php/Main_Page • So You Want To Be A Hacker? • https://www.slideshare.net/ChrisGrayson/so-you-want-to-be-a-hacker • Web Sight • https://websight.io • OWASP Secure SDLC Cheat Sheet • https://www.owasp.org/index.php/Secure_SDLC_Cheat_Sheet