Security Flashcards
What is security?
Maintaining desired properties in the presence of adversaries
What does the CIA Model stand for?
Confidentiality - Info is only disclosed to authorized people
Integrity - Info is modified in allowed ways by authorized parties & do what is expected
Availability - Those authorized for access are not prevented from it
What is an example of each issue in CIA?
C - information leaks
I - Data Corruption
A - Denial of service
CIA - Remote execution
What are some attack vectors in buggy software?
XSS SQL Injection Buffer Overflow Path Replacement Integer Overflow Race Conditions Unsanitized Format Strings
Why do security issues slip through despite our testing? What can we do about it?
We cannot test everything
Concessions form part of an attack surface
We need additional policies and testing methods specifically for security
What are 3 groups of attacks?
Insecure Interaction
Risky Resource management
Porous Defenses
In regards to unsafe memory, what can a dangling or out of bounds pointer cause?
Code corruption due to change in code
Control Flow Hijack due to change in code pointer
Data Only Attack due to change in data
Info Leak by just outputting data
How can we prevent code corruption? What problems could this create?
Use the NX bit to make something executable not writeable and vice versa.
This could be incompatible with JITs or JavaScript on the web
How can we prevent control flow hijacking? What are the issues for these methods?
Include a stack canary in your stack. If it is modified, abort immediately. Issue: Hacker could leak canary before hijacking
Data Execution Prevention (DEP). If the injected code is above the return address in the stack, abort execution because it’s writeable, but not executable. Issue: Can be turned off and hijacker can use existing code
What is return oriented programming?
Build new functionality from pieces of existing functions
What is address space layout randomization? Why is it easily broken?
Randomizing locations of certain addresses in the stack.
Leaking a single address of libc, for example, means everything in libc can be used
What is control flow integrity?
Restricting indirect control flow to needed targets. Say it’s valid to only go to certain locations by analysing the source code.
“if this is a function pointer, here are the functions it can point to”
This is a defense analogous to stack canaries
Vulnerabilities mostly come from ______, ______, and _______
reading, writing, freeing
In Java, memory vulnerabilities are not a big issue due to what? However, you can still execute unsafe code since most code today is not written in a single language.
Managed memory + bounds checking on pointers
What is a SQL injection?
Injecting executable SQL when a program prompts you for values that will be put into a table