CSE331 : Computer Security Fundamentals Malware

CSE331 : Computer Security Fundamentals Malware

CSE331 : Computer Security Fundamentals Malware CSE331 : Part IV - Software, Slides: Mark Stamp Malicious Software q Malware is not new… o Fred Cohen’s initial virus work in 1980’s o Cohen used viruses to break MLS systems q Types of malware (no standard definition) o Virus ¾ passive propagation o Worm ¾ active propagation o Trojan horse ¾ unexpected functionality o Trapdoor/backdoor ¾ unauthorized access o Rabbit ¾ exhaust system resources o Spyware ¾ steals info, such as passwords CSE331 : Part IV - Software, Slides: Mark Stamp Where do Viruses Live? q They live just about anywhere, such as… q Boot sector o Take control before anything else q Memory resident o Stays in memory q Applications, macros, data, etc. q Library routines q Compilers, debuggers, virus checker, etc. o These would be particularly nasty! CSE331 : Part IV - Software, Slides: Mark Stamp Malware Examples q Brain virus (1986) q Morris worm (1988) q Code Red (2001) q SQL Slammer (2004) q Stuxnet (2010) q Botnets (currently fashionable malware) q Future of malware? CSE331 : Part IV - Software, Slides: Mark Stamp Brain q First appeared in 1986 q More annoying than harmful q A prototype for later viruses q Not much reaction by users q What it did 1. Placed itself in boot sector (and other places) 2. Screened disk calls to avoid detection 3. Each disk read, checked boot sector to see if boot sector infected; if not, goto 1 q Brain did nothing really malicious CSE331 : Part IV - Software, Slides: Mark Stamp Morris Worm q First appeared in 1988 q What it tried to do o Determine where it could spread, then… o …spread its infection and… o …remain undiscovered q Morris claimed his worm had a bug! o It tried to re-infect infected systems o Led to resource exhaustion o Effect was like a so-called rabbit CSE331 : Part IV - Software, Slides: Mark Stamp How Morris Worm Spread q Obtained access to machines by… o User account password guessing o Exploit buffer overflow in fingerd o Exploit trapdoor in sendmail q Flaws in fingerd and sendmail were well- known, but not widely patched CSE331 : Part IV - Software, Slides: Mark Stamp Bootstrap Loader q Once Morris worm got access… q “Bootstrap loader” sent to victim o 99 lines of C code q Victim compiled and executed code q Bootstrap loader fetched the worm q Victim authenticated sender o Don’t want user to get a bad worm… CSE331 : Part IV - Software, Slides: Mark Stamp How to Remain Undetected? q If transmission interrupted, all code deleted q Code encrypted when downloaded q Code deleted after decrypt/compile q When running, worm regularly changed name and process identifier (PID) CSE331 : Part IV - Software, Slides: Mark Stamp Morris Worm: Bottom Line q Shock to the Internet community of 1988 o Internet of 1988 much different than today q Internet designed to survive nuclear war o Yet, brought down by one graduate student! o At the time, Morris’ father worked at NSA… q Could have been much worse q Result? CERT, more security awareness q But should have been a wakeup call CSE331 : Part IV - Software, Slides: Mark Stamp Code Red Worm q Appeared in July 2001 q Infected more than 250,000 systems in about 15 hours q Eventually infected 750,000 out of about 6,000,000 vulnerable systems q Exploited buffer overflow in Microsoft IIS server software o Then monitor traffic on port 80, looking for other susceptible servers CSE331 : Part IV - Software, Slides: Mark Stamp Code Red: What it Did q Day 1 to 19 of month: spread its infection q Day 20 to 27: distributed denial of service attack (DDoS) on www.whitehouse.gov q Later version (several variants) o Included trapdoor for remote access o Rebooted to flush worm, leaving only trapdoor q Some said it was “beta test for info warfare” o But, no evidence to support this CSE331 : Part IV - Software, Slides: Mark Stamp SQL Slammer q Infected 75,000 systems in 10 minutes! q At its peak, infections doubled every 8.5 seconds q Spread “too fast”… q …so it “burned out” available bandwidth CSE331 : Part IV - Software, Slides: Mark Stamp Why was Slammer Successful? q Worm size: one 376-byte UDP packet q Firewalls often let one packet thru o Then monitor ongoing “connections” q Expectation was that much more data required for an attack o So no need to worry about 1 small packet q Slammer defied “experts” CSE331 : Part IV - Software, Slides: Mark Stamp Stuxnet q Malware for information warfare… q Discovered in 2010 o Origins go back to 2008, or earlier q Apparently, targeted Iranian nuclear processing facility o Reprogrammed specific type of PLC o Changed speed of centrifuges, causing damage to about 1000 of them CSE331 : Part IV - Software, Slides: Mark Stamp Stuxnet q Many advanced features including… o Infect system via removable drives ¾ able to get behind “airgap” firewalls o Used 4 unpatched MS vulnerabilities o Updates via P2P over a LAN o Contact C&C server for code/updates o Includes a Windows rootkit for stealth o Significant exfiltration/recon capability o Used a compromised private key CSE331 : Part IV - Software, Slides: Mark Stamp Malware Related to Stuxnet q Duqu (2011) o Likely that developers had access to Stuxnet source code o Apparently, used mostly for info stealing q Flame (2012) o May be “most complex” malware ever o Very sophisticated spyware mechanisms CSE331 : Part IV - Software, Slides: Mark Stamp Trojan Horse Example q Trojan: unexpected functionality q Prototype trojan for the Mac q File icon for freeMusic.mp3: q For a real mp3, double click on icon o iTunes opens o Music in mp3 file plays q But for freeMusic.mp3, unexpected results… CSE331 : Part IV - Software, Slides: Mark Stamp Mac Trojan q Double click on freeMusic.mp3 o iTunes opens (expected) o “Wild Laugh” (not expected) o Message box (not expected) CSE331 : Part IV - Software, Slides: Mark Stamp Trojan Example q How does freeMusic.mp3 trojan work? q This “mp3” is an application, not data q This trojan is harmless, but… q …could have done anything user could do o Delete files, download files, launch apps, etc. CSE331 : Part IV - Software, Slides: Mark Stamp Malware Detection q Three common detection methods o Signature detection o Change detection o Anomaly detection q We briefly discuss each of these o And consider advantages… o …and disadvantages CSE331 : Part IV - Software, Slides: Mark Stamp Signature Detection q A signature may be a string of bits in exe o Might also use wildcards, hash values, etc. q For example, W32/Beast virus has signature 83EB 0274 EB0E 740A 81EB 0301 0000 o That is, this string of bits appears in virus q We can search for this signature in all files q If string found, have we found W32/Beast? o Not necessarily ¾ string could be in normal code o At random, chance is only 1/2112 o But software is not random… CSE331 : Part IV - Software, Slides: Mark Stamp Signature Detection q Advantages o Effective on “ordinary” malware o Minimal burden for users/administrators q Disadvantages o Signature file can be large (10s of thousands)… o …making scanning slow o Signature files must be kept up to date o Cannot detect unknown viruses o Cannot detect some advanced types of malware q The most popular detection method CSE331 : Part IV - Software, Slides: Mark Stamp Change Detection q Viruses must live somewhere q If you detect a file has changed, it might have been infected q How to detect changes? o Hash files and (securely) store hash values o Periodically re-compute hashes and compare o If hash changes, file might be infected CSE331 : Part IV - Software, Slides: Mark Stamp Change Detection q Advantages o Virtually no false negatives o Can even detect previously unknown malware q Disadvantages o Many files change ¾ and often o Many false alarms (false positives) o Heavy burden on users/administrators o If suspicious change detected, then what? Might fall back on signature detection CSE331 : Part IV - Software, Slides: Mark Stamp Anomaly Detection q Monitor system for anything “unusual” or “virus-like” or “potentially malicious” or … q Examples of anomalous things o Files change in some unexpected way o System misbehaves in some way o Unexpected network activity o Unexpected file access, etc., etc., etc., etc. q But, we must first define “normal” o And normal can (and must) change over time CSE331 : Part IV - Software, Slides: Mark Stamp Anomaly Detection q Advantages o Chance of detecting unknown malware q Disadvantages o No proven track record o Trudy can make abnormal look normal (go slow) o Must be combined with another method (e.g., signature detection) q Also popular in intrusion detection (IDS) q Difficult unsolved (unsolvable?) problem o Reminds me of AI… CSE331 : Part IV - Software, Slides: Mark Stamp Future of Malware q Recent trends o Encrypted, polymorphic, metamorphic malware o Fast replication/Warhol worms o Flash worms, slow worms o Botnets q The future is bright for malware o Good news for the bad guys… o …bad news for the good guys q Future of malware detection? CSE331 : Part IV - Software, Slides: Mark Stamp Encrypted Viruses q Virus writers know signature detection used q So, how to evade signature detection? q Encrypting the virus is a good approach o Ciphertext looks like random bits o Different key, then different “random” bits o So, different copies have no common signature q Encryption often used in viruses today CSE331 : Part IV - Software, Slides: Mark Stamp Encrypted Viruses q How to detect encrypted viruses? q Scan for the decryptor code o More-or-less standard signature detection o But may be more false alarms q Why not encrypt the decryptor code? o Then encrypt the decryptor

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    60 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us