Malwarebytes Breach Remediation Windows Administrator Guide

Malwarebytes Breach Remediation
Windows Administrator Guide
Version 2.7.1
6 January 2017
Notices
Malwarebytes products and related documentation are provided under a license agreement containing restrictions on use and
disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by
law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or
display any part, in any form, or by any means. You may copy and use this document for your internal reference purposes only.
This document is provided “as-is.” The information contained in this document is subject to change without notice and is not
warranted to be error-free. If you find any errors, we would appreciate your comments; please report them to us in writing.
The Malwarebytes logo is a trademark of Malwarebytes. Windows is a registered trademark of Microsoft Corporation. All other
trademarks or registered trademarks listed belong to their respective owners.
Copyright © 2017 Malwarebytes. All rights reserved.
Third Party Project Usage
Malwarebytes software is made possible thanks in part to many open source and third party projects. A requirement of many of
these projects is that credit is given where credit is due. Information about each third party/open source project used in
Malwarebytes software – as well as licenses for each – are available for viewing here:
https://www.malwarebytes.com/support/thirdpartynotices/
Sample Code in Documentation
The sample code described herein is provided on an "as is" basis, without warranty of any kind, to the fullest extent permitted by
law. Malwarebytes does not warrant or guarantee the individual success developers may have in implementing the sample code
on their development platforms. You are solely responsible for testing and maintaining all scripts.
Malwarebytes does not warrant, guarantee or make any representations regarding the use, results of use, accuracy, timeliness or
completeness of any data or information relating to the sample code. Malwarebytes disclaims all warranties, express or implied,
and in particular, disclaims all warranties of merchantability, fitness for a particular purpose, and warranties related to the code, or
any service or software related there to.
CWB17-2071c
Table of Contents
Introduction .......................................................................................................................1
What’s New ................................................................................................................................................ 1
Key Features ............................................................................................................................................... 1
External Access Requirements.............................................................................................................. 1
System Requirements ............................................................................................................................. 2
Using Malwarebytes Breach Remediation.................................................................. 3
License Key Status .................................................................................................................................... 3
Getting Started .......................................................................................................................................... 3
Interactions with Anti-Rootkit Scanning ....................................................................................................................... 5
Remediation Now or Later? .................................................................................................................. 5
Remediation Scan ................................................................................................................................................................. 5
Diagnostic Scan ..................................................................................................................................................................... 5
Selective Remediation ......................................................................................................................................................... 5
Excluding Items from Scanning ........................................................................................................... 6
Restoring Items from Quarantine ....................................................................................................... 7
Command Line Parameters ........................................................................................... 9
Conventions ............................................................................................................................................... 9
Command Line Overview ...................................................................................................................... 9
Command Line Reference ................................................................................................................... 10
register.................................................................................................................................................................................... 10
update .................................................................................................................................................................................... 10
version .................................................................................................................................................................................... 10
scan........................................................................................................................................................................................... 11
errorout .................................................................................................................................................................................. 13
quarantine ............................................................................................................................................................................. 14
settings ................................................................................................................................................................................... 15
Scan Log .......................................................................................................................... 17
<header> Section .................................................................................................................................. 17
<date>.................................................................................................................................................................................... 17
<logfile> ................................................................................................................................................................................ 17
<isadmin> ............................................................................................................................................................................. 17
<engine> Section................................................................................................................................... 17
<version> .............................................................................................................................................................................. 17
<malware-database> ........................................................................................................................................................ 17
<rootkit-database> ........................................................................................................................................................... 18
<licensedatabase> ............................................................................................................................................................. 18
<file-protection> ................................................................................................................................................................ 18
<web-protection> .............................................................................................................................................................. 18
<self-protection> ............................................................................................................................................................... 18
<system> Section .................................................................................................................................. 18
<hostname> ......................................................................................................................................................................... 18
<ip> ......................................................................................................................................................................................... 18
<osversion>.......................................................................................................................................................................... 18
<arch> .................................................................................................................................................................................... 18
<username> ......................................................................................................................................................................... 18
<filesys>................................................................................................................................................................................. 18
<summary> Section .............................................................................................................................. 19
<type> .................................................................................................................................................................................... 19
<result> ................................................................................................................................................................................. 19
<objects> .............................................................................................................................................................................. 19
<time>.................................................................................................................................................................................... 19
<processes> ......................................................................................................................................................................... 19
<modules> ........................................................................................................................................................................... 19
<keys> .................................................................................................................................................................................... 19
<values> ................................................................................................................................................................................ 19
<datas> .................................................................................................................................................................................. 19
<folders> ............................................................................................................................................................................... 19
<files> ..................................................................................................................................................................................... 19
<sectors> .............................................................................................................................................................................. 19
<options> Section ................................................................................................................................. 20
<memory> ............................................................................................................................................................................20
<startup> ..............................................................................................................................................................................20
<filesystem> .........................................................................................................................................................................20
<archives> ............................................................................................................................................................................20
<rootkits> .............................................................................................................................................................................20
<deeprootkit> .....................................................................................................................................................................20
<heuristics> ..........................................................................................................................................................................20
<pup> ....................................................................................................................................................................................20
<pum> ...................................................................................................................................................................................20
<items> Section ..................................................................................................................................... 21
<path> ................................................................................................................................................................................... 21
<vendor> .............................................................................................................................................................................. 21
<action> ................................................................................................................................................................................ 21
<hash> ................................................................................................................................................................................... 21
<valuename> ....................................................................................................................................................................... 21
<valuedata> ......................................................................................................................................................................... 21
<baddata> ............................................................................................................................................................................ 21
<gooddata> .........................................................................................................................................................................22
<pid> ......................................................................................................................................................................................22
Sample Log File ...................................................................................................................................... 22
Sample Scan Progress File .................................................................................................................. 23
Event Logging to syslog ...............................................................................................24
Construction of a Log Entry ............................................................................................................... 24
Mapping Malwarebytes Fields to CEF Format.............................................................................. 24
Malwarebytes Log Events ................................................................................................................... 25
1000 – ScanStartEvent .......................................................................................................................................................26
1001 – DetectionEvent .......................................................................................................................................................26
1002 – RemovalEvent.........................................................................................................................................................26
1003 – ScanEndEvent .........................................................................................................................................................27
1004 – RestoreStartEvent .................................................................................................................................................27
1005 – RestoreEvent ...........................................................................................................................................................27
1006 – RestoreEndEvent ...................................................................................................................................................27
1007 – RemoveLastScanEvent.........................................................................................................................................27
1008 – DbUpdateEvent .....................................................................................................................................................28
1009 – CustomDbUpdateEvent ......................................................................................................................................28
Further Reading....................................................................................................................................................... 28
Customizing the Rules Database with OpenIOC .................................................... 29
Implementing IOC Definitions ............................................................................................................................ 29
Mandiant IOC Editor ..........................................................................................................................................................29
Restrictions Which Apply to Custom Rules................................................................................................................29
Top-Level OpenIOC XML file ..........................................................................................................................................29
Creating Custom Rules ......................................................................................................................................... 30
Custom Hash Rule ..............................................................................................................................................................30
Custom File Rule .................................................................................................................................................................30
Custom Folder Rule............................................................................................................................................................ 31
Custom Registry Key Rule ................................................................................................................................................ 31
Custom Registry Value Rule ............................................................................................................................................32
Program Status Codes .......................................................................................................................................... 32
Further Reading....................................................................................................................................................... 32
Introduction
Malwarebytes Breach Remediation is designed to allow business users to detect and remove malware from endpoints. It is built
upon the power of our flagship anti-malware client, Malwarebytes Anti-Malware, which allows Malwarebytes Breach Remediation
to run in environments which often render other anti-malware applications helpless.
Implementation in a portable form provides increased flexibility for IT staff to quickly and easily deploy the client, use it to
remediate threats, gather logs, and continue with their daily tasks – all without a large investment in time or resources.
What’s New
The following changes have been made to Malwarebytes Breach Remediation in this version.
•
•
•
•
•
•
Automatic failover capabilities for access to License Enforcement and Engine updates
MBBR.exe enhanced as a self-extracting executable for easier deployment and upgrades
Added tamper protection to files and scan engine, making it less susceptible to attack
Removed –confirmremove parameter associated with scan command.
Fixed an issue where an incorrect error message was generated in errorout.log when a custom path was used for
log output
Fixed an incorrect error message when third party firewall blocks outbound communication
Key Features
Malwarebytes Breach Remediation offers the following key features:
•
•
•
•
•
•
•
•
•
•
•
•
•
Selective remediation capability
Remediation of earlier scan results without requiring a second scan
Four different types of scans to analyze your endpoint for malware threats, regardless of whether they are based in
memory, file system or registry
Ability to perform full scans for all local drives
Ability to utilize Malwarebytes threat definition updates, assuring that even the newest threats can be detected
Intelligent heuristics to analyze potential threats when they are designed to evade signatures
Ability to quarantine detected threats, and to restore if needed
Ability to deploy client to endpoints using your preferred methods
Ability to exclude several object types from scanning
Command line capabilities allow IT staff to modify certain program configuration settings, execute scans, and gather
logs through integration with customer-supplied scripts, batch files, and group policy updates
Client leaves no lasting footprint on endpoint
CEF-compatible event logging
Ability to use the program in scan only or scan and remediate mode.
External Access Requirements
If your company’s Internet access is controlled by a firewall or other access-limiting device, you must grant access for Malwarebytes
Breach Remediation to reach Malwarebytes services. Malwarebytes services which must be accessible are:
https://data.service.malwarebytes.org
https://data-cdn.mbamupdates.com
https://keystone.mwbsys.com
Port 443
Port 443
Port 443
Windows Breach Remediation Administrator Guide
outbound
outbound
outbound
1
System Requirements
Following are minimum requirements for an endpoint on which Malwarebytes Breach Remediation may be installed. Please note
that these requirements do not include other functionality that the endpoint is responsible for.
•
Operating Systems:
o Windows 10 (32/64-bit)
o Windows 8.1 (32/64-bit)
o Windows 8 (32/64-bit)
o Windows 7 (32/64-bit)
o Windows Vista (32/64-bit)
o Windows XP (Service Pack 2 or later, 32-bit only)
o Windows Server 2012/2012 R2 (64-bit only)
o Windows Small Business Server 2011 (64-bit only)
o Windows Server 2008/2008 R2 (32/64-bit)
o Windows Server 2003 (32-bit only)
PLEASE NOTE: Windows servers using the Server Core Installation process are specifically excluded
•
•
•
•
•
•
CPU: 800 MHz or faster
RAM: 256 MB (512 MB or more recommended)
Free Disk Space: 20 MB
Screen Resolution: 800x600 or higher
Active Internet Connection, for license validation and threat signature updates
USB 2.0 Port (optional, depending on deployment method)
Windows Breach Remediation Administrator Guide
2
Using Malwarebytes Breach Remediation
Malwarebytes Breach Remediation is designed specifically for use by IT staff. It may be deployed to an endpoint by local insertion
of a USB drive which contains the program, or by pushing the program out to the endpoint using psexec, PowerShell, or any other
deployment method which you may currently use.
Malwarebytes Breach Remediation command line functionality is discussed in detail beginning on page 9.
License Key Status
Malwarebytes Breach Remediation uses a license key, which was provided to you upon your purchase of the client. Once registered,
the license key is considered active for 14 calendar days – unless a different time interval was specified at time of purchase. Each
time the client is used on an endpoint, license status is checked. If your license deactivates (times out), you cannot perform critical
operations that the client is intended for. If this occurs, you must re-register the client (see page 10 for further details). This is to
prevent unauthorized use. There is no additional cost to re-register the client.
Getting Started
Malwarebytes Breach Remediation is shipped as a single executable file (mbbr.exe). When this executable is run for the first time
on the endpoint, it will extract all program and configuration components. Once all components have been extracted, the program
is available for use on the endpoint.
Using an endpoint with a live Internet connection, access a Windows command line prompt and issue the following commands:
mbbr register –key:<prodkey>
mbbr update
Please note: You must substitute your license key for <prodkey> in the above example. Also, some deployment utilities (e.g.
psexec) do not support color display as is shown below. When using a utility that does not support color, program messages are
displayed in standard monochrome video. Please refer to page 15 for explicit settings with regard to color output.
Once the program has been activated, it is necessary to load threat signatures from Malwarebytes servers into the client. This
enables Malwarebytes Breach Remediation to detect threats using the most current reference material available. Malware threat
signatures are updated several times daily, and rootkit signatures are updated as required.
Windows Breach Remediation Administrator Guide
3
Once threat signatures have been updated in your local installation, you can use Malwarebytes Breach Remediation to detect and
remove malware from your endpoint. Following is a screenshot of a scan in process.
While a scan is in process, this screen is constantly updated. Please note the line titled Phase Progress. There are ten (10) phases
of a scan, which are:
1
2
3
4
5
Pre-scan Operations
System Drivers
Master Boot Record
Physical Sectors
Memory Objects
6
7
8
9
10
Startup Objects
Registry Objects
Heuristic Analysis
Filesystem Objects
Scan Complete
This line will reflect each as they are in process. Each phase of the scan requires a different amount of time to complete, so this
cannot be used as a method of estimating how long a scan will take to complete.
Windows Breach Remediation Administrator Guide
4
Interactions with Anti-Rootkit Scanning
When called upon to perform anti-rootkit scanning, Malwarebytes Breach Remediation uses a special driver which may be
incompatible with driver versions used by Malwarebytes Anti-Malware and/or Malwarebytes Anti-Rootkit. If this occurs,
Malwarebytes Breach Remediation must unload the incompatible driver so that it may load its own version. The only way the driver
can be gracefully unloaded is by terminating the Malwarebytes program which loaded the driver.
This will only occur during active scans by Malwarebytes Anti-Rootkit or by Malwarebytes Anti-Malware version 2.0 and above (free,
trial or premium), or Malwarebytes Anti-Malware version 2.0 and above using real-time protection (trial or premium).
If Malwarebytes Anti-Malware was terminated to allow Malwarebytes Breach Remediation to run and a reboot was required to
remove threats detected by Malwarebytes Breach Remediation, protection will return to its normal state after the reboot. If a reboot
is not required, you must manually restart Malwarebytes Anti-Malware to regain the real-time protection that was turned off
temporarily.
Remediation Now or Later?
Malwarebytes Breach Remediation offers two types of scans which may be executed. It also offers the capability to automatically
decide which threats should be removed, or to allow the user to override default remediation methods selected by the program.
This may be valuable in many circumstances, including:
•
•
•
General assessment of an endpoint’s health with regard to malware
Ability to collect and analyze evidence of infections
Exclusion of known false positives
Scans may be executed for the purpose of remediation, or for diagnostic discovery. A remediation scan combines a scan with a
remediation method, so that detected threats may be immediately cleaned from the endpoint. A diagnostic scan omits the
remediation method, so that a scan is executed and results are reported. The user may then determine how to proceed. This may
be valuable if you wish to assess the general health of an endpoint, or if you wish to collect data about one or more endpoints
without eliminating evidence that you may wish to retain.
These capabilities are listed below.
Remediation Scan
A remediation scan combines a scan with an automatic remediation method, so that detected threats may be immediately cleaned
from the endpoint. No user intervention is required once the scan begins. This method requires the –remove parameter to be
specified in order to perform remediation as expected.
Diagnostic Scan
A diagnostic scan is executed when the –remove parameter is not used as part of the scan command. Scan results are saved
automatically to intermediate file ScanResults.xml in the same directory that mbbr was executed from. This file is saved in XML
format. Using an XML processor or editor of your choice, you may inspect scan results at any time until the next scan is executed.
Selective Remediation
If you determine that removing threats detected from the last executed scan should be performed, modify ScanResults.xml to suit
your needs, and run another scan using the –removelastscan parameter to remove detections.
As mentioned in the previous section, the scan saved “working data” pertaining to any detected threats in an intermediate file
named ScanResults.xml, in the directory that Malwarebytes Breach Remediation was executed from. The user may open and inspect
this file (using an XML processor or editor of their choice) to determine if any detected threats should not be remediated. The
following screenshot shows a sample ScanResults.xml file generated by the scan. Indentation has been added to the XML file to
improve readability.
Windows Breach Remediation Administrator Guide
5
Please note that each detected threat is documented in the same manner, which allows for easy identification of data within the
file. An XML tag titled <Action> contains a remediation method, and is preset to the value remove. You may not wish to remove
the detected threat. Here are the three choices which are available to you.
•
•
•
remove:
delete:
ignore:
Delete the malware in its present form, render it harmless, and move it to Quarantine
Delete the malware from the endpoint without copying it to Quarantine
Leave the file intact in its current location.
Once you are done inspecting/editing this file, you may resume or cancel the selective remediation scan. If you cancel the
remediation phase of the scan, the intermediate file will be retained. If you continue the remediation phase, the intermediate file
will be used to control remediation, and will be deleted once remediation is complete.
Excluding Items from Scanning
It is not uncommon to have legitimate items stored on your endpoints which may be identified as threats by anti-virus or antimalware software. Malwarebytes Breach Remediation recognizes that, and offers two methods to exclude those items from
scanning. Those methods are:
•
•
Exclude by specification – This method allows interactive or scripted exclusion of files, folders, and wildcards.
Exclude List – In addition to the previous method, this method allows exclusion of file extensions, registry keys, registry
values, and vendor (the name which Malwarebytes uses to identify threats). Items to be excluded are enclosed in one
or more XML files. A sample exclusion list is shown here. Please note that indentation has been added here to aid in
understanding.
<?xml version="1.0" encoding="UTF-8" ?>
<ScanExclusions>
<Exclusions>
<Exclusion>
<Type>folder</Type>
<Path>c:\virus\a</Path>
</Exclusion>
<Exclusion>
<Type>wildcard</Type>
<Path>c:\virus\*trojan*</Path>
</Exclusion>
<Exclusion>
Windows Breach Remediation Administrator Guide
6
<Type>file</Type>
<Path>c:\virus\test.exe</Path>
</Exclusion>
<Exclusion>
<Type>regkey</Type>
<Path>HKLM\SYSTEM\CURRENTCONTROLSET\SERVICES\1394843d</Path>
</Exclusion>
<Exclusion>
<Type>regval</Type>
<Path>HKCU\SOFTWARE\MICROSOFT\WINDOWS\*\RUN|DESKBAR</Path>
<Path>...</Path>
</Exclusion>
<Exclusion>
<Type>vendor</Type>
<Path>MBAM.Test.Trojan</Path>
</Exclusion>
<Exclusion>
<Type>ext</Type>
<Path>mp3;flac</Path>
</Exclusion>
</Exclusions>
</ScanExclusions>
Please see pages 11-12 for complete details.
Restoring Items from Quarantine
Malwarebytes Breach Remediation offers several different methods of restoring items from Quarantine. You may choose any of the
following methods:
•
•
•
Restore all – Restores all items currently stored in Quarantine to their original locations
Restore by id – This method utilizes a screen/file-based list to selectively restore items to their original locations. This is
typically a manual operation, though it may also be performed using a script. The list of items changes after each restore
operation, so the list must be recreated when multiple restore operations are required.
Automated restore – The XML list of items stored in Quarantine is interactively modified to specify which items will be
selectively restored. The modified list is then used programmatically to perform the restore operation.
In the screenshot below, command mbbr quarantine –list was executed to provide a listing of the contents of Quarantine.
This list shows the index number that can be used for restoration, the name of the threat that was placed into Quarantine, and its
original location before it was placed in Quarantine.
Windows Breach Remediation Administrator Guide
7
The next screenshot shows the contents of file RestoreList.xml, which is the file generated at the same time that the screen-based
list is created. For demonstration purposes, the file has been edited so that only the first quarantined item will be restored using
the XML file as input to command mbbr quarantine –restorelist.
The above is merely an introduction to the methods. Please see page 14 for specific usage guidance.
Windows Breach Remediation Administrator Guide
8
Command Line Parameters
Malwarebytes Breach Remediation supports a variety of command line parameters, which can be used from a command prompt,
batch file or script. When used from a script, additional commands may be required to support the scripting model being used.
Conventions
The command line structure uses modifiers. These are shown as hyphens (-) immediately preceding parameters. Multiple
modifiers may be combined with a parameter. When multiple parameters are used, they must be separated by spaces. In addition,
the following conventions are used:
•
text without brackets or braces
Items you must type as shown
•
<text inside angle brackets>
Required information for which you must supply a value
Example: mbbr <parameter_1>
•
[text inside square brackets]
Optional items
Example: mbbr [parameter_1]
•
Grouping of dots (…)
A set of specifications
Example: mbbr <parameter _1> [parameter_2] … [parameter_n]
•
{text inside braces}
A set of required items; choose one from the list provided
Example: mbbr {0 | 1 | 2 | 3}
•
vertical bar (|)
Separator between mutually exclusive items; choose one
Example: mbbr <0 | 1 | 2 | 3>
Command Line Overview
Malwarebytes Breach Remediation commands are specified in the following format:
mbbr { register | update | version | scan | errorout | quarantine | settings } [options]
Following is a list of high-level commands which may be executed. Each command is detailed beginning on the following page.
register
Using your license key, this unlocks the features of Malwarebytes Breach Remediation. This will also show
license status.
update
Updates the client’s threat signature databases.
version
Displays the program version number.
scan
Scans the endpoint for malware and optionally removes malware found during the scan.
errorout
Specifies where error output is directed to.
quarantine
Controls program actions related to threat quarantine activities.
settings
Used to specify universal program settings. These settings are persistent, and are used for color and proxy
functionality.
In addition, you may type mbbr without any additional specifications to see a list of valid commands. This list will span multiple
windows if the command line is launched to its default size, so you will achieve best results by stretching the window to show
more command line dialog at one time.
Windows Breach Remediation Administrator Guide
9
Command Line Reference
Commands listed here are listed individually. Each command performs tasks according to parameters. These are primarily used
by a system administrator via script, batch file, GPO update, or remote desktop. The admin may configure Malwarebytes Breach
Remediation to operate as a remote task, invisible to the endpoint user.
register
Usage:
mbbr register [–key:<prodkey>]
Purpose:
Specifies the unique license key assigned to the partner or customer. This will be passed to the licensing server for
validation to ensure it is active (non-expired). If the key is valid and the license is active, it will also display status
about the license, such as expiration date, volume purchased, volume used, etc.
If the key is active, the local installation will operate with this status for 14 calendar days (or the time interval
specified in your Malwarebytes license agreement). This “Last Known Good” status is persisted on the USB or
wherever the binaries are stored. This allows the USB installation to work as if it were fully registered on offline
endpoints or without needing the key. A live Internet connection is required.
If –key is not specified, license status and the expiration date/time will be displayed. Please note that if the key is
not active, the user may not update threat signature databases, scan for malware, list contents of quarantine, or
restore files from quarantine.
Parameters:
–key:<prodkey>
Specification of <prodkey>, the license key assigned to the user.
update
Usage:
mbbr update
Purpose:
Updates local threat signature databases. This command will result in an error condition if (a) the license is not
active, or (b) if no active Internet connection is available. If threat signature databases have expired (timed out),
this command must precede execution of a scan. If a proxy server is needed to access the Internet, you must run
the proxy command before attempting to perform the update.
Parameters:
none
version
Usage:
mbbr version
Purpose:
Displays the version number of the Malwarebytes Breach Remediation installation.
Parameters:
none
Windows Breach Remediation Administrator Guide
10
scan
Usage:
mbbr scan [–full | –threat | –hyper | –path:<path>]
[–exclude:<paths>]
[–excludelist:<exclists>]
[–noarchive]
[–ignorepu]
[–stopondetect [–malware:<cnt>] [–pu:<cnt>]]
[–tag:<tagname>]
[–stdlog:<filepath>]
[–noscanresults]
[–pfi:<secs>]
[–ark]
[–remove [–noreboot]
[–removelastscan [–noreboot]
[–stdout:{off | detail | summary}]
Purpose:
Executes a scan based on parameters specified. If the program license is inactive, attempts to perform a scan will
result in an error. Current threat signature databases are also required. If this command is executed without a
directive to quarantine detected threats, scan results are saved to file ScanResults.xml. This file is found in the same
directory that Malwarebytes Breach Remediation was executed from.
Parameters:
–full
A full scan includes all scanning capability which Malwarebytes Breach Remediation has to offer.
–threat
This will examine “hotspots” on an endpoint for malware without analyzing the entire endpoint. If –
remove is specified, any threats found during the scan will be quarantined.
–hyper
Initiates a scan focusing only on Memory Objects and Heuristics to determine if malware is actively
running on the endpoint. If –remove is specified, any threats found during the scan will be quarantined.
–path:<path>
Semicolon-delimited list of folder paths to scan on the endpoint’s file system. Use double-quotes for
paths that contain spaces. Paths specified are recursive, so subfolders will also be included automatically.
The presence of the paths specified will be verified, and an error will result if the paths do not exist.
Similarly, an error will be generated if the paths are encrypted, as the program is not capable of decrypting
the path. If –remove is specified, any threats found during the scan will be quarantined. Please note that
this method scans only the folder path(s) which have been specified. This scan type does not include
memory, startup modules or heuristic analysis.
–exclude:<paths>
Excludes specific files, folders, and wildcard specifications from scanning. Please note that the following
rules apply:
•
•
•
•
•
Multiple exclusion items must be separated by semicolons.
Wildcards may be used for files and folders using existing Windows wildcard standards.
Wildcards may also be used within registry keys to add flexibility. Please see this style in the example
shown on page 7.
Files specified without a directory path (e.g. file.exe) must be in the directory where Malwarebytes
Breach Remediation is installed.
Files and/or folders which contain embedded spaces must be enclosed in double quotes. As an
example, references to C:\Program Files\file.exe should instead be specified as
“C:\Program Files\file.exe”.
Windows Breach Remediation Administrator Guide
11
–excludelist:<exclist>
Provides for exclusions itemized within one or more XML files specified as parameters for this command.
Files have no naming convention (filename or extension), but they must be in XML format. The following
items may be excluded using exclusion lists:
●
●
●
Files
Extensions
Threat Vendor
●
●
Folders
Registry Keys
●
●
Wildcards
Registry Values
Please note that the following rules apply:
•
•
•
•
•
•
•
•
Multiple items (within the <Path> element) must be separated by semicolons.
Files specified without a directory path (e.g. file.exe) must be in the directory where
Malwarebytes Breach Remediation is installed.
When excluding a registry value (regval), it must be preceded by the registry key (regkey),
delimited by the pipe “|” character.
Extensions pertain to the entire file system that is subject to scanning.
Threat vendor is specific to Malwarebytes definitions.
Multiple exclusion list files must be separated by semicolons.
Wildcards may be used for files and folders using existing Windows wildcard standards.
Wildcards may also be used within registry keys to add flexibility. Please see this style in the
example shown on page 7.
A sample Exclusion List is shown at the bottom of page 6.
–noarchive
By default, the contents of archives (zip, rar, etc.) are scanned. Use this option to disable archive scanning.
Malwarebytes Breach Remediation will stop scanning an archive if it finds a single infected file, and will
quarantine the entire archive file.
–ignorepu
Instructs the scanner to ignore all Potentially Unwanted Programs (PUPs) and Potentially Unwanted
Modifications (PUMs) that may be installed on the target endpoint.
–stopondetect [–malware:<cnt>] [–pu:<cnt>]
Instructs the scanner to terminate the scan when a certain number of either malware or potentially
unwanted items are found. This allows a quick determination of whether the endpoint is infected without
requiring a full scan to be performed. If <cnt> is not reached, the scan will run to completion.
Specify counts for either malware threats, PUP/PUM or both. The scanner will terminate when either
criterion is met.
If –stopondetect is specified, at least one of the –malware or –pu options must also be specified.
–tag:<tagname>
This text string will be sent along with all usage data to the Malwarebytes billing system. If the string
includes embedded spaces, it must be surrounded by double quotes (“). It will help you to associated
billing events with your billing system. Typical usage would be for you to add the Job ID or Store ID or
Employee ID or all of these, so that you can see these on your invoice.
–stdlog:<filepath>
Specifies the log location for normal output. If not specified, normal output will be written
to .\logs\MBBR-STDOUT.XML. Use double-quotes (“) for paths that contain spaces. Please note that use
of the default specification for <filepath> will result in loss of scan data for any scans previously executed,
as a new scan overwrites existing results.
–noscanresults
Instructs the scanner to disregard creation of intermediate file ScanResults.xml. This parameter disables
the ability to selectively remediate items during a scan, and is only valid for diagnostic scans.
Windows Breach Remediation Administrator Guide
12
–pfi:[<secs>]
Controls the frequency at which log file ScanProgress.xml is updated. This log file is stored in the folder
specified by –stdlog. File creation frequency is in the range of 1-3600 seconds. This file is only created
when –stdout is set to summary. If this option is not specified, no Scan Progress file will be created.
–ark
Enables Anti-rootkit scanner functionality to be used during the scan. Any rootkits found will be removed
if –remove is specified.
–remove
Instructs the scanner to quarantine malware, PUPs and PUMs found during the scan. This parameter is
not allowed if –stopondetect is specified. If –remove and –noreboot are both specified in a scan command
and the scan detected threats during execution, a warning message will be displayed after the scan has
completed to notify the user that a reboot is required to remove the threat(s) from the endpoint.
–noreboot
Some malware executes in a manner that requires a reboot to complete the removal process. If this occurs,
the scanner will automatically reboot the system (after a delay specified by the scan.rebootwait parameter
associated with the settings command). If an immediate reboot is not desired, use this option. Please
note that certain malware may not be fully removed if this option is used. If –remove and –noreboot are
both specified in a scan command and the scan detected threats during its execution, a warning message
will be displayed after the scan has completed to notify the user that a reboot is required to remove the
threat(s) from the endpoint.
–removelastscan
This parameter is associated with a diagnostic scan. Instead of executing a new scan, it instructs the
scanner to use intermediate file ScanResults.xml to remediate threats detected during the last scan that
was executed.
–stdout:{off | detail | summary}
Controls the level of output to the console. Defaults to summary if not specified.
errorout
Usage:
mbbr errorout [[–console:{on | off }] [–delete] [–errlog:< file>] | [–reset]]
Purpose:
Specifies where error output will be directed to. Values set using this command will persist until they are cleared or
modified. Issuing this command without arguments will display current settings.
Parameters:
–console:{off | on}
Specifies if error output is displayed on the console. Default value is ON.
–delete
Deletes the output file, if it exists. This command uses the default error log location, unless the error log
location has been changed using the –errlog switch.
–errorlog:<file>
Specifies the log location for error output. This will overwrite any previously-specified location. If <file>
contains any embedded spaces, please enclose <file> in double quotes (“). The default location
is .\logs\MBBR-ERROUT.TXT.
–reset
Reverts settings associated with this command back to default values.
Windows Breach Remediation Administrator Guide
13
quarantine
Usage:
mbbr quarantine [–list]
[–path:<path>]
[–resetpath]
[–restoreall]
[–restore:<itemNos>]
[–restorelist]
Purpose:
Set/reset location of quarantine, list quarantine contents, and restore files from quarantine. Use this command
without any additional arguments to display the current quarantine location.
Parameters:
–path:<path>
Specifies where quarantined content will be stored after this command has been executed. This replaces
any previously-specified location. If <path> contains embedded spaces, enclose <path> in double
quotes (“). Please note that content quarantined prior to execution of this command will not be moved.
–resetpath
Causes the quarantine file folder to revert to the default folder. Files stored in quarantine prior to
execution of this command will not be moved to the default folder. The default quarantine folder is:
•
•
Windows XP: C:\Documents and Settings\All Users\Application
Data\Malwarebytes\Malwarebytes Anti-Malware\Quarantine
Other OS versions: C:\ProgramData\Malwarebytes\Malwarebytes AntiMalware\Quarantine
–list
Shows the current quarantine location, lists contents of the quarantine to screen output, and generates
file RestoreList.xml for use by the –restorelist option. In addition, an index number is associated with each
file which has been moved to quarantine. The index number is used primarily in conjunction with the –
restore:<itemNumbers> option, to simplify manual restore operations.
–restoreall
Restores all quarantined items to their original locations.
–restore:<item1> [,item2] … [,itemn]
Restores one or more items from the list of quarantined items shown on the screen (or in file
RestoreList.xml). Items are specified by their index number. When multiple items are to be restored via
a single execution of this command, their index numbers should be separated by commas without
delimiting spaces. Please note that execution of this command will delete file RestoreList.xml, and that
any pre-existing index numbers still shown on the screen are no longer valid. You must exercise the –list
option again prior to any subsequent execution of this option.
–restorelist
Using file RestoreList.xml as a guide, this command restores specified files to their original location from
Quarantine. For each file to be restored, modify the <Action> element associated with the file to be
restored, changing the value to restore. Unless changed by the user (or by a third-party application), the
default value of the <Action> element is none. A sample RestoreList.xml file is shown on page 8.
Windows Breach Remediation Administrator Guide
14
settings
Usage:
mbbr settings [–color:off|on]
[-scan.rebootwait:<seconds>]
[-scan.rebootmsg:<message>]
[–proxy.clear]
[–proxy.enabled:true | false]
[–proxy.server:<host>]
[–proxy.port:<port>]
[–proxy.user:<user>]
[–proxy.password:<password>]
[–log.enabled:true|false]
[–log.server:<host>]
[–log.port:<port>]
[–log.events:<eventname>:on|off]
[–log.test]
[–customdb.enabled:true | false]
[–customdb.add:<customHashRule>]
[–customdb.load:<openIOCFiles>]
[–customdb.clear]
[–customdb.list]
Purpose:
Used to define several program settings that will be universally used by Malwarebytes Breach Remediation.
Execution of this command with no options specified will display current settings for each specification. If no
modifications have been made to a specification, its default value will be shown. Please note that changes to
settings require administrative privileges. All users may inspect current settings.
Parameters:
–color:off|on
Specifies whether program output can utilize color, or if display will be limited to monochrome.
Applications which attempt to capture standard output and error output of Malwarebytes Breach
Remediation may encounter issues. Turning color off solves this problem.
–scan.rebootwait:<seconds>
Amount of time to wait before a reboot if a reboot is required to remove threats detected during a scan.
The maximum time is 300 seconds, and the default time is 60 seconds.
–scan.rebootmsg:<message>
Text message to be displayed prior to a reboot if a reboot is required to removed threats detected during
a scan. The maximum message length is 100 characters. If a message contains embedded spaces, the
text string must be bounded by double quotes.
–proxy.clear
Clears all settings associated with proxy servers.
–proxy.enabled:true | false
Enables or disables use of a proxy server for external Internet access. Internet access is required for
program updates as well as threat signature updates. If this variable is set to true, the proxy host and port
must also be specified. PLEASE NOTE: If your network requires use of a proxy server for Internet access,
proxy settings must be defined and enabled before a register or update command may be successfully
executed.
–proxy.server:<host>
Hostname and/or IP address of proxy server providing external Internet access.
–proxy.port:<port>
Port number on proxy <host> which is used for external Internet access.
Windows Breach Remediation Administrator Guide
15
–proxy.user:<user>
Username for proxy usage, if authentication is required.
–proxy.password:<password>
Password for username <user>, if authentication is required to use proxy.
–log.enabled:true|false
Specifies whether program execution will be logged to a syslog server. All data utilizes a CEF (Common
Event Format) standard. If this parameter is set to true, the syslog host IP/FQDN and port number must
also be specified before event logging can take place.
–log.server:<host>
IP address or Fully-Qualified Domain Name (FQDN) of a syslog server which will receive event logs
generated by Malwarebytes Breach Remediation. A valid port number must also be specified before
logging can take place.
–log.port:<port>
Valid port number for the syslog server which will receive event logs generated by Malwarebytes Breach
Remediation. A valid syslog host specification must also be specified before logging can take place.
–log.events:<eventname>:on|off
Specifies whether logging is enabled/disabled for each potential event which may be logged by
Malwarebytes Breach Remediation. These events are discussed at length beginning on page 24, and are
itemized here:
●
●
●
●
ScanStartEvent
DetectionEvent
RestoreEvent
CustomDbUpdateEvent
● ScanEndEvent
● RemovalEvent
● RestoreStartEvent
● DbUpdateEvent
● RemoveLastScanEvent
● RestoreEndEvent
–log.test
Attempts to make contact with the syslog server using the host and port specifications which have been
provided. Results of the connection attempt are shown on-screen. This command does not generate an
event log entry. No additional parameters are required.
–customdb.enabled:true | false
Specifies whether custom database rules utilizing OpenIOC are enabled (true) or disabled (false). Default
value is false.
–customdb.add:<customHashRule>
Allows a single MD5 hash to be added to the Rules database without requiring use of the OpenIOC XML
file as an input medium. The MD5 hash specified here is incrementally added to existing rules.
–customdb.load:<openIOCFiles>
Loads one or more OpenIOC files into the Rules database. When multiple files are specified, they must be
separated by semicolons. If embedded spaces are present in the file and/or path specification, the full
path and file must be enclosed by double quotes. OpenIOC files must be saved with the extension XML
to be used with this command. Files created by Mandiant’s IOC Editor may be renamed from
extension .IOC to .XML directly before use with this command. Please note that this command will
overwrite existing rules whose <IndicatorItem> elements match.
–customdb.clear
Deletes all existing custom rules.
–customdb.list
Lists all existing custom rules.
Windows Breach Remediation Administrator Guide
16
Scan Log
Finalized results of scans executed by Malwarebytes Breach Remediation are saved in file MBBR-STDOUT.XML, a scan log which may
be imported by several document formats as well as by Internet-based applications. The root XML element in the log file is
<mbam-log>. All subsequent data is grouped by section. Those sections – and data related to those sections – are described here.
<header> Section
This section provides high-level information about the scan that was performed.
<date>
Local time at which the scan began, as well as the time zone in which the endpoint is located. Time zones are referenced
to Greenwich Mean Time (GMT).
FORMAT:
yyyy/mm/dd hh:mm:ss zone, where:
yyyy
mm
dd
hh
mm
ss
zone
=
=
=
=
=
=
=
Year
Month
Date
Hours
Minutes
Seconds
Difference (in hours) between local time and GMT
<logfile>
XML log filename, which is hard-coded as MBBR-STDOUT.XML.
<isadmin>
Flag denoting whether the logged-in user had administrator access. Valid values are yes or no.
<engine> Section
This section provides information about Malwarebytes Breach Remediation, as well as version numbers of the program as well as
associated databases which are used during the scan.
<version>
Version of Malwarebytes Breach Remediation being used for the scan.
<malware-database>
Malware threat signature database version being used for the scan.
FORMAT: vyyyy.mm.dd.nn, where:
yyyy
mm
dd
nn
= year
= month
= date
= daily version number
Windows Breach Remediation Administrator Guide
17
<rootkit-database>
Anti-Rootkit database version being used for the scan. The Anti-Rootkit component of Malwarebytes Breach Remediation
uses its own signature database.
FORMAT: vyyyy.mm.dd.nn, where:
yyyy
mm
dd
nn
= year
= month
= date
= daily version number
<license>
Specifies the license type in use by the client. Valid value for the remediation client is premium.
<file-protection>
This feature is not used in the remediation client, and can be ignored.
<web-protection>
This feature is not used in the remediation client, and can be ignored.
<self-protection>
This feature is not used in the remediation client, and can be ignored.
<system> Section
This section provides basic information about the system being scanned.
<hostname>
The name assigned to the endpoint being scanned.
<ip>
The IP address associated with the endpoint being scanned. If dynamic addressing (DHCP) is used, this is the IP address
as of the time that the endpoint was scanned. It may not represent the same endpoint at a later date.
<osversion>
Operating System version in use on the endpoint being scanned. This field will also include Service Packs in use (if
applicable).
<arch>
CPU architecture of the system. Valid values are x86 (32-bit) or x64 (64-bit).
<username>
Windows user name associated with execution of the scan.
<filesys>
The file system of the endpoint’s primary disk drive (meaning the drive on which the operating system is loaded). Valid
values are NTFS, FAT or FAT32.
Windows Breach Remediation Administrator Guide
18
<summary> Section
This section provides summary information on the scan that was performed. Referring to the list below, elements beginning with
<processes> are directly related to elements in the <options> section which enable or disable corresponding functionality. The
controlling elements will be referenced in descriptions here.
<type>
Type of scan which was executed. Valid values are custom, threat, or hyper.
<result>
Final result of scan. Valid values are cancelled, completed or failed. If a scan was executed with –stopondetect and
terminated as a result of this specification being set, <result> will be set to completed.
<objects>
Number of objects scanned
<time>
Elapsed time of scan from start to finish (in seconds).
<processes>
Number of threats detected in running processes.
<modules>
Number of threats detected in memory modules.
<keys>
Number of threats detected in registry keys.
<values>
Number of threats detected in registry values.
<datas>
Number of threats detected in registry data.
<folders>
Number of threats detected in folders. Controlled by <filesystem>.
<files>
Number of threats detected in files. Controlled by <filesystem>.
<sectors>
Number of threats detected in disk sectors. Controlled by <rootkits>.
Windows Breach Remediation Administrator Guide
19
<options> Section
This section provides information on various categories that were employed during the scan. Many of these categories are directly
responsible for results shown in the <summary> section. Settings from this section are referenced in <summary> items that are
directly related.
<memory>
Denotes whether scanning of running memory processes is active. Set to enabled when –threat or –hyper scan types
are specified, or disabled when –path scan type is specified.
<startup>
Denotes whether scanning of startup-related processes and modules is active. Set to enabled when –threat or –hyper
scan types are specified, or disabled when –path scan type is specified.
<filesystem>
Denotes whether scanning of the file system is active. Set to enabled when –threat or –path scan types are specified, or
disabled when –hyper scan type is specified.
<archives>
Denotes whether scanning of archive files is active. This includes ZIP, RAR, ARJ, CAB and 7Z files. Valid values are enabled
(default value) or disabled (when –noarchive is specified as part of scan command). When enabled, scanning of archiving
is limited to three levels deep. When disabled, the archive is scanned as a single file. Encrypted (password-protected)
archives cannot be effectively scanned.
<rootkits>
Denotes whether anti-rootkit scanning is active. Valid values are enabled or disabled (default value). Value is determined
based on setting of scan parameter –ark.
<deeprootkit>
Denotes whether deep rootkit scanning is active. Set to enabled when Malwarebytes Breach Remediation scan engine
has determined this method of scanning is required. The default value is disabled.
<heuristics>
Denotes whether heuristics are employed during scanning. Heuristics enables enhanced detection of threats which may
avoid detection by signatures only. This is set to enabled when –threat or –hyper scan types are specified, or disabled
when –path scan type is specified.
<pup>
Denotes whether scanning of Potentially Unwanted Programs (PUPs) is active. Set to enabled by default. Reverts to
disabled if –ignorepu parameter is specified in scan settings.
<pum>
Denotes whether scanning of Potentially Unwanted Modifications (PUMs) is active. Set to enabled by default. Reverts
to disabled if –ignorepu parameter is specified in scan settings.
Windows Breach Remediation Administrator Guide
20
<items> Section
There are seven different major categories of threats which may be detected during a scan. Each major category has up to eight
fields which describe the threat in more detail. The chart below shows the relationships between the major categories (parents)
and the detail fields (children).
Descriptions of all detail fields are as follows. This section provides information on threats which were detected during the scan.
In this section, <file> is the parent entry for each file system-based threat and <key> is the parent entry for each registry-based
threat. Several subentries exist for each <file> or <key>, describing the threat. These subentries are described below. Please note
that this section is shown with the parent entry if no threats were detected.
<path>
Where the threat was detected. If the threat was found on the Windows filesystem, this contains the full
drive/directory/filename. If the threat was found in the Windows registry, this entry contains the registry key/value
name/value data corresponding to the threat.
<vendor>
Name of the threat (or threat family), as categorized by the Malwarebytes Research Team. Please note that the same
threat may be identified with different names by the various antivirus/antimalware products.
<action>
Describes the action taken to remediate the detected threat.
<hash>
A 32-byte identifier which Malwarebytes uses to identify a specific threat. While threat names may be extremely similar
(and easy to confuse), the MD5 value supplied here is highly unique.
<valuename>
The name of a registry entry that was detected as a threat and removed. This is present only when a threat of this type
has been detected, and will be accompanied by <valuedata> when present.
<valuedata>
The value of a registry entry that was determined to be a threat and was removed as a result. This is present only when
a registry entry (represented by <valuename>) has been removed.
<baddata>
Contains registry data associated with a detected threat. This data will be replaced or deleted according to specifications
contained in Malwarebytes threat signatures. This element is present only when required, and will be accompanied by
<gooddata> when it is present.
Windows Breach Remediation Administrator Guide
21
<gooddata>
Contains registry data used to replace <baddata>. This element may contain data or a null value, and is present only
when required. When present, it will always be accompanied by <baddata>.
<pid>
Process identifier associated with a threat. This field applies only to modules and processes detected during memory
scan phases.
Sample Log File
The following is a sample log resulting from a scan. It is provided solely to illustrate how results appear in a real-world scenario.
Please note that indentation has been added to this example for readability purposes.
<?xml version="1.0" encoding="UTF-16" ?>
<mbam-log>
<header>
<date>2015/01/08 16:28:18 -0800</date>
<logfile>MP-STDOUT.XML</logfile>
<isadmin>no</isadmin>
</header>
<engine>
<version>2.00.0.1030</version>
<malware-database>v2015.01.07.14</malware-database>
<rootkit-database>v2015.01.07.01</rootkit-database>
<license>premium</license>
<file-protection>disabled</file-protection>
<web-protection>disabled</web-protection>
<self-protection>disabled</self-protection>
</engine>
<system>
<osversion>Windows 8.1</osversion>
<arch>x64</arch>
<username>administrator</username>
<filesys>NTFS</filesys>
</system>
<summary>
<type>custom</type>
<result>completed</result>
<objects>231856</objects>
<time>30</time>
<processes>0</processes>
<modules>0</modules>
<keys>1</keys>
<values>0</values>
<datas>0</datas>
<folders>0</folders>
<files>2</files>
<sectors>0</sectors>
</summary>
<options>
<memory>enabled</memory>
<startup>enabled</startup>
<filesystem>enabled</filesystem>
<archives>enabled</archives>
<rootkits>disabled</rootkits>
<deeprootkit>disabled</deeprootkit>
<heuristics>enabled</heuristics>
<pup>enabled</pup>
<pum>enabled</pum>
</options>
<items>
<key>
<path>HKLM\SOFTWARE\Google\Chrome\Extensions\blmchfpimpbbdmgpcieclabeafkljbhm</path>
<vendor>PUP.Optional.Groovorio.A</vendor>
<action></action>
<hash>8dfc9b5b4841ff3703a7196e3ec5ab55</hash>
Windows Breach Remediation Administrator Guide
22
</key>
<file>
<path>c:\temp2\test-trojan.exe</path>
<vendor>MBAM.Test.Trojan</vendor>
<action></action>
<hash>e2b839bb6a1fda5c4bdadd73ac56cb35</hash>
</file>
<file>
<path>c:\temp2\Test_PUP.exe</path>
<vendor>PUP.Optional.Dotpitch</vendor>
<action></action>
<hash>d1c952a2cbbe3006b11f51aeba4ad32d</hash>
</file>
</items>
</mbam-log>
Sample Scan Progress File
The following is a sample Scan Progress log created during a scan. When requested, these are generated at regular intervals for
integration with third-party applications. It is provided here solely to illustrate how results appear in a real-world scenario. Please
note that indentation has been added to this example for readability purposes.
<?xml version="1.0" encoding="UTF-8" ?>
<ScanProgress>
<CurrentScanPhase>8</CurrentScanPhase>
<CurrentScanPhaseName>Filesystem Objects</CurrentScanPhaseName>
<LastScanPhase>10</LastScanPhase>
<ItemsScanned>7595</ItemsScanned>
<PUCount>0</PUCount>
<VirusCount>1</VirusCount>
<ScanCompletion>90</ScanCompletion>
<CurrentlyScannedFile>c:\Windows\System32\drivers\acpi.sys</CurrentlyScannedFile>
<CurrentVirus>MBAM.Test.Trojan</CurrentVirus>
<CurrentPU></CurrentPU>
<ElapsedTime>00:07:14:707</ElapsedTime>
</ScanProgress>
Windows Breach Remediation Administrator Guide
23
Event Logging to syslog
Malwarebytes Breach Remediation integrates very easily into a corporate network, providing highly effective results in the detection
and remediation of threats on endpoints. That integration has been extended further through the addition of event logging using
industry-standard methods. Based on user requests, we have implemented logging using CEF (Common Event Format), and more
specifically, output is tailored to the ArcSight Security Intelligence platform and others which support the CEF format.
This section of the guide is devoted to detailed descriptions of how we have implemented event logging, so that you may easily
understand log results and customize reporting in your specific environment.
Construction of a Log Entry
All event logs use a standardized format, which consist of an external logger prefix, a header and an extension. They are described
as follows:
•
syslog prefix: A mandatory entry that is applied for compliance with syslog standards. It includes:
o Event date, including month, day and year, in the format (e.g. Jul 15 2015)
o Event time, using 24-hour clock, in the format hh:mm:ss (e.g. 12:25:40)
o Hostname which logs pertain to (e.g. SFO-VM1234.internal.contoso.com)
•
Header: Mandatory fields which identify the product/client generating log entries. Vendors may use non-standard field
names for these fields, but their usage must correspond to fields and their order within the log record.
o CEF Version, in the format “CEF:<version>”. <version> is a single-digit, and is used for compliance with the
CEF standard as well as to specify how remaining data should be interpreted.
o Device Vendor identifies the vendor of the product/client which is generating log entries. As it pertains here,
this will be “Malwarebytes”
o Device Product identifies the product/client which is generating log entries. As it pertains here, this will be
“Malwarebytes Breach Remediation”
o Device Version identifies the product/client version. Malwarebytes Breach Remediation is identified not only
by the version of the executable, but also by each major components used in conjunction with the program.
All components which follow the executable program version are bounded by square brackets. Those
components are:
 Engine (MBAM Core DLL)
 Rules Database
 Actions Database
 Anti-Rootkit Database (Swiss Army Knife)
o Signature ID is a unique numeric identifier which Malwarebytes has assigned to each event type. A full list of
all Signature IDs can be found later in this section.
o Name is a simple text description for each event that corresponds to a specific Signature ID
o Severity is the relative importance of any event, with 1 being the least important and 10 representing a critical
event.
•
Extension: This is a series of fields which are not mandatory by CEF standards. These fields represent values that each
vendor select for inclusion in their event logs. Because these fields are not mandatory, vendors will commonly use nonstandard field names, and may also include labels for the non-standard fields. If a customer elects to use these labels,
this would improve readability of log information, though the same label used by multiple vendors may also create
confusion for the user.
Mapping Malwarebytes Fields to CEF Format
As mentioned previously, log entries are comprised of three separate sections. The syslog prefix and Header are mandatory, and
must conform to rigid standards. The extension provides flexibility that vendors require to capture important details related to
their products/clients, while still conforming to CEF standards. Malwarebytes is no exception.
Windows Breach Remediation Administrator Guide
24
As mentioned previously, msg is a multi-purpose field. The CEF format provides six fields which may contain custom data, that
which the vendor has determined to be important with relation to their product/client, but does not conform to a standard CEF
field. Malwarebytes utilizes five of these six fields, and also utilizes msg to provide more robust log content. Its usage in each log
message will be detailed in the next section.
Malwarebytes Log Events
Malwarebytes Breach Remediation currently generates log entries for nine different event categories. This section of the guide
describes each of those categories in detail. The following table lists fields which are common to all log entries created by
Malwarebytes Breach Remediation.
Windows Breach Remediation Administrator Guide
25
In addition to these common fields, the following events utilize several fields specific to the event being logged. The remainder of
this section is devoted to descriptions of each of these events.
1000 – ScanStartEvent
1001 – DetectionEvent
1002 – RemovalEvent
Windows Breach Remediation Administrator Guide
26
1003 – ScanEndEvent
1004 – RestoreStartEvent
1005 – RestoreEvent
1006 – RestoreEndEvent
1007 – RemoveLastScanEvent
Windows Breach Remediation Administrator Guide
27
1008 – DbUpdateEvent
1009 – CustomDbUpdateEvent
Further reading
Malwarebytes recommends that you obtain a copy of the following document from ArcSight. It is a detailed guide pertaining to
the CEF logging format, as well as their recommendations targeted to users and developers.
Implementing ArcSight CEF (Revision 20, dated 05 June 2013)
https://protect724.hp.com/docs/DOC-1072
Windows Breach Remediation Administrator Guide
28
Customizing the Rules Database with OpenIOC
Before discussing how Malwarebytes uses OpenIOC to supplement our robust threat database, it is best to provide a very brief
introduction to OpenIOC technology. The following text is quoted directly from the OpenIOC web site (http://www.openioc.org):
In the current threat environment, rapid communication of pertinent threat information is the
key to quickly detecting, responding and containing targeted attacks. OpenIOC is designed to fill
a void that currently exists for organizations that want to share threat information both
internally and externally in a machine-digestible format. OpenIOC is an extensible XML schema
that enables you to describe the technical characteristics that identify a known threat, an
attacker’s methodology, or other evidence of compromise.
OpenIOC was originally designed to enable MANDIANT’s products to codify intelligence in order
to rapidly search for potential security breaches. Now, in response to requests from across the
user community, MANDIANT has standardized and open sourced the OpenIOC schema and is
releasing tools and utilities to allow communication of threat information at machine speed.
Implementing IOC Definitions
Many companies are now using this technology to identify and act upon threats on their computer networks. In conjunction with
the threat database which powers Malwarebytes Breach Remediation (and our other anti-malware programs), we are now
providing the ability to extend our database further with OpenIOC format. Please note that Mandiant refers to output from their
IOC editor as Indicators of Compromise (IOC’s), while Malwarebytes uses the term rules. In this section of the guide, either term
may be used, though every effort has been made to not create ambiguous meanings.
Mandiant IOC Editor
The Mandiant IOC Editor is the most commonly used editor for creating custom Indicators of Compromise (IOC’s). It is made
available as a free open-source tool, and is downloadable at:
https://www.fireeye.com/services/freeware/ioc-editor.html
This tool allows the user to select a specific type of IOC, guides the user’s entry of appropriate data to satisfy criteria associated
with the IOC, and constructs the logical structure which the IOC requires. It does not allow browsing of the file system or registry,
and does not offer auto-complete functionality as part of data entry. Please note that IOC’s created by the Mandiant IOC Editor
use the .IOC file extension, and the extension must be renamed to .XML for use by Malwarebytes Breach Remediation. Other
applications can create the IOC file directly in XML format.
Restrictions Which Apply to Custom Rules
There are a few restrictions which apply to the creation of custom rules. These are as follows:
•
•
•
•
Mandiant’s IOC Editor uses UUID for rule names which it creates.
Malwarebytes Breach Remediation prepends each custom rule with the text “CustomRule.”
Rule names may not exceed 128 characters in length.
Valid characters in a rule name include letters A-Z, numbers 0-9, and special characters period (.). hyphen (-), underscore
(_), and the pair of curly brackets ({ }). A period may not be used as the first character of a rule name.
Top-Level OpenIOC XML file
The XML file used in conjunction with Malwarebytes Breach Remediation must conform to the construction shown in the example
below. The second line of this example wraps due to its length. It is likely that you will create this file using the Mandiant IOC
Editor (or another open-source editor) which constructs the file for you.
<?xml version="1.0" encoding="us-ascii"?>
<ioc xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" id="739767f0-27ba-49ca-9510-b8c56343dc48"
last-modified="2015-09-14T20:55:27" xmlns="http://schemas.mandiant.com/2010/ioc">
<short_description>*New Unsaved Indicator*</short_description>
Windows Breach Remediation Administrator Guide
29
<authored_date>2015-09-14T20:39:44</authored_date>
<links />
<definition>
<Indicator operator="OR" id="966d7c5c-b0dc-41ff-a6e8-ba4714bf6937">
<!— custom rule entries are defined here -->
</Indicator>
</definition>
</ioc>
Please note that all UUID entries shown in files which you create will be different than those shown here. They are unique to the
system where file creation takes place.
Creating Custom Rules
While Mandiant’s IOC Editor provides the capability to create a wide range of rules for identifying malware, five specific rules apply
to Malwarebytes Breach Remediation. For each of these rule types, an example is provided to show the construction of the rule,
content examples, applicable criteria, and when the rule applies (relative to the scope of Malwarebytes Breach Remediation).
Custom Hash Rule
The Customer Hash rule provides for identification of a threat using its 32-bit MD5 hash value.
Syntax:
<IndicatorItem id="6de269b9-69aa-4701-aaa8-2f40a7a14a6a" condition="is">
<Context document="FileItem" search="FileItem/Md5sum" type="mir" />
<Content type="md5">b5891462c9ca5bddfe63d3bae3c14e0b</Content>
</IndicatorItem>
Criteria:
Condition value = “is”
When Used:
Full scan, Path scan
Custom File Rule
The Custom File rule identifies a file (by name).
Syntax:
<IndicatorItem id="cfdcc16b-d1ac-4bcd-96fc-f7e72957b6f1" condition="is">
<Context type="mir" search="FileItem/FileName" document="FileItem"/>
<Content type="string">trojans.exe</Content>
</IndicatorItem>
<IndicatorItem id="cfdcc16b-d1ac-4bcd-96fc-f7e72957b6f1" condition="contains">
<Context type="mir" search="FileItem/FileName" document="FileItem"/>
<Content type="string">trojan</Content>
</IndicatorItem>
<IndicatorItem id="FileRule_FileItem_FullPath" condition="is">
<Context document="FileItem" search="FileItem/FullPath" type="mir" />
<Content type="string">c:\temp\demo\psfile.exe</Content>
</IndicatorItem>
Criteria:
Condition value = “is” or “contains”. When “is” condition is used, the filename does not include the directory path. The
filename is case-insensitive.
When Used:
Full scan, Path scan
Windows Breach Remediation Administrator Guide
30
Custom Folder Rule
The Custom Folder rule identifies a folder/path.
Syntax:
<IndicatorItem id="5372a89e-a0b3-4a39-91ad-57dfca92a105" condition="is">
<Context type="mir" search="FileItem/FilePath" document="FileItem"/>
<Content type="string">c:\virus\a</Content>
</IndicatorItem>
<IndicatorItem id="5372a89e-a0b3-4a39-91ad-57dfca92a105" condition="contains">
<Context type="mir" search="FileItem/FilePath" document="FileItem"/>
<Content type="string">foo\a</Content>
</IndicatorItem>
Criteria:
Condition value = “is” or “contains”. When “is” condition is used, the folder path is the absolute path of the folder. The
folder path is case-insensitive.
When Used:
Full scan, Path scan
Custom Registry Key Rule
The Custom Registry Key rule identifies a specific registry key. Please note that RegistryItem/Path and RegistryItem/Keypath are
treated the same by Malwarebytes Breach Remediation.
Syntax:
<IndicatorItem id="regkey_Hive_Settings" condition="is">
<Context document="RegistryItem" search="RegistryItem/Hive" type="mir" />
<Content type="string">HKLM</Content>
</IndicatorItem>
<IndicatorItem id="regkey_Test2" condition="is">
<Context document="RegistryItem" search="RegistryItem/KeyPath" type="mir" />
<Content type="string">Software\Test2</Content>
</IndicatorItem>
<IndicatorItem id="regkey_Test" condition="is">
<Context document="RegistryItem" search="RegistryItem/Path" type="mir" />
<Content type="string">HKLM\Software\Test</Content>
</IndicatorItem>
Criteria:
Condition value = “is”. The registry key is case-insensitive.
When Used:
Full scan, Hyper scan, Threat scan
Windows Breach Remediation Administrator Guide
31
Custom Registry Value Rule
The Custom Registry Value rule identifies a specific registry value. It requires three (3) child indicator items to properly identify the
registry value.
Syntax:
<Indicator operator="AND" id="My_RegVal_Rule">
<IndicatorItem id="regkey_Hive_Settings" condition="is">
<Context document="RegistryItem" search="RegistryItem/Hive" type="mir" />
<Content type="string">HKCU</Content>
</IndicatorItem>
<IndicatorItem id="8971b887-580c-4619-973f-fbbbfe6aa7b6" condition="is">
<Context document="RegistryItem" search="RegistryItem/Path" type="mir" />
<Content type="string">Test</Content>
</IndicatorItem>
<IndicatorItem id="a71e44d5-d022-4f84-aaee-81fa7141e580" condition="is">
<Context document="RegistryItem" search="RegistryItem/ValueName" type="mir" />
<Content type="string">Foo</Content>
</IndicatorItem>
<IndicatorItem id="60eaa413-a6f9-4b66-8df5-7a4fa5a1ae4f" condition="is">
<Context document="RegistryItem" search="RegistryItem/Value" type="mir" />
<Content type="string">abcde</Content>
</IndicatorItem>
</Indicator>
Criteria:
All indicators should use “is” condition. All indicator values are case-insensitive.
When Used:
Full scan, Hyper scan, Threat scan
Program Status Codes
In the course of operation, Malwarebytes Breach Remediation returns a status code for each command that has been executed.
Environmental variable errorlevel is used for this purpose. Status codes are in hexadecimal notation. Status code 0 represents
successful completion of the requested command, while all non-zero values represent failures. File mbbrerr.h (located in the Doc
subdirectory) contains a full listing of all status codes.
Further Reading
•
•
Mandiant ICO Editor User Guide (version 2.2.0.0)
https://www.fireeye.com/content/dam/fireeye-www/services/freeware/ug-ioc-editor.pdf
OpenIOC web site
http://www.openioc.org/
Windows Breach Remediation Administrator Guide
32