<?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>Skypher &#187; PoC</title>
	<atom:link href="http://skypher.com/index.php/category/security/poc/feed/" rel="self" type="application/rss+xml" />
	<link>http://skypher.com</link>
	<description>The blog for absolutely nothing!</description>
	<lastBuildDate>Sat, 25 Feb 2012 11:27:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Bypassing Export address table Address Filter (EAF)</title>
		<link>http://skypher.com/index.php/2010/11/17/bypassing-eaf/</link>
		<comments>http://skypher.com/index.php/2010/11/17/bypassing-eaf/#comments</comments>
		<pubDate>Wed, 17 Nov 2010 20:46:48 +0000</pubDate>
		<dc:creator>SkyLined</dc:creator>
				<category><![CDATA[Assembler]]></category>
		<category><![CDATA[PoC]]></category>
		<category><![CDATA[Programming Languages]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Shellcode]]></category>

		<guid isPermaLink="false">http://skypher.com/?p=605</guid>
		<description><![CDATA[<br />
<b>Warning</b>:  preg_split() [<a href='function.preg-split'>function.preg-split</a>]: Compilation failed: lookbehind assertion is not fixed length at offset 14 in <b>/home/c3682jgn/domains/skypher.com/public_html/wp-content/themes/braille/options/plugins.php</b> on line <b>77</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/c3682jgn/domains/skypher.com/public_html/wp-content/themes/braille/options/plugins.php</b> on line <b>78</b><br />
]]></description>
			<content:encoded><![CDATA[<p>(An unfinished version of this blog post was accidentally published last week. In case you got a hold of a copy: I&#8217;ve made only small modifications, so no need to re-read the entire post. However, I did not released the source of my PoC shellcode earlier, so you may want to <a href="https://code.google.com/p/w32-msgbox-shellcode/source/diff?path=/trunk/w32-msgbox-shellcode.asm&#038;format=side&#038;r=4">check if out</a>).</p>
<p>In early September this year Microsoft released their <a href="http://www.microsoft.com/downloads/en/details.aspx?FamilyID=c6f0a6ee-05ac-4eb6-acd0-362559fd2f04">Enhanced Mitigation Experience Toolkit v2.0</a> (EMET), which includes a new &#8220;pseudo&#8221;-mitigation called Export address table Address Filter (EAF). I decided to have a look at how this mitigation attempts to prevent exploits from succeeding and how an attacker might bypass it. For people that suffer from <a href="http://encyclopediadramatica.com/TL;DR">tl;dr</a> syndrome, I&#8217;ve put my conclusion up front:</p>
<p><strong>It is my conclusion that EAF should be effective at preventing most current shellcode from executing and therefore a useful mitigation. However, it is relatively simple to bypass. Proof of concept code to do this can be found <a href="https://code.google.com/p/w32-msgbox-shellcode/">here</a>. I expect that if EAF becomes a common mitigation, attackers will update their shellcodes to bypass it. I cannot think of any effective way in which EAF can be updated that would not be relatively simple to bypass as well.</strong></p>
<p>EAF works by setting a <a href="http://en.wikipedia.org/wiki/Breakpoint#Hardware_implementation">hardware breakpoint</a> on the <a href="http://www.microsoft.com/whdc/system/platform/firmware/PECOFF.mspx">export address tables</a> of the ntdll.dll and kernel32.dll modules in a process. When the breakpoint is triggered, EAF determines if the code that is trying to access the export address table is valid code for that process or malicious code injected into the process through an exploit. Most exploits will at some point inject and run shellcode into the target process. One of the first thing most shellcodes do is determine where certain functions are loaded in memory. This is commonly and easiest done by going through the list of loaded modules and reading their export address tables. When shellcode reads the export address tables of ntdll.dll and/or kernel32.dll, EAF detects the shellcode and terminates the process, preventing the exploit from running successfully.</p>
<p>I tested EAF with<a href="https://code.google.com/p/w32-msgbox-shellcode/">one of my shellcodes</a> that shows a message in a popup window when it runs successfully. <a href="http://code.google.com/hosting/search?q=SkyLined+shellcode+win32">All my shellcodes</a> scan the export address tables of loaded modules to find certain functions. This is a common technique used by almost all shellcodes that EAF is designed to detect. So, enabling EAF should prevent my shellcode, and most others, from working.</p>
<p>I use <a href="http://code.google.com/p/testival/">testival</a> to test my shellcode because it makes things easy to automate and I can copy+paste the output into this blog to show you what is going on. When my shellcode is run, it shows a popup dialog box and then triggers an int3 debugger breakpoint. Here&#8217;s the output of w32-testival.exe for a successful run of my shellcode:<br />
<code><br />
C:\Dev\Shellcode\w32-msgbox-shellcode&gt;w32-testival [$]=ascii:w32-msgbox-shellcode.bin eip=$ --verbose --eh --eh<br />
Allocating 0x1000 bytes of memory... ok. (address: 0x00030000)<br />
Setting data and registers:<br />
  [0x00030000]              = 8C bytes of data.<br />
  eax                       = 0xDEADBEEF (default)<br />
  ecx                       = 0xDEADBEEF (default)<br />
  edx                       = 0xDEADBEEF (default)<br />
  ebx                       = 0xDEADBEEF (default)<br />
  esp                       = ??? (unmodified)<br />
  ebp                       = 0xDEADBEEF (default)<br />
  esi                       = 0xDEADBEEF (default)<br />
  edi                       = 0xDEADBEEF (default)<br />
  eip                       = 0x00030000 ($)<br />
Registering Structured Exception Handler (SEH)...ok.<br />
Registering Vectored Exception Handler (VEH)...ok.<br />
Executing shellcode by jumping to 0x00030000...First chance debugger breakpoint exception at 0x0003008B.<br />
Second chance debugger breakpoint exception at 0x0003008B.<br />
&nbsp;<br />
C:\Dev\Shellcode\w32-msgbox-shellcode&gt;<br />
&nbsp;<br />
</code><br />
Of course, you cannot see the popup dialog box in this output, but you can see that the int3 debugger breakpoint at the end of the shellcode was executed. This means that it ran successfully.</p>
<p>After enabling EAF I tried executing the shellcode again and found that it still worked. So either EAF was not working or I was doing something wrong. I contacted my friends at MS who developed the tool and asked them to help me find out what was going on. They explained that in order to install the EAF mitigation, EMET needs to create a new thread in the process first, which means the mitigation is not enabled immediately on startup. To make sure that the mitigation is installed, you need to wait a bit before running your shellcode. So, I added a new switch to testival that allows it to wait a given number of milliseconds before executing the shellcode. Using this new feature, I tried again and this time EAF successfully blocked my shellcode, as you can see here:</p>
<p><code><br />
C:\Dev\Shellcode\w32-msgbox-shellcode&gt;w32-testival [$]=ascii:w32-msgbox-shellcode.bin eip=$ --verbose --eh --eh --delay=1000<br />
Allocating 0x1000 bytes of memory... ok. (address: 0x00030000)<br />
Setting data and registers:<br />
  [0x00030000]              = 8C bytes of data.<br />
  eax                       = 0xDEADBEEF (default)<br />
  ecx                       = 0xDEADBEEF (default)<br />
  edx                       = 0xDEADBEEF (default)<br />
  ebx                       = 0xDEADBEEF (default)<br />
  esp                       = ??? (unmodified)<br />
  ebp                       = 0xDEADBEEF (default)<br />
  esi                       = 0xDEADBEEF (default)<br />
  edi                       = 0xDEADBEEF (default)<br />
  eip                       = 0x00030000 ($)<br />
Registering Structured Exception Handler (SEH)...ok.<br />
Registering Vectored Exception Handler (VEH)...ok.<br />
Waiting for 1000 milliseconds...ok.<br />
Executing shellcode by jumping to 0x00030000...First chance single step exception at 0x00030054: A trace trap or other single-instruction mechanism signaled that one instruction has been executed.<br />
Second chance exception 0xC0000409 at 0x00030054.<br />
&nbsp;<br />
C:\Dev\Shellcode\w32-msgbox-shellcode&gt;<br />
&nbsp;<br />
</code><br />
This time the process is terminated early by a single step exception. This is because the EAF mitigation has detect that the shellcode accessed the export address table and decided to terminate the application rather than allow the shellcode to continue executing. This shows that EAF should be able to detect and protect against exploits that use most common shellcode.</p>
<p>I decided not to reverse EAF in order to find out how it works, but rather try to guess how it works and guess how it might by bypassed and try if it works. I assumed that EAF works by checking the location of the instruction that is accessing the export address table: if it is located inside the code segment of a loaded module, EAF assumes it is valid code and allowed it to continue. Otherwise, EAF assumes it is malicious code and terminates the process. If my hypothesis is correct, it might be possible to have the shellcode use a sequence of instructions inside the code segment of a loaded module that can be used to read memory. Because in this case, EAF will assumes that valid code is attempting to read the export address table rather than my shellcode and allow the code to continue.</p>
<p>To test this, I created a modified version of my shellcode that works like this:</p>
<ul>
<li>First, the shellcode finds out where ntdll.dll is loaded in memory as usual.</li>
<li>Second, it finds out where the code segment for ntdll.dll is located.</li>
<li>Third, it scans the code segment for a specific instruction sequence that can be used to read arbitrary memory.</li>
<li>Finally, it calls this instruction sequence to read the export address table, rather than read it directly.</li>
</ul>
<p>This is effectively the same as doing a ret-into-libc attack, something which EAF is not designed to block and this should therefore be able to bypass it. It turns out that the RtlGetCurrentPeb function has a useful instruction sequence. This sequence is static across Windows versions and SPs and exactly 4 bytes long, which means it is easy to write code to find it:<br />
<code><br />
 ntdll32!RtlGetCurrentPeb:<br />
     64a118000000    mov     eax,dword ptr fs:[00000018h]<br />
     8b4030          mov     eax,dword ptr [eax+30h]<br />
     c3              ret<br />
&nbsp;<br />
</code><br />
By setting EAX to the memory address you want to read (minus 0&#215;30) and calling the second instruction, you can read arbitrary memory into EAX.</p>
<p>The first time I tested my code, it was blocked by EAF while scanning for the instruction sequence in the code segment. It turns out that the export address table is located at the start of the code segment of ntdll.dll, so my scan for the instruction sequence was accessing it and triggering EAF.  Luckily, the RtlGetCurrentPeb function is not located anywhere near the start of the code segment in any version of ntdll.dll, so it was relatively easy to avoid this by skipping over the first 0&#215;1000 bytes of the code segment.</p>
<p>Here is the result for my modified shellcode, which is only 30 bytes larger than the original:<br />
<code><br />
C:\Dev\Shellcode\w32-msgbox-shellcode&gt;w32-testival [$]=ascii:w32-msgbox-shellcode-eaf.bin eip=$ --verbose --eh --eh --delay=1000<br />
Allocating 0x1000 bytes of memory... ok. (address: 0x00030000)<br />
Setting data and registers:<br />
  [0x00030000]              = AB bytes of data.<br />
  eax                       = 0xDEADBEEF (default)<br />
  ecx                       = 0xDEADBEEF (default)<br />
  edx                       = 0xDEADBEEF (default)<br />
  ebx                       = 0xDEADBEEF (default)<br />
  esp                       = ??? (unmodified)<br />
  ebp                       = 0xDEADBEEF (default)<br />
  esi                       = 0xDEADBEEF (default)<br />
  edi                       = 0xDEADBEEF (default)<br />
  eip                       = 0x00030000 ($)<br />
Registering Structured Exception Handler (SEH)...ok.<br />
Registering Vectored Exception Handler (VEH)...ok.<br />
Waiting for 1000 milliseconds...ok.<br />
Executing shellcode by jumping to 0x00030000...First chance single step exception at 0x76FBA045: A trace trap or other single-instruction mechanism signaled that one instruction has been executed.<br />
First chance single step exception at 0x76FAFFCE: A trace trap or other single-instruction mechanism signaled that one instruction has been executed.<br />
First chance single step exception at 0x76FAFFCE: A trace trap or other single-instruction mechanism signaled that one instruction has been executed.<br />
First chance single step exception at 0x76FAFFCE: A trace trap or other single-instruction mechanism signaled that one instruction has been executed.<br />
&lt;snip&gt;(Many more single step exceptions)&lt;snip&gt;<br />
First chance single step exception at 0x76FAFFCE: A trace trap or other single-instruction mechanism signaled that one instruction has been executed.<br />
First chance debugger breakpoint exception at 0x000300AA.<br />
Second chance debugger breakpoint exception at 0x000300AA.<br />
&nbsp;<br />
C:\Dev\Shellcode\w32-msgbox-shellcode&gt;<br />
&nbsp;<br />
</code><br />
Every time the export address table is accessed, the hardware breakpoint is triggered and EAF checks to see if shellcode is attempting to access it. This is why you are seeing so may first change single step exceptions. However, because I am using the instruction sequence in ntdll.dll to access the address table, EAF allows the code to continue. The shellcode runs successfully and the process terminates when the shellcode executes the int3 debugger breakpoint as before.</p>
<p>Have a look at <a href="https://code.google.com/p/w32-msgbox-shellcode/source/diff?path=/trunk/w32-msgbox-shellcode.asm&#038;format=side&#038;r=4">the changes</a> I made to my shellcode to make this work. They are relatively minor and it should be possible to apply this technique to any shellcode, which reduces the usefulness of EAF in the long run.</p>
<p>I thought about possibilities to prevent or detect this bypass.  Unfortunately, I could not think of anything that would be effective. Here are some of my ideas and why I think they won&#8217;t work:<br />
- EAF could check for this specific instruction sequence. However, shellcode could scan for other sequences in ntdll.dll (or even in other modules) that can be used to achieve the same.<br />
- EAF could &#8220;walk the stack&#8221; and check that all return addresses are valid. However, the shellcode could construct a ret-into-libc stack with only valid return addresses, where the first call reads the export address table and the next call modifies the return address for the third return address to point to the shellcode again.<br />
- EAF could set additional hardware breakpoints on structures that can be used to find the locations of modules, in an attempt to prevent the shellcode from finding an instruction sequence that it can use to read memory. However, there are a large number of ways in which the location of modules can be found and there are a <a href="http://en.wikipedia.org/wiki/X86_debug_register">limited number</a> of hardware breakpoints. There are not enough breakpoints available to protect all of locations that contain sensitive data.</p>
<p>I welcome your thoughts and ideas on this subject.</p>
]]></content:encoded>
			<wfw:commentRss>http://skypher.com/index.php/2010/11/17/bypassing-eaf/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Issue 23 &#8211; Oracle Java OBJECT tag &#8220;launchjnlp&#8221;/&#8221;docbase&#8221; property stack buffer overflow</title>
		<link>http://skypher.com/index.php/2010/10/13/issue-2-oracle-java-object-launchjnlp-docbase/</link>
		<comments>http://skypher.com/index.php/2010/10/13/issue-2-oracle-java-object-launchjnlp-docbase/#comments</comments>
		<pubDate>Wed, 13 Oct 2010 09:34:09 +0000</pubDate>
		<dc:creator>SkyLined</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[PoC]]></category>
		<category><![CDATA[Repro]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://skypher.com/?p=574</guid>
		<description><![CDATA[<br />
<b>Warning</b>:  preg_split() [<a href='function.preg-split'>function.preg-split</a>]: Compilation failed: lookbehind assertion is not fixed length at offset 14 in <b>/home/c3682jgn/domains/skypher.com/public_html/wp-content/themes/braille/options/plugins.php</b> on line <b>77</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/c3682jgn/domains/skypher.com/public_html/wp-content/themes/braille/options/plugins.php</b> on line <b>78</b><br />
]]></description>
			<content:encoded><![CDATA[<p>About a month and a half ago, <a href="http://www.reversemode.com/index.php?option=com_content&#038;task=view&#038;id=69&#038;Itemid=1">information about an 0-day vulnerability</a> in the <a href="http://www.apple.com/quicktime/">Apple QuickTime</a> plugin was published. It reminded of a project I had planned to implement for a while (since 2004 to be precise): a fuzzer that extracted information about <a href="http://en.wikipedia.org/wiki/COM_object">COM objects</a> installed on a system from the <a href="http://en.wikipedia.org/wiki/Windows_registry">registry</a> and scanned the <a href="http://en.wikipedia.org/wiki/Executable">binaries</a> associated with each COM object for strings. The fuzzer would use the collected information to try to instantiate objects and attempt to fuzz it using the strings as properties, methods and &#8220;<a href="http://en.wikipedia.org/wiki/Magic_number_(programming)">magic</a>&#8221; argument values. As soon as I had hacked something together, it found a simple <a href="http://en.wikipedia.org/wiki/Executable">buffer overflow</a> in Oracle <a href="http://java.com">Java</a> 6 Update 21.</p>
<p>The buffer overflow allows easy control over <a href="http://en.wikipedia.org/wiki/Instruction_pointer">EIP</a> and creating a working <a href="http://en.wikipedia.org/wiki/Exploit_(computer_security)">exploit</a> for targets without <a href="http://en.wikipedia.org/wiki/Data_Execution_Prevention">DEP</a> is as easy as copy+pasting a <a href="http://en.wikipedia.org/wiki/Heap_spray">heap spray</a> into the repro file.</p>
<p>I reported the issue to Oracle, who were <a href="http://www.zerodayinitiative.com/advisories/ZDI-10-206/">already aware</a> of the issue because it had also been reported to them by Stephen Fewer of <a href="http://www.harmonysecurity.com">Harmony Security</a> through <a href="http://www.zerodayinitiative.com/">ZDI</a>. Oracle has release a patch for this issue, which is available <a href="http://www.oracle.com/technetwork/topics/security/javacpuoct2010-176258.html">here</a>.</p>
<p>More details can be found <a href="http://code.google.com/p/skylined/issues/detail?id=23">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://skypher.com/index.php/2010/10/13/issue-2-oracle-java-object-launchjnlp-docbase/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ultra-Edit buffer overflow in GNU Aspell</title>
		<link>http://skypher.com/index.php/2010/07/16/ultra-edit-buffer-overflow-in-gnu-aspell/</link>
		<comments>http://skypher.com/index.php/2010/07/16/ultra-edit-buffer-overflow-in-gnu-aspell/#comments</comments>
		<pubDate>Fri, 16 Jul 2010 08:26:23 +0000</pubDate>
		<dc:creator>SkyLined</dc:creator>
				<category><![CDATA[PoC]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://skypher.com/?p=476</guid>
		<description><![CDATA[<br />
<b>Warning</b>:  preg_split() [<a href='function.preg-split'>function.preg-split</a>]: Compilation failed: lookbehind assertion is not fixed length at offset 14 in <b>/home/c3682jgn/domains/skypher.com/public_html/wp-content/themes/braille/options/plugins.php</b> on line <b>77</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/c3682jgn/domains/skypher.com/public_html/wp-content/themes/braille/options/plugins.php</b> on line <b>78</b><br />
]]></description>
			<content:encoded><![CDATA[<p>While looking at logs from my fuzzers, I found a bug in <a href="http://www.ultraedit.com/">UltraEdit</a> that triggered when I loaded a file with a long string of alphabetic characters. A bit of debugging indicated that UltraEdit was using a version of <a href="http://aspell.net">GNU Aspell</a> that had a buffer overflow when handling long words. UltraEdit has been using Aspell since version 11<sup><a href="http://en.wikipedia.org/wiki/UltraEdit">[1]</a></sup>. I&#8217;ve not looked at exploitability, but the application seems to detect the overflow and terminate cleanly, so they may be saved by mitigations. IDM, the creators of UltraEdit, have since released a new version that fixes the issue.</p>
<p>Case history: <a href="http://code.google.com/p/skylined/issues/detail?id=2">http://code.google.com/p/skylined/issues/detail?id=2</a></p>
]]></content:encoded>
			<wfw:commentRss>http://skypher.com/index.php/2010/07/16/ultra-edit-buffer-overflow-in-gnu-aspell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apple QuickTime memory corruption when loading BMP file</title>
		<link>http://skypher.com/index.php/2010/04/12/apple-quicktime-memory-corruption-when-loading-bmp-file/</link>
		<comments>http://skypher.com/index.php/2010/04/12/apple-quicktime-memory-corruption-when-loading-bmp-file/#comments</comments>
		<pubDate>Mon, 12 Apr 2010 11:53:01 +0000</pubDate>
		<dc:creator>SkyLined</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Chrome]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[Opera]]></category>
		<category><![CDATA[PoC]]></category>
		<category><![CDATA[Safari]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://skypher.com/?p=455</guid>
		<description><![CDATA[<br />
<b>Warning</b>:  preg_split() [<a href='function.preg-split'>function.preg-split</a>]: Compilation failed: lookbehind assertion is not fixed length at offset 14 in <b>/home/c3682jgn/domains/skypher.com/public_html/wp-content/themes/braille/options/plugins.php</b> on line <b>77</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/c3682jgn/domains/skypher.com/public_html/wp-content/themes/braille/options/plugins.php</b> on line <b>78</b><br />
]]></description>
			<content:encoded><![CDATA[<p>From <a href="http://support.apple.com/kb/HT4104">http://support.apple.com/kb/HT4104</a>:<br />
CVE-ID: CVE-2010-0536</p>
<p>Impact: Opening a maliciously crafted BMP image may lead to an unexpected application termination or arbitrary code execution</p>
<p>Description: A memory corruption issue exists in the handling of BMP images. Opening a maliciously crafted BMP image may lead to an unexpected application termination or arbitrary code execution. This update addresses the issue by performing additional validation of BMP images.</p>
<p>More details here:<br />
<a href="http://code.google.com/p/skylined/issues/detail?id=11">http://code.google.com/p/skylined/issues/detail?id=11</a></p>
]]></content:encoded>
			<wfw:commentRss>http://skypher.com/index.php/2010/04/12/apple-quicktime-memory-corruption-when-loading-bmp-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MSIE 9 regular expression related crashes</title>
		<link>http://skypher.com/index.php/2010/04/12/msie-9-regular-expression-related-crashes/</link>
		<comments>http://skypher.com/index.php/2010/04/12/msie-9-regular-expression-related-crashes/#comments</comments>
		<pubDate>Mon, 12 Apr 2010 11:32:07 +0000</pubDate>
		<dc:creator>SkyLined</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PoC]]></category>

		<guid isPermaLink="false">http://skypher.com/?p=446</guid>
		<description><![CDATA[<br />
<b>Warning</b>:  preg_split() [<a href='function.preg-split'>function.preg-split</a>]: Compilation failed: lookbehind assertion is not fixed length at offset 14 in <b>/home/c3682jgn/domains/skypher.com/public_html/wp-content/themes/braille/options/plugins.php</b> on line <b>77</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/c3682jgn/domains/skypher.com/public_html/wp-content/themes/braille/options/plugins.php</b> on line <b>78</b><br />
]]></description>
			<content:encoded><![CDATA[<p>The following code snippets will crash MSIE 9 platform review. Because this is not a stable release, but a preview of a product in development, it is expected to have a few bugs here and there &#8211; so don&#8217;t go browsing the web with it <img src='http://skypher.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
<p><code>&lt;SCRIPT&gt;/+&lt;/SCRIPT&gt;<br />
&lt;SCRIPT&gt;/(&lt;/SCRIPT&gt;<br />
&lt;SCRIPT&gt;/[B-A]/;&lt;/SCRIPT&gt;</code></p>
<p>More details here: <a href="http://code.google.com/p/skylined/issues/detail?id=13">http://code.google.com/p/skylined/issues/detail?id=13</a></p>
]]></content:encoded>
			<wfw:commentRss>http://skypher.com/index.php/2010/04/12/msie-9-regular-expression-related-crashes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Internet Exploiter 2 &#8211; bypassing DEP</title>
		<link>http://skypher.com/index.php/2010/03/01/internet-exploiter-2-dep/</link>
		<comments>http://skypher.com/index.php/2010/03/01/internet-exploiter-2-dep/#comments</comments>
		<pubDate>Mon, 01 Mar 2010 15:22:53 +0000</pubDate>
		<dc:creator>SkyLined</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[PoC]]></category>
		<category><![CDATA[Programming Languages]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://skypher.com/?p=412</guid>
		<description><![CDATA[<br />
<b>Warning</b>:  preg_split() [<a href='function.preg-split'>function.preg-split</a>]: Compilation failed: lookbehind assertion is not fixed length at offset 14 in <b>/home/c3682jgn/domains/skypher.com/public_html/wp-content/themes/braille/options/plugins.php</b> on line <b>77</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/c3682jgn/domains/skypher.com/public_html/wp-content/themes/braille/options/plugins.php</b> on line <b>78</b><br />
]]></description>
			<content:encoded><![CDATA[<p>In 2005 I released <a href="http://skypher.com/wiki/index.php/Www.edup.tudelft.nl/~bjwever/exploits/InternetExploiter2.zip">Internet Exploiter 2</a>, which helped make <a href="http://en.wikipedia.org/wiki/Heap_spraying">heap spraying</a> popular in browser exploits. The exploit I released would not work if you had <a href="http://en.wikipedia.org/wiki/Data_Execution_Prevention">DEP</a> turned on for <a href="http://en.wikipedia.org/wiki/MSIE">MSIE</a>. However, I also created a version of the exploit that used <a href="http://en.wikipedia.org/wiki/Ret-into-libc">ret-into-libc</a> to bypass DEP, which I never released until today.</p>
<p>I am releasing this because I feel it helps explain why <a href="http://en.wikipedia.org/wiki/Address_space_layout_randomization">ASLR</a>+DEP are not a mitigation to put a lot of faith in, especially on <a href="http://en.wikipedia.org/wiki/X86">x86</a> platforms. 32-bits does not provide sufficient <a href="http://en.wikipedia.org/wiki/Address_space">address space</a> to randomize memory to the point where guessing addresses becomes impractical, considering heap spraying can allow an attacker to allocate memory across a considerable chunk of the address space and in a highly predictable location. The code in this exploit shows how to abuse this to perform a ret-into-libc attack when you can predict or, through <a href="http://en.wikipedia.org/wiki/Information_leakage">information leakage</a>, determine the location of modules (<a href="http://en.wikipedia.org/wiki/Executable">exe</a>, <a href="http://en.wikipedia.org/wiki/Dynamic-link_library">dll</a>) in the process&#8217; memory.</p>
<p>The source code, which has inline documentation, can be found <a href="http://skypher.com/SkyLined/download/exploits/Internet%20Exploiter2-DEP.zip">here</a>.</p>
<p><B>***UPDATE***</B> It appears that some people need a little more detail to figure out what is going on:<br />
<UL><br />
    <LI>this exploit targets <A href="http://skypher.com/wiki/index.php?title=Www.edup.tudelft.nl/~bjwever/advisory_msie_R6025.html.php">a bug that was already fixed in MSIE 6.0 in 2005</A>,</LI><br />
    <LI>This exploit <a href="http://blogs.zdnet.com/security/?p=5573">does not defeat ASLR</a>, it only shows how to defeat DEP if ASLR is disabled or if you can bypass it.</LI><br />
</UL></p>
]]></content:encoded>
			<wfw:commentRss>http://skypher.com/index.php/2010/03/01/internet-exploiter-2-dep/feed/</wfw:commentRss>
		<slash:comments>14</slash:comments>
		</item>
		<item>
		<title>ALPHA3 released</title>
		<link>http://skypher.com/index.php/2010/01/10/alpha3-released/</link>
		<comments>http://skypher.com/index.php/2010/01/10/alpha3-released/#comments</comments>
		<pubDate>Sun, 10 Jan 2010 13:33:53 +0000</pubDate>
		<dc:creator>SkyLined</dc:creator>
				<category><![CDATA[Assembler]]></category>
		<category><![CDATA[PoC]]></category>
		<category><![CDATA[Programming Languages]]></category>
		<category><![CDATA[Python]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Tools]]></category>

		<guid isPermaLink="false">http://skypher.com/?p=307</guid>
		<description><![CDATA[<br />
<b>Warning</b>:  preg_split() [<a href='function.preg-split'>function.preg-split</a>]: Compilation failed: lookbehind assertion is not fixed length at offset 14 in <b>/home/c3682jgn/domains/skypher.com/public_html/wp-content/themes/braille/options/plugins.php</b> on line <b>77</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/c3682jgn/domains/skypher.com/public_html/wp-content/themes/braille/options/plugins.php</b> on line <b>78</b><br />
]]></description>
			<content:encoded><![CDATA[<p>I realized that if I would wait until I had fully documented everything in ALPHA3, it would probably never get released. So, without further ado, documentation or explanations:</p>
<ul>
<li><a href="http://code.google.com/p/alpha3/">Project page</a></li>
<li><a href="http://alpha3.googlecode.com/svn/trunk/alpha3-read-only">SVN repository</a> (read-only)</li>
<li><a href="http://alpha3.googlecode.com/files/ALPHA3.zip">Download</a></li>
</ul>
<p>It has been developed and tested on Windows, but it should not be to hard to get it to run on other platforms. If you are having difficulty on other platforms and manage to create patches to fix this, please let me know and/or become a commiter to the project!</p>
<p>PS. My appologees for my lack of 1337 Python coding skills to whomever gets to port it to Metasploit &#8211; I did this project in Python while I was learning the language <img src='http://skypher.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://skypher.com/index.php/2010/01/10/alpha3-released/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>MS09-014: EMBED element memory corruption</title>
		<link>http://skypher.com/index.php/2009/04/19/ms09-014-embed-element-memory-corruption/</link>
		<comments>http://skypher.com/index.php/2009/04/19/ms09-014-embed-element-memory-corruption/#comments</comments>
		<pubDate>Sun, 19 Apr 2009 13:05:21 +0000</pubDate>
		<dc:creator>SkyLined</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[PoC]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[embed]]></category>
		<category><![CDATA[memory corruption]]></category>
		<category><![CDATA[MS09-14]]></category>
		<category><![CDATA[re-entrancy]]></category>
		<category><![CDATA[repro]]></category>
		<category><![CDATA[Vulnerability]]></category>

		<guid isPermaLink="false">http://skypher.com/?p=147</guid>
		<description><![CDATA[<br />
<b>Warning</b>:  preg_split() [<a href='function.preg-split'>function.preg-split</a>]: Compilation failed: lookbehind assertion is not fixed length at offset 14 in <b>/home/c3682jgn/domains/skypher.com/public_html/wp-content/themes/braille/options/plugins.php</b> on line <b>77</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/c3682jgn/domains/skypher.com/public_html/wp-content/themes/braille/options/plugins.php</b> on line <b>78</b><br />
]]></description>
			<content:encoded><![CDATA[<p>Microsoft has just <a href="http://www.microsoft.com/technet/security/Bulletin/MS09-014.mspx">released a fix</a> for an issue I reported to them on December 4th, 2008. A simple repro can be found <a href="http://skypher.com/SkyLined/Repro/MSIE/EMBED%20memory%20corruption/repro3.html">here</a>.<br />
Though I did not investigate the issue, it appears to be similar to <a href="http://skypher.com/wiki/index.php/Www.edup.tudelft.nl/~bjwever/advisory_msie_R6025.html.php">MS05-20</a>: it is triggered by having JavaScript running in one window create and delete EMBED elements with existing mime-types in another window in rapid succession. Because each window is running in its own thread in MSIE, the code must be thread-safe for two windows to interact correctly. This issues appears to be a re-entrancy problem that causes one thread to access data after that data was freed by another thread.</p>
]]></content:encoded>
			<wfw:commentRss>http://skypher.com/index.php/2009/04/19/ms09-014-embed-element-memory-corruption/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MSIE screen[&quot;&quot;] NULL ptr DoS details</title>
		<link>http://skypher.com/index.php/2009/01/07/msie-screen-null-ptr-dos-details/</link>
		<comments>http://skypher.com/index.php/2009/01/07/msie-screen-null-ptr-dos-details/#comments</comments>
		<pubDate>Wed, 07 Jan 2009 14:00:09 +0000</pubDate>
		<dc:creator>SkyLined</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Internet Explorer]]></category>
		<category><![CDATA[PoC]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[MSIE]]></category>
		<category><![CDATA[NULL ptr]]></category>

		<guid isPermaLink="false">http://skypher.com/?p=101</guid>
		<description><![CDATA[<br />
<b>Warning</b>:  preg_split() [<a href='function.preg-split'>function.preg-split</a>]: Compilation failed: lookbehind assertion is not fixed length at offset 14 in <b>/home/c3682jgn/domains/skypher.com/public_html/wp-content/themes/braille/options/plugins.php</b> on line <b>77</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/c3682jgn/domains/skypher.com/public_html/wp-content/themes/braille/options/plugins.php</b> on line <b>78</b><br />
]]></description>
			<content:encoded><![CDATA[<p>MSIE can be made to crash with a NULL ptr Read AV by executing a very small piece of JavaScript. This affects MSIE 6.0, 7.0 and 8.0 beta2. It should be fixed in 8.0 rc1.</p>
<p>The following HTML triggers the issue:<br />
<CODE><br />
&lt;BODY onload=screen[""]&gt;<br />
&nbsp;<br />
</CODE></p>
<p>I am amazed that a bug that is so simple to trigger has apparently gone unnoticed for years.</p>
<p>Repro <a title="Repro screen[&quot;&quot;]" href="http://skypher.com/SkyLined/Repro/MSIE/MSIE%206.0,7.0,8.0%20-%20AVR%5B0%5D@mshtml!HashStringWordCi+0x1d/repro.html" target="_blank">here</a>.<br />
List of software vulnerabilities <a title="List of software vulnerabilities" href="http://skypher.com/wiki/index.php?title=List_of_software_vulnerabilities" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://skypher.com/index.php/2009/01/07/msie-screen-null-ptr-dos-details/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Safari arguments integer overflow PoC (CVE-2008-2303)</title>
		<link>http://skypher.com/index.php/2009/01/05/safari-arguments-integer-overflow-poc-cve-2008-2303/</link>
		<comments>http://skypher.com/index.php/2009/01/05/safari-arguments-integer-overflow-poc-cve-2008-2303/#comments</comments>
		<pubDate>Mon, 05 Jan 2009 20:03:12 +0000</pubDate>
		<dc:creator>SkyLined</dc:creator>
				<category><![CDATA[ASCII Art]]></category>
		<category><![CDATA[Browsers]]></category>
		<category><![CDATA[PoC]]></category>
		<category><![CDATA[Safari]]></category>
		<category><![CDATA[exploit]]></category>
		<category><![CDATA[integer overflow]]></category>

		<guid isPermaLink="false">http://skypher.com/?p=91</guid>
		<description><![CDATA[<br />
<b>Warning</b>:  preg_split() [<a href='function.preg-split'>function.preg-split</a>]: Compilation failed: lookbehind assertion is not fixed length at offset 14 in <b>/home/c3682jgn/domains/skypher.com/public_html/wp-content/themes/braille/options/plugins.php</b> on line <b>77</b><br />
<br />
<b>Warning</b>:  Invalid argument supplied for foreach() in <b>/home/c3682jgn/domains/skypher.com/public_html/wp-content/themes/braille/options/plugins.php</b> on line <b>78</b><br />
]]></description>
			<content:encoded><![CDATA[<p>CVE-2008-2303 covers an integer overflow in the handling of indices in the &#8220;arguments&#8221; array in Apple Safari that affects iPhone, iPod and PC (Mac and Windows). It was fixed in Safari 3.2 for iPhone and iPod in July and for PC in November.<br />
More details <a title="Apple website" href="http://support.apple.com/kb/HT3298" target="_blank">here</a>. <br />
Repro <a title="Repro" href="http://skypher.com/SkyLined/Repro/Safari/arguments%5B0x800000000%5D/repro.html">here</a>.</p>
<p>I have also created proof of concept code that shows potential exploitability and demonstrates how to use heap-spraying in Safari. AFAIK this is the first use of heap spraying in Safari, but I may be wrong. Heap spraying in Safari is not that different from other browsers, just backwards <img src='http://skypher.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  The code can be found <a title="Safari arguments array index integer overflow PoC" href="http://skypher.com/SkyLined/Repro/Safari/arguments%5B0x800000000%5D/poc.html" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://skypher.com/index.php/2009/01/05/safari-arguments-integer-overflow-poc-cve-2008-2303/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

