<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1610117500614834397</id><updated>2011-11-11T01:22:21.336-08:00</updated><category term='sulley'/><category term='fuzzing'/><category term='Encryption'/><category term='AES'/><category term='python'/><category term='Cloud Computing'/><category term='rand'/><category term='immunity debugger'/><category term='rant'/><title type='text'>ran(d|t)()</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://zqyves.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1610117500614834397/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://zqyves.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>zqyves</name><uri>http://www.blogger.com/profile/09327941361502002998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>7</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1610117500614834397.post-7939816458991542264</id><published>2011-07-24T09:22:00.001-07:00</published><updated>2011-07-24T09:25:57.529-07:00</updated><title type='text'>Moving blogging platform</title><content type='html'>Hello all,&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The moving of blogging platform has finished. All posts can now be found in &lt;a href="http://zqyves.wordpress.com"&gt;http://zqyves.wordpress.com&lt;/a&gt;  (apart from one where I was being an ass).&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Thanks.&lt;/div&gt;&lt;div&gt;./Z&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1610117500614834397-7939816458991542264?l=zqyves.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://zqyves.blogspot.com/feeds/7939816458991542264/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://zqyves.blogspot.com/2011/07/moving-blogging-platform.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1610117500614834397/posts/default/7939816458991542264'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1610117500614834397/posts/default/7939816458991542264'/><link rel='alternate' type='text/html' href='http://zqyves.blogspot.com/2011/07/moving-blogging-platform.html' title='Moving blogging platform'/><author><name>zqyves</name><uri>http://www.blogger.com/profile/09327941361502002998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1610117500614834397.post-8735445705448375084</id><published>2010-03-07T03:28:00.000-08:00</published><updated>2010-03-07T03:31:11.160-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rant'/><category scheme='http://www.blogger.com/atom/ns#' term='Cloud Computing'/><title type='text'>Cloud Computing Security as its never seen before..</title><content type='html'>&lt;div&gt;Hilarious...&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;object width="425" height="344"&gt;&lt;param name="movie" value="http://www.youtube.com/v/VjfaCoA2sQk&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp;"&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;embed src="http://www.youtube.com/v/VjfaCoA2sQk&amp;amp;hl=en_US&amp;amp;fs=1&amp;amp;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1610117500614834397-8735445705448375084?l=zqyves.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://zqyves.blogspot.com/feeds/8735445705448375084/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://zqyves.blogspot.com/2010/03/cloud-computing-security-as-its-never.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1610117500614834397/posts/default/8735445705448375084'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1610117500614834397/posts/default/8735445705448375084'/><link rel='alternate' type='text/html' href='http://zqyves.blogspot.com/2010/03/cloud-computing-security-as-its-never.html' title='Cloud Computing Security as its never seen before..'/><author><name>zqyves</name><uri>http://www.blogger.com/profile/09327941361502002998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1610117500614834397.post-219107546193321781</id><published>2009-09-27T12:53:00.001-07:00</published><updated>2009-09-28T07:27:57.907-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='immunity debugger'/><title type='text'>Application Behavioural Changes</title><content type='html'>I was recently at a situation where I needed to test the security of a purely fat client, that is no server-side  component was used at the application, rather a database hosting the application data. As such, all input validation and integrity checks where done at the fat client. After reversing part of the application it was evident that the application runtime behaviour would need to be changed per my needs in order to subvert these checks. To put things into perspective, by the term application runtime I am referring to the values held by the registers at program execution.&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The primary point of interest was, of course, subverting the password authorisation scheme of the application. Due to runtime protection it was not possible to permanently patch the application binary so I had to apply the patches at every execution. That lost its glamour after the first 15 times so I devised an Immunity Debugger PyCommand that would apply the patch after attaching to the application binary. Then I issued the same command for all 9 points that I had to patch. It took about 4 runs for that to also loose its magic... &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;By now you must know where I am going with this...&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So I devised a PyCommand that takes a ; separated of : separated quadruples of the information required to setup the hooks. I was feeling quite imaginative that afternoon.&lt;br /&gt;&lt;br /&gt;The idea behind this PyCommand is that a breakpoint is set at each point that the program execution must be manipulated. Once the breakpoint is hit, the relevant manipulation associated with it will be executed. That may be setting the value of a register to a specified value (eg. EAX=0x00000000) or to the contents of another register (eg. EAX = EBX) .&lt;br /&gt;&lt;br /&gt;The required information in order to setup the breakpoint hooks is:&lt;/div&gt;&lt;div&gt;&lt;ul&gt;&lt;li&gt;ID: A unique - descriptive - name in order to identify the hook by&lt;/li&gt;&lt;li&gt;ADDRESS: The address that the breakpoint will be set&lt;/li&gt;&lt;li&gt;REGISTER: The register to be modified&lt;/li&gt;&lt;li&gt;VALUE: The value to be set to the register, this can either be static (0x00000000) or the name of another register in which case the value of that register is being copied to the one we wish.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;So at the end of the day I ended up with something along the lines of:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;!bsu.py -b PREJMP:0x0040501290:EAX:EBX;POSTCMP:0x00407612:EAX:00000001&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;You can get the PyCommand from &lt;a href="http://sites.google.com/site/zqyvesfileshost/tools/bsu.py?attredirects=0"&gt;here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;The code is messy, but it works. I will try to put comments in it but I cannot guarantee that it will continue to work. To those wondering, yes putting comments in my code CAN break normal functionality.&lt;br /&gt;&lt;br /&gt;./Z&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1610117500614834397-219107546193321781?l=zqyves.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://zqyves.blogspot.com/feeds/219107546193321781/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://zqyves.blogspot.com/2009/09/application-behavioural-changes.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1610117500614834397/posts/default/219107546193321781'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1610117500614834397/posts/default/219107546193321781'/><link rel='alternate' type='text/html' href='http://zqyves.blogspot.com/2009/09/application-behavioural-changes.html' title='Application Behavioural Changes'/><author><name>zqyves</name><uri>http://www.blogger.com/profile/09327941361502002998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1610117500614834397.post-1061732790378683130</id><published>2009-09-23T12:23:00.000-07:00</published><updated>2009-09-23T12:25:45.401-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Encryption'/><category scheme='http://www.blogger.com/atom/ns#' term='AES'/><title type='text'>AES Made Easy</title><content type='html'>Never before has reading about AES been &lt;a href="http://www.moserware.com/2009/09/stick-figure-guide-to-advanced.html"&gt;so fun&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1610117500614834397-1061732790378683130?l=zqyves.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://zqyves.blogspot.com/feeds/1061732790378683130/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://zqyves.blogspot.com/2009/09/aes-made-easy.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1610117500614834397/posts/default/1061732790378683130'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1610117500614834397/posts/default/1061732790378683130'/><link rel='alternate' type='text/html' href='http://zqyves.blogspot.com/2009/09/aes-made-easy.html' title='AES Made Easy'/><author><name>zqyves</name><uri>http://www.blogger.com/profile/09327941361502002998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1610117500614834397.post-7158473247156600899</id><published>2008-11-28T02:07:00.000-08:00</published><updated>2008-11-28T06:11:39.850-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='python'/><category scheme='http://www.blogger.com/atom/ns#' term='fuzzing'/><title type='text'>HackThisSite Application 7 Solution Using In Memory Fuzzing</title><content type='html'>&lt;span style="font-size:100%;"&gt;Hello All,&lt;/span&gt;&lt;p class="MsoNormal"  style="font-family:trebuchet ms;"&gt;&lt;span lang="EN-GB"  style="font-size:100%;"&gt;This post is meant to describe a 'different' approach to solving the Application 7 challenge of www.hackthissite.org. It does so by using a technique called 'In Memory Fuzzing'. To avoid any flames as to whether that is fuzzing or bruteforcing you can call it whatever you want - I call it recursive fuzzing as per &lt;a href="http://www.owasp.org/index.php/OWASP_Testing_Guide_Appendix_C:_Fuzz_Vectors"&gt;owasp&lt;/a&gt;.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;Tools that will be utilised are:&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;  &lt;ul  type="disc" style="font-family:trebuchet ms;"&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-size:100%;"&gt;Immunity Debugger v1.4&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span style="font-size:100%;"&gt;Python 2.5.1&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;li class="MsoNormal" style=""&gt;&lt;span lang="EN-GB"  style="font-size:100%;"&gt;pydbg      (edited pydasm.dll to support python25.dll)&lt;/span&gt;&lt;span lang="EN-GB"  style="font-size:100%;"&gt;&lt;o:p&gt;&lt;/o:p&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p class="MsoNormal"  style="font-family:trebuchet ms;"&gt;&lt;span lang="EN-GB"  style="font-size:100%;"&gt;Providing a detailed analysis of the binary is not part of this post. Other&lt;/span&gt;&lt;span lang="EN-GB"  style="font-size:100%;"&gt;'s have done it - a lot better than I could have done it. So here goes...&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;span lang="EN-GB"  style="font-size:100%;"&gt;&lt;span style="font-weight: bold;"&gt;Rough binary(app7win.exe) breakdown&lt;/span&gt;&lt;/span&gt;&lt;p class="MsoNormal"  style="font-family:trebuchet ms;"&gt;&lt;span lang="EN-GB"  style="font-size:100%;"&gt;The following is a rough decomposition of the app7win.exe binary in logical&lt;/span&gt;&lt;span lang="EN-GB"  style="font-size:100%;"&gt; blocks:&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"  style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_9LZN7UUm5ME/SR018N364qI/AAAAAAAAABY/9Jxed7Puxjo/s1600-h/Process+Flow.jpg"&gt;&lt;img style="cursor: pointer; width: 175px; height: 320px;" src="http://2.bp.blogspot.com/_9LZN7UUm5ME/SR018N364qI/AAAAAAAAABY/9Jxed7Puxjo/s320/Process+Flow.jpg" alt="" id="BLOGGER_PHOTO_ID_5268426447725978274" border="0" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal"  style="font-family:trebuchet ms;"&gt;&lt;span lang="EN-GB"  style="font-size:100%;"&gt;We can see that the only purpose the password that is inputted by the user serves is to add all the characters in one key and use it to decrypt the file and produce the final password. This Key (K) is stored in &lt;/span&gt;&lt;span lang="EN-GB"  style="font-size:100%;"&gt;[EBP-1C]. That is what we will fuzz - "bruteforce".&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"  style="font-family:trebuchet ms;"&gt;&lt;span lang="EN-GB"  style="font-size:100%;"&gt;&lt;span style="font-weight: bold;"&gt;In-Memory Fuzzing in a Nutshell&lt;/span&gt;&lt;br /&gt;So now that we have broken down our interesting function it is time to start preparing for our fuzzing. In Memory fuzzing works by&lt;/span&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;span lang="EN-GB"  style="font-size:100%;"&gt;Taking a process snaps&lt;/span&gt;&lt;span lang="EN-GB"  style="font-size:100%;"&gt;hot at an ideal – for your type of tests – point. This will be used a the initial state of your tests and is the state that the process will be restored to after each test run.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span lang="EN-GB"  style="font-size:100%;"&gt;Setting several break points:&lt;/span&gt;&lt;/li&gt;&lt;ol&gt;&lt;li&gt;&lt;span lang="EN-GB"  style="font-size:100%;"&gt;The breakpoint(s) at which you need to perform you actions (such as altering memory contents)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span lang="EN-GB"  style="font-size:100%;"&gt;he restore breakpoint (s) that designate the end of your test and at which you will need to restore the initial process snapshot&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;li&gt;&lt;span lang="EN-GB"  style="font-size:100%;"&gt;Setting callbacks. Those are action you need to take at each breakpoint hit. It may be different actions per breakpoint&lt;/span&gt; &lt;/li&gt;&lt;/ol&gt;&lt;p class="MsoNormal"  style="font-family:trebuchet ms;"&gt;&lt;span lang="EN-GB"  style="font-size:100%;"&gt; For a more thorough explanation o&lt;/span&gt;&lt;span lang="EN-GB"  style="font-size:100%;"&gt;f Memory Fuzzing have a look at the book ‘Fuzzing: Brute Force Vulnerability Discovery’ by Amini, Sutton, Greene.&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"  style="font-family:trebuchet ms;"&gt;&lt;span lang="EN-GB"  style="font-size:100%;"&gt;&lt;span style="font-weight: bold;"&gt;Let's start fuzzing&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"  style="font-family:trebuchet ms;"&gt;&lt;span lang="EN-GB"  style="font-size:100%;"&gt;As a rule of thumb – which is sometimes bent &lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal"  style="font-family:trebuchet ms;"&gt;&lt;span lang="EN-GB"  style="font-size:100%;"&gt;a bit due to special circumstances – we will try to alter the execution of th&lt;/span&gt;&lt;span lang="EN-GB"  style="font-size:100%;"&gt;e original binary as little as possible.&lt;br /&gt;&lt;br /&gt;Thus far we have identified that the contents of [EBP-1C] are used as the sole basis to perform several mathematical operations on the encrypted.enc contents and subsequently - based on the outcome of these operations ( 0040118C  |CMP DWORD PTR SS:[EBP-18],0DCA ) - provide the password.&lt;br /&gt;&lt;br /&gt;Another parameter we must work out is the range of the fuzzing parameter (bruteforcing). This was calculated as the result of hex(7D) (max ascii printable character code) * 20 (possible password length) = hex(9C4). It was decided to round that up to hex(1000).&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal"  style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span lang="EN-GB"  style="font-size:100%;"&gt;&lt;span style="font-style: italic; color: rgb(51, 153, 153);"&gt;Try 1: After Initial Calculation&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;p class="MsoNormal"  style="font-family:trebuchet ms;"&gt;&lt;span lang="EN-GB"  style="font-size:100%;"&gt;For our first run we used&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span lang="EN-GB"  style="font-size:100%;"&gt;0x00401064 (immediately after the password has been inputted) as our process snapshot point&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span lang="EN-GB"  style="font-size:100%;"&gt;0x004010E0 (just before reading the key for the first time) as our rewrite memory breakpoint&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span lang="EN-GB"  style="font-size:100%;"&gt;0x004011AD (at the ‘Display Invalid Password' code segment) as our rewind breakpoint.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p class="MsoNormal"  style="font-family:trebuchet ms;"&gt;&lt;span lang="EN-GB"  style="font-size:100%;"&gt;&lt;br /&gt;This never worked past the first iteration. It kept breaking with a &lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal"  style="font-family:trebuchet ms;"&gt;&lt;span lang="EN-GB"  style="font-size:100%;"&gt;ACCESS VIOLATION ERRORS. If anyone can point as to why I would be grateful.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(51, 153, 153);"&gt;Try 2: Entry Point &lt;/span&gt;&lt;/span&gt;&lt;span lang="EN-GB"  style="font-size:100%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p class="MsoNormal"  style="font-family:trebuchet ms;"&gt;&lt;span lang="EN-GB"  style="font-size:100%;"&gt;For our second run we used&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;span lang="EN-GB"  style="font-size:100%;"&gt;0x004014C0 (process entry point) as our process snapshot point&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span lang="EN-GB"  style="font-size:100%;"&gt;0x004010E0 (just before reading the key for the first time) as our rewrite memory breakpoint&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span lang="EN-GB"  style="font-size:100%;"&gt;0x004011AD (at the ‘Display Invalid Password' code segment) as our rewind breakpoint.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p class="MsoNormal" style="font-family: trebuchet ms;"&gt;&lt;span lang="EN-GB"  style="font-size:100%;"&gt;&lt;br /&gt;Executing the fuzzer at this point worked OK with a small glitch, it was asking for the password every time. It was time to bend our previous rule of thumb. The only use password entry was ser&lt;/span&gt;&lt;span lang="EN-GB"  style="font-size:100%;"&gt;ving was to calculate the initial key, that is the value being stored in [EBP-1C] which we were resetting after all. So the password entry point was NOPed as is shown in the following screenshots.&lt;/span&gt;&lt;/p&gt;&lt;p  class="MsoNormal" style="font-family:trebuchet ms;"&gt;&lt;span style="font-size:100%;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_9LZN7UUm5ME/SR06aLIXpJI/AAAAAAAAABg/LKvHk02-s5s/s1600-h/Select+Input+Password.JPG"&gt;&lt;img style="cursor: pointer; width: 320px; height: 200px;" src="http://3.bp.blogspot.com/_9LZN7UUm5ME/SR06aLIXpJI/AAAAAAAAABg/LKvHk02-s5s/s320/Select+Input+Password.JPG" alt="" id="BLOGGER_PHOTO_ID_5268431360432252050" border="0" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/p&gt;&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_9LZN7UUm5ME/SR06aPwJPzI/AAAAAAAAABo/3uqaPyDDWvw/s1600-h/Password+NOPs.JPG"&gt;&lt;img style="cursor: pointer; width: 320px; height: 200px;" src="http://1.bp.blogspot.com/_9LZN7UUm5ME/SR06aPwJPzI/AAAAAAAAABo/3uqaPyDDWvw/s320/Password+NOPs.JPG" alt="" id="BLOGGER_PHOTO_ID_5268431361672822578" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;span lang="EN-GB"  style="font-size:100%;"&gt;&lt;br /&gt;At this point the fuzzer worked as expected. The fuzzer source code is provided in the file accompanying this post.&lt;br /&gt;&lt;br /&gt;Although it is mentioned explicitly in the fuzzer source code I must stress that a large part of my fuzzer source code is ripped from the &lt;a href="http://www.fuzzing.org/wp-content/in-memory-fuzz.zip"&gt;In Memory Fuzzer&lt;/a&gt; found in &lt;a href="http://www.fuzzing.org/"&gt;http://www.fuzzing.org&lt;/a&gt;. So kudos to those guys.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://cid-dbb9151c340822ed.skydrive.live.com/self.aspx/Public/app7win%7C_imf.py"&gt;Fuzzer Source Code&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;mutant&gt;&lt;span lang="EN-GB"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/mutant&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1610117500614834397-7158473247156600899?l=zqyves.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://zqyves.blogspot.com/feeds/7158473247156600899/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://zqyves.blogspot.com/2008/05/hackthissite-application-7-solution.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1610117500614834397/posts/default/7158473247156600899'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1610117500614834397/posts/default/7158473247156600899'/><link rel='alternate' type='text/html' href='http://zqyves.blogspot.com/2008/05/hackthissite-application-7-solution.html' title='HackThisSite Application 7 Solution Using In Memory Fuzzing'/><author><name>zqyves</name><uri>http://www.blogger.com/profile/09327941361502002998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_9LZN7UUm5ME/SR018N364qI/AAAAAAAAABY/9Jxed7Puxjo/s72-c/Process+Flow.jpg' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1610117500614834397.post-6453257183508237428</id><published>2008-11-08T11:29:00.000-08:00</published><updated>2008-11-09T01:40:06.046-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='rand'/><category scheme='http://www.blogger.com/atom/ns#' term='fuzzing'/><category scheme='http://www.blogger.com/atom/ns#' term='sulley'/><title type='text'>Sulley on Python 2.5.</title><content type='html'>&lt;span style="font-family:trebuchet ms;"&gt;Sulley is a multipurpose fuzzer created by the guys at TippingPoint (3Com) in Python. More on sulley can be found at the BlackHat USA 2007 talk titled "Fuzzing Sucks! Introducing Sulley Fuzzing Framework" (&lt;a href="https://www.blackhat.com/presentations/bh-usa-07/Amini_and_Portnoy/Presentation/Amini-Portnoy-BHUS07.pdf"&gt;pdf&lt;/a&gt;) (&lt;a href="http://media.blackhat.com/bh-usa-07/video/2007_BlackHat_Vegas-V46-Amini-Portnoy-Fuzzing_Sucks.mp4"&gt;mp4&lt;/a&gt;).&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;The installer comes with local copies of the Python 2.4.3 programming language, the pcapy python library, the ctypes python library and WinPcap 4.0.3. All of these are installed along with the sulley fuzzing fra&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;mework.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family:trebuchet ms;"&gt;Although not exactly rocket science I did not find anywhere a guide on installing sulley in a Python 2.5 environment. So I decided to give it a go and create one myself.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;Steps:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-family:trebuchet ms;"&gt;Install Python 2.5&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:trebuchet ms;"&gt;The ctypes python library is, as of Python 2.5, included in the Python core so nothing needs to be done as far is this is concerned.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:trebuchet ms;"&gt;The pcapy python library on the other hand is not, so it needs to be downloaded from &lt;a href="http://oss.coresecurity.com/"&gt;http://oss.coresecurity.com&lt;/a&gt;. The file that worked for me is &lt;a href="http://oss.coresecurity.com/repo/pcapy-0.10.5.win32-py2.5.exe"&gt;pcapy-0.10.5.win32-py2.5.exe&lt;/a&gt;. (sha1sum = 04e2e969e343e01adaec44680376714a6b10c97b)&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:trebuchet ms;"&gt;Install Winpcap (Optional)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:trebuchet ms;"&gt;Install Sulley Fuzzing Framework cancelling out on all additional packages it prompts you to install with the exception of &lt;a href="http://www.winpcap.org/install/default.htm"&gt;WinPcap &lt;/a&gt;(based on whether you chose to pre-install it or not - See previous step).&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-family:trebuchet ms;"&gt;Finally, sulley comes with a Python 2.4 based version of pydasm.pyd. My preferred way is Hexedit the pydasm.pyd and change the python24.dll with python 25.dll.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_9LZN7UUm5ME/SRXr9k-9XSI/AAAAAAAAAAY/Ldu2gydDiwE/s1600-h/pydasm.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px; height: 242px;" src="http://3.bp.blogspot.com/_9LZN7UUm5ME/SRXr9k-9XSI/AAAAAAAAAAY/Ldu2gydDiwE/s320/pydasm.jpg" alt="" id="BLOGGER_PHOTO_ID_5266374782411955490" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Et voila!!!! A working sulley installation.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_9LZN7UUm5ME/SRaup5YMLDI/AAAAAAAAABQ/NJGUBhTm8Ns/s1600-h/InstalledSulley.jpg"&gt;&lt;img style="cursor: pointer; width: 320px; height: 250px;" src="http://4.bp.blogspot.com/_9LZN7UUm5ME/SRaup5YMLDI/AAAAAAAAABQ/NJGUBhTm8Ns/s320/InstalledSulley.jpg" alt="" id="BLOGGER_PHOTO_ID_5266588849056525362" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-family:trebuchet ms;"&gt;&lt;screenshot&gt;&lt;/screenshot&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1610117500614834397-6453257183508237428?l=zqyves.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://zqyves.blogspot.com/feeds/6453257183508237428/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://zqyves.blogspot.com/2008/11/sulley-on-python-25.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1610117500614834397/posts/default/6453257183508237428'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1610117500614834397/posts/default/6453257183508237428'/><link rel='alternate' type='text/html' href='http://zqyves.blogspot.com/2008/11/sulley-on-python-25.html' title='Sulley on Python 2.5.'/><author><name>zqyves</name><uri>http://www.blogger.com/profile/09327941361502002998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_9LZN7UUm5ME/SRXr9k-9XSI/AAAAAAAAAAY/Ldu2gydDiwE/s72-c/pydasm.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1610117500614834397.post-3868663271156987904</id><published>2008-11-08T01:03:00.000-08:00</published><updated>2009-09-27T13:29:08.640-07:00</updated><title type='text'>Hello World!</title><content type='html'>&lt;span style=";font-family:trebuchet ms;font-size:100%;"&gt;&lt;br /&gt;So I started blogging... Big deal...&lt;br /&gt;&lt;br /&gt;Anyway, this blog is going to be largely related to information security in random topics I am interested in (the rand part of it) and at various other aspects of our life (the rant part of it).&lt;br /&gt;&lt;br /&gt;A few words about myself...&lt;br /&gt;&lt;/span&gt;&lt;ol  style="font-family:trebuchet ms;"&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;check the box on the upper right corner of the page you are in.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;I work in the field of information security. My current interests are:&lt;/span&gt;&lt;/li&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;Reverse Engineering&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;Malware&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;Penetration Testing&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;.Net Programming (C# mainly)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:100%;"&gt;Fuzzing&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/ol&gt;&lt;span style=";font-family:trebuchet ms;font-size:100%;"&gt;I hope to see you again...&lt;br /&gt;&lt;br /&gt;./Z&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1610117500614834397-3868663271156987904?l=zqyves.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://zqyves.blogspot.com/feeds/3868663271156987904/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://zqyves.blogspot.com/2008/11/hello-world.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1610117500614834397/posts/default/3868663271156987904'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1610117500614834397/posts/default/3868663271156987904'/><link rel='alternate' type='text/html' href='http://zqyves.blogspot.com/2008/11/hello-world.html' title='Hello World!'/><author><name>zqyves</name><uri>http://www.blogger.com/profile/09327941361502002998</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
