<?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>WebSpy Blog&#187; Luke Arnold &#8211; WebSpy Blog</title>
	<atom:link href="http://www.webspy.com.au/blogs/index.php/author/luke/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.webspy.com.au/blogs</link>
	<description>For when WebSpyrians have something to say.</description>
	<lastBuildDate>Fri, 09 Dec 2011 01:18:27 +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>Detecting a distributed reflected DNS attack</title>
		<link>http://www.webspy.com.au/blogs/index.php/detecting-a-distributed-reflected-dns-attack/</link>
		<comments>http://www.webspy.com.au/blogs/index.php/detecting-a-distributed-reflected-dns-attack/#comments</comments>
		<pubDate>Fri, 10 Dec 2010 07:52:57 +0000</pubDate>
		<dc:creator>Luke Arnold</dc:creator>
				<category><![CDATA[Cyber Crime]]></category>
		<category><![CDATA[Firewall Analysis]]></category>
		<category><![CDATA[How To]]></category>
		<category><![CDATA[Log File Analysis]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[Vantage]]></category>
		<category><![CDATA[attack]]></category>
		<category><![CDATA[cyber attack]]></category>
		<category><![CDATA[dns]]></category>
		<category><![CDATA[dos]]></category>
		<category><![CDATA[drdos]]></category>
		<category><![CDATA[Firewall]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[vps]]></category>

		<guid isPermaLink="false">http://www.webspy.com.au/blogs/?p=2047</guid>
		<description><![CDATA[The other night as I was getting ready to sleep, I received an email from the host of my personal Linux VPS saying that I had exceeded my monthly transfer quota. I didn't pay much mind to the warning, as the excess transfer was insignificant, and at that time I was too tired to care. I closed my email, got into bed and fell asleep.]]></description>
			<content:encoded><![CDATA[<p>The other night as I was getting ready to sleep, I received an email from the host of my personal Linux VPS saying that I had exceeded my monthly transfer quota. I didn&#8217;t pay much mind to the warning, as the excess transfer was insignificant, and at that time I was too tired to care. I closed my email, got into bed and fell asleep.</p>
<p><span id="more-2047"></span></p>
<p>The next morning I woke to find several more messages from my VPS host, each with a higher and more significant excess transfer than the last. At this point it occurred to me that it was unusual for my VPS to reach its quota, let alone exceed it. The excess transfer was now enough that it was going to incur significant cost, so I set about investigating the cause.</p>
<p>I downloaded some firewall logs for the previous few days from the server and imported them into Vantage. The first place I looked was in an analysis at the &#8220;Source Address&#8221; summary, to see where the activity was coming from. What I found was a single host with a disproportionately larger amount of transferred data than the other addresses listed, so I drilled down to the &#8220;Destination Port&#8221; summary for this source address to see what services it was accessing. I found that all the traffic was going to port 53 &#8211; my DNS. More accurately, the large amount of data was going <em>from</em> my DNS to the source address. Drilling down to the &#8220;Individual records&#8221; view then showed that my server was providing a large response to a small DNS request from that source address &#8211; about 20 times per second.</p>
<p>Curious about why this single machine somewhere on the Internet was bombarding my server with small DNS requests at such a high rate, I set my server&#8217;s firewall to deny packets from that address and began searching around online for any information.</p>
<p>I quickly found out that I hadn&#8217;t configured my DNS properly, and it was set to allow recursive requests, meaning that if a request came in for a domain my server wasn&#8217;t authoritative for, it would then forward the request to another DNS that could answer, or given a blank request it would respond with the full list of root servers. Running tcpdump on the VPS revealed that every request coming in was blank, and my server was responding with the full list of root servers for each request.</p>
<p>It still seemed odd that a server would be constantly sending small requests to my server and receiving large responses. Then it dawned on me; I was looking at a Distributed Reflected Denial of Service (DRDoS) attack. The source address in all the requests I had looked at was forged by the attackers, so that my server &#8211; and many other servers out there also receiving the requests &#8211; would send their responses to the forged source address in an attempt to flood its connection. The source address in my firewall logs was the target of the attack. I found more information about this specific type of attack <a title="here" href="http://isc.sans.edu/diary.html?storyid=5713" target="_blank">here</a>.</p>
<p>Having disabled recursion on my DNS, my server&#8217;s contribution to the attack was significantly reduced. However, my server was now responding with a much smaller &#8220;request denied&#8221; packet for each incoming request. I wanted some way of preventing my DNS from responding at all, so again I headed out to the Internet to see what I could find.</p>
<p>I discovered a package called &#8220;fail2ban&#8221;, which dynamically updates your firewall rules to block addresses that are abusing your server&#8217;s services. I installed it using <a title="this guide" href="http://www.debian-administration.org/article/Blocking_a_DNS_DDOS_using_the_fail2ban_package" target="_blank">this guide</a>, and immediately my bandwidth usage dropped off as it blocked further DNS requests. Even now the requests are still flooding in, but now my VPS contributes only a handful of packets towards the attack instead of the previous millions per day.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webspy.com.au/blogs/index.php/detecting-a-distributed-reflected-dns-attack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenBSD 4.6 on XenServer 5</title>
		<link>http://www.webspy.com.au/blogs/index.php/openbsd-46-on-xenserver-5/</link>
		<comments>http://www.webspy.com.au/blogs/index.php/openbsd-46-on-xenserver-5/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 07:09:17 +0000</pubDate>
		<dc:creator>Luke Arnold</dc:creator>
				<category><![CDATA[System Administration]]></category>
		<category><![CDATA[openbsd]]></category>
		<category><![CDATA[xenserver]]></category>

		<guid isPermaLink="false">http://www.webspy.com.au/blogs/?p=1292</guid>
		<description><![CDATA[I've just been trying to set up an OpenBSD 4.6 VM on one of our XenServer machines, and found that it kept shutting itself down during boot after showing the message "nvram: invalid checksum". After digging around online, I found a fix.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just been trying to set up an OpenBSD 4.6 VM on one of our XenServer machines, and found that it kept shutting itself down during boot after showing the message &#8220;nvram: invalid checksum&#8221;. After digging around online, I found a fix.</p>
<p><span id="more-1292"></span></p>
<p>As the VM starts, it will present a boot prompt. At this prompt, type</p>
<pre style="padding-left: 30px;">boot&gt; boot -c</pre>
<p>This will boot you into  &#8220;User Kernel Config&#8221;. Once in there, type the following commands;</p>
<pre style="padding-left: 30px;">UKC&gt; disable uhci
UKC&gt; quit</pre>
<p>This will exit User Kernel Config, and continue a normal boot. The &#8220;nvram: invalid checksum&#8221; error still appears, but the OpenBSD VM should now boot correctly. However, it will fail again on next reboot of the VM, so to make the change permanent, log in to the VM as root and enter the following commands;</p>
<pre style="padding-left: 30px;"># config -e -f /bsd
ukc&gt; disable uhci
ukc&gt; quit</pre>
<p>Now the change is permanent, and the OpenBSD VM will boot correctly in future.</p>
<p>I posted this because I was unable to find any English information on how to fix this problem. I got the solution from an <a href="http://karl0204.at.webry.info/200907/article_3.html" target="_blank">article written in Japanese</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webspy.com.au/blogs/index.php/openbsd-46-on-xenserver-5/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
		<item>
		<title>Subnet Representations and Aliases</title>
		<link>http://www.webspy.com.au/blogs/index.php/subnet-representations-and-aliases/</link>
		<comments>http://www.webspy.com.au/blogs/index.php/subnet-representations-and-aliases/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 02:38:40 +0000</pubDate>
		<dc:creator>Luke Arnold</dc:creator>
				<category><![CDATA[Aliases]]></category>
		<category><![CDATA[Vantage]]></category>
		<category><![CDATA[Addresses]]></category>
		<category><![CDATA[IPv4]]></category>
		<category><![CDATA[IPv6]]></category>
		<category><![CDATA[Subnet Reporting]]></category>
		<category><![CDATA[Subnets]]></category>

		<guid isPermaLink="false">http://www.webspy.com.au/blogs/?p=637</guid>
		<description><![CDATA[Anybody who has manually configured their network settings has had to enter a subnet mask, usually in the form of "#.#.#.#". The most familiar subnet value for many is 255.255.255.0, representing that the first three segments of the associated IP address must be the same as another IP address for the other address to match the subnet. The behaviour of this subnet is almost self-evident due to the syntax. However, this syntax can be misleading. What does a subnet of 255.240.0.0 mean? Or the subnet 255.192.0.0? And why is the subnet 255.127.0.0 invalid?]]></description>
			<content:encoded><![CDATA[<p>Anybody who has manually configured their network settings has had to enter a subnet mask, usually in the form of &#8220;#.#.#.#&#8221;. The most familiar subnet value for many is 255.255.255.0, representing that the first three segments of the associated IP address must be the same as another IP address for the other address to match the subnet. The behaviour of this subnet is almost self-evident due to the syntax. However, this syntax can be misleading. What does a subnet of 255.240.0.0 mean? Or the subnet 255.192.0.0? And why is the subnet 255.127.0.0 invalid?</p>
<p><span id="more-637"></span>An alternative, if not more sensible, representation of subnets is the slash notation, or &#8220;/n&#8221; where &#8216;n&#8217; is the &#8216;mask length&#8217; – the number of bits that must match between two IP addresses to make them part of the same subnet.</p>
<p>Consider the following;</p>
<pre>     IP 192.168.0.1
          (binary: 11000000 10101000 00000000 00000001)</pre>
<pre>     Subnet 255.255.255.0
          (binary: 11111111 11111111 11111111 00000000)</pre>
<p>This would be the same as 192.168.0.1/24, as 255.255.255.0 has the first 24 bits turned on, meaning anything that starts with 192.168.0.x will match it.</p>
<p>A /16 is equivalent to 255.255.0.0, as only the first 16 bits are on. 192.168.0.1/16 would match anything between 192.168.0.0 and 192.168.255.255.</p>
<p>It gets a bit messy with mask lengths that aren&#8217;t multiples of 8, for example 10.0.0.1/12 (/12 is equivalent to 255.240.0.0) would match anything between 10.0.0.0 and 10.15.255.255, and 10.16.0.1/12 would match anything between 10.16.0.0 and 10.31.255.255. This is because the addresses must match all 8 bits of the first segment (10), and only the most significant 4 bits of the second segment (16), making for a total match of 12 bits, or a /12 subnet. For example;</p>
<pre>     IP 10.0.0.1
          (00001010 00000000 00000000 00000001)</pre>
<pre>     IP 10.16.0.1
          (00001010 00010000 00000000 00000001)</pre>
<pre>     Subnet 255.240.0.0 (/12)
          (11111111 11110000 00000000 00000000)</pre>
<p>In effect, the shown bits must be the same for the /12 subnet to match an IP in that subnet range;</p>
<pre>     IP/Subnet 10.16.0.0/12
          (00001010 0001xxxx xxxxxxxx xxxxxxxx)</pre>
<pre>     IP 10.16.1.5 matches 10.16.0.0/12
          (00001010 00010000 00000001 00000101)</pre>
<pre>     IP 10.19.3.1 matches 10.16.0.0/12
          (00001010 00010011 00000011 00000001)</pre>
<pre>     IP 10.31.1.1 matches 10.16.0.0/12
          (00001010 00011111 00000001 00000001)</pre>
<pre>     IP 10.32.1.1 does not match 10.16.0.0/12
          (00001010 00100000 00000001 00000001)</pre>
<pre>     IP 10.0.1.1 does not match 10.16.0.0/12
          (00001010 00000000 00000001 00000001)</pre>
<p>WebSpy Vantage uses the slash notation to represent subnet values in Subnet Aliases because it is easier to understand and represent. The slash notation is also used to represent IPv6 subnets, where there is no suitable analogue to the #.#.#.# representation of IPv4 subnets.</p>
<p>I found a subnet calculator that converts between the slash notation and the #.#.#.# representation at http://www.nettoolsonline.com/slash_conversion.php, which comes in handy if you don&#8217;t want to have to do the maths yourself.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webspy.com.au/blogs/index.php/subnet-representations-and-aliases/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Diagnostic Tracing in Vantage</title>
		<link>http://www.webspy.com.au/blogs/index.php/diagnostic-tracing-in-vantage/</link>
		<comments>http://www.webspy.com.au/blogs/index.php/diagnostic-tracing-in-vantage/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 07:18:46 +0000</pubDate>
		<dc:creator>Luke Arnold</dc:creator>
				<category><![CDATA[How To]]></category>
		<category><![CDATA[Vantage]]></category>
		<category><![CDATA[WebSpy]]></category>
		<category><![CDATA[config]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[diagnostic]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[logging]]></category>
		<category><![CDATA[logs]]></category>
		<category><![CDATA[tracing]]></category>

		<guid isPermaLink="false">http://www.webspy.com.au/blogs/?p=152</guid>
		<description><![CDATA[Diagnostic Tracing is a way to find out the details of what Vantage does when performing a variety of actions such as importing logs, generating a report, and so on. Sometimes an error may occur during these actions, and the error presented to the user can often be cryptic and meaningless. Tracing shows the steps that led up to an error, and shows far more detail about the error itself that the dialog presented to the user.]]></description>
			<content:encoded><![CDATA[<p>Diagnostic Tracing is a way to find out the details of what Vantage does when performing a variety of actions such as importing logs, generating a report, and so on. Sometimes an error may occur during these actions, and the error presented to the user can often be cryptic and meaningless. Tracing shows the steps that led up to an error, and shows more detail about the error itself than the dialog presented to the user.<br />
<span id="more-152"></span><br />
To enable tracing in Vantage, create the file &#8220;WebSpy.Vantage.exe.config&#8221; alongside the Vantage executable (usually found in C:\Program Files\WebSpy\Vantage (edition) (version)\) with the following contents;</p>
<pre style="padding-left: 30px;">&lt;?xml version="1.0" encoding="utf-8" ?&gt;
&lt;configuration&gt;
	&lt;appSettings&gt;
		&lt;add key="synopsisCallStack" value="true" /&gt;
		&lt;add key="traceLog" value="true" /&gt;
	&lt;/appSettings&gt;
	&lt;system.diagnostics&gt;
		&lt;switches&gt;
			&lt;add name="LogOutput" value="4" /&gt;
		&lt;/switches&gt;
	&lt;/system.diagnostics&gt;
&lt;/configuration&gt;</pre>
<p>After creating the file, restart Vantage. A trace log will be created in your local application data folder;</p>
<p><em> XP; C:\Documents and Settings\%username%\Local Settings\Application Data\WebSpy\Vantage (edition)\(build)\trace.log </em></p>
<p><em> Vista; C:\Users\%username%\AppData\Local\WebSpy\Vantage (edition)\(build)\trace.log</em></p>
<p>The trace log shows the list of steps performed, and the details of any errors encountered. This information is useful to WebSpy when diagnosing errors reported by users.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.webspy.com.au/blogs/index.php/diagnostic-tracing-in-vantage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

