<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>ClearNet Security: Tag license</title>
    <link>http://blog.clearnetsec.com/articles/tag/license</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <item>
      <title>Test commercial web  app scanners for free and without restrictions?</title>
      <description>&lt;p&gt;If your software licensing ethics tend to contort a tad here  and there, then you may find the below tricks helpful when 

you want to evaluate  commercial web app scanners.  Partaking  in these tricks is slippery, and you may fall into ethical 

perdition, so  prepare yourself!&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Super simple trick #1:  Request search and replace proxy&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;            Fire up a  proxy that supports request search and replace.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://blog.clearnetsec.com/files/suru_search_and_replace.jpg" alt="suru"/&gt;&lt;/p&gt;
&lt;p&gt;Let&#8217;s say an app restricts you to scan only their target site (e.g. demo.testsite.net), but you want to point the scanner to a  different target.  &lt;/p&gt;
&lt;p&gt;&lt;em&gt;No problema&lt;/em&gt;.  &lt;/p&gt;
&lt;p&gt;As shown above, I typed in &lt;strong&gt;demo.testsite.net &lt;/strong&gt;for &lt;u&gt;Search&lt;/u&gt;, and &lt;strong&gt;blog.clearnetsec.com&lt;/strong&gt; for &lt;u&gt;Replace&lt;/u&gt;.   Every HTTP request passing through this proxy with a Request-URI matching the string &lt;i&gt;demo.testsite.net&lt;/i&gt; will get replaced with &lt;i&gt;blog.clearnetsec.com&lt;/i&gt;.  The result? The app scans my blog.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;  Super simple trick #1 only works for apps  which restrict via the hostname.  If the app is smarter 

and adds IP validation,  then move along to Sort of simple trick #2.  &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Sort of simple trick  #2:  IPTables magic&lt;/strong&gt;&lt;br /&gt;
  &lt;br /&gt;
  This trick can add license evading umpf to your smokin&#8217; renegade style. :)&lt;/p&gt;
&lt;p&gt;Let&#8217;s say the app tries to validate you are only scanning  the sites you're licensed for by checking the target IP addresses 

(regardless of  how the hostnames are resolved).  For  example, maybe the demo version of the app allows you to only scan IP 

address  55.55.55.55.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;No problema.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;One line explanation:&lt;/strong&gt;  Setup a linux box to do routing, configure a  VIP, and add two IPTable NAT rules.  

&lt;/p&gt;
&lt;p&gt;&lt;b&gt;The long answer.&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;Setup a linux box.  A  linux VMware image works too.  Configure  the network as normal &#8211; give it a standard IP, gateway, 

list of name servers,  etc., as you would when configuring any other box on your local subnet.&lt;/p&gt;
&lt;p&gt;Once you got that, then check out the script below. &lt;/p&gt;
&lt;p&gt;&lt;img src="http://blog.clearnetsec.com/files/setup_nat_rules.jpg" alt="cli"/&gt;&lt;/p&gt;
&lt;p&gt;Follow?  If not, I&#8217;ll  explain in more detail.&lt;/p&gt;
&lt;ul&gt;
  &lt;li&gt;Again, the first thing you need is a normal  networked working linux box.  &lt;/li&gt;
  &lt;li&gt;There are 4 steps to facilitate a destination IP  switch-a-roo:&lt;/li&gt;
  &lt;ul&gt;
    &lt;li&gt;Configure  a Virtual IP.  Pick an IP located on a  different subnet, don&#8217;t pick an IP on the same subnet as the 

primary IP.&lt;/li&gt;
    &lt;li&gt;Enable  IP forwarding.&lt;/li&gt;
    &lt;li&gt;Setup  a DNAT (Destination NAT) rule to replace the destination IP on the fly.  The first IP (e.g. 55.55.55.55) is the 

 licensed locked IP.  The second IP is  (e.g. 216.241.191.205) is the IP you want to scan.&lt;/li&gt;
    &lt;li&gt;Setup  a SNAT (Source NAT) rule to replace the source IP on the fly.  The first IP (e.g. 192.168.1.101) is your  

workstation IP.  The second IP is the  primary IP address of the linux box.    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/ul&gt;
&lt;p&gt;The last step there, #4, is overloaded.  Once you go through the steps above on the  linux box, then you need to change the 

IP address of your workstation with the  app scanner installed.  You want to pick a new IP for your workstation which is on 

the same subnet as the VIP you  configured on the linux box.  You also want to change your workstation to use the linux box as 

your gateway to the Internet, so change the default route address to match the IP of the VIP on the linux box.&lt;/p&gt;
&lt;p&gt;That should do it. Replace the IPs in the IPTable rules above with the IPs that work for you and scan away. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:  &lt;/strong&gt;You can&#8217;t always do the IPTables trick by  itself; one reason is due to virtual hosting.  If  only 

one website is being hosted on the IP, then you probably can do this.  If the target IP is hosting lots of domains,  then you 

need to chain the request and replace proxy with the IPTables magic to  ensure each Request-URI is for the correct host and 

domain.&lt;/p&gt;
&lt;p&gt;For example, &lt;i&gt;&lt;u&gt;GET http://216.241.191.205/... HTTP/1.1&lt;/u&gt;&lt;/i&gt; may not be the same as &lt;i&gt;&lt;u&gt;GET 

http://blog.clearnetsec.com/... HTTP/1.1&lt;/u&gt;&lt;/i&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Super Simple trick  #3:  VMware snapshots&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Most everyone is likely familiar with this trick. If you have a web app installed in a VMware  image and you have a working 

license (e.g. trial license), but it expires at a  certain time and date, the trick is to create a snapshot of the VMware 

image with  the app in a working state.  &lt;/p&gt;
&lt;p&gt;Anytime you want to scan, change your host OS clock back to a  time that is within the licensing window (or ensure your 

VMware guest image  doesn&#8217;t sync the clock with the host OS when you restore the snapshot), and restore the snapshot.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Note:  &lt;/strong&gt;Some apps may  call home when first launched, so it helps to create the VM snapshot when you  have 

the app open and ready to scan.  &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Trick addendum:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;For those web app scanners which restrict you from scanning  SSL enabled sites, have no hesistation, you can work around 

that too.  &lt;/p&gt;
&lt;p&gt;One way is via stunnel. From &lt;a href="http://ww.stunnel.org"&gt;www.stunnel.org.&lt;/a&gt;&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Encrypted version with STUNNEL&lt;/p&gt;
&lt;pre&gt;
+---------+      | |     +--------+    +---------+
| non-SSL | -ST- | | --- | Apache | -- | non-SSL |
| enabled |      | |     | WITH   |    | enabled |
| client  |      | |     | SSL    |    | server  |
+---------+      | |     +--------+    +---------+
   CLIENT        NET     WEB SERVER      SERVICE
&lt;/pre&gt;
&lt;/blockquote&gt;
Note the position of STUNNEL : the "-ST-" in the diagram above.  Below is an example stunnel configuration:
&lt;blockquote&gt;
  &lt;p&gt;client=yes &lt;br /&gt;
    verify=0 &lt;br /&gt;
    [psuedo-https] &lt;br /&gt;
    accept = 8080 &lt;br /&gt;
    connect = blog.clearnetsec.com:443 &lt;br /&gt;
    TIMEOUTclose=0&lt;/p&gt;
&lt;/blockquote&gt;
Configure your app or browser to use the stunnel proxy listening on port 8080 and you'll be able to hit the site using HTTPS (via the proxy), 

but your local app or browser will be only speaking HTTP.
&lt;br /&gt;&lt;br /&gt; 
&lt;p&gt;&lt;strong&gt;Quick alternate to #1  for Apache fan boys and girls:&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Via Apache 2.2.x, with mod proxy and mod rewrite enabled, setup  a proxy like so:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;ProxyRequests On&lt;br /&gt;
  &amp;lt;Proxy *&amp;gt; &lt;br /&gt;
  RewriteEngine on&lt;br /&gt;
  RewriteRule  ^(.+)  http://blog.clearnetsec.com/$1 [P] &lt;i&gt;(or something close to this)&lt;/i&gt;&lt;br /&gt;
  Order deny,allow&lt;br /&gt;
  Deny from all&lt;br /&gt;
  Allow from all&lt;br /&gt;
  &amp;lt;/Proxy&amp;gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Configure your browser or app scanner to use this Apache  proxy server and all Request-URIs passed through will be re-

written to target &lt;a href="http://blog.clearnetsec.com/"&gt;http://blog.clearnetsec.com/&lt;/a&gt;.  &lt;/p&gt;
&lt;p&gt;YMMV.  Have fun. &lt;/p&gt;

</description>
      <pubDate>Mon, 24 Mar 2008 11:54:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:c03216b7-69d4-4b10-9d75-3288a7cfef37</guid>
      <author>tate@ClearNetSec.com (Tate Hansen)</author>
      <link>http://blog.clearnetsec.com/articles/2008/03/24/test-commercial-web-app-scanners-for-free-and-without-restrictions</link>
      <category>Tate Hansen</category>
      <category>ClearNet Security</category>
      <category>proxy</category>
      <category>Suru</category>
      <category>security</category>
      <category>license</category>
      <category>bypass</category>
      <category>licensing</category>
      <category>software</category>
      <category>scanners</category>
      <category>web application</category>
      <category>ClearNet</category>
      <category>stunnel</category>
      <category>apache</category>
      <category>vmware</category>
    </item>
  </channel>
</rss>
