<?xml version="1.0"?>
<rss version="2.0">
    <channel>
        <title>OpenRCE: Blog</title>
        <link>http://www.openrce.org/rss/feeds/blog</link>
        <description>OpenRCE: The Open Reverse Code Engineering Community</description>
                <item>
            <title>Windows Kernel Exploitation Papers</title>
                            <pubDate>Wed, 11 Jun 2008 16:04:30 -0500</pubDate>
                                        <link>https://www.openrce.org/blog/view/1159/Windows_Kernel_Exploitation_Papers</link>
                                        <author>jms &lt;email-suppressed@example.com&gt;</author>
                                                    <description>I can't remember where all I posted about this, but Kostya and I published a couple of papers today and you can find them &lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://immunityinc.com/resources-papers.shtml&quot;&gt;HERE&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
June 11, 2008: Exploiting Kernel Pool Overflows (Kostya Kortchinsky)&amp;nbsp;&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
June 11, 2008: The I2OMGMT Driver Impersonation Attack (Justin Seitz) &lt;br /&gt;
&lt;br /&gt;
Hope you enjoy!</description>
                    </item>
                <item>
            <title>Binary Protocol Dissector</title>
                            <pubDate>Mon, 10 Dec 2007 12:58:47 -0600</pubDate>
                                        <link>https://www.openrce.org/blog/view/989/Binary_Protocol_Dissector</link>
                                        <author>jms &lt;email-suppressed@example.com&gt;</author>
                                                    <description>Well today is the last day for the ID contest, and I am interested to see what kind of competition there is out there! Unfortunately, like a dummy, I wasn't regression testing my plugin over the past few releases. Although it was done months ago, it doesn't work now :(&lt;br /&gt;
&lt;br /&gt;
Soooo.... I thought I might as well share what it is and what it does, and if by some Christmas miracle I get it working by midnight tonight it will be submitted.&lt;br /&gt;
&lt;br /&gt;
The whole idea of the plugin is to be able to automate the task of reverse engineering a protocol so that you can easily translate it's structure to a block-based fuzzer (like Sulley or SPIKE).&lt;br /&gt;
&lt;br /&gt;
Essentially, it has two components: mike.py and boo.py (for Monsters Inc. fans of course :))&lt;br /&gt;
&lt;br /&gt;
mike.py - this hooks socket calls, and when a packet arrives it begins single-stepping and trapping all state information as the packet traverses through the process space. Using some simple heuristics, it is able to determine when the packet length and packet payload is being used by the process. A lot of logic was built in to output GDL graphs of all the information it has trapped.&amp;nbsp;&amp;nbsp;Using a threshold for each iteration it is able to graph deeper and deeper into the protocol. &lt;br /&gt;
&lt;br /&gt;
boo.py - this is responsible for sending the packets themselves, and is to be extended so that when mike reports a hit on the packet payload (during a CMP instruction for example), boo will adjust its test packet to try to meet the protocol criteria.&lt;br /&gt;
&lt;br /&gt;
So, since it's busted and I can't get some of the small niceties cleaned up I figured the minimum is to post some graphs.&lt;br /&gt;
&lt;br /&gt;
Here is a graph of the first iteration against the Perforce source code repository server.&lt;br /&gt;
&lt;br /&gt;
&lt;img src=&quot;http://bughunter.ca/openrce/pic1.png&quot; border=0 align=&quot;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
A bit anti-climactic isn't it! So let's zoom in a bit further:&lt;br /&gt;
&lt;br /&gt;
&lt;img src=&quot;http://bughunter.ca/openrce/pic2.png&quot; border=0 align=&quot;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
Now you can see some more information! Yay! (if only I could get this bloody thing working again...ok I will stop complaining). Let's see what our second iteration looks like from a high level:&lt;br /&gt;
&lt;br /&gt;
&lt;img src=&quot;http://bughunter.ca/openrce/pic3.png&quot; border=0 align=&quot;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
You can see the blocks that were covered previously are greyed out, so that you can drill down into your newly covered area:&lt;br /&gt;
&lt;br /&gt;
&lt;img src=&quot;http://bughunter.ca/openrce/pic4.png&quot; border=0 align=&quot;&quot;&gt;&lt;br /&gt;
&lt;br /&gt;
So yeah, I will repost if I get it working, but that's it! A &lt;br /&gt;
</description>
                    </item>
                <item>
            <title>ioctlizer 0.1 Beta Release</title>
                            <pubDate>Fri, 07 Dec 2007 15:45:30 -0600</pubDate>
                                        <link>https://www.openrce.org/blog/view/986/ioctlizer_0.1_Beta_Release</link>
                                        <author>jms &lt;email-suppressed@example.com&gt;</author>
                                                    <description>Hey All,&lt;br /&gt;
&lt;br /&gt;
I have released a quick BETA version of my Win32 IOCTL fuzzer. A quick&lt;br /&gt;
overview:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ioctlizer is an attempt at fuzzing Windows IOCTL requests. It is split&lt;br /&gt;
into two separate tools, ioctltrap.py and ioctlizer.py.&lt;br /&gt;
&lt;br /&gt;
ioctltrap - used to spawn or attach to a user-mode process that&lt;br /&gt;
interacts with a device (i.e. wireshark.exe). By hooking&lt;br /&gt;
the Win32 system calls that are required to interact with a device&lt;br /&gt;
driver, it builds a global test case list to be used&lt;br /&gt;
when fuzzing the device(s).&lt;br /&gt;
&lt;br /&gt;
ioctlizer.py - used to import the trapped IOCTL/Read/Write test cases,&lt;br /&gt;
and begin mutating them. Easily extended mutators,&lt;br /&gt;
as only the most basic of mutations is included in the fuzzer itself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A usage example is available in the source package's README. The tool is&lt;br /&gt;
available from Google Code:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://code.google.com/p/ioctlizer/downloads/list&quot;&gt;http://code.google.com/p/ioctlizer/downloads/list&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Send me some feedback, bugs, etc.&lt;br /&gt;
&lt;br /&gt;
JS&lt;br /&gt;
jms@bughunter.ca&lt;br /&gt;
&lt;br /&gt;
ps. Please be patient as I get everything checked into SVN, and do some&lt;br /&gt;
wiki pages.&lt;br /&gt;
</description>
                    </item>
                <item>
            <title>Build Your Own Botnet with RDP</title>
                            <pubDate>Mon, 03 Dec 2007 12:03:20 -0600</pubDate>
                                        <link>https://www.openrce.org/blog/view/981/Build_Your_Own_Botnet_with_RDP</link>
                                        <author>jms &lt;email-suppressed@example.com&gt;</author>
                                                    <description>This might not be a novel thing, but I couldn't find any references to someone who had taken a look at this already. If there is prior art, then please send it to me!&lt;br /&gt;
&lt;br /&gt;
So one day I was helping out a friend, let's call him Bob, and he was having a problem with a remote Windows machine. After watching him fire up his remote desktop client and enabling the sharing of &amp;quot;Disk Drives&amp;quot; (so that he could pull a log off the remote machine), I wondered what the implication was of actually setting up a file share between the two machines.&lt;br /&gt;
&lt;br /&gt;
The question I had was: &amp;quot;What if someone owned the remote machine? What can they do from there?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
The first step was to see how the operating system reacts to a user connecting with this option enabled. The only noticeable difference between enabling the share and not enabling it was the &amp;quot;rdpclip.exe&amp;quot; process gets fired up when a share has been enabled. Let's start there.&lt;br /&gt;
&lt;br /&gt;
I first attached to rdpclip.exe with a debugger, and trapped the CreateFileW() call exported from kernel32.dll. You can learn a lot about an application by just trapping this call, and monitoring the handles it returns (handles can be used for IOCTLs, files, named pipes, etc.). I then right clicked on a file on the remote machine's desktop, chose &amp;quot;Copy&amp;quot; and low and behold I got a hit in my hook.&lt;br /&gt;
&lt;br /&gt;
&lt;code&gt;&lt;br /&gt;
&lt;br /&gt;
0007EEBC&amp;nbsp;&amp;nbsp; 7C835B74&amp;nbsp;&amp;nbsp;t[ƒ|&amp;nbsp;&amp;nbsp;/CALL to CreateFileW from kernel32.7C835B6F&lt;br /&gt;
0007EEC0&amp;nbsp;&amp;nbsp; 010100D2&amp;nbsp;&amp;nbsp;&Ograve;.&amp;nbsp;&amp;nbsp;|FileName = &amp;quot;\\tsclient\C\DOCUME~1\Owner\LOCALS~1\Temp\_TS7.tmp\_TS1.tmp&amp;quot;&lt;br /&gt;
0007EEC4&amp;nbsp;&amp;nbsp; 80000000&amp;nbsp;&amp;nbsp;...€&amp;nbsp;&amp;nbsp;|Access = GENERIC_READ&lt;br /&gt;
0007EEC8&amp;nbsp;&amp;nbsp; 00000000&amp;nbsp;&amp;nbsp;....&amp;nbsp;&amp;nbsp;|ShareMode = 0&lt;br /&gt;
0007EECC&amp;nbsp;&amp;nbsp; 00000000&amp;nbsp;&amp;nbsp;....&amp;nbsp;&amp;nbsp;|pSecurity = NULL&lt;br /&gt;
0007EED0&amp;nbsp;&amp;nbsp; 00000001|Mode = CREATE_NEW&lt;br /&gt;
0007EED4&amp;nbsp;&amp;nbsp; 00000080&amp;nbsp;&amp;nbsp;€...&amp;nbsp;&amp;nbsp;|Attributes = NORMAL&lt;br /&gt;
0007EED8&amp;nbsp;&amp;nbsp; 00000000&amp;nbsp;&amp;nbsp;....&amp;nbsp;&amp;nbsp;\hTemplateFile = NULL&lt;br /&gt;
&lt;br /&gt;
&lt;/code&gt;&lt;br /&gt;
&lt;br /&gt;
Hmmmm...what is &amp;quot;\\tsclient\&amp;quot;? On the remote machine, if you enter that path into Windows explorer, you will see ALL of the disk drives on the remote client machine. Not only that, you are able to write to the remote drive with the permissions of the logged in user. The other interesting thing is that it rides across on the established remote desktop connection, so it won't trip a firewall on the client-side when you connect back.&lt;br /&gt;
&lt;br /&gt;
So what are some of the things we can do with this?&lt;br /&gt;
&lt;br /&gt;
If the remote user (the RDP client) is &amp;quot;Administrator&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
a) Overwrite anything in C:\WINDOWS\system32\ say the next time they fire up calc.exe they get compromised.&lt;br /&gt;
b) You could search the remote machine for vulnerable versions of say Adobe Acrobat, and then replace all of the pdf's on the filesystem with malformed files.&lt;br /&gt;
&lt;br /&gt;
If the remote user is a limited account:&lt;br /&gt;
&lt;br /&gt;
a) Parse all of their shortcuts on the Desktop, replace them to point to a binary that you push across the share.&lt;br /&gt;
c) Use the b) step above to change all of their &amp;quot;My Documents&amp;quot; to contain bad files that will ultimately compromise the system.&lt;br /&gt;
&lt;br /&gt;
All of these things can easily be automated with CANVAS or other penetration testing frameworks, or even a Python interpreter and PyDbg for that matter can do this easily. &lt;br /&gt;
&lt;br /&gt;
This is particularly troubling, if an attacker compromises a Windows server machine, they can lie in wait for an administrator to login and then ride back into the local administrators network without them really knowing.&lt;br /&gt;
&lt;br /&gt;
So how can you build a botnet using this information?&lt;br /&gt;
&lt;br /&gt;
Well, Google hackers for some time have known about people storing RDP connection files on a public webserver (bad idea). But we can leverage this; all you need to do is post a link to RDP connection file that points to a VMWare'd Windows machine that has the remote desktop service running. Everytime someone connects to your machine (presumably to steal stuff from you), you are able to ride back the channel to ultimately drop whatever binary you want on their machine.&amp;nbsp;&amp;nbsp;You could also easily social engineer someone into connecting to your machine, because psychologically if I am giving you access to my Windows server, I am showing you that I have some implied trust in you. It puts me in a position of vulnerability, and people will generally accept that &lt;b&gt;they&lt;/b&gt; are the ones who hold the power, not really thinking about the implications of accessing my trusted environment.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Again maybe this is a lame hack, but HD Moore's (and Valsmith) recent works on hacking without exploits shows that these subtle architectual flaws can create useful attack vectors.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Mitigation: don't turn the option on :)&lt;br /&gt;
</description>
                    </item>
                <item>
            <title>Visual Patterns for File Format Fuzzing</title>
                            <pubDate>Fri, 02 Nov 2007 11:49:00 -0500</pubDate>
                                        <link>https://www.openrce.org/blog/view/922/Visual_Patterns_for_File_Format_Fuzzing</link>
                                        <author>jms &lt;email-suppressed@example.com&gt;</author>
                                                    <description>So, I am having a glance at Greg Conti's Book &lt;a href=&quot;http://nostarch.com/securityvisualization.htm&quot;&gt;&amp;quot;Security Data Visualization&amp;quot;&lt;/a&gt; and I got to wondering: is there a way we could apply some of the visualization techniques to better understand how to fuzz a file?&lt;br /&gt;
&lt;br /&gt;
Well I put together a Python script using PIL that essentially reads in a file, and then plots a red pixel for printable bytes and and leaves it white if its non-printable, rudimentary but works. Here are some of the results:&lt;br /&gt;
&lt;center&gt;&lt;br /&gt;
&lt;img src=&quot;http://bughunter.ca/openrce/dll.png&quot; border=0 align=&quot;&quot;&gt;&lt;br /&gt;
(This is a dll file loaded, you can see clearly the beginning structure of the dll)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;img src=&quot;http://bughunter.ca/openrce/python.doc.png&quot; border=0 align=&quot;&quot;&gt;&lt;br /&gt;
(This is a MS Word document, you can clearly see the text position, as well the top and bottom portions where the best spots to fuzz are)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;img src=&quot;http://bughunter.ca/openrce/win32-shellcode.pdf.png&quot; border=0 align=&quot;&quot;&gt;&lt;br /&gt;
(This is a PDF document, because a lot of the PDF directives are plaintext you can see them clearly in this document at the top)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;img src=&quot;http://bughunter.ca/openrce/xls.png&quot; border=0 align=&quot;&quot;&gt;&lt;br /&gt;
(This is a small MS Excel document, again its quite clear where the control structures would be located)&lt;br /&gt;
&lt;br /&gt;
&lt;/center&gt;&lt;br /&gt;
&lt;br /&gt;
And here are two captures of a normal exe and the same exe that was UPX packed. Can you tell which is which?&lt;br /&gt;
&lt;center&gt;&lt;br /&gt;
&lt;img src=&quot;http://bughunter.ca/openrce/test.exe.png&quot; border=0 align=&quot;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;img src=&quot;http://bughunter.ca/openrce/test2.exe.png&quot; border=0 align=&quot;&quot;&gt;&lt;br /&gt;
&lt;/center&gt;</description>
                    </item>
            </channel>
</rss>
