<?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; code</title>
	<atom:link href="http://a4apphack.com/index.php/tag/code/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>Py Script to Update Backtrack 5 Tools</title>
		<link>http://a4apphack.com/security/sec-code/py-script-to-update-backtrack-5-tools</link>
		<comments>http://a4apphack.com/security/sec-code/py-script-to-update-backtrack-5-tools#comments</comments>
		<pubDate>Wed, 11 Jan 2012 19:44:19 +0000</pubDate>
		<dc:creator>rajivvishwa</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[backtrack]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[updates]]></category>

		<guid isPermaLink="false">http://a4apphack.com/?p=2271</guid>
		<description><![CDATA[This Python script by the author &#8216;sickness&#8217; updates many of the tools present in Backtrack suite, which otherwise would&#8217;ve to be updated manually. Get the script Screenshot Source: backtrack-linux.org]]></description>
			<content:encoded><![CDATA[<p>This Python script by the author &#8216;sickness&#8217; updates many of the tools present in Backtrack suite, which otherwise would&#8217;ve to be updated manually.</p>
<p><strong>Get the script</strong></p>
<script type='text/javascript' src='http://snipt.net/embed/efac568d70a1554af513af5c2551ac68'></script>
<p><strong>Screenshot</strong></p>
<div class="wp-caption alignnone" style="width: 610px"><a href="http://img.a4apphack.com/backtrack5update.jpg" rel="lightbox[2271]" title="Backtrack5 Update Script"><img title="Backtrack5 Update Script" src="http://img.a4apphack.com/backtrack5update.jpg" alt="Backtrack5 Update Script" width="600" height="479" /></a><p class="wp-caption-text">Backtrack5 Update Script</p></div>
<p><strong>Source:</strong> <a title="Update Script for Backtrack 5" href="http://www.backtrack-linux.org/forums/backtrack-5-experts-section/41766-%5B-%5D-update-script-backtrack-5-a.html?langid=5" target="_blank" class="broken_link">backtrack-linux.org</a></p>
<table id="cft">
  <thead>
  <tr>
    <th colspan="2">Backtrack5 Update Script Info</th>
  </tr>
  </thead>
  <tbody>
    <tr>
      <td  width="40%">App Name</td>
      <td>Backtrack5 Update Script</td>
    </tr>
    <tr>
      <td>License</td>
      <td>free</td>
    </tr>
    <tr>
      <td>Type</td>
      <td>code</td>
    </tr>
    <tr>
      <td>App URL</td>
      <td>
      <a target="_blank" href="http://sickness.tor.hu/wp-content/uploads/2011/06/backtrack5_update.py"><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://www.backtrack-linux.org/forums/backtrack-5-experts-section/41766-%5B-%5D-update-script-backtrack-5-a.html?langid=5" class="broken_link">link</a></td>
    </tr>
  </tbody>
</table>

<img src="http://a4apphack.com/blog/?ak_action=api_record_view&id=2271&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://a4apphack.com/security/sec-code/py-script-to-update-backtrack-5-tools/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Embedding Vulnerabilities Trend Graph in SharePoint or Blog</title>
		<link>http://a4apphack.com/featured/embedding-vulnerabilities-trend-graph-in-sharepoint-or-blog</link>
		<comments>http://a4apphack.com/featured/embedding-vulnerabilities-trend-graph-in-sharepoint-or-blog#comments</comments>
		<pubDate>Mon, 01 Aug 2011 22:30:25 +0000</pubDate>
		<dc:creator>rajivvishwa</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[blogs]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[sharepoint]]></category>
		<category><![CDATA[ui]]></category>
		<category><![CDATA[visualization]]></category>

		<guid isPermaLink="false">http://a4apphack.com/?p=2212</guid>
		<description><![CDATA[In this post, we talk about using various third party Chart APIs to display a trend graph on any SharePoint site (or a blog). These graphs delivers a quick summary of the vulnerabilities identified during various security assessments. This can be embedded in a Security SharePoint portal or a dashboard which will be accessed by [...]]]></description>
			<content:encoded><![CDATA[<p>In this post, we talk about using various third party Chart APIs to display a trend graph on any SharePoint site (or a blog). These graphs delivers a quick summary of the vulnerabilities identified during various security assessments. This can be embedded in a Security SharePoint portal or a dashboard which will be accessed by clients/higher management.</p>
<p>For applications that are assessed at the end of every release cycle (version change), from this graph, one can visualize the trend of vulnerability detection. Here severity scale &#8211; Critical, High, Medium &amp; Low (Info) is also displayed in the graph.</p>
<p>We will have a look at 2 charting APIs to achieve this &#8211; Google Charts and Highcharts</p>
<h3>Using Google Charts</h3>
<p>By using Google Charts API, we try to embed the following chart on our SharePoint site. Once the code is embedded, user can hover over the data points to get its value and other information.</p>
<p><a href="http://img.a4apphack.com/vulntrendgraph-googlechart.jpg" rel="lightbox[2212]" title="Google Chart"><img class="alignnone" title="Google Chart" src="http://img.a4apphack.com/vulntrendgraph-googlechart.jpg" alt="Google Chart" width="600" height="266" /></a></p>
<p>There are various obvious reasons for choosing a chart API over a static image inserted into the site.</p>
<ol>
<li>Its easy to update. Just need to change the values in the embed code.</li>
<li>Less cluttered. As you can see, values of the data points are not displayed in the chart. If anyone needs to know the value, he/she just has to hover over any column.</li>
<li>This can later be programmed to update itself from the data available in any SharePoint list.</li>
</ol>
<p><span id="more-2212"></span> <strong>Steps</strong></p>
<p>1. Add a &#8216;Content Editor Web part&#8217; by clicking &#8216;Add a Web Part&#8217; option.</p>
<p><a href="http://img.a4apphack.com/vulntrendgraph-contenteditor.jpg" rel="lightbox[2212]" title="Adding Content Editor Web part"><img class="alignnone" title="Adding Content Editor Web part" src="http://img.a4apphack.com/vulntrendgraph-contenteditor.jpg" alt="Adding Content Editor Web part" width="500" height="339" /></a></p>
<p>2. Now access the &#8216;Source Editor&#8217; via &#8216;edit &#8211; Modify Shared Web Part&#8217;.</p>
<p><a href="http://img.a4apphack.com/vulntrendgraph-editsourcecode.jpg" rel="lightbox[2212]" title="Edit Source"><img class="alignnone" style="border: 1px solid black;" title="Edit Source" src="http://img.a4apphack.com/vulntrendgraph-editsourcecode.jpg" alt="Edit Source" width="543" height="319" /></a></p>
<p>3. Paste the following code on to the source editor. Replace the &#8216;data required&#8217; block to match with your data table.</p>
<script type='text/javascript' src='http://snipt.net/embed/4a0466bb811d990538f8374705f5facd'></script>
<p>4. You can use this google spreadsheet to convert tabular data to google charts API mark up - <a title="Google Spread Sheet Chart Data Code Gen" href="http://goo.gl/ALbIc">http://goo.gl/ALbIc</a>.</p>
<p><a href="http://img.a4apphack.com/vulntrendgraph-exceldatagen.jpg" rel="lightbox[2212]" title="Generate Data"><img class="alignnone" title="Generate Data" src="http://img.a4apphack.com/vulntrendgraph-exceldatagen.jpg" alt="Generate Data" /></a></p>
<p>5. Insert the data generated in column &#8216;H&#8217; on to the Google Chart code.</p>
<p><strong>Few Points</strong></p>
<ol>
<li>If you need to change the severity scale to something other than C, H, M, L then modify it on &#8216;<span style="font-family: Consolas, Monaco, 'Courier New', Courier, monospace; font-size: 12px; line-height: 18px; white-space: pre;">var rowData&#8217;</span> and the match the number of data values appropriately.</li>
<li>Change chart dimensions, color and other properties in <span style="font-family: 'courier new', courier;">draw()</span> options.</li>
</ol>
<h3>Using Highcharts</h3>
<p>High charts is yet another popular charting solution. Unlike, Google charts, we don&#8217;t have to modify the embed code to update the graph values. In the following example, we use a feature in highcharts that extracts value from HTML table that is displayed on the same page. So we just need to update the data in the HTML table using the SharePoint Rich Text Editor and graphs are automatically updated.</p>
<p><a href="http://img.a4apphack.com/vulntrendgraph-highchart.jpg" rel="lightbox[2212]" title="Highchart Trend"><img class="alignnone" title="Highchart Trend" src="http://img.a4apphack.com/vulntrendgraph-highchart.jpg" alt="Highchart Trend" width="600" height="426" /></a></p>
<p><strong>Steps</strong></p>
<p>First, we need to download <a title="Highcharts" href="http://www.highcharts.com/">Highcharts API</a> and extract it to our local directory. Then upload &#8216;<span style="font-family: 'courier new', courier;">highchart.js</span>&#8216; to your SharePoint site (I copied to &#8216;<span style="font-family: 'courier new', courier;">Shared Documents</span>&#8216;, you can upload it anywhere you want). Note the relative URL of that <span style="font-family: 'courier new', courier;">js</span> file.</p>
<p>1. Add 2 content editor webparts. One webpart holds embed code for Chart and other for data table</p>
<p>2. Chart webpart &#8211; Access source code editor and paste the following code. Replace the <span style="font-family: 'courier new', courier;">highcharts.js</span> URL with previously copied SharePoint URL. (It will be something like <span style="font-family: 'courier new', courier;">/Shared%20Documents/hc/highcharts.js</span>)</p>
<script type='text/javascript' src='http://snipt.net/embed/1ceef4f257a618b28325e9b580a5fd63'></script>
<p>3. Datatable webpart &#8211; Access source code editor and paste the following code.</p>
<script type='text/javascript' src='http://snipt.net/embed/e68d5f76b7efa451ba6e5a0604eefd2e'></script>
<p>4. Updating the data &#8211; Click on Modify Shared Web part and access the Rich Text Editor. Now, any one can modify the values from the table without messing up the embed code markup.</p>
<p><a href="http://img.a4apphack.com/vulntrendgraph-editdatatable.jpg" rel="lightbox[2212]" title="Edit Datatable"><img title="Edit Datatable" src="http://img.a4apphack.com/vulntrendgraph-editdatatable.jpg " alt="Edit Datatable" width="600" height="359" /></a></p>
<p>When the SharePoint page that contains the chart code loads, <span style="font-family: 'courier new', courier;">highchart.js</span> file will be initialized and values in the HTML table below (identified by the table id &#8211; &#8216;datatable&#8217;) are extracted and displayed on the graph. Similar to Google charts, we can hover over any of the columns to view the value of data point.</p>
<p><strong>Few Points</strong></p>
<ol>
<li>Chart dimensions can be modified by changing the attributes of &#8216;<span style="font-family: 'courier new', courier;">container</span>&#8216; div in Chart Web part source.</li>
<li>Match the value of table id with the value in <span style="font-family: Consolas, Monaco, 'Courier New', Courier, monospace; font-size: 12px; line-height: 18px; white-space: pre;">document.getElementById</span>. Default is &#8216;<span style="font-family: 'courier new', courier;">datatable</span>&#8216;</li>
<li>Change the severity levels in datatable by deleting or adding columns on Rich text editor. Your scale might be H, M, L so delete &#8216;Critical&#8217; column.</li>
<li>Change the title and other options in Highcharts code if necessary. Refer to <a title="Highcharts Documentation" href="http://www.highcharts.com/ref/">highchart documentation</a></li>
</ol>
<p>There are various other solutions which involves access to SharePoint designer or to be able to upload third-party web parts on the SharePoint server. If you want a simple front-end solution, this works the best.</p>
<table id="cft">
  <thead>
  <tr>
    <th colspan="2">Highcharts Info</th>
  </tr>
  </thead>
  <tbody>
    <tr>
      <td  width="40%">App Name</td>
      <td>Highcharts</td>
    </tr>
    <tr>
      <td>License</td>
      <td>free</td>
    </tr>
    <tr>
      <td>Type</td>
      <td>code</td>
    </tr>
    <tr>
      <td>App URL</td>
      <td>
      <a target="_blank" href="http://www.highcharts.com/download"><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://www.highcharts.com">link</a></td>
    </tr>
  </tbody>
</table>

<img src="http://a4apphack.com/blog/?ak_action=api_record_view&id=2212&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://a4apphack.com/featured/embedding-vulnerabilities-trend-graph-in-sharepoint-or-blog/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Batch File Decompiles Android apk to Java Source With a Single Command</title>
		<link>http://a4apphack.com/featured/batch-file-decompiles-android-apk-to-java-source-with-a-single-command</link>
		<comments>http://a4apphack.com/featured/batch-file-decompiles-android-apk-to-java-source-with-a-single-command#comments</comments>
		<pubDate>Thu, 21 Jul 2011 21:59:11 +0000</pubDate>
		<dc:creator>rajivvishwa</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[batch]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://a4apphack.com/?p=2190</guid>
		<description><![CDATA[This batch file decompiles an apk to its corresponding java sources. People who are looking forward to do a code review on an android app who&#8217;s source code is not readily available can utilize this bat. This batch runs various free tools available on the internet in a sequence to obtain the java source files. [...]]]></description>
			<content:encoded><![CDATA[<p>This batch file decompiles an apk to its corresponding java sources. People who are looking forward to do a code review on an android app who&#8217;s source code is not readily available can utilize this bat. This batch runs various free tools available on the internet in a sequence to obtain the java source files.</p>
<p>This is not made to encourage piracy/plagiarism in any case.</p>
<h3>How To</h3>
<p>1. Extract batch file and lib folder to <span style="font-family: courier new,courier;">C:\apk2java\</span> (or any folder that <strong>doesnt have space in its path</strong>)</p>
<p>2. Backup the target app&#8217;s apk from phone to PC via ASTRO Browser (check <a title="this post" href="http://a4apphack.com/security/sec-code/extract-android-apk-from-market-and-decompile-it-to-java-source">this post</a> for details)</p>
<p>3. Keep the target apk in the root folder where batch file is present</p>
<p><a href="http://img.a4apphack.com/apk2java-copytargetapk.jpg" rel="lightbox[2190]" title="Copy target apk to exec folder"><img title="Copy target apk to exec folder" src="http://img.a4apphack.com/apk2java-copytargetapk.jpg" alt="Copy target apk to exec folder" width="600" height="368" /></a></p>
<p>4. Run &#8216;apk2java.bat target.apk&#8217; in cmd</p>
<p><code>c:\apk2java&gt;apk2java.bat target.apk</code></p>
<p><a href="http://img.a4apphack.com/apk2java-executebatch.jpg" rel="lightbox[2190]" title="Execute Command"><img class="alignnone" title="Execute Command" src="http://img.a4apphack.com/apk2java-executebatch.jpg" alt="Execute Command" width="600" height="227" /></a></p>
<p><a href="http://img.a4apphack.com/apk2java-processcomplete.jpg" rel="lightbox[2190]" title="Process Complete"><img title="Process Complete" src="http://img.a4apphack.com/apk2java-processcomplete.jpg" alt="Process Complete" width="600" height="393" /></a></p>
<p><span id="more-2190"></span>5. Result : java and resource files available in &#8216;src&#8217;</p>
<p><a href="http://img.a4apphack.com/apk2java-outputsrc.jpg" rel="lightbox[2190]" title="src folder containing decompiled files"><img class="alignnone" title="src folder containing decompiled files" src="http://img.a4apphack.com/apk2java-outputsrc.jpg" alt="src folder containing decompiled files" width="600" height="367" /></a></p>
<p><strong>Note</strong>: This batch just automates the sequence in which various tools are initiated and does not handle any error events. You will have to go through the cmd verbose to figure out the problem.</p>
<p><strong>Note 2:</strong> &#8216;lib&#8217; folder contains apk-tool files (apk-tool.jar, aapt.exe), jad.exe, 7zip (7za.exe), dex2jar files (all other jars).  If required, update each of those tools by replacing it with latest copy from links mentioned below.</p>
<h3>Requirements</h3>
<ul>
<li>Windows (but can be ported to *NIX)</li>
<li>JRE 1.6 (Java Runtime Environment)</li>
</ul>
<h3>Tools in lib</h3>
<ul>
<li>Dex2jar &#8211; Converts Android dex format to jar (<a title="Dex2jar" href="http://code.google.com/p/dex2jar/">link</a>)</li>
<li>JAD &#8211; Java Decompiler CLI (<a title="JAD" href="http://www.varaneckas.com/jad">link</a>)</li>
<li>7Zip &#8211; Unarchival  (<a title="7Zip" href="http://www.7-zip.org/download.html">link</a>)</li>
<li>apk-tool &#8211; Extracts resources from apk (<a title="apk-tool" href="http://code.google.com/p/android-apktool/">link</a>)</li>
<li>aapt &#8211; Android Asset Packaging Tool <a title="Android Dev Guid" href="http://developer.android.com/guide/developing/building/index.html">(link)</a></li>
<li>aapt commands (<a title="aapt commands" href="http://elinux.org/Android_aapt">link)</a></li>
</ul>
<script type='text/javascript' src='http://snipt.net/embed/00aea84a3ffd7b7b8150241c20727adf'></script>
<table id="cft">
  <thead>
  <tr>
    <th colspan="2">apk2java Info</th>
  </tr>
  </thead>
  <tbody>
    <tr>
      <td  width="40%">App Name</td>
      <td>apk2java</td>
    </tr>
    <tr>
      <td>License</td>
      <td>free</td>
    </tr>
    <tr>
      <td>Type</td>
      <td>code</td>
    </tr>
    <tr>
      <td>App URL</td>
      <td>
      <a target="_blank" href="http://img.a4apphack.com/dl/apk2java.zip"><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="">link</a></td>
    </tr>
  </tbody>
</table>

<img src="http://a4apphack.com/blog/?ak_action=api_record_view&id=2190&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://a4apphack.com/featured/batch-file-decompiles-android-apk-to-java-source-with-a-single-command/feed</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Extract Android apk from Market and Decompile it to Java Source</title>
		<link>http://a4apphack.com/security/sec-code/extract-android-apk-from-market-and-decompile-it-to-java-source</link>
		<comments>http://a4apphack.com/security/sec-code/extract-android-apk-from-market-and-decompile-it-to-java-source#comments</comments>
		<pubDate>Wed, 20 Apr 2011 18:29:53 +0000</pubDate>
		<dc:creator>rajivvishwa</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[apps]]></category>
		<category><![CDATA[automate]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[scan]]></category>

		<guid isPermaLink="false">http://a4apphack.com/?p=2152</guid>
		<description><![CDATA[This post talks about process of extracting apk file of any app available in market and then decompiling it to Java source. This can be helpful for those who perform code review (for security vulnerabilities) on apps whose source code is not available. Once Java source code is obtained, we can either do manual code [...]]]></description>
			<content:encoded><![CDATA[<p>This post talks about process of extracting apk file of any app available in market and then decompiling it to Java source. This can be helpful for those who perform code review (for security vulnerabilities) on apps whose source code is not available. Once Java source code is obtained, we can either do manual code review or run any free/commercial automated code scanners.</p>
<p><span id="more-2152"></span></p>
<h3>Download .apk file from market</h3>
<ol>
<li>Search in market for the app you want to decompile and install it on your phone.</li>
<li>Install Astro File Manager from market (<a title="Astro File Manager (Android Market Link)" href="https://market.android.com/details?id=com.metago.astro">link</a>). Open Astro &gt; Tools &gt; Application Manager/Backup and select the application to backup on to the SD card .</li>
<li>Mount phone as USB drive and access <code>'\backups\apps\'</code> folder to find the apk of target app (lets call it targetapp.apk) . Copy it to your local drive.</li>
</ol>
<h3>Decomiling apk to Dex format</h3>
<ol>
<li>Download Dex2Jar (<a title="Dex2Jar" href="http://code.google.com/p/dex2jar/">link</a>) (Android runs applications which are in <a rel="nofollow" href="http://en.wikipedia.org/wiki/Dalvik_%28software%29">Dalvik Executable (.dex) format</a>).</li>
<li>Run the command to convert apk to jar<code></code><code></code></li>
</ol>
<p><code>dex2jar targetapp.apk file(./dex2jar targetapp.apk on terminal)</code></p>
<p style="padding-left: 30px;">File ‘targetapp.apk.dex2jar.jar’ is created</p>
<p><a href="http://img.a4apphack.com/androiddecompile-04.jpg" rel="lightbox[2152]" title="Converting Apk (Dex) to Jar"><img title="Converting Apk (Dex) to Jar" src="http://img.a4apphack.com/androiddecompile-04.jpg" alt="Converting Apk (Dex) to Jar" width="600" height="396" /></a></p>
<h3>Viewing/Decompiling the Jar files to Java</h3>
<h4>Method 1 : Use JavaDecompiler (JD)</h4>
<ol>
<li>Open ‘targetapp.apk.dex2jar.jar’ with jd-gui (<a title="JD GUI" href="http://java.decompiler.free.fr/?q=jdgui">link</a>)</li>
<li>File &gt; Save All Sources to sava the class files in jar to java files.</li>
</ol>
<p><a href="http://img.a4apphack.com/androiddecompile-05.jpg" rel="lightbox[2152]" title="JD GUI Viewer"><img class="alignnone" title="JD GUI Viewer" src="http://img.a4apphack.com/androiddecompile-05.jpg" alt="JD GUI Viewer" width="600" height="374" /></a></p>
<h4>Method 2: JAD</h4>
<ol>
<li>Extract contents of jar file on to a folder named src. Use and unarchival utility like 7zip</li>
<li>Keep ‘src’ folder in the same directory where JAD and targetapp jar is present</li>
<li>Open JAD in cmd and execute the following command</li>
<li><code>jad -o -r -sjava -dsrc src/**/*.class</code> (./jad on terminal)</li>
</ol>
<p><a href="http://img.a4apphack.com/androiddecompile-07.jpg" rel="lightbox[2152]" title="Extract jar contents to src folder"><img class="alignnone" title="Extract jar contents to src folder" src="http://img.a4apphack.com/androiddecompile-07.jpg" alt="Extract jar contents to src folder" width="600" height="441" /></a></p>
<p><a href="http://img.a4apphack.com/androiddecompile-08.jpg" rel="lightbox[2152]" title="Running jad command"><img class="alignnone" title="Running jad command" src="http://img.a4apphack.com/androiddecompile-08.jpg" alt="Running jad command" width="600" height="413" /></a></p>
<p>Now src will contain decompiled Java files ready for manual code review.</p>
<p><a href="http://img.a4apphack.com/androiddecompile-09.jpg" rel="lightbox[2152]" title="Decompiled java files"><img class="alignnone" title="Decompiled java files" src="http://img.a4apphack.com/androiddecompile-09.jpg" alt="Decompiled java files" width="600" height="413" /></a></p>
<h3>Tools Used</h3>
<ol>
<li>Sample app &#8211; RemoteDroid (Opensource &#8211; <a title="RemoteDroid" href="http://code.google.com/p/remotedroid/downloads/detail?name=RemoteDroid-v1.4.apk&amp;can=2&amp;q=">link</a>)</li>
<li>Astro File Manager (Android Market &#8211; <a title="Astro File Manager (Android Market Link)" href="https://market.android.com/details?id=com.metago.astro">link</a>)</li>
<li>Dex2Jar (<a title="Dex2Jar" href="http://code.google.com/p/dex2jar/">link</a>)</li>
<li>jd-gui (<a title="JD GUI" href="http://java.decompiler.free.fr/?q=jdgui">link</a>)</li>
<li>JAD (<a title="Java Decompiler Download" href="http://www.varaneckas.com/jad">link</a>)</li>
</ol>
<table id="cft">
  <thead>
  <tr>
    <th colspan="2">Dex2Jar Info</th>
  </tr>
  </thead>
  <tbody>
    <tr>
      <td  width="40%">App Name</td>
      <td>Dex2Jar</td>
    </tr>
    <tr>
      <td>License</td>
      <td>free</td>
    </tr>
    <tr>
      <td>Type</td>
      <td><ul>
<li>portable</li>
<li>code</li>
</ul>
</td>
    </tr>
    <tr>
      <td>App URL</td>
      <td>
      <a target="_blank" href="http://code.google.com/p/dex2jar/"><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://code.google.com/p/dex2jar/">link</a></td>
    </tr>
  </tbody>
</table>

<img src="http://a4apphack.com/blog/?ak_action=api_record_view&id=2152&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://a4apphack.com/security/sec-code/extract-android-apk-from-market-and-decompile-it-to-java-source/feed</wfw:commentRss>
		<slash:comments>24</slash:comments>
		</item>
		<item>
		<title>Root, Backup Apps+Data and Install Cyanogenmod 7 Gingerbread on G2/Vision Phone</title>
		<link>http://a4apphack.com/featured/root-backup-appsdata-and-install-cyanogenmod-7-gingerbread-on-g2vision-phone</link>
		<comments>http://a4apphack.com/featured/root-backup-appsdata-and-install-cyanogenmod-7-gingerbread-on-g2vision-phone#comments</comments>
		<pubDate>Mon, 28 Mar 2011 02:59:12 +0000</pubDate>
		<dc:creator>rajivvishwa</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[root]]></category>

		<guid isPermaLink="false">http://a4apphack.com/?p=2119</guid>
		<description><![CDATA[This post explains about rooting a Tmobile G2/HTC Vision and then installing Cyanogenmod 7 (Gingerbread) while retaining the apps and data that were in use with stock ROM. Entire process from rooting till installation of Cyanogenmod should not take more than half an hour. Root Your G2 Install Terminal Emulator and a file manager (such [...]]]></description>
			<content:encoded><![CDATA[<p>This post explains about rooting a Tmobile G2/HTC Vision and then installing Cyanogenmod 7 (Gingerbread) while retaining the apps and data that were in use with stock ROM. Entire process from rooting till installation of Cyanogenmod should not take more than half an hour.</p>
<p><span id="more-2119"></span></p>
<h3>Root Your G2</h3>
<ol>
<li> Install Terminal Emulator and a file manager (such as Astro File Manager) from the Market.</li>
<li> Extract the contents of the zip file (Download from <a title="root_files" href="http://forum.xda-developers.com/showpost.php?p=10875976&amp;postcount=1">XDA site</a> / <a title="box.net - root_files.zip" href="http://www.box.net/shared/2qn5oxdxfv">here</a>) to the SD card (this will create a directory called root_files on the card). When done, make sure you unmount your SD card from your computer if you had mounted it as a storage device to transfer the files.</li>
<li> Enable Unknown Sources (under Settings-&gt;Applications) and USB Debugging (under Settings-&gt;Applications-&gt;Development).</li>
<li> Using your file manager, navigate to the root_files directory on your SD card and select &#8220;com.modaco.visionaryplus.r14.apk&#8221; to install the Visionary app.</li>
<li> Start the Visionary app and click on &#8220;Temproot now.&#8221; Leave all other settings unchecked.</li>
<li> Start the Terminal app and type the following commands (the $ and # symbols represent the command prompt and should not be typed):</li>
</ol>
<script type='text/javascript' src='http://snipt.net/embed/2602d8c2636514a3033603a518dfc1a5'></script>
<div class="wp-caption aligncenter" style="width: 310px"><a title="Select Temproot now in Visionary" href="http://img.a4apphack.com/g2root-291.jpg" rel="lightbox[2119]"><img class="" title="Select Temproot now in Visionary" src="http://img.a4apphack.com/g2root-291.jpg" alt="Select Temproot now in Visionary" width="300" height="450" /></a><p class="wp-caption-text">Select Temproot now in Visionary</p></div>
<div class="wp-caption aligncenter" style="width: 310px"><a title="Temp Root in progress via Visionary Plus" href="http://img.a4apphack.com/g2root-288.jpg" rel="lightbox[2119]"><img title="Temp Root in progress via Visionary Plus" src="http://img.a4apphack.com/g2root-288.jpg" alt="Temp Root in progress via Visionary Plus" width="300" height="450" /></a><p class="wp-caption-text">Temp Root in progress via Visionary Plus</p></div>
<div class="wp-caption aligncenter" style="width: 460px"><a href="http://img.a4apphack.com/g2root-294.jpg" rel="lightbox[2119]" title="Perm Root commands"><img class="" title="Perm Root commands" src="http://img.a4apphack.com/g2root-294.jpg" alt="Perm Root commands" width="450" height="300" /></a><p class="wp-caption-text">Perm Root commands</p></div>
<div class="wp-caption aligncenter" style="width: 460px"><a href="http://img.a4apphack.com/g2root-301.jpg" rel="lightbox[2119]" title="Perm Root execution in progress"><img class="" title="Perm Root execution in progress" src="http://img.a4apphack.com/g2root-301.jpg" alt="Perm Root execution in progress" width="450" height="300" /></a><p class="wp-caption-text">Perm Root execution in progress</p></div>
<p>You will see multiple messages scroll by as the programs run. Once you are returned to the prompt in terminal, you will have permanent root (S-OFF), as well as subsidy unlock and SuperCID.</p>
<h3>Steps to Backup Installed Apps + Data to SD card (using Titanium Backup)</h3>
<ol>
<li>Install Titanium Backup from Market (free version would do the job, though it will take only one version of backup).</li>
<li>Make sure the latest / good version of BusyBox is installed (hit the &#8220;Problems&#8221; button lower right in Titanium home screen)</li>
<li>Un-check &#8220;Auto-sync TB settings&#8221; under Preferences</li>
<li>Only Run &#8220;Backup all user apps&#8221; under &#8216;Batch&#8217;.</li>
<li>Titanium takes a backup of app and user data to SDCard.</li>
</ol>
<div class="wp-caption aligncenter" style="width: 266px"><img class="" title="Batch backup" src="http://img.a4apphack.com/g2root-titaniumbatchback.jpg" alt="Batch backup" width="256" height="455" /><p class="wp-caption-text">Batch backup</p></div>
<h3>Steps to Backup Stock ROM to SD card (Using Clockworkmod Recovery)</h3>
<ol>
<li>Install ROM Manager from Market (free version)</li>
<li>Open ROM Manager and select &#8216;Flash ClockworkMod Recovery&#8217;. Confirm the phone model and wait until flash operation is complete.</li>
<li>Now &#8216;Select Reboot to Recovery Option&#8217;.</li>
<li>In Recovery console, scroll to &#8216;backup/restore&#8217; (Trackpad button to scroll and select, Power button to go back) and then select &#8216;backup&#8217; to initiate stock ROM backup process. (It will take 5-10 mins).</li>
<li>Once the backup is complete you will be redirected back to recovery console.</li>
<li>(Optional: copy Titanium backup folder &amp; Clockworkmod backup folder form the SDCard root folder to your PC, just in case)</li>
</ol>
<div class="wp-caption aligncenter" style="width: 310px"><a href="http://img.a4apphack.com/g2root-304.jpg" rel="lightbox[2119]" title="Flashing Clockworkmod Recovery"><img class="" title="Flashing Clockworkmod Recovery" src="http://img.a4apphack.com/g2root-304.jpg" alt="Flashing Clockworkmod Recovery" width="300" height="450" /></a><p class="wp-caption-text">Flashing Clockworkmod Recovery</p></div>
<div class="wp-caption aligncenter" style="width: 310px"><a href="http://img.a4apphack.com/g2root-291.jpg" rel="lightbox[2119]" title="Rom Manager Requesting for SuperUser access"><img class="" title="Rom Manager Requesting for SuperUser access" src="http://img.a4apphack.com/g2root-305.jpg" alt="Rom Manager Requesting for SuperUser access" width="300" height="450" /></a><p class="wp-caption-text">Rom Manager Requesting for SuperUser access</p></div>
<div class="wp-caption aligncenter" style="width: 310px"><a href="http://img.a4apphack.com/g2root-307.jpg" rel="lightbox[2119]" title="Recovery Console"><img class="" title="Recovery Console" src="http://img.a4apphack.com/g2root-307.jpg" alt="Recovery Console" width="300" height="450" /></a><p class="wp-caption-text">Recovery Console</p></div>
<div class="wp-caption aligncenter" style="width: 310px"><a href="http://img.a4apphack.com/g2root-311.jpg" rel="lightbox[2119]" title="Backup in Progress"><img class="" title="Backup in Progress" src="http://img.a4apphack.com/g2root-311.jpg" alt="Backup in Progress" width="300" height="448" /></a><p class="wp-caption-text">Backup in Progress</p></div>
<div class="wp-caption aligncenter" style="width: 310px"><a href="http://img.a4apphack.com/g2root-314.jpg" rel="lightbox[2119]" title="Backup Complete"><img title="Backup Complete" src="http://img.a4apphack.com/g2root-314.jpg" alt="Backup Complete" width="300" height="450" /></a><p class="wp-caption-text">Backup Complete</p></div>
<h3>Install Custom ROM &#8211; Cyanogenmod 7 based on Gingerbread</h3>
<ol>
<li>Download the latest Cyanogenmod ROM zip file for G2 from <a title="Cyanogenmod" href="http://www.cyanogenmod.com/">here</a>.</li>
<li>Download Google Apps bundle from <a title="Google Apps Bundle" href="http://www.box.net/shared/y8darcc9zt">here</a>. Its recommended to keep the zip on the root of SDCard.</li>
<li>Copy the zip file to Sdcard root directory. Unmount Sdcard from computer.</li>
<li>On your phone recovery console select <strong>wipe data/factory reset, wipe cache partition and Advanced &gt; &#8216;Wipe Dalvik cache&#8217;. </strong>(Ensure that this step is complete before proceeding ahead).</li>
<li>Now select the option &#8216;install zip from sdcard&#8217; and choose cyanogenmod 7 zip that was copied earlier.</li>
</ol>
<div class="wp-caption aligncenter" style="width: 460px"><a href="http://img.a4apphack.com/g2root-318.jpg" rel="lightbox[2119]" title="Wipe Cache, data ans Select Cyanogen zip from sdcard"><img class="" title="Wipe Cache, data ans Select Cyanogen zip from sdcard" src="http://img.a4apphack.com/g2root-318.jpg" alt="Wipe Cache, data ans Select Cyanogen zip from sdcard" width="450" height="366" /></a><p class="wp-caption-text">Wipe Cache, data ans Select Cyanogen zip from sdcard</p></div>
<h3>
<div class="wp-caption aligncenter" style="width: 460px"><a href="http://img.a4apphack.com/g2root-320.jpg" rel="lightbox[2119]" title="Cyanogen Boot Screen"><img class="" title="Cyanogen Boot Screen" src="http://img.a4apphack.com/g2root-320.jpg" alt="Cyanogen Boot Screen" width="450" height="301" /></a><p class="wp-caption-text">Cyanogen Boot Screen</p></div>
<p><div class="wp-caption aligncenter" style="width: 460px"><a href="http://img.a4apphack.com/g2root-322.jpg" rel="lightbox[2119]" title="G2 with Honeycomb Theme"><img class="" title="G2 with Honeycomb Theme" src="http://img.a4apphack.com/g2root-322.jpg" alt="G2 with Honeycomb Theme" width="450" height="301" /></a><p class="wp-caption-text">G2 with Honeycomb Theme</p></div></h3>
<h3>Install Google Apps</h3>
<ol>
<li>In recovery console select &#8216;install zip from sdcard&#8217; and choose the google apps zip file. Reboot the device.</li>
</ol>
<p><strong>Note:</strong> Now Cyanogenmod bootloader will be displayed. It might take one or two minutes to boot to the new OS. My phone started looping through the boot screen and the home screen. If that happens reboot your device once or twice.</p>
<h3>Restore Backed-up Apps + Data via Titanium Backup</h3>
<ol>
<li>Install Titanium Backup from Market.</li>
<li>After opening Titanium, selectively restore apps from the &#8220;Restore all apps with data&#8221; (these will only be user apps per 3. above) by selecting this batch operation and un-checking the apps I do not want to restore via Titanium prior to running the batch operation (by default all apps will be selected). You can also select here to restore just the app, app + data, or just data.</li>
</ol>
<div class="wp-caption aligncenter" style="width: 266px"><img class="" title="Restore Apps and Data" src="http://img.a4apphack.com/g2root-titaniumrestore.jpg" alt="Restore Apps and Data" width="256" height="273" /><p class="wp-caption-text">Restore Apps and Data</p></div>
<p><strong>Content extracted from</strong></p>
<ul>
<li>xda-developers (<a title="http://forum.xda-developers.com/showthread.php?t=928160" href="http://forum.xda-developers.com/showthread.php?t=928160">link</a>), g2hacks (<a title="http://g2hacks.com/g2-hacks/how-to-install-rom-manager-on-your-g2-phone/" href="http://g2hacks.com/g2-hacks/how-to-install-rom-manager-on-your-g2-phone/">link1</a>, <a title="http://g2hacks.com/g2-hacks/how-to-backuprestore-using-clockwork-recovery-rom-manager-on-g2-phone/" href="http://g2hacks.com/g2-hacks/how-to-backuprestore-using-clockwork-recovery-rom-manager-on-g2-phone/">link2</a>), addictivetips (<a title="http://www.addictivetips.com/mobile/install-cyanogenmod-7-nightly-rom-on-htc-desire-z-t-mobile-g2/" href="http://www.addictivetips.com/mobile/install-cyanogenmod-7-nightly-rom-on-htc-desire-z-t-mobile-g2/">link1</a>, <a title="http://www.addictivetips.com/mobile/install-gingerbread-based-typhoon-cyanogenmod-7-rom-on-htc-hd2/" href="http://www.addictivetips.com/mobile/install-gingerbread-based-typhoon-cyanogenmod-7-rom-on-htc-hd2/">link2</a>)</li>
</ul>
<table id="cft">
  <thead>
  <tr>
    <th colspan="2">CyanogenMod 7 Info</th>
  </tr>
  </thead>
  <tbody>
    <tr>
      <td  width="40%">App Name</td>
      <td>CyanogenMod 7</td>
    </tr>
    <tr>
      <td>License</td>
      <td>free</td>
    </tr>
    <tr>
      <td>Type</td>
      <td>code</td>
    </tr>
    <tr>
      <td>App URL</td>
      <td>
      <a target="_blank" href="http://www.cyanogenmod.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://www.cyanogenmod.com/devices/t-mobile-g2">link</a></td>
    </tr>
  </tbody>
</table>

<img src="http://a4apphack.com/blog/?ak_action=api_record_view&id=2119&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://a4apphack.com/featured/root-backup-appsdata-and-install-cyanogenmod-7-gingerbread-on-g2vision-phone/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<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>Gruyere &#8211; Vulnerable Web Application At Google Code (Previously Jarlsberg)</title>
		<link>http://a4apphack.com/security/sec-code/jarlsberg-vulnerable-web-application-at-google-code</link>
		<comments>http://a4apphack.com/security/sec-code/jarlsberg-vulnerable-web-application-at-google-code#comments</comments>
		<pubDate>Mon, 17 May 2010 19:11:29 +0000</pubDate>
		<dc:creator>rajivvishwa</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[attack]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[learn]]></category>
		<category><![CDATA[phishing]]></category>
		<category><![CDATA[va]]></category>
		<category><![CDATA[xsrf]]></category>
		<category><![CDATA[xss]]></category>

		<guid isPermaLink="false">http://a4apphack.com/index.php/?p=1936</guid>
		<description><![CDATA[Gruyere is a vulnerable application which can be used to learn and understand web vulnerabilities. Detailed documentation is provided on the type of the vulnerabilities present in the application and ways to exploits it. Update: Jarlsberg is now Gruyere This codelab shows how web application vulnerabilities can be exploited and how to defend against these attacks. [...]]]></description>
			<content:encoded><![CDATA[<p>Gruyere is a vulnerable application which can be used to learn and understand web vulnerabilities. Detailed documentation is provided on the type of the vulnerabilities present in the application and ways to exploits it.</p>
<p><strong><span style="color: #800000;">Update</span>: Jarlsberg is now Gruyere<br />
</strong></p>
<ul>
</ul>
<p><em>This codelab shows how web application vulnerabilities can be exploited and how to defend against these attacks. The best way to learn things is by doing, so you&#8217;ll get a chance to do some real penetration testing, actually exploiting a real application. Specifically, you&#8217;ll learn the following:</em></p>
<ul>
<li><em> How an application can be attacked using common web security vulnerabilities, like cross-site scripting vulnerabilities (XSS) and cross-site request forgery (XSRF). </em></li>
<li><em> How to find, fix, and avoid these common vulnerabilities and other bugs that have a security impact, such as denial-of-service, information disclosure, or remote code execution. </em></li>
</ul>
<p><a title="Jarlsberg Documentation" href="http://jarlsberg.appspot.com/part2">Documentation Here</a></p>
<p><img class="alignnone" title="Jarlsberg - Hosted Vulnerable App" src="http://img.a4apphack.com/jarlsbergapp-main.jpg" alt="Jarlsberg - Hosted Vulnerable App" width="600" height="412" /></p>
<p><span id="more-1936"></span></p>
<p><strong>Some Exploit Screenshots</strong></p>
<p>Information Disclosure &#8211; Read the contents of the database off of a running server by exploiting a configuration vulnerability.</p>
<p><em>Debug Dump Page URL</em> &#8211; http://google-gruyere.appspot.com/<span style="color: #ff0000;">457262944951</span>/dump.jtl</p>
<p>The id changes based on your session.</p>
<p><img class="alignnone" title="Jarlsberg Dump Page" src="http://img.a4apphack.com/jarlsbergapp-dump.jpg" alt="Jarlsberg Dump Page" width="600" height="405" /></p>
<p><strong>Reflected XSS</strong></p>
<p>Alert Dialog box which indicates the presence of <a title="Cross Site Scripting Vulnerability" href="http://a4apphack.com/index.php/security/xss-made-simple-flash-animation">Cross Site Scripting Vulnerability</a> present in Jarlsberg</p>
<p><br class="spacer_" /></p>
<div class="wp-caption alignnone" style="width: 610px"><img class="" title="Stored XSS alert" src="http://img.a4apphack.com/jarlsbergapp-storedxss.jpg" alt="Stored XSS alert" width="600" height="340" /><p class="wp-caption-text">Stored XSS alert</p></div>
<p><br class="spacer_" /></p>
<h3><strong>Features</strong></h3>
<p>Jarlsberg includes a number of special features and technologies which add attack surface.</p>
<ul>
<li> HTML in Snippets: Users can include a limited subset of HTML in their snippets. </li>
<li> File upload: Users can upload files to the server, e.g., to include pictures in their snippets. </li>
<li> Web administration: System administrators can manage the system using a web interface. </li>
<li> New accounts: Users can create their own accounts. </li>
<li> Template language: Jarlsberg Template Language(JTL) is a new language that makes writing web pages easy as the templates connect directly to the database. Documentation for JTL can be found in <code><a href="http://google-gruyere.appspot.com/code/?jtl.py">gruyere/jtl.py</a></code>. </li>
<li> AJAX: Jarlsberg uses AJAX to implement refresh on the home and snippets page. You should ignore the AJAX parts of Jarlsberg except for the challenges that specifically tell you to focus on AJAX. </li>
</ul>
<h3><strong>Vulnerabilities In Gruyere</strong></h3>
<ul>
<li>Cross-Site Scripting (XSS)
<ul>
<li>File Upload XSS</li>
<li>Reflected XSS</li>
<li>Stored XSS</li>
<li>Stored XSS via HTML Attribute</li>
<li>Stored XSS via AJAX</li>
<li>Reflected XSS via AJAX</li>
</ul>
</li>
<li>Client-State Manipulation
<ul>
<li>Elevation of Privilege</li>
<li>Cookie Manipulation</li>
</ul>
</li>
<li>Cross-Site Request Forgery (XSRF)</li>
<li>Cross Site Script Inclusion (XSSI)</li>
<li>Path Traversal
<ul>
<li>Information disclosure via path traversal</li>
<li>Data tampering via path traversal</li>
</ul>
</li>
<li>Denial of Service
<ul>
<li>DoS &#8211; Quit the Server</li>
<li>DoS &#8211; Overloading the Server</li>
</ul>
</li>
<li>Code Execution</li>
<li>Information disclosure</li>
<li>AJAX vulnerabilities
<ul>
<li>DoS via AJAX</li>
<li>Phishing via AJAX</li>
</ul>
</li>
<li>Buffer Overflow and Integer Overflow</li>
<li>SQL Injection</li>
</ul>
<p>Explore hosted version of Jarlsberg and start uncovering the vulnerabilities</p>
<p><a title="Gruyere" href="http://google-gruyere.appspot.com/start">Gruyere Hosted Version</a></p>
<table id="cft">
  <thead>
  <tr>
    <th colspan="2">Gruyere (Previously Jarlsberg) Info</th>
  </tr>
  </thead>
  <tbody>
    <tr>
      <td  width="40%">App Name</td>
      <td>Gruyere (Previously Jarlsberg)</td>
    </tr>
    <tr>
      <td>License</td>
      <td>free</td>
    </tr>
    <tr>
      <td>Type</td>
      <td><ul>
<li>online</li>
<li>code</li>
</ul>
</td>
    </tr>
    <tr>
      <td>App URL</td>
      <td>
      <a target="_blank" href="http://google-gruyere.appspot.com//start"><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://google-gruyere.appspot.com/">link</a></td>
    </tr>
  </tbody>
</table>

<p><br class="spacer_" /></p>
<img src="http://a4apphack.com/blog/?ak_action=api_record_view&id=1936&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://a4apphack.com/security/sec-code/jarlsberg-vulnerable-web-application-at-google-code/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML5 CheatSheet Project</title>
		<link>http://a4apphack.com/security/sec-browser/html5-cheatsheet-project</link>
		<comments>http://a4apphack.com/security/sec-browser/html5-cheatsheet-project#comments</comments>
		<pubDate>Thu, 13 May 2010 21:49:50 +0000</pubDate>
		<dc:creator>rajivvishwa</dc:creator>
				<category><![CDATA[Browser]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[appsec]]></category>
		<category><![CDATA[chrome]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://a4apphack.com/index.php/?p=1962</guid>
		<description><![CDATA[HTML5 is a new and upcoming technology which has enough features to introduce potential security issues if not properly implemented. A new project has been initiated in Google Code to keep developers updated on the security concerns to be kept in mind while developing their apps with HTML5. Description of Project in Authors Terms, This [...]]]></description>
			<content:encoded><![CDATA[<p>HTML5 is a new and upcoming technology which has enough features to introduce potential security issues if not properly implemented. A new project has been initiated in Google Code to keep developers updated on the security concerns to be kept in mind while developing their apps with <a title="HTML5" href="http://en.wikipedia.org/wiki/HTML5">HTML5</a>.</p>
<p>Description of Project in Authors Terms,</p>
<blockquote><p><em>This project is an attempt to create a well maintained, informative and categorized cheat sheet to highlight HTML5 as well as other client side and related security issues and ways to avoid them.  The project is meant to target web developers as well as security researchers and especially browser vendors since many of the problems we found are based on faulty or quirky implementations. Focus is on completeness, comprehensibility and timeliness as well as continuity &#8211; benefits many other related cheat sheets don&#8217;t exactly provide.</em></p>
<p></em></p>
</blockquote>
<p><span id="more-1962"></span></p>
<p><a href="http://img.a4apphack.com/html5sec-main.jpg" rel="lightbox[1962]" title="HTML5 Security Cheatsheet"><img class="alignnone" title="HTML5 Security Cheatsheet" src="http://img.a4apphack.com/html5sec-main.jpg" alt="HTML5 Security Cheatsheet" width="600" height="493" /></a></p>
<p>Time to this site if are a developer or security analyst.</p>
<p><a title="HTML5 Cheatsheet" href="http://heideri.ch/jso/">HTML5 CheatSheet</a></p>
<table id="cft">
  <thead>
  <tr>
    <th colspan="2">HTML5 CheatSheet Info</th>
  </tr>
  </thead>
  <tbody>
    <tr>
      <td  width="40%">App Name</td>
      <td>HTML5 CheatSheet</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://heideri.ch/jso/"><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://code.google.com/p/html5security/">link</a></td>
    </tr>
  </tbody>
</table>

<p><br class="spacer_" /></p>
<img src="http://a4apphack.com/blog/?ak_action=api_record_view&id=1962&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://a4apphack.com/security/sec-browser/html5-cheatsheet-project/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add Syntax Highlighting to SharePoint Sites</title>
		<link>http://a4apphack.com/featured/add-syntax-highlighting-to-sharepoint-sites</link>
		<comments>http://a4apphack.com/featured/add-syntax-highlighting-to-sharepoint-sites#comments</comments>
		<pubDate>Fri, 09 Apr 2010 00:22:45 +0000</pubDate>
		<dc:creator>rajivvishwa</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Tips & Tricks]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[customize]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[sharepoint]]></category>

		<guid isPermaLink="false">http://a4apphack.com/index.php/?p=1864</guid>
		<description><![CDATA[This post details about the steps to add Syntax Highlighting Feature to any SharePoint site where you have access to upload files to server. This can help people who embed code snippets in the SharePoint site and share it with their team. Step 1 Download and extract SyntaxHighlighter scripts to your PC (Check the download link [...]]]></description>
			<content:encoded><![CDATA[<p>This post details about the steps to add Syntax Highlighting Feature to any SharePoint site where you have access to upload files to server. This can help people who embed code snippets in the SharePoint site and share it with their team.</p>
<p><img title="Syntax Highlight Screenshot" src="http://img.a4apphack.com/sharepointsyntax-syntaxdemo.jpg" alt="Syntax Highlight Screenshot" width="490" height="190" /></p>
<p><br class="spacer_" /></p>
<div><strong>Step 1 </strong></div>
<p>Download and extract SyntaxHighlighter scripts to your PC (Check the download link at the bottom of the post). Now access the SharePoint site and create a folder structure as shown in the below screenshot (i.e. to create &#8216;scripts&#8217;, &#8216;src&#8217; and &#8216;styles&#8217; folders inside syntax folder which is present in &#8216;Shared Documents&#8217;). Now upload the syntax highlighter files to appropriate folders.</p>
<div class="wp-caption alignnone" style="width: 423px"><a href="http://img.a4apphack.com/sharepointsyntax-folderstruct.jpg" rel="lightbox[1864]" title="Upload Scripts Folder Structure"><img title="Upload Scripts Folder Structure" src="http://img.a4apphack.com/sharepointsyntax-folderstruct.jpg" alt="Upload Scripts Folder Structure" width="413" height="109" /></a><p class="wp-caption-text">Upload Scripts Folder Structure</p></div>
<p><span id="more-1864"></span><strong>Step 2 </strong></p>
<p>Access the page where you want syntax highlighter to be enabled and go the &#8216;Edit Mode&#8217;.  Add &#8216;Content Editor Web Part&#8217; to the page. This Web Part will contain the scripts that provides reference to the syntax highlighter code uploaded in SharePoint server.</p>
<div class="wp-caption alignnone" style="width: 610px"><a href="http://img.a4apphack.com/sharepointsyntax-contenteditor.jpg" rel="lightbox[1864]" title="Add Content Editor Webpart"><img title="Add Content Editor Webpart" src="http://img.a4apphack.com/sharepointsyntax-contenteditor.jpg" alt="Add Content Editor Webpart" width="600" height="308" /></a><p class="wp-caption-text">Add Content Editor Webpart</p></div>
<p><strong>Step 3</strong></p>
<p>View the Web Part options by clicking on the &#8216;Modify Shared Web Part&#8217; menu. Click on the &#8216;Source Editor&#8217; and enter the scripts to call syntax highlighter.</p>
<div class="wp-caption alignnone" style="width: 252px"><a href="http://img.a4apphack.com/sharepointsyntax-sourceedit.jpg" rel="lightbox[1864]" title="Select Source Editor"><img title="Select Source Editor" src="http://img.a4apphack.com/sharepointsyntax-sourceedit.jpg" alt="Select Source Editor" width="242" height="274" /></a><p class="wp-caption-text">Select Source Editor</p></div>
<p><br class="spacer_" /></p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>LINK href<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;/sites/Shared Documents/syntax/styles/shCore.css&quot;</span> type<span style="color: #339933;">=</span>text<span style="color: #339933;">/</span>css rel<span style="color: #339933;">=</span>stylesheet<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>LINK href<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;/sites/Shared Documents/syntax/styles/shThemeDefault.css&quot;</span> type<span style="color: #339933;">=</span>text<span style="color: #339933;">/</span>css rel<span style="color: #339933;">=</span>stylesheet<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>SCRIPT src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;/sites/Shared Documents/syntax/scripts/shCore.js&quot;</span> type<span style="color: #339933;">=</span>text<span style="color: #339933;">/</span>javascript<span style="color: #339933;">&gt;&lt;/</span>SCRIPT<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>SCRIPT src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;/sites/Shared Documents/syntax/scripts/shBrushJScript.js&quot;</span> type<span style="color: #339933;">=</span>text<span style="color: #339933;">/</span>javascript<span style="color: #339933;">&gt;&lt;/</span>SCRIPT<span style="color: #339933;">&gt;</span>
<span style="color: #339933;">&lt;</span>SCRIPT type<span style="color: #339933;">=</span>text<span style="color: #339933;">/</span>javascript<span style="color: #339933;">&gt;</span>
    SyntaxHighlighter.<span style="color: #660066;">config</span>.<span style="color: #660066;">clipboardSwf</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'/sites/Shared Documents/syntax/scripts/clipboard.swf'</span><span style="color: #339933;">;</span>
    SyntaxHighlighter.<span style="color: #660066;">all</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #339933;">&lt;/</span>SCRIPT<span style="color: #339933;">&gt;</span></pre></div></div>

<p><strong>Note:</strong> Change the paths in the script if you have uploaded the syntaxhighlighter code in a different location</p>
<p><strong>Step 4</strong></p>
<p>Hide this Web Part by checking the &#8216;Hidden&#8217; option.</p>
<div class="wp-caption alignnone" style="width: 247px"><a href="http://img.a4apphack.com/sharepointsyntax-hiddenlayout.jpg" rel="lightbox[1864]" title="Hide Layout"><img title="Hide Layout" src="http://img.a4apphack.com/sharepointsyntax-hiddenlayout.jpg" alt="Hide Layout" width="237" height="233" /></a><p class="wp-caption-text">Hide Layout</p></div>
<p><strong>Step 5</strong></p>
<p>Add 2nd Content Editor Web Part. This Web Part will contain the code which you want to highlight. Use the Source Editor and paste the code there.</p>
<p><strong>Step 6</strong></p>
<p>Wrap your code with the syntax highlighter wrapper codes, change the language value as per your code. Click Ok to view the syntax highlighted code</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #339933;">&lt;</span>pre <span style="color: #003366; font-weight: bold;">class</span><span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;brush: js&quot;</span><span style="color: #339933;">&gt;</span></pre></div></div>

</pre>
<table id="cft">
  <thead>
  <tr>
    <th colspan="2">Syntax Highlighter Info</th>
  </tr>
  </thead>
  <tbody>
    <tr>
      <td  width="40%">App Name</td>
      <td>Syntax Highlighter</td>
    </tr>
    <tr>
      <td>License</td>
      <td>free</td>
    </tr>
    <tr>
      <td>Type</td>
      <td>code</td>
    </tr>
    <tr>
      <td>App URL</td>
      <td>
      <a target="_blank" href="http://alexgorbatchev.com/wiki/SyntaxHighlighter:Download"><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://alexgorbatchev.com/wiki/SyntaxHighlighter">link</a></td>
    </tr>
  </tbody>
</table>

<p><br class="spacer_" /></p>
<img src="http://a4apphack.com/blog/?ak_action=api_record_view&id=1864&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://a4apphack.com/featured/add-syntax-highlighting-to-sharepoint-sites/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTML Purifier &#8211; Malicious Input Filtering (XSS Protection)</title>
		<link>http://a4apphack.com/security/html-purifier-malicious-input-filtering</link>
		<comments>http://a4apphack.com/security/html-purifier-malicious-input-filtering#comments</comments>
		<pubDate>Wed, 27 Jan 2010 06:45:14 +0000</pubDate>
		<dc:creator>rajivvishwa</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[appsec]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[xss]]></category>

		<guid isPermaLink="false">http://a4apphack.com/index.php/?p=1639</guid>
		<description><![CDATA[HTML Purifier is a standards-compliant HTML filter library written in PHP. HTML Purifier will remove all malicious code (efficient filtering of XSS scripts) with a thoroughly audited, secure yet permissive whitelist. Quick Install 1 2 3 4 5 6 &#60;?php require_once '/path/to/htmlpurifier/library/HTMLPurifier.auto.php'; &#160; $purifier = new HTMLPurifier&#40;&#41;; $clean_html = $purifier-&#62;purify&#40;$dirty_html&#41;; ?&#62; View Before-After XSS Filtering [...]]]></description>
			<content:encoded><![CDATA[<p>HTML Purifier is a standards-compliant HTML filter library written in PHP. HTML Purifier will remove all malicious code (efficient filtering of XSS scripts) with a thoroughly audited, secure yet permissive whitelist.</p>
<div class="wp-caption alignnone" style="width: 610px"><a title="HTML Comparison Chart" href="http://img.a4apphack.com/htmlpurify-compare.jpg" rel="lightbox[1639]"><img class="" title="HTML Comparison Chart" src="http://img.a4apphack.com/htmlpurify-compare.jpg" alt="HTML Comparison Chart" width="600" height="107" /></a><p class="wp-caption-text">HTML Comparison Chart</p></div>
<p><strong>Quick Install</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
    <span style="color: #b1b100;">require_once</span> <span style="color: #0000ff;">'/path/to/htmlpurifier/library/HTMLPurifier.auto.php'</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000088;">$purifier</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> HTMLPurifier<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$clean_html</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$purifier</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">purify</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dirty_html</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p><a title="XSS Attacks" href="http://htmlpurifier.org/live/smoketests/xssAttacks.php">View Before-After XSS Filtering</a></p>
<p><a title="View Demo: HTML Purifier" href="http://htmlpurifier.org/demo.php">View Demo: HTML Purifier</a></p>
<p><strong>Download HTML Purfier : </strong><a target="_blank" href="http://htmlpurifier.org/releases/htmlpurifier-4.0.0.zip"><img style="vertical-align: middle;" height="30" width="30" alt="Download" src="http://img.a4apphack.com/site/a4apphack-download.png" title="Download"/></a> (More Info at: <a title="HTML Purifier" href="http://htmlpurifier.org/">http://htmlpurifier.org/</a>)</p>
<p><br class="spacer_" /></p>
<img src="http://a4apphack.com/blog/?ak_action=api_record_view&id=1639&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://a4apphack.com/security/html-purifier-malicious-input-filtering/feed</wfw:commentRss>
		<slash:comments>0</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 1555/1604 objects using disk: basic

Served from: a4apphack.com @ 2012-02-05 09:38:34 -->
