Computer Security
44 flashcards · Computer Science · by Athena Papkouf
when is a system secure?
A system is “secure” if an adversary constrained by a specific threat model cannot violate the security policy
computer security definition
Properties of a computer system must hold in the presence of a resourced strategic adversary
security properties
Confidentiality integrity availability Authenticity Anonymity Non-repudiation
security policy
a high level description of the security properties that must hold in the system in relation to assets and principals.
threat model
describes the resources available to the adversary and their capabilities (observe, influence, corrupt,…)
Economy of mechanism
“Keep the [security mechanism / implementation] design as simple and small as possible
Trusted Computing Base
Every component of the system on which the security policy relies.
Fail-safe defaults
“Base access decisions on permission rather than exclusion
Complete mediation
“Every access to every object must be checked for authority
Open design
The design should not be secret
Separation of privilege
No single accident, deception, or breach of trust is sufficient to compromise the protected information
Least privilege
“Every program and every user of the system should operate using the least set of privileges necessary to complete the job
Least common mechanism
Minimize the amount of mechanism common to more than one user and depended on by all users
Psychological acceptability
It is essential that the human interface be designed for ease of use, so that users routinely and automatically apply the protection mechanisms correctly
Work factor
Compare the cost of circumventing the mechanism with the resources of a potential attacker
Compromise recording
“Reliably record that a compromise of information has occurred [...] in place of more elaborate mechanisms that completely prevent loss
Malware taxonomy
Virus
infects programs to monitor / steal / destroy cannot survive without the host same permissions as the host
Virus – defenses
Antivirus Software Signature-based detection Heuristics Sandboxing
Worm
Self-replicating computer program that uses a network to send copies of itself to other nodes Does not need a host program to execute
Worm – defenses
Host-level Protecting software from remote exploitation Achieve diversity to increase protection Antivirus Network-level Limit the number of outgoing connections firewall
Trojan Horse
Malware that appears to perform a desirable function but it also performs undisclosed malicious activities
Rootkit
Adversary controlled code that takes residence deep within the trusted computing base of a system
botnet topologies
Star Topology single point of failure P2P Topology Difficult management (No Command and Control) Vulnerable to attacks in which too many bots are taken over Hybrid
Botnets: defense
Attack C&C infrastructure Honeypots
types of privacy depending on who is the adversary
The adversary are others (Social Privacy) CONCERNS - The privacy problem is defined by Users GOALS - Do not surprise the user LIMITATIONS Only protects from other users: trusted service provider! Limited by users’ capability to understand policies The provider may be adversarial (Institutional Privacy) CONCERNS - The privacy problem is defined by Legislation GOALS – Compliance with data protection principles LIMITATIONS Never questions collection – assumes it is necessary Trusted service provid…
network security properties
Naming security: The association between lower level names (eg. network addresses) and higher level names (e.g. Alice / Bob) must not be influenced by the adversary Routing security: The route over the network and the eventual delivery of messages must not be influenced by the adversary Session security: Messages within the same session, cannot be modified (keep ordering and no adding/removing messages) Content security: The content of the messages must not be readable or influenced by adversar…
ARP spoofing - Defenses
Use of static, read-only entries for critical services in the ARP cache of a host Use ARP spoofing detection and prevention software
DNS spoofing – Attacks
Cache poisoning: corrupt the DNS resolver with fake pairs (IP,domain) DNS Hijacking: corrupt the DNS responses (man in the middle) with fake pairs
DNS spoofing – Defenses
provide origin authentication, DNS responses are digitally signed by authoritative resolvers – prevents poisoning! DNS queries over HTTPS connection
BGP Hijacking
– An adversary controls or compromises a router somewhere on the Internet – Injects false low-cost routes to redirect portions of traffic to themselves – The routing information propagates to routing tables until it expires
BGP Spoofing - Defenses
Filtering could alleviate (some routes should really not come from some routers). Each autonomous system is given a certificate that links its verification key to its IP blocks. Updates are only accepted if they are signed by the authority for the AS/IP Block.
IPSec - Internet Protocol Security
– Key exchange based on public key cryptography or shared symmetric keys – Authentication Header (AH): authentication & integrity (HMAC), protection from replay attacks (sequence number) – Encapsulating Security Payload (ESP): confidentiality
modes of IPSec
– Transport: protects IP packet payload using AH/ESP sent with the original IP headers – Tunnel: protects the whole packet
difference between VPN and proxy
proxy : Encrypted traffic end-to-proxy Proxy separates two networks VPN: Encrypted traffic end to end Acts as one network
Firewalls - Simple packet filter
Inspect each packet in isolation and Reject/Allow depending on certain “rules”
Stateful Firewalls
can Reject/Allow depending on the state
DEEP PACKET INSPECTION
evaluate the content, and allow/ reject based rules can be stateful or stateless
software security defenses
• Data Execution Prevention (DEP) • Address Space Layout Randomization (ASLR) • Stack canaries • Safe exception handlers
types of manual testing
Exhaustive: cover all inputs Not feasible due to massive state space Functional: cover all requirements Depends on specification Random: automate test generation Incomplete (what about that hard check?) Structural: cover all code Works for unit testing
types of automated testing
Static analysis Analyze the program without executing it Imprecision by lack of runtime information, e.g. aliasing Symbolic analysis Execute the program symbolically Keeping track of branch conditions Not scalable Dynamic analysis (e.g., fuzzing) Inspect the program by executing it Challenging to cover all paths
Address Sanitizer
AddressSanitizer (ASan) detects memory errors. It places red zones around objects and checks those objects on trigger events. Out-of-bounds accesses to heap, stack and globals Use-after-free Use-after-return (configurable) Use-after-scope (configurable) Double-free, invalid free Memory leaks (experimental) slowdown is 2x
Undefined behavior Sanitizer
UndefinedBehaviorSanitizer (UBSan) detects undefined behavior. It instruments code to trap on typical undefined behavior in C/C++ programs. Detectable errors are: Unsigned/misaligned pointers Signed integer overflow Conversion between floating point types leading to overflow Illegal use of NULL pointers Illegal pointer arithmetic ... Slowdown depends on the amount and frequency of checks.
properties of mitigation
effectiveness, efficiency, compatibility