Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose...

54
Unix (and Windows) security How security features (mostly access control) are implemented in the OS

Transcript of Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose...

Page 1: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Unix (and Windows) security

How security features (mostly access control) are implemented in the OS

Page 2: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Operating System Security

• Most computers have an operating system• Most Internet services are application processes

running on a multipurpose computer over an operating system

• The original purpose of the operating system is to– Provide common utilities– Abstract hardware and provide I/O interfaces– Limit users' and processes' access

• From security point of view we are studying the implications of– Rogue user– Misbehaving process

Page 3: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Operating System Security Paradigm

• Current multipurpose OSes have two divisions for software to run in– Kernel– User space

• Any programming code in the kernel space has full access to the computer it is running on

• A process running in the user space has access rights based on the User ID it is running under– On Unix UID 0 is reserved for the superuser or root and the kernel

automatically gives this UID complete access• Notice the difference between kernel and superuser access

– Kernel processes can access anything– Root processes can order the kernel to access anything

Page 4: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Unix Users and User Groups

• The system must be able to tell users apart• User number (user id, uid) identifies an user

– Internal information for the operating system– Usually not visible for users– Ordinary users have number > 0 (1 to 99 are used for

different system accounts such as mail, news and sync)– Largest available user number on many systems is 60000

• Every user belongs also to at least one group• Group number (group id, gid) identifies the group

– Also internal information

Page 5: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

User names and /etc/passwd file

• Users are referred to by user names • Every user name points to a user number• Several user names can have the same user number

– The operating system holds these accounts (almost) identical

• /etc/passwd connects user names to numbers– Also NIS, Kerberos...– Passwords are often held in file /etc/shadow– Other mechanisms exist

Page 6: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Format of /etc/passwd

• Fields are separated by colonusername:password:uid:gid:comment:home directory:shell

• Samplesroot:z83c0d958LH2E:0:0:The Superuser:/:/bin/shbin:*:2:2:0000-Admin:/usr/bin:ali:WiqIjY17WlPk6:202:100:Ali Baba:/home/ali:/bin/bashjim:0w93R8u6nJ2NT:205:200:JimJones:/home/jim:/opt/bin/db-app

• Separate accounts for administrator’s own use and administrator as root (shadow password system used here)root:x:0:0:Big Brother Watching You:/:/bin/shrckent:x:0:108:Clark Kent as root:/:/bin/shckent:x:108:108:Clark Kent:/home/ckent:/usr/bin/bash

Page 7: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

/etc/passwd

• User name (login name)• Password, encrypted

– usually modified DES (MD5 is becoming quite common)– one way function, it is impossible to decrypt the password– at login the entered password is encrypted and compared to

file• User id (number)• Login group id (number)• GCOS (Comment, usually real-life name)• Home directory• Program to be executed at login, usually shell

Page 8: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

System Administrator’s Accounts

• Everybody shares the root account (bad)• Everybody has their own root account (uid 0,

username something else)• Root access enablers

– sudo, ena

Page 9: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Using Permissions

• A file has owner and group id (sometimes several)• A process has owner and group id (sometimes

several)• Kernel verifies permissions before executing system

calls– If owner uid=0 (root), everything is allowed– Otherwise the uid and gid of the process and object are

compared in this order and permission for the operation is searched for based on owner, group and other (world) rights

Page 10: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Unix file permissions

• Permissions– r Read– w Write– x Execute or reference (for directories)

• For – Owner (User)– Group – World (Others)

• This file may be edited (rw) by its owner, read by the members of the "titu" group and not read by others-rw-r----- 1 kiravuo titu 7627 Oct 1 12:50 exam

• This file may be edited by anybody:-rw-rw-rw- 1 root root 12987 Sep 7 19:34 /etc/passwd

Page 11: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Unix permission levels and bits

• The information is coded in two bytes in the inode of the file

Bit 15 Bit 0xxxx s s t r w x rwx rwx

| | | | permissions for others| | | permissions for group| | | owner’s x-permission| | owner’s write permission| | owner’s read permission| sticky bit| sgid bitsuid bit

file type (-, d, c, b, l, s, p)

Page 12: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Processes

• A process is a data structure in the computer's memory• It has

– Program code to be executed– Data area– Stack– Associated data (owner, open files etc.)

• The operating system tells the CPU to execute the program code

• If the CPU architecture supports it, the process can usually access only its own memory area– Interprocess communications require that a specific mechanism is

set up• The process communicates to the kernel through system calls

Page 13: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Suid and Sgid Mechanisms

• Usually a process (program) inherits the properties of the parent process – In most cases shell

• Suid and sgid bits in file permissions allow executing a program with the file owner and group IDs– Necessary for Unix to work, for example the passwd

command, which is owned by root and allows an user to change his or her password

Page 14: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Creating a Suid Program

• Easy:chmod +s program

• orchmod 4111 program

• no read permission

• The program is responsible for limiting the acts of the user

• A shell script should never be made a suid program– Read it again: NEVER– This a hole that is trivial to exploit

Page 15: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Changing passwords

• Passwords are changed using the program /bin/passwd– Users can change only their own password, requires old

password– root user can change any password

# passwd username

• Password files not writable (not even root), how does changing password work?-r-s--x--x 1 root sys 15688 Oct 25 1995 /bin/passwd-r--r--r-- 1 root sys 7627 Oct 1 12:50 /etc/passwd

-r-------- 1 root sys 3292 Oct 2 15:14 /etc/shadow

Page 16: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Different UIDs

• Real UID (RUID): UID of the user running program• Effective UID (EUID): UID of user with whose

privileges the program runs– SUID bit effects this– Access permission tests in system calls etc. use this

• These allow quite complicated swapping between UIDs

Page 17: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Sample

• User riku executes the following program:-r-s--x--x 1 root sys 15688 Oct 25 1995 /bin/passwd

• The UIDs will be set as follows– RUID: riku– EUID: root

Page 18: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

UID-related system calls

• getuid() - returns RUID• geteuid() - returns EUID• setuid(uid) - set UID

– If EUID == root, sets RUID, EUID– If not root, sets EUID if certain conditions are met

• setruid(uid) - sets RUID• seteuid(uid) - sets EUID

Page 19: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Handling names vs. IDs

#include <pwd.h>struct passwd *pwp;char *user_name;

• Get first user with given UID:pwp = getpwuid(getuid());user_name = pwp->pw_name;

• Get first user with given name:pwp = getpwnam(user_name);uid = pwp->pw_uid;

• Likewise, with groups– The data structures are a bit more complicated because of

multiple membership

Page 20: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Security vulnerabilities in Unix

• A security vulnerability potentially gives a user possibility to do things that are not allowed to him

• Reasons for vulnerabilities are– installation errors– implementation flaws on system programs– design flaws

• Typical vulnerabilities are bugs in suid-programs or network daemons

• Major problem in Unix is weak design and reliance on root– Everything must run as root, root has access to everything– No easy ways to limit risks

Page 21: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Bugs in Unix programs

• Bugs that endanger security have been found from all layers of system: kernel, utilities and applications

• More are found occasionally• All programs that are not trivial contain bugs and

some of these cause security holes• Most typical mistake is buffer overflow

– Input is not treated with enough suspicion

Page 22: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Different attackers

• Outside intruder who tries to cause harm to system• Outside intruder who tries to get access to system

(root priviledges are most wanted)• Local user who wants to get more rights than he has• Local user who misuses his priviledges• Malware: virus, worm, trojan horse

Page 23: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Different attacks

• Getting user name and password (by guessing or by some other means)– clean guess or systematically trying– Social engineering (strong weapon)– It is easier to get more priviledges from inside a computer

• Portscanning– Tries to find out services that are running on a machine (and

security vulnerabilities)

• Finding implementation flaws from programs• Sniffing

– listening to net traffic and catching passwords– all unprotected communication can be sniffed

Page 24: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Guessing passwords

• About 25% of passwords are easy to guess– names, birth dates, phone numbers...– words (from english or local language)– etc.

• Login name and users name can be resolved e.g. using finger

• Terminal connection and pure guess might succeed• More efficient way is to get password file and

compare it to own list of encrypted passwords (using crack)

• Sometimes password can be found from a note (e.g. below keyboard)

Page 25: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Root kits

• Intruders typically install a "root kit"– Replaces standard system binaries with ones that hide the

intrusion– System administrator should have correct binaries on non-

writable media (CD, write protected diskette)

• Changed system binaries can be detected with programs like Tripwire– Unless the attacker installs a weak root kit as deception and

the actual root kit is a kernel module...– Must be kept on secure media itself

Page 26: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Installing Unix

• Standard installations are now days somewhat reasonable– Blatant holes are rare

• Debug-accounts• + in hosts.equiv• World-writeable /etc/passwd

– Usually too many services are installed by default– Default user profiles may have . in $PATH

• The system should be checked after installation– Read manuals and READMEs– Go through /etc-directory– Check out user profiles

Page 27: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Installing (free) Software

• Verify the source and distribution of the software– Be careful on sources– Most network distributed software comes now with

cryptographically signed checksums• Do not get the key from the same source

• Plan a directory structure that supports several versions

• Read the documents• Have a separate host and network segment for

testing the software• Follow discussions, do not be the first to test

Page 28: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Upgrading Unix and Software

• Many upgrades mess up settings– /etc/passwd usually unchanged– Anything else might go...

• sendmail configuration• inetd.conf

• While upgrades may fix old problems they may introduce new ones– Upgrades should be reversible– Soft links are a handy way to manage different versions

• Verify the source of upgrade– We have not seen fake OS upgrades sent to customers, yet

Page 29: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Following Announcements

• Security problems are announced either when they are found or when they are fixed– Often several months in between

• Reading CERT mailing list is the minimum requirement– CERT announces problems only when a solution is available

• Bugtraq and other lists are faster– More work to weed through

• OS vendors might announce fixes also– User’s product and vendor-specific mailing lists are worth

joining

• Mailing lists can be directed to intranet, filtered etc.

Page 30: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Be Careful of These

• Accounts with no password, group ID 0• Unnecessary suid-programs• PATH-environment variable• Protection of directories and files

– Home directories– Device files– System programs and configuration files

• Hidden directories• Physical protection of servers and workstations

Page 31: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Internal Threats

• Can all users be trusted?– Shell access gives an internal view to system, makes

breaking security easier

• Unix was not designed from start to be secure• Unix vendor's own special features

– Access control lists (ACL)– Hidden passwords– Usually add-ons– Not always reliable and problem free

Page 32: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

File Permissions

• Monitoring system file permissions is recommended– Cops– SUID tai SGID:

find / -perm -4000 -o -perm -2000find / -perm +4000 -o -perm +2000find / -user root -perm +0022

• Find has some variations between Unixes

• Some files should not be readable or writable to world (e.g. /etc/shadow, /dev/hda)

Page 33: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Some More Attacks

• There are scanners, which search for known faults inside systems

• Buffer owerflows are a typical fault• Race conditions, e.g.:

– Find a (root) process which creates a temporary file and reads it back

– After the process has checked that the file is only root readable, dele the the file and replace with a symlink to a file you want to read

if (access(file, R_OK) != 0) {exit(1);

}fd = open(file, O_RDONLY);// do something with fd...

• Code from: Wikipedia.org, "Time-of-check-to-time-of-use"• And so on

Page 34: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Windows security

• Windows NT family– 2000, XP, Vista, 7– Windows 3.1, 95, 98 etc. are different

• Here compared to Unix• Windows NT design team has famous VMS

background• While Windows is not related to Unix, the differences

are mostly in details • Also, Unix has minicomputer/server background,

Windows microcomputer/networked workstation background

Page 35: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Windows Configuration

• Unix configuration is spread in many text files – Many, not all in the /etc directory– Some have their own APIs (like /etc/passwd)

• Windows has the registry database that is accessed through an API

• The centralized registry makes it easier to manage many hosts through the Windows Active Directory system– Similar tools exist for Unix, but the implementation is

different

Page 36: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Windows Users

• Users are identified by a Security ID (SID)– A pseudorandom user ID and– A domain identifier

• Each user belongs to a particular domain, an administrative area– Domains are an important concept in Windows regarding

networks and administration of networked machines

• Groups are identified by SIDs, contain SIDs (users and other groups)

Page 37: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Windows Processes (Subjects)

• A process has owner SID and additional data, like Unix– Group SIDs– Privileges related to Windows services, like backups and

logging

Page 38: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Windows Files (Objects)

• Files' access rules are described in a security descriptor– Owner SID– An Access Control List (at user's discretion), DACL– A System Access Control List that can enforce actions, like

generating an audit log

• The DACL provides great granularity in control– A list of user and group SIDs (Unix provides only one group)– Read, write and execute rights– Also access rights to attributes, append-only write, delete

Page 39: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Windows Reference Monitor

• Checking the access rights is also more complex than in Unix– As the rights control are more detailed

• The "object manager" has to parse the request in regard of the DACL

• Like Unix, the reference monitor functionality is implemented in the kernel

Page 40: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Hardware Possession and Control

• Generally computing takes place in some kind of computing hardware

• Typical active parts are– CPU– Memory

• ROM, RAM, fixed and removable storage (disks)– I/O devices

• Display, keyboard, communications, extension ports• In most systems the hardware (and operating system) are

considered trusted, as not trusting them would make the system pointless– There is also information that is not allowed to be processed on

computers at all

Page 41: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Workstation Problems

• In traditional general purpose computing the authorized user is given access based on passwords or some other kind of user authentication

• However workstation computers are often in the complete physical control of the user

• Anybody who has access to the computing device may perform different kinds of actions on it– Steal the computer or parts of it– Reboot the computer from the user’s own media and bypass the

operating system security– Break physical security measures to access various parts of the

device• E.g. remove the hard disk to be read on another computer or to

add software, giving control to the user• Install eavesdropping devices inside the computer

Page 42: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Securing Workstation Computers

• Generally the computer must be protected from theft, vandalism, opening, booting with another media

• Sometimes an authorized user must be prevented from using transportable media devices– Disks, writable CD-ROMs– USB-, PCMCIA-, parallel port hard drives– Digital cameras

• Remember that the operating system access permissions do not prevent accessing files on disks, if that computer is booted with the attacker's own media or if the disks are removed and installed to another computer

• Solutions are in the family of physical security and often include computer case locks, chains, epoxy and video monitoring

Page 43: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Emission Security

• All electrical devices that cause variations in the flow of electricity create some kind of electromagnetic radiation

• General purpose computers are really radio transmitters with several transmission frequencies– CPU and bus clock– Peripheral transmission rates– Especially the video display (of CRT type)

• The basic transmissions are modulated by the data being processed

• The connections to the peripherals are often also antennas– Mouse and keyboard cords

• The attacker may extend the range of attack by using directionalantenna

Page 44: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Controlling the Computer Emissions

• Tempest is a non-public US military standard that is often used to refer to computing devices with emission control– Roughly can be said to require enclosing the whole

computer in a Faraday cage – Controlling the display emissions is a special problem

• Mostly used by the military• Emission control is currently considered too

expensive for most civilian applications– Always a subject to change in the future

Page 45: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Protection From Outside Emissions

• Inserting data (breaking) to a computing device by radiating energy to keyboard and mouse cords is not a known attack

• Destroying computing hardware with a strong electromagnetic pulse (EMP) is a known attack– Can be created by a nuclear detonation– Can be protected against by shielding like other emissions

• WLAN, Bluetooth, IR-ports etc. are possible venues for an attack– As the sender can use as much power as they wish, plain

distance is not a protection

Page 46: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Tamper Resistant Hardware

• Problem: hardware is given to end users, but the contents should remain in the control of the owner or originator of the hardware– Telephone SIM cards– Smart cards (used for access, TV decoders, ID, money...)– Cryptographic password tokens (eg. SecurID)– Car computers– Public ATM machines

• One solution is tamper detection with e.g. seals– Especially if the problem domain allows rollback, meaning

that the effects of the tampering can be reversed

Page 47: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Smartcards

• A plastic card with a CPU and non-volatile memory• Can store information and perform low-end

processing• Draws power from the host terminal, often also a

clock pulse• Communicates with the host terminal• Suomeksi: toimikortti

Page 48: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Smartcard Attacks

• The data on a smartcard (often a crypto key) can be extracted using several methods– Gaining access to the circuitry and by reading the data as it is

transferred from the memory to the CPU• Requires shaving the protective layers of the card or careful

drilling– Monitoring the power consumption of the card and deducing the

key as it is used by clever mathematics (e.g. Chinese Reminder Theorem)

– Interrupting the operation of the smart card by tampering with the operating voltages or the clock signal

• With simple money cards it is often enough to prevent change to the memory– The attacker can try to filter out the EEPROM write voltage

• Smartcards are getting better all the time, but they are not invulnerable

Page 49: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Protecting Data From Hardware Failures

• All mass media storage devices with moving parts are sure to fail– Backups are used to store the data in a secure location– Redundant Arrays of Inexpensive Disks (RAID) distribute the

data to several physical disks using an error correcting code• Failure of a single disk should not cause any data loss• Beware of manufacturers with good quality control,

multiple failures over a weekend are not unknown• Power spikes or blackouts are no good for data• All kinds of devices fail, e.g.. tape drive’s writing

heads– Experienced system administrators also read the tapes

besides just writing to them

Page 50: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Backup Computing

• Part of continuity planning • Backup media storage location is important

– A physical location that is unaffected by anything that might destroy the main location is preferred

• Physical security requirements are thus doubled• Bank vaults are usually a good choice for backup tapes

– Magnetic media is sensitive to temperature• Ordinary safes are not enough to protect magnetic tapes

from fire• Entire backup computer systems are sometimes used

– Expensive– Enable the business to continue almost immediately– Hot or cold backup

Page 51: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Secure Computing Architectures

• Multilevel secure systems can limit information flow between levels– The levels might be different operating system levels or– Different users or user groups

• Generally the CPU should provide protection to these levels– Some CPUs have complex multilevel structures

• However the protection achieved depends also on the operating system– Most general purpose operating systems do not provide very good

security or do not use the features of the CPU• Virtual machines are a low cost approach towards separating

users/tasks/data from each other– However virtual machines are not unbreakable

Page 52: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Looking at the Big Picture

• Once again, security comes from planning• Specify the requirements with customers

– Makes it easier to define what software is actually needed and anything else can be left out

– Helps to avoid creeping featurism of growing requirements• Make a realistic plan reflecting the likelihood of various threats

realizing and their effects (risk analysis)• Build defense in depth and limit the risk

– If a SIM of a telephone company is broken, copied, re-engineered or whatever, the maximum potential risk is that some telephone calls are made from one telephone

• The SIM is only used to authenticate the user• Multiple SIMs in the network will trigger the fraud detection

Page 53: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Summary

• Operating systems have many moving parts and only one of them has to fail to break security

• Hardware in the user's hands can not be trusted completely

• Besides good planning, as prof. Alastor Moody recommends, "Constant vigilance" is required from the system administrator

Page 54: Unix (and Windows) security - TKK - TML · Unix (and Windows) security ... • The original purpose of the operating system is to ... • Local user who misuses his priviledges •

Sample exam questions

• What is SUID (1p)• Why is SUID needed (2p)

– to allow user perform actions, that are necessary, but would break the security model

– to extend the security perimeter to individual pieces of software, that act as gatekeepers to allow certain actions