<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:atom="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><atom:id>tag:blogger.com,1999:blog-2281490675396238353</atom:id><lastBuildDate>Sun, 07 Apr 2013 06:47:56 +0000</lastBuildDate><category>Mobile</category><category>PCI</category><category>SDLC</category><category>Code Review</category><category>Industry</category><category>Session Management</category><category>Tools</category><category>Administrivia</category><category>Misc</category><category>CSRF</category><category>Forgot Password</category><category>XSS</category><category>Architecture/Design</category><title>AppSec Notes</title><description>Mulling over various topics in application security.</description><link>http://appsecnotes.blogspot.com/</link><managingEditor>noreply@blogger.com (Dave Ferguson)</managingEditor><generator>Blogger</generator><openSearch:totalResults>41</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/AppSecNotes" /><feedburner:info uri="appsecnotes" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2281490675396238353.post-1925308167807732493</guid><pubDate>Sat, 30 Mar 2013 17:21:00 +0000</pubDate><atom:updated>2013-03-30T12:22:18.036-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Misc</category><title>Bizarre CAPTCHAs</title><description>We all understand the security benefits of using a &lt;a href="http://en.wikipedia.org/wiki/Captcha"&gt;CAPTCHA&lt;/a&gt; as it relates to anti-automation in a web application.&amp;nbsp; The most common implementation of CAPTCHA functionality is &lt;a href="http://www.google.com/recaptcha"&gt;reCaptcha&lt;/a&gt;, a technology that Google purchased in 2009.&amp;nbsp; Most of the time it works great, but recently I ran across a site that was producing some bizarre images.&amp;nbsp; I saved a few of these, and I'm pleased to present them here now for your enjoyment!&lt;br /&gt;
&lt;br /&gt;
Hmm, I don't have some of these letters on my keyboard:&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-yQN-BgdCZLI/UVcbzQcL77I/AAAAAAAAAR8/g5Q9EElv52Y/s1600/foreign_recaptcha-2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-yQN-BgdCZLI/UVcbzQcL77I/AAAAAAAAAR8/g5Q9EElv52Y/s1600/foreign_recaptcha-2.png" height="76" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-YzlwEGOAIIE/UVcbzTGEoGI/AAAAAAAAASA/-iLxo6pY1aw/s1600/foreign_recaptcha-1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-YzlwEGOAIIE/UVcbzTGEoGI/AAAAAAAAASA/-iLxo6pY1aw/s1600/foreign_recaptcha-1.png" height="79" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-6N4JsIHivWc/UVcbzqlPyAI/AAAAAAAAASM/ra3BhRd4IQs/s1600/foreign_recaptcha-4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-6N4JsIHivWc/UVcbzqlPyAI/AAAAAAAAASM/ra3BhRd4IQs/s1600/foreign_recaptcha-4.png" height="80" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Users are expected know calculus now?&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-tlM5tLFvxbg/UVcdMgsHI8I/AAAAAAAAATE/hhRnLANSXnQ/s1600/math_recaptcha-1.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-tlM5tLFvxbg/UVcdMgsHI8I/AAAAAAAAATE/hhRnLANSXnQ/s1600/math_recaptcha-1.png" height="79" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
If a word is upside down, would you enter it left to right or right to left?&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/--hlpjnX9-Qw/UVccxJ9UucI/AAAAAAAAASo/dzIW07aQpFo/s1600/upsidedown_recaptcha-2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/--hlpjnX9-Qw/UVccxJ9UucI/AAAAAAAAASo/dzIW07aQpFo/s1600/upsidedown_recaptcha-2.png" height="72" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-jeBTb-XgArE/UVcdD42HFwI/AAAAAAAAAS0/4kMfINAX9hw/s1600/upsidedown_recaptcha-3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-jeBTb-XgArE/UVcdD42HFwI/AAAAAAAAAS0/4kMfINAX9hw/s1600/upsidedown_recaptcha-3.png" height="71" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-hb0XaC8D8Ns/UVcdD4ntg5I/AAAAAAAAAS4/Jt6kY8Ecg_I/s1600/upsidedown_recaptcha-2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-hb0XaC8D8Ns/UVcdD4ntg5I/AAAAAAAAAS4/Jt6kY8Ecg_I/s1600/upsidedown_recaptcha-2.png" height="73" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
Absolutely no clue: &lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-O3QJ2Hycgpc/UVcdQwESITI/AAAAAAAAATM/bHkF_g_zNyI/s1600/odd_recaptcha-1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-O3QJ2Hycgpc/UVcdQwESITI/AAAAAAAAATM/bHkF_g_zNyI/s1600/odd_recaptcha-1.png" height="80" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-fIxzEwlbfr0/UVcdRLrZ9nI/AAAAAAAAATQ/jmiSala5s0A/s1600/odd_recaptcha-3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-fIxzEwlbfr0/UVcdRLrZ9nI/AAAAAAAAATQ/jmiSala5s0A/s1600/odd_recaptcha-3.png" height="73" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-bxi36iFoDzo/UVcdRNW4P-I/AAAAAAAAATU/kKr_zS02jzw/s1600/odd_recaptcha-2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-bxi36iFoDzo/UVcdRNW4P-I/AAAAAAAAATU/kKr_zS02jzw/s1600/odd_recaptcha-2.png" height="73" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/AppSecNotes/~4/-j63HAq0M_Q" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/AppSecNotes/~3/-j63HAq0M_Q/bizarre-captchas.html</link><author>noreply@blogger.com (Dave Ferguson)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-yQN-BgdCZLI/UVcbzQcL77I/AAAAAAAAAR8/g5Q9EElv52Y/s72-c/foreign_recaptcha-2.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://appsecnotes.blogspot.com/2013/03/bizarre-captchas.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2281490675396238353.post-215654112655996326</guid><pubDate>Thu, 29 Nov 2012 04:55:00 +0000</pubDate><atom:updated>2012-11-28T22:56:54.578-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Mobile</category><title>The Audacity of Your Flashlight App</title><description>I've been taking a closer look at my mobile apps lately, specifically the permissions they request when downloading and installing them.&amp;nbsp; It has been quite an eye opener.&amp;nbsp; It turns out that mobile apps are &lt;a href="http://www.veracode.com/blog/2012/05/how-mobile-apps-are-invading-your-privacy-infographic/"&gt;invading our privacy&lt;/a&gt;.&amp;nbsp; It's as simple as this: any app that can read your contacts and access the Internet can slurp your data and send it off to some random server to be stored and/or used in a nefarious way.&lt;br /&gt;
&lt;br /&gt;
The finding that surprised me the most was the audacity of my little old flashlight app.&amp;nbsp; I was using "Tiny Flashlight + LED", which is allowed to read your phone identity and have full Internet access.&amp;nbsp; A flashlight app that needs Internet access is nonsensical to me.&amp;nbsp;  I switched to use &lt;a href="https://play.google.com/store/apps/details?id=org.openintents.flashlight"&gt;OI Flashlight&lt;/a&gt;, which requires only the permissions of camera control and preventing the device from sleeping.&amp;nbsp; I discovered during my research that most flashlight apps want Internet access.&amp;nbsp; The top 4 flashlight apps that appear when searching for "flashlight" on Google Play are:&lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="https://play.google.com/store/apps/details?id=com.devuni.flashlight"&gt;Tiny Flashlight + LED&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://play.google.com/store/apps/details?id=goldenshorestechnologies.brightestflashlight.free"&gt;Brightest Flashlight Free&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://play.google.com/store/apps/details?id=com.intellectualflame.ledflashlight.washer"&gt;Flashlight&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://play.google.com/store/apps/details?id=com.socialnmobile.flashlight"&gt;Color Flashlight&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
All four require Internet connectivity!&amp;nbsp; However, the winner of the most inappropriate and egregious permissions contest is "Brightest Flashlight Free" by Goldenshores Technologies, LLC.&amp;nbsp; This popular app (over 10 million downloads) requires the following permissions: &lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;full Internet access&lt;/li&gt;
&lt;li&gt;your location (both coarse and fine)&lt;/li&gt;
&lt;li&gt;modify your SD card contents&lt;/li&gt;
&lt;li&gt;read your phone identity&lt;/li&gt;
&lt;/ul&gt;
Can you think of a reason a flashlight app needs to know your current location or modify the data on your SD card?&amp;nbsp; I can't either.&lt;img src="http://feeds.feedburner.com/~r/AppSecNotes/~4/Mo3t3-hNHOk" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/AppSecNotes/~3/Mo3t3-hNHOk/the-audacity-of-your-flashlight-app.html</link><author>noreply@blogger.com (Dave Ferguson)</author><thr:total>2</thr:total><feedburner:origLink>http://appsecnotes.blogspot.com/2012/11/the-audacity-of-your-flashlight-app.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2281490675396238353.post-926300848834563330</guid><pubDate>Tue, 20 Nov 2012 23:19:00 +0000</pubDate><atom:updated>2012-11-22T20:00:37.833-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Industry</category><title>Risky to Report Website Vulns</title><description>The main reason I stopped reporting vulnerabilities to website owners is the risk of being prosecuted.&amp;nbsp; The Internet is more dangerous when well-meaning security researchers are treated this way.&amp;nbsp; I was new to Application Security in 2006, so I didn't realize that I was actually taking a pretty big risk when I told Netflix about their &lt;a href="http://archives.neohapsis.com/archives/fulldisclosure/2006-10/0317.html"&gt;CSRF vulnerabilities&lt;/a&gt;.&amp;nbsp; In my mind I was doing them a favor.&amp;nbsp; They got a free mini pen test.&amp;nbsp; In fact as a Netflix subscriber, I was giving &lt;i&gt;them &lt;/i&gt;money!&amp;nbsp; It turns out they were nice and simply said "thank you", then went about fixing the issue. &lt;br /&gt;
&lt;br /&gt;
Today I ran across &lt;a href="http://www.smh.com.au/it-pro/security-it/super-bad-first-state-set-police-on-man-who-showed-them-how--770000-accounts-could-be-ripped-off-20111018-1lvx1.html"&gt;Patrick Webster's story&lt;/a&gt; from Australia and he wasn't so lucky.&amp;nbsp; He noticed that his bank's web application allowed for any customer to view another customer's account information, including very sensitive data that could allow for identity theft.&amp;nbsp; This type of &lt;a href="https://www.owasp.org/index.php/Top_10_2010-A4-Insecure_Direct_Object_References"&gt;insecure direct object reference&lt;/a&gt; vulnerability is very simple to exploit.&amp;nbsp; Mr. Webster just changed a numerical parameter in the URL to discover the problem.&amp;nbsp; He reported it to his bank, who decided to report him to the police.&amp;nbsp; It's not like this guy was a determined attacker with premeditation who spent weeks doing reconnaissance on the site.&amp;nbsp; That said, he clearly went too far by running a script that "cycled through each ID number and pulled down the 
relevant report to his computer".&amp;nbsp; That wasn't necessary to report the vulnerability.&lt;br /&gt;
&lt;br /&gt;
Another example is Andrew Auernheimer who is potentially &lt;a href="http://www.zdnet.com/jury-convicts-hacker-over-at-and-t-ipad-user-data-breach-7000007719/"&gt;facing 5 years in prison&lt;/a&gt; due to his AT&amp;amp;T "account slurper" script.&amp;nbsp; Again, he went too far with the script, but clearly he might've been prosecuted anyway.&amp;nbsp; One of the comments on this story was humorous:&lt;br /&gt;
&lt;blockquote class="tr_bq"&gt;
You seem to be implying that every exploit can be 
anticipated. The article points out that AT&amp;amp;T changed their code 
after discovery of the hack. There is no indication that they knew it 
was a problem before hand.&lt;/blockquote&gt;
Web app vulns &lt;i&gt;can and should&lt;/i&gt; be anticipated.&lt;img src="http://feeds.feedburner.com/~r/AppSecNotes/~4/eGvybhVtXSg" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/AppSecNotes/~3/eGvybhVtXSg/risky-to-report-website-vulns.html</link><author>noreply@blogger.com (Dave Ferguson)</author><thr:total>2</thr:total><feedburner:origLink>http://appsecnotes.blogspot.com/2012/11/risky-to-report-website-vulns.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2281490675396238353.post-4122012754306475710</guid><pubDate>Wed, 10 Oct 2012 14:56:00 +0000</pubDate><atom:updated>2012-10-10T10:01:52.999-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Architecture/Design</category><title>"Sorry, that password is already in use"</title><description>Here is a good example of the kind of insecure practices application developers are doing out there. &lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://lists.webappsec.org/pipermail/websecurity_lists.webappsec.org/2012-October/008535.html"&gt;http://lists.webappsec.org/pipermail/websecurity_lists.webappsec.org/2012-October/008535.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Thank you Jim Burton for being concerned and speaking out.&amp;nbsp; I have to admit laughing out loud when first reading this.&amp;nbsp; That may have been wrong of me.&lt;img src="http://feeds.feedburner.com/~r/AppSecNotes/~4/I9fVcpFIpSo" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/AppSecNotes/~3/I9fVcpFIpSo/sorry-that-password-is-already-in-use.html</link><author>noreply@blogger.com (Dave Ferguson)</author><thr:total>0</thr:total><feedburner:origLink>http://appsecnotes.blogspot.com/2012/10/sorry-that-password-is-already-in-use.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2281490675396238353.post-4517742443492638005</guid><pubDate>Wed, 06 Jun 2012 23:55:00 +0000</pubDate><atom:updated>2012-06-07T09:23:18.668-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Industry</category><category domain="http://www.blogger.com/atom/ns#">Architecture/Design</category><title>Time to Update Your LinkedIn Password</title><description>Change your LinkedIn password!&amp;nbsp; Also change it on any site where you use that same password.&amp;nbsp; In case you missed it, about 6.5 million &lt;a href="http://www.theverge.com/2012/6/6/3067523/linkedin-password-leak-online"&gt;LinkedIn passwords were leaked today&lt;/a&gt;.&amp;nbsp; The passwords were in the form of &lt;i&gt;unsalted &lt;/i&gt;&lt;a href="http://en.wikipedia.org/wiki/Sha-1"&gt;SHA-1&lt;/a&gt; hashes.&amp;nbsp; This leads you to believe that LinkedIn was not following secure best practices in terms of storage of user passwords.&amp;nbsp; A &lt;a href="http://blog.linkedin.com/2012/06/06/linkedin-member-passwords-compromised/"&gt;blog post&lt;/a&gt; from LinkedIn indicates that hashing and salting of user passwords was "recently put in place".&amp;nbsp; I wonder how recently?&amp;nbsp; Probably today. &lt;br /&gt;
&lt;br /&gt;
If you are curious about whether your password was compromised, head over to &lt;a href="http://leakedin.org/"&gt;LeakedIn.org&lt;/a&gt;, a site just launched by PHP security guru Chris Shiflett. (Side note: Chris authors a &lt;a href="http://shiflett.org/"&gt;very informative blog&lt;/a&gt; and I've learned a lot about AppSec from his posts over the years.)&amp;nbsp; Once there, enter your LinkedIn password.&amp;nbsp; Client-side JavaScript code will produce the corresponding SHA-1 hash, then send the hash value to the server.&amp;nbsp; You will soon find out if your password was part of the 6.5 million that were leaked and whether or not the hash was cracked.&amp;nbsp; If you don't feel comfortable entering your password, just run &lt;a href="http://www.slavasoft.com/hashcalc/"&gt;HashCalc&lt;/a&gt; locally to calculate the SHA-1 hash of your password and enter the hash value instead.&amp;nbsp; I did this check today and my password was indeed among those that were leaked, but it hadn't been cracked yet.&lt;br /&gt;
&lt;br /&gt;
Needless to say, I've changed my LinkedIn password.&amp;nbsp; It's a perfect example of why you should be using different passwords for every site you use.&lt;img src="http://feeds.feedburner.com/~r/AppSecNotes/~4/eq4ofOqMwBY" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/AppSecNotes/~3/eq4ofOqMwBY/time-to-update-your-linkedin-password.html</link><author>noreply@blogger.com (Dave Ferguson)</author><thr:total>0</thr:total><feedburner:origLink>http://appsecnotes.blogspot.com/2012/06/time-to-update-your-linkedin-password.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2281490675396238353.post-1033179896119858928</guid><pubDate>Tue, 22 May 2012 18:53:00 +0000</pubDate><atom:updated>2012-05-29T09:58:06.499-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">SDLC</category><title>AppSec Shouldn't Be Something Special You Do</title><description>To really improve the security posture of applications, development shops must get to a place where security is simply part of their normal development process.&amp;nbsp; In other words, designing secure software and writing hack-proof code shouldn't be a special side project or considered for the first time during the testing phase.  

This point was nicely explained in  
&lt;a href="http://searchsecurity.techtarget.com/news/2240150571/Wysopal-on-application-security-training-program-gaps"&gt;a short interview&lt;/a&gt; with Chris Wysopal.&lt;br /&gt;
&lt;br /&gt;
Making application security an inherent part of your SDLC can be done on a gradual basis.&amp;nbsp; You could start with instructor-led training of developers to teach them appsec concepts.&amp;nbsp; I did this type of training for several years.&amp;nbsp; A more scalable way to teach developers is computer based training (CBT), also known as &lt;a href="http://en.wikipedia.org/wiki/Elearning"&gt;eLearning&lt;/a&gt;.&amp;nbsp; This may be your only option with hundreds or thousands of developers on staff and limited budget.&lt;br /&gt;
&lt;br /&gt;
Another key piece to building security into your SDLC is regular static and dynamic testing of applications. The goal is to find vulnerabilities and fix them before going live.&amp;nbsp; Static analysis looks at an application from the inside out.&amp;nbsp; You may also hear this referred to as &lt;a href="http://en.wikipedia.org/wiki/Black_box_testing"&gt;white-box testing&lt;/a&gt; or static application security testing (SAST).&amp;nbsp; Static analysis can be done for any type of application (web, thick client, mobile, glue code, etc).&amp;nbsp; Dynamic testing involves looking at a web application from the outside in and is also known as &lt;a href="http://en.wikipedia.org/wiki/Black_box_testing"&gt;black-box testing&lt;/a&gt; or dynamic application security testing (DAST).&amp;nbsp; Both static and dynamic testing should be done to have the best chance at finding all the vulnerabilities.&amp;nbsp; They are complementary approaches, although there is some overlap in the issues they can find.&lt;img src="http://feeds.feedburner.com/~r/AppSecNotes/~4/fe2YqNRFKoU" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/AppSecNotes/~3/fe2YqNRFKoU/appsec-shouldnt-be-something-special.html</link><author>noreply@blogger.com (Dave Ferguson)</author><thr:total>0</thr:total><feedburner:origLink>http://appsecnotes.blogspot.com/2012/05/appsec-shouldnt-be-something-special.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2281490675396238353.post-7319015855028560201</guid><pubDate>Fri, 29 Jul 2011 03:29:00 +0000</pubDate><atom:updated>2011-07-28T22:41:16.568-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Industry</category><category domain="http://www.blogger.com/atom/ns#">XSS</category><title>Latest OWASP Educational Video</title><description>The &lt;a href="http://www.youtube.com/watch?v=_Z9RQSnf8-g"&gt;latest episode&lt;/a&gt; in the educational video series from Jerry Hoff and &lt;a href="http://www.owasp.org"&gt;OWASP&lt;/a&gt; is out.  This one is all about stored XSS, aka persistent XSS.  Another outstanding resource to introduce concepts of web application security to developers!&lt;img src="http://feeds.feedburner.com/~r/AppSecNotes/~4/gHaEX8hNnwo" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/AppSecNotes/~3/gHaEX8hNnwo/latest-owasp-educational-video.html</link><author>noreply@blogger.com (Dave Ferguson)</author><thr:total>0</thr:total><feedburner:origLink>http://appsecnotes.blogspot.com/2011/07/latest-owasp-educational-video.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2281490675396238353.post-7885759426349034661</guid><pubDate>Sat, 02 Jul 2011 02:17:00 +0000</pubDate><atom:updated>2011-07-02T21:14:47.254-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Architecture/Design</category><category domain="http://www.blogger.com/atom/ns#">Forgot Password</category><title>Account Lockout Fail</title><description>A while back I was hunting for vulnerabilities in a web app's Forgot Password feature.  On the first page you had to enter your username and email address.  The second page asked a personal security question.  That is quite weak.  I recommend asking for at least 3 pieces of data on the first step.  Asking for only two inputs, especially when they are username and email address, is not very secure.  Username and email address are often related.  If you know one, you might be able to guess the other.  For example, the email address for user "jthomas" could be "jthomas@yahoo.com".  I also recommend asking two personal security questions on the second page, not just one.&lt;br /&gt;&lt;br /&gt;Anyway, one of the things I like to check is whether or not the account is locked after a certain number of failed attempts to answer the security question(s).  This is an important defense against attackers who are trying to break in via the Forgot Password functionality.  Sure enough, the message "account has been locked" appeared after I purposefully entered 3 wrong answers.&lt;br /&gt;&lt;br /&gt;I was just about to make a note about this commendable practice, but something caught my eye.  The input field was still there on the page.  That's not something you normally see.  Usually the application takes it away after a lockout occurs.  So being a curious fellow, I proceeded to enter the correct answer to the question.  Lo and behold the application sent me to the next page where I was allowed to reset the password on the account.   Now that's an account lockout fail!  I'm not sure why or how the developers created a lockout message without actually coding the lockout.  Just another example of how difficult app security can be.&lt;img src="http://feeds.feedburner.com/~r/AppSecNotes/~4/1tlog0u9ptU" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/AppSecNotes/~3/1tlog0u9ptU/account-lockout-fail.html</link><author>noreply@blogger.com (Dave Ferguson)</author><thr:total>0</thr:total><feedburner:origLink>http://appsecnotes.blogspot.com/2011/07/account-lockout-fail.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2281490675396238353.post-2924542704731988336</guid><pubDate>Thu, 21 Apr 2011 05:38:00 +0000</pubDate><atom:updated>2011-04-21T01:36:17.198-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Industry</category><category domain="http://www.blogger.com/atom/ns#">XSS</category><title>Blackhole Exploit Kit</title><description>Something I found surprising at first when learning about real-world SQL injection attacks on web applications is that hackers will strive to &lt;span style="font-style: italic; font-weight: bold;"&gt;insert &lt;/span&gt;data into the database, not necessarily try to extract data from it.  Why would they do this?  They want to inject JavaScript code.  Basically, the goal is to leverage SQL injection to create a &lt;a href="http://en.wikipedia.org/wiki/Cross-site_scripting#Persistent"&gt;stored XSS attack&lt;/a&gt; on application users.  It really shows you how supremely dangerous stored XSS vulnerabilities are, huh?&lt;br /&gt;&lt;br /&gt;If successful, the malicious JavaScript code will execute in users' browsers.  This is bad.  Think of it as executable code, chosen by an attacker, running on a victim's computer.   One example of the nastiness that can result is the &lt;a href="http://community.websense.com/blogs/securitylabs/pages/black-hole-exploit-kit.aspx"&gt;Blackhole Exploit Kit&lt;/a&gt;.  This malware originated in Russia and is openly for sale.  Blackhole is designed to compromise victim computers by exploiting known vulnerabilities in certain software products like Adobe Reader or Java.   Symantec researchers have provided a &lt;a href="http://www.symantec.com/connect/blogs/blackhole-theory"&gt;nice writeup of how Blackhole works&lt;/a&gt;.   Typically, the badness begins with an iframe (created by JavaScript of course) that points to a Blackhole server.&lt;br /&gt;&lt;br /&gt;A U.S. Postal Service website was recently &lt;a href="http://www.darkreading.com/advanced-threats/167901091/security/attacks-breaches/229401258/us-postal-service-website-hit-with-blackhole-exploit.html"&gt;found to have been compromised with Blackhole&lt;/a&gt;. There is some question how it happened.  Regardless, the thing to keep in mind is that a web application that allows for SQL injection might very well lead to stored XSS attacks.&lt;img src="http://feeds.feedburner.com/~r/AppSecNotes/~4/hbvYE4OFc44" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/AppSecNotes/~3/hbvYE4OFc44/blackhole-exploit-kit.html</link><author>noreply@blogger.com (Dave Ferguson)</author><thr:total>0</thr:total><feedburner:origLink>http://appsecnotes.blogspot.com/2011/04/blackhole-exploit-kit.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2281490675396238353.post-1214774017698740523</guid><pubDate>Mon, 07 Mar 2011 04:25:00 +0000</pubDate><atom:updated>2011-03-06T22:50:59.112-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Industry</category><title>Educational Videos about Web Application Security</title><description>A terrific and free resource for introducing developers to web application security concepts is a video tutorial series from OWASP.  Jerry Hoff is the leader on this tutorial project.  The first two episodes are complete - &lt;a href="http://www.youtube.com/watch?v=CDbWvEwBBxo"&gt;AppSec Basics&lt;/a&gt; and &lt;a href="http://www.youtube.com/watch?v=pypTYPaU7mM"&gt;Injection Attacks&lt;/a&gt;.  The videos are very well done, with nice graphics, sound, and animation.&lt;img src="http://feeds.feedburner.com/~r/AppSecNotes/~4/XNkP1QZmYWs" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/AppSecNotes/~3/XNkP1QZmYWs/educational-videos-about-web.html</link><author>noreply@blogger.com (Dave Ferguson)</author><thr:total>1</thr:total><feedburner:origLink>http://appsecnotes.blogspot.com/2011/03/educational-videos-about-web.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2281490675396238353.post-3581711274910124705</guid><pubDate>Sat, 11 Sep 2010 17:23:00 +0000</pubDate><atom:updated>2012-11-28T21:52:58.824-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Architecture/Design</category><category domain="http://www.blogger.com/atom/ns#">Forgot Password</category><title>Latest Forgot Password Best Practices Doc</title><description>A new version of my white paper entitled "Best Practices for a Secure Forgot Password Feature" is available.  You can &lt;a href="http://www.fishnetsecurity.com/sites/default/files/media/10WP0003_BestPractices_SecureForgotPassword%5B1%5D_0.pdf"&gt;download the white paper here&lt;/a&gt;.  No significant changes were made in terms of content, but it does have fewer pages and a more pleasing look now.  The link I had given out previously is no longer valid.&lt;img src="http://feeds.feedburner.com/~r/AppSecNotes/~4/tdSVjLMbaJM" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/AppSecNotes/~3/tdSVjLMbaJM/latest-forgot-password-best-practices.html</link><author>noreply@blogger.com (Dave Ferguson)</author><thr:total>2</thr:total><feedburner:origLink>http://appsecnotes.blogspot.com/2010/09/latest-forgot-password-best-practices.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2281490675396238353.post-815339077442235253</guid><pubDate>Thu, 09 Sep 2010 02:43:00 +0000</pubDate><atom:updated>2010-09-09T11:52:10.323-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Architecture/Design</category><title>Password Complexity Rules</title><description>A Consumer Reports blogger has been &lt;a href="http://blogs.consumerreports.org/electronics/2010/08/facebook-weak-passwords-account-security-danger-flaw-hackers-guess-password-access-accounts-con-artists-hijack-scammers-crack.html"&gt;taking Facebook to task&lt;/a&gt; for allowing dictionary words to be used as passwords.  I can't confirm that Facebook actually forbids the use of these words like the blogger claims.  The &lt;a href="http://www.facebook.com/r.php"&gt;signup page&lt;/a&gt; did not reject the word "animal" when I tried it, and their &lt;a href="http://www.facebook.com/help/?faq=13665"&gt;password strength FAQ&lt;/a&gt; does not state that dictionary words are banned.&lt;br /&gt;&lt;br /&gt;The flak got me to thinking about password complexity rules in general. It needs to be evaluated when assessing the security posture of a web application.  I see huge variety in the password rules that are being used.  That's not the problem.  It makes sense that highly sensitive applications, such as financial or governmental, should enforce stricter requirements.   The problem I see is that the password rules simply aren't strong enough, ever.  Identifying this weakness calls for a manual test  or a code review.  It is not something a web app scanner like  WebInspect or AppScan would flag.  Maybe that's part of the problem.&lt;br /&gt;&lt;br /&gt;Below are the password rules I normally recommend for Internet-facing web applications.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Minimum password length of 7&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Maximum password length of 20 or more&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Require at least one uppercase letter&lt;/li&gt;&lt;li&gt;Require at least one lowercase letter&lt;/li&gt;&lt;li&gt;Require at least one number&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Allow special characters&lt;/li&gt;&lt;li&gt;Do not allow any part of username to appear in the password&lt;/li&gt;&lt;li&gt;Do not allow the user's first or last name to appear in the password&lt;/li&gt;&lt;li&gt;Do not allow any form of the word “password”&lt;/li&gt;&lt;li&gt;Do not allow the same character three or more times in succession&lt;/li&gt;&lt;/ul&gt;Notice there is nothing about banning dictionary words (other than a number being required).   Applications can mitigate that particular risk by using an account lockout  mechanism to prevent automated password guessing.   Also, it probably goes without saying, but &lt;a href="http://appsecnotes.blogspot.com/2009/05/importance-of-case-sensitive-passwords.html"&gt;passwords should be case sensitive&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Please let me know if you have any other suggestions on this subject!&lt;img src="http://feeds.feedburner.com/~r/AppSecNotes/~4/qAI8WxsSIRU" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/AppSecNotes/~3/qAI8WxsSIRU/password-complexity-rules.html</link><author>noreply@blogger.com (Dave Ferguson)</author><thr:total>0</thr:total><feedburner:origLink>http://appsecnotes.blogspot.com/2010/09/password-complexity-rules.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2281490675396238353.post-130709605124777231</guid><pubDate>Fri, 28 May 2010 23:26:00 +0000</pubDate><atom:updated>2010-05-28T18:26:00.709-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tools</category><title>Bug Editing Cookies in Web Developer Extension</title><description>Just a quick note I've been meaning to post about a small bug in Chris Pederick's Firefox &lt;a href="https://addons.mozilla.org/en-US/firefox/addon/60"&gt;Web Developer extension&lt;/a&gt;.  It is a fantastic extension and I use it all the time, especially for working with cookies.  Kudos to Mr. Pederick!&lt;br /&gt;&lt;br /&gt;Unfortunately, what I noticed is that if you have "accept third-party cookies" unchecked in Firefox's privacy options, you can't edit cookies or add cookies. In fact it ends up deleting the cookies that you try to edit.  D'oh!&lt;br /&gt;&lt;br /&gt;This bug bit me a few times when I was trying to demonstrate session hijacking while teaching an application security class. This bug is a &lt;a href="http://chrispederick.com/work/web-developer/issues/#item-946"&gt;known issue&lt;/a&gt; and I'm hoping Chris can find a way to make it work in the next version.  In the meantime, I will keep using the extension and trying to remember to enable third-party cookies whenever I teach the class.&lt;img src="http://feeds.feedburner.com/~r/AppSecNotes/~4/DcfHkvqTLrw" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/AppSecNotes/~3/DcfHkvqTLrw/bug-editing-cookies-in-web-developer.html</link><author>noreply@blogger.com (Dave Ferguson)</author><thr:total>0</thr:total><feedburner:origLink>http://appsecnotes.blogspot.com/2010/05/bug-editing-cookies-in-web-developer.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2281490675396238353.post-7437890683553814296</guid><pubDate>Mon, 17 May 2010 13:26:00 +0000</pubDate><atom:updated>2010-05-17T23:14:49.404-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Session Management</category><category domain="http://www.blogger.com/atom/ns#">XSS</category><title>A Case for HttpOnly</title><description>Last month the Apache Infrastructure Team fell victim to a common web application attack.  Rather than keep the information secret, they were kind enough to &lt;a href="http://blogs.apache.org/infra/entry/apache_org_04_09_2010"&gt;explain how the attack occurred&lt;/a&gt;.  The initial attack leveraged cross-site scripting to steal users' session IDs.  This is something that could have been prevented if the web app's session cookie had been marked with the &lt;a href="http://www.owasp.org/index.php/HttpOnly"&gt;HttpOnly&lt;/a&gt; attribute.  When a web app sets a cookie, the presence of HttpOnly instructs browsers to disallow client-side script from accessing the cookie.&lt;br /&gt;&lt;br /&gt;You will sometimes hear or read that HttpOnly helps prevent XSS attacks.  That is not quite true.  It helps prevent session hijacking.  Specifically, it helps guard against one attack vector, namely where session cookies are stolen via XSS.  HttpOnly can be used for any sensitive cookie that you don't want falling into the hands of fraudsters. (I should use "fraudster" more often - it is a fun word)&lt;br /&gt;&lt;br /&gt;There is one caveat to using HttpOnly.  It might break your application if it was written in such a way that the functionality depends on JavaScript having access to the cookie.  That is fairly uncommon however.&lt;img src="http://feeds.feedburner.com/~r/AppSecNotes/~4/WLpuXPNb5Rg" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/AppSecNotes/~3/WLpuXPNb5Rg/case-for-httponly.html</link><author>noreply@blogger.com (Dave Ferguson)</author><thr:total>0</thr:total><feedburner:origLink>http://appsecnotes.blogspot.com/2010/05/case-for-httponly.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2281490675396238353.post-7659668842693348750</guid><pubDate>Wed, 12 May 2010 14:19:00 +0000</pubDate><atom:updated>2010-05-16T18:36:03.808-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Architecture/Design</category><title>Dynamically-Generated PDFs</title><description>Many web applications will generate PDF files for users so they can view nicely-formatted statements, reports, etc.  These dynamically-generated PDFs are typically accessed by users in two different ways.&lt;br /&gt;&lt;br /&gt;1) The application creates an actual PDF file on the server and redirects the user's browser to the file (via 302 response code).&lt;br /&gt;&lt;br /&gt;2) The application streams the bytes for the PDF directly to the user's browser as part of the HTTP response.&lt;br /&gt;&lt;br /&gt;This second method is much more secure.  The reason is that a PDF file sitting on a server can probably be accessed by anyone.  The only information needed is the directory and the file name. That said, I have seen the first method implemented securely, but two important mitigating factors were employed.  First, the application used randomized file names.  A &lt;a href="http://en.wikipedia.org/wiki/Guid"&gt;globally-unique identifier (GUID)&lt;/a&gt; is great for this.  Second, the files were deleted within about 10 seconds of them being created.  These two factors, when combined, made it almost impossible to gain access to another user's PDF file.&lt;br /&gt;&lt;br /&gt;Testing for this vulnerability is simple.  If you run across an application that allows you to download a dynamic PDF, make note of the URL when viewing the PDF.  Is it a direct link to the PDF file?  If so, copy the link, open a different browser (not another window of the same browser), and paste the URL.  Is the PDF loaded?  If so, then you have a problem, especially if the file name is guessable or follows a pattern.  You might also check to see if the PDF is deleted from the server after a time.&lt;br /&gt;&lt;br /&gt;This topic applies to other static files that your application might generate dynamically too, such as Excel files.  PDFs just seem to be the most common.&lt;img src="http://feeds.feedburner.com/~r/AppSecNotes/~4/n5bgXcezajU" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/AppSecNotes/~3/n5bgXcezajU/generating-pdfs.html</link><author>noreply@blogger.com (Dave Ferguson)</author><thr:total>0</thr:total><feedburner:origLink>http://appsecnotes.blogspot.com/2010/05/generating-pdfs.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2281490675396238353.post-8860176040881900271</guid><pubDate>Tue, 20 Apr 2010 03:45:00 +0000</pubDate><atom:updated>2010-04-21T11:54:21.582-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Architecture/Design</category><title>Authentication Flaw</title><description>During an assessment of a financial web application, I found a serious flaw in authentication. The web security scanners at my disposal gave a "seal of approval" on the unauthenticated surface area of the application.  Yet, in a matter of a few hours after getting the go-ahead to test the application, I had fully compromised a user's account.  How?  Basically, by using my brain as a hacker might.  Screen shots proving my authenticated access were probably eye-opening to the customer as they had given me only the URL for the site, not any user credentials.&lt;br /&gt;&lt;br /&gt;This was a case of flawed forgot password functionality.  For users who had forgotten their password, the application worked as follows:&lt;br /&gt;&lt;br /&gt;Step 1 - Enter username&lt;br /&gt;Step 2 - Answer question to personal security question and enter email  address&lt;br /&gt;Step 3 - Receive email with a new, system-generated password&lt;br /&gt;&lt;br /&gt;Can you find the flaws?  First, the application asked for only one piece of data initially: the username.  It is not hard to guess a valid username.  I found that "jsmith" was a valid username. Second, the application asked the user to enter his email address on the second step.  Um, shouldn't this be part of the user's profile and already known to the application?  Why trust a value entered by the user? Third, which I didn't actually tell you, is that the application allowed an unlimited number of attempts to answer the personal security question.&lt;br /&gt;&lt;br /&gt;It happened to be that jsmith's security question was "What was the name of your first pet?".  I fired up &lt;a href="http://portswigger.net/intruder/"&gt;Burp Intruder&lt;/a&gt; with the 100 most common &lt;a href="http://dogtime.com/top-100-dog-names.html"&gt;dog &lt;/a&gt;and &lt;a href="http://www.youpet.com/cat-names/"&gt;cat &lt;/a&gt;names.  Very soon I received an email with jsmith's newly reset password.  It turned out that his first pet was named "Rocky" (I'm assuming jsmith is a man here - would a girl naming her pet "Rocky"?).&lt;br /&gt;&lt;br /&gt;This is an example where a scanner (and a web app firewall most likely) would not alert you to this security hole.  All requests, data, and URLs were perfectly legitimate in my attack.  The flaws were caused by poor design decisions.&lt;img src="http://feeds.feedburner.com/~r/AppSecNotes/~4/BanUCcRdLCo" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/AppSecNotes/~3/BanUCcRdLCo/business-logic-flaw.html</link><author>noreply@blogger.com (Dave Ferguson)</author><thr:total>4</thr:total><feedburner:origLink>http://appsecnotes.blogspot.com/2010/04/business-logic-flaw.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2281490675396238353.post-1782683862027873020</guid><pubDate>Wed, 03 Mar 2010 07:38:00 +0000</pubDate><atom:updated>2010-03-03T10:05:01.651-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Architecture/Design</category><title>Don't Need No Stinkin' Coupon Print Activator</title><description>This is a real-life example of exploiting a web application security flaw.   I received an email from Discover Card offering some Lowe's coupons.&lt;span style="text-decoration: underline;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_ux58bmqGooQ/S44TzB-WtPI/AAAAAAAAAFc/FpnMHE4bbYc/s1600-h/email.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 294px;" src="http://3.bp.blogspot.com/_ux58bmqGooQ/S44TzB-WtPI/AAAAAAAAAFc/FpnMHE4bbYc/s400/email.png" alt="" id="BLOGGER_PHOTO_ID_5444310766961734898" border="0" /&gt;&lt;/a&gt;I was needing to buy some stuff there anyway, so I decided to grab them.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_ux58bmqGooQ/S44T7ZxUpWI/AAAAAAAAAFk/uF4UtxwZRvI/s1600-h/print_1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 337px;" src="http://2.bp.blogspot.com/_ux58bmqGooQ/S44T7ZxUpWI/AAAAAAAAAFk/uF4UtxwZRvI/s400/print_1.png" alt="" id="BLOGGER_PHOTO_ID_5444310910788478306" border="0" /&gt;&lt;/a&gt;I was soon shocked and amazed. Turns out they expect you to download an executable (something called a"Coupon Print Activator") and run it just to print the coupons.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_ux58bmqGooQ/S44VuF2MMOI/AAAAAAAAAF0/X9xLflEF9NY/s1600-h/print_2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 360px;" src="http://1.bp.blogspot.com/_ux58bmqGooQ/S44VuF2MMOI/AAAAAAAAAF0/X9xLflEF9NY/s400/print_2.png" alt="" id="BLOGGER_PHOTO_ID_5444312881125142754" border="0" /&gt;&lt;/a&gt;I am not in the habit of running strange .exe's.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_ux58bmqGooQ/S44V4MisN0I/AAAAAAAAAF8/G-c0pBBND6g/s1600-h/print_3.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 223px;" src="http://1.bp.blogspot.com/_ux58bmqGooQ/S44V4MisN0I/AAAAAAAAAF8/G-c0pBBND6g/s400/print_3.png" alt="" id="BLOGGER_PHOTO_ID_5444313054721095490" border="0" /&gt;&lt;/a&gt;But, I really wanted those coupons (and perhaps sensed my hacking skillz were being challenged).  I looked at the requests being made to the server, and noticed that dsppreprint.cfm had some JavaScript pointing to interesting URLs, one to "print.cfm" and one to "print_noplugin_redirect.cfm". The query strings were radically different between the two, so I decided to append the query string from print.cfm onto the other .cfm file.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_ux58bmqGooQ/S44XCA1ruLI/AAAAAAAAAGE/kmAVOdXFjbo/s1600-h/print_4.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 101px;" src="http://4.bp.blogspot.com/_ux58bmqGooQ/S44XCA1ruLI/AAAAAAAAAGE/kmAVOdXFjbo/s400/print_4.png" alt="" id="BLOGGER_PHOTO_ID_5444314322889849010" border="0" /&gt;&lt;/a&gt;This hybrid URL ended up in a round-about way returning some HTML with an "embed" tag with a bunch of attributes.  One of the attributes was very interesting to me.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_ux58bmqGooQ/S44XtyCrQ_I/AAAAAAAAAGM/-SZrlvlSJts/s1600-h/print_5.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 60px;" src="http://3.bp.blogspot.com/_ux58bmqGooQ/S44XtyCrQ_I/AAAAAAAAAGM/-SZrlvlSJts/s400/print_5.png" alt="" id="BLOGGER_PHOTO_ID_5444315074832057330" border="0" /&gt;&lt;/a&gt;A request to this URL returned some raw data that appeared to be meant for consumption by the Coupon Print Activator.  It also led me to discover yet another URL.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_ux58bmqGooQ/S44YNYFS5MI/AAAAAAAAAGU/UavM0M76Lqk/s1600-h/print_6.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 90px;" src="http://4.bp.blogspot.com/_ux58bmqGooQ/S44YNYFS5MI/AAAAAAAAAGU/UavM0M76Lqk/s400/print_6.png" alt="" id="BLOGGER_PHOTO_ID_5444315617619535042" border="0" /&gt;&lt;/a&gt;A request to this URL returned the following jpeg image (numbers masked to protect something or other):&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_ux58bmqGooQ/S44Y2SKtMcI/AAAAAAAAAGc/y6eTzCwLJgo/s1600-h/print_7.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 143px;" src="http://3.bp.blogspot.com/_ux58bmqGooQ/S44Y2SKtMcI/AAAAAAAAAGc/y6eTzCwLJgo/s400/print_7.png" alt="" id="BLOGGER_PHOTO_ID_5444316320406254018" border="0" /&gt;&lt;/a&gt;So I got a bar code. Wonder if I could print this bar code and use it at the self-checkout at Lowe's?  This would not be unethical as I was entitled to the coupon anyway.  I just didn't want ro run that Activator thingy!  As a simple test, I jumped over to &lt;a href="http://www.lowes.com/"&gt;Lowes.com&lt;/a&gt; and added a ceiling fan to my shopping cart.  There was an input field for "Promotional Code".&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_ux58bmqGooQ/S44aNVRxmrI/AAAAAAAAAGs/euk_PYecL8k/s1600-h/print_8.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 137px;" src="http://3.bp.blogspot.com/_ux58bmqGooQ/S44aNVRxmrI/AAAAAAAAAGs/euk_PYecL8k/s400/print_8.png" alt="" id="BLOGGER_PHOTO_ID_5444317815889828530" border="0" /&gt;&lt;/a&gt;Proceeding to enter the number that appeared below my bar code, I was pleased to see my $10.00 discount applied.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_ux58bmqGooQ/S44a3u9lh9I/AAAAAAAAAG8/R7LITYN-pA4/s1600-h/print_9.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 166px;" src="http://4.bp.blogspot.com/_ux58bmqGooQ/S44a3u9lh9I/AAAAAAAAAG8/R7LITYN-pA4/s400/print_9.png" alt="" id="BLOGGER_PHOTO_ID_5444318544338978770" border="0" /&gt;&lt;/a&gt;To sum up, coupon obtained, Activator thingy bypassed.  Sorry I do not have time get into how this site could have been written more securely.  Suffice it to say that exposing data, URLs, and client side logic is not good.&lt;img src="http://feeds.feedburner.com/~r/AppSecNotes/~4/j_OLcENbit4" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/AppSecNotes/~3/j_OLcENbit4/dont-need-no-stinkin-coupon-print.html</link><author>noreply@blogger.com (Dave Ferguson)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/_ux58bmqGooQ/S44TzB-WtPI/AAAAAAAAAFc/FpnMHE4bbYc/s72-c/email.png" height="72" width="72" /><thr:total>1</thr:total><feedburner:origLink>http://appsecnotes.blogspot.com/2010/03/dont-need-no-stinkin-coupon-print.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2281490675396238353.post-8591379614773633197</guid><pubDate>Fri, 22 Jan 2010 05:36:00 +0000</pubDate><atom:updated>2010-01-22T21:24:02.207-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tools</category><category domain="http://www.blogger.com/atom/ns#">Code Review</category><title>Counting Lines of Code</title><description>Want some interesting metrics about your code?  A nice little Windows utility called &lt;a href="http://www.locmetrics.com/"&gt;LOCmetrics&lt;/a&gt; could be just what you are looking for.  When preparing for an application source code review, I usually need an estimate for the number of lines of code involved.  I've found the numbers provided by development teams can vary significantly from what we actually see when we get the code.   That is why I am going to start recommending they run LocMetrics.&lt;br /&gt;&lt;br /&gt;LocMetrics has a simple GUI and works with &lt;span class="center"&gt;C#, C++, Java, and SQL code&lt;/span&gt;.   Run LocMetrics and it will dump out physical LOC, executable-physical LOC, and executable-logical LOC.  Plus, you get bonus information like number of comment lines, blank lines, &lt;a href="http://en.wikipedia.org/wiki/Cyclomatic_complexity"&gt;cyclomatic complexity&lt;/a&gt; (aka McCabe VG complexity) and LOC counts broken down by directory.  The most important results are shown in the GUI itself and you get a HTML file containing more detail.&lt;br /&gt;&lt;br /&gt;Here's a screen shot of the GUI:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_ux58bmqGooQ/S1pp0ZhQ9YI/AAAAAAAAAFU/fmhlmwdY0zM/s1600-h/antisamy-1.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 318px;" src="http://2.bp.blogspot.com/_ux58bmqGooQ/S1pp0ZhQ9YI/AAAAAAAAAFU/fmhlmwdY0zM/s400/antisamy-1.png" alt="" id="BLOGGER_PHOTO_ID_5429768649673078146" border="0" /&gt;&lt;/a&gt;I ran LocMetrics on a few Java libraries for comparison sake.  Here are the results.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;OWASP &lt;/span&gt;&lt;a style="font-weight: bold;" href="http://www.owasp.org/index.php/Category:OWASP_AntiSamy_Project"&gt;AntiSamy&lt;/a&gt;&lt;span style="font-weight: bold;"&gt; 1.3&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family: courier new;"&gt;Lines of Code = 4,576&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Executable physical LOC = 1,972&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;Executable logical LOC = 1,444&lt;br /&gt;Cyclomatic complexity = 259&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;OWASP &lt;/span&gt;&lt;a style="font-weight: bold;" href="http://www.owasp.org/index.php/Category:OWASP_Enterprise_Security_API#tab=Java_EE"&gt;ESAPI &lt;/a&gt;&lt;span style="font-weight: bold;"&gt;1.4.2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family: courier new;"&gt;Lines of Code = 21,263&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Executable physical LOC = 8,926&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Executable logical LOC = 6,172&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family: courier new;"&gt;Cyclomatic complexity = 1,547 &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;JSE 1.6.0_17 (java.* package only)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family: courier new;"&gt;Lines of Code = 556,018&lt;br /&gt;&lt;/span&gt;&lt;span style="font-family: courier new;"&gt;Executable physical LOC = 200,567&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Executable logical LOC = 136,076&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family: courier new;"&gt;Cyclomatic complexity = 38,106 &lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-family: courier new;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;img src="http://feeds.feedburner.com/~r/AppSecNotes/~4/jrylLT62-Mo" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/AppSecNotes/~3/jrylLT62-Mo/counting-lines-of-code.html</link><author>noreply@blogger.com (Dave Ferguson)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_ux58bmqGooQ/S1pp0ZhQ9YI/AAAAAAAAAFU/fmhlmwdY0zM/s72-c/antisamy-1.png" height="72" width="72" /><thr:total>3</thr:total><feedburner:origLink>http://appsecnotes.blogspot.com/2010/01/counting-lines-of-code.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2281490675396238353.post-6647925823085549214</guid><pubDate>Thu, 26 Nov 2009 00:24:00 +0000</pubDate><atom:updated>2009-11-29T12:15:27.110-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Session Management</category><category domain="http://www.blogger.com/atom/ns#">XSS</category><title>Tomcat and HttpOnly Session Cookies</title><description>Just wanted to let you know that Apache Tomcat can now be configured to use HttpOnly session cookies.  I had forgotten about &lt;a href="https://lists.owasp.org/pipermail/webappsec/2008-March/000528.html"&gt;Jim Manico's crusade&lt;/a&gt; to get HttpOnly support in Tomcat.   It is a shame that it took so long to happen.  Microsoft had &lt;a href="http://msdn.microsoft.com/en-us/library/ms533046.aspx"&gt;introduced the concept of HttpOnly cookies&lt;/a&gt; primarily as a defense against session hijacking where a cross-site scripting attack is used to steal a session cookie.  If a web application sets a cookie with the HttpOnly attribute, web browsers do not allow client-side script to access the cookie.  The first browser to support HttpOnly was Internet Explorer 6 SP1 and for a long while IE was the only browser that supported it.  That has changed as &lt;a href="https://bugzilla.mozilla.org/show_bug.cgi?id=178993"&gt;Firefox&lt;/a&gt; and &lt;a href="http://my.opera.com/community/forums/topic.dml?id=183209"&gt;Opera&lt;/a&gt;, for example, now support HttpOnly as well.&lt;br /&gt;&lt;br /&gt;In Tomcat, enabling HttpOnly for the JSESSIONID is done at the context level, which means it can be controlled for each individual web application.  You simply need need to add the following attribute to the &lt;a href="http://tomcat.apache.org/tomcat-6.0-doc/config/context.html"&gt;&amp;lt;context&amp;gt; element&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:courier new;"&gt;useHttpOnly="true"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The default is "false", so you must explicitly add the line above to implement an HttpOnly session cookie. This capability first appeared in Tomcat 6.0.19 (current version = 6.0.20) as well as Tomcat 5.5.28, which is currently the latest version in the 5.5 branch.&lt;img src="http://feeds.feedburner.com/~r/AppSecNotes/~4/n0uFrs4O4cY" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/AppSecNotes/~3/n0uFrs4O4cY/tomcat-and-httponly-session-cookies.html</link><author>noreply@blogger.com (Dave Ferguson)</author><thr:total>0</thr:total><feedburner:origLink>http://appsecnotes.blogspot.com/2009/11/tomcat-and-httponly-session-cookies.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2281490675396238353.post-1134930670710524176</guid><pubDate>Thu, 19 Nov 2009 02:03:00 +0000</pubDate><atom:updated>2009-11-18T23:06:17.756-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Industry</category><title>OWASP Top Ten Changing for 2010</title><description>A new version of the OWASP Top Ten will be arriving in early 2010.  At the AppSec DC conference, I attended a session by &lt;a href="http://www.owasp.org/index.php/About_OWASP#Global_Board_Members"&gt;OWASP board&lt;/a&gt; member Dave Wichers that described the proposed changes.  First, the emphasis will be on risk, whereas the 2007 version focused on the most prevalent vulnerabilities. The updated list considers not just prevalence, but also the damage level that could result from successful exploitation.&lt;br /&gt;&lt;br /&gt;The biggest changes are that &lt;span style="font-style: italic;"&gt;Malicious File Execution&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;Information Leakage/Improper Error Handling&lt;/span&gt; are dropping off the list for 2010.  In their place, &lt;span style="font-style: italic;"&gt;Security Misconfiguration&lt;/span&gt; and &lt;span style="font-style: italic;"&gt;Unvalidated Redirects/Forwards&lt;/span&gt; are being added.  Some other items are shifting around.  The chart below sums up the changes very nicely.&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_ux58bmqGooQ/SwRkBalmocI/AAAAAAAAAFM/sxWPqBpD9NE/s1600/owasp_top10_chgs2.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 279px;" src="http://2.bp.blogspot.com/_ux58bmqGooQ/SwRkBalmocI/AAAAAAAAAFM/sxWPqBpD9NE/s400/owasp_top10_chgs2.png" alt="" id="BLOGGER_PHOTO_ID_5405555428231127490" border="0" /&gt;&lt;/a&gt;The release candidate of the new Top Ten is now available for download as a &lt;a href="http://www.owasp.org/index.php/File:OWASP_T10_-_2010_rc1.pdf"&gt;PDF document&lt;/a&gt;.  OWASP is requesting feedback on anything and everything until December 31, 2009.  I've not yet read the document in detail.  At first glance, I wonder about the naming conventions.  For example,  is "Injection" descriptive enough?   Is "misconfiguration" a real word?  Why is "Insecure Communications" changing  to the more cryptic "Insufficient Transport Layer Security"?  I guess now is the time to ask!&lt;img src="http://feeds.feedburner.com/~r/AppSecNotes/~4/TMHy89W0CqI" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/AppSecNotes/~3/TMHy89W0CqI/owasp-top-ten-changing-for-2010.html</link><author>noreply@blogger.com (Dave Ferguson)</author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/_ux58bmqGooQ/SwRkBalmocI/AAAAAAAAAFM/sxWPqBpD9NE/s72-c/owasp_top10_chgs2.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://appsecnotes.blogspot.com/2009/11/owasp-top-ten-changing-for-2010.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2281490675396238353.post-8402150818026992289</guid><pubDate>Thu, 05 Nov 2009 21:16:00 +0000</pubDate><atom:updated>2009-11-14T00:13:06.970-06:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Tools</category><category domain="http://www.blogger.com/atom/ns#">XSS</category><title>XSS via Cookie - How Severe?</title><description>Take a web application that sets a cookie.  Now let's say the application takes the cookie value included in subsequent requests and outputs it into the HTML of the responses.  Also assume this occurs with no authentication required and with no &lt;a href="http://www.owasp.org/index.php/XSS_%28Cross_Site_Scripting%29_Prevention_Cheat_Sheet#Escaping_.28aka_Output_Encoding.29"&gt;output encoding&lt;/a&gt; being done. Yes, this application is susceptible to reflected cross-site scripting.&lt;br /&gt;&lt;br /&gt;I recently tested such an application.  Interestingly, both &lt;a href="https://h10078.www1.hp.com/cda/hpms/display/main/hpms_content.jsp?zn=bto&amp;amp;cp=1-11-201-200%5E9570_4000_100__"&gt;HP WebInspect&lt;/a&gt; and &lt;a href="http://portswigger.net/scanner/"&gt;Burp's active scanner&lt;/a&gt; reported the XSS vulnerability, but they were at opposite ends of the spectrum in terms of rating its severity.  WebInspect rated it "critical" (the most severe rating), while  Burp rated it as "information", which implies you don't even need to concern yourself about it.&lt;br /&gt;&lt;br /&gt;So why the big disparity in these tools?  Is it critically severe, or is it really no big deal?  In my view, the answer is somewhere in between. This type of vulnerability is clearly very difficult to exploit.  An attacker would somehow have to cause a victim's browser to send a script-injected cookie as part of a request to the vulnerable site.  But regardless of the difficulty level, the application should properly encode the cookie value when it is written into the HTML page.  Please let me know your opinion on how serious you think this type of vulnerability is.&lt;img src="http://feeds.feedburner.com/~r/AppSecNotes/~4/m6PTgGymygw" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/AppSecNotes/~3/m6PTgGymygw/xss-via-cookie-how-severe.html</link><author>noreply@blogger.com (Dave Ferguson)</author><thr:total>4</thr:total><feedburner:origLink>http://appsecnotes.blogspot.com/2009/11/xss-via-cookie-how-severe.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2281490675396238353.post-3624233286848400385</guid><pubDate>Sat, 17 Oct 2009 04:36:00 +0000</pubDate><atom:updated>2009-10-16T23:36:00.416-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Industry</category><title>Internet Safety for Parents</title><description>A friend asked me about Internet safety including how parents can protect children from the nasty stuff that's out there.  I replied by describing what I do at home.  It's probably not the perfect system, but it seems to work for me.&lt;br /&gt;&lt;br /&gt;If you know nothing about Internet safety, start by visiting the &lt;a href="http://www1.k9webprotection.com/resources/online-safety.php"&gt;resources listed here&lt;/a&gt;.  Educate yourself about Internet dangers and the kinds of protection available.&lt;br /&gt;&lt;br /&gt;In terms of filtering, I recommend using the Windows Vista built-in parental controls.  You can select age-appropriate access level, define time restrictions, view logs of sites visited, etc.  Each user must have their own login on Vista (no sharing accounts!).  If you're not using Vista, please think seriously about upgrading.  The parental controls feature alone is worth the money. However, at this point in time you should probably upgrade to &lt;a href="http://www.pcworld.com/article/173828/microsoft_gets_set_to_spin_windows_7.html"&gt;Windows 7 since its release date is near&lt;/a&gt;.  I assume it has the same or even better parental controls.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://en.wikipedia.org/wiki/Defense_in_Depth_%28computing%29"&gt;Defense in depth&lt;/a&gt; applies in protecting children too.  So for better protection, I also recommend using BlueCoat's &lt;a href="http://www1.k9webprotection.com/getk9/index.php"&gt;K9 Web Protection&lt;/a&gt; (available for free).  It is not as flexible (all users have the same filter level), but it catches some stuff that Vista doesn't.  If you are currently stuck on Windows XP, use K9 at least.  Just remember it is not perfect.&lt;br /&gt;&lt;br /&gt;Finally, if you don't want a hacker opening a reverse shell and taking over your computer, make sure you check for software updates at least weekly!  Or, have it done automatically if possible.  These updates should include not just Windows and Anti-Virus software, but also Internet Explorer, Adobe Reader, Flash Player, Firefox, Thunderbird, Java, iTunes, etc.  &lt;p class="MsoNormal"&gt;&lt;span style=";font-family:&amp;quot;;font-size:10;"  &gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/span&gt;&lt;/p&gt;&lt;img src="http://feeds.feedburner.com/~r/AppSecNotes/~4/f8SjumsAATk" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/AppSecNotes/~3/f8SjumsAATk/internet-safety-for-parents.html</link><author>noreply@blogger.com (Dave Ferguson)</author><thr:total>1</thr:total><feedburner:origLink>http://appsecnotes.blogspot.com/2009/10/internet-safety-for-parents.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2281490675396238353.post-4964837421166201409</guid><pubDate>Sat, 10 Oct 2009 01:27:00 +0000</pubDate><atom:updated>2009-10-09T20:27:00.173-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Session Management</category><title>ColdFusion Session Fixation</title><description>I usually see &lt;a href="http://en.wikipedia.org/wiki/Session_fixation"&gt;session fixation&lt;/a&gt; vulnerabilities with Java web applications.  Just recently I found a ColdFusion application vulnerable to session fixation.   This nasty security hole greatly increases the risk that legitimate sessions will be hijacked.  Both HP WebInspect and Burp Pro's active scanner failed to find this vulnerability. Testing for session fixation is quite easy to do, so I ran a quick test for it manually, and I'm very glad I did.&lt;br /&gt;&lt;br /&gt;When testing for session fixation, I like to use two different browsers: IE and Firefox.  If the login page for an application is &lt;span style="color: rgb(102, 51, 0);"&gt;https://someapp.com/login&lt;/span&gt;, my test for session fixation consists of the following steps:&lt;br /&gt;&lt;ul&gt;1. Launch Firefox and navigate directly to the login page.&lt;br /&gt;&lt;br /&gt;2. Inspect the cookie(s) assigned by the application.  For a Java web app, a JSESSIONID cookie is normally set. In the case of ColdFusion, CFID and CFTOKEN cookies are typically set.&lt;br /&gt;&lt;br /&gt;3. Copy the session ID from the cookie.&lt;br /&gt;&lt;br /&gt;4. Construct a special URL that contains the session ID.&lt;br /&gt;For Java, it looks like this:&lt;br /&gt;&lt;span style="color: rgb(102, 51, 0);"&gt;https://someapp.com/login.jsp;jsessionid=[sessid]&lt;/span&gt;&lt;br /&gt;For CF, it looks like this:&lt;br /&gt;&lt;span style="color: rgb(102, 51, 0);"&gt;https://someapp.com/login.cfm?cfid=[cfid]&amp;amp;cftoken=[cftoken]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;5. Open IE and configure it to run through a proxy (Burp, Paros, Fiddler2, etc.).&lt;br /&gt;&lt;br /&gt;6. Paste the special URL into the IE address bar and hit Enter (this step simulates a victim clicking on a link in an email or Internet post).&lt;br /&gt;&lt;br /&gt;7. Observe the HTTP response from the server.  Is there a "Set-Cookie" header?  If so, what is the session ID being set?  You have a problem if it's the same value that appears in the URL.  On the other hand, you're probably okay if the value is different.&lt;br /&gt;&lt;/ul&gt;The ColdFusion site I tested was handling the situation even more poorly than usual.  It was not necessary to visit the site initially to obtain legitimate session IDs from the server, so steps 1-3 above weren't required.  An attacker could make up *any* 6 digit value for "cfid" and *any* 8 digit value for "cftoken", embed the made-up values in the malicious URL, and the application happily accepted them.   The server responded by assigning CFID and CFTOKEN cookies based on the made-up values as illustrated below.&lt;br /&gt;&lt;br /&gt;The URL of the request was:&lt;br /&gt;&lt;span style="color: rgb(102, 51, 0);"&gt;https://someapp.com/login.cfm?cfid=999555&amp;amp;cftoken=29292929&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The HTTP response contained the following headers:&lt;br /&gt;&lt;span style="color: rgb(102, 51, 0);"&gt;Set-Cookie: CFID=999555; path=/; Secure&lt;br /&gt;Set-Cookie: CFTOKEN=29292929; path=/; Secure&lt;/span&gt;&lt;img src="http://feeds.feedburner.com/~r/AppSecNotes/~4/np_jGRqO6K0" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/AppSecNotes/~3/np_jGRqO6K0/coldfusion-session-fixation.html</link><author>noreply@blogger.com (Dave Ferguson)</author><thr:total>2</thr:total><feedburner:origLink>http://appsecnotes.blogspot.com/2009/10/coldfusion-session-fixation.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2281490675396238353.post-3678827731318019967</guid><pubDate>Sat, 03 Oct 2009 06:31:00 +0000</pubDate><atom:updated>2011-07-01T21:52:50.754-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Industry</category><category domain="http://www.blogger.com/atom/ns#">Forgot Password</category><title>Who Has the Answers to Your Security Questions?</title><description>I'm back after a summer that was crazy busy for me.  Recently, I had two eye-opening occurrences where other people viewed the answers to my personal security questions - you know, those questions that web sites ask in case you forget your password.  These incidents weren't security breaches, just normal business processes that appear to be more prevalent than I thought.&lt;br /&gt;&lt;br /&gt;In the first incident, I got a new cell phone for my daughter at a retail store of one of the major providers. I gave the clerk my cell number so he could look up my account and he then asked for my "PIN".  I didn't know it. I knew my password for their site, but that's not what he wanted (I wouldn't have told him anyway).   Since I didn't know my PIN, the clerk followed up by asking me "What's the model of your first car?".  Whoa.  I proceeded to answer the question.  He looked at his monitor and said "okay, good".&lt;br /&gt;&lt;br /&gt;The other incident involved Vanguard again.  I got locked out of their site (not just &lt;a href="http://appsecnotes.blogspot.com/2009/06/vanguardcom-doesnt-recognize-me.html"&gt;unrecognized like last time&lt;/a&gt;). The darn thing wouldn't even allow me to answer my security questions.  Forced to call Vanguard customer service, I explained to the CSR that I was completely locked out.  Wouldn't you know the CSR simply asked me to answer two of my security questions?  I provided the correct answers, and he immediately unlocked my account allowing me to log in again.&lt;br /&gt;&lt;br /&gt;Moral to the story: These answers are not simply being used programmatically or being treated as confidential data.  Realize that the answers to your personal security questions could be viewed by other people in many cases.&lt;img src="http://feeds.feedburner.com/~r/AppSecNotes/~4/P2SIp1py_sU" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/AppSecNotes/~3/P2SIp1py_sU/who-has-answers-to-your-security.html</link><author>noreply@blogger.com (Dave Ferguson)</author><thr:total>0</thr:total><feedburner:origLink>http://appsecnotes.blogspot.com/2009/10/who-has-answers-to-your-security.html</feedburner:origLink></item><item><guid isPermaLink="false">tag:blogger.com,1999:blog-2281490675396238353.post-7288956190079649624</guid><pubDate>Wed, 24 Jun 2009 23:44:00 +0000</pubDate><atom:updated>2009-06-25T08:22:41.505-05:00</atom:updated><category domain="http://www.blogger.com/atom/ns#">Industry</category><title>Vanguard.com Doesn't "Recognize" Me</title><description>I upgraded the hard drive on my home computer.  The first time I tried to log into my &lt;a href="https://personal.vanguard.com/us/home"&gt;Vanguard account online&lt;/a&gt;, it asked me to answer a security question.  No problem I thought to myself.  The site just doesn't recognize me since I have a new drive.  It wants extra information to be sure I'm me.  This is part of &lt;a href="http://en.wikipedia.org/wiki/SiteKey"&gt;PassMark "sitekey"&lt;/a&gt; functionality.  I typed in the answer to the question and was promptly told "sorry, invalid answer".  Weird.  I tried again. same result.  I was 95% sure I was entering the correct answer, but each time I tried, it didn't work.  Eventually I got an email telling me I disabled my ability to log in from an unrecognized computer due to repeated wrong answers.  Nice.  The web site didn't inform me of this - only the email.  The email also stated I could now only log in if I used a recognized computer.  To log in from an unrecognized computer, I would have to reset my security questions or call Vanguard customer service.  Great.&lt;br /&gt;&lt;br /&gt;Luckily, I had logged into Vanguard from my work computer, meaning it was "recognized" and I wasn't asked a security question.  Using my work computer, I logged in and reset my security questions and answers as required.  Now back to my home computer.  I was quite confident facing a security question this time. But again, failure!  Why does it not accept my answer?  I was 100% sure it was correct this time.  I just reset them for cryin' out loud.&lt;br /&gt;&lt;br /&gt;At this point I concluded that it was a bug in Vanguard's site.  Do I call their customer support?  Ugh.  Instead I took the approach of trying to get the site to "recognize" my home computer.  Long story short, I copied a single file from my work computer to my home computer and solved the problem.  I knew the PassMark/sitekey solution uses a &lt;a href="http://en.wikipedia.org/wiki/Local_Shared_Object"&gt;Flash local shared object&lt;/a&gt; to determine whether a computer is recognized.  It does not use a persistent cookie as you might first guess.  Anyway, I found the shared object file "PassMark.sol" in the following directory on my work computer:&lt;br /&gt;&lt;br /&gt;C:\Documents and Settings\[user]\Application Data\Macromedia\Flash Player\#SharedObjects\xxxxxxxx\vanguard.com\passmark\flash\pmfso.swf&lt;br /&gt;&lt;br /&gt;where "xxxxxxxx" changes for different users.  I copied PassMark.sol over to the corresponding directory on my home computer and it worked like a charm!  Vanguard's site suddenly recognized my home computer and I got logged in.&lt;br /&gt;&lt;br /&gt;This episode was very frustrating and got me wondering how normal users feel.  After all, I was only able to solve the problem with:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Luck  - I had another computer that was recognized&lt;/li&gt;&lt;li&gt;Esoteric knowledge - Vanguard's site uses Flash shared objects to recognize a computer&lt;/li&gt;&lt;/ul&gt;The vast majority of users are not web application security experts.  They must be going crazy, and on the phone with support a lot.&lt;img src="http://feeds.feedburner.com/~r/AppSecNotes/~4/XXFE5jyp2pg" height="1" width="1"/&gt;</description><link>http://feedproxy.google.com/~r/AppSecNotes/~3/XXFE5jyp2pg/vanguardcom-doesnt-recognize-me.html</link><author>noreply@blogger.com (Dave Ferguson)</author><thr:total>2</thr:total><feedburner:origLink>http://appsecnotes.blogspot.com/2009/06/vanguardcom-doesnt-recognize-me.html</feedburner:origLink></item></channel></rss>
