CS 495 Lecture 1: Introduction to Software Reverse Engineering

Slides:



Advertisements
Similar presentations
Providing protection from potential security threats that exist for any internet-connected computer is termed e- security. It is important to be able to.
Advertisements

Thank you to IT Training at Indiana University Computer Malware.
Online Safety. Introduction The Internet is a very public place Need to be cautious Minimize your personal risk while online Exposure to: viruses, worms,
By Hiranmayi Pai Neeraj Jain
Telnet and FTP. Telnet Lets you use the resources of some other computer on the Internet to access files, run programs, etc. Creates interactive connection.
Mod H-1 Examples of Computer Crimes. Mod H-2 Stuxnet.
3 Section C: Installing Software and Upgrades  Web Apps  Mobile Apps  Local Applications  Portable Software  Software Upgrades and Updates  Uninstalling.
MIS PERSONAL, LEGAL, ETHICAL, AND ORGANIZATIONAL ISSUES OF INFORMATION SYSTEMS CHAPTER 4 Hossein BIDGOLI Phishing that bites Paying for Privacy Pirates.
MIS PERSONAL, LEGAL, ETHICAL, AND ORGANIZATIONAL ISSUES OF INFORMATION SYSTEMS CHAPTER 4 LO1 Describe information technologies that could be used in computer.
Chapter Nine Maintaining a Computer Part III: Malware.
Threats and ways you can protect your computer. There are a number of security risks that computer users face, some include; Trojans Conficker worms Key.
Internet Safety Basics Being responsible -- and safer -- online Visit age-appropriate sites Minimize chatting with strangers. Think critically about.
A First Course in Information Security
Securing Windows 7 Lesson 10. Objectives Understand authentication and authorization Configure password policies Secure Windows 7 using the Action Center.
Data Security.
CS101 Lecture 14 Security. Network = Security Risks The majority of the bad things that can be done deliberately to you or your computer happen when you.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 Basic Security Networking for Home and Small Businesses – Chapter 8.
Cyber Crimes.
Viruses.
APT29 HAMMERTOSS Jayakrishnan M.
Hacker Zombie Computer Reflectors Target.
Malware  Viruses  Virus  Worms  Trojan Horses  Spyware –Keystroke Loggers  Adware.
Safe Computing. Computer Maintenance  Back up, Back up, Back up  External Hard Drive  CDs or DVDs  Disk Defragmenter  Reallocates files so they use.
PLUG IT IN 7 Protecting Your Information Assets. 1.How to Protect Your Assets: The Basics 2.Behavioral Actions to Protect Your Information Assets 3.Computer-Based.
Computing Essentials 2014 Privacy, Security and Ethics © 2014 by McGraw-Hill Education. This proprietary material solely for authorized instructor use.
ITIS 1210 Introduction to Web-Based Information Systems Chapter 45 How Hackers can Cripple the Internet and Attack Your PC How Hackers can Cripple the.
3-Protecting Systems Dr. John P. Abraham Professor UTPA.
Week 10-11c Attacks and Malware III. Remote Control Facility distinguishes a bot from a worm distinguishes a bot from a worm worm propagates itself and.
Understanding Computer Viruses: What They Can Do, Why People Write Them and How to Defend Against Them Computer Hardware and Software Maintenance.
3.05 Protect Your Computer and Information Unit 3 Internet Basics.
CS 510 : Malicious Code and Forensics. About the course Syllabus at
Topic 5: Basic Security.
CS 492/592: Malware. Motivation Q: How can I tell if the software I'm running is malicious?
Malicious Software.
Module  Introduction Introduction  Techniques and tools used to commit computer crimes Techniques and tools used to commit computer crimes.
Chapter 12: How Private are Web Interactions?. Why we care? How much of your personal info was released to the Internet each time you view a Web page?
Cyber Safety Mohammad Abbas Alamdar Teacher of ICT STS Ajman – Boys School.
Chapter 6 Discovering the Scope of the Incident Spring Incident Response & Computer Forensics.
1 Law, Ethical Impacts, and Internet Security. 2 Legal Issues vs. Ethical Issues Ethics — the branch of philosophy that deals with what is considered.
Cybersecurity Test Review Introduction to Digital Technology.
Any criminal action perpetrated primarily through the use of a computer.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public ITE PC v4.0 Chapter 1 1 Basic Security Networking for Home and Small Businesses – Chapter 8.
CIW Lesson 8 Part B. Malicious Software application that installs hidden services on systems term for software whose specific intent is to harm computer.
Remember effective ways to search +walk (includes words) Intitle:iPad Intext:ipad site:pbs.org Site:gov filetype:jpg.
Computer Security Keeping you and your computer safe in the digital world.
Created by the E-PoliceSlide 122 February, 2012 Dangers of s By Michael Kuc.
Unit 1 Understanding computer systems: How legal, ethical, safety and security issues affect how computers should be used OCR Cambridge Nationals in ICT.
Lecture 19 Page 1 CS 236 Online 6. Application Software Security Why it’s important: –Security flaws in applications are increasingly the attacker’s entry.
PROTECTING YOUR DATA THREATS TO YOUR DATA SECURITY.
Intro to Digital Technology Review for Final Introduction to Digital Technology Finals Seniors Monday, 5/16 – 2 nd Tuesday 5/17 – 1 st,3 rd Underclassmen.
Internet Vulnerabilities & Criminal Activity Internet Forensics 12.1 April 26, 2010 Internet Forensics 12.1 April 26, 2010.
Botnets A collection of compromised machines
CS 492/592: Malware
Managing Windows Security
What they are and how to protect against them
3.6 Fundamentals of cyber security
IT Security  .
Instructor Materials Chapter 7 Network Security
Cyber Security & IT: What’s Next?
Botnets A collection of compromised machines
NET 311 Information Security
Computer Applications Unit B
Done BY: Zainab Sulaiman AL-Mandhari Under Supervisor: Dr.Tarek
Part 1: Basic Analysis Chapter 1: Basic Static Techniques
Risk of the Internet At Home
Chap 10 Malicious Software.
Backtrack Metasploit and SET
HOW DO I KEEP MY COMPUTER SAFE?
Chap 10 Malicious Software.
Test 3 review FTP & Cybersecurity
Presentation transcript:

CS 495 Lecture 1: Introduction to Software Reverse Engineering Cong Wang Center of Cybersecurity Education and Research Department of Computer Science http://www.lions.odu.edu/~c1wang/malware_analysis.html

Syllabus Cyber Center Desktop Logins: User ID: Your Midas ID Password: cre-midasid-cre Or you can bring your own laptop to class – helps save the work

Syllabus Textbook: Supplemental Textbook: Practical Malware Analysis – Michael Sikorski et. al. Supplemental Textbook: Reversing Secrets of Reverse Engineering, Eldad Eilam et. al. The IDAPro Book, Chris Eagle Practical Reverse Engineering, Bruce Dang et.al [More advanced]: Hacker Disassembling Uncovered, Kris Kaspersky et. al. Where to find the textbooks ?

Course Schedule See: http://www.lions.odu.edu/~c1wang/malware_analysis.html

Gradings Participation and In-Class Homework: 30% Homework: 40% Final Project: 30% Final Project would have some options, or you can propose your own topic, approved by me. In-Class Homework: you can work in group of max. 2 students Homework: should be completed independently (no plagiarism – if found, zero for both, lower your final grade as well)

Homework Submission Email submission: cwang.odu@gmail.com Homework submission format: docx/pdf file In format: HW/In-Class HW #, Name, Name Timestamp when the email is received Please do not submit to my odu.edu email Graded homework will be emailed back in PDF

Policy Final Project: can be done in group of max 2 students or individually Late submission: late homework/project (not in-class homework): grade follows an exponential decay regarding late time: S = exp(- (t_1-t_0)/20)*S_0 S_0 is the original grade, t1_, t_0 timestamps in hrs, late for 5 hrs, original 100 -> 78 now In-class homework should be submitted before 5:00 pm If cannot complete in class, complete the rest before 12:00AM on Sunday; otherwise, you receive zero for the in-class homework. Solutions will be posted on Sunday

Prerequisites Basic understanding how software executes on a system Windows Assembly Language Any questions ?

What is Reverse Engineering Definition: the processes of extracting knowledge or design information from anything man-made and reproducing it. Soviet: AK-47 Reversed US: McDonell Douglas AV-8 Harrier Soviet: Yak 38 People often do is reverse engineering weapons. Body Design Ford Fusion Aston Martin German: STG44 Clone Assemble an iPhone in 15 mins Shenzhen, China

Legal Practice of analyzing a software system, either in whole or in part, to extract design and implementation information. Risks of business disputes/lawsuit Is Reversing Legal ? Seek legal counsel. Copyright Laws (decompilation legal, intermediate copying is illegal) Copyright Laws: In order to decompile a program, that program must be duplicated at least once, either in memory, on disk, or both Digital Millenium Copyright Act (applies to Digital Right Management products) Felten vs. RIAA US vs. Sklyarov

Felten vs. RIAA In 2000, SDMI (Secure Digital Music Initiative) announced the Hack SDMI challenge – protect audio recordings SDMI challenge offered a $10,000 reward in return of giving up ownership Princeton Prof. Felton’s team found weakness and wrote a paper [Wu et. al.] ANALYSIS OF ATTACKS ON SDMI AUDIO WATERMARKS, ICASSP, 2001. [Craver et. al.] Reading Between the Lines: Lessons from the SDMI Challenge, USENIX SP, 2001. Felten’s team chose to forego this reward and retain ownership of the information to allow them to publish their findings. They received legal threats from SDMI and the RIAA (the Recording Industry Association of America) claiming liability under the DMCA They first withdraw their original submission, but paper got published later

Felten vs. RIAA Classic case DMCA could actually reduce the level of security by preventing security researchers to publish their findings.

US vs. Sklyarov In 2001, Dmitry Sklyarov, a Russian programmer, was arrested by the FBI for what was claimed to be a violation of the DMCA. Sklyarov had reverse engineered the Adobe eBook file format while working for ElcomSoft, a software company from Moscow. The information gathered using reverse engineering was used in the creation of a program called Advanced eBook Processor that could decrypt such eBook files so that they become readable by any PDF reader. Adobe filed a complaint stating that the creation and distribution of the Advanced eBook Processor is a violation of the DMCA, and both Sklyarov and ElcomSoft were sued by the government.

Why ? Related to computer security Used by crackers to defeat copy protection (crack games/software) Reverse encryption product to assess security levels Malware analysis (our focus)

Motivation Example 1 FBI uses an exploit in TOR browser, implants a cookie to fingerprint users geographical location via external Firefox Browser. TOR is anonymous, several layers of encryption – hard to trace TOR browser based on Firefox Use the exploit to inject a malware “Magneto”

Cookies What are Cookies ? Cookies are small text files stored by your web browser after visiting a web page to personalize your visit in next time, collect demographic information about the visitors to the page or to monitor banner clicks. Not malicious, but can be used by malicious code to affect user privacy, send user profile to third parties

Motivation Example 1 Send user’s hostname/MAC via HTTP request to 65.222.202.54

Example 2: Wannacry Ransom

Example 2: Wannacry Began on May 12, 2017 Infected over 200,000 computers over 150 countries (brought down the entire British hospital system) Shadow Broker make the exploit public EternalBlue Exploit Windows SMB (Server Message Block) protocol – zero-day exploit Malware analysis found a kill switch - http://www.iuqerfsodp9ifjaposdfjhgosurijfaewrwergwea.com , register this domain name (the guy is arrested by FBI in LV) Use Bitcoin to pay ransom – no trace Disputes, criticisms against government agency/Microsoft SMB – 20 years, upgrade to Windows 10

Example 3: IoT Botnet/DDoS Massive amount of IoT Devices now/in future (Home cameras/Alexa/Fridge/Lamp) IoT firmware not updated, sold as is BusyBox system – tiny Unix utilities on IoT devices Last year, Mirai malware outbreak brought down ISP on the entire eastcoast Bruteforce BusyBox with a list of deault password IoT turns into Botnet Launch DDoS attack (blackmailing)

Example 4: Privacy Leaks during PowerBank Sharing New start-up company to rent Powerbanks Android system has a USB debugging config Some smartphone vendors allows installation of software automatically while connecting to desktop Malware obtains privilege via USB debugging to extract personal photos, contact and install backdoor, adware in Android

Example 5: OPM and Anthem Breach FBI arrested Yu Pingan, aka GoldSun, a malware broker at LAX (a teacher from Shanghai). How? Accused of using Sakula to attack US Office of Personnel Management, stealing over 80M medical records from Anthem; Chinese government also made two relevant arrest in 2015. Sakula was only used once – exploits 4 zero-day CVE-2014-0322 (affecting IE10), CVE-2012-4969 (affecting IE6), CVE-2012-4792 (affecting IE6), and an unidentified Flash Player zero-day Use watering hole attack: infect popular website with malware and wait for prey How ? See next -

How ? Victim companies found they are connecting to a malware server; infect by Sakula or its mutant; log keys/upload file. Found a malware named: capstone.exe, inject into a DNS server: capstoneturbine.cechire.com The guy controls the DNS claims working for Capstone Turbine (a company makes turbines in CA); this guy controls hundreds of such DNS servers including: update.microsft.kr/hacked.asp (fake updates for phishing) Yu contacted this guy says he had some zero-day exploits and provided him with the malware

What is Malware ? Set of instructions that run on your computer and make your system do something that an attacker wants it to do

Malware Classification Viruses and worms Self-replicating code that infects other systems manually or automatically Botnets Software that puts your computer under the remote control of an adversary to send spam or attack other systems (DDoS) Backdoors Code that bypasses normal security authentications to provide continued, unauthorized access to an adversary Trojans Code that appears legitimate, but performs an unauthorized action

Malware Classification Rootkits Tools to hide the presence of an adversary, stay concealed, avoid detection Information theft Collects credentials (e.g. keystroke loggers) Steal files (credit card data exfiltration) Gather information on you, your habits, web sites you visit (e.g. spyware) Monitor activity (webcams) Ransomware Code that renders your computer or data inaccessable until payment received (Wannacry)

Malware Classification Resource or identity theft Store illicit files (copyrighted material) Stepping stone to launder activity (frame you for a crime)‏ Scareware Tricks users into buying products they do not need (window pop-up: your system is infected) Adware Code that tricks users into clicking illegitimate advertisements Drive-by downloads Code automatically downloaded via the web

Malware Classification (2011)

Course Objective Learn tools and techniques to analyze what malicious software does How to detect malware Understand the countermeasures from malware authors to evade detection

Ethics Do not run malware files in the classroom PC locally/or your own computers – only in the VM Explore only on your own systems/virtual machine you have permission to Do not break or break into other people's machines

VirtusTotal Upload a file, website URL, hash for analysis Pros: Free Cons: zero-day exploits, and more ? Show an example: Upload a file scanned by multiple antivirus engines

VirusTotal

Sandbox Cuckoo framework Oracle Virtualbox WinXP Sandbox: special environment allows for logging the behavior of programs API function calls, their parameters, file created/deleted, websites and ports accessed Results are saved in a text file

Identify Malware Identify Signatures: Host-based signatures: Malware PE File - Entropy Malware behavior: changes registry, API calls, file access/creation/modification Network signatures: monitoring network traffic, understand the propagation of worms – provides high detection rate, less false positives Port Scanning Protocols used (e.g. SMB, IRC) Packet Payload Finding needle-in-haystack (packet inspection)

Virtual Machine Download Virtual Box and Install: https://www.virtualbox.org/wiki/Downloads You can either: Load the image file (2+ GB) here: (Box Link – the link will be valid till the end of semester) https://odu.box.com/s/dayzvwi81rd2mlrpvpm9d58k70bn8cb 4

In-class work Download VM .ova image Establish VM on either your own laptop or classroom desktops

Tools already install on VM WinRAR Sysinternals tools (Process Explorer, Process Monitor) (https://docs.microsoft.com/en-us/sysinternals/downloads/) PEView (wjradburn.com) Resource Hacker (angusj.com) Dependency Walker (dependencywalker.com) IDA Pro 5.0 Freeware (hex-rays.com) – IDA Pro 6.8 Wireshark (wireshark.org) – v. 1.10 works on XP Apate DNS (mandiant.com) – Need .NET Framework 3.5 (if you do it by yourself) OllyDbg 1.10 (ollydbg.de) WinHex (winhex.com) PEiD (softpedia.com) UPX (upx.sourceforge.net) Regshot (code.google.com/p/regshot/) Google Chrome - You can customize your VM, of course

Tools already install on VM Make sure you “insert guest Additions CD image” So you can drag files to VM from host

Tools already install on VM IDAPro 5.0 Freeware does not support plugin Another IDA Pro 6.8 is provided (unstable) Can be used once we have plug-in Some plug-ins are buggy

Advice when analyzing code Since we are reversing: Pay attention to the main flow rather than details Pay attention to the keywords (function calls/names/strings rather than memory operation from the assembly code) Some code is generated by the compiler – difficult to analyze (avoid the rabbit hole) Make guesses and use your hunch Personal experience with IDAPro and Ollydbg IDAPro is fantastic Ollydbg gets the job done, but the text is too small (hurt your eyes), cannot trace back only forward – makes analysis time- consuming.