web exploit finder presentation

31
Web Exploit Finder Web Exploit Finder Detecting Drive-By-Downloads Detecting Drive-By-Downloads in a virtualized environment in a virtualized environment Benjamin Mack Benjamin Mack xnos Internet Services xnos Internet Services

Upload: amiableindian

Post on 19-Jan-2015

3.646 views

Category:

Business


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Web Exploit Finder Presentation

Web Exploit FinderWeb Exploit Finder

Detecting Drive-By-DownloadsDetecting Drive-By-Downloadsin a virtualized environmentin a virtualized environment

Benjamin MackBenjamin Mackxnos Internet Servicesxnos Internet Services

Page 2: Web Exploit Finder Presentation

© Benjamin Mack, xnos Internet Services, www.xnos.de, June 1st 2007

About Benjamin Mack

Student of „computer science and media“ at the Hochschule der Medien, Stuttgart since 2003

Started xnos Internet Services forHosting, Security and Web Development in 2006

Finishing my diploma thesis in late 2007

Also involved in TYPO3 core development

Page 3: Web Exploit Finder Presentation

© Benjamin Mack, xnos Internet Services, www.xnos.de, June 1st 2007

The Problem

What are malicious websites?

Our Approach Features Architecture Rootkit Fast reproduction of virtual clients Inspecting a website

State & Future Plans

Agenda

Page 4: Web Exploit Finder Presentation

© Benjamin Mack, xnos Internet Services, www.xnos.de, June 1st 2007

Developed by Thomas Müller, Mehmet Arziman and Benjamin Mack in Summer 06

Student project from theHochschule der Medien, Stuttgart

Now hosted, developed and supportedby xnos Internet Services

What is the Web Exploit Finder?

Page 5: Web Exploit Finder Presentation

© Benjamin Mack, xnos Internet Services, www.xnos.de, June 1st 2007

Introduction

A lot of software connects to the internet

Security threats occur throughremote code execution after buffer overflows

Can happen to every piece of software

Page 6: Web Exploit Finder Presentation

© Benjamin Mack, xnos Internet Services, www.xnos.de, June 1st 2007

The Problem

Focus on internet browsers

Both Microsoft Internet Explorer and Mozilla Firefoxstill include several vulnerabilities

Primary user interfaces to the WWW

Browsers are used most frequently

Many non-technical users

Page 7: Web Exploit Finder Presentation

© Benjamin Mack, xnos Internet Services, www.xnos.de, June 1st 2007

The Problem

Many users don't install security updates

Even fully patched systems arevulnerable to zero-day exploits

Unknown amount of malicious sites on the web

How can we find these malicious websites?

Page 8: Web Exploit Finder Presentation

© Benjamin Mack, xnos Internet Services, www.xnos.de, June 1st 2007

The Problem

What is „malicious“?

How can we detect malicious web content?

How can we design an adequate system?

Page 9: Web Exploit Finder Presentation

© Benjamin Mack, xnos Internet Services, www.xnos.de, June 1st 2007

What is malicious?

A website that downloads and installs a malicious software (virus, trojan horse) on the local system without any user interaction.

so-called „Drive-By-Downloads“

No phishing attacks

Page 10: Web Exploit Finder Presentation

© Benjamin Mack, xnos Internet Services, www.xnos.de, June 1st 2007

How does a hacker achieve this?

Attacker executes his code in the browser through a buffer overflow

Execution code is limited

Only a small „Dropper“ or „Downloader“ is run which retrieves the malicious software

Starts new processes Modifies the registry Writes files to the hard drive

Page 11: Web Exploit Finder Presentation

© Benjamin Mack, xnos Internet Services, www.xnos.de, June 1st 2007

Worst Case

Windows XP Professional w/o Service Packs

No security updates installed

Windows running as an Administrator

Using Microsoft Internet Explorer 6

Scripting and Java both activated

Page 12: Web Exploit Finder Presentation

© Benjamin Mack, xnos Internet Services, www.xnos.de, June 1st 2007

How can we detect malicious software?

Two techniques

Intrusion DetectionCompare the state of the system before and after a visit to a website

RootkitMonitor suspicious actions in real-time modifying the operating system

Page 13: Web Exploit Finder Presentation

© Benjamin Mack, xnos Internet Services, www.xnos.de, June 1st 2007

How can we design an adequate system?

The system should be

automatic, require little user interaction

controlled remotely, with a web interface

scalable and extensible

secure, ensuring that the system itselfcannot be infected by malicious websites

Page 14: Web Exploit Finder Presentation

© Benjamin Mack, xnos Internet Services, www.xnos.de, June 1st 2007

System Architecture

Virtualization layer protect the system check multiple websites simultaneously

VMware Server

Client OS component modify the operating system monitor system calls

Hand-made Rootkit

Page 15: Web Exploit Finder Presentation

© Benjamin Mack, xnos Internet Services, www.xnos.de, June 1st 2007

System Architecture

Browser Control manage the rootkit control the browser communicate with the management console

Windows MFC Application

Management Console configure and control the system monitor system calls

JBoss Application Server

Page 16: Web Exploit Finder Presentation

© Benjamin Mack, xnos Internet Services, www.xnos.de, June 1st 2007

System Architecture

Linux

JBoss Application Server

DHCPServer

Web-GUI(JSF)

BusinessLogic

(EJB 3.0)

Linux

MicrosoftInternetExplorer

VMware Server

Windows XP (virtualized)

SOAPWebServices

(XFire)

Browser Control

RootkitKernel-Mode-Driver

SOAPClient

RootkitControl

IERemoting

RemotingScripts

VMwareManager

DB(MySQL)

Management Console

Page 17: Web Exploit Finder Presentation

© Benjamin Mack, xnos Internet Services, www.xnos.de, June 1st 2007

Rootkit

SSDT-Hooking

Redirects the system call

Access to the protected memory of the kernel

Implemented as a system driver in C

Page 18: Web Exploit Finder Presentation

© Benjamin Mack, xnos Internet Services, www.xnos.de, June 1st 2007

The Windows API

Windows Kernel (Ntoskrnl.exe)

Ntdll.dll

Ker

nel

32.d

ll

Gdi3

2.d

ll

Use

r32.d

ll

Adva

pi3

2.d

ll

OS/

2 S

ubsy

stem

POSI

X S

ubsy

stem

Win32 Applications

Dispatcher-Stubs NtCreateFile() Method

Real ImplementationZwCreateFile() Method

Application call CreateFile()

Hooking

Page 19: Web Exploit Finder Presentation

© Benjamin Mack, xnos Internet Services, www.xnos.de, June 1st 2007

Kernel Rootkit: SSDT Hooking

ServiceTable

ArgumentTableServiceLimit

CounterTable

SSDT

ZwCreateFile()-

-

SST

Ntoskrnl.exeZwCreateFile()

1

ServiceTable

ArgumentTableServiceLimit

CounterTable ZwCreateFile()-

-

Ntoskrnl.exeZwCreateFile()

CALL(ZwCreateFile())

Hook Function<prolog>

<epilog>

1

2 3

SSDT System Service Descriptor TableSST System Service Table

Before:

After:SSDT SST

Page 20: Web Exploit Finder Presentation

© Benjamin Mack, xnos Internet Services, www.xnos.de, June 1st 2007

VMware Manager

Our virtualized environment needs to...

Create a new virtual machine Clone from a clean template Copy the most recent version of the rootkit Take a snapshot to revert fast

Revert to a clean state

Delete a virtual machine

Page 21: Web Exploit Finder Presentation

© Benjamin Mack, xnos Internet Services, www.xnos.de, June 1st 2007

Creating a new Virtual Machine

Linux

JBoss Application Server

DHCPServer

Web-GUI(JSF)

BusinessLogic

(EJB 3.0)

Linux

MicrosoftInternetExplorer

VMware Server

Windows XP (virtualized)

SOAPWebServices

(XFire)

Browser Control

RootkitKernel-Mode-Driver

SOAPClient

RootkitControl

IERemoting

RemotingScripts

VMwareManager

DB(MySQL)

Management Console

Page 22: Web Exploit Finder Presentation

© Benjamin Mack, xnos Internet Services, www.xnos.de, June 1st 2007

VMware Control

ClonedWindows XP(virtualized)

● cloneVM()● revertVM()● deleteVM()● listVMs()

Bash ScriptsC Programvmware-cmd

● Request new IP Address● Copy prototype image

New IP Address

VMwareManager

Manage-ment

Console

Register the new VMCreate SnapshotCopy Rootkit & BrowserControl

VMwareServer

C-API

RemotingScripts

Page 23: Web Exploit Finder Presentation

© Benjamin Mack, xnos Internet Services, www.xnos.de, June 1st 2007

Browser Control

Communicate with the Management Console Get URL to check Tell if website was malicious use SOAP calls (gSOAP)

Communicate with the Rootkit Start & Stop Hooking Configure Rootkit Request Results After Delay

Run the Browser

Page 24: Web Exploit Finder Presentation

© Benjamin Mack, xnos Internet Services, www.xnos.de, June 1st 2007

Browser Control

MicrosoftInternet

Explorer 6

Windows XP (virtualized)Rootkit(Kernel-Mode-Driver)

SOAPClient

RootkitControl(IOCTL)

IERemoting

● register()● getFilterList()● getNextUrl()● reportResult()

SOAP

Core(Business

Logic) ● startIE()● closeIE()● goToURL()● navigate()

● monitors IE Process

● load Rootkit-Driver● send filter list● start and stop hooking● request result

Page 25: Web Exploit Finder Presentation

© Benjamin Mack, xnos Internet Services, www.xnos.de, June 1st 2007

Management Console

Web Interface Display running VMs Manually add URLs Create more virtual machines Manage filters

Web Crawler Automatically add more URLs to check all of them Store in database

Database holding all URLs and running VMs

SOAP interface to the VMs

Page 26: Web Exploit Finder Presentation

© Benjamin Mack, xnos Internet Services, www.xnos.de, June 1st 2007

State of the system

Beta phase The system works Rootkit needs some small adjustments

Implementing the crawler

Web interface rewrite

Hook more Windows system calls

Page 27: Web Exploit Finder Presentation

© Benjamin Mack, xnos Internet Services, www.xnos.de, June 1st 2007

Future Plans

First open-source release in the next weeks

including a complete manual to set the software up

will be available on www.xnos.org

New Features

Try different IE versions

Use Firefox and Opera

Page 28: Web Exploit Finder Presentation

© Benjamin Mack, xnos Internet Services, www.xnos.de, June 1st 2007

Future Plans contd.

Different virtualization technologies

Xen (for Windows with HVM)

Different operating systems as clients

Windows Vista (32 bit) Linux

Cooperating with other client honeypot projectsfor evaluating the malicious software on the websites

Page 29: Web Exploit Finder Presentation

© Benjamin Mack, xnos Internet Services, www.xnos.de, June 1st 2007

Support wanted

System has a lot of potential Dutch government and a couple of

big companies want to use WEF already

We need developers once the softwareis released as open-source

We need support Either by testing the package or by sponsoring the developers

Page 30: Web Exploit Finder Presentation

© Benjamin Mack, xnos Internet Services, www.xnos.de, June 1st 2007

Questions

Any Questions?

Page 31: Web Exploit Finder Presentation

xnos Internet Servicesxnos Internet ServicesBenjamin MackBenjamin Mack

Gartenstraße 29Gartenstraße 2970563 Stuttgart 70563 Stuttgart

PhonePhone +49 711 508 85 44 22+49 711 508 85 44 22FaxFax +49 711 508 85 44 29+49 711 508 85 44 29

[email protected]@xnos.de

www.xnos.dewww.xnos.de