Lecture 28 Special Topics III (Python Pickling)
- Questions
- What is hackable?
- Everything
- Security is important for physical safety
- Security Principles
- Know your threat model and what resources they have
- Common Assumptions for attackers
- has the resources required to mount the attack
- can get lucky
- Trusted Computing Base
- The components of a system that the security relies upon
- generally make it smaller
- KISS principle: Keep it simple, stupid
- Consider Human Factors
- if a security system is unusable, it will be unused
- C and C++ is not memory safe
- Security is Economics
- Cost/Benefit analysis, defense should be proportional to attack
- More security costs more
- $10 lock on $1 item
- Detect if you can’t prevent
- deterrence: stop attack before it happens
- prevention: stop attack as it happens
- detection: learn there was an attack afterwards
- response: do something about the attack
- mitigation and recovery
- have resources like emergency food supply
- offsite backups
- Defense in Depth
- multiple types of defenses should be layers together
- Least privilege
- consider what permissions a program needs to do its job correctly
- Separation of Responsibility
- considering requiring multiple parties to work together to exercise it
- Exercise Complete Mediation
- ensure that every access point is monitored and protected
- The time-of-check to time-of-use
- Shannon Maxim
- the enemy knows the system
- Using fail-safe defaults
- balancing security with usability
- Design in security from the start
- start with security when you start
- What is a system call?
- Languages and memory
- Pieces of information are stored at an address within a computer memory
- User vs Administrator
- only admin can access the “vital organs” of your computer
- Serialization
- Pickling is the process where a Python object hierarchy is converted into a byte stream
- byte stream store state of object
- you want to save your program state
- reduce method
- intended to reconstruct objects
- unpacking and repacking in python
- Vulnerabilities in pickle
- attack provides malicious code to be deserialized
- Detection and Defenses: Serialization
- can an attacker ever provide input to these functions
- don’t unpickle untrusted data