<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Curl on Hashbang.ca</title>
		<link>https://hashbang.ca/tag/curl</link>
		<description>Recent content in Curl on Hashbang.ca</description>
		<generator>Hugo</generator>
		<language>en-us</language>
		
		
		
		
			<lastBuildDate>Thu, 04 Jul 2013 11:05:00 -0400</lastBuildDate>
		
			<atom:link href="https://hashbang.ca/tag/curl/index.xml" rel="self" type="application/rss+xml" />
			<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 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>
	</channel>
</rss>
