<?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>Blog :: by Wade Woolwine &#187; Implementation Security</title>
	<atom:link href="http://www.wadewoolwine.com/category/implementation-security/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.wadewoolwine.com</link>
	<description>Thoughts and discussions on web technologies, security, and innovations.</description>
	<lastBuildDate>Tue, 05 Jan 2010 15:00:23 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1-beta1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Thoughts on an AppSec Program (Pt. 3) &#8211; Threat modeling, architecture reviews, and security consulting</title>
		<link>http://www.wadewoolwine.com/2009/12/31/thoughts-on-an-appsec-program-pt-3-threat-modeling-architecture-reviews-and-security-consulting/</link>
		<comments>http://www.wadewoolwine.com/2009/12/31/thoughts-on-an-appsec-program-pt-3-threat-modeling-architecture-reviews-and-security-consulting/#comments</comments>
		<pubDate>Thu, 31 Dec 2009 15:00:32 +0000</pubDate>
		<dc:creator>wadew</dc:creator>
				<category><![CDATA[Enterprise Security]]></category>
		<category><![CDATA[Implementation Security]]></category>
		<category><![CDATA[Security Architecture]]></category>
		<category><![CDATA[Security Design]]></category>
		<category><![CDATA[WebAppSec]]></category>
		<category><![CDATA[Security Consulting]]></category>
		<category><![CDATA[Threat Modeling]]></category>

		<guid isPermaLink="false">http://www.wadewoolwine.com/?p=183</guid>
		<description><![CDATA[I’ve spent the past 3.5 years working on a team where my primary responsibilities involved “application security”. Now that this era has come to an end, I’d like to share some of the initiatives and define their successes and shortcomings. This is part 3 of 5 so please be sure to read parts 1 and [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.wadewoolwine.com/wp-content/uploads/2009/12/lastholo03.jpg"><img class="alignleft size-full wp-image-187" src="http://www.wadewoolwine.com/wp-content/uploads/2009/12/lastholo03.jpg" alt="" width="200" height="200" align="left" /></a>I’ve spent the past 3.5 years working on a team where my primary responsibilities involved “application security”. Now that this era has come to an end, I’d like to share some of the initiatives and define their successes and shortcomings. This is part 3 of 5 so please be sure to read parts <a href="../2009/12/29/thoughts_on_an_appsec_program-the_team/" target="_self">1</a> and <a href="../2009/12/30/thoughts-on-an-appsec-program-pt-2-penetration-testing/" target="_self">2</a>.</p>
<p><strong>Threat modeling, architecture reviews, and security consulting</strong><br />
Our application security program always offered a design review service. Initially this service wasn&#8217;t very well defined and simply involved a security engineer performing a review of available documentation and interviews with the development team. The outcome of this engagement was a series of recommendation and requirements for the project to implement during the development phase. As you can imagine, this approach was very subjective and lacked documentation, but formalization of the offering was put on the back burner due to the successes with the penetration testing offering.</p>
<p>A little over a year and a half after the application security program was defined, we started focusing on assimilating some of the industry proven approaches to threat modeling and security architecture best practices into our existing design review service. We leveraged the opportunities presented by the local OWASP chapter and were able to obtain the training in formal threat modeling approaches that we were easily able to adapt and offer as a fully documented and repeatable process. Unfortunately, my time with the team was up before we could really determine the effectiveness of this service offering. My hope was that we could use this service to not only identify deficiencies in secure design early in the lifecycle, but also to setup a plan for providing training, code review / SCA services, and penetration testing at the appropriate times. This would effectively setup a consulting relationship between the individual security engineers and the project team where a single person / team could be leveraged for all aspects of application security.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wadewoolwine.com/2009/12/31/thoughts-on-an-appsec-program-pt-3-threat-modeling-architecture-reviews-and-security-consulting/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Security Questions don&#8217;t work!</title>
		<link>http://www.wadewoolwine.com/2009/01/29/security-questions-dont-work/</link>
		<comments>http://www.wadewoolwine.com/2009/01/29/security-questions-dont-work/#comments</comments>
		<pubDate>Thu, 29 Jan 2009 16:00:55 +0000</pubDate>
		<dc:creator>wadew</dc:creator>
				<category><![CDATA[Implementation Security]]></category>
		<category><![CDATA[Security Design]]></category>
		<category><![CDATA[WebAppSec]]></category>
		<category><![CDATA[Authentication]]></category>
		<category><![CDATA[Security Question]]></category>

		<guid isPermaLink="false">http://www.wadewoolwine.com/?p=53</guid>
		<description><![CDATA[We&#8217;ve all seen them, we&#8217;ve all used them&#8230;&#8221;What is your father&#8217;s middle name?&#8221;, &#8220;What is the name of your favorite pet?&#8221;, &#8220;Where did you go to high school?&#8221;. These questions are typically used in web applications when a user needs to reset their password or change their account email address. The intent is to provide [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-56" style="border: 1px solid black; margin: 2px;" title="question" src="http://www.wadewoolwine.com/wp-content/uploads/2009/01/question.jpg" alt="" width="200" height="177" />We&#8217;ve all seen them, we&#8217;ve all used them&#8230;&#8221;What is your father&#8217;s middle name?&#8221;, &#8220;What is the name of your favorite pet?&#8221;, &#8220;Where did you go to high school?&#8221;. These questions are typically used in web applications when a user needs to reset their password or change their account email address. The intent is to provide a &#8220;secure&#8221; means through which a user&#8217;s identity can be asserted without email confirmation. The problem is that the answers to most security questions can easily be obtained with a little research.</p>
<p>One of the primary destinations on the internet in 2008 was for social networking applications&#8230;also known as places where you put all your information to share it with your friends. Whether it&#8217;s a Facebook profile, a Twitter post history, a blog, MySpace page, or Google most people have published all the information required for the target account to me stolen. Need more proof?</p>
<ul>
<li><a href="http://www.informationweek.com/news/security/cybercrime/showArticle.jhtml?articleID=210602271">Sarah Palin Yahoo! account hacked</a></li>
<li><a href="http://www.oreillynet.com/pub/a/mac/2005/01/01/paris.html">Paris Hilton&#8217;s Sidekick hacked</a></li>
<li><a href="http://www.mobiletracker.net/archives/2005/02/25/fred-durst-sex-video">Fred Durst&#8217;s T-Mobile account hacked</a></li>
<li><a href="http://www.google.com/search?q=">Google search results for: &#8220;security question&#8221; hacked</a></li>
</ul>
<p>One of my motivations behind this post comes from when I checked my access logs and found that someone searching for &#8220;Wade Woolwine&#8221; birthday on Google and had ended up on my blog. Luckily, I don&#8217;t use my birthday for answers to security questions&#8230;but I now know that one of my accounts is being targeted.</p>
<p>It&#8217;s not likely that people will stop choosing bad security questions or publishing too much information about them on the internet. So how do we make this account management safeguard safer?</p>
<ul>
<li><strong>Better Security Questions</strong><br />
Enter a 6-10 digit code.<br />
Enter a backup password.<br />
Enter the last 4 digits of your drivers license.</li>
<li><strong>Photo security questions</strong><br />
Allow the user to provide the security question by selecting an image or providing their own.</li>
<li><strong>Confirmation code sent over SMS</strong><br />
For sites who use SMS for other purposes, a verification code can be sent to the registered mobile number.</li>
<li><strong>Delay email address change requests</strong><br />
Impose a 24 hour delay for email address change requests. During that time, issue an email to both current and future email address explaining the email change request. The email to the current email address should include instructions on how to block the request should it be unauthorized.</li>
<li><strong>Identity certificates</strong><br />
If the provider is able to issue client certificates for their visitors, these certificates can be used as a form of 2nd factor authentication.</li>
<li><strong>2nd factor authentication service</strong><br />
For banks and other financial institutions, leveraging a service such as <a href="http://www.verisign.com/authentication/consumer-authentication/vip-authentication/">Verisign VIP</a> should be implemented. There would be an additional cost for the tokens to cover, but the added security becomes a marketing tool for the service.</li>
</ul>
<p>I&#8217;m not sure if any of these options are truly viable as robust solutions for enhancements or replacements for security questions, but they would make targeting users&#8217; accounts through social engineering more difficult.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wadewoolwine.com/2009/01/29/security-questions-dont-work/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>mod_auth_kerb and mod_authnz_ldap bring Apache web apps into the Enterprise</title>
		<link>http://www.wadewoolwine.com/2009/01/28/mod_auth_kerb-and-mod_authnz_ldap-bring-apache-web-apps-into-the-enterprise/</link>
		<comments>http://www.wadewoolwine.com/2009/01/28/mod_auth_kerb-and-mod_authnz_ldap-bring-apache-web-apps-into-the-enterprise/#comments</comments>
		<pubDate>Wed, 28 Jan 2009 22:13:45 +0000</pubDate>
		<dc:creator>wadew</dc:creator>
				<category><![CDATA[Enterprise Security]]></category>
		<category><![CDATA[Implementation Security]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[Security Architecture]]></category>
		<category><![CDATA[ActiveDirectory]]></category>
		<category><![CDATA[Authentication]]></category>
		<category><![CDATA[Authorization]]></category>
		<category><![CDATA[LDAP]]></category>
		<category><![CDATA[mod_authnz_ldap]]></category>
		<category><![CDATA[mod_auth_kerb]]></category>
		<category><![CDATA[SPNEGO]]></category>
		<category><![CDATA[SSO]]></category>

		<guid isPermaLink="false">http://www.wadewoolwine.com/?p=44</guid>
		<description><![CDATA[The majority of companies out there have implemented some sort of Windows Active Directory system that they use to connect and manage desktop systems, servers, printers, and other networked assets in a &#8220;secure&#8221; way. I use secure in quotes because the security largely depends on individual implementations. In any event, the Open Source community builds [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-47" style="border: 1px solid black; margin: 2px;" title="locks" src="http://www.wadewoolwine.com/wp-content/uploads/2009/01/locks.jpg" alt="" width="200" height="155" />The majority of companies out there have implemented some sort of Windows Active Directory system that they use to connect and manage desktop systems, servers, printers, and other networked assets in a &#8220;secure&#8221; way. I use secure in quotes because the security largely depends on individual implementations. In any event, the Open Source community builds some pretty cool web apps on top of Apache that would be very useful for collaborating, code management, etc. One of the pain points for companies choosing Open Source web solutions has been the custom authentication and authorization implemented in the applications.</p>
<p>mod_auth_kerb extends Apache&#8217;s Basic Auth functionality to authenticate enterprise users against Windows Active Directory using Kerberos tickets supported by Windows. mod_authnz_ldap can use the Active Directory LDAP server to evaluate any available LDAP field against administrator defined ACL. For example, Company X decides to use an Open Source web application but want to restrict access to those in the Active Directory Administrators group; mod_authnz_ldap can use the LDAP server to pull the Active Directory group for the user it&#8217;s authenticating and determine whether they are part of the Administrators group.</p>
<p>Here&#8217;s a quick summary of how to get it working:</p>
<ol>
<li>Ensure that your Apache is build with &#8211;enable-ldap &#8211;enable-authnz-ldap &#8211;with-ldap.</li>
<li>Configure Apache to use mod_kerb_auth/Kerberos as it&#8217;s AuthType:<br />
<a href="http://koo.fi/tech/2008/06/18/apache-http-authentication-to-active-directory-with-kerberos/" target="_blank">http://koo.fi/tech/2008/06/18/apache-http-authentication-to-active-directory-with-kerberos/</a></li>
<li>Configure Apache to use mod_authnz_ldap to authorize access based on LDAP data:<br />
<strong>Global Apache configurations:</strong><br />
LDAPTrustedMode SSL<br />
<em>(optional)</em> LDAPTrustedGlobalCert CA_DER /etc/apache2/ssl/AOL_Member_CA.der # <em>If the SSL certificate on ldaps is not recognized</em><br />
LDAPVerifyServerCert off<strong></strong></p>
<p><strong>Directory Apache configurations:</strong><br />
RequireSSL # <em>because you don&#8217;t want Active Directory credentials in the clear</em><br />
AuthLDAPURL ldaps://directoryserver:port/dc=somewhere,dc=com?cn SSL # <em>where CN is the unique username</em><br />
AuthLDAPRemoteUserIsDN off<br />
AuthLDAPBindDN <em>DNUsername</em><br />
AuthLDAPBindPassword <em>DNPassword</em><br />
require ldap-attribute <em>ldapfieldname = &#8220;ldapfieldvalue&#8221;</em><br />
require ldap-attribute <em>ldapfieldname = &#8220;ldapfieldvalue&#8221;</em></li>
<li>Set Apache&#8217;s LogLevel to debug and start troubleshooting. Having an LDAP browser available to test will help you determine where the issues are when troubleshooting.</li>
</ol>
<p>I ran into a small problem while getting this setup. I found that mod_auth_kerb was modifying the Apache Basic Auth &#8220;user&#8221; field from the username provided at login to username@realm. This might not be a problem in most cases, but for my implementation, username@realm was no where to be found in the Active Directory LDAP data. So, I did the following quick hacks to the mod_auth_kerb source code and recompiled:</p>
<ul>
<li>Comment out user = <em>apr_pstrcat(r-&gt;pool, user, &#8220;@&#8221;, realm, NULL);</em></li>
<li>Changed <em>MK_USER = apr_pstrdup (r-&gt;pool, name);</em> to <em>MK_USER = apr_pstrdup (r-&gt;pool, sent_name);</em></li>
</ul>
<p>This small change makes mod_auth_kerb return the username instead of username@realm. I&#8217;ve emailed the maintainers of mod_auth_kerb to see if they would consider adding an configuration flag to enable the stripping of @realm.</p>
<p>mod_auth_kerb supports SPNEGO (Windows Integrated Authentication support in IE and Firefox) which can provide Single Sign On for Windows users authenticated to the Active Directory.</p>
<ul>
<li><strong>IE:</strong> <a href="http://support.microsoft.com/kb/258063 " target="_blank">http://support.microsoft.com/kb/258063<br />
</a></li>
<li><strong>Firefox:</strong> In <em>about:config</em>, change the value in <em>network.negotiate-auth.trusted-uris</em> to <em>https://the.url.for.your.app</em></li>
</ul>
<p>Since mod_auth_kerb and mod_authnz_ldap simply hook the Apache Basic Auth functionality, applications can leverage the Apache server to provide a username to the underlying web application.</p>
<p>Here are a couple apps you might want to test your new authentication with:</p>
<ul>
<li><a href="http://subversion.tigris.org/" target="_blank">Subversion </a>(SVN)</li>
<li><a href="http://www.mantisbt.org/" target="_blank">Mantis Bug Tracking Application</a> (with Apache Basic Auth support)</li>
<li><a href="http://www.mediawiki.org/" target="_blank">MediaWiki</a> (with Apache Basic Auth support)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.wadewoolwine.com/2009/01/28/mod_auth_kerb-and-mod_authnz_ldap-bring-apache-web-apps-into-the-enterprise/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>New Research Papers Posted</title>
		<link>http://www.wadewoolwine.com/2008/09/04/new-research-papers-posted/</link>
		<comments>http://www.wadewoolwine.com/2008/09/04/new-research-papers-posted/#comments</comments>
		<pubDate>Thu, 04 Sep 2008 13:32:15 +0000</pubDate>
		<dc:creator>wadew</dc:creator>
				<category><![CDATA[Code Security]]></category>
		<category><![CDATA[Enterprise Security]]></category>
		<category><![CDATA[Implementation Security]]></category>
		<category><![CDATA[Research]]></category>
		<category><![CDATA[Security Design]]></category>
		<category><![CDATA[WebAppSec]]></category>
		<category><![CDATA[Authentication]]></category>
		<category><![CDATA[Authorization]]></category>
		<category><![CDATA[CSRF]]></category>
		<category><![CDATA[Papers]]></category>

		<guid isPermaLink="false">http://www.wadewoolwine.com/?p=23</guid>
		<description><![CDATA[I&#8217;ve posted a couple research papers that I&#8217;ve written recently.
Secure Authentication and Authorization
In this paper, I lay out the key components to planning, designing, and implementing a secure authentication and authorization model for web applications. I discuss topics like data classification, application functionality inventories, unique session ids, and login forms providing PHP code samples as [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-24" style="border: 1px solid black; margin: 2px; float: left;" title="whitepaper" src="http://www.wadewoolwine.com/wp-content/uploads/2008/09/whitepaper.jpg" alt="" width="200" height="175" />I&#8217;ve posted a couple research papers that I&#8217;ve written recently.</p>
<p><strong>Secure Authentication and Authorization</strong><br />
In this paper, I lay out the key components to planning, designing, and implementing a secure authentication and authorization model for web applications. I discuss topics like data classification, application functionality inventories, unique session ids, and login forms providing PHP code samples as examples.</p>
<p><strong>Cross Site Request Forgeries (CSRF)</strong><br />
In this paper I describe CSRF vulnerabilities, how they occur, and different techniques that can be used to mitigate them. Some of the mitigating techniques discussed include nonce checking, server side business logic enforcement, CAPTCHA, and IP address based rate limiting.</p>
<p>Please take some time to check out the <a href="http://www.wadewoolwine.com/research-papers/">Research / Papers</a> tab on the blog and feel free to leave some comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wadewoolwine.com/2008/09/04/new-research-papers-posted/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why use the &#8220;secure&#8221; option for cookies?</title>
		<link>http://www.wadewoolwine.com/2008/08/12/why-use-the-secure-option-for-cookies/</link>
		<comments>http://www.wadewoolwine.com/2008/08/12/why-use-the-secure-option-for-cookies/#comments</comments>
		<pubDate>Wed, 13 Aug 2008 01:01:17 +0000</pubDate>
		<dc:creator>wadew</dc:creator>
				<category><![CDATA[Enterprise Security]]></category>
		<category><![CDATA[Implementation Security]]></category>
		<category><![CDATA[Security Design]]></category>
		<category><![CDATA[Security Tools]]></category>
		<category><![CDATA[cookies]]></category>
		<category><![CDATA[secure]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[tools]]></category>

		<guid isPermaLink="false">http://www.wadewoolwine.com/?p=17</guid>
		<description><![CDATA[Most modern web applications built on web development frameworks (PHP, Java, .NET, etc) use the cookie to store session identifiers which track a visitor&#8217;s activity throughout the site. Moreover, these session identifiers are also used when determining the visitor&#8217;s identity and authorizing transactions throughout the web application. As such, this value, which is transmitted with [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-18" style="border: 1px solid black; margin: 2px; float: left;" title="secure_cookies" src="http://www.wadewoolwine.com/wp-content/uploads/2008/08/secure_cookies.gif" alt="" width="200" height="218" />Most modern web applications built on web development frameworks (PHP, Java, .NET, etc) use the cookie to store session identifiers which track a visitor&#8217;s activity throughout the site. Moreover, these session identifiers are also used when determining the visitor&#8217;s identity and authorizing transactions throughout the web application. As such, this value, which is transmitted with every HTTP request as part of the cookie, becomes a very attractive target to attackers.</p>
<p>To minimize the risk of exposing the session identifier on the network in cleartext the data going between the visitor&#8217;s web browser and the web application server must be encrypted using SSL. Baring any other vulnerabilities in the code such as XSS, code injection or SQLi one would assume that the session identifier is well protected&#8230;Not if the Secure only cookie flag hasn&#8217;t been set.</p>
<p>Per <a href="http://www.w3.org/Protocols/rfc2109/rfc2109" target="_blank">RFC 2109</a></p>
<blockquote><p>The Secure attribute (with no value) directs the user agent to use only (unspecified) secure means to contact the origin server whenever it sends back this cookie.</p>
<p>The user agent (possibly under the user&#8217;s control) may determine what level of security it considers appropriate for &#8220;secure&#8221; cookies.  The Secure attribute should be considered security advice from the server to the user agent, indicating that it is in the session&#8217;s interest to protect the cookie contents.</p></blockquote>
<p>This excerpt of the RFC simply means that if a cookie has the &#8220;Secure&#8221; option enabled, the browser must only send the cookie when the HTTP request is performed over SSL. The importance of this option is highlighted by a recent attack by <a href="http://enablesecurity.com/about/" target="_blank">Sandro Gauci</a> of <a href="http://enablesecurity.com/" target="_blank">Enable Security</a>.</p>
<p>In his <a href="http://resources.enablesecurity.com/resources/Surf%20Jacking.pdf" target="_blank">paper</a> (and <a href="http://www.vimeo.com/1507697" target="_blank">video</a>), Sandro demonstrates how an attacker on the same network physical network can use his tool (<a href="http://enablesecurity.com/2008/08/11/surf-jack-https-will-not-save-you/" target="_blank">SurfJacking</a>) to hijack another user&#8217;s authenticated SSL session with GMail and successfully obtain the session identifier. His approach is so simple, I regret not having thought about this myself:</p>
<ol>
<li>Victim logs into <a href="https://mail.google.com/" target="_blank">GMail</a> using SSL*.</li>
<li>Victim uses the same browser to visit another web page (while keeping the GMail window open)</li>
<li>The <a href="http://enablesecurity.com/2008/08/11/surf-jack-https-will-not-save-you/" target="_blank">SurfJacking</a> tool detects step 3 and issues a fraudulent 302 HTTP Response code (Permanently Moved) pointing to <a href="http://mail.google.com/">http://mail.google.com</a></li>
<li>The victim browser accepts the redirect and initiates a connection with http://mail.google.com using the same session identifier as was used in the SSL connection.</li>
<li><a href="http://enablesecurity.com/2008/08/11/surf-jack-https-will-not-save-you/" target="_blank">SurfJacking</a> identifies the cleartext GMail session identifier and logs it for the tool operator.</li>
<li>Attacker accessing the victim&#8217;s GMail account.</li>
</ol>
<p>* The browser connection setting in GMail must be set to Don&#8217;t always use HTTPS (which is the default)</p>
<p>Sandro Gauci has written a <a href="http://resources.enablesecurity.com/resources/Surf%20Jacking.pdf" target="_blank">paper</a> and created a <a href="http://www.vimeo.com/1507697" target="_blank">video demo</a> to illustrate the attack. The video shows the <a href="http://enablesecurity.com/2008/08/11/surf-jack-https-will-not-save-you/" target="_blank">SurfJacking</a> tool in action as well as mitigating the attack by enabling SSL only cookies with the &#8220;browser connection&#8221; setting in GMail. Please be sure to check them out.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wadewoolwine.com/2008/08/12/why-use-the-secure-option-for-cookies/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
