<?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>Veracode Security Blog: Application security research, security trends and opinions &#187; 2009 &#187; March</title>
	<atom:link href="http://www.veracode.com/blog/2009/03/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.veracode.com/blog</link>
	<description>Application security testing, analysis, and metrics</description>
	<lastBuildDate>Wed, 16 May 2012 18:18:53 +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>Failing to Check Error Conditions Could Get You Sued</title>
		<link>http://www.veracode.com/blog/2009/03/failing-to-check-error-conditions-could-get-you-sued/</link>
		<comments>http://www.veracode.com/blog/2009/03/failing-to-check-error-conditions-could-get-you-sued/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 17:12:38 +0000</pubDate>
		<dc:creator>Chris Eng</dc:creator>
				<category><![CDATA[Application Security]]></category>
		<category><![CDATA[QA]]></category>
		<category><![CDATA[RESEARCH]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://www.veracode.com/blog/?p=713</guid>
		<description><![CDATA[The Ontario Lottery and Gaming Corp. is in a bit of hot water after refusing to pay a $42.9 million jackpot: According to the statement, Kusznirewicz was playing an OLG slot machine called Buccaneer at Georgian Downs in Innisfil, Ont., on Dec. 8 when it showed he had won $42.9 million. When the machine&#8217;s winning [...]]]></description>
			<content:encoded><![CDATA[<p>The Ontario Lottery and Gaming Corp. is in a bit of hot water after <a href="http://www.cbc.ca/consumer/story/2009/03/17/slot.html">refusing to pay a $42.9 million jackpot</a>:</p>
<blockquote><p>According to the statement, Kusznirewicz was playing an OLG slot machine called Buccaneer at Georgian Downs in Innisfil, Ont., on Dec. 8 when it showed he had won $42.9 million.</p>
<p>When the machine&#8217;s winning lights and sounds were activated, an OLG floor attendant initially told Kusznirewicz to go to the &#8220;winners circle&#8221; to claim his prize, according to the statement. But other OLG employees immediately arrived and told him that the corporation would not be paying, because there had been a &#8220;machine malfunction.&#8221;</p>
<p>They offered him a free dinner for four at the casino&#8217;s buffet.</p></blockquote>
<p>In a press release, OLG described the malfunction as follows:</p>
<blockquote><p>&#8220;The single Buccaneer-themed slot machine in question is a two cent per play machine with a base game reward of $300 and an absolute maximum payout of $9,025,&#8221; the release states.</p>
<p>&#8220;The $42 million figure is not a possible award given this machine&#8217;s configuration and pay table settings.&#8221;</p></blockquote>
<p>Of course the lawsuit will probably be thrown out, or OLG will settle with the guy for a lesser amount.  But from a technical perspective, it&#8217;s amusing to think about what happened to cause this scenario.  You can imagine the slot machine software looking something like this:</p>
<pre>
void do_spin() {
  spin_reels();
  if (winning_combination) {
    unsigned int winnings = calculate_payout_in_cents();
    send_to_display("You've won $%u!n", winnings/100);
    add_to_balance(winnings/100);
  }
}

int calculate_payout_in_cents() {
  int rv;
  if (rv = lookup_payout_amount())
    return rv;
  else
    return -1;
}
</pre>
<p>For some reason, something caused lookup_payout_amount() to return NULL, which meant calculate_payout_in_cents() returned -1, signifying an error.  Then, in addition to implicitly <a href="http://cwe.mitre.org/data/definitions/195.html">casting the signed result to an unsigned type</a>, do_spin() fails to <a href="http://cwe.mitre.org/data/definitions/391.html">check for the error condition</a>!  It assumes success and announces the payout via the slot machine&#8217;s display.  In this case, the -1, represented as 0xFFFFFFFF in two&#8217;s complement, gets interpreted as an unsigned number, 4294967295, due to the implicit cast, and the display prints &#8220;You&#8217;ve won $42949672!&#8221;</p>
<p>Today&#8217;s lesson: remember to check your error conditions!</p>
<p>&nbsp;</p>
<h3>FREE Security Tutorials from Veracode</h3>
<p><a href="http://www.veracode.com/security/cyber-security">Cyber Security Threats</a><br />
<a href="http://www.veracode.com/security/mobile-code-security">Mobile Phone Security</a><br />
<a href="http://www.veracode.com/security/flash-security">Flash Player Security</a><br />
<a href="http://www.veracode.com/security/sql-injection">SQL Injection Attack</a><br />
<a href="http://www.veracode.com/security/crlf-injection">CRLF Injection</a><br />
&nbsp;</p>
<h3>Veracode Security Solutions</h3>
<p><a href="http://www.veracode.com/security/software-security-testing">Software Security Testing</a><br />
<a href="http://www.veracode.com/security/binary-code-analysis">Binary Code Analysis</a><br />
<a href="http://www.veracode.com/security/application-testing-tool">Application Testing</a><br />
&nbsp;</p>
<h3>Veracode Data Security Resources</h3>
<p><a href="http://www.veracode.com/security/data-breach">Data Breaches</a><br />
<a href="http://www.veracode.com/security/data-loss-prevention">Data Loss Prevention</a><br />
<a href="http://www.veracode.com/security/data-security">Data Security</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.veracode.com/blog/2009/03/failing-to-check-error-conditions-could-get-you-sued/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SOURCE Boston Conference Was a Blast</title>
		<link>http://www.veracode.com/blog/2009/03/source-boston-conference-was-a-blast/</link>
		<comments>http://www.veracode.com/blog/2009/03/source-boston-conference-was-a-blast/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 22:46:18 +0000</pubDate>
		<dc:creator>Chris Wysopal</dc:creator>
				<category><![CDATA[Application Security]]></category>
		<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[RESEARCH]]></category>

		<guid isPermaLink="false">http://www.veracode.com/blog/?p=707</guid>
		<description><![CDATA[I had a great time at the SOURCE Boston conference last week. Veracode was a sponsor and a few Veracoders participated as advisory members or volunteers. I had the pleasure, along with Chris Eng, of presiding over the application security track. I think all the talks were of high quality but still a few stood [...]]]></description>
			<content:encoded><![CDATA[<p>I had a great time at the SOURCE Boston conference last week.  Veracode was a sponsor and a few Veracoders participated as advisory members or volunteers.  I had the pleasure, along with Chris Eng, of presiding over the application security track.  I think all the talks were of high quality but still a few stood out for me:  </p>
<p>Dino Dai Zovi on Mac OS Xploitation.  Dino showed how to exploit a quicktime heap overflow.  He got the built in iSight camera to take a picture of his victim and send it to him just by clicking on a malicious quicktime movie file.  He talked about how exploiting OS X is 1999 all over again because of the lack of ASLR and stack canary protection.  He said hacking Windows and Linux is a chore, but OS X is still fun.</p>
<p>Chris Gates and Vince Marvelli on Attacking Layer 8: Client Side Penetration Testing.  Client side attacks are on the rise and now the corporate attack of choice yet we don&#8217;t pen test for them.  What&#8217;s up with that?  The video for this one is already available online at <a href="http://vimeo.com/channels/fullscopesecurity">Vimeo</a>. </p>
<p>Val Smith on Dissecting Foreign Web Attacks.  Val unwound one of the popular attacks of our time: compromising web sites to install malicious code that owns the browser and then installs a bot.  We all understand it is possible but it is great to see all the tricks of the trade.  It is pretty clear that the source of this one was China.</p>
<p>Chris Hoff on The Frogs Who Desired A King: A Virtualization and Cloud Computing Security Fable Set To Interpretive Dance.  This talk is being touted as the best ever.  Unfortunately I missed it.  Can&#8217;t wait to see the video.</p>
<p>The videos for all the SOURCE talks should be on-line over the next few weeks.  Check <a href="http://www.sourceconference.com">www.sourceconference.com</a></p>
<p>There are some other reviews of the conference out there that will help you decide which videos are worth watching:</p>
<ul>
<li><a href="http://g0ne.wordpress.com/2009/03/15/thoughts-on-source-boston/">Thoughts On Source Boston</a></li>
<li><a href="http://blog.decurity.com/index.php/dec_template/more/review_sourceboston_2009/">Review Source Boston 2009</a></li>
<li><a href="http://www.rationalsurvivability.com/blog/?p=8">Comments on Chris Hoff&#8217;s talk</a></li>
</ul>
<h5>Veracode Security Solutions</h5>
<div style="margin-left:15px;">
<a href="http://www.veracode.com/security/static-analysis-tool">Static Analysis</a><br />
<a href="http://www.veracode.com/security/web-application-security-testing">Web Application Security</a><br />
<a href="http://www.veracode.com/security/web-security">Website Security</a><br />
<a href="http://www.veracode.com/security/vulnerability-assessment-software">Vulnerability Assessment</a><br />
<a href="http://www.veracode.com/security/application-testing-tool">Application Analysis</a><br />
<a href="http://www.veracode.com/security/static-code-analysis">Static Code Analysis</a><br />
<a href="http://www.veracode.com/security/code-analysis">Source Code Analysis</a><br />
<a href="http://www.veracode.com/security/software-testing-tools">Software Testing Tools</a><br />
<a href="http://www.veracode.com/">Application Security</a></div>
<p></p>
<h5 style="margin-bottom: 10px">Security Threat Guides</h5>
<div style="margin-left:15px;">
<a href="http://www.veracode.com/security/csrf">CSRF</a><br />
<a href="http://www.veracode.com/security/ldap-injection">LDAP Security</a><br />
<a href="http://www.veracode.com/security/mobile-code-security">Mobile Security</a><br />
<a href="http://www.veracode.com/security/sql-injection">SQL Injection</a><br />
<a href="http://www.veracode.com/security/xss">Cross Site Scripting Vulnerabilities</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.veracode.com/blog/2009/03/source-boston-conference-was-a-blast/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Hell Freezes Over</title>
		<link>http://www.veracode.com/blog/2009/03/hell-freezes-over/</link>
		<comments>http://www.veracode.com/blog/2009/03/hell-freezes-over/#comments</comments>
		<pubDate>Wed, 04 Mar 2009 15:07:40 +0000</pubDate>
		<dc:creator>Chris Wysopal</dc:creator>
				<category><![CDATA[Application Security]]></category>
		<category><![CDATA[RESEARCH]]></category>

		<guid isPermaLink="false">http://www.veracode.com/blog/?p=700</guid>
		<description><![CDATA[A security bug was found in djbdns. Daniel Bernstein pays his promised security bug bounty for the first time. More details about the bug on BugTraq. Date: 4 Mar 2009 01:34:21 -0000 From: D. J. Bernstein To: dns@list.cr.yp.to Subject: djbdns]]></description>
			<content:encoded><![CDATA[<p>A security bug was found in djbdns. Daniel Bernstein pays his promised security bug bounty for the first time.  More details about the bug on <a href="http://www.securityfocus.com/archive/1/501294/30/0/threaded">BugTraq</a>.</p>
<blockquote><p>
Date: 4 Mar 2009 01:34:21 -0000<br />
From: D. J. Bernstein <djb@cr.yp.to><br />
To: dns@list.cr.yp.to<br />
Subject: djbdns<=1.05 lets AXFRed subdomains overwrite domains</p>
<p>If the administrator of example.com publishes the example.com DNS data through tinydns and axfrdns, and includes data for sub.example.com transferred from an untrusted third party, then that third party can control cache entries for example.com, not just sub.example.com. This is the result of a bug in djbdns pointed out by Matthew Dempsky. (In short, axfrdns compresses some outgoing DNS packets incorrectly.)</p>
<p>Even though this bug affects very few users, it is a violation of the expected security policy in a reasonable situation, so it is a security hole in djbdns. Third-party DNS service is discouraged in the djbdns documentation but is nevertheless supported. Dempsky is hereby awarded $1000.</p>
<p>The next release of djbdns will be backed by a new security guarantee. In the meantime, if any users are in the situation described above, those users are advised to apply Dempsky's patch and requested to accept my apologies. The patch is also recommended for other users; it corrects the bug without any side effects. A copy of the patch appears below.</p>
<p>---D. J. Bernstein<br />
  Research Professor, Computer Science, University of Illinois at Chicago</p>
<p>--- response.c.orig     2009-02-24 21:04:06.000000000 -0800<br />
+++ response.c  2009-02-24 21:04:25.000000000 -0800<br />
@@ -34,7 +34,7 @@<br />
        uint16_pack_big(buf,49152 + name_ptr[i]);<br />
        return response_addbytes(buf,2);<br />
      }<br />
-    if (dlen <= 128)<br />
+    if ((dlen <= 128) &#038;&#038; (response_len < 16384))<br />
      if (name_num < NAMES) {<br />
       byte_copy(name[name_num],dlen,d);<br />
       name_ptr[name_num] = response_len;</p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.veracode.com/blog/2009/03/hell-freezes-over/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

