Cuckoo modified - 情報セキュリティ株式会社 · Q) Automatic extraction and submission of...

20
Information Security Inc. Cuckoo modified

Transcript of Cuckoo modified - 情報セキュリティ株式会社 · Q) Automatic extraction and submission of...

Page 1: Cuckoo modified - 情報セキュリティ株式会社 · Q) Automatic extraction and submission of interesting files from ZIPs, RARs, RFC 2822 emails (.eml), and Outlook .msg files

Information Security Inc.

Cuckoo modified

Page 2: Cuckoo modified - 情報セキュリティ株式会社 · Q) Automatic extraction and submission of interesting files from ZIPs, RARs, RFC 2822 emails (.eml), and Outlook .msg files

Information Security Confidential - Partner Use Only

Contents

2

• About Cuckoo?

• About Cuckoo modified

• Cuckoo Testing Environment

• Cuckoo modified Installation (guest OS)

• Cuckoo modified Installation

• Submit a file through the web interface

• References

Page 3: Cuckoo modified - 情報セキュリティ株式会社 · Q) Automatic extraction and submission of interesting files from ZIPs, RARs, RFC 2822 emails (.eml), and Outlook .msg files

Information Security Confidential - Partner Use Only

About Cuckoo

3

• Cuckoo is an open source automated malware analysis system.

• It's used to automatically run and analyze files and collect

comprehensive analysis results that outline what the malware does

while running inside an isolated Windows operating system

Page 4: Cuckoo modified - 情報セキュリティ株式会社 · Q) Automatic extraction and submission of interesting files from ZIPs, RARs, RFC 2822 emails (.eml), and Outlook .msg files

Information Security Confidential - Partner Use Only

About Cuckoo modified

4

• Cuckoo modified is a forked, modified version of Cuckoo (https://github.com/spender-

sandbox/cuckoo-modified)

• Advantages over the original Cuckoo

A) Fully-normalized file and registry names

B) 64-bit analysis

C) Handling of WoW64 filesystem redirection

D) Many additional API hooks

E) Service monitoring

F) Correlates API calls to malware call chains

G) Ability to follow APC injection and stealth explorer injection

H) Pretty-printed API flags

I) Per-analysis Tor support

J) Over 150 new signature modules (over 75 developed solely by Optiv)

K) Anti-anti-sandbox and anti-anti-VM techniques built-in

L) More stable hooking

M) Ability to restore removed hooks

N) Greatly improved behavioral analysis and signature module API

O) Ability to post comments about analyses

P) Deep hooks in IE's JavaScript and DOM engines usable for Exploit Kit identification

Q) Automatic extraction and submission of interesting files from ZIPs, RARs, RFC 2822 emails (.eml), and Outlook .msg files

R) Direct submission of AV quarantine files (Forefront, McAfee, Trend Micro, Kaspersky, MalwareBytes, MSE/SCEP, and SEP12

formats currently supported)

S) Automatic malware classification by Malheur

Page 5: Cuckoo modified - 情報セキュリティ株式会社 · Q) Automatic extraction and submission of interesting files from ZIPs, RARs, RFC 2822 emails (.eml), and Outlook .msg files

Information Security Confidential - Partner Use Only

Cuckoo Testing Environment

5

• Host machine: Ubuntu Desktop 16.04.3 LTS

• Virtual environment: VirtualBox

Page 6: Cuckoo modified - 情報セキュリティ株式会社 · Q) Automatic extraction and submission of interesting files from ZIPs, RARs, RFC 2822 emails (.eml), and Outlook .msg files

Information Security Confidential - Partner Use Only

Cuckoo modified Installation (guest OS)

6

• Install VirtualBox

◎ Setup apt repository

◎ Setup Oracle public key

◎ Install Oracle VirtualBox

Page 7: Cuckoo modified - 情報セキュリティ株式会社 · Q) Automatic extraction and submission of interesting files from ZIPs, RARs, RFC 2822 emails (.eml), and Outlook .msg files

Information Security Confidential - Partner Use Only

Cuckoo modified Installation (guest OS)

7

• Create and Configure Guest VM (VirtualBox)

◎ Install Guest OS (Windows 7 x64)

◎ Configure host-only network

Page 8: Cuckoo modified - 情報セキュリティ株式会社 · Q) Automatic extraction and submission of interesting files from ZIPs, RARs, RFC 2822 emails (.eml), and Outlook .msg files

Information Security Confidential - Partner Use Only

Cuckoo modified Installation (guest OS)

8

• To make Cuckoo run properly in the virtualized Windows system, install some required

software and libraries

◎ Install Python (https://www.python.org/ftp/python/2.7.13/python-2.7.13.msi)

◎ Install Python Image libray (http://www.pythonware.com/products/pil/)

◎ Turn off windows firewall, automatic updates and disable UAC

◎ Install the agent

◎ Run the Agent

Page 9: Cuckoo modified - 情報セキュリティ株式会社 · Q) Automatic extraction and submission of interesting files from ZIPs, RARs, RFC 2822 emails (.eml), and Outlook .msg files

Information Security Confidential - Partner Use Only

Cuckoo modified Installation (guest OS)

9

◎Saving the virtual machine

◎ Power off the machine and restore it

◎ Edit virtualbox.conf

Page 10: Cuckoo modified - 情報セキュリティ株式会社 · Q) Automatic extraction and submission of interesting files from ZIPs, RARs, RFC 2822 emails (.eml), and Outlook .msg files

Information Security Confidential - Partner Use Only

Cuckoo modified Installation

10

• Install Python, MongoDB (to use Django-based web interface)

• Install ElasticSearch

• Install SQLAlchemy and Python BSOn

Page 11: Cuckoo modified - 情報セキュリティ株式会社 · Q) Automatic extraction and submission of interesting files from ZIPs, RARs, RFC 2822 emails (.eml), and Outlook .msg files

Information Security Confidential - Partner Use Only

Cuckoo modified Installation

11

• Install optional dependencies

• For faster generation of PDF reports install wkhtmltopdf

• If Pip is not installed, install Pip

• Install Cybox and Maec

Page 12: Cuckoo modified - 情報セキュリティ株式会社 · Q) Automatic extraction and submission of interesting files from ZIPs, RARs, RFC 2822 emails (.eml), and Outlook .msg files

Information Security Confidential - Partner Use Only

Cuckoo modified Installation

12

• Install YARA

• Compile YARA with Cuckoo module

• Run the test cases to make sure everything is fine

Page 13: Cuckoo modified - 情報セキュリティ株式会社 · Q) Automatic extraction and submission of interesting files from ZIPs, RARs, RFC 2822 emails (.eml), and Outlook .msg files

Information Security Confidential - Partner Use Only

Cuckoo modified Installation

13

• Install pydeep

• Install tcpdump (installed by default in Ubuntu)

• Tcpdump requires root privileges, but since Cuckoo does not need to run as root set

specific Linux capabilities to the binary

Page 14: Cuckoo modified - 情報セキュリティ株式会社 · Q) Automatic extraction and submission of interesting files from ZIPs, RARs, RFC 2822 emails (.eml), and Outlook .msg files

Information Security Confidential - Partner Use Only

Cuckoo modified Installation

14

• Optional: Create a new user

• If using VirtualBox add the new user to the vboxusers group

• Install Cuckoo modified

Page 15: Cuckoo modified - 情報セキュリティ株式会社 · Q) Automatic extraction and submission of interesting files from ZIPs, RARs, RFC 2822 emails (.eml), and Outlook .msg files

Information Security Confidential - Partner Use Only

Cuckoo modified Installation

15

• Configure the web interface

◎ Install django

◎ Enable Mongodb

◎ Install missing modules

Page 16: Cuckoo modified - 情報セキュリティ株式会社 · Q) Automatic extraction and submission of interesting files from ZIPs, RARs, RFC 2822 emails (.eml), and Outlook .msg files

Information Security Confidential - Partner Use Only

Cuckoo modified Installation

16

• Configure the web interface

◎ Apply the migrations

Page 17: Cuckoo modified - 情報セキュリティ株式会社 · Q) Automatic extraction and submission of interesting files from ZIPs, RARs, RFC 2822 emails (.eml), and Outlook .msg files

Information Security Confidential - Partner Use Only

Cuckoo modified Installation

17

• Configure the web interface

◎ Start the web interface

◎ Resolve /* NoneType' object has no attribute 'upper */ when starting the web interface

Page 18: Cuckoo modified - 情報セキュリティ株式会社 · Q) Automatic extraction and submission of interesting files from ZIPs, RARs, RFC 2822 emails (.eml), and Outlook .msg files

Information Security Confidential - Partner Use Only

Submit a file through the web interfaces

18

• Run cuckoo

• Submit a file

Page 19: Cuckoo modified - 情報セキュリティ株式会社 · Q) Automatic extraction and submission of interesting files from ZIPs, RARs, RFC 2822 emails (.eml), and Outlook .msg files

Information Security Confidential - Partner Use Only

Submit a file through the web interfaces

19

• Submit a file

Page 20: Cuckoo modified - 情報セキュリティ株式会社 · Q) Automatic extraction and submission of interesting files from ZIPs, RARs, RFC 2822 emails (.eml), and Outlook .msg files

Information Security Confidential - Partner Use Only

References

20

• Cuckoo website

https://cuckoosandbox.org

• GitHub

https://github.com/cuckoosandbox/cuckoo

• Cuckoo modified Github

https://github.com/spender-sandbox/cuckoo-modified