lectures.alex.balgavy.eu

Lecture notes from university.
git clone git://git.alex.balgavy.eu/lectures.alex.balgavy.eu.git
Log | Files | Refs | Submodules

simple-attacks.md (811B)


      1 +++
      2 title = 'Simple attacks'
      3 +++
      4 # Simple attacks
      5 Program behavior depends on:
      6 - code being run
      7 - data being processed
      8 - environment in which it runs
      9     - e.g. setting `$PATH`, `$HOME`
     10 
     11 find a target:
     12 - privileged code we can manipulate
     13 - vulnerabilities:
     14     - deployment: privilege level, file access
     15     - implementation: input handling, error handling, assumptions on order of execution
     16 
     17 File system attacks, e.g. symbolic links which aren't checked, or which can change between calls (time-of-check to time-of-use attack -- that's why `access()` is insecure)
     18 - better to open file, then check using file handle
     19 - or drop privilege whenever possible
     20 
     21 Principle of least privilege: every program and privileged user of system should operate using the least amount of privilege necessary to complete the job