<?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/"
	xmlns:series="http://unfoldingneurons.com/"
	>

<channel>
	<title>a4apphack &#187; Programming</title>
	<atom:link href="http://a4apphack.com/index.php/category/programming/feed" rel="self" type="application/rss+xml" />
	<link>http://a4apphack.com</link>
	<description>Get more out of the Apps!</description>
	<lastBuildDate>Wed, 11 Jan 2012 20:25:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
<image>
<link>http://a4apphack.com</link>
<url>http://a4apphack.com/blog/wp-content/themes/primus/favicon.ico</url>
<title>a4apphack</title>
</image>
		<item>
		<title>Compare Files Online With DiffChecker – WinMerge Alternative</title>
		<link>http://a4apphack.com/softwares/online-apps/compare-files-online-with-diffchecker-winmerge-alternative</link>
		<comments>http://a4apphack.com/softwares/online-apps/compare-files-online-with-diffchecker-winmerge-alternative#comments</comments>
		<pubDate>Wed, 08 Sep 2010 07:22:29 +0000</pubDate>
		<dc:creator>rajivvishwa</dc:creator>
				<category><![CDATA[Online]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[compare]]></category>
		<category><![CDATA[files]]></category>
		<category><![CDATA[online]]></category>
		<category><![CDATA[versions]]></category>

		<guid isPermaLink="false">http://a4apphack.com/?p=2056</guid>
		<description><![CDATA[There might be times when you are accessing your code snippets saved online from your friends PC or from a new workstation. Chances are less that you can get hold of WinMerge or any similar file comparison tool. But we have a simple dual file comparison tool online which gives us the comparison results on [...]]]></description>
			<content:encoded><![CDATA[<p>There might be times when you are accessing your code snippets saved online from your friends PC or from a new workstation. Chances are less that you can get hold of WinMerge or any similar file comparison tool. But we have a simple dual file comparison tool online which gives us the comparison results on click of a button.</p>
<p><a href="http://img.a4apphack.com/onlinecompare-screenshot.jpg" rel="lightbox[2056]" title="Online File Compare"><img title="Online File Compare" src="http://img.a4apphack.com/onlinecompare-screenshot.jpg" alt="Online File Compare" width="600" height="362" /></a></p>
<p><strong>Features</strong></p>
<ul>
<li>Ability to upload 2 versions of the files to be compared</li>
<li>Code can even be pasted to the text boxes for comparison</li>
<li>Automatic Wordwrap</li>
</ul>
<p>Checkout <a href="http://diffchecker.com/">Diffchecker</a></p>
<table id="cft">
  <thead>
  <tr>
    <th colspan="2">DiffChecker Info</th>
  </tr>
  </thead>
  <tbody>
    <tr>
      <td  width="40%">App Name</td>
      <td>DiffChecker</td>
    </tr>
    <tr>
      <td>License</td>
      <td>free</td>
    </tr>
    <tr>
      <td>Type</td>
      <td>online</td>
    </tr>
    <tr>
      <td>App URL</td>
      <td>
      <a target="_blank" href="http://diffchecker.com/"><img
 style="" alt="Download"
 src="http://img.a4apphack.com/site/a4apphack-download.png"
 title="Download" witdh="30" height="30"></a></td>
    </tr>
    <tr>
      <td>More Info</td>
      <td> <a href="http://diffchecker.com/">link</a></td>
    </tr>
  </tbody>
</table>

<img src="http://a4apphack.com/blog/?ak_action=api_record_view&id=2056&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://a4apphack.com/softwares/online-apps/compare-files-online-with-diffchecker-winmerge-alternative/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Share and Collaborate Text or Code With Your Friends</title>
		<link>http://a4apphack.com/softwares/online-apps/share-and-collaborate-text-or-code-with-your-friends</link>
		<comments>http://a4apphack.com/softwares/online-apps/share-and-collaborate-text-or-code-with-your-friends#comments</comments>
		<pubDate>Tue, 31 Mar 2009 06:24:23 +0000</pubDate>
		<dc:creator>rajivvishwa</dc:creator>
				<category><![CDATA[Online]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[collaborate]]></category>
		<category><![CDATA[share]]></category>

		<guid isPermaLink="false">http://a4apphack.com/blog/?p=1039</guid>
		<description><![CDATA[FriendPaste is a web application that allows you to share, edit and collaborate your code with your peers in an easy and intuitive way. This application accepts the code and displays in friendly, syntax highlighted format to whoever asks for. The display can completely be customized and then it can be shared with anyone by [...]]]></description>
			<content:encoded><![CDATA[<p>FriendPaste is a web application that allows you to share, edit and collaborate your code with your peers in an easy and intuitive way. This application accepts the code and displays in friendly, syntax highlighted format to whoever asks for. The display can completely be customized and then it can be shared with anyone by sending the unique url which identifies shared code&#8230; It is that simple&#8230;</p>
<p><a rel="attachment wp-att-1043" href="http://a4apphack.com/blog/wp-content/uploads/2009/03/syntaxhighlighting.jpg" title="Syntax Highlight"><img class="alignnone size-full wp-image-1043" title="Syntax Highlight" src="http://a4apphack.com/blog/wp-content/uploads/2009/03/syntaxhighlighting.jpg" alt="Syntax Highlight" width="530" height="321" /></a><br />
<span id="more-1039"></span></p>
<h3>Steps</h3>
<ol>
<li>Just paste the code you want to share in the textarea</li>
<li>Select language with which its written and also choose the privacy settings.</li>
<li>Click &#8216;Submit paste&#8217; and get the unique URL</li>
<li>Share this URL with your peers.</li>
</ol>
<p>Revisions are archived for a particular code whenever someone modifies it. These revisions can be compared to understand the changes made to the code. This helps in collaboration of ones work with their remote peers.</p>
<p><a rel="attachment wp-att-1041" href="http://a4apphack.com/blog/wp-content/uploads/2009/03/comparerevisions.jpg" title="CompareRevisions"><img class="alignnone size-full wp-image-1041" title="CompareRevisions" src="http://a4apphack.com/blog/wp-content/uploads/2009/03/comparerevisions.jpg" alt="CompareRevisions" width="530" height="288" /></a></p>
<p>FriendPaste also includes some privacy settings in it. We can set password so as to restrict the permissions to to who can view or edit the paste code.</p>
<p><img class="alignnone size-full wp-image-1044" title="Privacy Settings" src="http://a4apphack.com/blog/wp-content/uploads/2009/03/privacysettings.jpg" alt="Privacy Settings" width="411" height="96" /></p>
<h3>Features</h3>
<ul>
<li>Clean an intuitive UI</li>
<li>Support large set of <a title="Languages Supported" href="http://pygments.org/languages/">languages</a></li>
<li>Choice of colorschemes for sourcecode highlighting</li>
<li>Option to choose our preferred languages</li>
<li>Possibility to edit pastes [Fork]</li>
<li>Persistent pastes</li>
<li>Compare Revisions</li>
</ul>
<p>Go to : <a href="http://www.friendpaste.com"><img class="alignnone size-full wp-image-1042" style="vertical-align: middle;" title="FriendPaste" src="http://a4apphack.com/blog/wp-content/uploads/2009/03/friendpastelogo.jpg" alt="FriendPaste" width="228" height="68" /></a></p>
<p>Similar Apps : <a title="Paste2" href="http://paste2.org">Paste2</a>, <a title="Pastie" href="http://pastie.org">Pastie</a>, <a title="CodePaste" href="http://paste.bradleygill.com/">CodePaste</a>, <a title="PasteBin" href="http://pastebin.com/">PasteBin</a></p>
<p><em>P.S : I compared the above mentioned apps with Friendpaste and came to a conclusion that <strong><a title="FriendPaste" href="http://www.friendpaste.com">FriendPaste</a></strong> is best among the others.</em></p>
<img src="http://a4apphack.com/blog/?ak_action=api_record_view&id=1039&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://a4apphack.com/softwares/online-apps/share-and-collaborate-text-or-code-with-your-friends/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AppKeys &#8211; Suite of Simple Utilites With AHK</title>
		<link>http://a4apphack.com/featured/appkeys-suite-of-simple-utilites-with-ahk</link>
		<comments>http://a4apphack.com/featured/appkeys-suite-of-simple-utilites-with-ahk#comments</comments>
		<pubDate>Mon, 23 Feb 2009 17:54:13 +0000</pubDate>
		<dc:creator>rajivvishwa</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Softwares]]></category>
		<category><![CDATA[System Tools]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[ahk]]></category>
		<category><![CDATA[apps]]></category>
		<category><![CDATA[automate]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[rightclick]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[systools]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://a4apphack.com/blog/?p=630</guid>
		<description><![CDATA[AppKeys is a suit of applications built based on AHK scripting language which can be invoked by using various keyboard shortcuts. The shortcuts can be modified by editing the ahk scripts. Running this ahk file will consume very less amount of memory and can run each command almost instantaneously. This suite of apps replaces dozens [...]]]></description>
			<content:encoded><![CDATA[<p>AppKeys is a suit of applications built based on AHK scripting language which can be invoked by using various keyboard shortcuts. The shortcuts can be modified by editing the ahk scripts. Running this ahk file will consume very less amount of memory and can run each command almost instantaneously. This suite of apps replaces dozens of applications which needs to be installed otherwise to do the same operations.</p>
<p><span id="more-630"></span></p>
<h2>Operations</h2>
<ul>
<li>Inserts a linebreak.</li>
<li>Inserts a tab.</li>
<li>Move the mouse with the arrow keys.</li>
<li>Googles selected text, if its a URL then its opened in browser</li>
<li>Change case of selected text</li>
<li>Dsiplay AutoHotkey help file.</li>
<li>Terminate active application</li>
<li>Disables the Windows keys. For use with fullscreen games.</li>
<li>Toggle active window &#8220;Always On Top&#8221;.</li>
<li>Eject/Retract the CD tray</li>
<li>Turn Monitor off</li>
<li>Hide/Unhide the active window.</li>
<li>Unhide all windows that were hidden this way.</li>
<li>Toggle Window Transparency</li>
<li>Pastes clipboard contents as plain text OR path of file/folder</li>
<li>Toggle text wrapping to a specific width</li>
<li>Quick shutdown menu</li>
<li>RegEx replace on selected text.</li>
<li>Appends BBCode tags for selected text</li>
<li>Appends HTML tags for selected text</li>
<li>Comments/Uncomments a block of AutoHotkey code.</li>
</ul>
<h2>Gallery</h2>
<p>Have mentioned few features below.</p>
<p><strong>1. Window Transparency</strong></p>
<div class="wp-caption alignnone" style="width: 536px"><a title="Toogle Window Transparency" href="http://img.a4apphack.com/appkeys-windowtransparency.jpg" rel="lightbox[630]"><img title="Toogle Window Transparency" src="http://img.a4apphack.com/appkeys-windowtransparency.jpg" alt="Toogle Window Transparency" width="526" height="343" /></a><p class="wp-caption-text">Toogle Window Transparency</p></div>
<p>
 <strong>2. Always On Top</strong></p>
<div class="wp-caption alignnone" style="width: 325px"><a title="AlwaysOnTop" href="http://img.a4apphack.com/appkeys-alwaysontop.jpg" rel="lightbox[630]"><img title="AlwaysOnTop" src="http://img.a4apphack.com/appkeys-alwaysontop.jpg" alt="AlwaysOnTop" width="315" height="267" /></a><p class="wp-caption-text">AlwaysOnTop</p></div>
<p><strong>3. Custom Shutdown Menu</strong></p>
<div class="wp-caption alignnone" style="width: 264px"><a title="Custom Shutdown Menu" href="http://img.a4apphack.com/appkeys-customshutdownmenu.jpg" rel="lightbox[630]"><img title="Custom Shutdown Menu" src="http://img.a4apphack.com/appkeys-customshutdownmenu.jpg" alt="Custom Shutdown Menu" width="254" height="160" /></a><p class="wp-caption-text">Custom Shutdown Menu</p></div>
<p><strong>5. HTML Tag Completion</strong></p>
<div class="wp-caption alignnone" style="width: 334px"><a title="HTML Tag Completion" href="http://img.a4apphack.com/appkeys-htmltagcompletion.gif" rel="lightbox[630]"><img title="HTML Tag Completion" src="http://img.a4apphack.com/appkeys-htmltagcompletion.gif" alt="HTML Tag Completion" width="324" height="124" /></a><p class="wp-caption-text">HTML Tag Completion</p></div>
<p><strong>6. Paste File Path</strong></p>
<div class="wp-caption alignnone" style="width: 610px"><a title="Paste File Path" href="http://img.a4apphack.com/appkeys-pastefilepath.gif" rel="lightbox[630]"><img title="Paste File Path" src="http://img.a4apphack.com/appkeys-pastefilepath.gif" alt="Paste File Path" width="600" height="405" /></a><p class="wp-caption-text">Paste File Path</p></div>
<p><strong>7. Terminate Application</strong></p>
<div class="wp-caption alignnone" style="width: 222px"><a title="Terminate Application" href="http://img.a4apphack.com/appkeys-terminateapplication.jpg" rel="lightbox[630]"><img title="Terminate Application" src="http://img.a4apphack.com/appkeys-terminateapplication.jpg" alt="Terminate Application" width="212" height="117" /></a><p class="wp-caption-text">Terminate Application</p></div>
<h2>AppKeys CheatSheet</h2>
<div class="wp-caption alignnone" style="width: 610px"><a title="Appkeys Cheatsheet" href="http://img.a4apphack.com/appkeys-cheatsheet.jpg" rel="lightbox[630]"><img class="" title="Appkeys Cheatsheet" src="http://img.a4apphack.com/appkeys-cheatsheet.jpg" alt="Appkeys Cheatsheet" width="600" height="404" /></a><p class="wp-caption-text">Appkeys Cheatsheet (Click to Enlarge)</p></div>
<p><br class="spacer_" /></p>
<p><strong>Download Appkeys :</strong> <a target="_blank" href="http://img.a4apphack.com/dl/appkeys.ahk.txt"><img style="vertical-align: middle;" height="30" width="30" alt="Download" src="http://img.a4apphack.com/site/a4apphack-download.png" title="Download"/></a> (Rename the file to appkeys.ahk)</p>
<p>Note: Check the <a title="AppsKeys - a &quot;suite&quot; of simple utility hotkeys" href="http://www.autohotkey.com/forum/topic27797.html&amp;highlight=always+top">authors post</a> for the latest ahk file.</p>
<img src="http://a4apphack.com/blog/?ak_action=api_record_view&id=630&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://a4apphack.com/featured/appkeys-suite-of-simple-utilites-with-ahk/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Patching Security Holes With OllyDbg (Part 3/3)</title>
		<link>http://a4apphack.com/security/patching-security-holes-with-ollydbg-part-3</link>
		<comments>http://a4apphack.com/security/patching-security-holes-with-ollydbg-part-3#comments</comments>
		<pubDate>Mon, 09 Feb 2009 21:20:21 +0000</pubDate>
		<dc:creator>rajivvishwa</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[access]]></category>
		<category><![CDATA[Portable]]></category>

		<guid isPermaLink="false">http://a4apphack.com/index.php/?p=1467</guid>
		<description><![CDATA[Tutorial 3 &#8211; Deriving the logic of the generated key to create Keygens Enter any test string to get the error message. Search for the referenced text strings and locate the message displayed in the error box. After analyzing the text references we find that there are no hardcoded keys or presence of any fragments [...]]]></description>
			<content:encoded><![CDATA[<h3>Tutorial 3 &#8211; Deriving the logic of the generated key to create Keygens</h3>
<p>Enter any test string to get the error message.</p>
<p><a title="CrackMe Screenshot" href="http://img.a4apphack.com/ollydbg-3-crackmescreen.png" rel="lightbox[1467]"><img class="alignnone size-full wp-image-473" title="CrackMe Screenshot" src="http://img.a4apphack.com/ollydbg-3-crackmescreen.png" alt="3_crackme_ss" width="250" height="173" /></a></p>
<p>Search for the referenced text strings and locate the message displayed in the error box. After analyzing the text references we find that there are no hardcoded keys or presence of any fragments of keys.</p>
<p><a title="Referenced strings" href="http://img.a4apphack.com/ollydbg-3-searchreferencestring.png" rel="lightbox[1467]"><img class="alignnone size-full wp-image-474" title="Referenced strings" src="http://img.a4apphack.com/ollydbg-3-searchreferencestring.png" alt="3_searchreferencestring" width="607" height="134" /></a></p>
<p>We have Double click to open the CPU window and set breakpoint by pressing &#8216;F2&#8242;</p>
<p><a title="Set breakpoint" href="http://img.a4apphack.com/ollydbg-3-setbreakpoint.png" rel="lightbox[1467]"><img class="alignnone size-full wp-image-476" title="Set breakpoint" src="http://img.a4apphack.com/ollydbg-3-setbreakpoint.png" alt="3_setbreakpoint" width="507" height="83" /></a></p>
<p>Check whether there are any new strings generated at the CPU window (and trust me you wont find any <img src='http://a4apphack.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  ). Now check the memory stack and scroll to the instruction where the userid we have entered is displayed. If you scroll a bit down you can find a &#8216;Key Like&#8217; string below the userid string. Try to enter that in the key field, it should work.</p>
<p><a title="Find the serial from the stack window" href="http://img.a4apphack.com/ollydbg-3-serialfound.png" rel="lightbox[1467]"><img class="alignnone size-full wp-image-475" title="Find the serial from the stack window" src="http://img.a4apphack.com/ollydbg-3-serialfound.png" alt="3_serialfound" width="241" height="167" /></a></p>
<p>There is no point in finding out the key without understanding the logic behind the generation of the key. Once if we find the logic, we can reverse engineer and create a distributable keygens.</p>
<p>We can segregate the userid and corresponding key values as follows</p>
<p>t &#8211; D8<br />
 e &#8211; C9<br />
 s &#8211; D7<br />
 t &#8211; D8<br />
 e &#8211; None<br />
 r &#8211; None</p>
<p>Now open &#8216;calc&#8217; in scientific mode &#8211; Select Hex mode &#8211; Type D8</p>
<p><a title="Hex value in calc" href="http://img.a4apphack.com/ollydbg-3-valuehex.png" rel="lightbox[1467]"><img class="size-full wp-image-479 alignnone" title="Hex value in calc" src="http://img.a4apphack.com/ollydbg-3-valuehex.png" alt="3_valuehex" width="400" height="157" /></a></p>
<p>Select Dec mode to convert HEX value to Decimal.</p>
<p><a title="Decimal equivalent in calc" href="http://img.a4apphack.com/ollydbg-3-valuedec.png" rel="lightbox[1467]"><img class="size-full wp-image-478 alignnone" title="Decimal equivalent in calc" src="http://img.a4apphack.com/ollydbg-3-valuedec.png" alt="3_valuedec" width="249" height="191" /></a></p>
<p>Note down the corresponding Decimal value for each HEX equivalent.</p>
<p>Now open any <a title="Ascii Chart" href="http://www.asciichart.com/">asciichart</a> and note down the ascii value for the userid chars.</p>
<p><a href="http://www.asciichart.com"><img class="size-full wp-image-477 alignnone" title="ASCII Chart" src="http://img.a4apphack.com/ollydbg-3-testascii.png" alt="3_testascii" width="259" height="194" /></a></p>
<p>We can notice a difference of 100 between the converted HEX value and ascii value of the userid.</p>
<p>So we can derive the logic to create our own Keygen</p>
<h4>Logic Sequence</h4>
<ol>
<li>Take the 4 four characters of the username</li>
<li>Convert chars to corresponding decimal value</li>
<li>Add 100 to the decimal value obtained in step 2</li>
<li>Covert this to HEX and the Key is obtained!</li>
</ol>
<p><strong>CrackMe App Download</strong> : <a target="_blank" href="http://www.box.net/shared/iutzenxmn1"><img style="vertical-align: middle;" height="30" width="30" alt="Download" src="http://img.a4apphack.com/site/a4apphack-download.png" title="Download"/></a> Alt: <a target="_blank" href="http://dl.getdropbox.com/u/259868/Tutorial3.zip"><img style="vertical-align: middle;" height="30" width="30" alt="Download" src="http://img.a4apphack.com/site/a4apphack-download.png" title="Download"/></a></p>
<p><strong>Video</strong><br />
 <object type="application/x-shockwave-flash" style="width:600px;height:385px" data="http://www.youtube.com/v/jvzYB9t52io&amp;hl=en&amp;fs=1"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="quality" value="best" /><param name="wmode" value="transparent" /><param name="movie" value="http://www.youtube.com/v/jvzYB9t52io&amp;hl=en&amp;fs=1" /><param name="pluginspage" value="http://www.macromedia.com/go/getflashplayer" />If you can see this, then you might need a Flash Player upgrade or you need to install Flash Player if it's missing. Get <a href="http://get.adobe.com/flashplayer/" target="_blank">Flash Player</a> from Adobe.</object><br/>
		<!-- Valid XHTML flash object delivered by XHTML Video Embed. Get it at: http://saltwaterc.net/xhtml-video-embed -->
		</p>
<p><strong>Conclusion: </strong>Always use a multilevel, complex logic to derive your own key. Always advised to use any standard encryption algorithm to generate the key used for comparison.</p>
<p><strong>Note:</strong> <em>The apps used in the tutorials are downloaded from the <a title="DeathSpawn Ollydbg tutorials" href="http://www.geocities.com/imdeathspawn/" class="broken_link">DeathSpawn Website</a> (Not working anymore <img src='http://a4apphack.com/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  ) and detailed &#8216;How-to&#8217; is can be read from the text file which is present along with the app package.</em></p>
<h3>References</h3>
<ul>
<li>OllyDbg Homepage &#8211; <a href="http://www.ollydbg.de/">http://www.ollydbg.de/</a></li>
<li>Death Spawn OllyDdg Tutorials &#8211; <a title="Death Spawn OllyDbg Tutorials" href="http://www.geocities.com/imdeathspawn/" class="broken_link">http://www.geocities.com/imdeathspawn/</a> (Doesn&#8217;t seem to work now)</li>
<li>ASCII Chart &#8211; <a title="ASCII Chart" href="http://www.asciichart.com/">http://www.asciichart.com/</a></li>
<li>UPX packing utility &#8211; <a title="UPX packer" href="http://upx.sourceforge.net/">http://upx.sourceforge.net/</a></li>
</ul>
<img src="http://a4apphack.com/blog/?ak_action=api_record_view&id=1467&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://a4apphack.com/security/patching-security-holes-with-ollydbg-part-3/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<series:name><![CDATA[OllyDbg]]></series:name>
	</item>
		<item>
		<title>Patching Security Holes With OllyDbg (Part 2/3)</title>
		<link>http://a4apphack.com/security/patching-security-holes-with-ollydbg-part-2</link>
		<comments>http://a4apphack.com/security/patching-security-holes-with-ollydbg-part-2#comments</comments>
		<pubDate>Mon, 09 Feb 2009 21:00:08 +0000</pubDate>
		<dc:creator>rajivvishwa</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[access]]></category>
		<category><![CDATA[Portable]]></category>
		<category><![CDATA[videos]]></category>

		<guid isPermaLink="false">http://a4apphack.com/index.php/?p=1464</guid>
		<description><![CDATA[Tutorial 2 &#8211; Finding generated key at runtime Enter any test data and observe the error message displayed. Search for referenced text strings as mentioned in Tutorial-1. Scroll to the location shown below. Notice the 2 &#8216;Key like&#8217; strings in the text strings referenced. If you think that one of them is valid, then you [...]]]></description>
			<content:encoded><![CDATA[<h3>Tutorial 2 &#8211; Finding generated key at runtime</h3>
<p>Enter any test data and observe the error message displayed.<br />
 <a title="Incorrect String Entered" href="http://img.a4apphack.com/ollydbg-2-incorrectstringentered.png" rel="lightbox[1464]"><img class="alignnone size-full wp-image-469" title="Enter a 'test' string" src="http://img.a4apphack.com/ollydbg-2-incorrectstringentered.png" alt="2_incorrectstringentered" width="324" height="183" /></a></p>
<p>Search for referenced text strings as mentioned in Tutorial-1. Scroll to the location shown below.<br />
 <a title="Search Reference Strings" href="http://img.a4apphack.com/ollydbg-2-searchrefstrings.png" rel="lightbox[1464]"><img class="alignnone size-full wp-image-470" title="Referenced strings" src="http://img.a4apphack.com/ollydbg-2-searchrefstrings.png" alt="2_searchrefstrings" width="566" height="129" /></a></p>
<p>Notice the 2 &#8216;Key like&#8217; strings in the text strings referenced. If you think that one of them is valid, then you are wrong, but then why and where is it used? And what is the correct key? We can find that out soon.<br />
 Double click the message &#8216;The serial you entered is not correct&#8217; to reach the instruction location in the CPU window. When we analyze the code we come across a few concatenations operations. But unfortunately the keys are concatenated with blanks and finally compared with the user input.</p>
<p><a title="View the comments in CPU window" href="http://img.a4apphack.com/ollydbg-2-stringscpumain.png" rel="lightbox[1464]"><img class="alignnone size-full wp-image-472" title="View the comments in CPU window" src="http://img.a4apphack.com/ollydbg-2-stringscpumain.png" alt="2_stringscpumain" width="600" height="373" /></a></p>
<p>The blank values you see in the comments are not really blank ones. They values are assigned on runtime. We have to set a breakpoint to obtain the dynamic assigned value.</p>
<p>To set a breakpoint, select the instruction and press &#8216;F2&#8242;. Breakpoints highlighted in red over the memory location.</p>
<p><a title="Setting breakpoint" href="http://img.a4apphack.com/ollydbg-2-settingbreakpoint.png" rel="lightbox[1464]"><img class="alignnone size-full wp-image-471" title="Setting breakpoint" src="http://img.a4apphack.com/ollydbg-2-settingbreakpoint.png" alt="2_settingbreakpoint" width="288" height="57" /></a></p>
<p>Press the &#8216;Play&#8217; button to run the crackme application. Enter any random data and click the &#8216;Check&#8217; button. The application pauses at the breakpoint set in the previous step. Go to the same location where you saw the 2 suspicious &#8216;Key Like&#8217; strings in the previous step.</p>
<p><a title="Capture the generated serial number in Run-Time" href="http://img.a4apphack.com/ollydbg-2-foundserialgenerated.png" rel="lightbox[1464]"><img class="alignnone size-full wp-image-468" title="Capture the generated serial number in Run-Time" src="http://img.a4apphack.com/ollydbg-2-foundserialgenerated.png" alt="2_foundserialgenerated" width="600" height="364" /></a></p>
<p>Just before where the breakpoint was set we can find a new long string value displayed instead of blank strings which was displayed earlier. If you reverse engineer now, you can understand that the 2 Keys <span style="background-color: #ffff00;">&#8216;L2C-5781</span>&#8216; and &#8216;<span style="background-color: #ffff00;">4562-ABEX</span>&#8216; are static ones and are prefixed and suffixed, respectively, with a dynamically generated string. This is what we were looking for; the correct key to this app.</p>
<p><br class="spacer_" /></p>
<p><a title="Correct String Entered" href="http://img.a4apphack.com/ollydbg-2-correctstring.png" rel="lightbox[1464]"><img class="alignnone" title="Correct String Entered" src="http://img.a4apphack.com/ollydbg-2-correctstring.png" alt="Correct String Entered" width="331" height="187" /></a></p>
<p><br class="spacer_" /></p>
<p><strong>CrackMe App Download :</strong> <a target="_blank" href="http://www.box.net/shared/1q5r91eps1"><img style="vertical-align: middle;" height="30" width="30" alt="Download" src="http://img.a4apphack.com/site/a4apphack-download.png" title="Download"/></a> Alt : <a target="_blank" href="http://dl.getdropbox.com/u/259868/Tutorial2.zip"><img style="vertical-align: middle;" height="30" width="30" alt="Download" src="http://img.a4apphack.com/site/a4apphack-download.png" title="Download"/></a></p>
<h3>Video</h3>
<p><object type="application/x-shockwave-flash" style="width:600px;height:385px" data="http://www.youtube.com/v/WDP02prTd9A&amp;hl=en&amp;fs=1"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="quality" value="best" /><param name="wmode" value="transparent" /><param name="movie" value="http://www.youtube.com/v/WDP02prTd9A&amp;hl=en&amp;fs=1" /><param name="pluginspage" value="http://www.macromedia.com/go/getflashplayer" />If you can see this, then you might need a Flash Player upgrade or you need to install Flash Player if it's missing. Get <a href="http://get.adobe.com/flashplayer/" target="_blank">Flash Player</a> from Adobe.</object><br/>
		<!-- Valid XHTML flash object delivered by XHTML Video Embed. Get it at: http://saltwaterc.net/xhtml-video-embed -->
		</p>
<p><strong>Conclusion </strong>: Never hardcode even fragments of static keys which can be helpful to deduce the complete key. Use some kind of logic to generate a dynamic key value.</p>
<img src="http://a4apphack.com/blog/?ak_action=api_record_view&id=1464&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://a4apphack.com/security/patching-security-holes-with-ollydbg-part-2/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<series:name><![CDATA[OllyDbg]]></series:name>
	</item>
		<item>
		<title>Patching Security Holes With OllyDbg (Part 1/3)</title>
		<link>http://a4apphack.com/security/patching-security-holes-with-ollydbg</link>
		<comments>http://a4apphack.com/security/patching-security-holes-with-ollydbg#comments</comments>
		<pubDate>Mon, 09 Feb 2009 20:46:45 +0000</pubDate>
		<dc:creator>rajivvishwa</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[access]]></category>
		<category><![CDATA[Portable]]></category>
		<category><![CDATA[videos]]></category>

		<guid isPermaLink="false">http://a4apphack.com/blog/?p=459</guid>
		<description><![CDATA[OllyDbg is a 32-bit assembler level analyzing debugger for Microsoft Windows. This machine level debugger is created by Oleh Yuschuk for the 80&#215;86. OllyDbg traces registers, recognizes procedures, loops, API calls, switches, tables, constants and strings. These features can be utilized to understand how an application internals. Introduction Ollydbg mainly has 4 windows in the [...]]]></description>
			<content:encoded><![CDATA[<p>OllyDbg is a 32-bit assembler level analyzing debugger for Microsoft Windows. This machine level debugger is created by Oleh Yuschuk for the 80&#215;86. OllyDbg traces registers, recognizes procedures, loops, API calls, switches, tables, constants and strings. These features can be utilized to understand how an application internals.</p>
<h3>Introduction</h3>
<p><a title="OllyDbg Homepage" href="http://www.ollydbg.de/">Ollydbg</a> mainly has 4 windows in the default layout. CPU Window, Registers, Memory Stack and HEX Dump window. We will be working on CPU window most of the time.</p>
<p><a title="OllyDbg Reference Screen" href="http://img.a4apphack.com/ollydbg-refscreen.png" rel="lightbox[459]"><img class="size-full wp-image-501 alignnone" title="OllyDbg Reference Screen" src="http://img.a4apphack.com/ollydbg-refscreen.png" alt="ollydbgrefscreen" width="528" height="414" /></a></p>
<p><strong>OllyDbg Download :</strong> <a target="_blank" href="http://www.ollydbg.de/download.htm"><img style="vertical-align: middle;" height="30" width="30" alt="Download" src="http://img.a4apphack.com/site/a4apphack-download.png" title="Download"/></a></p>
<p>A set of 3 tutorials illustrated here explains on how effectively can OllyDbg be used to identify the security holes and to ensure that the code written is healthy.</p>
<p><span id="more-459"></span></p>
<h3>Tutorial 1 &#8211; Unpack the compressed exe &amp; Find the hardcoded password</h3>
<p>First step is to get a picture of how application works by submitting some random data, understanding the sequence of dialog boxes displayed and analyzing it. This might serve useful at later point of time. Enter some random test string in the CrackMe application and click &#8216;Check the Serial&#8217;. Note down the message displayed in the alert box.</p>
<p><img class="alignnone size-full wp-image-463" title="CrackMe Screenshot" src="http://img.a4apphack.com/ollydbg-1a-crackme.png" alt="1a_crackme_ss" width="250" height="114" /></p>
<p>Drag and Drop the CrackMe app to OllyDbg to disassemble the binary. As a thumb rule, always do Right click &#8211; Search for &#8211; All referenced text strings, first, to obtain any text string being used in the application so that we can directly jump into the required memory location. The &#8216;messages&#8217; displayed in the alert box while a wrong key is entered, or any other info displayed while navigating the application are nothing but plain strings stored and being referred by a particular instruction which can be called as required.</p>
<p>Once the search is complete, results are displayed; and unfortunately displays no useful info after disassembling the app. Ideally it should have the message displayed, while that wrong value was entered, referred somewhere in the application. You must have noticed that an alert was displayed when the app was opened in OllyDbg which gives some hint that the application is compressed. This is the reason why Ollydbg is not disassembling the code properly.</p>
<p>So inorder to proceed further, we must uncompress/unpack the application. Here, UPX is used for packaging the app so we must use an option in <a title="UPX" href="http://upx.sourceforge.net/">UPX </a>to decompress the app. (Download the UPX from <a title="UPX" href="http://upx.sourceforge.net/">here</a>)</p>
<h4>Unpacking with UPX</h4>
<p>Copy the app exe into the same folder where UPX exe is present.</p>
<p>Open cmd and use the &#8216;decompress&#8217; option</p>
<p><code>upx -d CrackMe2.exe</code></p>
<p><a title="Unpack Console" href="http://img.a4apphack.com/ollydbg-1b-unpackconsole.png" rel="lightbox[459]"><img class="alignnone size-full wp-image-466" title="UPX unpack console" src="http://img.a4apphack.com/ollydbg-1b-unpackconsole.png" alt="1b_unpackconsole" width="450" height="154" /></a></p>
<p>Try &#8216;Search for&#8217; &#8211; &#8216;All referenced text strings&#8217; again.<br />
 <a title="Search Ref String Menu" href="http://img.a4apphack.com/ollydbg-1a-searchrefstringsmenu.png" rel="lightbox[459]"><img class="alignnone size-full wp-image-465" title="'Search Reference Strings' Menu" src="http://img.a4apphack.com/ollydbg-1a-searchrefstringsmenu.png" alt="1a_searchrefstringsmenu" width="450" height="488" /></a></p>
<p>Now we can see the comments and referenced string values in the results window. Scroll down to location where you can see these strings in the below screenshot. Double click to get to the location in the CPU main window. If you reverse engineer the logic we can find that &#8216;<span style="background-color: #ffff00;">12011982</span>&#8216; is the string which is compared before &#8216;<span style="background-color: #ffff00;">Trial CrackMe Cracked</span>&#8216; is displayed or called. (Check the tutorial found in the app zip for detailed info). Even otherwise, on the first shot itself we can do a &#8216;Trail and Error&#8217; method and guess that &#8217;12011982&#8242; is the key.</p>
<p><a title="Search Ref String" href="http://img.a4apphack.com/ollydbg-1a-searchrefstrings.png" rel="lightbox[459]"><img class="alignnone size-full wp-image-464" title="ReferenceStrings results" src="http://img.a4apphack.com/ollydbg-1a-searchrefstrings.png" alt="1a_searchrefstrings" width="470" height="183" /></a></p>
<p><strong>Conclusion </strong>: Never hardcode the static key in the code to compare the user input key.</p>
<p><strong>CrackMe app download :</strong> <a target="_blank" href="http://www.box.net/shared/hpty9zus1z"><img style="vertical-align: middle;" height="30" width="30" alt="Download" src="http://img.a4apphack.com/site/a4apphack-download.png" title="Download"/></a> Alt: <a target="_blank" href="http://dl.getdropbox.com/u/259868/Tutorial1.zip"><img style="vertical-align: middle;" height="30" width="30" alt="Download" src="http://img.a4apphack.com/site/a4apphack-download.png" title="Download"/></a></p>
<h4>Video</h4>
<p><object type="application/x-shockwave-flash" style="width:600px;height:385px" data="http://www.youtube.com/v/jeAyaNjTrEA&amp;hl=en&amp;fs=1"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="quality" value="best" /><param name="wmode" value="transparent" /><param name="movie" value="http://www.youtube.com/v/jeAyaNjTrEA&amp;hl=en&amp;fs=1" /><param name="pluginspage" value="http://www.macromedia.com/go/getflashplayer" />If you can see this, then you might need a Flash Player upgrade or you need to install Flash Player if it's missing. Get <a href="http://get.adobe.com/flashplayer/" target="_blank">Flash Player</a> from Adobe.</object><br/>
		<!-- Valid XHTML flash object delivered by XHTML Video Embed. Get it at: http://saltwaterc.net/xhtml-video-embed -->
		</p>
<img src="http://a4apphack.com/blog/?ak_action=api_record_view&id=459&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://a4apphack.com/security/patching-security-holes-with-ollydbg/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
	
		<series:name><![CDATA[OllyDbg]]></series:name>
	</item>
		<item>
		<title>Alert For Missing Subject And Attachment in Outlook</title>
		<link>http://a4apphack.com/programming/alert-missing-subject-and-attachment-outlook</link>
		<comments>http://a4apphack.com/programming/alert-missing-subject-and-attachment-outlook#comments</comments>
		<pubDate>Mon, 12 Jan 2009 06:22:40 +0000</pubDate>
		<dc:creator>rajivvishwa</dc:creator>
				<category><![CDATA[Email]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[lifesaver]]></category>
		<category><![CDATA[macro]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[outlook]]></category>

		<guid isPermaLink="false">http://a4apphack.com/blog/?p=357</guid>
		<description><![CDATA[Subject line in a mail is a key for identifying and digging the required mails from the mail archives. So we have to be careful not to miss it at any chance but unfortunately we do miss by accident. Another possible mistake we do is to miss the attachments mentioned in the mail. A script [...]]]></description>
			<content:encoded><![CDATA[<p>Subject line in a mail is a key for identifying and digging the required mails from the mail archives. So we have to be careful not to miss it at any chance but unfortunately we do miss by accident. Another possible mistake we do is to miss the attachments mentioned in the mail.</p>
<p><a title="Outlook Missing Subject Alert" href="http://img.a4apphack.com/outlookalert-screnshot.jpg" rel="lightbox[357]"><img class="alignnone size-full wp-image-361" title="Outlook Subject Alert Screenshot" src="http://img.a4apphack.com/outlookalert-screnshot.jpg" alt="Outlook Subject Alert Screenshot" width="350" height="154" /></a></p>
<p><span id="more-357"></span></p>
<p>A script is added to our outlook client which automatically pops up the alert as shown below.</p>
<p>The following script can be embedded in Outlook so that we get an alert whenever we miss the subject or the attachments</p>
<h3>Code</h3>

<div class="wp_syntax"><div class="code"><pre class="vb" style="font-family:monospace;"><span style="color: #E56717; font-weight: bold;">Private</span> <span style="color: #E56717; font-weight: bold;">Sub</span> Application_ItemSend(<span style="color: #151B8D; font-weight: bold;">ByVal</span> Item <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #F660AB; font-weight: bold;">Object</span>, cancel <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #F660AB; font-weight: bold;">Boolean</span>)
&nbsp;
<span style="color: #151B8D; font-weight: bold;">Dim</span> strSubject <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #F660AB; font-weight: bold;">String</span>
strSubject = Item.Subject
<span style="color: #8D38C9; font-weight: bold;">If</span> Len(Trim(strSubject)) = 0 <span style="color: #8D38C9; font-weight: bold;">Then</span>
    Prompt$ = <span style="color: #800000;">&quot;Subject is Empty. Are you sure you want to send the Mail?&quot;</span>
    <span style="color: #8D38C9; font-weight: bold;">If</span> MsgBox(Prompt$, vbYesNo + vbQuestion + vbMsgBoxSetForeground, <span style="color: #800000;">&quot;Subject is Empty&quot;</span>) = vbNo <span style="color: #8D38C9; font-weight: bold;">Then</span>
            cancel = <span style="color: #00C2FF; font-weight: bold;">True</span>
    <span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #8D38C9; font-weight: bold;">If</span>
<span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #8D38C9; font-weight: bold;">If</span>
&nbsp;
<span style="color: #151B8D; font-weight: bold;">Dim</span> lngres <span style="color: #151B8D; font-weight: bold;">As</span> <span style="color: #F660AB; font-weight: bold;">Long</span>
<span style="color: #8D38C9; font-weight: bold;">If</span> (InStr(1, UCase(Item.Body), <span style="color: #800000;">&quot;ATTACH&quot;</span>) &lt;&gt; 0 <span style="color: #8D38C9; font-weight: bold;">Or</span> InStr(1, UCase(Item.Body), <span style="color: #800000;">&quot;PFA&quot;</span>) &lt;&gt; 0) <span style="color: #8D38C9; font-weight: bold;">Then</span>
    <span style="color: #8D38C9; font-weight: bold;">If</span> Item.Attachments.Count = 0 <span style="color: #8D38C9; font-weight: bold;">Then</span>
        lngres = MsgBox(<span style="color: #800000;">&quot;Attachment reference detected, but no files attached. Send anyway?&quot;</span>, _
        vbYesNo + vbDefaultButton2 + vbQuestion, <span style="color: #800000;">&quot;No files Attached&quot;</span>)
&nbsp;
        <span style="color: #8D38C9; font-weight: bold;">If</span> lngres = vbNo <span style="color: #8D38C9; font-weight: bold;">Then</span> cancel = <span style="color: #00C2FF; font-weight: bold;">True</span>
    <span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #8D38C9; font-weight: bold;">If</span>
<span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #8D38C9; font-weight: bold;">If</span>
&nbsp;
<span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #E56717; font-weight: bold;">Sub</span></pre></div></div>

<h3>Installation</h3>
<ol>
<li>Open Outlook and Alt-F11 to open Visual Basic Editor</li>
<li>Copy this code to ThisOutlookSession</li>
</ol>
<img src="http://a4apphack.com/blog/?ak_action=api_record_view&id=357&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://a4apphack.com/programming/alert-missing-subject-and-attachment-outlook/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Cross-site request forgery Demo</title>
		<link>http://a4apphack.com/security/cross-site-request-forgery-demo</link>
		<comments>http://a4apphack.com/security/cross-site-request-forgery-demo#comments</comments>
		<pubDate>Thu, 01 Jan 2009 03:21:02 +0000</pubDate>
		<dc:creator>rajivvishwa</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[appsec]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[xsrf]]></category>

		<guid isPermaLink="false">http://a4apphack.com/blog/?p=199</guid>
		<description><![CDATA[XSRF is an exploit where malicious scripts are transmitted from one trusted site to trigger undesirable operations in some other user authenticated trusted site. The user-website trust is broken and this is exploited. Two demo PHP websites are used to demonstrate this attack. Here, the user is authenticated with VulnBank and the malicious embedded scripts [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.owasp.org/index.php/XSRF">XSRF</a> is an exploit where malicious scripts are transmitted from one trusted site to trigger undesirable operations in some other user authenticated trusted site. The user-website trust is broken and this is exploited.</p>
<p><span id="more-199"></span></p>
<p>Two demo PHP websites are used to demonstrate this attack. Here, the user is authenticated with VulnBank and the malicious embedded scripts in IMG tag, found in Vulnerable to XSRF site, transfers victims fund to the attacker account.</p>
<h3>XSRF In Action</h3>
<p><object type="application/x-shockwave-flash" style="width:600px;height:477px" data="http://img.a4apphack.com/dl/xsrf-Demo.swf"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="quality" value="best" /><param name="wmode" value="transparent" /><param name="movie" value="http://img.a4apphack.com/dl/xsrf-Demo.swf" /><param name="pluginspage" value="http://www.macromedia.com/go/getflashplayer" />If you can see this, then you might need a Flash Player upgrade or you need to install Flash Player if it's missing. Get <a href="http://get.adobe.com/flashplayer/" target="_blank">Flash Player</a> from Adobe.</object><br/>
		<!-- Valid XHTML flash object delivered by XHTML Video Embed. Get it at: http://saltwaterc.net/xhtml-video-embed -->
		</p>
<h3>How this works</h3>
<p>The attacker understands that a particular site trusted by the victim, here, VulnBank. He finds out that fund transfer operation can be invoked by activating a single url (once victim user is authenticated). He now finds out another victim trusted site which accepts user input and reflects the same if any error found in the input. So the attacker trys to inject an IMG tag which points to fund transfer link, appended with attacker crafted parameters. This is reflected back by the VulnSite, executes the IMG tag and activates the link along with it. The attacker copies the VulnSite&#8217;s URL which has the reflected Img tag and sends to the victim. Since the victim trusts the VulnSite he clicks it without any hesitation. During the page load, money gets transferred to the attacker account from the victim and victim isn&#8217;t even aware of it.</p>
<h3>PHP and SQL Codes</h3>
<h4>bankbal.sql</h4>
<p>(<a href="http://img.a4apphack.com/dl/xsrf-bankbal.sql.txt">Download file</a>)<br />
<script type='text/javascript' src='http://snipt.net/embed/3cbccc11d8602c8a53617d47fe83606e'></script></p>
<h4>VulnBank.php</h4>
<p>(<a href="http://img.a4apphack.com/dl/xsrf-VulnBank.php.txt">Download file</a>)<br />
<script type='text/javascript' src='http://snipt.net/embed/502a61f7694b479825121747947631b1'></script></p>
<h4>XSRFVulnSite.php</h4>
<p>(<a href="http://img.a4apphack.com/dl/xsrf-XSRFVulnSite.php.txt">Download file</a>)<br />
<script type='text/javascript' src='http://snipt.net/embed/4cd316d22e8f4511213fc95083c51c68'></script><br />
<em> Note: Rename the .txt files to the appropriate extensions preceded by .txt, and remove the &#8216;xsrf-&#8217; prefix from the filename</em></p>
<h4><strong><em> More Info </em></strong></h4>
<p><strong><em><a href="http://www.cgisecurity.com/csrf-faq.html">cgisecurity</a></p>
<p><a href="http://en.wikipedia.org/wiki/XSRF">Wikipedia</a></p>
<p><a href="http://www.owasp.org/index.php/XSRF">OWASP</a></p>
<p><a href="http://www.virtualforge.de/vmovie/xsrf/xsrf_attacked.html">XSRF Animated Movie</a></em></strong></p>
<img src="http://a4apphack.com/blog/?ak_action=api_record_view&id=199&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://a4apphack.com/security/cross-site-request-forgery-demo/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Enable-Disable Usb Drives With a Batch file in a Click</title>
		<link>http://a4apphack.com/security/enable-disable-usb-with-a-batch-file</link>
		<comments>http://a4apphack.com/security/enable-disable-usb-with-a-batch-file#comments</comments>
		<pubDate>Mon, 15 Dec 2008 16:39:13 +0000</pubDate>
		<dc:creator>rajivvishwa</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[automate]]></category>
		<category><![CDATA[batch]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[usb]]></category>

		<guid isPermaLink="false">http://a4apphack.com/blog/?p=108</guid>
		<description><![CDATA[With the help of batch programming we can enable or disable USB device in a single click.ACL permissions are also set during the process. The script will enable the security permissions which will help us to modify certain registry keys, then modifies the required keys and reverts back the permissions. First create four files as [...]]]></description>
			<content:encoded><![CDATA[<p>With the help of batch programming we can enable or disable USB device in a single click.ACL permissions are also set during the process.</p>
<p>The script will enable the security permissions which will help us to modify certain registry keys, then modifies the required keys and reverts back the permissions.</p>
<p><span id="more-108"></span>First create four files as mentioned below.</p>
<h3>0.reg</h3>

<div class="wp_syntax"><div class="code"><pre class="winbatch" style="font-family:monospace;">Windows Registry Editor <span style="color: #0000FF;">Version</span> <span style="color: #cc66cc;">5.00</span>
<span style="color: #66cc66;">&#91;</span>HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesUSBSTOR<span style="color: #66cc66;">&#93;</span>
<span style="color: #ff0000;">&quot;Start&quot;</span>=dword<span style="color: #FF1010; font-weight: bold;">:00000004</span></pre></div></div>

<h3>1.reg</h3>

<div class="wp_syntax"><div class="code"><pre class="winbatch" style="font-family:monospace;">Windows Registry Editor <span style="color: #0000FF;">Version</span> <span style="color: #cc66cc;">5.00</span>
<span style="color: #66cc66;">&#91;</span>HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesUSBSTOR<span style="color: #66cc66;">&#93;</span>
<span style="color: #ff0000;">&quot;Start&quot;</span>=dword<span style="color: #FF1010; font-weight: bold;">:00000003</span></pre></div></div>

<h3><a title="SubInACL Download" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=E8BA3E56-D8FE-4A91-93CF-ED6985E3927B">SubInACL</a></h3>
<p>Before proceeding further you need to download <a title="SubInACL Download" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=E8BA3E56-D8FE-4A91-93CF-ED6985E3927B" target="_blank">SubInACL</a> (Incase if the link doesn&#8217;t work, google for &#8216;SubInACL&#8217; to get the MS download link). This tool helps you to set ACL permissions for the registry keys through command line parameters.</p>

<div class="wp_syntax"><div class="code"><pre class="winbatch" style="font-family:monospace;"><span style="color: #66cc66;">@</span>echo <span style="color: #0080FF; font-weight: bold;">off</span>
cls
regedit <span style="color: #66cc66;">/</span>s <span style="color: #cc66cc;">0</span>.reg
subinacl.exe <span style="color: #66cc66;">/</span>keyreg systemcurrentcontrolsetservicesusbstor <span style="color: #66cc66;">/</span>deny=system
subinacl.exe <span style="color: #66cc66;">/</span>keyreg systemcurrentcontrolsetservicesusbstor <span style="color: #66cc66;">/</span>deny=users
subinacl.exe <span style="color: #66cc66;">/</span>keyreg systemcurrentcontrolsetservicesusbstor <span style="color: #66cc66;">/</span>deny=administrators
echo.
echo <span style="color: #66cc66;">**</span>Disabled<span style="color: #66cc66;">**</span>
echo.
<span style="color: #66cc66;">//</span><span style="color: #0000FF;">pause</span></pre></div></div>


<div class="wp_syntax"><div class="code"><pre class="winbatch" style="font-family:monospace;"><span style="color: #66cc66;">@</span>echo <span style="color: #0080FF; font-weight: bold;">off</span>
cls
subinacl.exe <span style="color: #66cc66;">/</span>keyreg systemcurrentcontrolsetservicesusbstor <span style="color: #66cc66;">/</span>grant=system
subinacl.exe <span style="color: #66cc66;">/</span>keyreg systemcurrentcontrolsetservicesusbstor <span style="color: #66cc66;">/</span>grant=users
subinacl.exe <span style="color: #66cc66;">/</span>keyreg systemcurrentcontrolsetservicesusbstor <span style="color: #66cc66;">/</span>grant=administrators
regedit <span style="color: #66cc66;">/</span>s <span style="color: #cc66cc;">1</span>.reg
echo.
echo <span style="color: #66cc66;">**</span>Enabled<span style="color: #66cc66;">**</span>
echo.
<span style="color: #66cc66;">//</span><span style="color: #0000FF;">pause</span></pre></div></div>

<p>After creating all the above mentioned files, put those in a directory. Make sure you have all the five files in the same directory (i.e 0.reg, 1.reg, enable.bat*, disable.bat* and subinacl.exe).</p>
<p>Now double click the batch file* to see it in action.</p>
<p><em>Note</em>*:</p>
<ul>
<em>Uncomment pause command to see the execution status in the command prompt.</em>
</ul>
<img src="http://a4apphack.com/blog/?ak_action=api_record_view&id=108&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://a4apphack.com/security/enable-disable-usb-with-a-batch-file/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Email RememberTheMilk tasks with AHK</title>
		<link>http://a4apphack.com/programming/email-rememberthemilk-tasks-with-ahk</link>
		<comments>http://a4apphack.com/programming/email-rememberthemilk-tasks-with-ahk#comments</comments>
		<pubDate>Sat, 13 Dec 2008 18:27:13 +0000</pubDate>
		<dc:creator>rajivvishwa</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://a4apphack.com/blog/?p=42</guid>
		<description><![CDATA[There is one good feature in RTM which allows us to submit any tasks via email. This serves very useful for few who can use corporate mails but cant access internet. Sending tasks in a particular format to your RTMId will do this job, but the bottleneck here is to remember the format of the [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://img.a4apphack.com/quickrtm-screenshot.jpg" rel="lightbox[1273]" title="QuickRTM"><img class="size-medium wp-image-47  alignright" title="QuickRTM" src="http://img.a4apphack.com/quickrtm-screenshot.jpg" alt="QuickRTM" width="174" height="174" /></a>There is one good feature in <a href="http://www.rememberthemilk.com/" target="_blank">RTM</a> which allows us to submit any tasks via <a href="http://www.rememberthemilk.com/help/answers/sending/emailinbox.rtm">email</a>. This serves very useful for few who can use corporate mails but cant access internet.</p>
<p>Sending tasks in a <a href="http://www.rememberthemilk.com/help/answers/sending/emailinbox.rtm">particular format</a> to your RTMId will do this job, but the bottleneck here is to remember the format of the mail. I&#8217;ve written an <a title="Autohotkey - www.autohotkey.com" href="http://www.autohotkey.com" target="_blank">AHK</a> script which displays a GUI interface to accepts the task details, formats the mail as required by RTM and invoke your default email client. (<em>You need <a title="AHK - www.autohotkey.com" href="http://www.autohotkey.com" target="_blank">AutoHotKey</a> to run the source code)</em></p>
<p><span id="more-1273"></span></p>
<p><em><strong>Note*: Put your RTMid where it is mentioned at the comment of the source code before running QuickRTM.</strong></em></p>
<h3>QuickRTM Code</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
</pre></td><td class="code"><pre class="winbatch" style="font-family:monospace;"><span style="color: #008000; font-style: italic;">;</span>
<span style="color: #008000; font-style: italic;">; QuickRTM v 1.0</span>
<span style="color: #008000; font-style: italic;">; AutoHotkey Version: 1.x</span>
<span style="color: #008000; font-style: italic;">; Language:       English</span>
<span style="color: #008000; font-style: italic;">; Platform:       Win9x/NT</span>
<span style="color: #008000; font-style: italic;">; Author:         Rajiv Vishwa</span>
<span style="color: #008000; font-style: italic;">;</span>
<span style="color: #008000; font-style: italic;">; Script Function:</span>
<span style="color: #008000; font-style: italic;">;	QuickRTM is used to create tasks in RTM with the help of GUI controls.</span>
<span style="color: #008000; font-style: italic;">; 	This is done by invoking email client with and use RTM formats</span>
<span style="color: #008000; font-style: italic;">;</span>
&nbsp;
<span style="color: #66cc66;">#</span>NoEnv  <span style="color: #008000; font-style: italic;">; Recommended for performance and compatibility with future AutoHotkey releases.</span>
SendMode Input  <span style="color: #008000; font-style: italic;">; Recommended for new scripts due to its superior speed and reliability.</span>
SetWorkingDir <span style="color: #66cc66;">%</span>A_ScriptDir<span style="color: #66cc66;">%</span>  <span style="color: #008000; font-style: italic;">; Ensures a consistent starting directory.</span>
<span style="color: #66cc66;">#</span>SingleInstance,Force
<span style="color: #66cc66;">#</span>NoTrayIcon
SetBatchLines,<span style="color: #66cc66;">-</span><span style="color: #cc66cc;">1</span>
AutoTrim, <span style="color: #0080FF; font-weight: bold;">on</span>
&nbsp;
<span style="color: #008000; font-style: italic;">;--------Your RTMid here-------</span>
RTMid = rajivvishwa<span style="color: #66cc66;">+</span>0b81be<span style="color: #66cc66;">@</span>rmilk.com
<span style="color: #008000; font-style: italic;">;------------------------------</span>
&nbsp;
Gui, Add, Text, section w60, RTMid<span style="color: #FF1010; font-weight: bold;">:</span>
Gui, Add, Text, w60, Task<span style="color: #FF1010; font-weight: bold;">:</span>
Gui, Add, Text, ys w200, <span style="color: #66cc66;">%</span>RTMid<span style="color: #66cc66;">%</span>
Gui, Add, Edit, w200 vTask, Task Name...
Gui, Add, Text, xm section w60, DueDate<span style="color: #FF1010; font-weight: bold;">:</span>
Gui, Add, <span style="color: #0000FF;">DateTime</span>, ys w175 vDate, dd<span style="color: #66cc66;">-</span>MMM<span style="color: #66cc66;">-</span>yyyy, dddd
FormatTime, DueDate1,, dd<span style="color: #66cc66;">-</span>MMM<span style="color: #66cc66;">-</span>yyyy
Gui, Add, ComboBox, w175 vDueDate2, Today<span style="color: #66cc66;">|</span>Tomorrow<span style="color: #66cc66;">|</span>Next Week
Gui, Add, Radio, ys<span style="color: #66cc66;">+</span><span style="color: #cc66cc;">5</span> vDueRadio checked
Gui, Add, Radio, y<span style="color: #66cc66;">+</span><span style="color: #cc66cc;">13</span>
Gui, Add, Text, xm section w60, List<span style="color: #FF1010; font-weight: bold;">:</span>
Gui, Add, DropDownList,ys w105 vList, Inbox<span style="color: #66cc66;">||</span>Work<span style="color: #66cc66;">|</span>Personal
Gui, Add, Text, ys w30, Priority<span style="color: #FF1010; font-weight: bold;">:</span>
Gui, Add, DropDownList, ys w40 vPriority, <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">|</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">||</span><span style="color: #cc66cc;">3</span><span style="color: #66cc66;">|</span><span style="color: #cc66cc;">4</span>
Gui, Add, Text, xm section w60, Tags<span style="color: #FF1010; font-weight: bold;">:</span>
Gui, Add, Edit, ys w200 vTags, tag1 tag2
Gui, Add, Edit, xm w270 h60 vNotes, Notes...
Gui, Add, Button, xm section w100, <span style="color: #66cc66;">&amp;</span>Submit
Gui, Add, Pic, ys w60, <span style="color: #66cc66;">%</span>A_WorkingDir<span style="color: #66cc66;">%</span>\QuickRTM.jpg
Gui, Add, Button, ys w100, <span style="color: #66cc66;">&amp;</span>Cancel
&nbsp;
START<span style="color: #FF1010; font-weight: bold;">:</span>
Gui, Show, w300, QuickRTM
<span style="color: #0000FF;">WinActivate</span> QuickRTM
<span style="color: #800080;">Return</span>
&nbsp;
ButtonSubmit<span style="color: #FF1010; font-weight: bold;">:</span>
Gui, submit
&nbsp;
<span style="color: #800080;">if</span> <span style="color: #66cc66;">&#40;</span>Notes = <span style="color: #ff0000;">&quot;Notes...&quot;</span> or Notes=<span style="color: #ff0000;">&quot;&quot;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
	Notes=Sent from QuickRTM
<span style="color: #66cc66;">&#125;</span>
<span style="color: #800080;">if</span> <span style="color: #66cc66;">&#40;</span>Task = <span style="color: #ff0000;">&quot;Task Name...&quot;</span> or Task=<span style="color: #ff0000;">&quot;&quot;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
	Msgbox, <span style="color: #cc66cc;">64</span>,, Have you really entered the Task<span style="color: #66cc66;">?</span>
	<span style="color: #800080;">goto</span> START
<span style="color: #66cc66;">&#125;</span>
<span style="color: #800080;">if</span> <span style="color: #66cc66;">&#40;</span>tags = <span style="color: #ff0000;">&quot;tag1 tag2&quot;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
	tags=
<span style="color: #66cc66;">&#125;</span><span style="color: #800080;">else</span><span style="color: #66cc66;">&#123;</span>
	tags = Tags<span style="color: #FF1010; font-weight: bold;">: %tags%`%0A`%0A</span>
<span style="color: #66cc66;">&#125;</span>
<span style="color: #800080;">if</span> <span style="color: #66cc66;">&#40;</span>DueRadio = <span style="color: #cc66cc;">1</span> and duedate2<span style="color: #66cc66;">!</span>=<span style="color: #ff0000;">&quot;&quot;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
	Msgbox, <span style="color: #cc66cc;">64</span>,, Error<span style="color: #66cc66;">!!!</span> <span style="color: #ff0000;">`r`</span>n<span style="color: #ff0000;">`r`</span>n Custom duedate field not empty<span style="color: #66cc66;">!</span>... <span style="color: #ff0000;">`r`</span>n <span style="color: #800080;">For</span> custom duedate please <span style="color: #800080;">select</span> radio2...
	<span style="color: #800080;">goto</span> START
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #800080;">if</span> DueRadio = <span style="color: #cc66cc;">1</span>
<span style="color: #66cc66;">&#123;</span>
Body = Due<span style="color: #FF1010; font-weight: bold;">: %duedate1%`%0A`%0APriority: %priority%`%0A`%0AList: %list%`%0A`%0A%tags%---`%0A`%0A%notes% `%0A`%0A-end-`%0A`%0A</span>
<span style="color: #66cc66;">&#125;</span><span style="color: #800080;">else</span><span style="color: #66cc66;">&#123;</span>
Body = Due<span style="color: #FF1010; font-weight: bold;">: %duedate2%`%0A`%0APriority: %priority%`%0A`%0AList: %list%`%0A`%0A%tags%---`%0A`%0A%notes% `%0A`%0A-end-`%0A`%0A</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #0000FF;">Run</span> mailto<span style="color: #FF1010; font-weight: bold;">:%RTMid%?subject=%task%&amp;body=%body%</span>
ExitApp
&nbsp;
ButtonCancel<span style="color: #FF1010; font-weight: bold;">:</span>
GuiClose<span style="color: #FF1010; font-weight: bold;">:</span>
ExitApp</pre></td></tr></table></div>

<p> Download this file : <a target="_blank" href="http://img.a4apphack.com/dl/quickrtm-downloadquickrtm.zip"><img style="vertical-align: middle;" height="30" width="30" alt="Download" src="http://img.a4apphack.com/site/a4apphack-download.png" title="Download"/></a></p>
<img src="http://a4apphack.com/blog/?ak_action=api_record_view&id=1273&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://a4apphack.com/programming/email-rememberthemilk-tasks-with-ahk/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced (Requested URI is rejected)
Object Caching 1419/1500 objects using disk: basic

Served from: a4apphack.com @ 2012-02-09 14:48:50 -->
