OS Security Memory

OS Security Memory

OS Security Memory Radboud University Nijmegen, The Netherlands Winter 2014/2015 I Access to resources only from kernel space through system calls I Kernel modules can extend kernel functionality at runtime I UNIX paradigm: “everything is a file” I Special file handles for stdin, stdout, stderr I Devices are handled through device files I Reading and writing kernel parameters through pseudo-filesystems in /proc and sys I Symbolic links, directories, pipes are all implemented through file handles I Management of permissions in UNIX uses DAC model (as opposed to MAC) I Processes have associated user ID and group IDs I Files have access rights (read,write,execute) for owner,group,other I Special flags associated to files, in particular setuid flag I Setuid programs are run with effective UID of the owner I Particularly important: setuid-root programs (have to be very careful!) I Extension to classic access rights: ACLs A short recap I Central task of OS is to manage access of subjects (processes) to objects (files) OS Security – Memory2 I UNIX paradigm: “everything is a file” I Special file handles for stdin, stdout, stderr I Devices are handled through device files I Reading and writing kernel parameters through pseudo-filesystems in /proc and sys I Symbolic links, directories, pipes are all implemented through file handles I Management of permissions in UNIX uses DAC model (as opposed to MAC) I Processes have associated user ID and group IDs I Files have access rights (read,write,execute) for owner,group,other I Special flags associated to files, in particular setuid flag I Setuid programs are run with effective UID of the owner I Particularly important: setuid-root programs (have to be very careful!) I Extension to classic access rights: ACLs A short recap I Central task of OS is to manage access of subjects (processes) to objects (files) I Access to resources only from kernel space through system calls I Kernel modules can extend kernel functionality at runtime OS Security – Memory2 I Management of permissions in UNIX uses DAC model (as opposed to MAC) I Processes have associated user ID and group IDs I Files have access rights (read,write,execute) for owner,group,other I Special flags associated to files, in particular setuid flag I Setuid programs are run with effective UID of the owner I Particularly important: setuid-root programs (have to be very careful!) I Extension to classic access rights: ACLs A short recap I Central task of OS is to manage access of subjects (processes) to objects (files) I Access to resources only from kernel space through system calls I Kernel modules can extend kernel functionality at runtime I UNIX paradigm: “everything is a file” I Special file handles for stdin, stdout, stderr I Devices are handled through device files I Reading and writing kernel parameters through pseudo-filesystems in /proc and sys I Symbolic links, directories, pipes are all implemented through file handles OS Security – Memory2 I Processes have associated user ID and group IDs I Files have access rights (read,write,execute) for owner,group,other I Special flags associated to files, in particular setuid flag I Setuid programs are run with effective UID of the owner I Particularly important: setuid-root programs (have to be very careful!) I Extension to classic access rights: ACLs A short recap I Central task of OS is to manage access of subjects (processes) to objects (files) I Access to resources only from kernel space through system calls I Kernel modules can extend kernel functionality at runtime I UNIX paradigm: “everything is a file” I Special file handles for stdin, stdout, stderr I Devices are handled through device files I Reading and writing kernel parameters through pseudo-filesystems in /proc and sys I Symbolic links, directories, pipes are all implemented through file handles I Management of permissions in UNIX uses DAC model (as opposed to MAC) OS Security – Memory2 I Special flags associated to files, in particular setuid flag I Setuid programs are run with effective UID of the owner I Particularly important: setuid-root programs (have to be very careful!) I Extension to classic access rights: ACLs A short recap I Central task of OS is to manage access of subjects (processes) to objects (files) I Access to resources only from kernel space through system calls I Kernel modules can extend kernel functionality at runtime I UNIX paradigm: “everything is a file” I Special file handles for stdin, stdout, stderr I Devices are handled through device files I Reading and writing kernel parameters through pseudo-filesystems in /proc and sys I Symbolic links, directories, pipes are all implemented through file handles I Management of permissions in UNIX uses DAC model (as opposed to MAC) I Processes have associated user ID and group IDs I Files have access rights (read,write,execute) for owner,group,other OS Security – Memory2 I Extension to classic access rights: ACLs A short recap I Central task of OS is to manage access of subjects (processes) to objects (files) I Access to resources only from kernel space through system calls I Kernel modules can extend kernel functionality at runtime I UNIX paradigm: “everything is a file” I Special file handles for stdin, stdout, stderr I Devices are handled through device files I Reading and writing kernel parameters through pseudo-filesystems in /proc and sys I Symbolic links, directories, pipes are all implemented through file handles I Management of permissions in UNIX uses DAC model (as opposed to MAC) I Processes have associated user ID and group IDs I Files have access rights (read,write,execute) for owner,group,other I Special flags associated to files, in particular setuid flag I Setuid programs are run with effective UID of the owner I Particularly important: setuid-root programs (have to be very careful!) OS Security – Memory2 A short recap I Central task of OS is to manage access of subjects (processes) to objects (files) I Access to resources only from kernel space through system calls I Kernel modules can extend kernel functionality at runtime I UNIX paradigm: “everything is a file” I Special file handles for stdin, stdout, stderr I Devices are handled through device files I Reading and writing kernel parameters through pseudo-filesystems in /proc and sys I Symbolic links, directories, pipes are all implemented through file handles I Management of permissions in UNIX uses DAC model (as opposed to MAC) I Processes have associated user ID and group IDs I Files have access rights (read,write,execute) for owner,group,other I Special flags associated to files, in particular setuid flag I Setuid programs are run with effective UID of the owner I Particularly important: setuid-root programs (have to be very careful!) I Extension to classic access rights: ACLs OS Security – Memory2 I LD_LIBRARY_PATH is not inherited for programs with setuid bit set I PATH variable is still inherited I Custom variables are still inherited I Can try all this easily with a C program using getenv I Cannot try this with a shell script I Shell scripts won’t execute setuid (even if you set the bit) IFS and LD_LIBRARY_PATH I Attack against system("/bin/date") does not work anymore I IFS environment variable is no longer inherited by shells OS Security – Memory3 I PATH variable is still inherited I Custom variables are still inherited I Can try all this easily with a C program using getenv I Cannot try this with a shell script I Shell scripts won’t execute setuid (even if you set the bit) IFS and LD_LIBRARY_PATH I Attack against system("/bin/date") does not work anymore I IFS environment variable is no longer inherited by shells I LD_LIBRARY_PATH is not inherited for programs with setuid bit set OS Security – Memory3 I Can try all this easily with a C program using getenv I Cannot try this with a shell script I Shell scripts won’t execute setuid (even if you set the bit) IFS and LD_LIBRARY_PATH I Attack against system("/bin/date") does not work anymore I IFS environment variable is no longer inherited by shells I LD_LIBRARY_PATH is not inherited for programs with setuid bit set I PATH variable is still inherited I Custom variables are still inherited OS Security – Memory3 I Cannot try this with a shell script I Shell scripts won’t execute setuid (even if you set the bit) IFS and LD_LIBRARY_PATH I Attack against system("/bin/date") does not work anymore I IFS environment variable is no longer inherited by shells I LD_LIBRARY_PATH is not inherited for programs with setuid bit set I PATH variable is still inherited I Custom variables are still inherited I Can try all this easily with a C program using getenv OS Security – Memory3 IFS and LD_LIBRARY_PATH I Attack against system("/bin/date") does not work anymore I IFS environment variable is no longer inherited by shells I LD_LIBRARY_PATH is not inherited for programs with setuid bit set I PATH variable is still inherited I Custom variables are still inherited I Can try all this easily with a C program using getenv I Cannot try this with a shell script I Shell scripts won’t execute setuid (even if you set the bit) OS Security – Memory3 Shellshock I Environment variables can be dangerous because they allow (potentially unintended) data flow I Even worse if environment variables are badly parsed: http://digg.com/video/ the-shellshock-bug-explained-in-about-four-minutes OS Security – Memory4 I Environment variables do not support functions, just strings I The newly launched bash looks for variables that “look like a function” I Parsing things that “look like a function” goes wrong More Shellshock background I The bash

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    106 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us