<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>M-unition</title>
	<atom:link href="http://blog.mandiant.com/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.mandiant.com</link>
	<description>The Ammunition You Need to Find Evil and Solve Crime</description>
	<lastBuildDate>Wed, 01 Sep 2010 00:46:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>DLL Search Order Hijacking Revisited</title>
		<link>http://blog.mandiant.com/archives/1448</link>
		<comments>http://blog.mandiant.com/archives/1448#comments</comments>
		<pubDate>Wed, 01 Sep 2010 00:46:01 +0000</pubDate>
		<dc:creator>Nick Harbour</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[hijacks]]></category>
		<category><![CDATA[malware]]></category>
		<category><![CDATA[secure coding]]></category>

		<guid isPermaLink="false">http://blog.mandiant.com/?p=1448</guid>
		<description><![CDATA[Since my last blog post on the topic of DLL Search Order Hijacking there has been a lot of community activity in this area.  The purpose of this article is to differentiate the specific hijack technique I was describing from the one that is currently being discussed in the media as well as propose my [...]]]></description>
			<content:encoded><![CDATA[<p>Since my last blog post on the topic of DLL Search Order Hijacking there has been a lot of community activity in this area.  The purpose of this article is to differentiate the specific hijack technique I was describing from the one that is currently being discussed in the media as well as propose my own solution to the problem.</p>
<p>The internet community took notice of DLL hijacking when a link to a security advisory was being passed around Twitter and being discussed by various security industry figureheads.  The advisory was produced by a company named Acros Security and can be found here: <a href="http://www.acros.si/aspr/ASPR-2010-08-18-1-PUB.txt">http://www.acros.si/aspr/ASPR-2010-08-18-1-PUB.txt</a>. I was naturally curious about this as it was published only one month after my blog post on the topic and sounded at first very similar.  People have been taking this technique and discovering vulnerabilities in many applications, as is visible in the enormous spike in activity on exploit-db.com (<a href="http://www.exploit-db.com/local/">http://www.exploit-db.com/local/</a>) on August 24<sup>th</sup> and 25<sup>th</sup>.</p>
<p>The key difference in this technique as opposed to the one I described is that it relies on a DLL being placed in the Current Working Directory of the software versus being placed in the Application Directory.  In my post I described the scenario in which almost every program is vulnerable to DLL Search Order Hijacking when a DLL can be written to the directory that contains the EXE of the program.  The directory containing the EXE is always the very first location in the DLL search order (except for KnownDlls) so the problem is quite wide-spread.  <strong>This technique makes a great persistence mechanism for malware but is a poor way to attempt to get initial code execution on a system.</strong></p>
<p>The problem currently making headlines comes down to the fact that when most programs recursively enumerate files, they do so by setting the current working directory to each directory they find before examining the files found in that directory.  By setting the current working directory to a location, you expose DLLs found in that directory to be a part of the DLL search order and in some cases they will be loaded.  The current working directory is fifth in the DLL search order with SafeDllSearchMode enabled (the default on most systems these days) and second in the search order otherwise.  Strictly speaking, with a position farther down the chain of DLL search order it is more difficult to exploit this than if one has access to the application directory itself.  The reason for all the attention this has received is that many applications will traverse files across a network share, allowing remote infection by applications that both set current working directory for file traversals and have a mechanism where a DLL can be caused to load based on the file type or contents.  The now famous example of this is the iTunes example from the advisory where iTunes sets the current working directory to the directory of files it is scanning, then loads a DLL under some circumstances based on the content of the files it finds.  With current working directory potentially set to a network share containing a batch of music files, a specifically named rouge DLL could be loaded by the iTunes application.  <strong>This technique is a great way to get initial code execution on a system but makes a poor malware persistence mechanism.</strong></p>
<p>Many security vendors have been discussing solutions to the problem lately.  Many recommend loading DLLs by explicit paths, which is a valid approach.  Others have been pressing Microsoft to alter the behavior of DLL loading within operating system, which creates a nightmare of backward compatibility problems.</p>
<p>If setting the current working directory during file traversal leads to potential vulnerabilities in some applications, the logical question to ask is do applications really need to set current working directory to traverse files?  The answer is no.  Setting current working directory leads to slightly simpler recursive code which is why it was chosen in the first place. All API documentation on the topic of traversing files in a Win32 environment use this approach, including Microsoft’s MSDN documentation as well as the two Win32 System programming books on my bookshelf “Windows via C++” and “Windows System Programming”.</p>
<p>When a programmer sets out to write code to traverse files they will typically not reinvent the wheel and will most likely use reference code found on the internet or in a book.  This is not a knock on the programmers who use reference code, file traversal in Win32 is actually somewhat complicated to understand and implement correctly, especially for the novice programmer.  Reference code leading to vulnerabilities is nothing new.  For example, open any book on making web database front-ends and you’ll probably be writing code that is profoundly vulnerable to SQL injection.</p>
<p>Traversing files without setting current working directory involves building full path strings recursively.  The reason this code was mostly likely not chosen to be the reference implementation of file traversal is that it requires string manipulation, which can be error-prone and insecure if done improperly, and requires slightly more code.  Let’s examine the pseudo-code for each approach.</p>
<pre>Recurse(path)
{
    If path is a file
    {
        process_file(path)
    }
    Else if path is a directory
    {
        Save current directory path with GetCurrentDirectory()
        SetCurrentDirectory(path)
        Loop over all directory entries with FindFirstFile(“*.*”) and FindNextFile()
        {
             Recurse(directory entry)
        }
        SetCurrentDirectory(saved current directory)
    }
}</pre>
<p>In the code above there isn’t any string concatenation taking place. Each time we recurse down a directory we saved our current directory, changed the directory before recursing, then restored the current directory when the recursive branch finished.  The vulnerability lies in what specifically happens when your application does something like process_file() above.  If process_file() for your application could potentially result in a DLL loading, then the current working directory is set to the directory of the file you are processing.  Thus the operating system will include this directory in its list of places to look for the DLL.  Let’s examine a different high level pseudo-code that won’t leave us vulnerable to this attack.</p>
<pre>Recurse(path)
{
    If path is a file
    {
        Process_file(path)
    }
    Else if path is a directory
    {
        Concatenate the path with the wildcard “*”
        Loop over all directory entries with FindFirstFile(path with wildcard) and FindNextFile()
        {
            Concatenate the path with the directory entry name
            Recurse(new directory entry path)
        }
    }
}</pre>
<p>Pseudo code is great for seeing the big picture but the problem, as I have stated, is that the skeleton code people grab from reputable documentation sources which uses the technique that isn’t appropriate for their application.  I have written a skeleton file traversal program which uses the string concatenation technique as shown here.  I’ve included the same skeleton program that uses the current working directory approach in case any researcher is curious to compare. Both the vulnerable and non-vulnerable skeleton file traversal code can be downloaded here: <strong><a href="http://blog.mandiant.com/wp-content/ammo/filetraverse_skeleton_code.zip">filetraverse_skeleton_code</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mandiant.com/archives/1448/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Find Evil and Solve Crime, Part 1: Focus</title>
		<link>http://blog.mandiant.com/archives/1266</link>
		<comments>http://blog.mandiant.com/archives/1266#comments</comments>
		<pubDate>Tue, 24 Aug 2010 10:12:53 +0000</pubDate>
		<dc:creator>Jason Luttgens</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[incident response]]></category>
		<category><![CDATA[investigation]]></category>

		<guid isPermaLink="false">http://blog.mandiant.com/?p=1266</guid>
		<description><![CDATA[This is part one of a series of posts I plan to make on what Mandiant does to &#8220;Find Evil and Solve Crime&#8220;. These posts should help to make your organization better, faster and stronger at performing effective computer security incident investigations. And hopefully they will spark some good discussion about improving incident response. The [...]]]></description>
			<content:encoded><![CDATA[<p>This is part one of a series of posts I plan to make on what Mandiant does to &#8220;<strong>Find Evil and Solve Crime</strong>&#8220;. These posts should help to make your organization better, faster and stronger at performing effective computer security incident investigations. And hopefully they will spark some good discussion about improving incident response. The first part is about <strong>focus</strong>.</p>
<h3>Focus</h3>
<p>One of the biggest challenges during an investigation is staying focused. It is all too easy to chase shiny objects, and sometimes even not-so-shiny objects, and never figure anything out. So in this part, I&#8217;ll talk about what Mandiant does to help prevent an investigation from falling off track.</p>
<p>According to the Carnegie Mellon <a href="http://www.sei.cmu.edu/library/abstracts/reports/03hb001.cfm">Software Engineering Institute</a>:</p>
<p style="padding-left: 30px;">&#8220;When an incident occurs, the goal of the CSIRT is to control and minimize any damage, preserve evidence, provide quick and efficient recovery, prevent similar future events, and gain insight into threats against the organization.&#8221;</p>
<p>I think that statement does a great job summing up what the incident response process is all about, and what Mandiant commonly focuses on. But I have something to add. Mandiant pays special attention to specific high-level <strong>questions</strong> that need to be answered.</p>
<h3>Questions</h3>
<p>Based on discussions with our customer, we form high-level questions early on in the investigation. These questions define what topics will be in the executive summary of our final report. They also provide guidance for all investigative activities &#8211; the team should only perform tasks that contribute to answering those questions.</p>
<p>During an investigation, I consider myself a <strong>fact-finder</strong> looking for facts to answer those questions. I establish and search for facts that describe the incident. So it&#8217;s very important to start the investigation on solid ground. We start by discussing the incident, in technical detail, with our customer. We <strong>directly verify and examine all initial facts</strong> about the incident by acquiring the data that shows the facts &#8211; forensic images, firewall logs, etc. Once we know we&#8217;re on solid ground, we start to fan out &#8211; thinking of ways to look for evidence associated with our initial facts.</p>
<p>As we proceed, leads can take us down many different paths, some that help and some that hurt. To stay focused here, we take an old school approach: <strong>Who, What, When, Where, Why and How</strong>.  Staying focused on answering these questions will help us Find Evil, and eventually Solve Crime.</p>
<h3>Context</h3>
<p>One very important aspect that will help is to develop a clear picture of the <strong>context</strong> of the incident and evaluating every new investigative action against it. This will help keep the team focused and efficient. Here are examples scenarios Mandiant has seen challenge an IR team&#8217;s ability to stay focused:</p>
<p><strong>Problem:</strong> The team is not keeping a list of affected systems, malware found, indicators of compromise or dates and times of significant events. Also, no one is keeping a list of evidence gathered, outstanding tasks or responsible persons. Each day, team members are thinking someone else is working on a critical task but things are slipping through the cracks.</p>
<p><strong>Solution:</strong> Assign a single team member to maintain a Web page, document or spreadsheet with all that information.</p>
<p><strong>Problem:</strong> Team members are spending a lot of time analyzing data. Forensic images are scrutinized in painful detail. Lead generation is slow.</p>
<p><strong>Solution:</strong> Before a team member begins analysis on any type of data, provide them with the following:</p>
<ul>
<li>Lead information (i.e., what do we already know)</li>
<li>A list of questions you want answered</li>
<li>A report template</li>
<li>Discuss the elapsed time expected to complete the analysis</li>
<li>Request the analyst inform you as soon as he or she thinks they are not on track with expectations</li>
</ul>
<p><strong>Problem:</strong> An investigation clearly identifies malware associated with the incident on a computer. While performing detailed analysis, additional malware is identified on the system. The team extracts the malware, performs analysis, and begins searching for indicators of that malware on other systems. They find the malware is on additional systems and begin investigations of those. Unfortunately, the malware was unrelated to the incident at hand, and the team wastes days of work.</p>
<p><strong>Solution:</strong> A quick review of the context of the finding &#8211; as simple as checking the date the malware was created.</p>
<p><strong>Problem:</strong> The team provides IP addresses and domain names to the proxy administrator to search for. While searching for those indicators, the administrator begins to look at the logs more closely than they ever have before. The administrator discovers entries that seem suspicious. They are reported to the team. The team begins to investigate these entries &#8211; responding to the computers responsible for the traffic. The team finds no correlation between these systems and the systems involved with the incident at hand.</p>
<p><strong>Solution:</strong> A quick sanity check on the reported entries &#8211; are they similar to other known activity? Are they within the time frame of known activity?</p>
<h3>Summary</h3>
<p>Mandiant has found that the biggest challenge to most investigations is in how they are managed. We&#8217;ve found that sticking to the basics &#8211; documentation and communication &#8211; go a long way to help us stay focused to <strong>Find Evil and Solve Crime</strong>.</p>
<p>Stay tuned to M-unition for my next post, where I’ll discuss collecting and analyzing data that&#8217;s useful on an IR. I&#8217;ll talk about some challenges and provide suggestions to help.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mandiant.com/archives/1266/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reversing Malware Command and Control: From Sockets to COM</title>
		<link>http://blog.mandiant.com/archives/1396</link>
		<comments>http://blog.mandiant.com/archives/1396#comments</comments>
		<pubDate>Mon, 16 Aug 2010 11:16:21 +0000</pubDate>
		<dc:creator>Nick Harbour</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blog.mandiant.com/?p=1396</guid>
		<description><![CDATA[On a Windows host there is more than one way for a program to communicate across the internet.  When reverse engineering a piece of malware it is of critical importance to understand what API is being used and how it works so that you may gain an understanding of the data sent and received as [...]]]></description>
			<content:encoded><![CDATA[<p>On a Windows host there is more than one way for a program to communicate across the internet.  When reverse engineering a piece of malware it is of critical importance to understand what API is being used and how it works so that you may gain an understanding of the data sent and received as well as command structure and internal protocol if applicable.  The choice of networking API also effects how you craft your indicators (more on this later). I break Windows Malware Command and Control communications into four API categories: Sockets, WinInet, URLMon and COM. The primary focus of this article is COM, since it is the rarest, least understood and most difficult to reverse engineer.</p>
<h4>Sockets</h4>
<p>The first group, sockets, is the most widely known as it is the same basic networking API found on Unix. It provides a somewhat raw session level access to a TCP or UDP session.  It is provided primarily by the DLL ws2_32.dll, though it has a storied history.  Any application using the socket API must manually craft any higher level protocol such as HTTP.  A socket object is created with a call to the function <span style="color: #0000ff;">socket()</span>.  It is during this call where the protocol is specified, TCP or UDP.  For a TCP client like most malware backdoors, the function <span style="color: #0000ff;">connect()</span> must be called, which performs the TCP three-way handshake and paves the way for reading and writing of data.  A server program on the other hand will typically call <span style="color: #0000ff;">bind()</span> and <span style="color: #0000ff;">listen()</span> to wait for connections (although <span style="color: #0000ff;">bind()</span> can also be used client side to force a socket to a specific egress port).  The functions<span style="color: #0000ff;"> send()</span> and<span style="color: #0000ff;"> recv()</span> are frequently used to transfer data across the wire for TCP connections and <span style="color: #0000ff;">sendto()</span> and <span style="color: #0000ff;">recvfrom() </span>are traditionally used for UDP connections.  From a malware analysis perspective this makes things simple, if I need to understand what information a piece of malware is expecting in response to its beacon packet I can typically look for calls to the<span style="color: #0000ff;"> recv()</span> function and see how the code that follows inspects the data it reads from the wire.  On Windows though, sockets can be used interchangeably with most operations as if they were a file handle.  For example, a process (like cmd.exe) could be spawned with a network socket specified as its standard input and standard output and that process would automatically communicate across the network.  To learn the socket API in-depth I recommend reading the late W. Richard Stevens&#8217; classic book UNIX Network Programming Volume 1.  The drawback to using the Socket API is that interacting with any higher level protocol such as HTTP must be done so manually.  This allows a lot of flexibility in how the malware crafts its requests but everything must be laid out explicitly.  Malware authors will frequently introduce subtle nuance differences between the way their HTTP traffic looks on the wire and the way most web browsers look.  These small differences make great network signatures!</p>
<h4>WinInet</h4>
<p>The WinInet API requires much less work than the socket API.  It is a convenience API which simplifies the interaction to higher level protocols such as HTTP, FTP and even GOPHER!  To begin using the WinInet API to talk to a remote host you first need to call <span style="color: #0000ff;">InternetOpen()</span> followed by <span style="color: #0000ff;">InternetConnect()</span> or <span style="color: #0000ff;">InternetOpenURL()</span>.  Once the internet has been opened and a connection established, to perform and HTTP request you can call the functions <span style="color: #0000ff;">HttpOpenRequest()</span> to make a request handle and <span style="color: #0000ff;">HttpSendRequest()</span> to send the request.  <span style="color: #0000ff;">InternetReadFile()</span> may then be called to read any response from the server.   It can also be used to read data from an FTP session.  The <span style="color: #0000ff;">InternetWriteFile()</span> function can also be used generically in place of any protocol specific function where data needs to be sent across the wire.   The HTTP functions provide the programmer the ability to configure most of the options one would expect in an HTTP request header such as the User-Agent string.  Not all of these values have to be specified though, and the system default will be used if none is specified.  The malware programmer doesn&#8217;t have as much flexibility to introduce subtle anomalies in the request structures though like they can with sockets, and left with default settings the malware&#8217;s HTTP requests will look virtually identical to legitimate Internet Explorer traffic on the network.</p>
<h4>URLMon</h4>
<p>The URL Monikers API provided by the DLL urlmon.dll provides yet another API for performing internet communications.  In the back end it uses COM but I choose to list this as a separate category from the later discussion of COM because using this API is an abstraction away from the ugly, obscure-t0-reverse methods of direct COM interaction.  The most popular function in the URLMon arsenal, from a malware perspective, is the one-punch knockout function <span style="color: #0000ff;">URLDownloadToFile()</span>. Rarely in the Win32 API does one function do so much work.  You provide this function a URL (for any protocol IE understands), a filename and it uses COM to force Internet Explorer to download the resource to the specified filename.  This is very popular with dropper malware which simply needs to download an EXE from a website and launch it.  You might also run into the <span style="color: #0000ff;">URLDownloadToCacheFile()</span> function which will download a specified URL to the browser cache and return the name of the file it downloaded to.  <span style="color: #0000ff;">URLOpenStream()</span> and <span style="color: #0000ff;">URLOpenPullStream()</span> can be used to download a URL to a buffer in memory, but these functions are rarely used in malware.</p>
<h3>Controlling Internet Explorer with COM</h3>
<p>Using COM for malware command and control has a number of advantages for the malware author.  From a live response/volatile data/memory analysis perspective it obscures the source of malicious traffic because all communication with the remote host will be performed within an iexplore.exe process instead of the malware process.  From a reverse engineering perspective it makes things complicated because it is not immediately clear that the malware is doing network communications at all when first inspected with static analysis.  COM has fallen out of fashion with many of today&#8217;s programmers and is less understood than many other technologies used in modern software.  Malware analysts may be particularly unfamiliar with the inner workings of COM, depending on the programming background in the Win32 world.</p>
<p>Before any COM object can be instantiated, the function <span style="color: #0000ff;">CoInitialize()</span> must be called to initialize the COM library.  Once this is successfully initialized a call can be made to <span style="color: #0000ff;">CoCreateInstance()</span> to create an instance of a particular COM object, such as Internet Explorer.  In order to understand which object is being instantiated at this point you must inspect the first argument to the <span style="color: #0000ff;">CoCreateInstance()</span> function, which will be a CLSID value which is a unique identifier for a COM object.  Here is the call to <span style="color: #0000ff;">CoCreateInstance()</span> found in a malware sample which used COM:</p>
<p><a href="http://blog.mandiant.com/wp-content/ammo/cocreateinstance_screen1.png"><img class="alignnone size-full wp-image-1405" src="http://blog.mandiant.com/wp-content/ammo/cocreateinstance_screen1.png" alt="A Call to CoCreateInstance()" width="269" height="72" /></a></p>
<p>At first glance it&#8217;s difficult to tell what object this function is instantiating because IDA simply shows you the data type of the first value instead of any type of meaningful interpretation of it.  The first argument in this example code is a global variable (a constant actually) that exists at some location in the binary that has been given the label &#8220;rclsid&#8221; by IDA Pro.  If you double click on this first argument IDA Pro will take you to view the variable as it would look in memory:</p>
<p><a href="http://blog.mandiant.com/wp-content/ammo/rclsid_screen1.png"><img class="alignnone size-full wp-image-1406" src="http://blog.mandiant.com/wp-content/ammo/rclsid_screen1.png" alt="COM CLSID value in memory" width="366" height="72" /></a></p>
<p>This CLSID value is recognized as a data structure by IDA and is shown here broken into its components.  The Human-readable way to represent this CLSID value is &#8220;{0002DF01-0000-0000-C000-000000000046}&#8221;.  It would be nice if there were an IDA script to automatically name these values, but in the mean time you can look them up manually in the registry.  By opening regedit and browsing to the key <span style="color: #0000ff;">HKEY_CLASSES_ROOT\CLSID</span> you can see a rather long list of subkeys, each named with a CLSID value.  By finding the subkey name which matches the hexadecimal values you see in IDA Pro you can identify what the object name is that the program is requesting, which is stored in the default value of the key.  Here is a screen shot of regedit showing the key for the CLSID shown in the example code above:</p>
<p><a href="http://blog.mandiant.com/wp-content/ammo/regedit_screen1.png"><img class="alignnone size-full wp-image-1410" src="http://blog.mandiant.com/wp-content/ammo/regedit_screen1.png" alt="Regedit Screen showing our CLSID being named InternetExplorer(ver 1.0)" width="534" height="221" /></a></p>
<p>So it appears that our malware sample is making an instance of the Internet Explorer object!  In order to use any functionality from this object the malware must make use of the last argument to the <span style="color: #0000ff;">CoCreateInstance()</span> function (which was labeled &#8220;ppv&#8221;).  This parameter is a pointer to pointer to receive a newly allocated data structure containing all the pertinent data for this object, most notably function pointers.  The list of functions available is documented here: <a href="http://msdn.microsoft.com/en-us/library/bb159694.aspx">http://msdn.microsoft.com/en-us/library/bb159694.aspx</a>.  To see the Internet Explorer object in action from a source code level please take a look at this article: <a href="http://support.microsoft.com/kb/167658">http://support.microsoft.com/kb/167658</a>.</p>
<p>The most important function call to this COM object we need to recognize as reverse engineers is the call to the function <span style="color: #0000ff;">Navigate()</span> or <span style="color: #0000ff;">Navigate2()</span>.  This is what actually accomplishes the HTTP request which may also contain POST data or a parametrized GET, and thus transmit data to the remote command and control server. The following screen fragment shows the call to the <span style="color: #0000ff;">Navigate()</span> method of the IE COM object as seen from IDA Pro:</p>
<p><a href="http://blog.mandiant.com/wp-content/ammo/navigate_call_in_ida_screen1.png"><img class="alignnone size-full wp-image-1412" src="http://blog.mandiant.com/wp-content/ammo/navigate_call_in_ida_screen1.png" alt="Navigate() call in IDA" width="192" height="61" /></a></p>
<p>In this fragment we see the ppv value being accessed, which is what was populated from the call to <span style="color: #0000ff;">CoCreateInstance()</span>.  A function is being called from within this data structure.    This function is at offset 2Ch from the beginning of the ppv data structure, and you can tell that the binary is calling this function because the call instruction accesses this specific offset from the beginning of the structure (&#8220;call dword ptr [ecx+<strong>2Ch</strong>]&#8220;).   There is no clear-cut way to go directly from the Microsoft documentation of this COM interface to seeing the actually internal offset used by each member function, so I made a small test application to simply reference each function.  I then disassembled my test application and could see the clear mapping of offsets to member functions.  The following table is a mapping of the commonly used member functions (by malware specifically) and their associated offsets as seen in a call instruction:</p>
<p><a href="http://blog.mandiant.com/wp-content/ammo/function_table2.png"><img class="alignnone size-full wp-image-1417" src="http://blog.mandiant.com/wp-content/ammo/function_table2.png" alt="" width="189" height="171" /></a></p>
<h4>Final Thoughts</h4>
<p>My goal with this article was to make more malware analysts and incident responders aware of the spectrum of communication techniques available to malware authors and to make analysts recognize and be able to begin reverse engineering the COM technique specifically.  There is certainly a need for more tools and techniques in this area but it all begins with awareness and understanding.  One thing to take away from this is that as a malware analyst it is not enough to simply know assembly language.  You must gain a working knowledge of the APIs and you must be rigorous, if not downright tenacious, in your appetite to learn new facets of the APIs as you encounter them.  If a malware analyst disregards calls such as CoCreateInstance() without deeper inspection due to their lack of understanding of it, they potentially will miss a critically important component of the malware&#8217;s operation.</p>
<p><img src="/Users/Nick/AppData/Local/Temp/moz-screenshot-1.jpg" alt="" /></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mandiant.com/archives/1396/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Challenges to Remediating from the APT</title>
		<link>http://blog.mandiant.com/archives/1260</link>
		<comments>http://blog.mandiant.com/archives/1260#comments</comments>
		<pubDate>Fri, 06 Aug 2010 14:24:09 +0000</pubDate>
		<dc:creator>Christopher Glyer</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blog.mandiant.com/?p=1260</guid>
		<description><![CDATA[MANDIANT has been involved in numerous widespread remediation efforts following intrusions at large organizations.  We have seen nearly identical recurring challenges emerge at these large organizations, and we believe conveying these challenges may be important to developing your overall approach to remediation should you be compromised by advanced and persistent threats:

Remedial efforts usually take more [...]]]></description>
			<content:encoded><![CDATA[<p>MANDIANT has been involved in numerous widespread remediation efforts following intrusions at large organizations.  We have seen nearly identical recurring challenges emerge at these large organizations, and we believe conveying these challenges may be important to developing your overall approach to remediation should you be compromised by advanced and persistent threats:</p>
<ol>
<li>Remedial efforts usually take more effort and determination than anticipated.  It is a good principle to begin managing the expectations of the business units as soon as possible, ensuring they are aware that the remedial efforts may involve continual effort, resources, and periodic adjustments based on the dynamics of the ongoing threat.</li>
<li>Good remediation plans often fail because determination wanes if each phase of the plan is not short and concise.</li>
<li>An ineffective remediation is initiated because the plan was implemented prior to understanding the tools and techniques of the intruder.</li>
<li>An ineffective remediation plan was initiated because the remediation plan took too long to develop, allowing the compromise to become so widespread that remedial efforts become very time consuming and costly.</li>
<li>The remediation plan fails because accountability for its execution is not clearly assigned to an individual.  Each business unit should assign an individual who becomes responsible for the implementation of the plan.</li>
<li>Remediation fails due to lack of resources &#8211; lacking the personnel, technology and processes to follow through on the remediation plan.</li>
<li>Remediation fails because the organization tipped off the attacker.  In past investigations the following actions have tipped of the attacker:
<ul>
<li>Removing compromised systems as you discover them</li>
<li>Changing one-off domain admin passwords when you see them used</li>
<li>Blocking Command and Control (C2) channels as they are identified</li>
</ul>
</li>
<li>Remediation fails because the organization does not or cannot disconnect from the Internet while undertaking remediation activities.</li>
</ol>
<p>In order to develop and execute an effective remediation plan, not only must you understand these points, but you must also execute your remediation at the right time.  Remediating too early does not help your organization defend your networks, and remediating too late ensures you have lost all your trade secrets to the adversary.  Therefore, below are some key criteria for you to use in order to assess your remediation “timeliness”:</p>
<p>You are remediating early, and entertain higher risk of re-compromise or not fully remediating the current compromise when:</p>
<ul>
<li>Host-based indicators of the current compromise (the attacker’s fingerprints) are unknown</li>
<li>Network-based indicators are unknown or transaction based</li>
<li>New compromised hosts are still being detected at a high rate (more than one per day)</li>
<li>There seems to be no established pattern to assist your organization in anticipating the next compromised host</li>
<li>There is little coordination between business lines (Staff) concerning remediation</li>
</ul>
<p>You are potentially remediating too late when:</p>
<ul>
<li>Host-based indicators are becoming less reliable (they are not hitting on anything)</li>
<li>Network-based indicators are becoming less reliable</li>
<li>You know the attacker has been active and they just “vanish”</li>
<li>Staff motivation and concern has waned</li>
<li>Remedial activities have evolved from corporate-wide efforts to independent “splinter cells”</li>
</ul>
<p>You are in the strike zone and remediating at the right time when:</p>
<ul>
<li>Host-based indicators are stable</li>
<li>Network-based indicators are stable</li>
<li>The delta to detect new compromised hosts is shrinking consistently</li>
<li>Your organization is postured to actively identify and address the “next generation” of attacks – In many of our investigations we see the attacker, or a different attack group, return.  We have seen it take 3 days, 3 weeks, or even 3 months – but inevitably they try and come back.  Your organization has information that is deemed valuable and the attackers won’t just “go away” when you kick them out).</li>
<li>There is active communication and coordination between business lines (Staff) concerning remediation</li>
</ul>
<p>Once you understand when to time the execution of your remediation plan, you should execute it.  MANDIANT will be posting numerous blogs throughout the next several weeks to provide the technical details behind many of the longer term remediation strategies that cannot be implemented prior to eradicating the current incident.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mandiant.com/archives/1260/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stuxnet Memory Analysis and IOC creation</title>
		<link>http://blog.mandiant.com/archives/1236</link>
		<comments>http://blog.mandiant.com/archives/1236#comments</comments>
		<pubDate>Wed, 21 Jul 2010 23:16:51 +0000</pubDate>
		<dc:creator>Peter Silberman</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[IOC]]></category>
		<category><![CDATA[IOCe]]></category>
		<category><![CDATA[malware analysis]]></category>
		<category><![CDATA[Memory analysis]]></category>
		<category><![CDATA[Stuxnet]]></category>

		<guid isPermaLink="false">http://blog.mandiant.com/?p=1236</guid>
		<description><![CDATA[The stuxnet malware has been making the press recently for two reasons.  First it contains two drivers signed with a legitimate (at the time) cert. Second  is it’s targeting SCADA systems. The malware is cool for a host of other geeky reasons. Nick Harbour, Stephen Davis, and I started looking at the malware Sunday afternoon. [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://blogs.technet.com/b/mmpc/archive/2010/07/16/the-stuxnet-sting.aspx">stuxnet</a> malware has been making the press recently for two reasons.  First it contains two drivers signed with a legitimate (at the time) <a href="http://threatpost.com/en_us/blogs/possible-new-rootkit-has-drivers-signed-realtek-071510">cert</a>. Second  is it’s targeting <a href="http://www.zdnet.co.uk/news/security/2010/07/19/windows-systems-at-risk-from-stuxnet-shortcut-malware-40089575/">SCADA systems</a>. The malware is cool for a host of other geeky reasons. Nick Harbour, Stephen Davis, and I started looking at the malware Sunday afternoon. We had hoped to write a blog post about the specifics of the malware before we left for Vegas on Friday. However, in the short term I thought this malware would provide a great opportunity to demonstrate how memory analysis can be leveraged to find malware easily, and how the MANDIANT’s<a href="http://www.mandiant.com/products/free_software/ioce/"> Indicator of Compromise editor</a> (IOCe) tool can be used to describe the malware and what to look for.</p>
<p>The goal of every good IOC is to leverage the intelligence we have about the malware to find it effectively, while allowing for changes/ variants, and weeding out false positives. We can describe most aspects of malware using the IOC language, for this exercise we will focus our energy on writing a good memory IOC. In memory, malware appears rather naked and this is a prime example of that. When loaded, stuxnet spawns lsass.exe in a suspended state. The malware then maps in its own executable section and fixes up the CONTEXT to point to the newly mapped in section. This is a common task performed by malware and allows the malware to execute under the pretense of a known and trusted process. The first indicator in memory is the path it uses to spawn lsass.exe:</p>
<p><a href="http://blog.mandiant.com/wp-content/ammo/lsass_string.png"><img class="alignnone size-full wp-image-1239" src="http://blog.mandiant.com/wp-content/ammo/lsass_string.png" alt="" width="848" height="108" /></a></p>
<p>Notice that the path to lsass.exe has extra backslashes so when the backslashes are resolved by CreateProcessW the path is c:\windows\\system32\\lsass.exe  instead of c:\windows\system32\lsass.exe. This is seen in the following screen shot taken from Audit Viewer:</p>
<p><a href="http://blog.mandiant.com/wp-content/ammo/lssas_av.png"><img class="alignnone size-full wp-image-1241" src="http://blog.mandiant.com/wp-content/ammo/lssas_av.png" alt="" width="286" height="332" /></a></p>
<p>Notice the arguments in each process. The process with a score of 100 is the original lsass spawned by the system. The process with a score of negative 145 is the lsass spawned by the malware. The arguments are very distinctive and a great indication that something is wrong. This is a fine IOC for this specific variant but fixing this and rendering the IOC useless is a trivial task for this malware author. So let’s keep building out the IOC.</p>
<p>If we examine the lsass process further we see another indicator that something is wrong.</p>
<p><a href="http://blog.mandiant.com/wp-content/ammo/lsass_loadedmodules.png"><img class="alignnone size-full wp-image-1242" src="http://blog.mandiant.com/wp-content/ammo/lsass_loadedmodules.png" alt="" width="361" height="219" /></a></p>
<p>Above is a complete DLL listing of the malicious lsass. Who can spot what is missing? If you noticed the lsass.exe itself is missing you are correct. The original lsass has about three times the number of DLL&#8217;s and also includes lsass.exe in the listing:</p>
<p><a href="http://blog.mandiant.com/wp-content/ammo/non_malicious_lsass_listing.png"><img class="alignnone size-full wp-image-1243" src="http://blog.mandiant.com/wp-content/ammo/non_malicious_lsass_listing.png" alt="" width="273" height="610" /></a></p>
<p>The listing continues but notice lsass.exe at the top. The lack of a binary and DLLs in the malicious lsass listing reconfirms what we already knew. That the malware used a process suspend and unmap technique. When the attacker unmaps the lsass.exe section, the lsass.exe is removed the VAD tree and subsequently doesn&#8217;t show up when doing a DLL listing based on VADs. Spotting suspend and unmap via taskmgr or other live response tools would be very difficult. In this case the malware author took extra care and created the process with the correct privileges allowing the attacker to mimic the correct lsass.exe user.</p>
<p>The next addition to the IOC is the digital signature itself. The drivers were signed and verified:</p>
<blockquote><p>&lt;DigitalSignature&gt;</p>
<p><strong> </strong> &lt;SignatureExists&gt;<strong>true</strong>&lt;/SignatureExists&gt;</p>
<p><strong> </strong> &lt;SignatureVerified&gt;<strong>true</strong>&lt;/SignatureVerified&gt;</p>
<p><strong> </strong> &lt;Description&gt;<strong>The file is signed and the signature was verified.</strong>&lt;/Description&gt;</p>
<p><strong> </strong> &lt;CertificateSubject&gt;<strong>Realtek Semiconductor Corp</strong>&lt;/CertificateSubject&gt;</p>
<p><strong> </strong> &lt;CertificateIssuer&gt;<strong>VeriSign Class 3 Code Signing 2004 CA</strong>&lt;/CertificateIssuer&gt;</p>
<p>&lt;/DigitalSignature&gt;</p></blockquote>
<p>We can use the fact that this certificate has now been revoked and add this to our IOC. This again is not a great variant resistant IOC because the attacker can sign their driver with a new cert, if they have one, or have an unsigned driver. In either case those changes will render this IOC useless. We will still add it to our existing IOC knowledge base.</p>
<p>The next behavior to create an IOC for is the injection component. Stuxnet injects at least one binary into svchost, lsass, services and we see references for the potential to infect winlogon as well. Stuxnet is actually injecting a full binary not just shellcode into these processes.</p>
<p><a href="http://blog.mandiant.com/wp-content/ammo/infected_processes.png"><img class="alignnone size-full wp-image-1245" src="http://blog.mandiant.com/wp-content/ammo/infected_processes.png" alt="" width="141" height="83" /></a></p>
<p>When we examine the inject sections we see the binaries import three dlls:</p>
<p><a href="http://blog.mandiant.com/wp-content/ammo/injected_Memory_section.png"><img class="alignnone size-full wp-image-1246" src="http://blog.mandiant.com/wp-content/ammo/injected_Memory_section.png" alt="" width="584" height="527" /></a></p>
<p>The most abstract way to write an IOC for this is to say any process that has an injected binary that imports ADVAPI32.dll or KERNEL32.dll or USER32.dll flag as part of the stuxnet malware family. There is a chance we could end up flagging other things as part of stuxnet but adding imports makes the IOC a little too strict.  This is a much better signature the previous two. It allows for some modification and requires the author to actually make more than one line code changes in their malware to force us to miss it. Now it’s still feasible that the malware could be modified and we could miss it with the current three IOC&#8217;s we have so let’s continue building our IOC. The final thing to create an IOC for is the rootkit component. The rootkit component is designed to hide the presence of the malware and LNK file on the filesystem. To do this they use an old standard technique that AV and rootkits have been using for years. The rootkit layers itself on filesystem devices, if you are running on VMWare it will layers itself on the VMWare filesystem driver. If we create an IOC describing the driver layering we can make it very hard to defeat detection. The IOC we create states that any driver that layers itself on sr.sys,  fs_rec.sys, and fastfat.sys will be flagged. There is definitely a chance for false positive but it should be a small set of hosts and you can add parameters to exclude the false positives if need be. This IOC could be expanded if you are running truecrypt  or other filesystem software the IOC might need to be updated or modified to include or exclude certain drivers. IOC&#8217;s can and should be tailored for the environment where necessary. The final memory IOC looks like this:</p>
<p><a href="http://blog.mandiant.com/wp-content/ammo/ioc_mem.png"><img class="alignnone size-full wp-image-1247" src="http://blog.mandiant.com/wp-content/ammo/ioc_mem.png" alt="" width="469" height="216" /></a></p>
<p>Lets translate this IOC into english. If a process with an argument that contains \\system32\\lsass.exe <strong>OR</strong> a driver exists that has a certificate subject that contains Realtek Semiconductor Corp flag it as stuxnet. <strong>OR </strong>a driver exists that has attached to the following fs_rec.sys <strong>AND</strong> sr.sys <strong>AND</strong> fastfat.sys flag the driver as part of stuxnet. <strong>OR </strong>a process has an injected section <strong>AND </strong>the injected section imports any of the following DLLs advapi32.dll <strong>OR</strong> kernel32.dll <strong>OR</strong> user32.dll. This is a pretty solid IOC for malware in memory as we do more work on the malware we may find more nuisances we can add to it, this is a good start.</p>
<p>Our focus here was to describe the malware in memory using an IOC. But when we write IOCs for the field or customers we take everything into account including disk, registry,  filesystem, eventlog, etc. A more complete IOC for this malware looks like:</p>
<p><a href="http://blog.mandiant.com/wp-content/ammo/ioc_full1.png"><img class="alignnone size-full wp-image-1252" src="http://blog.mandiant.com/wp-content/ammo/ioc_full1.png" alt="" width="683" height="500" /></a></p>
<p>This IOC reads the following way if the file has a section named .stub <strong>OR </strong>a file exists named mdmcpq3.pnf <strong>OR</strong> a file exists named mdmeric3.pnf <strong>OR</strong> a file exists named oem6c.pnf <strong>OR</strong> a file exists named oem7a.pnf <strong>OR</strong> all of the following drivers are attached to by one drivers fs_rec.sys, sr.sys, fastfat.sys <strong>OR</strong> a process has an injected section <strong>AND</strong> it imports any of the following DLLs advapi32.dll, kernel32.dll, user32.dll <strong>OR</strong> a file exists named mrxcls.sys and it has a certificate subject of Realtek Semiconductor Corp <strong>OR</strong> a file exists and it has a name of mrxnet.sys and it has a certificate subject of Realtek Semiconductor Corp <strong>OR</strong> a registry key path exists of HKEY_LOCAL_MACHINE\SYSYTEM\ControlSet001\Services\MRxCLs\ImagePath <strong>AND</strong> has a value of mrxcls.sys <strong>OR</strong> a registry key path exists of HKEY_LOCAL_MACHINE\SYSYTEM\ControlSet001\Services\MRxNet\ImagePath <strong>AND</strong> has a value of mrxnet.sys.</p>
<p>Nick Harbour, Stephen Davis, Jamie Butler, Kris Harms and I will all be at <a href="http://www.blackhat.com">Blackhat </a>this year teaching classes ranging from <a href="http://www.blackhat.com/html/bh-us-10/training/bh-us-10-training_md-mal.html">Malware Analysis Crash Course</a>, <a href="http://www.blackhat.com/html/bh-us-10/training/bh-us-10-training_md-4dy-advmal.html">Advanced Malware Analysis</a>, <a href="http://www.blackhat.com/html/bh-us-10/training/bh-us-10-training_jb-mf.html">Advanced Memory Analysis in Incident Response</a>, and <a href="http://www.blackhat.com/html/bh-us-10/training/bh-us-10-training_md-ir.html">Incident Response</a>. Even if you don&#8217;t take a class, join us for the <a href="http://www.mandiant.com/news_events/forms/shadow_bar">MANDIANT pre-game party</a> from 7-9 on Wednesday before going out for the night!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mandiant.com/archives/1236/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Malware Persistence without the Windows Registry</title>
		<link>http://blog.mandiant.com/archives/1207</link>
		<comments>http://blog.mandiant.com/archives/1207#comments</comments>
		<pubDate>Thu, 15 Jul 2010 17:13:08 +0000</pubDate>
		<dc:creator>Nick Harbour</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[KnownDLLs]]></category>
		<category><![CDATA[malware]]></category>
		<category><![CDATA[persistence]]></category>

		<guid isPermaLink="false">http://blog.mandiant.com/?p=1207</guid>
		<description><![CDATA[For an attacker to maintain a foothold inside your network they will typically install a piece of backdoor malware on at least one of your systems.  The malware needs to be installed persistently, meaning that it will remain active in the event of a reboot.  Most persistence techniques on a Microsoft Windows platform involve the use [...]]]></description>
			<content:encoded><![CDATA[<p>For an attacker to maintain a foothold inside your network they will typically install a piece of backdoor malware on at least one of your systems.  The malware needs to be installed persistently, meaning that it will remain active in the event of a reboot.  Most persistence techniques on a Microsoft Windows platform involve the use of the Registry.  Notable exceptions include the Startup Folder and trojanizing system binaries.  Examining malware persistence locations in the Windows Registry and startup locations is a common technique employed by forensic investigators to identify malware on a host.  Each persistence technique commonly seen today leaves a forensic footprint which can be easily collected using most forensic software on the market.</p>
<p>The persistence technique I&#8217;ll describe here is special in that it doesn&#8217;t leave an easy forensic trail behind.  A malware DLL can be made persistent on a Windows host by simply residing in a specific directory with a specific name, with no trace evidence in the registry or startup folder and no modified system binaries.   There isn&#8217;t just one directory location and DLL filename that are candidate locations for this persistence mechanism but rather a whole class of candidate locations exist for any given system.  On my laptop (Windows 7 64-bit) there are no less than 1032 such path and DLL name combinations where a DLL could be placed such that it would automatically be loaded at some point during my normal boot-up, and that&#8217;s just for a 32-bit DLL!  If you had a 64-bit malware DLL the number would be much higher as I have many more 64-bit processes running at boot time.  So how does this work?</p>
<h2>DLL Search Order Hijacking</h2>
<p>When an application requests to load a DLL either statically via an import table in its executable file, or dynamically via the LoadLibrary() function the operating system will look for the DLL in a predefined sequence of locations.  This sequence is defined in the MSDN documentation here: <a href="http://msdn.microsoft.com/en-us/library/ms682586(VS.85).aspx">http://msdn.microsoft.com/en-us/library/ms682586(VS.85).aspx</a>.  The most important tidbit of information to take away from that document is that the first place the application looks for a DLL is the location of the executable itself.  This isn&#8217;t always the case though.  If the DLL name that is requested is listed in the &#8220;\\.\KnownDlls&#8221; object then it will always load from a fixed location (the System32 folder).  This object is populated at boot-time using data from the Registry at the following location:</p>
<pre>HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\KnownDLLs</pre>
<p>Microsoft employee Larry Osterman describes this in a blog post (<a href="http://blogs.msdn.com/b/larryosterman/archive/2004/07/19/187752.aspx">http://blogs.msdn.com/b/larryosterman/archive/2004/07/19/187752.aspx</a>).  He states in the post that the KnownDlls object will be larger in memory than what is in the Registry key and will be built recursively from the statically imported DLLs from any DLL listed in the registry.  In the limited testing I&#8217;ve done on Windows XP and Windows 7 systems, the KnownDlls object in memory is identical to the list provided by the KnownDLLs registry key.</p>
<p>Casual browsing of the KnownDlls key will reveal a short list of about 30-35 of the most commonly used DLLs.  For example, the low level networking API DLL &#8220;ws2_32.dll&#8221; is contained in this list.  Whenever any application attempts to load a DLL named &#8220;ws2_32.dll&#8221; it will always load it from the System32 folder because it is listed in this key, regardless of where the application was launched from.  The KnownDlls system provides a thin layer of security for this small set of crticial DLLs because an attacker can&#8217;t simply place a DLL named &#8220;ws2_32.dll&#8221; inside a folder containing an application which uses ws2_32.dll and expect their local copy to be loaded.  The KnownDlls system is far too limited to provide any realistic sense of DLL loading security though.  For example, even though we can guarantee that the copy of ws2_32.dll that will be loaded will always be the one from system32, other components loaded when ws2_32.dll is loaded (such as iphlpapi.dll and mswsock.dll) are not guaranteed because they are not covered by KnownDlls.</p>
<p>Lets imagine that we had a legitimate program called update.exe which ran from the location &#8220;C:\Program Files\MyCompany&#8221; and loaded ws2_32.dll, all we would have to do to make update.exe load our malware DLL is place our malware in the &#8220;C:\Program Files\MyCompany&#8221; directory and give it the name &#8220;iphlpapi.dll&#8221;.  When the update.exe program runs it loads ws2_32.dll, which in turn loads iphlpapi.dll which it loads from the application directory first before checking the System32 folder where it legitimately resides.  All the malware author needs to do is make sure their malicious iphlpapi.dll eventually loads the real thing and the user of the system (and a forensic analyst most likely) will have no idea that malware has been loaded.</p>
<h3>Real-World Usage</h3>
<p>You might have come to the conclusion in reading the description of the problem above that executables which reside in the System32 folder are not susceptible.  If you thought that, you&#8217;d be correct.  If you also thought that there is no real practical problem because all consistent and reliably placed startup binaries exist in the System32 folder, you&#8217;d be incorrect.  Case-in-point: Explorer.exe .  Strangely, this binary resides in C:\Windows (I assume for historic reasons).  So when explorer.exe launches and it requests a DLL that is not protected by KnownDlls, the first place the system looks to find the DLL is the C:\Windows directory.  Thus far, the most common place we&#8217;ve found this malware persistence technique being used is in the location and name &#8220;C:\Windows\ntshrui.dll&#8221;.  The real ntshrui.dll is located in the System32 folder but since this dll is loaded by Explorer.exe and not protected by KnownDlls, it&#8217;s unfortunately susceptible to DLL search order hijacking.</p>
<h3>The Extent of the Problem</h3>
<p>Once you really understand the nature of the problem it may occur to you that it&#8217;s a very widespread and pervasive issue.  It has always existed in Windows and will likely exist for the foreseeable future.  To alter the DLL search path mechanism could have severe backward-compatibility problems for Windows and is most likely not going to happen due to the high value they have always placed in compatibility (We love you Raymond Chen!).  I&#8217;ve written a program to identify all locations and filenames that a DLL could be placed to achieve persistence on a given system.  The idea is that you can run this program on a clean (Gold Image) system and forensically search for any DLL name listed in the output on a machine you suspect of being compromised with this method of persistence.  Similar programs may be developed to attempt to identify hijacked DLLs on a live system.  I chose to write this program first however because its output helps to explain the extent of the problem.  I ran the program on my laptop and it produced output which contained 1032 lines, each describing a location and filename that a DLL could be placed to be loaded at boot-time by my system.  On a clean XP SP2 machine I get 91 locations listed.  Here are a few lines from the output from my laptop:</p>
<pre>Hijackable Location: C:\Program Files (x86)\iTunes\SspiCli.dll</pre>
<pre>Hijackable Location: C:\Program Files (x86)\iTunes\CRYPTBASE.dll</pre>
<pre>Hijackable Location: C:\Program Files (x86)\iTunes\CoreFoundation.dll</pre>
<pre>Hijackable Location: C:\Program Files (x86)\iTunes\MSVCR80.dll</pre>
<p>According to this output, some program that loads when my system boots (most likely iTunes) attempts to load the DLL named &#8220;CRYPTBASE.DLL&#8221; which is commonly found in the System32 folder but an attacker could place a malicious DLL in the iTunes folder and that would be loaded instead.  The program examines running processes and determines hijackable DLL locations by the following properties (applied to each loaded dll in every running process in the system):</p>
<ol>
<li>The process executable that loaded the DLL is not located in the System32 folder</li>
<li>The DLL name is not found in the KnownDlls object</li>
<li>The DLL is not found in the same directory as the executable</li>
</ol>
<p><em><strong>Any loaded DLL that contains all three properties is susceptible to being trumped by search order hijacking.</strong></em></p>
<p>The tool (compiled and source) to identify possibly malicious 32-bit DLL locations from a clean system can be found <a href="http://blog.mandiant.com/wp-content/ammo/finddllhijack1.zip">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mandiant.com/archives/1207/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>State of the Hack: M-Trends: State of Remediation</title>
		<link>http://blog.mandiant.com/archives/1216</link>
		<comments>http://blog.mandiant.com/archives/1216#comments</comments>
		<pubDate>Tue, 13 Jul 2010 14:19:25 +0000</pubDate>
		<dc:creator>David Damato</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blog.mandiant.com/?p=1216</guid>
		<description><![CDATA[This Thursday, July 15th at 1PM EDT, Christopher Glyer and I will be presenting MANDIANT’s State of the Hack webinar titled “M-Trends &#8211; State of Remediation.”
Many of you probably already know Christopher.  He’s delivered two separate webinars, including a previous State of the Hack titled “Silent But Deadly” and “Fresh Prints: Choose Your Own Adventure.”  [...]]]></description>
			<content:encoded><![CDATA[<p>This Thursday, July 15<sup>th</sup> at 1PM EDT, Christopher Glyer and I will be presenting MANDIANT’s State of the Hack webinar titled “<a href="https://cc.readytalk.com/cc/schedule/display.do?udc=9jym8br2keeg">M-Trends &#8211; State of Remediation</a>.”</p>
<p>Many of you probably already know Christopher.  He’s delivered two separate webinars, including a previous State of the Hack titled “Silent But Deadly” and “Fresh Prints: Choose Your Own Adventure.”  These webinars gave you more information about the Advanced Persistent Threat (APT) and provided a detailed look into the malware used by this attacker.  However, one area that we haven’t discussed is how to remediate the APT once detected.</p>
<p>As a result, we have assembled a team of incident responders to create a list of the most common and generally applicable remediation strategies we’ve developed over the past year.  These remediation strategies build on our previous webinars and M-Trends report to provide guidance on how to protect against phishing attacks, limit<em><strong> </strong></em>lateral movement, disrupt C2 communications and facilitate investigation of future attacks.  If you haven’t had the opportunity to listen to our previous webinars and read the M-Trends report, I’d encourage you to do so as it will provide some additional background to Thursday’s webinar.  You can find the listing of previous webinars on our website under the <a href="http://www.mandiant.com/news_events/presentation_archives/">News &amp; Events</a> section. To request a copy of M-Trends, simply <a href="http://www.mandiant.com/products/services/m-trends">click here</a>.</p>
<p>Together, Christopher and I will draw on our experience as consultants over the last 10 years to discuss common problems we consistently see at client sites. We will offer remediation solutions, define associated implementation challenges, and discuss a few case studies where we’ve witnessed clients successfully execute our recommendations.  Although we’ll only be providing a subset of the hundreds of recommendations we’ve made, Christopher and I will be more than happy to field specific questions related to your environment.</p>
<p>I hope you can join us for the webinar this Thursday.  There will be plenty of good recommendations, excellent discussion, and a picture of me in jail.</p>
<p>For more information, and to register, <a href="https://cc.readytalk.com/cc/schedule/display.do?udc=9jym8br2keeg">click here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mandiant.com/archives/1216/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Memory acquisition and the pagefile(s)</title>
		<link>http://blog.mandiant.com/archives/1157</link>
		<comments>http://blog.mandiant.com/archives/1157#comments</comments>
		<pubDate>Thu, 08 Jul 2010 02:04:53 +0000</pubDate>
		<dc:creator>Jamie Butler</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[memory acquisition]]></category>
		<category><![CDATA[pagefiles]]></category>
		<category><![CDATA[swap files]]></category>
		<category><![CDATA[Training]]></category>

		<guid isPermaLink="false">http://blog.mandiant.com/?p=1157</guid>
		<description><![CDATA[In the past, I have discussed how in reality there may be as many as 16 pagefiles on a single host. The next question is, &#8220;How much data could be contained in all these pagefiles&#8221;? Why does this matter? Well, the more data in the pagefiles, the longer they will take to acquire.
&#160;
The size of [...]]]></description>
			<content:encoded><![CDATA[<p>In the past, I have discussed how in reality there may be as many as 16 pagefiles on a single host. The next question is, &#8220;How much data could be contained in all these pagefiles&#8221;? Why does this matter? Well, the more data in the pagefiles, the longer they will take to acquire.<br />
&nbsp;<br />
The size of the pagefiles usually depends on the amount of RAM in the host. If you allow Windows to automatically configure the pagefile(s), it will typically recommend that the total size of the pagefiles should be 1.5 times the size of RAM. Here is an example of the recommended settings on a host with 3.5 GB of memory.<br />
<a href="http://blog.mandiant.com/wp-content/ammo/pagefilerec.jpg"><img src="http://blog.mandiant.com/wp-content/ammo/pagefilerec.jpg" alt="" title="Recommended size of pagefiles" width="416" height="829" class="alignnone size-full wp-image-1165" /></a><br />
The recommended total pagefile size is 5,371 MB or approximately 1.5 times 3.5 GB. However, you can configure the pagefiles manually. Some Web sites suggest making the size of the pagefile(s) as much as 3 times the size of RAM. This is what <a href="http://support.microsoft.com/kb/308417/en-us" target="_blank">Microsoft</a> has suggested as the maximum size for better performance on Windows XP.<br />
&nbsp;<br />
As pagefiles get bigger, they will take longer to acquire. Let&#8217;s look at how large they could be in x64 / EM64T, which is generically referred to as 64bit. On 64bit Windows hosts, 32bits or 2^32 are used to represent the offset in the pagefile where the page was stored. Each page in the pagefile is 4096 bytes or 2^12. We know there can be as many as 16 pagefiles or 2^4. Putting it all together:<br />
&nbsp;<br />
(Pagefile Offset) * (Page Size) * (Number of Pagefiles) = Total Size of Paging Data<br />
&nbsp;<br />
(2^32)             * (2^12)       * (2^4)                      = Total Size of Paging Data<br />
&nbsp;<br />
                           2^48                                        = Total Size of Paging Data<br />
&nbsp;<br />
                   281,474,976,710,656                           = Total Size of Paging Data<br />
&nbsp;<br />
<a href="http://support.microsoft.com/kb/294418/en-us" target="_blank">                          256 TB                                       = Total Size of Paging Data</a></p>
<p>Now, I know 256 TB is not going to be typical, but acquiring even 4 GB to 12 GB of paging files can take a long time. The pagefiles are in use and locked by the operating system. To gain access, tools typically parse the filesystem for access to the sectors that represent the pagefiles. This prolongs the time required to acquire the files.<br />
&nbsp;<br />
Next time in this series, we will discuss more about time and its implication on the paging files. If this series is boring you, the <a href="http://bit.ly/cn8Pca" target="_blank">memory forensics class at Black Hat</a> contains more hands-on applications and use cases. This year, Aaron LeMasters, author of <a href="http://blog.mandiant.com/archives/1075" target="_blank">Web Historian 2.0</a>, will be helping with the class. I hope to see you there.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mandiant.com/archives/1157/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Web Historian: Reloaded</title>
		<link>http://blog.mandiant.com/archives/1075</link>
		<comments>http://blog.mandiant.com/archives/1075#comments</comments>
		<pubDate>Wed, 16 Jun 2010 13:35:03 +0000</pubDate>
		<dc:creator>Aaron LeMasters</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Products]]></category>
		<category><![CDATA[blackhat]]></category>
		<category><![CDATA[browser forensics]]></category>
		<category><![CDATA[free tools]]></category>
		<category><![CDATA[MIR 1.4]]></category>
		<category><![CDATA[Web Historian]]></category>

		<guid isPermaLink="false">http://blog.mandiant.com/?p=1075</guid>
		<description><![CDATA[We’ve been busy here on team agent at MANDIANT.  In the spirit of our long-standing support of free software in the Incident Response community, we are happy to announce the release of Web Historian 2.0.  This release is a complete rewrite and revamp of our very popular web history extraction tool.  This version of Web [...]]]></description>
			<content:encoded><![CDATA[<p>We’ve been busy here on team agent at MANDIANT.  In the spirit of our long-standing support of free software in the Incident Response community, we are happy to announce the release of <a href="http://www.mandiant.com/products/free_software/web_historian/" target="_blank"><strong>Web Historian 2.0</strong></a>.  This release is a complete rewrite and revamp of our very popular web history extraction tool.  This version of Web Historian comes packed with features and supports Firefox 2/3+, Chrome 3+, and Internet Explorer versions 5 through 8.  Here is a quick run-down of some of the new features:</p>
<ul>
<li>Collects web history, cookie history, file download history, and form history into data sets</li>
<li>Simple/powerful UI based on tabbed organization of datasets</li>
<li>Perform a live artifact scan of the local system</li>
<li>Perform an artifact scan of one or more arbitrary history files from all supported browsers</li>
<li>Import results from existing XML scan documents</li>
<li>Data displayed in gridview style with full search, sort, and filter capabilities</li>
<li>Custom filters can be created and applied to one or more data sets</li>
<li>Export data sets to XML, HTML or CSV</li>
<li>Extract and export history files used in live artifact scan</li>
<li>Quick copy/paste selected gridview rows to clipboard</li>
<li>Customizable scan settings can tweak the scan to target specific browsers and data sets</li>
<li>Right-click context menu for narrowing gridview data instantly</li>
<li>Select which columns to display in each dataset</li>
<li>View page thumbnails and indexed content</li>
<li>Export sanitized version of history results to distribute to others</li>
<li>Website Analyzer provides visualization of datasets using bar graphs, pie charts and timelines</li>
<li>Website Profiler shows a quick “report card” of artifacts for various websites</li>
</ul>
<p>The custom filters mentioned above are extremely useful for narrowing the scope of your web history investigation. Web Historian ships with several pre-defined filters that allow you to quickly cull through large web history data sets.  For example, you can instantly filter the web history data by visit type to only show hidden page views caused by ads; or, filter the file download history data to only show downloaded media (movies, images, etc.), PDF’s, or plain text files.  You can easily create your own filters using the filter editor and configure Web Historian to automatically save any of your searches as filters.  Finally, more filters are accessible with a simple right-click on any web history item.</p>
<p>Also new in Web Historian 2.0 are the <strong>Website Analyzer</strong> and <strong>Website Profiler </strong>features.  The Website Analyzer allows you to visualize web history data (rather than scrolling through pages of records) and generate useful bar graphs, pie charts and timeline plots that can be used in an external report.  The Website Profiler generates a quick “report card” summary of any domain in your web history data, showing all artifacts created on your system when it was visited (page titles, cookies, cached files, form data, etc).  This feature allows you to get a quick impression of how a site behaves.  The screenshot below shows the profile of CNN.com:</p>
<p style="text-align: center;"><a href="http://blog.mandiant.com/wp-content/ammo/wh_screenshot1.png"><img class="size-full wp-image-1083 aligncenter" src="http://blog.mandiant.com/wp-content/ammo/wh_screenshot1.png" alt="" width="661" height="422" /></a></p>
<p>We hope you enjoy the new features in this release of Web Historian.  As usual, if you have any questions, comments or feedback, please head on over to the <a href="http://forums.mandiant.com" target="_blank">user forum</a>.</p>
<p>Stay tuned for even more exciting features coming soon!  If you would like a demo or talk to me about features, I will be at Blackhat USA in Las Vegas this summer and hope to be accepted to demo Web Historian 2.0 at <a href="http://www.blackhat.com/html/bh-us-10/bh-us-10-specialevents_arsenal.html" target="_blank">Blackhat Arsenal</a>.  And finally, don&#8217;t miss out on our memory forensics training at Blackhat:  <a href="http://www.blackhat.com/html/bh-us-10/training/bh-us-10-training_jb-mf.html" target="_blank">Advanced Memory Forensics in Incident Response</a>.</p>
<p><a href="http://www.mandiant.com/products/free_software/web_historian/" target="_blank"><strong>Download Web Historian 2.0</strong></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mandiant.com/archives/1075/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>It’s a MANDIANT FIRST; grab your stick</title>
		<link>http://blog.mandiant.com/archives/1068</link>
		<comments>http://blog.mandiant.com/archives/1068#comments</comments>
		<pubDate>Tue, 08 Jun 2010 15:16:34 +0000</pubDate>
		<dc:creator>Michael J. Graven</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blog.mandiant.com/?p=1068</guid>
		<description><![CDATA[We’re taking our State of the Hack webinar series on the road &#8212; to the 22nd Annual FIRST conference in Miami, FL!
Kris Harms and I will present the next State of the Hack webinar in front of a live audience at the MANDIANT booth (#5), on Wednesday, June 16, from 12:30-1:30PM EDT. And for this [...]]]></description>
			<content:encoded><![CDATA[<p>We’re taking our <em>State of the Hack</em> webinar series on the road &#8212; to the 22<sup>nd</sup> Annual FIRST conference in Miami, FL!</p>
<p>Kris Harms and I will present the next <a href="https://cc.readytalk.com/cc/schedule/display.do?udc=bkoilxjk2rpx"><em>State of the Hack</em> webinar</a> in front of a live audience at the MANDIANT booth (#5), on Wednesday, June 16, from 12:30-1:30PM EDT. And for this webinar only, we’ll be taking live questions from the floor. Of course, you can also ask questions on the webinar chat channel if you’re not in Miami with us.</p>
<p>As usual, we’ll also cover a few case studies. We’re going to focus on cases that started out as one thing, but turned out to be something completely different. In the words of VP Steve, “It&#8217;s like we went to see a fight, and a hockey game broke out.”</p>
<p>There will be more time than usual for Q&amp;A, by webinar chat and live from the exhibitor hall. If you plan to attend the conference, stop by our booth before and during the broadcast. We’ll try to take your questions live on the air – about the case studies, or about other interesting topics. Can’t make the conference? Don’t worry, you can still register and ask questions beforehand using the <a href="https://cc.readytalk.com/cc/schedule/display.do?udc=bkoilxjk2rpx">registration form</a>.</p>
<p>Learn more and register <a href="https://cc.readytalk.com/cc/schedule/display.do?udc=bkoilxjk2rpx">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mandiant.com/archives/1068/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Memoryze, Audit Viewer, and Training</title>
		<link>http://blog.mandiant.com/archives/994</link>
		<comments>http://blog.mandiant.com/archives/994#comments</comments>
		<pubDate>Sun, 06 Jun 2010 22:17:14 +0000</pubDate>
		<dc:creator>Jamie Butler</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Products]]></category>
		<category><![CDATA[Advanced Memory Forensics in Incident Response]]></category>
		<category><![CDATA[Audit Viewer]]></category>
		<category><![CDATA[Black Hat]]></category>
		<category><![CDATA[memory forensics]]></category>
		<category><![CDATA[Memoryze]]></category>
		<category><![CDATA[MIR 1.4]]></category>
		<category><![CDATA[Training]]></category>

		<guid isPermaLink="false">http://blog.mandiant.com/?p=994</guid>
		<description><![CDATA[For those who are not on our mailing list for Memoryze or Audit Viewer, we released a new version a little over a week ago. The new version of the software includes all of the memory analysis features that are available in the newly released MANDIANT Intelligent Response (MIR) 1.4.&#160;
So what is included in Memoryze [...]]]></description>
			<content:encoded><![CDATA[<p>For those who are not on our mailing list for <a href="http://www.mandiant.com/products/free_software/memoryze/">Memoryze</a> or <a href="http://www.mandiant.com/products/free_software/mandiant_audit_viewer/">Audit Viewer</a>, we released a new version a little over a week ago. The new version of the software includes all of the memory analysis features that are available in the newly released <a href="http://www.mandiant.com/products/core/intelligent_response">MANDIANT Intelligent Response (MIR) 1.4.</a><br />&nbsp;</p>
<p>So what is included in Memoryze and Audit Viewer 1.4? Well, here is the short of it.<br />&nbsp;</p>
<p><strong>Memoryze:</strong></p>
<ul>
<li>Support for Windows 2003 x64 SP2</li>
<li>Improved support of Vista SP1 and SP2 including port enumeration and a better installer</li>
<li>Enumeration of digital signatures for all loaded modules in a processes&#8217; address space, hooked and hooking drivers, and all drivers found by driver signature scans</li>
<li>Enumeration of MD5/SHA1/SHA256 hash on disk for all loaded modules in a process&#8217; address space and all drivers found by driver signature scans</li>
<li>Updated documentation</li>
<li>Single installer for 64-bit and 32-bit versions</li>
</ul>
<p>&nbsp;<br />
<strong>Audit Viewer:</strong></p>
<ul>
<li>Improvements to the Malware Rating Index (MRI)</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Report visualization of MRI results</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;MRI rule editors that will allow users to graphically edit the MRI rule file</li>
<li>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Handle Trust view to help identify suspicious handles</li>
<li>Ability to search results within a specific process</li>
<li>Multi-select with copy</li>
<li>Multi-select and export to a CSV file</li>
</ul>
<p>&nbsp;<br />
Those who attended the CanSecWest Training in March have already been enjoying many of these features in beta form for months, and we are committed to ensuring that those who attend the <a href="http://bit.ly/cn8Pca">Advanced Memory Forensics in Incident Response class</a> at <strong>Black Hat</strong> will get early access to the next version of Memorzye, which will support <strong>Windows 7 64-bit</strong>.<br />
&nbsp;<br />
As for the <a href="http://bit.ly/cn8Pca">Black Hat training</a>, there is a lot of <strong>new and updated content</strong> for 2010.</p>
<ul>
<li>Coverage of 64-bit operating systems</li>
<li>New section on malware covering different malware techniques and how they stand out in memory</li>
<li>Four new case studies ranging from real Advanced Persistent Threat (APT) incidents, to spear phishing attacks, and everything in between</li>
<li><strong>Student receive early access Memoryze and Audit Viewer for Windows 7 64-bit</strong></li>
<li>Students receive the only free tool to analyze Windows Vista</li>
<li>Students receive the only free tool to analyze Windows 2003 64-bit</li>
<li>Better data collection to help identify processes and drivers as malicious or not</li>
<li>Added the Malware Rating Index (MRI), which helps automatically identify many malware behaviors discussed in the class. Through a simple user interface, students learn how to write rules to identify malware in their own work environments. MRI then uses those rules to score processes as suspicious or not.</li>
</ul>
<p>&nbsp;<br />
I would like to thank James Long who pointed out an issue with the batch scripts* and Peter Villadsen who worked so hard to improve the build process and installation for Memoryze. Peter and I would also like to thank all our loyal users. We appreciate all your feedback, and we hope to see you in Las Vegas.<br />
<br />&nbsp;<br />
* When specifying an output directory from the command line with the batch scripts in Memoryze, the directory must already exist.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mandiant.com/archives/994/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MANDIANT AT CEIC 2010</title>
		<link>http://blog.mandiant.com/archives/978</link>
		<comments>http://blog.mandiant.com/archives/978#comments</comments>
		<pubDate>Tue, 25 May 2010 13:56:54 +0000</pubDate>
		<dc:creator>bgwinner</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[CEIC 2010]]></category>
		<category><![CDATA[MIR]]></category>
		<category><![CDATA[OpenIOC]]></category>

		<guid isPermaLink="false">http://blog.mandiant.com/?p=978</guid>
		<description><![CDATA[Got the time?
As part of the Digital Analysis Lab track at CEIC, MANDIANT Director Rob Lee will be teaching Super Timeline Analysis. You will learn how to establish a single framework from which you can analyze multiple examinations of time based data in this hands-on practical.
Move over Iron Man &#8211; MIR 1.4 is coming!
We wanted [...]]]></description>
			<content:encoded><![CDATA[<p>Got the time?</p>
<p>As part of the Digital Analysis Lab track at CEIC, MANDIANT Director Rob Lee will be teaching Super Timeline Analysis. You will learn how to establish a single framework from which you can analyze multiple examinations of time based data in this hands-on practical.</p>
<p>Move over Iron Man &#8211; MIR 1.4 is coming!</p>
<p>We wanted to let the dust settle from the other release of superior red metal before we announced ours!</p>
<p>MANDIANT is releasing the next version of MANDIANT Intelligent Response at CEIC 2010.</p>
<p>Here are just some of the features MIR 1.4 includes:</p>
<ul>
<li>Support for the OpenIOC open indicator format &#8211; a free-to-use, open XML schema for describing indicators of compromise.</li>
<li>Agent support for Windows 7, 64-bit systems for non-memory forensic audits.</li>
<li>Agent support for Windows Vista 32-bit systems.</li>
<li>Agent support for 64-bit memory forensic audits for Windows 2k3 systems.</li>
<li>Optional Agent installation into &#8220;self-hiding&#8221; mode.</li>
</ul>
<p>So what else has changed since MIR 1.3?</p>
<p>Come visit us at CEIC booth 706 and find out!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mandiant.com/archives/978/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SANS EU Malware in Memory</title>
		<link>http://blog.mandiant.com/archives/965</link>
		<comments>http://blog.mandiant.com/archives/965#comments</comments>
		<pubDate>Thu, 15 Apr 2010 21:05:58 +0000</pubDate>
		<dc:creator>Peter Silberman</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[incident response summit]]></category>
		<category><![CDATA[memory forensics training]]></category>
		<category><![CDATA[SANS]]></category>

		<guid isPermaLink="false">http://blog.mandiant.com/?p=965</guid>
		<description><![CDATA[Next Monday, April 18th, I&#8217;ll be presenting at SANS EU Forensic Summit. I&#8217;m really impressed with the line up of this SANS EU conference. It has a very eclectic mix of people talking. Ero Carrera will be dicussing malware analysis. While Ero isn&#8217;t a forenscitar, his insight into malware is pretty expansive, and his exposure [...]]]></description>
			<content:encoded><![CDATA[<p>Next Monday, April 18th, I&#8217;ll be presenting at <a href="http://www.sans.org/eu-forensics-incident-response-summit-2010/agenda.php">SANS EU Forensic Summit</a>. I&#8217;m really impressed with the line up of this SANS EU conference. It has a very eclectic mix of people talking. <a href="http://blog.zynamics.com/2010/04/13/exploring-malware-relations/">Ero Carrera</a> will be dicussing malware analysis. While Ero isn&#8217;t a forenscitar, his insight into malware is pretty expansive, and his exposure to advanced malware is also pretty impressive. It will be a great talk.<br />
&nbsp;<br />
Matthieu Suiche of <a href="http://moonsols.com/">MoonSols</a> is also presenting. His presentation is always fun and very informative. There are a lot of other talks going on that run the gamut from traditional forensics to legal discussions. It should be a great conference.<br />
&nbsp;<br />
I&#8217;ll be doing a 2 1/2hr presentation/training at 7pm. This hybrid presentation/training is actually taken directly from the <a href="http://bit.ly/cn8Pca">Advanced Memory Forensics in Incident Response</a> class that Jamie Butler and I teach at Blackhat. We will go over malware in memory, why checking for malware in memory is important, what you can look for, generic malware behaviors, etc. All attendees will be given a boot camp in how to use and get the most out of <a href="http://www.mandiant.com/products/free_software/mandiant_audit_viewer/">Audit Viewer</a>, <a href="http://www.mandiant.com/products/free_software/memoryze/">Memoryze</a> and how to write Malware Rating Index (MRI) rules. They&#8217;ll also be given new copies of Audit Viewer and Memoryze (x64 support anyone?. Heck, if I stop traveling so much, we might even have support for Windows 7 32-bit or 64-bit, but I am not going to promise Jamie&#8217;s time.)<br />
&nbsp;<br />
We will then spend the rest of the class, hopefully an hour or more, examining case studies. The case studies are designed to mimic real world incidents from mass malware infection, to insider threats and targeted attacks. Our case studies involve answering specific questions about an incident. Sometimes, especially when MRI is enabled, we&#8217;ll set time limits just to keep it sporting. It should be a lot of fun, and hopefully everyone will learn something new. I&#8217;m certainly looking forward to teaching it. <br />
&nbsp;<br />
I&#8217;ll also be on a panel on Tuesday answering the question:  <em>&#8220;Discuss new ways to find malware on a machine?  Which technique is the best?&#8221;</em></p>
<p><em> </em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mandiant.com/archives/965/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fresh Prints of Mal-Ware:  Choose Your Own Adventure!</title>
		<link>http://blog.mandiant.com/archives/953</link>
		<comments>http://blog.mandiant.com/archives/953#comments</comments>
		<pubDate>Wed, 14 Apr 2010 23:08:19 +0000</pubDate>
		<dc:creator>Christopher Glyer</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Advanced Persistent Threat]]></category>
		<category><![CDATA[Fresh Prints of Mal-Ware]]></category>
		<category><![CDATA[malware analysis]]></category>
		<category><![CDATA[webinar]]></category>

		<guid isPermaLink="false">http://blog.mandiant.com/?p=953</guid>
		<description><![CDATA[Kyle Dempsey and I have been busy putting together content for the upcoming Fresh Prints webinar, “Choose Your Own Adventure,” being held this Thursday, April 15th at 2PM EDT.   If you thought of the Choose Your Own Adventure® book series when you saw the title, you understand where we’re going with this.
&#160;
This webinar’s [...]]]></description>
			<content:encoded><![CDATA[<p>Kyle Dempsey and I have been busy putting together content for the upcoming Fresh Prints webinar, “<a href="https://cc.readytalk.com/cc/schedule/display.do?udc=getet90l1l2a">Choose Your Own Adventure</a>,” being held this Thursday, April 15th at 2PM EDT.   If you thought of the Choose Your Own Adventure® book series when you saw the title, you understand where we’re going with this.<br />
&nbsp;<br />
This webinar’s content was developed based on feedback we received from registrants, specifically:</p>
<ul>
<li>How does MANDIANT “Find Evil”</li>
<li>Malware internals</li>
</ul>
<p>&nbsp;<br />
After gathering responses, what we found was that people know the basics about the APT – and what they are most interested in knowing is how our consultants go out in the field and actually find the attackers.<br />
&nbsp;<br />
I have seen some presentations pop-up that speak at a high level on this threat, but they always stop short of showing you how the attackers compromise an organization’s network or how an investigation was conducted.  Kyle and I wanted to create a webinar that showed how we actually conduct an investigation (tools used, screenshots of results…etc.) using real client data (used with their permission).<br />
&nbsp;<br />
The webinar details what we would do with traditional drive based forensics to find malware and contrasts it with real examples of using an approach that scales to an enterprise environment with tens of thousands of hosts (without using an army of investigators and imaging every system under the sun).<br />
&nbsp;<br />
I hope you can join us Thursday for the webinar. As always, there will be plenty of time at the end of the presentation for Q&amp;A.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mandiant.com/archives/953/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blackhat Europe, State Of Malware: Family Ties</title>
		<link>http://blog.mandiant.com/archives/934</link>
		<comments>http://blog.mandiant.com/archives/934#comments</comments>
		<pubDate>Mon, 12 Apr 2010 21:56:19 +0000</pubDate>
		<dc:creator>Peter Silberman</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Advanced Persistent Threat]]></category>
		<category><![CDATA[APT]]></category>
		<category><![CDATA[blackhat]]></category>
		<category><![CDATA[MANDIANT]]></category>

		<guid isPermaLink="false">http://blog.mandiant.com/?p=934</guid>
		<description><![CDATA[Ero and I will be in Barcelona presenting at Blackhat Europe 2010. Our talk is called State of
Malware: Family Ties. This talk focuses on malware families.  We thought about interesting research we could do in the same vein as our last talk, State of Malware: Explosion of the Axis of Evil. We decided to look [...]]]></description>
			<content:encoded><![CDATA[<p>Ero and I will be in Barcelona presenting at Blackhat Europe 2010. Our talk is called <a href="http://blackhat.com/html/bh-eu-10/bh-eu-10-briefings.html#Silberman">State of<br />
Malware: Family Ties</a>. This talk focuses on malware families.  We thought about interesting research we could do in the same vein as our last talk, <em>State of Malware: Explosion of the Axis of Evil</em>. We decided to look at malware families.<br />
&nbsp;<br />
There’s a lot to gather from malware families, from a mass malware perspective looking at conficker, bagel, waldeac, storm worm, rustock, etc. Equally important is examining APT families. MANDIANT tracks over 20 different families. Each family means something different to us. When we see one family at a client site, we might immediately pull Indicators of Compromise (IOC) for other APT families that are closely related. If we find another group, we might quickly start figuring out what was exfiltrated because we know that group and its actors are solely there to move information out. A lot can be extracted from the families we track and that is why clustering malware into families from a targeted perspective is so important.<br />
&nbsp;<br />
Ero and I wonder about a few things:</p>
<ul>
<li>Do mass malware families share enough common attributes across families? Example, does conficker share code with waledac? If so, is it enough so that we could consider them members of a sub family. Also maybe proving they were written by the same author(s) or group of authors.</li>
<li> Do mass malware families share code amongst APT samples? Example, this could mean that we find samples of subseven that match some of our APT backdoors (again just an example).</li>
</ul>
<p>&nbsp;<br />
These two questions alone are very interesting because the results could indicate some author of a mass malware sample is also authoring malware for targeted attacks.<br />
&nbsp;<br />
But we didn&#8217;t stop there. We also wondered:</p>
<ul>
<li>Do rootkits from rootkit.com have very high similarities to rootkits found by MANDIANT and out in the wild?</li>
<li>Do APT samples of family A share enough in common to be also classified as part of family B? We can draw a lot of interesting conclusions if this is the case.</li>
</ul>
<p>&nbsp;<br />
These are all interesting questions, but we had a lot of disappointments when doing the research and some ah ha moments where we thought about theories and realized why some wouldn&#8217;t be true. We also had some finds that we were surprised with, specifically regarding APT. We&#8217;ll be sharing the results on April 14th at 4:45. It should be fun. Our talk has a lot of diagrams, a lot of IDA screen shots, and a great video that Ero made.<br />
&nbsp;<br />
If you can&#8217;t make it to Barcelona, we will be posting our slides and a follow up blog post. Stay tuned! I also have recently updated the slides for <a href="http://bit.ly/cn8Pca">Advanced Memory Forensics in Incident Response</a> for Black Hat USA to include an APT case study and a ton of additional information on observing the behavior of malware in memory.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mandiant.com/archives/934/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Honeynet Project: Challenge 3 of the Forensic Challenge 2010</title>
		<link>http://blog.mandiant.com/archives/901</link>
		<comments>http://blog.mandiant.com/archives/901#comments</comments>
		<pubDate>Fri, 09 Apr 2010 19:39:06 +0000</pubDate>
		<dc:creator>Helena Brito</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Audit Viewer]]></category>
		<category><![CDATA[Forensic Challenge]]></category>
		<category><![CDATA[Honeynet Project]]></category>
		<category><![CDATA[Memory analysis]]></category>
		<category><![CDATA[Memoryze]]></category>
		<category><![CDATA[prizes]]></category>

		<guid isPermaLink="false">http://blog.mandiant.com/?p=901</guid>
		<description><![CDATA[The Honeynet Project has posted a forensic challenge centered around analyzing a memory image. The image represents the physical memory acquired from a host at a fictitious bank, which was the victim of an intruder. The Honeynet Project has come up with a series of questions that you must answer in order to solve the [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="https://www.honeynet.org/">Honeynet Project</a> has posted a forensic challenge centered around analyzing a memory image. The image represents the physical memory acquired from a host at a fictitious bank, which was the victim of an intruder. The Honeynet Project has come up with a series of questions that you must answer in order to solve the case. While the challenge organizers will be doing all the judging, we would like to promote the cause by giving additional prizes to those who place in the top three and solve the challenge using <a href="http://www.mandiant.com/products/free_software/memoryze/">Memoryze</a> and <a href="http://www.mandiant.com/products/free_software/mandiant_audit_viewer/">Audit Viewer</a>.</p>
</p>
<p>The prizes MANDIANT will be offering to those that place in the top three are:</p>
<ol>
First Place:     $100 gift card to Best Buy<br />
Second Place: Backpack<br />
Third Place:    MANDIANT swag
</ol>
<p>In the event of a tie, we will divide the prize(s) equally.</p>
<p>The submission deadline is April 18th so act fast.<br />
<a href="https://www.honeynet.org/challenges/2010_3_banking_troubles">Banking Troubles</a></p>
<p><strong>Please do not send your submissions to MANDIANT. If you are a winner of the challenge, contact info at MANDIANT after the winners are announced. Peter Silberman and other MANDIANT employees may submit a solution; however, employees are not eligible for prizes. If a MANDIANT employee places in the top three of submissions, all prizes will be allocated to the remaining, non-employees to place in the top three.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mandiant.com/archives/901/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Memory Analysis on Windows 2003 64-bit and What&#8217;s Next</title>
		<link>http://blog.mandiant.com/archives/846</link>
		<comments>http://blog.mandiant.com/archives/846#comments</comments>
		<pubDate>Mon, 15 Mar 2010 20:47:51 +0000</pubDate>
		<dc:creator>Jamie Butler</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Audit Viewer]]></category>
		<category><![CDATA[Black Hat USA]]></category>
		<category><![CDATA[CanSecWest]]></category>
		<category><![CDATA[Malware Rating Index]]></category>
		<category><![CDATA[Memory analysis]]></category>
		<category><![CDATA[memory forensics]]></category>
		<category><![CDATA[Memoryze]]></category>
		<category><![CDATA[MRI]]></category>

		<guid isPermaLink="false">http://blog.mandiant.com/?p=846</guid>
		<description><![CDATA[
Peter and I have been busy planning for CanSecWest in a week. The course, Advanced Memory Forensics in Incident Response, is constantly evolving. It has been about a year and a half since Memoryze was released, and just over a year for Audit Viewer. Honestly, it seems a lot longer, but that is not a [...]]]></description>
			<content:encoded><![CDATA[<ul>
<p>Peter and I have been busy planning for <a href="http://cansecwest.com/dojomemory.html">CanSecWest</a> in a week. The course, <a href="http://cansecwest.com/dojomemory.html">Advanced Memory Forensics in Incident Response</a>, is constantly evolving. It has been about a year and a half since <a href="http://www.mandiant.com/products/free_software/memoryze">Memoryze</a> was released, and just over a year for <a href="http://www.mandiant.com/products/free_software/mandiant_audit_viewer">Audit Viewer</a>. Honestly, it seems a lot longer, but that is not a bad thing. This week my team will be handing over to QA Windows 2003 64-bit support. While that is in testing, Peter will be making improvements to Audit Viewer that you the user have recommended, and he will be verifying everything works correctly with the 64-bit output. <a href="http://www.mandiant.com/uploads/presentations/DoD_2010_PS.pdf">The Malware Rating Index (MRI)</a>, which is in Audit Viewer, really changes the case studies in the training. For some exercises, we have to turn MRI off because the malware becomes obvious if you know how to use the tool. I expect MRI will evolve a lot over the next six months as we think of news ways to visualize, sort, and search the data as well as identify new pieces of data to collect. If you are curious how visualization and sorting can help, check out how <a href="http://windowsir.blogspot.com/2009/12/investigating-breaches.html">Harlan Carvey</a> and <a href="http://thedigitalstandard.blogspot.com/2010/03/ram-analysis-part-2.html">Chris Pogue</a> use it.
</ul>
<ul>
<p>We have gotten a lot of great feedback from the user community, but what Windows operating system support or feature would you like see next? Yes, <a href="http://www.mandiant.com/index.php/products/core/intelligent_response">MANDIANT Intelligent Response</a> has a roadmap, but Memoryze allows us to play a little bit. It is really a labor of love. So let us know what you think. You can reach us at peter.silberman or james.butler plus company name.com. We currently support:</p>
<ol>
- Windows 2000 SP4<br />
- Windows XP SP2 and SP3<br />
- Windows Vista SP1 and SP2 (better installer coming in next release)<br />
- Windows 2003 SP1 and SP2<br />
- Windows 2003 SP2 64-bit (** next release **)
</ol>
</ul>
<ul>
<p>So if you cannot make the training at CanSecWest in a week, <a href="http://www.blackhat.com/html/bh-us-10/training/bh-us-10-training_jb-mf.html">Black Hat USA</a> has just opened their training schedule, and we will be there for the weekend and weekday offerings of Advanced Memory Forensics in Incident Response. I hope to see you soon. Keep your eyes open for official update releases of Memoryze/Audit Viewer and <a href="http://www.mandiant.com/presentations/fresh_prints_malware_behaving_badly/">Webinars/presentations</a>.</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.mandiant.com/archives/846/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>State of the Hack Webinar &#8211; Thursday March 11th</title>
		<link>http://blog.mandiant.com/archives/836</link>
		<comments>http://blog.mandiant.com/archives/836#comments</comments>
		<pubDate>Wed, 10 Mar 2010 00:17:05 +0000</pubDate>
		<dc:creator>Christopher Glyer</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Advanced Persistent Threat]]></category>
		<category><![CDATA[Case Study]]></category>
		<category><![CDATA[M-Trends]]></category>
		<category><![CDATA[State of the Hack]]></category>
		<category><![CDATA[webinar]]></category>

		<guid isPermaLink="false">http://blog.mandiant.com/?p=836</guid>
		<description><![CDATA[Michael J. Graven and I will be presenting MANDIANT’s State of the Hack webinar titled &#8220;Silent But Deadly” this Thursday, March 11th at 2PM EST.
I&#8217;ve had the opportunity to lead a number of MANDIANT’s APT investigations recently, and am looking forward to sharing some of my experiences with our audience. One common thread in many [...]]]></description>
			<content:encoded><![CDATA[<p>Michael J. Graven and I will be presenting MANDIANT’s State of the Hack webinar titled &#8220;<a href="https://cc.readytalk.com/cc/schedule/display.do?udc=wsvv875egf20">Silent But Deadly</a>” this Thursday, March 11th at 2PM EST.</p>
<p>I&#8217;ve had the opportunity to lead a number of MANDIANT’s APT investigations recently, and am looking forward to sharing some of my experiences with our audience. One common thread in many of the investigations I have worked is that the APT will use simpler malware, methods, and techniques &#8211; until it no longer works and they are forced to break out something a little more advanced from their arsenal.</p>
<p>The attackers will use more sophisticated methods as needed, and can get incredibly advanced and inventive and just &#8220;disappear&#8221; from the radar of responders if they really have to.  There has been a lot of chatter on the Internet lately about recent attacks and how the malware and the Command and Control channels aren&#8217;t very sophisticated.  But why use sophisticated techniques if you don&#8217;t have to?</p>
<p>Think about it &#8211; if you are a car thief and the car you are going to steal is not locked and has the key in the ignition &#8211; why pick the lock and hotwire the car? It doesn&#8217;t mean that the thief can&#8217;t pick the lock; it just means they don&#8217;t need to.  That same thief may be capable of breaking in to a car that has a locked door, a car alarm, the club, and low-jack &#8211; and still get away with it if they are advanced enough and really want the car bad enough (think &#8220;<a href="http://www.imdb.com/title/tt0187078/">Gone in 60 seconds</a>&#8220;) .  We have seen everything from the very simple – placing malware in a user&#8217;s start-up folder (yes, I actually saw this on one of my engagements) – to the pretty advanced – malware that dropped an NDIS driver capable of monitoring and modifying network traffic at the kernel level, implementing its own TCP/IP stack in the kernel, and providing remote access to a machine that would bypass host-based firewalls, IPS…etc.</p>
<p>During the webinar we will talk about the techniques the attackers use and will go into more depth on a few of the case studies in our recently released <a href="http://www.mandiant.com/products/services/m-trends">M-Trends report</a>.</p>
<p>Oh, and you may be asking yourself what the link is between the name of the webinar &#8220;Silent But Deadly&#8221;, and what we will be discussing.  We have seen evidence of the APT active and undetected in many victim networks for very long periods of time – up to years in some cases.  Hence, the “silent”.  And, while the result of these prolonged intrusions may not be deadly, they can often be costly, which is very bad for business.</p>
<p>We hope to see you on Thursday!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mandiant.com/archives/836/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Malware Behaving Badly: Preview</title>
		<link>http://blog.mandiant.com/archives/810</link>
		<comments>http://blog.mandiant.com/archives/810#comments</comments>
		<pubDate>Fri, 12 Feb 2010 16:29:11 +0000</pubDate>
		<dc:creator>Peter Silberman</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[APT]]></category>
		<category><![CDATA[Audit Viewer]]></category>
		<category><![CDATA[CanSecWest]]></category>
		<category><![CDATA[Fresh Prints Malware Behaving Badly]]></category>
		<category><![CDATA[Malware Behaving Badly]]></category>
		<category><![CDATA[Malware Rating Index]]></category>
		<category><![CDATA[Memoryze]]></category>
		<category><![CDATA[MRI]]></category>
		<category><![CDATA[webinar]]></category>

		<guid isPermaLink="false">http://blog.mandiant.com/?p=810</guid>
		<description><![CDATA[Hope everyone on the northern east coast is staying warm during snowpaclypse. Since I can’t go anywhere I figured now is the right time to write about an upcoming webinar I am giving with Michael Graven.
The webinar entitled Malware Behaving Badly is on Thursday, February 18, at 2:00 p.m. EST. The webinar title is a [...]]]></description>
			<content:encoded><![CDATA[<p>Hope everyone on the northern east coast is staying warm during snowpaclypse. Since I can’t go anywhere I figured now is the right time to write about an upcoming webinar I am giving with Michael Graven.</p>
<p>The webinar entitled<em> Malware Behaving Badly</em> is on Thursday, February 18, at 2:00 p.m. EST. The webinar title is a cute play on my DOD Cyber Crime (DC3) <a href="http://www.mandiant.com/uploads/presentations/DoD_2010_PS.pdf">talk </a>where I first introduced Malware Rating Index (MRI) into <a href="http://www.mandiant.com/products/research/mandiant_audit_viewer/">Audit Viewer</a> (which is available for download).</p>
<p>If you saw my DC3 talk or viewed the slides and are wondering, “hey is this the same talk?” the answer is&#8230;well a little bit. The webinar will build off of a lot of the behaviors and theories I discussed at DC3. We will be addressing new behaviors as well as looking at APT vs Mass Malware behaviors.  I’ve added two new configurable behaviors to MRI and did enough research to scrap a third. I’ll share those as well as give more real world examples of how malware exposes itself in memory.</p>
<p>For example the below listing shows the keylogger, the process and the file handle that process has. The file handle is actual the log file the key logger is writing too.</p>
<table style="height: 158px;" border="0" cellspacing="0" cellpadding="0" width="667">
<col span="3" width="256"></col>
<tbody>
<tr>
<td width="256" height="39">Keylogger Name</td>
<td width="256">Process</td>
<td width="256">Log File</td>
</tr>
<tr>
<td width="256" height="39">Klog</td>
<td width="256">System</td>
<td width="256">\Klog.txt</td>
</tr>
<tr>
<td width="256" height="39">Advanced Keylogger</td>
<td width="256">Explorer</td>
<td width="256">\WINDOWS\Help\dsclientsock.hlp</td>
</tr>
<tr>
<td width="256" height="39">Spector Pro</td>
<td width="256">Explorer</td>
<td width="256">\WINDOWS\system32\avoxnot\BEC7CA9645B2AF87DEEACD53B38B223FEE1C605C.zup</td>
</tr>
</tbody>
</table>
<p>If you didn’t catch my DC3 talk and didn’t understand the slides this is a good time to get an updated version of the talk. I&#8217;m going to focus on malware behavior, what it does when it&#8217;s installed that makes it stand out in memory. We will cover APT and Mass Malware, and specifically where we see their behaviors intersect. Some of these behaviors are horribly simple, i.e. flag svchost launched from directories other than \windows\system32. Some are as simple but may not be as obvious, for example flag svchost, or iexplore if they have a process handle to cmd.exe. These are rules that should never be true.</p>
<p>When discussing rules, I use that term loosely. Basically in Audit Viewer you now have the option to configure all this information. If you go to Operations -&gt; Configure Malware Rating Index you can configure all these things and a few more not mentioned in this post but mentioned in the webinar. We will wrap up the webinar like always with a live demo. Live demos are the most fun really, it’s like NASCAR except it&#8217;s just reputation not lives on the line.</p>
<p>I hope you can <a href="https://cc.readytalk.com/cc/schedule/display.do?udc=wh0b6ijw44nk">join us</a>, it should be fun.</p>
<p>If you would like to learn more in-depth about how physical memory analysis works, use <a href="http://www.mandiant.com/products/free_software/memoryze/">Memoryze</a> and Audit Viewer, understand MRI, or write your own malware rules, join Jamie and I at the <a href="http://cansecwest.com/dojomemory.html">CanSecWest training</a>. CanSecWest specializes in technical, hands-on classes with an extremely low student-teacher ratio.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mandiant.com/archives/810/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Audit Viewer: Malware Rating Index Undocumented Features and Caveats</title>
		<link>http://blog.mandiant.com/archives/782</link>
		<comments>http://blog.mandiant.com/archives/782#comments</comments>
		<pubDate>Tue, 09 Feb 2010 14:48:42 +0000</pubDate>
		<dc:creator>Peter Silberman</dc:creator>
				<category><![CDATA[Conferences]]></category>
		<category><![CDATA[Products]]></category>
		<category><![CDATA[Audit Viewer]]></category>
		<category><![CDATA[DC3]]></category>
		<category><![CDATA[DOD Cyber Crime Conference]]></category>
		<category><![CDATA[M-Trends]]></category>
		<category><![CDATA[Malware Rating Index]]></category>
		<category><![CDATA[Memoryze]]></category>
		<category><![CDATA[MRI]]></category>
		<category><![CDATA[MTrends]]></category>

		<guid isPermaLink="false">http://blog.mandiant.com/?p=782</guid>
		<description><![CDATA[Hopefully everyone has had a few weeks to recover from the M-Trends kickoff party in St. Louis and everyone has also had a chance to read the M-Trends report! I hope everyone enjoyed the talk I gave at DOD Cyber Crime Conference. I certainly had fun giving it, sorry to those that got hit with [...]]]></description>
			<content:encoded><![CDATA[<p>Hopefully everyone has had a few weeks to recover from the M-Trends kickoff party in St. Louis and everyone has also had a chance to read the <a href="http://www.mandiant.com/news_events/article/m-trends/">M-Trends report</a>! I hope everyone enjoyed the talk I gave at DOD Cyber Crime Conference. I certainly had fun giving it, sorry to those that got hit with the squishy balls. I wanted to take a second to address some caveats and undocumented features of MRI that couldn’t be discussed in the talk.</p>
<p>A caveat within MRI I that I want to talk about is Process Path Verification. This rule set is very powerful but there are two ways to define to paths. Neither is documented because currently there is no documentation on MRI.. The first method of specifying a process path is to specify an absolute path such as this:<br />
<em> calc.exe:\windows\system32</em></p>
<p>MRI interprets this as the only valid path for calc.exe is \windows\system32\calc.exe. However, if I wrote the rule like:<br />
<em> calc.exe:\windows\system32\</em></p>
<p>MRI would interpret this as calc.exe can be run from any sub directory as long it’s a sub directory within \windows\system32\*</p>
<p>The reason this is important is it gives you flexibility in writing definitions. If I don’t want to specify the exact location of iexplore.exe I can say it needs to be launched from \program files\. This may prove to be too loose, and I may change this behavior going forward. For now you have the flexibility to specify absolute paths or sub paths.</p>
<p>The next &#8220;undocumented&#8221; tidbit that I want to discuss is within two behaviors. These behaviors actually have the ability to use regex when trying to match up their values. I did not build the regex option into the UI so it has to be manually added to the AuditViewerConfig.xml. The two XML lists that can take regex expressions are IgnoreFilesList, and ProcessSuspiciousHandleList. The regex elements are, IgnoreFileRegex, and HandleRegex. An example IgnoreFileRegex looks like:<br />
<em>&lt;IgnoreFileRegex&gt;mshist.*\\index.dat&lt;/IgnoreFileRegex&gt;</em></p>
<p>This rule specifies that any file matching this regular expression should be ignored when doing process scoring. You can get creative just be careful.</p>
<p>An example HandleRegex looks like:<br />
<em>&lt;HandleRegex&gt;*:.*-7$:mutant:known conficker mutant&lt;/HandleRegex&gt;</em></p>
<p>It breaks down like this:<br />
Process: Regular Expressions : handle type: description</p>
<p>It breaks down like this:<br />
Process: Regular Expressions : handle type: description</p>
<p>This allows you to get more out of your suspicious handles definitions.</p>
<p>Finally, I’d like to take a second to reiterate something I stated at DC3. The “Verify Digital Signatures” option in <a href="http://www.mandiant.com/products/free_software/memoryze/">Memoryze</a> and <a href="http://www.mandiant.com/products/research/mandiant_audit_viewer/">Audit Viewer </a>wizard can ONLY be run when doing live memory. It is not possible to enable it when doing dead memory analysis. Which means the address scoring is not possible on dead memory, behavioral analysis still works on dead memory. If you are going to acquire memory, please run live analysis jobs as well as acquisition. This way you get the most information possible off the machine. The second thing I wanted to reiterate is that verify digital signatures is great, it really helps potentially speed up an analyst’s job. However, we are only verifying the digital signatures exist and are valid on disk. We are not verifying the module in memory hasn’t been modified. If a userland rootkit exists (again shame on the authors) then we won’t report that. It’s important to remember this. Verifying modules in memory short of doing rootkit detection is not a trivial task. The windows loader is a beast, a behemoth it does a lot to make verification in memory to disk is very hard (not impossible). Thanks again for all the interest in <a href="http://www.mandiant.com/products/services/m-trends">M-Trends</a>, <a href="http://www.mandiant.com/products/research/mandiant_audit_viewer/">Audit Viewer</a> and<a href="http://www.mandiant.com/products/free_software/memoryze/"> Memoryze</a>. As always feedback is always appreciated.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.mandiant.com/archives/782/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
