CS 111 - Scribe Notes

Final Lecture — June 4th, 2008

By Charles Ju and Matthew Snider

Security: Threats

Modeling and Classification
  1. insiders
  2. social engineering
  3. network attacks
    • virus/DBD (drive by downloads, 10% of websites, 2007 estimate)
    • DoS Attacks (Denial of Service)
    • Buffer overruns
  4. device attacks
    • virus on CD-R or USB
    • dongles on keyboard
General Functions Needed in Security Mechanisms
Authentication
prevents masquerading
external authentication (for initial access) internal authentication (for later access within the system, for efficiency)

External Authentication is based on: who the principal is (e.g. brain scan)
something the principal has (ID token)
something the principal knows (passwords)

Authentication Building Blocks
Assume shared secret key, K
A ⇒ B
{I'm Alice}K
B ⇒ OK (vulnerable to a capture and replay attack)
Solved using a nonce (noise ora randomly generated key)
A ⇒ B
I'm Alice
B ⇒ A Nonce
A ⇒ B {Nonce}K
B ⇒ A OK
Using Public Keys
A ⇒ B
{NonceAHi, I'm Alice}UB
B ⇒ A {NonceANonceB}UA
A ⇒ B {NonceBKsession}UB
  Ksession is a symmetric key just for this conversation
Authenticating a packet in a bulk transfer
HMAC algoritm (assumes shared key K):
SHA1( (kpad1)SHA1( (Kpad2 )M) ) ⇒ 160 bits
Gives you:
  1. Authentication
  2. Integrity
Weakness of SHA1 Prevented by HMAC padding
Given
Getting
M SHA1( M glitch )
Authorization
Who has what permission?
Traditional Linux:
  user group(s)   user
rwx
group
rwx
other
rwx
    per process   per file
ACLs (Access Control Lists)
	for each principal (e.g. user)
		for each object (e.g. file)
			for each type of access (e.g. read, write, rename)
				allowed or not allowed
	
Problems with ACLs: in UNIX defaults are decied by: ACLs originated on Windows NT (now on Solaris, some Linux*)
Solaris: log into Seasnet
		$ getfacl .
		user::rwx
		group::r-x
		other::r-x
		myta::rwx
		$ setfacl -r -m group:tas:rwx .
	
Role Based Access Control
Users (principals) can assume roles
e.g. assume role as operator to do backups
or assume role as instructor to issue grades
Process A
Process B
  • secure info
  • written by attacker
  • User A
  • A's Files are visible only to A
  • A is in a chrooted Jail
  • No Internet Access
  • No Shared Memory
  • web server (visible to public)
  • written by attacker
  • User B
  • B's Files are visible only to A
  • B is in a chrooted Jail
  • Neither side can see sockets
  • Neither side can see ps
Covert Channel
Commication via the clock and monitoring system resources
Very difficult to defend against
Ken Thompson - one of the 2 designers of UNIX
Lecture title "Reflections on Trusting Trust"
http://cm.bell-labs.com/who/ken/trust.html

The exploit occurs when gcc source code is modified to contain code that inserts both a backdoor into gcc and a backdoor into login.c of the UNIX or Linux source code. The compiled code will contain the exploit despite the source code not containing any backdoor. Any subsequent detection methods can be thwarted by the gcc hack. The only way to prevent this is to compare compiled code with a Trusted Computing Base.