<?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/"
	>

<channel>
	<title>Martin Holst Swende</title>
	<atom:link href="http://www.swende.se/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.swende.se</link>
	<description>av blandad karaktär</description>
	<lastBuildDate>Thu, 01 Jul 2010 21:47:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Finding Applications</title>
		<link>http://www.swende.se/index.php/2010/07/finding-applications/</link>
		<comments>http://www.swende.se/index.php/2010/07/finding-applications/#comments</comments>
		<pubDate>Thu, 01 Jul 2010 21:47:46 +0000</pubDate>
		<dc:creator>martin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.swende.se/?p=133</guid>
		<description><![CDATA[The last of the batch of tools which uses search engines is called IPSearch. That one is useful if you have a large list of ip-addresses, and you want to find out whether e.g if there are any virtual hosts which shares the same ips, or just generally what applications are hosted on the ips. [...]]]></description>
			<content:encoded><![CDATA[<p>The last of the batch of tools which uses search engines is called IPSearch. That one is useful if you have a large list of ip-addresses, and you want to find out whether e.g if there are any virtual hosts which shares the same ips, or just generally what applications are hosted on the ips. Just pipe the ips into ipsearch, and it uses Bings search engine to find them. Unfortunately, requires an API-key <img src='http://www.swende.se/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />  &#8211; but those are not hard to come by. </p>
<p>Example:</p>
<p><!--DEVFMTCODE--><pre class="devcodeblock" title="Text"><div class="devcodeoverflow">$ cat ip.txt | python ipsearch.py -b bingkey.txt
208.201.239.101 :
    craftzine.com: CRAFT: Dedicated to the renaissance in the world of ... : 
        http://craftzine.com/
    Web 2.0 Summit 2009 - Co-produced by TechWeb &amp; O'Reilly Conferences ... : 
        http://www.web2summit.com/web2009
    Perl.com Home Page : 
        http://www.perl.com/
    craftzine.com: CRAFT Projects : 
        http://craftzine.com/projects/
    tim.oreilly.com -- Various Thing I've Written: Tim O'Reilly's Archive : 
        http://tim.oreilly.com/
    Web 2.0 Expo San Francisco 2009 - Co-produced by TechWeb &amp; O'Reilly ... : 
        http://www.web2expo.com/webexsf2009
    Google free proxy! : 
        http://www.oreillynet.com/pub/h/4807
    makezine.com: MAKE: Magazine : 
        http://makezine.com/magazine/
    Web 2.0 Summit 2010 - Co-produced by UBM TechWeb &amp; O'Reilly ... : 
        http://www.web2summit.com/web2010
    O'Reilly Tools of Change for Publishing Conference 2010 - O'Reilly ... : 
        http://www.toccon.com/toc2010
    A total of 66200 results found, do manual test to find the rest : 
&nbsp;
67.222.96.148 :
    O'Reilly Radar - Insight, analysis, and research about emerging ... : 
        http://radar.oreilly.com/
    Tools of Change for Publishing : 
        http://toc.oreilly.com/
    Best iPhone Apps - O'Reilly Media : 
        http://iphoneapps.oreilly.com/
    InsideRIA - Community for Rich Internet Application Developers and ... : 
        http://insideria.com/
    Google Wave: What Might Email Look Like If It Were Invented Today? - O ... : 
        http://radar.oreilly.com/2009/05/google-wave-what-might-email-l.html
    Best iPhone Apps: Best App Archives - O'Reilly Media : 
        http://iphoneapps.oreilly.com/archive.html
    Build a $21 Portable Vocal Booth - O'Reilly Digital Media Blog : 
        http://blogs.oreilly.com/digitalmedia/2008/02/build-a-portable-vocal-booth.html
    The Definition of Insanity is, perhaps, using that quote. - O'Reilly ... : 
        http://blogs.oreilly.com/digitalmedia/2006/10/the-definition-of-insanity-is.html
    Low End Linux Netbook Prices Continue To Drop - O'Reilly Broadcast : 
        http://broadcast.oreilly.com/2009/06/low-end-linux-netbook-prices-c.html
    David Pogue's Top 10 Tips for the iPhone 3GS and iPhone 3.0 Software ... : 
        http://broadcast.oreilly.com/2009/07/david-pogues-top-10-tips-for-t.html
    A total of 43800 results found, do manual test to find the rest : 
&nbsp;
72.34.60.160 :
    Ignite : 
        http://ignite.oreilly.com/
    El primer Ignite Madrid tendrá lugar el 3 de Marzo del 2010, en el ... : 
        http://ignite.oreilly.com/2010/02/post-4.html
</div></pre><!--END_DEVFMTCODE--></p>
<p><a href="http://martin.swende.se/hgwebdir.cgi/ipsearch/raw-file/tip/ipsearch.tar.gz">Download</a> or clone ( hg clone http://martin.swende.se/hgwebdir.cgi/ipsearch/ ) </p>
]]></content:encoded>
			<wfw:commentRss>http://www.swende.se/index.php/2010/07/finding-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finding subdomains</title>
		<link>http://www.swende.se/index.php/2010/06/finding-subdomains/</link>
		<comments>http://www.swende.se/index.php/2010/06/finding-subdomains/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 19:46:30 +0000</pubDate>
		<dc:creator>martin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.swende.se/?p=129</guid>
		<description><![CDATA[A while back, I wrote about Googlyhack. While I was at it, I made two other similar tools that use search engines for other purposes &#8211; but I noticed recently that I had not written anything about them. The first one is Subsearch, which is a replacement for the old tool &#8220;Subdomainer&#8221;. Subdomainer does not [...]]]></description>
			<content:encoded><![CDATA[<p>A while back, I wrote about Googlyhack. While I was at it, I made two other similar tools that use search engines for other purposes &#8211; but I noticed recently that I had not written anything about them. The first one is <b>Subsearch</b>, which is a replacement for the old tool &#8220;Subdomainer&#8221;. Subdomainer does not seem to work anymore, so I made a replacement which uses Google, Yahoo and Bing to perform searches. The latter two requires an API-key.</p>
<p>It does this:</p>
<ul>
<li>Searches each search engine with exclusions for already found domains, such as &#8220;site:example.com -site:a.example.com -site:b.example.com&#8221; until all search results are exhausted and no more are found. </li>
<li>Except for google, which only allows 40 keywords. If the search is not exhausted by then, it tries to use google &#8217;slowsearch&#8217;, i.e it uses the last working query and clicks &#8220;next page&#8221; until it does not find any more results.</li>
</ul>
<p>Usage:</p>
<p><!--DEVFMTCODE--><pre class="devcodeblock" title="Bash"><div class="devcodeoverflow">$ .<span style="color: #000000; font-weight: bold;">/</span>subsearch.py <span style="color: #660033;">-d</span> oreilly.com <span style="color: #660033;">-b</span> bingkey.txt <span style="color: #660033;">-y</span> yahoo_app_id.txt 
Using domain oreilly.com
Using yahoo search API <span style="color: #c20cb9; font-weight: bold;">as</span> well
Using bing search API <span style="color: #c20cb9; font-weight: bold;">as</span> well
<span style="color: #660033;">--------------------------------------------</span>
Yahoo:
www.oreilly.com
radar.oreilly.com
ignite.oreilly.com
tim.oreilly.com
wethemedia.oreilly.com
oreilly.com
en.oreilly.com
<span style="color: #660033;">--------------------------------------------</span>
Bing:
oreilly.com
radar.oreilly.com
toc.oreilly.com
answers.oreilly.com
digitalmedia.oreilly.com
iphoneapps.oreilly.com
tim.oreilly.com
en.oreilly.com
<span style="color: #660033;">--------------------------------------------</span>
Google:
oreilly.com
answers.oreilly.com
microsoftpress.oreilly.com
digitalmedia.oreilly.com
iphoneapps.oreilly.com
tim.oreilly.com
radar.oreilly.com
<span style="color: #660033;">--------------------------------------------</span>
Performing google slow-search
Done
<span style="color: #660033;">--------------------------------------------</span>
Done: <span style="color: #000000;">12</span> subdomains found:
digitalmedia.oreilly.com
en.oreilly.com
www.oreilly.com
tim.oreilly.com
ignite.oreilly.com
toc.oreilly.com
oreilly.com
microsoftpress.oreilly.com
answers.oreilly.com
iphoneapps.oreilly.com
wethemedia.oreilly.com
radar.oreilly.com
</div></pre><!--END_DEVFMTCODE--></p>
<p><a href="http://martin.swende.se/hgwebdir.cgi/subsearch/raw-file/tip/subsearch.tar.gz">Download</a> or clone ( hg clone http://martin.swende.se/hgwebdir.cgi/subsearch/ ) </p>
]]></content:encoded>
			<wfw:commentRss>http://www.swende.se/index.php/2010/06/finding-subdomains/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GooglyHacks (GHDB)</title>
		<link>http://www.swende.se/index.php/2010/04/googlyhacks-ghdb/</link>
		<comments>http://www.swende.se/index.php/2010/04/googlyhacks-ghdb/#comments</comments>
		<pubDate>Sat, 10 Apr 2010 20:11:10 +0000</pubDate>
		<dc:creator>martin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.swende.se/?p=116</guid>
		<description><![CDATA[I noticed that the GHDB-plugin from w3af was a bit deprecated and not quite flexible enough for my purposes, so I wrote a little tool to use GHDB database to find vulnerabilites for a site. Google has deprecated the old Soap-api in favour for a new Ajax-api which was really nice to work with. 
To [...]]]></description>
			<content:encoded><![CDATA[<p>I noticed that the GHDB-plugin from w3af was a bit deprecated and not quite flexible enough for my purposes, so I wrote a little tool to use GHDB database to find vulnerabilites for a site. Google has deprecated the old Soap-api in favour for a new Ajax-api which was really nice to work with. </p>
<p>To use the tool it, you do this : </p>
<p><!--DEVFMTCODE--><pre class="devcodeblock" title="Bash"><div class="devcodeoverflow">python googlyhack.py <span style="color: #660033;">-domain</span> foobar.com</div></pre><!--END_DEVFMTCODE--></p>
<p>And then it goes through the entire GHDB (which is an XML-file, just drop in a new replacement if you find a newer one. Please also send it to me!). One feature which I missed in w3af and therefore implemented was that If google blocks you,  GooglyHack pause until you tell it to continue: </p>
<p><!--DEVFMTCODE--><pre class="devcodeblock" title="Bash"><div class="devcodeoverflow">Aborted after 1200 requests 
Stopped after 1200 requests <span style="color: #7a0874; font-weight: bold;">&#40;</span>of 1466<span style="color: #7a0874; font-weight: bold;">&#41;</span>. Press any key to <span style="color: #7a0874; font-weight: bold;">continue</span>, or ctrl-c to quit</div></pre><!--END_DEVFMTCODE--></p>
<p>If you choose to abort, you can start it later (or on another computer) to continue again where it left off:<br />
<!--DEVFMTCODE--><pre class="devcodeblock" title="Bash"><div class="devcodeoverflow">python googlyhack.py <span style="color: #660033;">-domain</span> foobar.com <span style="color: #660033;">-i</span> <span style="color: #000000;">1200</span></div></pre><!--END_DEVFMTCODE--></p>
<p>Here is a snippet of an example run against domain microsoft.com :<br />
<!--DEVFMTCODE--><pre class="devcodeblock" title="Bash"><div class="devcodeoverflow">List loaded, length <span style="color: #000000;">1466</span>
Starting at index <span style="color: #000000;">0</span>
<span style="color: #000000;">0</span>:<span style="color: #000000;">0</span> hits
<span style="color: #000000;">1</span>:<span style="color: #000000;">0</span> hits
<span style="color: #000000;">2</span>:<span style="color: #000000;">0</span> hits
<span style="color: #000000;">3</span>:<span style="color: #000000;">0</span> hits
<span style="color: #000000;">4</span>:<span style="color: #000000;">0</span> hits
<span style="color: #000000;">5</span>:<span style="color: #000000;">0</span> hits
<span style="color: #000000;">6</span>:<span style="color: #000000;">0</span> hits
<span style="color: #000000;">7</span>:<span style="color: #000000;">2</span> hits
Example urls:
-Title: http:<span style="color: #000000; font-weight: bold;">//</span>social.msdn.microsoft.com<span style="color: #000000; font-weight: bold;">/</span>Forums<span style="color: #000000; font-weight: bold;">/</span>en-US<span style="color: #000000; font-weight: bold;">/</span>sqlexpress<span style="color: #000000; font-weight: bold;">/</span>thread<span style="color: #000000; font-weight: bold;">/</span>30d3b3c9-9bf8-<span style="color: #000000;">4265</span>-82bb-d192f232cf24
-Url: Need to convert the following mysql to sql server
-Title: http:<span style="color: #000000; font-weight: bold;">//</span>social.msdn.microsoft.com<span style="color: #000000; font-weight: bold;">/</span>forums<span style="color: #000000; font-weight: bold;">/</span>pt-BR<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000;">520</span><span style="color: #000000; font-weight: bold;">/</span>thread<span style="color: #000000; font-weight: bold;">/</span>0e964ff4-0b2e-4a1b-80f6-1151e05aabb5<span style="color: #000000; font-weight: bold;">/</span>
-Url: SQL Server Management Studio Express - Exportar com dados?
Query used : site:microsoft.com <span style="color: #ff0000;">&quot;# Dumping data for table&quot;</span>
GHDB Description: SQL database dumps. LOTS of data <span style="color: #000000; font-weight: bold;">in</span> these. So much data, infact, I<span style="color: #ff0000;">'m pressed to think of what else an ev1l hax0r would like to know about a target database.. What'</span>s that? Usernames and passwords you say? Patience, grasshopper.....
</div></pre><!--END_DEVFMTCODE--></p>
<p>I thought that google-blocking would be an issue, but using the ajax-api I had no such problems. So no additional steps are taken to bypass blocking, such as using alterating useragents or randomizing the ghdb-list. Apparantly the ajax-api is pretty nice against robotic behaviour. </p>
<p>Complete source can be found at <a href="http://martin.swende.se/hgwebdir.cgi/GooglyHack/">http://martin.swende.se/hgwebdir.cgi/GooglyHack/</a><br />
Get it either by :<br />
<!--DEVFMTCODE--><pre class="devcodeblock" title="Bash"><div class="devcodeoverflow">hg clone http:<span style="color: #000000; font-weight: bold;">//</span>martin.swende.se<span style="color: #000000; font-weight: bold;">/</span>hgwebdir.cgi<span style="color: #000000; font-weight: bold;">/</span>GooglyHack<span style="color: #000000; font-weight: bold;">/</span></div></pre><!--END_DEVFMTCODE--></p>
<p>-OR-<br />
<!--DEVFMTCODE--><pre class="devcodeblock" title="Bash"><div class="devcodeoverflow"><span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>martin.swende.se<span style="color: #000000; font-weight: bold;">/</span>hgwebdir.cgi<span style="color: #000000; font-weight: bold;">/</span>GooglyHack<span style="color: #000000; font-weight: bold;">/</span>raw-file<span style="color: #000000; font-weight: bold;">/</span>tip<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>googlyhack.py
<span style="color: #c20cb9; font-weight: bold;">wget</span> http:<span style="color: #000000; font-weight: bold;">//</span>martin.swende.se<span style="color: #000000; font-weight: bold;">/</span>hgwebdir.cgi<span style="color: #000000; font-weight: bold;">/</span>GooglyHack<span style="color: #000000; font-weight: bold;">/</span>raw-file<span style="color: #000000; font-weight: bold;">/</span>tip<span style="color: #000000; font-weight: bold;">/</span>src<span style="color: #000000; font-weight: bold;">/</span>GHDB.xml
</div></pre><!--END_DEVFMTCODE--></p>
<p>Enjoy! (and remember : don&#8217;t be evil!)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.swende.se/index.php/2010/04/googlyhacks-ghdb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Python Packet Play</title>
		<link>http://www.swende.se/index.php/2010/01/python-packet-play/</link>
		<comments>http://www.swende.se/index.php/2010/01/python-packet-play/#comments</comments>
		<pubDate>Tue, 19 Jan 2010 22:17:24 +0000</pubDate>
		<dc:creator>martin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.swende.se/?p=94</guid>
		<description><![CDATA[As X-mas challenge for the Owasp Appsec Research 2010 conference, me and Mario Heiderich set up a Capture-the-flag at a computer. While .mario did all the tricky and brainteasing stuff with the actual challenge, I created a diversionary target which let me play a bit with low level packet shuffling in Python. 
The idea I [...]]]></description>
			<content:encoded><![CDATA[<p>As X-mas challenge for the Owasp Appsec Research 2010 conference, me and Mario Heiderich set up a Capture-the-flag at a computer. While .mario did all the tricky and brainteasing stuff with the actual challenge, I created a diversionary target which let me play a bit with low level packet shuffling in Python. </p>
<p>The idea I had in mind was that I wanted the computer to<br />
- Appear as having lots and lots of open ports<br />
- Each open port should appear to run some service<br />
- Each service should be recognised by nmap<br />
&#8230;<br />
- But actually, the incoming packets should be dropped</p>
<p>I got the inspiration for this when reading up on the Sockstress implementation. What we want to avoid is to have any state on the server side, since this is supposed to run on a low-end VPS-machine without affecting the other part of the system. So, how can this be achieved ?  This is the basic idea: </p>
<p>1. Using iptables, set up so that packets to the desired ports are put into a netfilter queue.<br />
2. Using python netfilter module, connect the netfilter queue to a python program.<br />
3. In the python program, create a suitable response packet, and send this over a raw socket.<br />
3a. On a SYN-packet, respond with a SYN-ACK. (This makes the port look open). The other part will finish the three-part handshake with an ACK packet.<br />
3b. On the ACK-packet, respond with two piggybacked packets. First, an ACK/PSH with some data that looks like some valid service, e.g &#8220;Windows FTP server&#8221; or &#8220;A-311 Death welcome&#8221;. Secondly, close the connection with a FIN/ACK packet.<br />
4. For extra credits, try to answer prudently to any other packets that may come in. Also, try to avoid endless repeating by e.g checking sequence numbers.<br />
5. Remember that the netfilter queue from iptables still waits for a judgement on what to do with this packet? Respond to the kernel with a &#8220;DROP&#8221; signal. The OS now drops the packet and forgets all about it.</p>
<h2>Iptables</h2>
<p>To set up so we can fiddle the packets in python, we do this :<br />
<!--DEVFMTCODE--><pre class="devcodeblock" title="Bash"><div class="devcodeoverflow">
<span style="color: #666666; font-style: italic;">#Create a new iptable chain called fuzzywall</span>
iptables <span style="color: #660033;">-N</span> fuzzywall
<span style="color: #666666; font-style: italic;">#</span>
<span style="color: #666666; font-style: italic;"># Fuzzywall</span>
<span style="color: #666666; font-style: italic;"># We only run it on port 1337 to start off</span>
<span style="color: #666666; font-style: italic;"># - Optionally : send to logging facilties (can be found in syslog)</span>
<span style="color: #666666; font-style: italic;">#iptables -A fuzzywall -p tcp --dport 1337 -j LOG --log-prefix &quot;Sending to queue&quot;</span>
<span style="color: #666666; font-style: italic;">#Add rule to 'fuzzywall', if dest port is 1337, send to netfilter queue</span>
iptables <span style="color: #660033;">-A</span> fuzzywall <span style="color: #660033;">-p</span> tcp <span style="color: #660033;">--dport</span> 1337 <span style="color: #660033;">-j</span> QUEUE
&nbsp;
<span style="color: #666666; font-style: italic;">#Add our chain to INPUT</span>
iptables <span style="color: #660033;">-A</span> INPUT <span style="color: #660033;">-j</span> fuzzywall
</div></pre><!--END_DEVFMTCODE--><br />
So, that puts fuzzywall in the INPUT chain. All incoming packets to port 1337 now goes to the netfilter queue. </p>
<h2>Python netfilter</h2>
<p>We need to get the kernel netfilter queue into our python program. To do this, I used nfqueue library from Pollux (<a href="http://www.wzdftpd.net/blog/index.php?2008/06/01/22-nfqueue-bindings">http://www.wzdftpd.net/blog/index.php?2008/06/01/22-nfqueue-bindings</a> ). It is very easy to set up :<br />
<!--DEVFMTCODE--><pre class="devcodeblock" title="Python"><div class="devcodeoverflow">    q = nfqueue.<span style="color: black;">queue</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    q.<span style="color: #008000;">open</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    q.<span style="color: black;">bind</span><span style="color: black;">&#40;</span>AF_INET<span style="color: black;">&#41;</span>
    q.<span style="color: black;">set_callback</span><span style="color: black;">&#40;</span>callback<span style="color: black;">&#41;</span>
    q.<span style="color: black;">create_queue</span><span style="color: black;">&#40;</span>0<span style="color: black;">&#41;</span>
    q.<span style="color: black;">set_queue_maxlen</span><span style="color: black;">&#40;</span>5000<span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;starting&quot;</span>
    <span style="color: #ff7700;font-weight:bold;">try</span>:
        q.<span style="color: black;">try_run</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">except</span> <span style="color: #008000;">KeyboardInterrupt</span>, e:
        <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;interrupted&quot;</span>
&nbsp;
    <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;unbinding&quot;</span>
    q.<span style="color: black;">unbind</span><span style="color: black;">&#40;</span>AF_INET<span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">print</span> <span style="color: #483d8b;">&quot;closing&quot;</span>
    q.<span style="color: black;">close</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span></div></pre><!--END_DEVFMTCODE--></p>
<p>In addition, a handler needs to be specified which can return the verdict back to iptables : </p>
<p><!--DEVFMTCODE--><pre class="devcodeblock" title="Python"><div class="devcodeoverflow"><span style="color: #ff7700;font-weight:bold;">def</span> callback<span style="color: black;">&#40;</span>dummy, payload<span style="color: black;">&#41;</span>:
    data = payload.<span style="color: black;">get_data</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
&nbsp;
    handler.<span style="color: black;">handlePacket</span><span style="color: black;">&#40;</span>data<span style="color: black;">&#41;</span>
&nbsp;
    payload.<span style="color: black;">set_verdict</span><span style="color: black;">&#40;</span>nfqueue.<span style="color: black;">NF_DROP</span><span style="color: black;">&#41;</span>
    <span style="color: #ff7700;font-weight:bold;">return</span></div></pre><!--END_DEVFMTCODE--></p>
<p>And, of course, it is in handler.handlePacket where the packetcrafting is peformed. </p>
<h2>Python Packetcrafting</h2>
<p>In order to play with packets, I found two libraries that could be used; impacket (<a href="http://pypi.python.org/pypi/Impacket/0.9.5">http://pypi.python.org/pypi/Impacket/0.9.5</a>) and dpkt (<a href="http://code.google.com/p/dpkt/">http://code.google.com/p/dpkt/</a>). They have a few differences, but both can be used to parse and create all kinds of packets. In the end, I used both of them (which maybe was a bit suboptimal &#8211; but worth it just to test how they worked). This example uses a dpkt-packet parsed from raw data and generates a default response packet using impacket:<br />
<!--DEVFMTCODE--><pre class="devcodeblock" title="Python"><div class="devcodeoverflow">
<span style="color: #ff7700;font-weight:bold;">def</span> createReturnPacket<span style="color: black;">&#40;</span><span style="color: #008000;">self</span>,packet,seqOffset = <span style="color: #ff4500;">0</span><span style="color: black;">&#41;</span>:
&nbsp;
        dst = inet_ntoa<span style="color: black;">&#40;</span>packet.<span style="color: black;">dst</span><span style="color: black;">&#41;</span>
        src = inet_ntoa<span style="color: black;">&#40;</span>packet.<span style="color: black;">src</span><span style="color: black;">&#41;</span>
        sport = packet.<span style="color: black;">tcp</span>.<span style="color: black;">sport</span>
        dport = packet.<span style="color: black;">tcp</span>.<span style="color: black;">dport</span>
&nbsp;
        <span style="color: #808080; font-style: italic;">#set the IPs</span>
        ip = ImpactPacket.<span style="color: black;">IP</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
        ip.<span style="color: black;">set_ip_src</span><span style="color: black;">&#40;</span>dst<span style="color: black;">&#41;</span>
        ip.<span style="color: black;">set_ip_dst</span><span style="color: black;">&#40;</span>src<span style="color: black;">&#41;</span>
        <span style="color: #808080; font-style: italic;">#set the ports</span>
        tcp = ImpactPacket.<span style="color: black;">TCP</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
        tcp.<span style="color: black;">set_th_sport</span><span style="color: black;">&#40;</span>dport<span style="color: black;">&#41;</span>
        tcp.<span style="color: black;">set_th_dport</span><span style="color: black;">&#40;</span>sport<span style="color: black;">&#41;</span>
        <span style="color: #808080; font-style: italic;">#Set a window size</span>
        tcp.<span style="color: black;">set_th_win</span><span style="color: black;">&#40;</span><span style="color: #ff4500;">10</span><span style="color: black;">&#41;</span>
        <span style="color: #808080; font-style: italic;">#Bundle the tcp packet inside the ip-packet</span>
        ip.<span style="color: black;">contains</span><span style="color: black;">&#40;</span>tcp<span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">return</span> <span style="color: black;">&#40;</span>ip,tcp,src<span style="color: black;">&#41;</span></div></pre><!--END_DEVFMTCODE--></p>
<p>I can now use this packet to create a SYN/ACK in response to a SYN :<br />
<!--DEVFMTCODE--><pre class="devcodeblock" title="Python"><div class="devcodeoverflow">        <span style="color: #808080; font-style: italic;">#Is this a SYN or an ACK?</span>
        <span style="color: #ff7700;font-weight:bold;">if</span> <span style="color: black;">&#40;</span>in_packet.<span style="color: black;">tcp</span>.<span style="color: black;">flags</span> <span style="color: #66cc66;">&amp;</span> dpkt.<span style="color: black;">tcp</span>.<span style="color: black;">TH_SYN</span><span style="color: black;">&#41;</span> <span style="color: #66cc66;">!</span>= 0:
            out_tcp_packet.<span style="color: black;">set_SYN</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
            out_tcp_packet.<span style="color: black;">set_ACK</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>
            out_tcp_packet.<span style="color: black;">set_th_seq</span><span style="color: black;">&#40;</span>0<span style="color: black;">&#41;</span>
            out_tcp_packet.<span style="color: black;">set_th_ack</span><span style="color: black;">&#40;</span>in_packet.<span style="color: black;">tcp</span>.<span style="color: black;">seq</span>+1<span style="color: black;">&#41;</span><span style="color: #66cc66;">;</span>
            <span style="color: #008000;">self</span>._send<span style="color: black;">&#40;</span>dst, out_ip_packet<span style="color: black;">&#41;</span></div></pre><!--END_DEVFMTCODE--></p>
<p>Once an appropriate return packet is created, it can be sent raw on the socket :<br />
<!--DEVFMTCODE--><pre class="devcodeblock" title="Python"><div class="devcodeoverflow">
    <span style="color: #ff7700;font-weight:bold;">def</span> _send<span style="color: black;">&#40;</span><span style="color: #008000;">self</span>, dst, ip<span style="color: black;">&#41;</span>:
        s = <span style="color: #dc143c;">socket</span><span style="color: black;">&#40;</span>AF_INET, SOCK_RAW, IPPROTO_TCP<span style="color: black;">&#41;</span>
        s.<span style="color: black;">setsockopt</span><span style="color: black;">&#40;</span>IPPROTO_IP, IP_HDRINCL, 1<span style="color: black;">&#41;</span>
        s.<span style="color: black;">sendto</span><span style="color: black;">&#40;</span>ip.<span style="color: black;">get_packet</span><span style="color: black;">&#40;</span><span style="color: black;">&#41;</span>, <span style="color: black;">&#40;</span>dst, 0<span style="color: black;">&#41;</span><span style="color: black;">&#41;</span>
        <span style="color: #ff7700;font-weight:bold;">return</span>  
</div></pre><!--END_DEVFMTCODE--></p>
<h2>Fooling nmap</h2>
<p>The desired functinality was that if an nmap service version scan was performed, such as:<br />
<!--DEVFMTCODE--><pre class="devcodeblock" title="Bash"><div class="devcodeoverflow"><span style="color: #c20cb9; font-weight: bold;">nmap</span> <span style="color: #660033;">-p</span> 1337 <span style="color: #660033;">-sV</span> <span style="color: #000000; font-weight: bold;">&lt;</span>host<span style="color: #000000; font-weight: bold;">&gt;</span></div></pre><!--END_DEVFMTCODE--></p>
<p>Nmap should score a match. When a service version in nmap is performed, nmap sends so called &#8216;probes&#8217; to the port and checks what is returned. It has a list of fingerprints for known services. For example, one service probe called  &#8220;TCP GetRequest&#8221; sends &#8220;GET / HTTP/1.0\r\n\r\n&#8221;, and if the response matches &#8220;HTTP/1\.[01] \d\d\d.*\r\nDate: .*\r\nServer: Apache\r\n&#8221;, it is identified as an Apache server. If it does NOT match, nmap goes through the rest of the probes &#8211; which we definitely want to avoid, as we want as little overhead as possible. </p>
<p>First of all, nmap has the so called &#8216;Null probe&#8217;, which means that it connects to the port and waits for a few seconds to check if the service will volunteer some info without the client sending any data. It is in this segment I wanted to have my matches, since it is the first test. All service fingerprints are located in a file called nmap-service-probes, and look something like this :<br />
<!--DEVFMTCODE--><pre class="devcodeblock" title="Bash"><div class="devcodeoverflow">
&nbsp;
match acap m<span style="color: #000000; font-weight: bold;">|</span>^\<span style="color: #000000; font-weight: bold;">*</span> ACAP \<span style="color: #7a0874; font-weight: bold;">&#40;</span>IMPLEMENTATION <span style="color: #000000; font-weight: bold;">\&quot;</span>CommuniGate Pro ACAP <span style="color: #7a0874; font-weight: bold;">&#40;</span>\d<span style="color: #7a0874; font-weight: bold;">&#91;</span>-.\<span style="color: #c20cb9; font-weight: bold;">w</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>+<span style="color: #7a0874; font-weight: bold;">&#41;</span><span style="color: #000000; font-weight: bold;">\&quot;</span>\<span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #000000; font-weight: bold;">|</span> p<span style="color: #000000; font-weight: bold;">/</span>CommuniGate Pro ACAP server<span style="color: #000000; font-weight: bold;">/</span> i<span style="color: #000000; font-weight: bold;">/</span><span style="color: #000000; font-weight: bold;">for</span> mail client preference sharing<span style="color: #000000; font-weight: bold;">/</span> v<span style="color: #000000; font-weight: bold;">/</span>$<span style="color: #000000;">1</span><span style="color: #000000; font-weight: bold;">/</span>
&nbsp;
</div></pre><!--END_DEVFMTCODE--></p>
<p>To match &#8216;acap&#8217;, we must send some data that matches the expression after between the first pipes. It is trivial to write such a match : \* ACAP (IMPLEMENTATION &#8220;CommuniGate Pro ACAP 3.3&#8243;) would be identified as acap version 3.3. However, there are a couple of thousand fingerprints on the Null probe, and I want to randomly use them all. Therefore, I wrote a tool to reverse the regexps and put them into a python declaration. </p>
<h2>Regexp reverse engineering</h2>
<p>I was surprised to find that I could not locate any existing library to reverse regular expressions in the way I wanted : from a regexp, create ONE simple string that matches it. The closest I could find was a perl implementation which found as many matches it could given a regexp and a fixed length. Therefore, I wrote my own tool. </p>
<p>Maybe it is pretty simple to reverse a regexp, if you are a great programmer who knows what you are doing. It took me a while, though &#8211; and still I used the parts building the object-tree represention of the regexp from the built-in python regexp implementation. Basically, it does this :<br />
* Remove all optional groups (foo)* => gone<br />
* Insert 1 for digits, insert a for alpha, etc&#8230;<br />
* Insert the first char in any group-of-characters [abcd] => a<br />
* Insert the first in any OR (abc|def) => abc<br />
&#8230; the list goes on a bit. It gets tricky when it comes to group-references and stuff. The source is available at <a href="http://martin.swende.se/hgwebdir.cgi/pxeger/file/tip/Revexpy.py">http://martin.swende.se/hgwebdir.cgi/pxeger/file/tip/Revexpy.py</a></p>
<h2>Putting it together</h2>
<p>So, did it work? Well, yes :<br />
<!--DEVFMTCODE--><pre class="devcodeblock" title="Bash"><div class="devcodeoverflow"><span style="color: #666666; font-style: italic;">#: nmap -p 82 66.249.7.26 -sV</span>
&nbsp;
PORT   STATE SERVICE VERSION
82<span style="color: #000000; font-weight: bold;">/</span>tcp open  <span style="color: #c20cb9; font-weight: bold;">ftp</span>     Xitami ftpd
&nbsp;
...again...
&nbsp;
PORT   STATE SERVICE VERSION
<span style="color: #000000;">82</span><span style="color: #000000; font-weight: bold;">/</span>tcp open  smtp    <span style="color: #7a0874; font-weight: bold;">&#40;</span>Wanadoo blocks smtp - NOT A REAL smtpd<span style="color: #000000; font-weight: bold;">!</span><span style="color: #7a0874; font-weight: bold;">&#41;</span>
&nbsp;
...again...
&nbsp;
PORT   STATE SERVICE VERSION
<span style="color: #000000;">82</span><span style="color: #000000; font-weight: bold;">/</span>tcp open  nngs    No Name Go Server
</div></pre><!--END_DEVFMTCODE--></p>
<p>Alas, also no. After a while, the python process died &#8211;  probably because it was running on a machine with 128 MB of memory, which it had to share with Apache and Mysql&#8230; </p>
<h2>Disclaimer</h2>
<p>While this was a really fun project which touched on a lot of interesting fields, I did not do it as a security-tool to actually use in a real scenario.</p>
<p>All the codez are available at:<br />
<a href="http://martin.swende.se/hgwebdir.cgi/fuzzywall/">http://martin.swende.se/hgwebdir.cgi/fuzzywall/</a><br />
<a href="http://martin.swende.se/hgwebdir.cgi/pxeger/">http://martin.swende.se/hgwebdir.cgi/pxeger/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.swende.se/index.php/2010/01/python-packet-play/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Uppe igen</title>
		<link>http://www.swende.se/index.php/2009/11/hello-world/</link>
		<comments>http://www.swende.se/index.php/2009/11/hello-world/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 22:03:27 +0000</pubDate>
		<dc:creator>martin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://wp.swende.se/wordpress/?p=1</guid>
		<description><![CDATA[Nu har jag återigen bytt CMS. Har gått igenom en del nu, körde på Serendipity (s9y) ett tag, sedan pluck, sedan lite django eftersom jag gärna ville köra Python. Har dock slutligen fastnat för Wordpress. Hoppas jag inte behöver byta igen. Kommer inte uppdatera detta så ofta, detta är mest för att kunna publicera lite [...]]]></description>
			<content:encoded><![CDATA[<p>Nu har jag återigen bytt CMS. Har gått igenom en del nu, körde på Serendipity (s9y) ett tag, sedan pluck, sedan lite django eftersom jag gärna ville köra Python. Har dock slutligen fastnat för Wordpress. Hoppas jag inte behöver byta igen. Kommer inte uppdatera detta så ofta, detta är mest för att kunna publicera lite verktyg och saker. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.swende.se/index.php/2009/11/hello-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Jack C Louis död</title>
		<link>http://www.swende.se/index.php/2009/03/jack-c-louis-dod/</link>
		<comments>http://www.swende.se/index.php/2009/03/jack-c-louis-dod/#comments</comments>
		<pubDate>Sun, 22 Mar 2009 21:00:05 +0000</pubDate>
		<dc:creator>martin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.swende.se/?p=44</guid>
		<description><![CDATA[Jack C Louis, som på senare tid blivit allt mer känd för sitt arbete bakom Sockstress och sedan tidigare känd som upphovsmannen bakom Unicornscan avled härom veckan i en villabrand i sitt hem i Sverige. Troligtvis skedde det i denna brand &#8211; (dock obekräftat). 
Jag lyssnade på honom och Robert E Lee på SEC-T i [...]]]></description>
			<content:encoded><![CDATA[<p>Jack C Louis, som på senare tid blivit allt mer känd för sitt arbete bakom <a href="http://sockstress.com/" title="Sockstress">Sockstress</a> och sedan tidigare känd som upphovsmannen bakom <a href="http://www.unicornscan.org/">Unicornscan</a> avled härom veckan i en villabrand i sitt hem i Sverige. Troligtvis skedde det i <a href="http://www.expressen.se/Nyheter/1.1498576/en-dod-i-brand-i-natt">denna brand</a> &#8211; (dock obekräftat). </p>
<p>Jag lyssnade på honom och Robert E Lee på SEC-T i Stockholm i höstas. Ett geni som avlidit alldeles för tidigt och kommer att saknas av många. </p>
<p>Mer info:
<ul>
<li><a href="http://blogs.hackerscenter.com/2009/03/unicornscan-author-jack-c-louis-dies-in.html">Memorial</a></p>
<li><a href="http://www.facebook.com/group.php?gid=302985395000">Facebook memorial</a>
<li><a href="http://blog.robertlee.name/2009/03/jack-c-louis-loss-of-dear-friend.html">Robert E Lee&#8217;s blog</a>
<li><a href="http://www.grc.com/sn/notes-164.htm">Mer om Sockstress</a> från Security Now!
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.swende.se/index.php/2009/03/jack-c-louis-dod/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Metadata-exploits (Windows)</title>
		<link>http://www.swende.se/index.php/2009/03/metadata-exploits-windows/</link>
		<comments>http://www.swende.se/index.php/2009/03/metadata-exploits-windows/#comments</comments>
		<pubDate>Sat, 07 Mar 2009 12:06:39 +0000</pubDate>
		<dc:creator>martin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.swende.se/?p=43</guid>
		<description><![CDATA[Det finns vitt spridda föreställningar om att man kan undvika virus/malware genom att låta bli att ladda hem och öppna filer &#8211; vilket naturligtvis inte stämmer &#8211; drive-by downloading är ett känt problem som har funnits länge. Helt enkelt att antingen browsern själv eller någon plugin (flashmotor, pdf, msn etc) är sårbar och utnyttjas för [...]]]></description>
			<content:encoded><![CDATA[<p>Det finns vitt spridda föreställningar om att man kan undvika virus/malware genom att låta bli att ladda hem och öppna filer &#8211; vilket naturligtvis inte stämmer &#8211; <a href="http://googleonlinesecurity.blogspot.com/2008/02/all-your-iframe-are-point-to-us.html">drive-by downloading</a> är ett känt problem som har funnits länge. Helt enkelt att antingen browsern själv eller någon plugin (flashmotor, pdf, msn etc) är sårbar och utnyttjas för att exekvera kod. </p>
<p>En liknande föreställning är att så länge man inte &#8220;öppnar&#8221; en fil så gör det inget om den är skadlig &#8211; den kan inte göra något. Didier Stevens har postat en video ( <a href="http://blog.didierstevens.com/2009/03/04/quickpost-jbig2decode-trigger-trio/">http://blog.didierstevens.com/2009/03/04/quickpost-jbig2decode-trigger-trio/</a> )på tre scenarior där malware lyckas exekvera utan att filen &#8220;öppnas&#8221; genom att lägga kod i metadata. Denna exekveras sedan av Explorer när dokumentet blir valt, eller när på dokumentets thumbnail visas i fönstret, eller när användaren hovrar med musen över det. Ta en titt på videon, det är intressanta grejer. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.swende.se/index.php/2009/03/metadata-exploits-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Jinx &#8211; a Greasemonkey XSS tool</title>
		<link>http://www.swende.se/index.php/2009/02/jinx-a-greasemonkey-xss-tool/</link>
		<comments>http://www.swende.se/index.php/2009/02/jinx-a-greasemonkey-xss-tool/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 07:12:13 +0000</pubDate>
		<dc:creator>martin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.swende.se/?p=42</guid>
		<description><![CDATA[I recently open-sourced a little project that helps finding XSS flaws. It is called Jinx and can be found at BitBucket. 
Jinx is a javascript-based tester for cross site scripting. Currently based on GreaseMonkey, but can be easily decoupled to be used without GM support. It is a &#8216;quick-n-dirty&#8217; way of testing a page you [...]]]></description>
			<content:encoded><![CDATA[<p>I recently open-sourced a little project that helps finding XSS flaws. It is called Jinx and can be found at <a href="http://bitbucket.org/holiman/jinx/" title="Jinx">BitBucket</a>. </p>
<p>Jinx is a javascript-based tester for cross site scripting. Currently based on GreaseMonkey, but can be easily decoupled to be used without GM support. It is a &#8216;quick-n-dirty&#8217; way of testing a page you are on, not an exhaustive way of testing an entire domain. </p>
<p>What it does is that it gathers all the links from the page you are at (including document.location), and the ones that contain parameters are then permutated so a payload is injected into the parameters, one at a time. If you select &#8220;Quick check&#8221;, then the payload tries to inject the characters &#8216; &#8221; and < and get them reflected into the page. Any of these three characters often signal lack of filtering and probable XSS exploitation. </p>
<p>For example "test?a=b&#038;c=d" generates two requests : "test?a=b
<payload>&#038;c=d&#8221; and &#8220;test?a=b&#038;c=d
<payload>&#8220;. A prompt tells you how many requests it wants to make, you can look at them or run them. </p>
<p>It is a pretty nice way to do some basic testing and often finds interesting stuff &#8211; I test all kinds of pages every now and then, it is staggering how many flaws are out there. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.swende.se/index.php/2009/02/jinx-a-greasemonkey-xss-tool/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Multirecension</title>
		<link>http://www.swende.se/index.php/2009/02/multirecension/</link>
		<comments>http://www.swende.se/index.php/2009/02/multirecension/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 18:44:33 +0000</pubDate>
		<dc:creator>martin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.swende.se/?p=41</guid>
		<description><![CDATA[De sista böckerna för 2009 som jag inte hunnit skriva om sammanfattas här i kortform : 
Fatherland av Robert Harris är en klassisk spänningsroman av gammalt stuk; Polis utreder mord, kommer för nära makten och hamnar risigt till. Samt blir ihop med The Woman på vägen. En twist är att storyn är förlagd i 60-talets [...]]]></description>
			<content:encoded><![CDATA[<p>De sista böckerna för 2009 som jag inte hunnit skriva om sammanfattas här i kortform : </p>
<p><!-- s9ymdb:42 --><img class="serendipity_image_left" width="74" height="120" style="float: left; border: 0px; padding-left: 5px; padding-right: 5px;" src="/uploads/fatherland.serendipityThumb." alt="" /><strong>Fatherland</strong> av <strong>Robert Harris</strong> är en klassisk spänningsroman av gammalt stuk; Polis utreder mord, kommer för nära makten och hamnar risigt till. Samt blir ihop med The Woman på vägen. En twist är att storyn är förlagd i 60-talets tyskland efter att tyskland vunnit andra världskriget. Okej bok. Men läs hans bok Pompeii istället.</p>
<p><!-- s9ymdb:41 --><img class="serendipity_image_right" width="78" height="120" style="float: right; border: 0px; padding-left: 5px; padding-right: 5px;" src="/uploads/bedroom-secrets.serendipityThumb." alt="" /><strong>Bedroom Secrets of the Master Chefs, Irvine Welsh</strong>. Efter att Welsh tappade formen lite med boken &#8220;Filth&#8221; så hittade han den igen snabbt. Högklassig  Welsh. </p>
<p><!-- s9ymdb:40 --><img class="serendipity_image_left" width="78" height="120" style="float: left; border: 0px; padding-left: 5px; padding-right: 5px;" src="/uploads/9780141034591.serendipityThumb." alt="" /><strong>The Black Swan</strong>, av <strong>Nassim Nicholas Taleb</strong>, handlar om hur de svarta svanarna formar världen mycket mer än vad de flesta vill erkänna. Taleb ger kängor åt alla möjliga håll, inte minst åt ekonomi-&#8221;vetenskapen&#8221;. Denna bok är en av de mest intressanta jag läst under 2009. </p>
<p><!-- s9ymdb:38 --><img class="serendipity_image_right" width="75" height="120" style="float: right; border: 0px; padding-left: 5px; padding-right: 5px;" src="/uploads/lords-bow.serendipityThumb." alt="" /><!-- s9ymdb:39 --><img class="serendipity_image_right" width="78" height="120" style="float: right; border: 0px; padding-left: 5px; padding-right: 5px;" src="/uploads/bones-hill.serendipityThumb." alt="" /><strong>Lords of the Bow</strong> samt <strong>Bones of the Hill</strong>, av <strong>Conn Iggulden</strong>, del två och tre i trilogin om Gengis Kahn. Iggulden är nog den bästa författaren av &#8220;historisk fiction&#8221;, och trilogin om Gengis är minst lika bra som den tidigare serien om Romarriket. </p>
<p><!-- s9ymdb:37 --><img class="serendipity_image_left" width="84" height="120" style="float: left; border: 0px; padding-left: 5px; padding-right: 5px;" src="/uploads/crooked-little.serendipityThumb." alt="" /><strong>Crooked little vein, Warren Ellis</strong> &#8211; Warren Ellis har mest gjort sig känd som författare till grafiska noveller, detta är hans debutroman. Det märks att detta är en författare som är dels väldigt van att skriva, men inte så väldigt van att skriva böcker. Det är annorlunda, helt enkelt. Det är det roligaste jag läst på länge, även om man också märker att han hittat på lite &#8220;as he goes along&#8221; &#8211; när han skrev början hade han ingen aning om hur det skulle fortsätta, vilket kan vara lite vanskligt när man skriver boken i första person singular imperfekt. Galen, svart och rolig.</p>
<p><!-- s9ymdb:36 --><img class="serendipity_image_right" width="77" height="120" style="float: right; border: 0px; padding-left: 5px; padding-right: 5px;" src="/uploads/youngtodie.serendipityThumb." alt="" /><strong>För ung för att dö, Christer Isaksson</strong> &#8211; Christer Isaksson gör kulturgärning genom att berätta om en av Sveriges sista avrättningar : avrättningen av Theodor Sallrot. Detta är berättelsen om honom och människorna i hans närhet, samt i viss mån samhället de levde i och samhället vi lever i. Fantastisk bok, rekommenderas starkt. </p>
<p><!-- s9ymdb:35 --><img class="serendipity_image_left" width="78" height="120" style="float: left; border: 0px; padding-left: 5px; padding-right: 5px;" src="/uploads/netherland.serendipityThumb." alt="" /><strong>Netherland, av Joseph O&#8217;Neill</strong> &#8211; Netherland är en ganska hårt hypad roman som utkom strax före sommaren &#8211; författaren är bosatt i New York och har skrivit om det post-9/11-traumatiserade New York. Som vanligt när en bra bok kommer ut i USA ställer sig folk frågan :&#8221;Den är bra, men är den The Great American Novel?&#8221;, och som vanligt besvaras det med &#8220;Nej&#8221;. Det verkar finnas nån förväntning på att nu, snart, nån gång kommer the novel to end all novels (och den kommer vara amerikansk). Ganska lustigt det där. </p>
<p>Iallafall, det är en ruskigt fingerspitzgefûhl som genomsyrar denna bok. Författaren skiljdrar ytterst finkänsligt vad som pågår i huvudet på stackars NN , som snubblar sig fram i livet genom äktenskaps- och livskris. Det är inte årets största sensation men en väldigt bra roman. Litteratur av hög kvalitet. </p>
<p><!-- s9ymdb:34 --><img class="serendipity_image_right" width="78" height="120" style="float: right; border: 0px; padding-left: 5px; padding-right: 5px;" src="/uploads/allah-obliged.serendipityThumb." alt="" /><strong>Allah is not obliged, Ahmadou Korouma</strong>. Meh. Fick tipset från DN, men denna bok var inget vidare. Beskriver en barnsoldats liv &#8211; men ska man gestalta en liten obildad gosse som inte gått i skolan så får man hålla sig från långrandiga politiska utläggningar. Är man en sjuttioårig, högutbildad och extremt insatt i politik kanske man ska hålla sig till sitt eget perspektiv. </p>
<p><!-- s9ymdb:33 --><img class="serendipity_image_left" width="75" height="120" style="float: left; border: 0px; padding-left: 5px; padding-right: 5px;" src="/uploads/annan-tid-annat-liv.serendipityThumb." alt="" /><strong>En annan tid, ett annat liv</strong>, <strong>Leif GW Persson</strong>. Jorå, den var bra. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.swende.se/index.php/2009/02/multirecension/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Waffing: ModSecurity applied</title>
		<link>http://www.swende.se/index.php/2008/12/waffing-modsecurity-applied/</link>
		<comments>http://www.swende.se/index.php/2008/12/waffing-modsecurity-applied/#comments</comments>
		<pubDate>Fri, 12 Dec 2008 07:32:44 +0000</pubDate>
		<dc:creator>martin</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.swende.se/?p=40</guid>
		<description><![CDATA[WAF &#8211; Web Application Firewalls- what are they good for and how do they work? 
I just read (though not the entire thing, just the first 40 pages) Securing WebGoat using ModSecurity. Basically, Stephen Craig Evans configured ModSecurity to patch most of the vulnerabilities in a very vulnerable web application &#8211; WebGoat. Using both traditional [...]]]></description>
			<content:encoded><![CDATA[<p>WAF &#8211; Web Application Firewalls- what are they good for and how do they work? </p>
<p>I just read (though not the entire thing, just the first 40 pages) Securing WebGoat using ModSecurity. Basically, Stephen Craig Evans configured ModSecurity to patch most of the vulnerabilities in a very vulnerable web application &#8211; WebGoat. Using both traditional regexp-based ModSecurity rules and combining this with <a href="http://www.lua.org/" title="Lua">Lua-scripting</a> he has shown how even complexities such as business logic flaws can be mitigated by a WAF. That is, basically a filtering layer (proxy) between the end user and the (insecure) web application.</p>
<p>It is not a silver bullet and yada yada, but WAFs seem to me to be a great tool to use for certain purposes: it gives you the chance to not touch a line of code on the application. For the purpose of patching painfully old systems, that should really have been taken out and shot but are kept running for &#8216;business-reasons&#8217;, I&#8217;d rather learn ModSecurity + e.g Lua properly than having to learn every thinkable and unthinkable language and platform ever used for throwing together web content. </p>
<p>Read it, if you are into security, which you must be if you made it past the first sentence of this entry</p>
<p>-Project wiki: <a href=" http://www.owasp.org/index.php/OWASP_Securing_WebGoat_using_ModSecurity_Project"> http://www.owasp.org/index.php/OWASP_Securing_WebGoat_using_ModSecurity_Project</a><br />
-Doc : <a href="http://www.owasp.org/index.php/Image:OWASP_ModSecurity_Securing_WebGoat_wiki_28Nov2008.zip">http://www.owasp.org/index.php/Image:OWASP_ModSecurity_Securing_WebGoat_wiki_28Nov2008.zip</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.swende.se/index.php/2008/12/waffing-modsecurity-applied/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
