home | articles | links | fun | about
Up to: CS432 Information Security

Protecting hosts from malicious programs (10/17/02)

        [application]           [   script   ]
        [    OS     ]           [Flash player]
        [  Hardware ]           [email client]
                                [    OS      ]
                                [    HW      ]

Malicious/untrusted programs

"Trusted" means you believe party is honest and competent.

Principle of least priviledge

Each component should only get the priviledge it needs to do its job.

Good idea, prevents many security problems.

Goals

  1. Confidentiality: sensitive data doesn't leak
  2. Integrity: only authorized parties can cause changes
  3. Availability: program can't crash machine/other programs

Solution #0: Disallow untrusted programs (to trust, look over source code, extensive audit)

Solution #1: ignore problem

Solution #2: Static code scanning (virus checker). Look at code, not running program.

Solution #3: rigid limits on what untrusted code can do

Solution #4: perimeter defense

Solution #5: flexible defense at run-time

Policy

These are policy options

Enforcement

Done at 2 levels

  1. Memory safety (program "in a box")

                write(){
                        check_permission();
                        setup();     <= program could jump here, bypassing permission check
                        writefile();
                }

2. High-level security

Providing memory safety (later lecture on this)

Information Flow

Give info to SW, make sure doesn't leak.

"Confinetement problem" => confine program so can't communicate to others

When is leaking 1 bit/second useful? Keypress sniffer... leak password. Leaker can use error-correcting codes if noisy channel, with encryption -> so looks like random data.

bottom line: covert channels pretty impossible to stop, just slow them down.

Design advice: ASSUME covert channels exist, make sure hard for them to leak.

"Thinking outside the box": easy to come up with new attacks (not just read/writes). Privacy protection is hard: once someone has info, if they want it to leak, it will.

Dealing with "indirect" function calls

                [untrusted app]
                        |
                        |  (function call)  
                        V                  untrusted      
         - - - - - - - - - - - - - - - - - - 
                        |                  trusted
                        V
                   [URLopen]
                    /      \
                   /        \
                  V          V
            [fileOpen]     [httpGet]

Assume file access prohibited, but http access OK.

Approach 1: treat URLopen as untrusted

One solution: fileOpen checks if getting cached file. (Not great, fileOpen learning details of URLopen).

Turns out the simple policy ("Can only access remote files) was hard to implement; exception was the cache.

Problem: component-based software or "What is a program?"