SlideShare ist ein Scribd-Unternehmen logo
1 von 16
Downloaden Sie, um offline zu lesen
FFRI,Inc.
Fourteenforty Research Institute, Inc.
FFRI,Inc.
http://www.ffri.jp
Automated on-execute test using VirtualBox
Junichi Murakami
Executive Officer, Director of Advanced Development Division
Ver2.00.01
FFRI,Inc.
1. Background and motivation
2. Overview of a test
– automated on-execute test
– virtualization software and automation methods
– Oracle VM VirtualBox and its automation
– example of VBoxManage
3. Automation script
– FFRI AutoMonkey
– design concept
– throughput
– performance
4. References
5. Contact information
Agenda
2
FFRI,Inc.
• Automated test against a large amount of malware is required to evaluate a
malware detection engine
• Testing methods are classified into on-demand and on-access testing
• on-execute test which is a kind of on-access test has to execute malware one
by one
• Therefore automation based on virtualization is required
• This slides describes automated on-execute test method using VirtualBox
1.Background and motivation
3
malware scanning on-demand
on-access on-read/write
on-execute
* type of malware scanning
FFRI,Inc.
• Basic steps are following
1. Copy malware into a guest
2. Execute copied malware in the guest
3. Analyze or detect malware in the guest
4. Preserve the result after execution is terminated
5. Revert the guest back to original condition
6. Go to 1.
• Required functions to execute above are following
a. Copying a file to a guest from a host (copy-to)
b. Executing arbitrary a program in a guest from a host(exec)
c. Copying a file from guest to a host (copy-from)
d. Reverting a guest condition based on a snapshot(revert)
2.1.Automated on-execute testing
4
→ All functions can be achieved by making a communication interface between a host
and a guest using TCP/IP. We considered the way we do not need to involve
developing software as possible as we could
FFRI,Inc.
software Licence copy-to copy-from exec revert method
VMware Workstation Proprietary ○ ○ ○ ○ VIX API
VMware ESX(#1) Proprietary ○ ○ ○ ○ VIX API
Oracle VM VirtualBox GPL2 ○ ○ ○ ○ VBoxManage
QEMU + KVM GPL2(#2) × × × ○ Libvirt
2.2.virtualization software and automation methods
5
#1 ESXi can also use VIX API for 60days by registering a evaluation license.
#2 KVM's parts are licensed under various GNU licenses(GPL, GPL2, LGPL2, etc.)
• Use functions which virtualization software has natively
• VMware(licensed) and VritualBox have all the features we need
→ We considered using VirtualBox because of the cost advantage
• QEMU+KVM can be used by 3rd party software(ex: libguestfs + winexe)
– “Malware Analysis: Collaboration, Automation & Tuning”, Shmoocon 2013
http://www.slideshare.net/xabean/malware-analysis-16674048
FFRI,Inc.
• A kind of x86 virtualization software, currently developed by Oracle
• Version 4.0 and later, fully open source software (GPL2)
• Supporting various host and guest environments
– HostOS:Windows, Linux, Mac OS X, Solaris
– GuestOS:Windows, Linux, FreeBSD, OpenBSD, Mac OS X Server, Solaris,etc.
• CLI is available (VBoxManage), friendly to automation
– startvm , pause, resume, poweroff, clonevm, showvinfo
– copyto, copyfrom, exec
– taking snapshot and reverting
– control virtual machine devices status, etc.
2.3.Oracle VM VirtualBox and its automation
6
FFRI,Inc.
2.4.Example of VBoxManage
7
% vboxmanage startvm vm
% vboxmanage controlvm vm poweroff
% vboxmanage snapshot vm restore snapshot-1
% vboxmanage guestcontrol exec vm --image “c:/windows/system32/calc.exe” ¥
--username admin --timeout 60000 --wait-exit
% vboxmanage guestcontrol vm copyto “/some/file” “c:/file.txt” --username admin
* starting a guest
* power off a guest
* reverting a guest based on a snapshot
* execute a program in a guest from a host
* copying a file to a guest from a host
FFRI,Inc.
• Automation script using VBoxManage, just a shell script
– auto-monkey.sh:automation for copy, exec, copy, revert steps
– watch-monkey.sh:watch dog script for the monkey
• It can execute multiple test simultaneously, works individually
• Published at our website below, see README for the detail (License: BSD)
– http://www.ffri.jp/research/freeware.htm
3.1.FFRI AutoMonkey
8
VirtualBox(guest)
malware
log
auto-monkey.sh
watch-monkey.sh
VirtualBox(guest)
malware
log
auto-monkey.sh
watch-monkey.sh
image
snapshot
image
snapshot
FFRI,Inc.
• conform to KISS principle
• Estimation of remaining time is important for this kind of test
– we cannot determine when it would finish if the script hangs up
• Stability of VBoxManage (and VIX API) is the lifeline for the automation
• In fact, error occurs when it runs long time
– Failure by error
• exits immediately
• resumed a test automatically by watch-monkey.sh
– Hanging up(stuck) by error
• watch-monkey.sh monitors lifetime of a VirtualBox process
• if it is stuck, kill and resume
3.2.Design concept
9
FFRI,Inc.
• Testing under 1host and 7guest environment
• Processed 20,000 malware, each execution time was 60 seconds
– total elapsed time: 37h15m
– throughput:8.95 malware/minute
# if malware execution terminated less than 60 seconds, the script processes next item.
• Host and guest environment is following
3.3.Throughput
10
Hardware CPU: Intel(R) Core(TM) i5-4570 CPU @ 3.20GHz
Memory: 8GB
HDD: 1.8TB x 1
Host OS Ubuntu 13.04 + VirtualBox 4.2
Guest OS Windows XP SP3(x86) + FFR yarai 2.3
CPU:1 CPU
Memory:750MB
FFRI,Inc.
• About 70% of total processor is idle state(each core also indicates same trend)
3.4.performance - processor
11
0%
10%
20%
30%
40%
50%
60%
70%
80%
90%
100%
0:05
0:55
1:45
2:35
3:25
4:15
5:05
5:55
6:45
7:35
8:25
9:15
10:05
10:55
11:45
12:35
13:25
14:15
15:05
15:55
16:45
17:35
18:25
19:15
20:05
20:55
21:45
22:35
23:25
load
all processsor statistics
%idle
%steal
%iowait
%system
%nice
%user
FFRI,Inc.
• Consuming about 80% - 90% memory steadily
– real memory usage is between 2.5 and 4.0GB
3.4.performance - memory
12
0
500000
1000000
1500000
2000000
2500000
3000000
3500000
4000000
4500000
5000000
0%
10%
20%
30%
40%
50%
60%
70%
80%
90%
100%
0:05
1:05
2:05
3:05
4:05
5:05
6:05
7:05
8:05
9:05
10:05
11:05
12:05
13:05
14:05
15:05
16:05
17:05
18:05
19:05
20:05
21:05
22:05
23:05
memory utilization statistics
kbmemused
kbmemfree
kbmemused
-(kbbuffers+kbcached)
FFRI,Inc.
• Disk busy ratio(%util) stays around 30% steadily
• The number of queued requests is between 4 and 8
3.4.performance – Disk IO
13
0
10
20
30
40
50
60
70
80
90
0
2
4
6
8
10
12
0:05
0:55
1:45
2:35
3:25
4:15
5:05
5:55
6:45
7:35
8:25
9:15
10:05
10:55
11:45
12:35
13:25
14:15
15:05
15:55
16:45
17:35
18:25
19:15
20:05
20:55
21:45
22:35
23:25
0:00
Usage of block device(/dev/sda)
avgqu-sz
%util
FFRI,Inc.
• None of CPU, memory and IO wasn’t bottleneck under 1host and 7guest
environment
• It seems we can add some more guests up to around 10 VMs according to
memory usage
• However, we have to consider requirement of a process which is executed in
a guest (cpu, memory)
3.4.performance - consideration
14
FFRI,Inc.
• http://www.ffri.jp/assets/files/research/freeware/FFRIAutoMonkey-1.0.tgz
• https://www.virtualbox.org/manual/UserManual.html
• http://www.slideshare.net/xabean/malware-analysis-16674048
• http://www.youtube.com/watch?v=peHdyUlchSM
• http://libguestfs.org/
• http://sourceforge.net/projects/winexe/files/
References
15
FFRI,Inc.
• E-Mail
– research-feedback@ffri.jp
• Twitter
– @FFRI_Research
Contact Information
16

Weitere ähnliche Inhalte

Was ist angesagt?

BlueHat v18 || Massive scale usb device driver fuzz without device
BlueHat v18 || Massive scale usb device driver fuzz without deviceBlueHat v18 || Massive scale usb device driver fuzz without device
BlueHat v18 || Massive scale usb device driver fuzz without device
BlueHat Security Conference
 
[CB19] Attacking DRM subsystem to gain kernel privilege on Chromebooks by Di ...
[CB19] Attacking DRM subsystem to gain kernel privilege on Chromebooks by Di ...[CB19] Attacking DRM subsystem to gain kernel privilege on Chromebooks by Di ...
[CB19] Attacking DRM subsystem to gain kernel privilege on Chromebooks by Di ...
CODE BLUE
 
Csw2017 bazhaniuk exploring_yoursystemdeeper_updated
Csw2017 bazhaniuk exploring_yoursystemdeeper_updatedCsw2017 bazhaniuk exploring_yoursystemdeeper_updated
Csw2017 bazhaniuk exploring_yoursystemdeeper_updated
CanSecWest
 
Windows Kernel Exploitation : This Time Font hunt you down in 4 bytes
Windows Kernel Exploitation : This Time Font hunt you down in 4 bytesWindows Kernel Exploitation : This Time Font hunt you down in 4 bytes
Windows Kernel Exploitation : This Time Font hunt you down in 4 bytes
Peter Hlavaty
 

Was ist angesagt? (20)

BlueHat v18 || Massive scale usb device driver fuzz without device
BlueHat v18 || Massive scale usb device driver fuzz without deviceBlueHat v18 || Massive scale usb device driver fuzz without device
BlueHat v18 || Massive scale usb device driver fuzz without device
 
[CB19] Attacking DRM subsystem to gain kernel privilege on Chromebooks by Di ...
[CB19] Attacking DRM subsystem to gain kernel privilege on Chromebooks by Di ...[CB19] Attacking DRM subsystem to gain kernel privilege on Chromebooks by Di ...
[CB19] Attacking DRM subsystem to gain kernel privilege on Chromebooks by Di ...
 
OffensiveCon2022: Case Studies of Fuzzing with Xen
OffensiveCon2022: Case Studies of Fuzzing with XenOffensiveCon2022: Case Studies of Fuzzing with Xen
OffensiveCon2022: Case Studies of Fuzzing with Xen
 
VM Forking and Hypervisor-based Fuzzing with Xen
VM Forking and Hypervisor-based Fuzzing with XenVM Forking and Hypervisor-based Fuzzing with Xen
VM Forking and Hypervisor-based Fuzzing with Xen
 
Pitfalls and limits of dynamic malware analysis
Pitfalls and limits of dynamic malware analysisPitfalls and limits of dynamic malware analysis
Pitfalls and limits of dynamic malware analysis
 
Automate Yo'self -- SeaGL
Automate Yo'self -- SeaGL Automate Yo'self -- SeaGL
Automate Yo'self -- SeaGL
 
Using QEMU for cross development
Using QEMU for cross developmentUsing QEMU for cross development
Using QEMU for cross development
 
Integrating web archiving in preservation workflows. Louise Fauduet, Clément ...
Integrating web archiving in preservation workflows. Louise Fauduet, Clément ...Integrating web archiving in preservation workflows. Louise Fauduet, Clément ...
Integrating web archiving in preservation workflows. Louise Fauduet, Clément ...
 
31c3 Presentation - Virtual Machine Introspection
31c3 Presentation - Virtual Machine Introspection31c3 Presentation - Virtual Machine Introspection
31c3 Presentation - Virtual Machine Introspection
 
Virtual Machine Introspection with Xen on ARM
Virtual Machine Introspection with Xen on ARMVirtual Machine Introspection with Xen on ARM
Virtual Machine Introspection with Xen on ARM
 
Hacktivity2014: Virtual Machine Introspection to Detect and Protect
Hacktivity2014: Virtual Machine Introspection to Detect and ProtectHacktivity2014: Virtual Machine Introspection to Detect and Protect
Hacktivity2014: Virtual Machine Introspection to Detect and Protect
 
Csw2017 bazhaniuk exploring_yoursystemdeeper_updated
Csw2017 bazhaniuk exploring_yoursystemdeeper_updatedCsw2017 bazhaniuk exploring_yoursystemdeeper_updated
Csw2017 bazhaniuk exploring_yoursystemdeeper_updated
 
Windows Kernel Exploitation : This Time Font hunt you down in 4 bytes
Windows Kernel Exploitation : This Time Font hunt you down in 4 bytesWindows Kernel Exploitation : This Time Font hunt you down in 4 bytes
Windows Kernel Exploitation : This Time Font hunt you down in 4 bytes
 
VM Forking and Hypervisor-based fuzzing
VM Forking and Hypervisor-based fuzzingVM Forking and Hypervisor-based fuzzing
VM Forking and Hypervisor-based fuzzing
 
Introduction of ShinoBOT (Black Hat USA 2013 Arsenal)
Introduction of ShinoBOT (Black Hat USA 2013 Arsenal)Introduction of ShinoBOT (Black Hat USA 2013 Arsenal)
Introduction of ShinoBOT (Black Hat USA 2013 Arsenal)
 
Memory Management in Android
Memory Management in AndroidMemory Management in Android
Memory Management in Android
 
ShinoBOT Suite
ShinoBOT SuiteShinoBOT Suite
ShinoBOT Suite
 
Android Internals
Android InternalsAndroid Internals
Android Internals
 
Cloud Security with LibVMI
Cloud Security with LibVMICloud Security with LibVMI
Cloud Security with LibVMI
 
Масштабируемый и эффективный фаззинг Google Chrome
Масштабируемый и эффективный фаззинг Google ChromeМасштабируемый и эффективный фаззинг Google Chrome
Масштабируемый и эффективный фаззинг Google Chrome
 

Ähnlich wie Mr201309 automated on-execute_test_using_virtual_box_eng

Black hat dc-2010-egypt-uav-slides
Black hat dc-2010-egypt-uav-slidesBlack hat dc-2010-egypt-uav-slides
Black hat dc-2010-egypt-uav-slides
Bakry3
 
Project Malware AnalysisCS 6262 Project 3Agenda.docx
Project Malware AnalysisCS 6262 Project 3Agenda.docxProject Malware AnalysisCS 6262 Project 3Agenda.docx
Project Malware AnalysisCS 6262 Project 3Agenda.docx
briancrawford30935
 
Vagrant-Binding JUG Dortmund
Vagrant-Binding JUG DortmundVagrant-Binding JUG Dortmund
Vagrant-Binding JUG Dortmund
Hendrik Ebbers
 

Ähnlich wie Mr201309 automated on-execute_test_using_virtual_box_eng (20)

TENTACLE: Environment-Sensitive Malware Palpation(PacSec 2014)
TENTACLE: Environment-Sensitive Malware Palpation(PacSec 2014)TENTACLE: Environment-Sensitive Malware Palpation(PacSec 2014)
TENTACLE: Environment-Sensitive Malware Palpation(PacSec 2014)
 
Freeze Drying for Capturing Environment-Sensitive Malware Alive
Freeze Drying for Capturing Environment-Sensitive Malware AliveFreeze Drying for Capturing Environment-Sensitive Malware Alive
Freeze Drying for Capturing Environment-Sensitive Malware Alive
 
Malware analysis
Malware analysisMalware analysis
Malware analysis
 
Automating Post Exploitation with PowerShell
Automating Post Exploitation with PowerShellAutomating Post Exploitation with PowerShell
Automating Post Exploitation with PowerShell
 
Hacktivity 2016: Stealthy, hypervisor based malware analysis
Hacktivity 2016: Stealthy, hypervisor based malware analysisHacktivity 2016: Stealthy, hypervisor based malware analysis
Hacktivity 2016: Stealthy, hypervisor based malware analysis
 
OpenStack Murano introduction
OpenStack Murano introductionOpenStack Murano introduction
OpenStack Murano introduction
 
XPDS14 - Zero-Footprint Guest Memory Introspection from Xen - Mihai Dontu, Bi...
XPDS14 - Zero-Footprint Guest Memory Introspection from Xen - Mihai Dontu, Bi...XPDS14 - Zero-Footprint Guest Memory Introspection from Xen - Mihai Dontu, Bi...
XPDS14 - Zero-Footprint Guest Memory Introspection from Xen - Mihai Dontu, Bi...
 
Hacking Highly Secured Enterprise Environments by Zoltan Balazs
Hacking Highly Secured Enterprise Environments by Zoltan BalazsHacking Highly Secured Enterprise Environments by Zoltan Balazs
Hacking Highly Secured Enterprise Environments by Zoltan Balazs
 
Server virtualization
Server virtualizationServer virtualization
Server virtualization
 
Metasploit @ 2010 Utah Open Source Conference
Metasploit @ 2010 Utah Open Source ConferenceMetasploit @ 2010 Utah Open Source Conference
Metasploit @ 2010 Utah Open Source Conference
 
Unikernels: the rise of the library hypervisor in MirageOS
Unikernels: the rise of the library hypervisor in MirageOSUnikernels: the rise of the library hypervisor in MirageOS
Unikernels: the rise of the library hypervisor in MirageOS
 
Crikeycon 2019 Velociraptor Workshop
Crikeycon 2019 Velociraptor WorkshopCrikeycon 2019 Velociraptor Workshop
Crikeycon 2019 Velociraptor Workshop
 
One commit, one release. Continuously delivering a Symfony project.
One commit, one release. Continuously delivering a Symfony project.One commit, one release. Continuously delivering a Symfony project.
One commit, one release. Continuously delivering a Symfony project.
 
Unikernels: Rise of the Library Hypervisor
Unikernels: Rise of the Library HypervisorUnikernels: Rise of the Library Hypervisor
Unikernels: Rise of the Library Hypervisor
 
Black hat dc-2010-egypt-uav-slides
Black hat dc-2010-egypt-uav-slidesBlack hat dc-2010-egypt-uav-slides
Black hat dc-2010-egypt-uav-slides
 
Small Python Tools for Software Release Engineering
Small Python Tools for Software Release EngineeringSmall Python Tools for Software Release Engineering
Small Python Tools for Software Release Engineering
 
Project Malware AnalysisCS 6262 Project 3Agenda.docx
Project Malware AnalysisCS 6262 Project 3Agenda.docxProject Malware AnalysisCS 6262 Project 3Agenda.docx
Project Malware AnalysisCS 6262 Project 3Agenda.docx
 
Vagrant-Binding JUG Dortmund
Vagrant-Binding JUG DortmundVagrant-Binding JUG Dortmund
Vagrant-Binding JUG Dortmund
 
Virtualization with Vagrant (ua.pycon 2011)
Virtualization with Vagrant (ua.pycon 2011)Virtualization with Vagrant (ua.pycon 2011)
Virtualization with Vagrant (ua.pycon 2011)
 
Bridging the Semantic Gap in Virtualized Environment
Bridging the Semantic Gap in Virtualized EnvironmentBridging the Semantic Gap in Virtualized Environment
Bridging the Semantic Gap in Virtualized Environment
 

Mehr von FFRI, Inc.

Appearances are deceiving: Novel offensive techniques in Windows 10/11 on ARM
Appearances are deceiving: Novel offensive techniques in Windows 10/11 on ARMAppearances are deceiving: Novel offensive techniques in Windows 10/11 on ARM
Appearances are deceiving: Novel offensive techniques in Windows 10/11 on ARM
FFRI, Inc.
 
Appearances are deceiving: Novel offensive techniques in Windows 10/11 on ARM
Appearances are deceiving: Novel offensive techniques in Windows 10/11 on ARMAppearances are deceiving: Novel offensive techniques in Windows 10/11 on ARM
Appearances are deceiving: Novel offensive techniques in Windows 10/11 on ARM
FFRI, Inc.
 

Mehr von FFRI, Inc. (20)

Appearances are deceiving: Novel offensive techniques in Windows 10/11 on ARM
Appearances are deceiving: Novel offensive techniques in Windows 10/11 on ARMAppearances are deceiving: Novel offensive techniques in Windows 10/11 on ARM
Appearances are deceiving: Novel offensive techniques in Windows 10/11 on ARM
 
Appearances are deceiving: Novel offensive techniques in Windows 10/11 on ARM
Appearances are deceiving: Novel offensive techniques in Windows 10/11 on ARMAppearances are deceiving: Novel offensive techniques in Windows 10/11 on ARM
Appearances are deceiving: Novel offensive techniques in Windows 10/11 on ARM
 
TrustZone use case and trend (FFRI Monthly Research Mar 2017)
TrustZone use case and trend (FFRI Monthly Research Mar 2017) TrustZone use case and trend (FFRI Monthly Research Mar 2017)
TrustZone use case and trend (FFRI Monthly Research Mar 2017)
 
Android Things Security Research in Developer Preview 2 (FFRI Monthly Researc...
Android Things Security Research in Developer Preview 2 (FFRI Monthly Researc...Android Things Security Research in Developer Preview 2 (FFRI Monthly Researc...
Android Things Security Research in Developer Preview 2 (FFRI Monthly Researc...
 
An Overview of the Android Things Security (FFRI Monthly Research Jan 2017)
An Overview of the Android Things Security (FFRI Monthly Research Jan 2017) An Overview of the Android Things Security (FFRI Monthly Research Jan 2017)
An Overview of the Android Things Security (FFRI Monthly Research Jan 2017)
 
Black Hat Europe 2016 Survey Report (FFRI Monthly Research Dec 2016)
Black Hat Europe 2016 Survey Report (FFRI Monthly Research Dec 2016) Black Hat Europe 2016 Survey Report (FFRI Monthly Research Dec 2016)
Black Hat Europe 2016 Survey Report (FFRI Monthly Research Dec 2016)
 
An Example of use the Threat Modeling Tool (FFRI Monthly Research Nov 2016)
An Example of use the Threat Modeling Tool (FFRI Monthly Research Nov 2016)An Example of use the Threat Modeling Tool (FFRI Monthly Research Nov 2016)
An Example of use the Threat Modeling Tool (FFRI Monthly Research Nov 2016)
 
STRIDE Variants and Security Requirements-based Threat Analysis (FFRI Monthly...
STRIDE Variants and Security Requirements-based Threat Analysis (FFRI Monthly...STRIDE Variants and Security Requirements-based Threat Analysis (FFRI Monthly...
STRIDE Variants and Security Requirements-based Threat Analysis (FFRI Monthly...
 
Introduction of Threat Analysis Methods(FFRI Monthly Research 2016.9)
Introduction of Threat Analysis Methods(FFRI Monthly Research 2016.9)Introduction of Threat Analysis Methods(FFRI Monthly Research 2016.9)
Introduction of Threat Analysis Methods(FFRI Monthly Research 2016.9)
 
Black Hat USA 2016 Survey Report (FFRI Monthly Research 2016.8)
Black Hat USA 2016  Survey Report (FFRI Monthly Research 2016.8)Black Hat USA 2016  Survey Report (FFRI Monthly Research 2016.8)
Black Hat USA 2016 Survey Report (FFRI Monthly Research 2016.8)
 
About security assessment framework “CHIPSEC” (FFRI Monthly Research 2016.7)
About security assessment framework “CHIPSEC” (FFRI Monthly Research 2016.7) About security assessment framework “CHIPSEC” (FFRI Monthly Research 2016.7)
About security assessment framework “CHIPSEC” (FFRI Monthly Research 2016.7)
 
Black Hat USA 2016 Pre-Survey (FFRI Monthly Research 2016.6)
Black Hat USA 2016 Pre-Survey (FFRI Monthly Research 2016.6)Black Hat USA 2016 Pre-Survey (FFRI Monthly Research 2016.6)
Black Hat USA 2016 Pre-Survey (FFRI Monthly Research 2016.6)
 
Black Hat Asia 2016 Survey Report (FFRI Monthly Research 2016.4)
Black Hat Asia 2016 Survey Report (FFRI Monthly Research 2016.4)Black Hat Asia 2016 Survey Report (FFRI Monthly Research 2016.4)
Black Hat Asia 2016 Survey Report (FFRI Monthly Research 2016.4)
 
ARMv8-M TrustZone: A New Security Feature for Embedded Systems (FFRI Monthly ...
ARMv8-M TrustZone: A New Security Feature for Embedded Systems (FFRI Monthly ...ARMv8-M TrustZone: A New Security Feature for Embedded Systems (FFRI Monthly ...
ARMv8-M TrustZone: A New Security Feature for Embedded Systems (FFRI Monthly ...
 
CODE BLUE 2015 Report (FFRI Monthly Research 2015.11)
CODE BLUE 2015 Report (FFRI Monthly Research 2015.11)CODE BLUE 2015 Report (FFRI Monthly Research 2015.11)
CODE BLUE 2015 Report (FFRI Monthly Research 2015.11)
 
Latest Security Reports of Automobile and Vulnerability Assessment by CVSS v3...
Latest Security Reports of Automobile and Vulnerability Assessment by CVSS v3...Latest Security Reports of Automobile and Vulnerability Assessment by CVSS v3...
Latest Security Reports of Automobile and Vulnerability Assessment by CVSS v3...
 
Black Hat USA 2015 Survey Report (FFRI Monthly Research 201508)
Black Hat USA 2015 Survey Report (FFRI Monthly Research 201508)Black Hat USA 2015 Survey Report (FFRI Monthly Research 201508)
Black Hat USA 2015 Survey Report (FFRI Monthly Research 201508)
 
A Survey of Threats in OS X and iOS(FFRI Monthly Research 201507)
A Survey of Threats in OS X and iOS(FFRI Monthly Research 201507)A Survey of Threats in OS X and iOS(FFRI Monthly Research 201507)
A Survey of Threats in OS X and iOS(FFRI Monthly Research 201507)
 
Security of Windows 10 IoT Core(FFRI Monthly Research 201506)
Security of Windows 10 IoT Core(FFRI Monthly Research 201506)Security of Windows 10 IoT Core(FFRI Monthly Research 201506)
Security of Windows 10 IoT Core(FFRI Monthly Research 201506)
 
Trend of Next-Gen In-Vehicle Network Standard and Current State of Security(F...
Trend of Next-Gen In-Vehicle Network Standard and Current State of Security(F...Trend of Next-Gen In-Vehicle Network Standard and Current State of Security(F...
Trend of Next-Gen In-Vehicle Network Standard and Current State of Security(F...
 

Kürzlich hochgeladen

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Kürzlich hochgeladen (20)

Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 

Mr201309 automated on-execute_test_using_virtual_box_eng

  • 1. FFRI,Inc. Fourteenforty Research Institute, Inc. FFRI,Inc. http://www.ffri.jp Automated on-execute test using VirtualBox Junichi Murakami Executive Officer, Director of Advanced Development Division Ver2.00.01
  • 2. FFRI,Inc. 1. Background and motivation 2. Overview of a test – automated on-execute test – virtualization software and automation methods – Oracle VM VirtualBox and its automation – example of VBoxManage 3. Automation script – FFRI AutoMonkey – design concept – throughput – performance 4. References 5. Contact information Agenda 2
  • 3. FFRI,Inc. • Automated test against a large amount of malware is required to evaluate a malware detection engine • Testing methods are classified into on-demand and on-access testing • on-execute test which is a kind of on-access test has to execute malware one by one • Therefore automation based on virtualization is required • This slides describes automated on-execute test method using VirtualBox 1.Background and motivation 3 malware scanning on-demand on-access on-read/write on-execute * type of malware scanning
  • 4. FFRI,Inc. • Basic steps are following 1. Copy malware into a guest 2. Execute copied malware in the guest 3. Analyze or detect malware in the guest 4. Preserve the result after execution is terminated 5. Revert the guest back to original condition 6. Go to 1. • Required functions to execute above are following a. Copying a file to a guest from a host (copy-to) b. Executing arbitrary a program in a guest from a host(exec) c. Copying a file from guest to a host (copy-from) d. Reverting a guest condition based on a snapshot(revert) 2.1.Automated on-execute testing 4 → All functions can be achieved by making a communication interface between a host and a guest using TCP/IP. We considered the way we do not need to involve developing software as possible as we could
  • 5. FFRI,Inc. software Licence copy-to copy-from exec revert method VMware Workstation Proprietary ○ ○ ○ ○ VIX API VMware ESX(#1) Proprietary ○ ○ ○ ○ VIX API Oracle VM VirtualBox GPL2 ○ ○ ○ ○ VBoxManage QEMU + KVM GPL2(#2) × × × ○ Libvirt 2.2.virtualization software and automation methods 5 #1 ESXi can also use VIX API for 60days by registering a evaluation license. #2 KVM's parts are licensed under various GNU licenses(GPL, GPL2, LGPL2, etc.) • Use functions which virtualization software has natively • VMware(licensed) and VritualBox have all the features we need → We considered using VirtualBox because of the cost advantage • QEMU+KVM can be used by 3rd party software(ex: libguestfs + winexe) – “Malware Analysis: Collaboration, Automation & Tuning”, Shmoocon 2013 http://www.slideshare.net/xabean/malware-analysis-16674048
  • 6. FFRI,Inc. • A kind of x86 virtualization software, currently developed by Oracle • Version 4.0 and later, fully open source software (GPL2) • Supporting various host and guest environments – HostOS:Windows, Linux, Mac OS X, Solaris – GuestOS:Windows, Linux, FreeBSD, OpenBSD, Mac OS X Server, Solaris,etc. • CLI is available (VBoxManage), friendly to automation – startvm , pause, resume, poweroff, clonevm, showvinfo – copyto, copyfrom, exec – taking snapshot and reverting – control virtual machine devices status, etc. 2.3.Oracle VM VirtualBox and its automation 6
  • 7. FFRI,Inc. 2.4.Example of VBoxManage 7 % vboxmanage startvm vm % vboxmanage controlvm vm poweroff % vboxmanage snapshot vm restore snapshot-1 % vboxmanage guestcontrol exec vm --image “c:/windows/system32/calc.exe” ¥ --username admin --timeout 60000 --wait-exit % vboxmanage guestcontrol vm copyto “/some/file” “c:/file.txt” --username admin * starting a guest * power off a guest * reverting a guest based on a snapshot * execute a program in a guest from a host * copying a file to a guest from a host
  • 8. FFRI,Inc. • Automation script using VBoxManage, just a shell script – auto-monkey.sh:automation for copy, exec, copy, revert steps – watch-monkey.sh:watch dog script for the monkey • It can execute multiple test simultaneously, works individually • Published at our website below, see README for the detail (License: BSD) – http://www.ffri.jp/research/freeware.htm 3.1.FFRI AutoMonkey 8 VirtualBox(guest) malware log auto-monkey.sh watch-monkey.sh VirtualBox(guest) malware log auto-monkey.sh watch-monkey.sh image snapshot image snapshot
  • 9. FFRI,Inc. • conform to KISS principle • Estimation of remaining time is important for this kind of test – we cannot determine when it would finish if the script hangs up • Stability of VBoxManage (and VIX API) is the lifeline for the automation • In fact, error occurs when it runs long time – Failure by error • exits immediately • resumed a test automatically by watch-monkey.sh – Hanging up(stuck) by error • watch-monkey.sh monitors lifetime of a VirtualBox process • if it is stuck, kill and resume 3.2.Design concept 9
  • 10. FFRI,Inc. • Testing under 1host and 7guest environment • Processed 20,000 malware, each execution time was 60 seconds – total elapsed time: 37h15m – throughput:8.95 malware/minute # if malware execution terminated less than 60 seconds, the script processes next item. • Host and guest environment is following 3.3.Throughput 10 Hardware CPU: Intel(R) Core(TM) i5-4570 CPU @ 3.20GHz Memory: 8GB HDD: 1.8TB x 1 Host OS Ubuntu 13.04 + VirtualBox 4.2 Guest OS Windows XP SP3(x86) + FFR yarai 2.3 CPU:1 CPU Memory:750MB
  • 11. FFRI,Inc. • About 70% of total processor is idle state(each core also indicates same trend) 3.4.performance - processor 11 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% 0:05 0:55 1:45 2:35 3:25 4:15 5:05 5:55 6:45 7:35 8:25 9:15 10:05 10:55 11:45 12:35 13:25 14:15 15:05 15:55 16:45 17:35 18:25 19:15 20:05 20:55 21:45 22:35 23:25 load all processsor statistics %idle %steal %iowait %system %nice %user
  • 12. FFRI,Inc. • Consuming about 80% - 90% memory steadily – real memory usage is between 2.5 and 4.0GB 3.4.performance - memory 12 0 500000 1000000 1500000 2000000 2500000 3000000 3500000 4000000 4500000 5000000 0% 10% 20% 30% 40% 50% 60% 70% 80% 90% 100% 0:05 1:05 2:05 3:05 4:05 5:05 6:05 7:05 8:05 9:05 10:05 11:05 12:05 13:05 14:05 15:05 16:05 17:05 18:05 19:05 20:05 21:05 22:05 23:05 memory utilization statistics kbmemused kbmemfree kbmemused -(kbbuffers+kbcached)
  • 13. FFRI,Inc. • Disk busy ratio(%util) stays around 30% steadily • The number of queued requests is between 4 and 8 3.4.performance – Disk IO 13 0 10 20 30 40 50 60 70 80 90 0 2 4 6 8 10 12 0:05 0:55 1:45 2:35 3:25 4:15 5:05 5:55 6:45 7:35 8:25 9:15 10:05 10:55 11:45 12:35 13:25 14:15 15:05 15:55 16:45 17:35 18:25 19:15 20:05 20:55 21:45 22:35 23:25 0:00 Usage of block device(/dev/sda) avgqu-sz %util
  • 14. FFRI,Inc. • None of CPU, memory and IO wasn’t bottleneck under 1host and 7guest environment • It seems we can add some more guests up to around 10 VMs according to memory usage • However, we have to consider requirement of a process which is executed in a guest (cpu, memory) 3.4.performance - consideration 14
  • 15. FFRI,Inc. • http://www.ffri.jp/assets/files/research/freeware/FFRIAutoMonkey-1.0.tgz • https://www.virtualbox.org/manual/UserManual.html • http://www.slideshare.net/xabean/malware-analysis-16674048 • http://www.youtube.com/watch?v=peHdyUlchSM • http://libguestfs.org/ • http://sourceforge.net/projects/winexe/files/ References 15
  • 16. FFRI,Inc. • E-Mail – research-feedback@ffri.jp • Twitter – @FFRI_Research Contact Information 16