50
Niels van Eijck Principal Consultant, NCIM [email protected] @nvaneijck

HoneySpider Network: a Java based system to hunt down malicious websites

  • Upload
    nljug

  • View
    1.771

  • Download
    0

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: HoneySpider Network: a Java based system to hunt down malicious websites

Niels van Eijck Principal Consultant, NCIM

[email protected] @nvaneijck

Page 2: HoneySpider Network: a Java based system to hunt down malicious websites

2

Java Developer Principal Consultant @NCIM Currently @Dutch National Cyber Security

Centre (NCSC-NL)

Page 3: HoneySpider Network: a Java based system to hunt down malicious websites

Introduction HoneySpider Network Service Development Demo Summary

3

Page 4: HoneySpider Network: a Java based system to hunt down malicious websites

Every piece of software contains vulnerabilities! Browsers (IE, Firefox, Chrome, Opera, WGET) Flash, Acrobat Reader, etc.

4

Page 5: HoneySpider Network: a Java based system to hunt down malicious websites

5

Benign content

Benign content

HoneySpider Network

Early warning system Scan periodically Trusted websites

Benign content

Page 6: HoneySpider Network: a Java based system to hunt down malicious websites

6

Malicious content

Benign content

Benign content

HoneySpider Network

Early warning system Scan periodically Trusted websites Detect malicious content Report

Page 7: HoneySpider Network: a Java based system to hunt down malicious websites

7

Page 8: HoneySpider Network: a Java based system to hunt down malicious websites

8

Page 9: HoneySpider Network: a Java based system to hunt down malicious websites

9

Page 10: HoneySpider Network: a Java based system to hunt down malicious websites

Intelligence gathering

Inject exploit in selected sites

Drop malware on vulnerable

systems

Initiate malicious activity

10

3

Images courtesy of chanpipat / FreeDigitalPhotos.net

1

2

3

4

Page 11: HoneySpider Network: a Java based system to hunt down malicious websites

Major news sites

NU.nl

Telegraaf.nl

Government sites

whitehouse.gov

dol.gov

Political related sites

rsf.org

11

Page 12: HoneySpider Network: a Java based system to hunt down malicious websites

12 Source: threatpost.com / netsecurity.org

Page 13: HoneySpider Network: a Java based system to hunt down malicious websites

February 2013 Clients exploited via Java6 vulnerability Apple, Facebook & Twitter compromised

13

Page 14: HoneySpider Network: a Java based system to hunt down malicious websites

14 Source: zdnet.com / foxit.com

Page 15: HoneySpider Network: a Java based system to hunt down malicious websites

August 2013 First noticed at conrad.nl Visitors are redirected to site serving

Blackhole exploit kit (PDF & Java) Turns out conrad.nl is not the only one

15

Page 16: HoneySpider Network: a Java based system to hunt down malicious websites

Hosting provider targeted by phishing email

PDF containing malware

One client got compromised Credentials obtained for DNS registrar

DNS Nameserver entry changed

Legitimate action…

16

Page 17: HoneySpider Network: a Java based system to hunt down malicious websites

17

Page 18: HoneySpider Network: a Java based system to hunt down malicious websites

All this shows a need to invest in early detection and analysis of attacks on clients

Meet HoneySpiderNetwork 2 (HSN)

18

Page 19: HoneySpider Network: a Java based system to hunt down malicious websites

Introduction HoneySpider Network Service Development Demo Summary

19

Page 20: HoneySpider Network: a Java based system to hunt down malicious websites

Started as joint venture

CERT-Polska

Dutch National Cyber Security Centre (NCSC-NL)

Work on version 2 started in 2011

Code released under GPL license in january 2013

20

Page 21: HoneySpider Network: a Java based system to hunt down malicious websites

Early warning system

Detects attacks on client applications

Webpages

Files

Supports variety of services & analyzers

Flexible configuration

Scalable

Open architecture

21

Page 22: HoneySpider Network: a Java based system to hunt down malicious websites

Operational

22

HoneySpider Network

Services Services

Services

Services Services

Jobs

Reporting

Report DB

Web interface

CLI

export

Page 23: HoneySpider Network: a Java based system to hunt down malicious websites

Communication RabbitMQ (AMQP) Google Protocol Buffers

Workflows Activiti Git

Storage Apache CouchDB JSON documents

Programming languages Java Python C++

23

Page 24: HoneySpider Network: a Java based system to hunt down malicious websites

24

Page 25: HoneySpider Network: a Java based system to hunt down malicious websites

HSN Workflow Language (HWL) XML

25

Process

• File with URLs

Each URL

• Service “A”

• Service “B”

Reporter

• Aggregate results from services

• Store in database

Page 26: HoneySpider Network: a Java based system to hunt down malicious websites

Input / Output

26

Feeder (file / url)

Reporter

Web Clients

HtmlUnit Thug

Honeypots

Capture HPC Cuckoo

Scanners

Antivirus Shellcode

Analyzers

JavaScript PDF

MS Office Flash

Page 27: HoneySpider Network: a Java based system to hunt down malicious websites

High interaction honeypot

Vulnerable system visits website

Activity is recorded

Uses virtualization software Analysis plugins Reporting plugins

27

Page 28: HoneySpider Network: a Java based system to hunt down malicious websites

Django framework Supports scheduling of jobs Basic statistics RSS feeds of malicious results

28

Page 29: HoneySpider Network: a Java based system to hunt down malicious websites

Introduction HoneySpider Network Service Development Demo Summary

29

Page 30: HoneySpider Network: a Java based system to hunt down malicious websites

package nl.ncim.hsn2.service;

import ...;

public class DemoService implements org.apache.commons.daemon.Daemon {

private GenericService service = null;

@Override

public void init(DaemonContext context) throws DaemonInitException, Exception {

this.service = new GenericService(new DemoServiceTaskFactory(), ...);

}

@Override

public void start() throws Exception {

...

service.run();

...

}

}

30

Page 31: HoneySpider Network: a Java based system to hunt down malicious websites

package nl.ncim.hsn2.service;

import ...;

public class DemoService implements org.apache.commons.daemon.Daemon {

private GenericService service = null;

@Override

public void init(DaemonContext context) throws DaemonInitException, Exception {

this.service = new GenericService(new DemoServiceTaskFactory(), ...);

}

@Override

public void start() throws Exception {

...

service.run();

...

}

}

31

Page 32: HoneySpider Network: a Java based system to hunt down malicious websites

package nl.ncim.hsn2.service;

import ...;

public class DemoServiceTaskFactory implements TaskFactory {

@Override

public Task newTask(TaskContext jobContext, ParametersWrapper parameters,

ObjectDataWrapper data) throws ParameterException {

return new DemoServiceTask(jobContext, data);

}

}

32

Page 33: HoneySpider Network: a Java based system to hunt down malicious websites

package nl.ncim.hsn2.service;

import ...;

public class DemoServiceTaskFactory implements TaskFactory {

@Override

public Task newTask(TaskContext jobContext, ParametersWrapper parameters,

ObjectDataWrapper data) throws ParameterException {

return new DemoServiceTask(jobContext, data);

}

}

33

Page 34: HoneySpider Network: a Java based system to hunt down malicious websites

package nl.ncim.hsn2.service;

import ...;

public class DemoServiceTaskFactory implements TaskFactory {

@Override

public Task newTask(TaskContext jobContext, ParametersWrapper parameters,

ObjectDataWrapper data) throws ParameterException {

return new DemoServiceTask(jobContext, data);

}

}

34

Page 35: HoneySpider Network: a Java based system to hunt down malicious websites

package nl.ncim.hsn2.service;

import ...

/**

* The task class for the HSN2 Demo Service.

* This is the place where the actual work is being done.

*/

public class DemoServiceTask implements Task {

private TaskContext jobContext;

private String url;

public DemoServiceTask(TaskContext jobContext, ObjectDataWrapper data) {

this.jobContext = jobContext;

this.url = data.getString("url_original");

}

@Override

public void process() throws ParameterException, ResourceException,

StorageException {

jobContext.addAttribute("statement", "J-Fall Rocks!");

}

}

35

Page 36: HoneySpider Network: a Java based system to hunt down malicious websites

package nl.ncim.hsn2.service;

import ...

/**

* The task class for the HSN2 Demo Service.

* This is the place where the actual work is being done.

*/

public class DemoServiceTask implements Task {

private TaskContext jobContext;

private String url;

public DemoServiceTask(TaskContext jobContext, ObjectDataWrapper data) {

this.jobContext = jobContext;

this.url = data.getString("url_original");

}

@Override

public void process() throws ParameterException, ResourceException,

StorageException {

jobContext.addAttribute("statement", "J-Fall Rocks!");

}

}

36

Page 37: HoneySpider Network: a Java based system to hunt down malicious websites

package nl.ncim.hsn2.service;

import ...

/**

* The task class for the HSN2 Demo Service.

* This is the place where the actual work is being done.

*/

public class DemoServiceTask implements Task {

private TaskContext jobContext;

private String url;

public DemoServiceTask(TaskContext jobContext, ObjectDataWrapper data) {

this.jobContext = jobContext;

this.url = data.getString("url_original");

}

@Override

public void process() throws ParameterException, ResourceException,

StorageException {

jobContext.addAttribute("statement", "J-Fall Rocks!");

}

}

37

Page 38: HoneySpider Network: a Java based system to hunt down malicious websites

{

"type":"analysis",

"job":<<@|hsn-job-id>>,

"service":"demo-service",

"node":<<@|hsn-node-ref>>,

"classification":"benign",

"details":

{

"structure":"list",

"name":"Analysis details of Demo Service",

"value":

[

{

"structure":"text",

"name":"Statement",

"value":<<statement>>

},

]

}

}

38

Page 39: HoneySpider Network: a Java based system to hunt down malicious websites

Introduction HoneySpider Network Service Development Demo Summary

39

Page 40: HoneySpider Network: a Java based system to hunt down malicious websites

Java SE 7 JRE Exploit (CVE-2012-4681)

Vulnerabilities in the JRE allow attackers to escape from the sandbox environment

Fixed in Java SE 7 JRE update 7

currently at 7u45... https://oracleus.activeevents.com/2013/connect/sessionDetail.ww?SESSION_ID=3122

40

Page 41: HoneySpider Network: a Java based system to hunt down malicious websites

41

HoneySpider Network

Cuckoo Service

VM with Metasploit

Cuckoo

Page 42: HoneySpider Network: a Java based system to hunt down malicious websites

42

HoneySpider Network

Cuckoo Service

Job

VM with Metasploit

Cuckoo

Page 43: HoneySpider Network: a Java based system to hunt down malicious websites

43

HoneySpider Network

Cuckoo Service

Job

VM with Metasploit

Cuckoo Windows XP

virtual machine

Page 44: HoneySpider Network: a Java based system to hunt down malicious websites

Windows XP virtual machine

44

HoneySpider Network

Cuckoo Service

Job

VM with Metasploit

Cuckoo

Page 45: HoneySpider Network: a Java based system to hunt down malicious websites

45

HoneySpider Network

Cuckoo Service

Report

VM with Metasploit

Cuckoo

Page 46: HoneySpider Network: a Java based system to hunt down malicious websites

Calc.exe aka Hello, world! A hacker would execute more serious stuff

> format C:

botnet client

keylogger

46

Page 47: HoneySpider Network: a Java based system to hunt down malicious websites

47

Page 48: HoneySpider Network: a Java based system to hunt down malicious websites

Introduction HoneySpider Network Service Development Demo Summary

48

Page 49: HoneySpider Network: a Java based system to hunt down malicious websites

HoneySpiderNetwork; a Java based system

to hunt down malicious websites

Visit www.honeyspider.net Feel free to try it

Appliance (virtualbox)

Installation Guide

Github (https://github.com/CERT-Polska/hsn2-bundle)

Call for developers!

49

Page 50: HoneySpider Network: a Java based system to hunt down malicious websites

50

[email protected] @nvaneijck

Thank you for your attention!