CS 111

Scribe Notes for 6/4/08

by Sun Woo Kim

Security II

Threat modeling and classification

Romans did not build any castles or buildings to protect from threats, because the threats were internal. Just like Romans, before protecting the machine, one needs to know what kinds of threats there are and what type of structure the theats have. Below is the list of theat models and their classification.

  • Insiders
  • Social engineering(e.g. Kevin Mitnick)
  • Network attacks(e.g. Virus/DBD(Drive by Download;10% of websites have DBD materials))
  • Denial of Service attack
  • Buffer overflow attack
  • Device attack(e.g. Virus on CDR or USB, dongle on keyboard strokes)

General funtions needed in security mechanisms

  • Authentication(proving who you are)
  • Authorization(assuming you are who you are, proving you have rights to do certain task)
  • Auditing(recording what you have done)
  • Integrity(prevent and detect modification; e.g. checksum)
  • Correctness
  • Efficiency(Slow system will lead to Denial of Service attack)

Authentication

Authentication is designed to prevent masquerading(attempt of disguised access). There are two types of authentication, which are external and internal. While external authentication is used for initial access to the system, internal authentication is used for later access within system(internal authentication is also designed for efficiency of system). External and internal authentications various types and they both have goods and bads.

External Authentication
  • Passwords/Biometric authentication(e.g. fingerprints, retinal scan)
  • Identity token(e.g. a beeper that tells the password for the corresponding time)
biometric authentication ID Token

However, external authentication may be vulnerable to fake fingerprints, password snooping and token stealing.

Internal Authentication
  • Inside process descriptor(uid + gid)
  • File permission(rwxrwxrwx)

Internal Authentication, too, is vulnerable to a bug in kernel system

Therefore, best authentication would be combining all of them, although it may be complex

Combined authentication
  • Who the person is: Brainscan
  • What the person has: ID Token
  • What the person knows: Passwords

Authentication building blocks

  • Cryptographic hash functions(oneway)(resists the "append junk" attack)
  • Example.
    SHA1(Message) => 160-bit hash value
    SHA(Message)==H, Given only H, it's infeasible to compute M, any other M!
  • Symmetric Encryption(Secret key encryption)
    Given M and K, M encrypted by K is easy ({M}k)
    {M}k, M is easy but without K, it's hard
  • Triple DES(Data Encryption Standard)
    One DES encyrption was not enough to be fully proctected.
  • AES(Advanced Encryption Standard
  • Asymmetric Encryption
    There is no single key between them.
    They have a pair of key "public-private".
    U=Public key
    K=Private key
    Given M and U, getting {M}u is easy.
    Given {M}u and K, getting M is easy.
    Given {M}u and U, getting M is hard.
    Given U, getting K is hard.
  • Example would be PGP(Pretty Good Privacy)
  • RSA(Commonly used now)

Examples of authentication methods

Example 1.
  • Assuming shared-secret key K,
  • A->B {I'm Alice}k
  • B->OK
  • This is vulnerable to Capture and Replay attack. If a hacker, capture what A has sent to B, and repeat the same packet, the hacker will gain the access.
Example 2.
  • A->B {I'm Alice}
  • B->A {Nonce*}
  • A->B {Nonce}k
  • B->A OK
  • This is better authentication than Example 1, however it is still weak to be bullet-proofed.
  • *Nonce is random noise
Example 3.
  • A->B {NonceA*Hi, I'm Alice}UB
  • B->A {NonceA∩NonceB}UA
  • A->B {NonceB∩Ksession}UB
  • Now, this authentication provides way more security than previous examples.
  • *Concatnated with

Authentication a packet in a bulk transfer

HMAC algorithm(shared key K)
SHA1((K^pad1)∩SHA1((K^pad2)∩M))->160 bits

Above methods provides two things: authentication, integrity

Authorization

Who has what permission?

If you take a look at traditional linux file permission, it is divided into user,group, and others, represented in form of rwxrwxrwx. In the form rwxrwxrwx, the first three letter rwx would represent a permission for the user of the file, the second pattern of rwx would represent a permission for the group of the file, and the third pattern of rwx would represent a permission for the others. This is very typical type of authorization.

This authorization is called ACL(Access Control Lists), where for each principal(e.g. user), for each object(e.g. file), and for each type of access(read, write, rename), the permission is simply defined as allowed, or not allowed.

Below is example of using ACL

wantstar@wantstar-laptop:~$ getfacl wg
# file: wg
# owner: wantstar
# group: wantstar
user::rw-
group::r--
other::r--

wantstar@wantstar-laptop:~$ setfacl -m group::rwx wg
wantstar@wantstar-laptop:~$ getfacl wg
# file: wg
# owner: wantstar
# group: wantstar
user::rw-
group::rwx
other::r--

wantstar@wantstar-laptop:~$

There is another type of ACL called Role-based ACL. For Role-based ACL, users(principals) can assume roles. For example, operators do backups and instructors issue grades. On Role-based ACL, permissions are associated with roles, not principals. Therefore, if a user assumes a role, the user get his roles. Also you can have multiple sessions with different roles

Other threats

Besides, vulnerability in authentication and authorizaion, there are numerous types of threats remaining to be listed. One of them include "Covert Channel." Covert Channel is when a processor communicates with other processor in very sneaky way in order to sneak out sensitive information or data without being noticed.

Covert Channel

This is also known as Side channel attack, where the attack uses physical elements to exploit the machine, such as time, clock, and power consumption. Through those elements, the attacker is able to find out various information about the server, possibly a key to get access to the local files. Currently, there is no solution for this attack.

Trusting Trust

This issue was brought up by one of unix system developer, Ken Thompson. It refelcts how developer can hide a back door on a system without letting users knowing. This is possible through modifying kernel code, or compiler. However, the compiler that compiles entire system has to be trusted in order to prevent the backdoor. That is why it is called Trusting Trust. More information about this vulnerability can be found at http://www.acm.org/classics/Sep95 This vulnerability too do not have a solution available currently.