Ed Adams
About Ed Adams
■ CEO, Security Innovation Inc.
■ Host of Ed TALKS: www.edtalks.io
■ Director, ICMCP
■ Research Fellow, Ponemon Institute
■ Privacy by Design Ambassador, Canada
■ Mechanical Engineer, Software Engineer
■ In younger days, built non-lethal weapons
systems for government & law enforcement
www.edtalks.io
About Security Innovation
■ Securing software in challenging places….
■ Helping clients get smarter about software security
Assessment: show me the gaps
Standards: set goals and make it easy
Training: enable me to make good decisions
Over
3 Million
Users
Authored
18
Books
Named
6x
Gartner MQ
What am I doing?
■ I’m going to explain common attack and exploitation techniques,
through the power of analogy!
■ There are some great common parallels between computer
security and the real world
■ I will gently guide you from the real world into a high-level
technical understanding
■ Goal: Lay the groundwork of understanding attacks and
vulnerabilities for future
VULNERABILITIES
the failures
INJECTION
FLAWS
Humans + code =
sadness
Pizza Robot
Goal:
- Greet human
- Deliver pizza
- Return to pizzeria
Process
1. Human goes to a website
2. Makes their order
3. Enters their name “Joe”
4. The pizza is made and
placed in delivery robot
5. Delivery robot is
programmed with
commands to get to the
house
6. Delivery robot delivers
pizza and says
“Greetings, Joe”
7. Delivery robot returns to
base
Forward: 50 ft
Turn: Right
Forward: 300 ft
Turn: Left
Forward: 10 ft
Turn: Left
Forward: 5 ft
Greet: Joe
Deliver: Pizza
Return
Hijacking a Pizza
Robot
Forward: 50 ft
Turn: Right
Forward: 300 ft
Turn: Left
Forward: 10 ft
Turn: Left
Forward: 5 ft
Greet: Joe
Deliver: Pizza
Return
Expected:
Joe
Unexpected:
Joe
Turn: Left
Forward: 1 ft
Turn: Left
Forward: 1 ft
Forward: 50 ft
Turn: Right
Forward: 300 ft
Turn: Left
Forward: 10 ft
Turn: Left
Forward: 5 ft
Greet: Joe
Turn: Left
Forward: 1 ft
Turn: Left
Forward: 1 ft
Deliver: Pizza
Return
What’s happening!?
■ Everything in White is “Code” – programmer supplied
– Code is simply special text that tells a system what to
do
– GPS for a computer
■ Everything in Red is “Data” – user supplied
– Data is anything else: text, photos, etc.
■ The programmer assumed the name would not include
“Code”
– Nobody’s named “Turn” or ”Forward” right?
■ When the user supplied those things the robot wrongly
interpreted them as “Code”
■ This is fundamentally the same thing that happens in XSS,
Forward: 50 ft
Turn: Right
Forward: 300 ft
Turn: Left
Forward: 10 ft
Turn: Left
Forward: 5 ft
Greet: Joe
Turn: Left
Forward: 1 ft
Turn: Left
Forward: 1 ft
Deliver: Pizza
Return
XSS & SQLI Time to get real
XSS
Mixing code and
data in the web
browser is
confusing
Cross Site Scripting (XSS)
Mixing Code and Data using control characters
in the webpage
■ Try this anywhere you control a value on the page
– HTML
– JavaScript
– Headers
■ How is your input being encoded?
■ Test Cases
– Change your input
– Try <marquee>
– Try <script>alert('XSS')</script>
What Can You Do with XSS?
loginError.action?errorMsg=Sorry%2C+incorrect+username+or+passwo
rd.
What Can You Do with XSS?
loginError.action?errorMsg=
</div><h1>Login Moved</h1><p>Please Login at:
http://evilportal.com</p>
What Can You Do with XSS?
loginError.action?errorMsg=
<marquee>
Why is XSS Possible?
When is XSS Possible?
www.catsearch.com?search=fluffy
When is XSS Possible?
www.catsearch.com?search=sadlfkjsadf...
When is XSS Possible?
www.catsearch.com?search=<script>aler...
SQL
INJECTION
Mixing code and
data in databases
can be catastrophic
SQL Injection
■ Mixing Code and Data using control characters
in Database Queries
■ Try this on any input you think may use the database
– Textboxes, URL Parameters, dropdowns, hidden fields
■ Start small, build more complex SQL Queries to manipulate the database
■ Test Cases
– Does ' Produce an error message?
– Think about how to manipulate the SQL command
SELECT * FROM USERS WHERE Username = 'joe' AND Password = 'P4S
Logging in with SQL Injection
SELECT * FROM USERS
WHERE Username = 'joe' AND
Password = 'P4S$WorD1';
Username joe
Password P4S$WorD1
Commentary:
Assuming correct username and
password the user is logged in
Input Values
Logging in with SQL Injection
SELECT * FROM USERS
WHERE Username = 'joe' OR
1=1 #' AND Password =
'P4S$WorD1';
Username joe OR 1=1 #
Password P4S$WorD1
Commentary:
Password check is commented out.
Username is checked and attacker is
logged in as ‘joe’
Everything after the # is disregarded
Input Values
Logging in with SQL Injection
SELECT * FROM USERS
WHERE Username = 'joe' OR
1=1;
Username joe OR 1=1 #
Password P4S$WorD1
Commentary:
Password check is commented out.
Username is checked and attacker is
logged in as ‘joe’
1=1 is always TRUE, so we can replace
that
SELECT * FROM USERS
WHERE Username = 'joe' OR
TRUE;
Input Values
Logging in with SQL Injection
SELECT * FROM USERS
WHERE Username = 'joe' OR
1=1;
Username joe OR 1=1 #
Password P4S$WorD1
Commentary:
Password check is commented out.
Username is checked and attacker is
logged in as ‘joe’
Anything OR TRUE is always TRUE
SELECT * FROM USERS
WHERE Username = 'joe' OR
TRUE;
SELECT * FROM USERS
WHERE TRUE;
Input Values
Logging in with SQL Injection
SELECT * FROM USERS
WHERE Username = 'joe' OR
1=1;
Username joe OR 1=1 #
Password P4S$WorD1
Commentary:
Password check is commented out.
Username is checked and attacker is
logged in as ‘joe’
OR 1=1 # short circuits the entire where
clause in this case
SELECT * FROM USERS
WHERE Username = 'joe' OR
TRUE;
SELECT * FROM USERS
WHERE TRUE;
SELECT * FROM USERS;
Input Values
INJECTION FLAWS ALLOW
AN ATTACKER TO INJECT
THEIR OWN CODE INTO
THE PROGRAM
BROKEN
AUTHENTICATION
Check ID at the
door
IS A HI-VIS
VEST
MORE
POWERFUL
THAN ID?
FREE
MOVIES
https://www.vice.com/en_au/article/mgv4gn/chalecos-reflectantes-
entrar-gratis
ENTRANCE
TO THE
ZOO
COLDPLAY?
I wasn't a big
fan of
Coldplay
before I saw
Authentication Issues
■ Many opportunities to make mistakes
– Default or test credentials
– Not storing credentials properly
– Forgetting/Resetting passwords
– Not protecting authentication
tokens properly
– Cookie issues
– Not handing user input safely
– Loss of credentials
– Password reuse
– Not checking credentials properly
– Changing usernames
– Phishing
– Failure to use 2FA
– Overlap with other vulnerabilities
(XSS, CSRF, SQLi, etc.)
■ Verify your users
■ Protect their credentials
■ Protect credential equivalents
PRIVILEGE
ESCALATION
Can I steal your
TV through your
shed?
I want in here I can get in here
What’s in a house?
■ TV
■ Computers
■ Electronics
■ Money
What’s in a shed?
■ Ladders
■ Bolt cutters
■ Spare keys
■ Drills & Saws
Start Here Go Here
Horizontal vs. Vertical Escalation
■ Horizontal Privilege Escalation
– Allows one user can access another user’s data
■ Vertical Privilege Escalation
– Allows a user to increase their privilege level
– Anonymous -> User
– User -> Manager
– Manager –> Administrator
Authentication is not Authorization
Authentication
■ Verify a user is who they say they
are
■ Validate that user throughout their
use of the system
– Through cookies or other
tokens
Authorization
■ Validate what the user should
have access to
■ Users, Roles, access controls, or
other methods of authorization
Both must be accounted for and fail differently
INFORMATION
DISCLOSURE
I bet that guy is in
sales, I can tell by
his suit
A guy walks into a bar…
Passive - Observe
What’s he wearing?
Shoes
Hair
Wedding ring
Dirt under fingernails
Scars
Active - Start a conversation
Where are you from?
Siblings?
How old are you?
Pets?
Job?
Computers give away
information all the
time■ Hackers gather that information and use it
against us every day
■ Tools and Databases scan and collect this
information for easy querying
■ Our job is to protect this information
PARAMETER
TAMPERING
Control the data
Control the
future
Let’s find some deals!
■ Peel off the tags from some Wonder
Bread
■ Apply tags to fancy bread!
ALWAYS BE
NICE TO
YOUR
MILLENNIALS
Everything a
computer
does starts
with input
Without input a computer
will always do the same thing
Input filtering, processing,
and blocking sets the stage
for everything else
CONFIGURATIO
N ERRORS
Don’t put the
locks on the
wrong side of the
door
Doors,
Windows,
and Locks
Installing a door can be difficult to do
securely
Installing a window so it locks
automatically
Don’t forget to lock your doors and
windows
Did you remember all your doors and
windows?
YouTube: LockPickingLawyer
https://www.youtube.com/watch?v=nJu_-Iuppc0
Many software systems can be
configured securely
■ Most software systems don’t come secure by default
■ Insecure use of existing components
– The door is installed poorly
■ Insecure configuration of components
– The lock is misconfigured
■ Insecure defaults are used
– The lock has a reused key or default keycode
Lots of ways that software can fail
■ Communication is a great first step
■ Start the conversation
■ Make it memorable
■ Give people an anchor of understanding
Thank You!
■ @appsec
edadamsboston
www.edtalks.io
eadams@securityinnovation.co
m

More Related Content

PDF
Wfh security risks - Ed Adams, President, Security Innovation
PDF
Leveraging red for defense
PPTX
Chris Haley - Understanding Attackers' Use of Covert Communications
PPTX
Jim Wojno: Incident Response - No Pain, No Gain!
PPTX
OWASP Mobile TOP 10 2014
PPTX
Ethical hacking
PPTX
Vulnerability assessment &amp; Penetration testing Basics
PPTX
LoginCat from TekMonks
Wfh security risks - Ed Adams, President, Security Innovation
Leveraging red for defense
Chris Haley - Understanding Attackers' Use of Covert Communications
Jim Wojno: Incident Response - No Pain, No Gain!
OWASP Mobile TOP 10 2014
Ethical hacking
Vulnerability assessment &amp; Penetration testing Basics
LoginCat from TekMonks

What's hot (20)

PDF
Web Application Penetration Testing
PPTX
Ethical Hacking Conference 2015- Building Secure Products -a perspective
PDF
Breaking and entering how and why dhs conducts penetration tests
PPTX
Hacking Mobile Apps
PPT
Ethical Hacking and Penetration Testing
PDF
Yehia Mamdouh @ DTS Solution - The Gentleman Thief
PDF
What is Penetration Testing?
PDF
DefCamp - Mohamed Bedewi - Building a Weaponized Honeypot
PPTX
Career Guidance on Cybersecurity by Mohammed Adam
PPTX
Login cat tekmonks - v3
PDF
DTS Solution - Yehia Mamdouh - Release your pet worm on your infrastructure....
PPTX
Understanding advanced persistent threats (APT)
PDF
Security precognition chaos engineering in incident response
PPTX
IBM ridefinisce la strategia e l'approccio verso gli Avanced Persistent Threa...
PDF
Deception Technology: Use Cases & Implementation Approaches
PDF
Ethical hacking and social engineering
PPTX
Mobile platform security models
PPTX
Implementing security for your library | PLAN Tech Day Conference
PPTX
Understanding Application Threat Modelling & Architecture
PPTX
Fingerprinting and Attacking a Healthcare Infrastructure
Web Application Penetration Testing
Ethical Hacking Conference 2015- Building Secure Products -a perspective
Breaking and entering how and why dhs conducts penetration tests
Hacking Mobile Apps
Ethical Hacking and Penetration Testing
Yehia Mamdouh @ DTS Solution - The Gentleman Thief
What is Penetration Testing?
DefCamp - Mohamed Bedewi - Building a Weaponized Honeypot
Career Guidance on Cybersecurity by Mohammed Adam
Login cat tekmonks - v3
DTS Solution - Yehia Mamdouh - Release your pet worm on your infrastructure....
Understanding advanced persistent threats (APT)
Security precognition chaos engineering in incident response
IBM ridefinisce la strategia e l'approccio verso gli Avanced Persistent Threa...
Deception Technology: Use Cases & Implementation Approaches
Ethical hacking and social engineering
Mobile platform security models
Implementing security for your library | PLAN Tech Day Conference
Understanding Application Threat Modelling & Architecture
Fingerprinting and Attacking a Healthcare Infrastructure
Ad

Similar to Hijacking a Pizza Delivery Robot (using SQL injection) (20)

PPTX
How to Hijack a Pizza Delivery Robot with Injection Flaws
PDF
Carver-IT Security for Librarians
PPTX
PPTX
Alexey Sintsov. Honeypot that Can Bite: Reverse Penetration.
PPTX
Getting Started With WebAuthn
ODP
My app is secure... I think
PPTX
The hardcore stuff i hack, experiences from past VAPT assignments
PPTX
Programming and Secure software development presentation consists of various ...
PPT
50 Shades of RED: Stories from the “Playroom” from CONFidence 2014
PPTX
Cybercrime and the Developer Java2Days 2016 Sofia
PPT
Beyond Ethical Hacking By Nipun Jaswal , CSA HCF Infosec Pvt. Ltd
PPTX
Intro to INFOSEC
PDF
Learning from Biometric Fingerprints to prevent Cyber Security Threats
PPTX
7 Things People Do To Endanger Their Networks
PDF
Crash Course In Brain Surgery
PDF
Two Factor Authentication (2FA) Deep Dive: How to Choose the Right Solution f...
PPT
OpenID Security
PPTX
How an Attacker "Audits" Your Software Systems
PPTX
Make Every Spin Count: Putting the Security Odds in Your Favor
How to Hijack a Pizza Delivery Robot with Injection Flaws
Carver-IT Security for Librarians
Alexey Sintsov. Honeypot that Can Bite: Reverse Penetration.
Getting Started With WebAuthn
My app is secure... I think
The hardcore stuff i hack, experiences from past VAPT assignments
Programming and Secure software development presentation consists of various ...
50 Shades of RED: Stories from the “Playroom” from CONFidence 2014
Cybercrime and the Developer Java2Days 2016 Sofia
Beyond Ethical Hacking By Nipun Jaswal , CSA HCF Infosec Pvt. Ltd
Intro to INFOSEC
Learning from Biometric Fingerprints to prevent Cyber Security Threats
7 Things People Do To Endanger Their Networks
Crash Course In Brain Surgery
Two Factor Authentication (2FA) Deep Dive: How to Choose the Right Solution f...
OpenID Security
How an Attacker "Audits" Your Software Systems
Make Every Spin Count: Putting the Security Odds in Your Favor
Ad

More from Priyanka Aash (20)

PPTX
AI Code Generation Risks (Ramkumar Dilli, CIO, Myridius)
PDF
From Chatbot to Destroyer of Endpoints - Can ChatGPT Automate EDR Bypasses (1...
PDF
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
PDF
Oh, the Possibilities - Balancing Innovation and Risk with Generative AI.pdf
PDF
Lessons Learned from Developing Secure AI Workflows.pdf
PDF
Cyber Defense Matrix Workshop - RSA Conference
PDF
A Constitutional Quagmire - Ethical Minefields of AI, Cyber, and Privacy.pdf
PDF
Securing AI - There Is No Try, Only Do!.pdf
PDF
GenAI Opportunities and Challenges - Where 370 Enterprises Are Focusing Now.pdf
PDF
Coordinated Disclosure for ML - What's Different and What's the Same.pdf
PDF
10 Key Challenges for AI within the EU Data Protection Framework.pdf
PDF
Techniques for Automatic Device Identification and Network Assignment.pdf
PDF
Keynote : Presentation on SASE Technology
PDF
Keynote : AI & Future Of Offensive Security
PDF
Redefining Cybersecurity with AI Capabilities
PDF
Demystifying Neural Networks And Building Cybersecurity Applications
PDF
Finetuning GenAI For Hacking and Defending
PDF
(CISOPlatform Summit & SACON 2024) Kids Cyber Security .pdf
PDF
(CISOPlatform Summit & SACON 2024) Regulation & Response In Banks.pdf
PDF
(CISOPlatform Summit & SACON 2024) Cyber Insurance & Risk Quantification.pdf
AI Code Generation Risks (Ramkumar Dilli, CIO, Myridius)
From Chatbot to Destroyer of Endpoints - Can ChatGPT Automate EDR Bypasses (1...
Cracking the Code - Unveiling Synergies Between Open Source Security and AI.pdf
Oh, the Possibilities - Balancing Innovation and Risk with Generative AI.pdf
Lessons Learned from Developing Secure AI Workflows.pdf
Cyber Defense Matrix Workshop - RSA Conference
A Constitutional Quagmire - Ethical Minefields of AI, Cyber, and Privacy.pdf
Securing AI - There Is No Try, Only Do!.pdf
GenAI Opportunities and Challenges - Where 370 Enterprises Are Focusing Now.pdf
Coordinated Disclosure for ML - What's Different and What's the Same.pdf
10 Key Challenges for AI within the EU Data Protection Framework.pdf
Techniques for Automatic Device Identification and Network Assignment.pdf
Keynote : Presentation on SASE Technology
Keynote : AI & Future Of Offensive Security
Redefining Cybersecurity with AI Capabilities
Demystifying Neural Networks And Building Cybersecurity Applications
Finetuning GenAI For Hacking and Defending
(CISOPlatform Summit & SACON 2024) Kids Cyber Security .pdf
(CISOPlatform Summit & SACON 2024) Regulation & Response In Banks.pdf
(CISOPlatform Summit & SACON 2024) Cyber Insurance & Risk Quantification.pdf

Recently uploaded (20)

PDF
A contest of sentiment analysis: k-nearest neighbor versus neural network
PDF
Convolutional neural network based encoder-decoder for efficient real-time ob...
PDF
Enhancing plagiarism detection using data pre-processing and machine learning...
DOCX
search engine optimization ppt fir known well about this
PPTX
TEXTILE technology diploma scope and career opportunities
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PPTX
Microsoft Excel 365/2024 Beginner's training
PPT
Module 1.ppt Iot fundamentals and Architecture
PDF
Improvisation in detection of pomegranate leaf disease using transfer learni...
PDF
The influence of sentiment analysis in enhancing early warning system model f...
PDF
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
PPTX
Benefits of Physical activity for teenagers.pptx
PDF
OpenACC and Open Hackathons Monthly Highlights July 2025
PDF
Taming the Chaos: How to Turn Unstructured Data into Decisions
PDF
Comparative analysis of machine learning models for fake news detection in so...
PDF
Architecture types and enterprise applications.pdf
PPTX
Chapter 5: Probability Theory and Statistics
PDF
Getting started with AI Agents and Multi-Agent Systems
PDF
CloudStack 4.21: First Look Webinar slides
PPTX
The various Industrial Revolutions .pptx
A contest of sentiment analysis: k-nearest neighbor versus neural network
Convolutional neural network based encoder-decoder for efficient real-time ob...
Enhancing plagiarism detection using data pre-processing and machine learning...
search engine optimization ppt fir known well about this
TEXTILE technology diploma scope and career opportunities
sustainability-14-14877-v2.pddhzftheheeeee
Microsoft Excel 365/2024 Beginner's training
Module 1.ppt Iot fundamentals and Architecture
Improvisation in detection of pomegranate leaf disease using transfer learni...
The influence of sentiment analysis in enhancing early warning system model f...
How ambidextrous entrepreneurial leaders react to the artificial intelligence...
Benefits of Physical activity for teenagers.pptx
OpenACC and Open Hackathons Monthly Highlights July 2025
Taming the Chaos: How to Turn Unstructured Data into Decisions
Comparative analysis of machine learning models for fake news detection in so...
Architecture types and enterprise applications.pdf
Chapter 5: Probability Theory and Statistics
Getting started with AI Agents and Multi-Agent Systems
CloudStack 4.21: First Look Webinar slides
The various Industrial Revolutions .pptx

Hijacking a Pizza Delivery Robot (using SQL injection)

  • 2. About Ed Adams ■ CEO, Security Innovation Inc. ■ Host of Ed TALKS: www.edtalks.io ■ Director, ICMCP ■ Research Fellow, Ponemon Institute ■ Privacy by Design Ambassador, Canada ■ Mechanical Engineer, Software Engineer ■ In younger days, built non-lethal weapons systems for government & law enforcement www.edtalks.io
  • 3. About Security Innovation ■ Securing software in challenging places…. ■ Helping clients get smarter about software security Assessment: show me the gaps Standards: set goals and make it easy Training: enable me to make good decisions Over 3 Million Users Authored 18 Books Named 6x Gartner MQ
  • 4. What am I doing? ■ I’m going to explain common attack and exploitation techniques, through the power of analogy! ■ There are some great common parallels between computer security and the real world ■ I will gently guide you from the real world into a high-level technical understanding ■ Goal: Lay the groundwork of understanding attacks and vulnerabilities for future
  • 7. Pizza Robot Goal: - Greet human - Deliver pizza - Return to pizzeria
  • 8. Process 1. Human goes to a website 2. Makes their order 3. Enters their name “Joe” 4. The pizza is made and placed in delivery robot 5. Delivery robot is programmed with commands to get to the house 6. Delivery robot delivers pizza and says “Greetings, Joe” 7. Delivery robot returns to base Forward: 50 ft Turn: Right Forward: 300 ft Turn: Left Forward: 10 ft Turn: Left Forward: 5 ft Greet: Joe Deliver: Pizza Return
  • 9. Hijacking a Pizza Robot Forward: 50 ft Turn: Right Forward: 300 ft Turn: Left Forward: 10 ft Turn: Left Forward: 5 ft Greet: Joe Deliver: Pizza Return Expected: Joe Unexpected: Joe Turn: Left Forward: 1 ft Turn: Left Forward: 1 ft Forward: 50 ft Turn: Right Forward: 300 ft Turn: Left Forward: 10 ft Turn: Left Forward: 5 ft Greet: Joe Turn: Left Forward: 1 ft Turn: Left Forward: 1 ft Deliver: Pizza Return
  • 10. What’s happening!? ■ Everything in White is “Code” – programmer supplied – Code is simply special text that tells a system what to do – GPS for a computer ■ Everything in Red is “Data” – user supplied – Data is anything else: text, photos, etc. ■ The programmer assumed the name would not include “Code” – Nobody’s named “Turn” or ”Forward” right? ■ When the user supplied those things the robot wrongly interpreted them as “Code” ■ This is fundamentally the same thing that happens in XSS, Forward: 50 ft Turn: Right Forward: 300 ft Turn: Left Forward: 10 ft Turn: Left Forward: 5 ft Greet: Joe Turn: Left Forward: 1 ft Turn: Left Forward: 1 ft Deliver: Pizza Return
  • 11. XSS & SQLI Time to get real
  • 12. XSS Mixing code and data in the web browser is confusing
  • 13. Cross Site Scripting (XSS) Mixing Code and Data using control characters in the webpage ■ Try this anywhere you control a value on the page – HTML – JavaScript – Headers ■ How is your input being encoded? ■ Test Cases – Change your input – Try <marquee> – Try <script>alert('XSS')</script>
  • 14. What Can You Do with XSS? loginError.action?errorMsg=Sorry%2C+incorrect+username+or+passwo rd.
  • 15. What Can You Do with XSS? loginError.action?errorMsg= </div><h1>Login Moved</h1><p>Please Login at: http://evilportal.com</p>
  • 16. What Can You Do with XSS? loginError.action?errorMsg= <marquee>
  • 17. Why is XSS Possible?
  • 18. When is XSS Possible? www.catsearch.com?search=fluffy
  • 19. When is XSS Possible? www.catsearch.com?search=sadlfkjsadf...
  • 20. When is XSS Possible? www.catsearch.com?search=<script>aler...
  • 21. SQL INJECTION Mixing code and data in databases can be catastrophic
  • 22. SQL Injection ■ Mixing Code and Data using control characters in Database Queries ■ Try this on any input you think may use the database – Textboxes, URL Parameters, dropdowns, hidden fields ■ Start small, build more complex SQL Queries to manipulate the database ■ Test Cases – Does ' Produce an error message? – Think about how to manipulate the SQL command SELECT * FROM USERS WHERE Username = 'joe' AND Password = 'P4S
  • 23. Logging in with SQL Injection SELECT * FROM USERS WHERE Username = 'joe' AND Password = 'P4S$WorD1'; Username joe Password P4S$WorD1 Commentary: Assuming correct username and password the user is logged in Input Values
  • 24. Logging in with SQL Injection SELECT * FROM USERS WHERE Username = 'joe' OR 1=1 #' AND Password = 'P4S$WorD1'; Username joe OR 1=1 # Password P4S$WorD1 Commentary: Password check is commented out. Username is checked and attacker is logged in as ‘joe’ Everything after the # is disregarded Input Values
  • 25. Logging in with SQL Injection SELECT * FROM USERS WHERE Username = 'joe' OR 1=1; Username joe OR 1=1 # Password P4S$WorD1 Commentary: Password check is commented out. Username is checked and attacker is logged in as ‘joe’ 1=1 is always TRUE, so we can replace that SELECT * FROM USERS WHERE Username = 'joe' OR TRUE; Input Values
  • 26. Logging in with SQL Injection SELECT * FROM USERS WHERE Username = 'joe' OR 1=1; Username joe OR 1=1 # Password P4S$WorD1 Commentary: Password check is commented out. Username is checked and attacker is logged in as ‘joe’ Anything OR TRUE is always TRUE SELECT * FROM USERS WHERE Username = 'joe' OR TRUE; SELECT * FROM USERS WHERE TRUE; Input Values
  • 27. Logging in with SQL Injection SELECT * FROM USERS WHERE Username = 'joe' OR 1=1; Username joe OR 1=1 # Password P4S$WorD1 Commentary: Password check is commented out. Username is checked and attacker is logged in as ‘joe’ OR 1=1 # short circuits the entire where clause in this case SELECT * FROM USERS WHERE Username = 'joe' OR TRUE; SELECT * FROM USERS WHERE TRUE; SELECT * FROM USERS; Input Values
  • 28. INJECTION FLAWS ALLOW AN ATTACKER TO INJECT THEIR OWN CODE INTO THE PROGRAM
  • 33. COLDPLAY? I wasn't a big fan of Coldplay before I saw
  • 34. Authentication Issues ■ Many opportunities to make mistakes – Default or test credentials – Not storing credentials properly – Forgetting/Resetting passwords – Not protecting authentication tokens properly – Cookie issues – Not handing user input safely – Loss of credentials – Password reuse – Not checking credentials properly – Changing usernames – Phishing – Failure to use 2FA – Overlap with other vulnerabilities (XSS, CSRF, SQLi, etc.) ■ Verify your users ■ Protect their credentials ■ Protect credential equivalents
  • 35. PRIVILEGE ESCALATION Can I steal your TV through your shed?
  • 36. I want in here I can get in here
  • 37. What’s in a house? ■ TV ■ Computers ■ Electronics ■ Money
  • 38. What’s in a shed? ■ Ladders ■ Bolt cutters ■ Spare keys ■ Drills & Saws
  • 40. Horizontal vs. Vertical Escalation ■ Horizontal Privilege Escalation – Allows one user can access another user’s data ■ Vertical Privilege Escalation – Allows a user to increase their privilege level – Anonymous -> User – User -> Manager – Manager –> Administrator
  • 41. Authentication is not Authorization Authentication ■ Verify a user is who they say they are ■ Validate that user throughout their use of the system – Through cookies or other tokens Authorization ■ Validate what the user should have access to ■ Users, Roles, access controls, or other methods of authorization Both must be accounted for and fail differently
  • 42. INFORMATION DISCLOSURE I bet that guy is in sales, I can tell by his suit
  • 43. A guy walks into a bar… Passive - Observe What’s he wearing? Shoes Hair Wedding ring Dirt under fingernails Scars Active - Start a conversation Where are you from? Siblings? How old are you? Pets? Job?
  • 44. Computers give away information all the time■ Hackers gather that information and use it against us every day ■ Tools and Databases scan and collect this information for easy querying ■ Our job is to protect this information
  • 46. Let’s find some deals! ■ Peel off the tags from some Wonder Bread ■ Apply tags to fancy bread!
  • 48. Everything a computer does starts with input Without input a computer will always do the same thing Input filtering, processing, and blocking sets the stage for everything else
  • 49. CONFIGURATIO N ERRORS Don’t put the locks on the wrong side of the door
  • 50. Doors, Windows, and Locks Installing a door can be difficult to do securely Installing a window so it locks automatically Don’t forget to lock your doors and windows Did you remember all your doors and windows?
  • 52. Many software systems can be configured securely ■ Most software systems don’t come secure by default ■ Insecure use of existing components – The door is installed poorly ■ Insecure configuration of components – The lock is misconfigured ■ Insecure defaults are used – The lock has a reused key or default keycode
  • 53. Lots of ways that software can fail ■ Communication is a great first step ■ Start the conversation ■ Make it memorable ■ Give people an anchor of understanding