Docsity

Understanding Internet Security Threats: Buffer Overruns, Virus Detection, Spam Filtering,, Study notes of Programming Languages

Partial preview of the text

Download Understanding Internet Security Threats: Buffer Overruns, Virus Detection, Spam Filtering, and more Study notes Programming Languages in PDF only on Docsity!

Internet Security Internet Security

One-Slide Summary

• Physical security and operating system

security are of critical importance and

must be understood.

• Key issues in internet security, including

buffer overruns , virus detection , spam

filtering , SQL code-injection attacks ,

and cross-site scripting can all be

understood in terms of lexing and

parsing.

Lecture Outline

  • Physical Security
  • Operating System Security
    • Privileges
  • Viruses and Scanning
  • Side Channel and Non-Control Data Attacks
  • Spam and Filtering
  • SQL Injection Attacks

Physical Security

  • It is generally accepted that anyone with physical access to a machine (i.e., anyone who can open the case) can compromise that entire machine.
  • Given physical access ...
    • How would I read your personal files?
    • How would I leave a backdoor (rootkit) for myself?
    • How would I log in as you?
  • Ignore networked filesystems for now ...

A Fairy Tale? Not Quite.

Hey You! Get Off Of My Lawn!

  • Must keep people out of the server room ...
  • (^) Heavy-weight physical security measures are often skipped entirely
  • They are “not worth it” to the people involved
  • Social engineering

Death By Heat Lamps?

  • Sophisticated physical attacks are possible
    • S. Govindavajhala and A. Appel: Using Memory Errors to Attack a Virtual Machine. IEEE Symposium on Security and Privacy , 2003
  • They write a Java program that can break out of the Java Virtual Machine if a single bit error occurs in memory ... - Shine lamp on memory!
  • For the rest of this talk I'll assume physical security.

Is Unix Any Better?

  • No; if you have physical access to a unix machine you can get root access. - Linux example: reboot, wait for GRUB/LILO, ask for the bootloader prompt, and type: linux init=/bin/bash
  • One solution: store important files on encrypted (sub-)filesystem - Either requires frequent password entry or stores password in memory - This is only secure if no malicious programs run - Thus: we still need operating system security!

Trojan Horses

  • root is convenient ... but also dangerous!
  • Suppose you are running out of disk space and are hunting around for files to remove - Evil user makes evil files called “ls” and “dir” - These trojan horses email your password to Microsoft and then list the files - You may never know you've been tricked!
  • This single concept accounts for the vast majority of windows vulnerabilities - Pre-Vista you were always “root”, so if I could get you to click on some evil program I send over the network, I could take over your computer.

Detecting Malicious Programs

  • So we need to detect viruses / trojans / worms
  • This is done by lexing (no, really)
  • A virus or trojan typically leaves most of the program unchanged (to avoid suspicion) and tacks on a special payload for dirty work
  • Make one regular expression for each payload
    • Called the virus signature
  • (^) Scan (lex) programs with union of regexps
    • A virus database file is basically just a .lex file and each new version has some new “tokens”

Does This Work?

  • Assume we've solved the update problem.
  • What could go wrong with searching for exact code sequences?

Stealth

  • Any change to the virus defeats the signature
  • Beware: self-modifying virus!
  • Encryption with a new key per file
    • payload = decrypt module + encrypted virus code
  • (^) Polymorphic Virus: new decrypt per file
    • payload = unique decrypt + encrypted virus code
  • Metamorphic Virus: rewrite each time
    • Basically: insert no-ops, “optimize” virus, etc.
    • Win32/Smile is >14000 lines of ASM, 90% of which is metamorphic engine ... and was out in 2002

My Secret Identity

  • If you know another user's password, you can become that user (i.e., substitute its userid for yours --- like logging in as that person)
  • The su and sudo programs implements this Using a root account is rather like being Superman; an administrator's regular user is more like Clark Kent. Clark Kent becomes Superman for only as long as necessary, in order to save people. He then reverts to his "disguise". Root access should be used in the same fashion. The Clark Kent disguise doesn't really restrict him though, as he is still able to use his super powers. This is analogous to using the sudo program.