Reverse Engineering

21
Reverse Engineering Paul deGrandis

description

Reverse Engineering. Paul deGrandis. Applications. Software Maintenance Source Code and Documentation Engineering Virus Analysis. Malware. Virus Needs a vector for propagation Worm No vector needed Can spread by network shares, email, security holes. Malware. Trojan Horse - PowerPoint PPT Presentation

Transcript of Reverse Engineering

Page 1: Reverse Engineering

Reverse Engineering

Paul deGrandis

Page 2: Reverse Engineering

Applications

•Software Maintenance

•Source Code and Documentation Engineering

•Virus Analysis

Page 3: Reverse Engineering

Malware

•Virus

•Needs a vector for propagation

•Worm

•No vector needed

•Can spread by network shares, email, security holes

Page 4: Reverse Engineering

Malware

•Trojan Horse

•Performs unstated and undesirable functions

•Spyware, adware, logic bombs, backdoors, rootkits

Page 5: Reverse Engineering

Anti-Virus

•Integrity Checking

•Static AV Scanners

•Dynamic AV Scanners

Page 6: Reverse Engineering

Anti-Virus

•Integrity Checking

•Checksum comparison

•Static AV Scanners

•Program properties (registry, system calls)

•Malware byte sequence extraction

Page 7: Reverse Engineering

Anti-Virus

•Dynamic AV Scanners

•Intercepting system calls

•Analyzing audit trails

•Operation patterns

Page 8: Reverse Engineering

Procedures For Analysis

•Restrict Access

•Save only disassembled files

•Rename Extensions, prevents double-click

•Password protect dangerous files and ZIPs

•NEVER SEND MALWARE

Page 9: Reverse Engineering

Procedures For Analysis

Page 10: Reverse Engineering

Tools•VMware

•Isolate and restore snapshots

•BinText

•Extracts strings from binary files (code)

•IRC commands, SMTP, registry keys

Page 11: Reverse Engineering

Tools•IDA Pro

•Dissassembles executables into assembly

Page 12: Reverse Engineering

Tools

•UPX Decompression

•Executable packer

•To unpack: upx.exe -d -o dest.exe source.exe

Page 13: Reverse Engineering

Tools

•SysInternals.com

•FileMon - monitors file access

•RegMon - monitors registry access

Page 14: Reverse Engineering

Tools

•RegShot

•Records modifications to the registry, but not reads

Page 15: Reverse Engineering

Tools•ProcDump

•Dumps a processes code from memory

•Useful in detecting an analyzing polymorphic viruses

Page 16: Reverse Engineering

Tools•OllyDbg

•Attaches to a process

•Can actively manipulate memory and registers during operation

•Swiss Army Knife

Page 17: Reverse Engineering

Tools

•Network Activity

•TCPView - displays open network ports

•TDIMon - monitors network activity

•Ethereal/Wireshark - Packet Sniffer

•Snort - IDS / Packet Sniffer

•netcat - Network swiss army knife

Page 18: Reverse Engineering

Tools•SysInternals.com

•TCPView - TCP and UDP endpoints and processes

•TDIMon - Logs all network activity, but not packet contents

Page 19: Reverse Engineering

Tools•Wireshark (formerly Ethereal)

•Captures and displays all packet contents

•One of your best friends

Page 20: Reverse Engineering

Tools•Netcat - reads and writes across data

connections using TCP/IP

•Great for probing, listening, debugging, or exploring unknown network behavior

•The other one of your best friends

Page 21: Reverse Engineering

The Assignment

•Beagle.J (and its cousin Beagle.K)

•Static analysis (BinText, IDA)

•Dynamic Analysis

•Host Side (Registry, process, files)

•Networking (Ports, connections, traffic)

•Propagation, Backdoors