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