<?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>Matthieu Suiche&#039;s blog &#187; SandMan</title>
	<atom:link href="http://www.msuiche.net/category/sandman/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.msuiche.net</link>
	<description>Happiness only real when shared.</description>
	<lastBuildDate>Sat, 24 Apr 2010 09:10:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.3</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Demystifying new Windows 7 System Information Classes</title>
		<link>http://www.msuiche.net/2009/03/31/demystifying-new-windows-7-system-information-classes/</link>
		<comments>http://www.msuiche.net/2009/03/31/demystifying-new-windows-7-system-information-classes/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 21:09:32 +0000</pubDate>
		<dc:creator>Matthieu Suiche</dc:creator>
				<category><![CDATA[Debugging]]></category>
		<category><![CDATA[Reverse Engineering]]></category>
		<category><![CDATA[SandMan]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.msuiche.net/?p=193</guid>
		<description><![CDATA[This post is the first of a serie of articles/blogposts about new System Information Class under Windows 7 (32bits ATM) used by both NtQuerySystemInformation and extended version of this API called NtQuerySystemInformationEx introduced in Windows 7 and Windows 2008 R2.
First of all, here is the prototype of these functions.

NTSTATUS (WINAPI *NtQuerySystemInformationEx)(SYSTEM_INFORMATION_CLASS SystemInformationClass,
    [...]]]></description>
			<content:encoded><![CDATA[<p>This post is the first of a serie of articles/blogposts about new System Information Class under Windows 7 (32bits ATM) used by both <em><a href="http://msdn.microsoft.com/en-us/library/ms724509(VS.85).aspx">NtQuerySystemInformation</a></em> and extended version of this API called <em>NtQuerySystemInformationEx</em> introduced in Windows 7 and Windows 2008 R2.</p>
<p>First of all, here is the prototype of these functions.</p>
<blockquote><p>
NTSTATUS (WINAPI *NtQuerySystemInformationEx)(SYSTEM_INFORMATION_CLASS SystemInformationClass,<br />
                                              PULONG QueryType,<br />
                                              ULONG Alignment,<br />
                                              PVOID SystemInformation,<br />
                                              ULONG SystemInformationLength,<br />
                                              PULONG ReturnLength);</p>
<p>NTSTATUS (WINAPI *NtQuerySystemInformation)(SYSTEM_INFORMATION_CLASS SystemInformationClass,<br />
                                            PVOID SystemInformation,<br />
                                            ULONG SystemInformationLength,<br />
                                            PULONG ReturnLength);</p></blockquote>
<p>As you can see there is two further arguments in NtQuerySystemInformationEx: QueryType and Alignment.</p>
<p>And here are new  (and undocumented) system information classes added to Windows 7 that will be discussed in next blogposts.</p>
<blockquote><p>typedef enum _SYSTEM_INFORMATION_CLASS<br />
{<br />
    // NtQueryEx<br />
    <a href="http://code.msdn.microsoft.com/64plusLP/">SystemLogicalProcessorAndGroupInformation</a> = 107,<br />
    SystemLogicalGroupInformation = 108,</p>
<p>    SystemStoreInformation = 109,<br />
    SystemVhdBootInformation = 112,<br />
    SystemCpuQuotaInformation = 113, </p>
<p>    // Removed in build 7100<br />
    SystemHardwareCountersInformation = 115, // uses <a href="http://msdn.microsoft.com/en-us/library/dd835193.aspx">KeQueryHardwareCounterConfiguration</a>() instead</p>
<p>    <a href="http://www.msuiche.net/2009/04/01/low-priority-io-count-information-systemlowpriorityinformation/">SystemLowPriorityInformation</a> = 116,<br />
    SystemTpmBootEntropyInformation = 117,<br />
    SystemVerifierInformation = 118, </p>
<p>    // NtQueryEx<br />
    SystemNumaNodesInformation = 121,<br />
    //<br />
    // Added in build 7100<br />
    //<br />
    SystemHalInformation = 122, // 8 bytes size<br />
    SystemCommittedMemoryInformation = 123,<br />
    MaxSystemInfoClass = 124<br />
} SYSTEM_INFORMATION_CLASS, *PSYSTEM_INFORMATION_CLASS;</p></blockquote>
<p>PS. For interested people the first issue of the Debugged! MZ/PE: MagaZine is available on <a href="http://www.amazon.com/Debugged-MZ-PE-Practicing-Engineers/dp/1906717389/ref=sr_1_1?ie=UTF8&#038;s=books&#038;qid=1236600409&#038;sr=8-1"> Amazon.</a></p>
<p><a href="http://twitter.com/home?status=@msuiche Reading Demystifying new Windows 7 System Information Classes http://tinyurl.com/cl9ywm">Twitt This!</a></p>
<p><b>Edit:</b> SYSTEM_INFORMATION_CLASS structure updated in build 7100.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.msuiche.net/2009/03/31/demystifying-new-windows-7-system-information-classes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Your hibernation file in a nutshell &#8211; Part II</title>
		<link>http://www.msuiche.net/2008/12/13/your-hibernation-file-in-a-nutshell-part-ii/</link>
		<comments>http://www.msuiche.net/2008/12/13/your-hibernation-file-in-a-nutshell-part-ii/#comments</comments>
		<pubDate>Sat, 13 Dec 2008 19:33:49 +0000</pubDate>
		<dc:creator>Matthieu Suiche</dc:creator>
				<category><![CDATA[SandMan]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.msuiche.net/?p=82</guid>
		<description><![CDATA[>> Part I < ]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.msuiche.net/2008/08/23/sandman-shell-your-hibernation-file-in-a-nutshell-part-i/">>> Part I < <</a><br />
As I said in </a><a href="http://blog.moonsols.com/?p=9">MoonSols blog</a>, I decided to release the actual version of hibrshell as a free non-opensource tool. The current version is <em>alpha</em>, this means the project is still in developpement.</p>
<p>You can find hibrshell at the following link: <a href="http://www.msuiche.net/hibrshell/">http://www.msuiche.net/hibrshell/</a></p>
<p><strong>Present:</strong><br />
* The actual version can read the hibernation file from a hibernated or resumed computer &#8212; this means hibrshell don&#8217;t mind if the first page (header) had been wiped or not.<br />
* Moreover, Windows XP, 2003, Vista and 2008 hibernation file are compliant with hibrshell. Probably Windows Seven too &#8212; but I donnot have tested it.<br />
* hibrshell uses Microsoft Debugging Symbols technology this explains why it is able to list process regardless of the target version.<br />
* Only few basis features are actually provided.</p>
<p><img src="http://msuiche.net/hibrshell/hibrshell.png" alt="help" width="591" height="405"/></p>
<p><strong>Future:</strong><br />
* hibr2dmp command. To convert Microsoft hibernation file to an Microsoft crash dump file. I guess I&#8217;d be easier and more powerful to proceed to an advanced analysis with WinDbg than with my little swissknife.<br />
* Support for Microsoft crash dump files, and raw memory snapshot will be added.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.msuiche.net/2008/12/13/your-hibernation-file-in-a-nutshell-part-ii/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>X-Files. Episode 2. *Squeeze*</title>
		<link>http://www.msuiche.net/2008/04/30/x-files-episode-2-squeeze/</link>
		<comments>http://www.msuiche.net/2008/04/30/x-files-episode-2-squeeze/#comments</comments>
		<pubDate>Wed, 30 Apr 2008 14:18:41 +0000</pubDate>
		<dc:creator>Matthieu Suiche</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[SandMan]]></category>

		<guid isPermaLink="false">http://www.msuiche.net/?p=46</guid>
		<description><![CDATA[As said previously, it&#8217;s really easy to find proof of plagiarism when an open-source tool is released and whan this source is reimplemented into a commercial software without compliance.  Andreas published a new article called The implementation by Vendor &#8220;S&#8221;. In this article, he has explained what are the differences between the implementation of [...]]]></description>
			<content:encoded><![CDATA[<p>As said <a href="http://www.msuiche.net/2008/04/29/x-files-episode-1-deep-throat/">previously</a>, it&#8217;s really easy to find proof of plagiarism when an open-source tool is released and whan this source is reimplemented into a commercial software without compliance.  Andreas published a new article called <a href="http://computer.forensikblog.de/en/2008/04/implementation_by_vendor_s.html#more">The implementation by Vendor &#8220;S&#8221;</a>. In this article, he has explained what are the differences between the implementation of XpressDecode in <a href="http://sandman.msuiche.net">SandMan</a> and the Microsoft OS Loader&#8217;s one.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.msuiche.net/2008/04/30/x-files-episode-2-squeeze/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Few words about Microsoft interoperability initiative.</title>
		<link>http://www.msuiche.net/2008/04/06/few-words-about-microsoft-interoperability-initiative/</link>
		<comments>http://www.msuiche.net/2008/04/06/few-words-about-microsoft-interoperability-initiative/#comments</comments>
		<pubDate>Sun, 06 Apr 2008 21:23:05 +0000</pubDate>
		<dc:creator>Matthieu Suiche</dc:creator>
				<category><![CDATA[Debugging]]></category>
		<category><![CDATA[Reverse Engineering]]></category>
		<category><![CDATA[SandMan]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.msuiche.net/?p=42</guid>
		<description><![CDATA[As you probably know, Microsoft released last month several thousands pages of documentation about  office file format and Windows protocols.  
It means numerous hundreds(thousands?) of functions/algorithms documentation and pseudo-code. But, are these pseudo-function right? It looks not. 
While I was reading [MS-DRSR]: Directory Replication Service (DRS) Remote Protocol Specification, I was a bit [...]]]></description>
			<content:encoded><![CDATA[<p>As you probably know, Microsoft released last month several thousands pages of documentation about  <a href="http://www.microsoft.com/interop/docs/OfficeBinaryFormats.mspx">office file format</a> and <a href="http://msdn2.microsoft.com/en-us/library/cc216517.aspx">Windows protocols</a>.  </p>
<p>It means numerous hundreds(thousands?) of functions/algorithms documentation and pseudo-code. But, are these pseudo-function right? It looks not. </p>
<p>While I was reading <a href="http://download.microsoft.com/download/a/e/6/ae6e4142-aa58-45c6-8dcf-a657e5900cd3/%5BMS-DRSR%5D.pdf">[MS-DRSR]: Directory Replication Service (DRS) Remote Protocol Specification</a>, I was a bit curious to see the DecompressWin2k3() function (Thanks <a href="http://volatilesystems.blogspot.com/">Aaron</a>, <a href="http://samba.org">Stefan</a> , and <a href="http://moyix.blogspot.com">Brendan</a>).</p>
<p>This function is in fact the decompression algorithm called Xpress implemented for the first time in Windows XP and not Windows 2003 as say the name. Xpress algorithm works on 64kb chunks and is used in <a href="http://sandman.msuiche.net">Windows hibernation file format</a>, <a href="http://technet.microsoft.com/en-us/magazine/cc160878.aspx">Windows Imaging Format (WIM) </a>, Outlook, Exchange, and&#8230; <a href="http://fr.wikipedia.org/wiki/LDAP">LDAP</a> replication service of Active Directory.</p>
<p>I&#8217;m quoting below, errors I found in the pseudo-code of DecompressWin2k3(). <a href="http://www.msuiche.net/codes/xpress.c.txt">Here is the C implementation.</a></p>
<pre>
<font color="red"><strong>while (outputIndex < = outputSize) </strong></strong></font>
<font color="orange"><em>should be:</em></font>
<font color="green"><strong>while (outputIndex < outputSize) </strong></strong></font>
    if (indicatorBit = 0) then
        <font color="red"><strong>indicatorBit := copy inputBuffer[inputIndex] as 32-bit integer in
        little-endian format </strong></font>
        <font color="orange"><em>should be:</em></font>
        <font color="green"><strong>indicator := copy inputBuffer[inputIndex] as 32-bit integer in
        little-endian format </strong></font>
        inputIndex := inputIndex + 4
        indicatorBit := 32
    endif 

    indicatorBit := indicatorBit - 1 

//* check whether the bit specified by indicatorBit is set or not
//* set in indicator. For example, if indicatorBit has value 4
//* check whether the 4th bit of the value in indicator is set  

    if indicatorBit bit in indicator is not set then
        <font color="red"><strong>inputBuffer[inputIndex] := outputBuffer[outputIndex]</strong></font>
        <font color="orange"><em>should be:</em></font>
        <font color="green"><strong>outputBuffer[outputIndex] := inputBuffer[inputIndex] </strong></font>
        inputIndex := inputIndex + 1
        outputIndex := outputIndex + 1
    else
        length := copy inputBuffer[inputIndex] as 16-bit integer in
        little-endian format
        inputIndex := inputIndex + 2
        offset := length /8
        length := length mod 8 

        if (length = 7) then 

            if (nibbleIndex = 0) then
                nibbleIndex := inputIndex
                length := inputBuffer[inputIndex] mod 16
                inputIndex := inputIndex + 1
            else
                <font color="red"><strong>length := inputBuffer[inputIndex] / 16</strong> </font>
                <font color="orange"><em>should be:</em></font>
                <font color="green"><strong>length := inputBuffer[nibbleIndex ] / 16</strong> </font>
                nibbleIndex := 0
            endif 

            if (length = 15) then 

                length := inputBuffer[inputIndex]
                inputIndex := inputIndex + 1 

                    if (length = 255) then
                        length := copy inputBuffer[inputIndex] as 16-bit integer in little-endian format
                        inputIndex := inputIndex + 2
                        length := length - (15 + 7)
                    endif
                length := length + 15
            endif 

            length := length + 7 

        endif 

    length := length + 3 

        <font color="red"><strong>while (not length = 0)</strong> </font>
        <font color="orange"><em>should be:</em></font>
        <font color="green"><strong>while (length != 0)</strong> </font>
            outputBuffer[outputIndex] := outputBuffer[outputIndex - offset - 1]
            outputIndex := outputIndex + 1
            length := length - 1
        endwhile
    endif 

endwhile 

return </pre>
]]></content:encoded>
			<wfw:commentRss>http://www.msuiche.net/2008/04/06/few-words-about-microsoft-interoperability-initiative/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>New attack released &#8211; Windows has been vulnerable for 8 years.</title>
		<link>http://www.msuiche.net/2008/03/18/new-attack-released-windows-has-been-vulnerable-for-8-years/</link>
		<comments>http://www.msuiche.net/2008/03/18/new-attack-released-windows-has-been-vulnerable-for-8-years/#comments</comments>
		<pubDate>Tue, 18 Mar 2008 19:15:57 +0000</pubDate>
		<dc:creator>Matthieu Suiche</dc:creator>
				<category><![CDATA[Articles]]></category>
		<category><![CDATA[SandMan]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.msuiche.net/2008/03/18/new-attack-released-windows-has-been-vulnerable-for-8-years/</guid>
		<description><![CDATA[
In November 2007 at PacSec&#39;07, Tokyo, Japan, Nicolas Ruff and I (Matthieu Suiche) presented how to create a readable physical memory dump from the undocumented Microsoft hibernation file.

Last month, I published an open-source public version of this project called SandMan Framework. This framework allows manipulating the hibernation file for offensics (malicious) or forensics uses.

Today, I [...]]]></description>
			<content:encoded><![CDATA[<div align="right"><iframe src='http://digg.com/tools/diggthis.php?u=http%3A//www.msuiche.net/#' frameborder='0' scrolling='no' height='80' width='50'></iframe></div>
<p><strong>In November 2007</strong> at <em>PacSec&#39;07, Tokyo, Japan</em>, Nicolas Ruff and I (Matthieu Suiche) presented how to create a readable physical memory dump from the <strong>undocumented</strong> Microsoft hibernation file.</p>
<p>
Last month, I published an open-source public version of this project called <a href="http://sandman.msuiche.net" target="_blank"><strong>SandMan Framework</strong></a>. This framework allows manipulating the hibernation file for offensics (malicious) or forensics uses.</p>
<p>
Today, I am going to release a Proof of Concept of the <i>sandman attack</i> using SandMan Framework. This PoC consists in elevating a user CMD shell to SYSTEM level under Windows XP SP3 <strong>RC1</strong>.
</p>
<p>
Sandman Framework offers a wide range of possibilities, <strong>both offensive and defensive</strong>. Like <em>cryptographic keys retrieving in popular encryption software (e.g. TrueCrypt, GPG), privilege<br />
escalation (cf. PoC), login without any password, and so on</em>.
</p>
<p><strong>All Windows versions are concerned</strong>, from Windows 2000 up to Windows 2008, Windows Vista SP1 included (and possibly Windows Seven).
</p>
<p>
The following video shows how the system can be subverted in a few minutes. The following points are highlighted:</p>
<p><strong>* </strong>Deactivating hibernation feature <strong>does not solve</strong> the problem.<br />
<strong>* </strong>The sandman attack affects <strong>every Windows version</strong>, from Windows 2000 to Windows 2008, 32- and 64-bit alike.<br />
<strong>* </strong>We can <strong>read and write everything everywhere</strong> in the physical memory (RAM).<br />
<strong>* </strong> This attack is feasible in <strong>real life</strong> on every computer <strong>with no hardware requirements</strong>.<br />
<strong>* </strong><strong>The attack has no time limitation</strong>. If a computer has been hibernated one<br />
week ago, extracting his physical memory is still possible.</p>
<p>
<em>This is far more powerful than other recently demonstrated attacks against physical memory, like Cold Boot and FireWire attacks.</em>
</p>
<div align="center"><object width="672" height="504"><param name="movie" value="http://www.dailymotion.com/swf/x4pv79d&#038;v3=1&#038;related=1"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><embed src="http://www.dailymotion.com/swf/x4pv79&#038;v3=1&#038;related=1" type="application/x-shockwave-flash" width="672"  height="504" allowFullScreen="true" allowScriptAccess="always"></embed></object><br /><b><a href="http://www.dailymotion.com/video/x4pv79_new-attack-windows-vulnerables-for_tech" target="_blank">New attack released &#8211; Windows has been vulnerable for 8 years.<br />Generic Privilege Escalation under Windows XP SP3 RC1.</a></b></div>
<p></p>
<blockquote><p>&#8220;keep you free from sin, till the sandman he comes&#8221;<br />
<em> (Enter SandMan — Metallica)</em></p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.msuiche.net/2008/03/18/new-attack-released-windows-has-been-vulnerable-for-8-years/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
