<?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>Neural Core Dump &#187; Security</title>
	<atom:link href="http://www.jeffdarlington.com/category/technology/security/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jeffdarlington.com</link>
	<description>The personal blog of Jeffrey T. Darlington, creator of General Protection Fault</description>
	<lastBuildDate>Sat, 28 Jan 2012 20:00:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>An Open Letter to Mobile Browser Developers</title>
		<link>http://www.jeffdarlington.com/2011/03/22/an-open-letter-to-mobile-browser-developers/</link>
		<comments>http://www.jeffdarlington.com/2011/03/22/an-open-letter-to-mobile-browser-developers/#comments</comments>
		<pubDate>Tue, 22 Mar 2011 14:26:16 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[client certificate]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[HTTPS]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[iPod]]></category>

		<guid isPermaLink="false">http://www.jeffdarlington.com/?p=435</guid>
		<description><![CDATA[If you&#8217;ve been following my Twitter account at all, you&#8217;ve probably noticed by now that I&#8217;ve become an avid mobile device (i.e. smartphone) user, and a fan of Android in particular. This isn&#8217;t just a passing phase for me, nor is this a technology fad that&#8217;s just going to fade away. Mobile technology is really [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve been following <a title="GPFJeff on Twitter" href="https://twitter.com/gpfjeff">my Twitter account</a> at all, you&#8217;ve probably noticed by now that I&#8217;ve become an avid mobile device (i.e. <a title="Smartphone article on Wikipedia" href="https://secure.wikimedia.org/wikipedia/en/wiki/Smartphone">smartphone</a>) user, and a fan of <a title="Android (operating system) article on Wikipedia" href="https://secure.wikimedia.org/wikipedia/en/wiki/Android_%28operating_system%29">Android</a> in particular. This isn&#8217;t just a passing phase for me, nor is this a technology fad that&#8217;s just going to fade away. Mobile technology is really taking off, and I wouldn&#8217;t be surprised if a paradigm shift won&#8217;t occur—if it hasn&#8217;t already—where more people will be using smartphones and mobile devices to access the Internet and other online services than using a full desktop or laptop. There are other contenders vying to be our one-and-only window to the digital world, like set-top boxes, digital TVs, and such, but nothing is as personal and portable as the smartphone and its bigger brother, the <a title="Tablet computer article on Wikipedia" href="https://secure.wikimedia.org/wikipedia/en/wiki/Tablet_computer">tablet</a>.</p>
<p>That said, I&#8217;m not in the camp that believes that the Web is dead and that mobile apps are the way of the future. <a title="Why there isn’t (and likely never will be) a GPF iPhone app" href="http://www.jeffdarlington.com/2009/11/30/why-there-isnt-and-likely-never-will-be-a-gpf-iphone-app/">I&#8217;ve expressed my feelings on that here before.</a> Apps won&#8217;t and can&#8217;t be the end-all, be-all interface to data and the mobile Web will always have a place. Thus the mobile browser is one of the most important apps a smartphone can have. That said, most browsers on smartphones are anemic, underpowered, and severely lacking in important functionality. Smartphone manufacturers and OS authors want us to believe that we can leave the laptop behind and work entirely from that wondrous miracle in our pocket, but fail to deliver the tools we need to make that dream a reality.</p>
<p>My case in point: <a title="Public key certificate article on Wikipedia" href="https://secure.wikimedia.org/wikipedia/en/wiki/Public_key_certificate#Client_certificates">client-certificate authentication</a>. As a very brief summary, the entire industry of e-commerce rests entirely on a set of encryption technologies such as <a title="HTTP Secure article on Wikipedia" href="https://secure.wikimedia.org/wikipedia/en/wiki/HTTP_Secure">HTTPS</a>, SSL, <a title="Transport Layer Security article on Wikipedia" href="https://secure.wikimedia.org/wikipedia/en/wiki/Transport_Layer_Security">TLS</a>, etc., that allow secure, private communication between a client (such as an online shopper) and a server (an online store). The server authenticates itself to the client by using a digital certificate, signed by a trusted certificate authority which has investigated and authenticated the server as a legitimate entity. The client can rest assured that the server belongs to the authenticated entity because the certificate uses strong public-key cryptography to provide a chain of trust back to the authenticating authority. Without this technology in place, we wouldn&#8217;t be able to tell legitimate businesses such as online retailers and banks from the phishing scams so prevalent on the Web. (This doesn&#8217;t always solve problems between the keyboard and the chair, of course, but it is effective as long as the wetware interface is working properly.)</p>
<p>But digital certificates can be used to authenticate the client as well as the server. Many businesses and governments use client certificates to authenticate users to secure systems. For example, I use a government-issued <a title="Smart Card article on Wikipedia" href="https://secure.wikimedia.org/wikipedia/en/wiki/Smart_card#Cryptographic_smart_cards">Smart Card</a> to authenticate with my client&#8217;s servers. On this card is chip that contains my digital certificate, signed by a private certificate authority. When I authenticate with the client&#8217;s services, the private key on the card creates a digital signature which the server can authenticate against my public key, the inverse of what happens between the online shopper and the store front. Thus, I can trust the validity of the government&#8217;s certificate and know I&#8217;m connecting to their servers and no one else, and they in turn can validate that I (or the person who has my card) am who I say I am and let me in. I use a similar technology with <a title="General Protection Fault" href="http://www.gpf-comics.com/">GPF</a>, although I import my certificates directly into the browser rather than use an external card. I created my own private certificate authority and issue client certificates to each browser I wish to use to access my admin interfaces. That way, I know only certain machines can access those portions of the site, offering a lot more security than just a simple password can provide.</p>
<p>This isn&#8217;t a new technology. SSL has been around almost as long as the Web itself, and it wasn&#8217;t long before the model was flipped around to authenticate clients to servers as well as servers to clients. This is a tool used by businesses every day all over the world. Every desktop browser supports client certificates because they are a <a title="RFC 5246: The Transport Layer Security (TLS) Protocol" href="http://tools.ietf.org/html/rfc5246#section-7.4.6">standard</a>. Any browser that doesn&#8217;t support them is likely to be overlooked or ignored in favor of browsers that do.</p>
<p>Yet the support for client certificates on mobile devices is appallingly absent. I know the built-in Android browser doesn&#8217;t support it, and <a title="Issue 8196: 	Enhancement: Client Certificate Authentication in Browser" href="https://code.google.com/p/android/issues/detail?id=8196">I created an issue</a> in Google&#8217;s official <a title="Android Issues at Google Code" href="https://code.google.com/p/android/issues/list">Android issue tracker</a> to complain about it. Android supports client certs for WiFi authentication, but not in the browser, e-mail, or any other key service vital to secure business communications. Supposedly support for this functionality is going to be added in future versions of Android, but that doesn&#8217;t help me or any of the millions of current Android users until it comes time to upgrade our devices. I&#8217;ve read in various places that the iPhone supports client certs, but I&#8217;ve never been able to get any of the solutions to work with my iPod Touch (essentially an iPhone minus the annoying contract and poor service of AT&amp;T). The only success I&#8217;ve had in this area has been with <a title="Firefox Mobile" href="https://www.mozilla.com/en-US/mobile/">Firefox Mobile</a>, which is pretty much a Firefox 4 release candidate smooshed and crunched down to fit on a mobile device. It&#8217;s bloated and a lot slower than Android&#8217;s built in browser and there&#8217;s no handy UI for importing certs like there is on the desktop, but if you take a sledgehammer to it and <a title="Firefox Help: how to use clientcertificate to access https websites under android" href="https://support.mozilla.com/en-US/questions/786035#answer-142961">do some manual file tweaking</a>, you can import your client and CA certs into the certificate database and use it effectively.</p>
<p>Seriously, guys&#8230; you want your devices and mobile OSes to be taken seriously by businesses as tools to take our work out of the office and on the road. Yet, you don&#8217;t give us the essential tools required to take advantage of this amazing freedom. Sure, you tell us &#8220;there&#8217;s an app for that&#8221;, but frankly, there isn&#8217;t. I&#8217;ve looked, and they&#8217;re not there. Apple won&#8217;t let third-party browsers compete with Safari on iOS and none of the Android add-on browsers support client certs either. Only Firefox, a desktop browser masquerading as a mobile app, comes close, and it takes a bit of technical wizardry to do something that should be a quick five second import. Someone&#8217;s got to step up to the plate and make some progress here, or no business that really understands security is going to take the mobile space seriously.</p><div><a class="addthis_button" href="//addthis.com/bookmark.php?v=250" addthis:url='http://www.jeffdarlington.com/2011/03/22/an-open-letter-to-mobile-browser-developers/' addthis:title='An Open Letter to Mobile Browser Developers '><img src="//cache.addthis.com/cachefly/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.jeffdarlington.com/2011/03/22/an-open-letter-to-mobile-browser-developers/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Firesheep, GPF, and Neural Core Dump</title>
		<link>http://www.jeffdarlington.com/2010/11/03/firesheep-gpf-and-neural-core-dump/</link>
		<comments>http://www.jeffdarlington.com/2010/11/03/firesheep-gpf-and-neural-core-dump/#comments</comments>
		<pubDate>Wed, 03 Nov 2010 17:21:21 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[GPF]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[cookie]]></category>
		<category><![CDATA[Firesheep]]></category>

		<guid isPermaLink="false">http://www.jeffdarlington.com/?p=406</guid>
		<description><![CDATA[By now, the tech savvy among you have probably heard of Firesheep, the infamous unofficial Firefox plugin that lets you swipe other people&#8217;s session cookies and impersonate them on various popular, less-than-secure websites if you and they share the same unencrypted WiFi access point. The less tech savvy ones probably could care less, or are [...]]]></description>
			<content:encoded><![CDATA[<p>By now, the tech savvy among you have probably heard of <a title="Eric Butler - Software Developer in Seattle WA" href="http://bit.ly/9vil65">Firesheep</a>, the infamous unofficial Firefox plugin that lets you swipe other people&#8217;s session cookies and impersonate them on various popular, less-than-secure websites if you and they share the same unencrypted WiFi access point. The less tech savvy ones probably could care less, or are so terrified and spooked that you&#8217;ve turned off and unplugged your computers, buried them in a 20-foot-deep hole in the backyard, and layered on top of them concrete, asbestos, Kevlar, lard, and ten thousand old AOL CDs you&#8217;ve been hoarding in the closet since 1990.</p>
<p>OK, I was only kidding about the lard.</p>
<p>Last week I <a title="Twitter / Jeffrey Darlington" href="http://twitter.com/gpfjeff/status/29004016286">tweeted</a> that &#8220;Firesheep makes me want to weep for the Internet and laugh maniacally, both simultaneously&#8221;. That&#8217;s no exaggeration. On one hand, it&#8217;s performing wonders by raising awareness of just how insecure many of our favorite sites really are. The problem Firesheep exposes has been around for ages; hard-core hackers could perform all the tasks that this plugin does through readily available tools and a lot of dedicated logging and log scanning. What Firesheep does is take a complicated, hard-core hacker task and make it bone-headedly simple: install, scan, infiltrate. It provides a wake-up call to Web 2.0 developers that they need to look seriously at security rather than just pay it lip service. And at this task it seems to be doing quite well; already Google has made moves to force SSL for all GMail access and Facebook is mumbling under its breath that they&#8217;re &#8220;looking into it&#8221;.</p>
<p>What scares me about Firesheep is the bone-headedly simple aspect. I won&#8217;t get into the ethics of responsible disclosure of security flaws, but releasing a tool like this that makes such a questionable task as simple as clicking a button is bound to have repercussions. Putting this tool in the hands of everyone means putting it in the hands of <em>everyone,</em> no matter <a title="GPF Archive: Wednesday, August 27, 2008" href="http://www.gpf-comics.com/archive.php?d=20080827">what color hat they wear</a>. Yes, we&#8217;ll hopefully see lots of increase in security at many of the websites we use every day, but how many innocent and ignorant users will be maliciously attacked before those changes occur? The gun was a very useful tool for early pioneers to hunt and protect one&#8217;s family, but it&#8217;s also useful for criminals to steal, coerce, and murder their victims. Technology is inherently amoral; it is people that are moral or immoral.</p>
<p>I won&#8217;t go into the details of how Firesheep works or the many ways it can be easily thwarted. A quick spin by your favorite search engine will likely provide all the information you may need. However, I did want to take a few minutes to publicly analyze the various aspects of this site and the <a title="General Protection Fault" href="http://www.gpf-comics.com/">GPF</a> site and reassure all my readers that your information should be reasonably safe. Right now, it looks like the person most likely to be impacted would be me, directly or indirectly, and the risks are actually pretty darn low.</p>
<p>First up, this site: Firesheep does indeed include information on how to &#8220;hack&#8221; WordPress. <span style="text-decoration: line-through;">Well, how to hack <a title="WordPress.com" href="http://www.wordpress.com/">WordPress.com</a>. Since Neural Core Dump is self-hosted, the built-in attack against WordPress.com hosted blogs won&#8217;t affect us here. However, Firesheep is open source, so it is trivial to modify the code to attack specific domains, so the WordPress.com attack can be tweaked to attack an individual self-hosted WordPress blog.</span> My original assumptions here proved to be incorrect; in looking back over the the Firesheep code, it doesn&#8217;t look specifically for WordPress.com domains, but for common cookie names used by all instances of WordPress, whether it&#8217;s self hosted or not. Thus, any logged-in user here could potentially be exposed. <span style="text-decoration: line-through;">In this case</span> However, this blog&#8217;s small size becomes its advantage; the likelihood that anyone will directly attack it is pretty low, and even then I keep extensive backups and can easily back out malicious comments or posts. (Mind you, being too small should <em>not</em> be used as an excuse not to be concerned, just that the threat can be downplayed for the time being.) I rarely use public, open WiFi hot spots (to be honest, there aren&#8217;t that many of them around where I live), and on the rare case that I do, it&#8217;s easy enough for me to create an SSH tunnel to my home Linux box and proxy all my HTTP traffic through it.</p>
<p>As for GPF, all logins occur over SSL, so no passwords are ever sent in the clear. Of course, Firesheep does not sniff passwords but rather session cookies, so this isn&#8217;t really the problem. I thought of a few scenarios where Firesheep could be used against GPF to varying degrees of success:</p>
<ul>
<li>Perhaps the most susceptible part of the site is the <a title="GPF Forums" href="http://www.gpf-comics.com/forum/">forum</a>. <a title="phpBB" href="http://www.phpbb.com/">phpBB</a> uses session cookies like many of the sites targeted by Firesheep, and is thus theoretically vulnerable. However, phpBB forums reside on the domain of the server they are installed upon and the session cookie names are easily configurable. Thus, attacks would have to be directly targeted against a specific site in order to work. Like the blog here, GPF&#8217;s relatively low profile makes it unlikely to be targeted, although the possibility exists. Also like the blog, I&#8217;m the only one with full admin access, so correcting problems shouldn&#8217;t be too difficult. All admin sessions occur entirely over SSL, and even if I check the box to have the browser remember my login, phpBB forces me to authenticate before granting access to the admin interface.</li>
<li>The <a title="The Official GPF Wiki" href="http://www.gpf-comics.com/wiki/">wiki</a> is currently configured (quite accidentally but fortuitously) to always use SSL during and after login. Thus, any session cookies the wiki may set are only sent over SSL and thus can never be sniffed. This is also moot for now since I&#8217;m the only one with write access to the wiki, but I&#8217;ve been considering giving access to a handful of volunteers to help me maintain it.</li>
<li>The <a title="GPF Store" href="https://www.gpf-comics.com/store/">GPF Store</a> is configured (quite intentionally) to always use SSL, whether you&#8217;re logged in or not.  No vulnerability there.</li>
<li>GPF Premium presents two problems: account creation/management and the day-to-day &#8220;branding&#8221; cookie that enables Premium features.
<ul>
<li>The <a title="GPF Premium: Create an Account" href="https://www.gpf-comics.com/premium/create_account.php">Account Creator</a> and <a title="GPF Premium: Account Manager" href="https://www.gpf-comics.com/premium/manage_account.php">Account Manager</a> always use SSL and do not use session cookies in any way. Their session data is currently stored in an encrypted, hidden form field on the page.  Since these pages never leave SSL, no information is ever sent in the clear. The weakest point of these systems are the user name and password you set. (You <em>did</em> pick a nice, strong password, didn&#8217;t you?)</li>
<li>It is theoretically possible for someone to sniff the Premium &#8220;branding&#8221; and options cookies and thus gain access to Premium features. However, that&#8217;s about all they can do: steal Premium access. These cookies do not let them gain access to your account in any way, and making any form of modification to your account requires login via the encrypted Account Manager. No features in Premium currently use these cookies to provide identity information to the system. (I did consider adding a few features that did, but those are all currently scrapped post-Firesheep.) Furthermore, the branding cookie is tied very closely to your individual browser and operating system, and there are safeguards to prevent tampering with the data and modifying it (like pretending to be an Eternal subscriber when the original cookie is really for a Bronze subscriber). The options cookie is useless without the branding cookie. Thus, the only person standing to lose anything from a sniffed Premium banding cookie is me, and that will only last as long as the cookie validates; even if the cookie thief modifies the cookie&#8217;s expiration date in the browser, embedded data in the cookie will invalidate it when the expiration date in the cookie data itself is reached.</li>
</ul>
</li>
</ul>
<p>Again, GPF&#8217;s probably far too small a target for anyone to really bother with, but the fact is that so little attack surface is visible that the only person likely to be hurt by it is me.</p>
<p>There, I hope I laid all your GPF/Firesheep fears to rest. What was that? The only person really concerned about this was me? Oh&#8230; well, in that case&#8230; um&#8230; never mind, I guess.</p>
<p>UPDATED November 4, 2010: Updated the paragraph about this blog to correct an incorrect assumption about only WordPress.com blogs being affected.</p><div><a class="addthis_button" href="//addthis.com/bookmark.php?v=250" addthis:url='http://www.jeffdarlington.com/2010/11/03/firesheep-gpf-and-neural-core-dump/' addthis:title='Firesheep, GPF, and Neural Core Dump '><img src="//cache.addthis.com/cachefly/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.jeffdarlington.com/2010/11/03/firesheep-gpf-and-neural-core-dump/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cryptnos 1.0 for .NET 2.0</title>
		<link>http://www.jeffdarlington.com/2010/03/23/cryptnos-1-0-for-net-2-0/</link>
		<comments>http://www.jeffdarlington.com/2010/03/23/cryptnos-1-0-for-net-2-0/#comments</comments>
		<pubDate>Tue, 23 Mar 2010 19:36:27 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Cryptnos]]></category>
		<category><![CDATA[WinHasher]]></category>

		<guid isPermaLink="false">http://www.jeffdarlington.com/?p=364</guid>
		<description><![CDATA[In the ongoing spirit of releasing pointless Open Source software, I semi-proudly announce the release of Cryptnos 1.0 for Microsoft .NET 2.0. So what is it? Cryptnos is a secure password generator. By now, I&#8217;m sure many of you have heard of various programs, especially browser plug-ins, that let you generate unique passwords for all [...]]]></description>
			<content:encoded><![CDATA[<p>In the ongoing spirit of releasing pointless Open Source software, I semi-proudly announce the release of <a title="Cryptnos for .NET" href="http://www.gpf-comics.com/dl/cryptnos/dotnet.php">Cryptnos 1.0 for Microsoft .NET 2.0</a>.</p>
<p>So what is it? Cryptnos is a secure password generator. By now, I&#8217;m sure many of you have heard of various programs, especially browser plug-ins, that let you generate unique passwords for all your various online logins. They usually do this by combining the domain name of the site with a master password you supply, then run those inputs through an MD5 hash to give you a &#8220;strong&#8221; password that is unique for that site. Many of these applets also search the page you&#8217;re currently on for the login form and attempt to pre-populate the password box for you. Well, Cryptnos is kind of like that. Only it&#8217;s not.</p>
<p>Like these other apps, Cryptnos generates a password from your master password and from some mnemonic or &#8220;site token&#8221; that you supply. But that&#8217;s where the similarities end. First of all, Cryptnos does not live in your browser, so it can be used for any application where you need a strong password. As a corollary, the mnemonic does not have to be a domain name, although it certainly can be; it can be whatever you want it to be, so long as it is unique and it helps you remember what the password is used for. Next, Cryptnos gives you unparalleled flexibility in how your password is generated. You&#8217;re not stuck using just MD5, a broken cryptographic hash that is horribly out of date and which should no longer be used. You can select from a number of hashing algorithms, as well as how many times the hash should be applied. Crytpnos also uses Base64 rather than hexadecimal to encode the output, meaning your generated passwords can have up to 64 possible options per character instead of 16, making it stronger per character than the other guys. You can further tweak your generated password by limiting the types of characters used (for those times where a site requires you to only use letters and numbers) and the length of your password. Best of all, Cryptnos remembers all of these options for you, storing them in an encrypted state that is nearly impossible to crack. Your master password is <em><strong>NEVER</strong></em> stored, nor are your generated passwords; your passwords are generated on the fly, as you need them, and cleared from memory once the application closes.</p>
<p>Cryptnos originally sprang from the &#8220;Hash Text&#8221; function of <a title="WinHasher" href="http://www.gpf-comics.com/dl/winhasher/">WinHasher</a>, which I used to generate passwords in a similar fashion for a long time. I quickly ran into limitations in using WinHasher this way, especially when it came to sites where I had to tweak the password after it was generated. I thought to myself, &#8220;I&#8217;ll never be able to remember all these tweaks for all these passwords. Why can&#8217;t I just rip this function out of WinHasher and wrap a program around it to let the computer do all the work for me?&#8221; And that&#8217;s exactly what I did. I&#8217;ve been using Cryptnos to generate and &#8220;store&#8221; my passwords for months now and I finally decided it was stable enough to release it to the world at large.</p>
<p>Right now, <a title="Cryptnos" href="http://www.gpf-comics.com/dl/cryptnos/">Cryptnos</a> is only available for Microsoft .NET 2.0, which means by default it runs on Windows. However, I&#8217;m also working on a <a title="Cryptnos for Android" href="http://www.gpf-comics.com/dl/cryptnos/android.php">Google Android version</a>, which means a pure Java implementation should be simple to extract after that. I&#8217;ve even been pursuing a PHP and/or JavaScript implementation that does everything except storing the parameter data. I&#8217;m not sure when any of these will escape from my hard drive, but anyone interested in them can drop me an e-mail and I&#8217;ll happily open a dialog.</p>
<p>Oh, and the name? Um, well, I wanted a better one, but that&#8217;s the only thing I could find that sounded &#8220;passwordy&#8221; that didn&#8217;t have a lot of hits on Google.</p><div><a class="addthis_button" href="//addthis.com/bookmark.php?v=250" addthis:url='http://www.jeffdarlington.com/2010/03/23/cryptnos-1-0-for-net-2-0/' addthis:title='Cryptnos 1.0 for .NET 2.0 '><img src="//cache.addthis.com/cachefly/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.jeffdarlington.com/2010/03/23/cryptnos-1-0-for-net-2-0/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WinHasher 1.6</title>
		<link>http://www.jeffdarlington.com/2010/02/08/winhasher-1-6/</link>
		<comments>http://www.jeffdarlington.com/2010/02/08/winhasher-1-6/#comments</comments>
		<pubDate>Mon, 08 Feb 2010 16:57:21 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[WinHasher]]></category>

		<guid isPermaLink="false">http://www.jeffdarlington.com/?p=356</guid>
		<description><![CDATA[Wow! A non-Twitter digest post! Amazing! This is a quickie to let you guys now I&#8217;ve just released WinHasher 1.6. This is a minor release containing a few cosmetic and minor functional changes, so there&#8217;s no need to upgrade unless the features or bug fixes listed below seem worth the effort. Added a progress indication [...]]]></description>
			<content:encoded><![CDATA[<p>Wow! A non-Twitter digest post! Amazing!</p>
<p>This is a quickie to let you guys now I&#8217;ve just released <a title="WinHasher" href="http://www.gpf-comics.com/dl/winhasher/">WinHasher</a> 1.6. This is a minor release containing a few cosmetic and minor functional changes, so there&#8217;s no need to upgrade unless the features or bug fixes listed below seem worth the effort.</p>
<ul>
<li>Added a progress indication message for all the console applications. Previously, these programs simply went off into lala land when you kicked them off, kind of like the original GUI version did, giving you no indication how far along things have come.  Now the program displays what it&#8217;s doing (&#8220;Computing SHA-1 of&#8230;&#8221;) and then a percentage complete as it works.  Once complete, it displays the resulting hash as it did before. I thought about making the progress indicator &#8220;graphical&#8221; with little periods, hyphens, or equal signs, but the percentage was a lot easier to do (and I&#8217;m lazy).</li>
<li>Added a &#8220;case kludge&#8221; for comparing computed hashes against reference hashes (i.e. digests copied from a website). Typically, most sites will display hashes as a lower-case hexadecimal string, which is why I made that the default. However, I and other users have run into occasions where a download site presents the hash as upper-case hexadecimal. Unfortunately, if you paste this value into the comparison field on either the main WinHasher form or the &#8220;Send To&#8221; result dialog, the comparison will fail simply because the case does not match, even if the actual hash values do. Technically, you can tweak the command line of the &#8220;Send To&#8221; shortcut or change the output type on the main form, but either can be a pain when you know what you expect to see. So I&#8217;ve added a little bit of code that looks at what the comparison expects (i.e. &#8220;I&#8217;m looking for a lower-case hex string&#8221;) and adjusts the case of the comparison field if necessary. This means lower-case hex and Bubble Babble comparisons are forced to lower-case, while upper-case hex is forced to upper-case, no matter what case the original pasted-in string was. In the case of Base64, which includes mixed case characters, the comparison string is compared unaltered. After any case adjustment, the hash comparison occurs as previously designed.</li>
<li>Fixed a bug that wasn&#8217;t displaying the icon correctly within the application itself. Oopsy.</li>
</ul>
<p>For those who don&#8217;t know, WinHasher is a cryptographic hash generator for Microsoft .NET. It is roughly analogous to digest programs on other platforms (such as &#8220;openssl dgst&#8221; from OpenSSL) but designed for Windows and other .NET platforms. It lets you verify the integrity of downloads and determine whether changes have been made to files. It does <em><strong>NOT</strong></em> guarantee the authenticity of a file; for that, use cryptographic signatures such those produced by PGP or GnuPG. It also lets you create hashes of arbitrary text, which is handy for generating strong &#8220;passwords&#8221;, although I&#8217;m working on a different project that will do a much better job of this particular task. [Looks around shifty-eyed.]</p><div><a class="addthis_button" href="//addthis.com/bookmark.php?v=250" addthis:url='http://www.jeffdarlington.com/2010/02/08/winhasher-1-6/' addthis:title='WinHasher 1.6 '><img src="//cache.addthis.com/cachefly/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.jeffdarlington.com/2010/02/08/winhasher-1-6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Need help: Removing old certificate revocation lists in Windows</title>
		<link>http://www.jeffdarlington.com/2009/07/09/need-help-removing-old-certificate-revocation-lists-in-windows/</link>
		<comments>http://www.jeffdarlington.com/2009/07/09/need-help-removing-old-certificate-revocation-lists-in-windows/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 18:50:45 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[.NET]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[client certificate]]></category>
		<category><![CDATA[CRL]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.jeffdarlington.com/?p=260</guid>
		<description><![CDATA[I have a bit of a quandary that&#8217;s got me effectively stuck on a task at my day job. Thus far, Google and every other resource I&#8217;ve searched have been little help. In the unlikely event somebody out there that reads this blog (or at least gets the update notices via RSS, Twitter, or the [...]]]></description>
			<content:encoded><![CDATA[<p>I have a bit of a quandary that&#8217;s got me effectively stuck on a task at my day job. Thus far, Google and every other resource I&#8217;ve searched have been little help. In the unlikely event somebody out there that reads this blog (or at least gets the update notices via RSS, Twitter, or the other various feeds) can help me, I&#8217;m going throw this out and hope it garners some feedback.</p>
<p>I&#8217;ll try to keep this as short as possible. Our production Web site, built in ASP.NET and C# and running in IIS on Windows Server 2003, recently added authentication via client certificates stored on users&#8217; smart cards. We allow users to attach their smart card certificates to their existing account, then authenticate them by verifying their certificate, looking up the user account by that certificate&#8217;s fingerprint, and loading their profile. These certificates are signed by a trusted third-party certificate authority (CA) owned by the client and every morning we download the latest certificate revocation lists (CRLs) so we can reject certificates as they are revoked by the CA. My download process is working fine and dandy, so that&#8217;s not the problem; neither is the actual import process, as I know the command line options for Microsoft&#8217;s <code>certutil</code> command that will import the CRLs.</p>
<p>My problem stems from removing the <em>old</em> CRLs, which so far I haven&#8217;t been able to accomplish without going into the Microsoft Management Console and clicking through the GUI. We&#8217;ve had problems with the size of the certificate store, as the CRLs tend to be very large and we have to remove the old ones before the new ones can be imported. I&#8217;ve tried the few suggestions I&#8217;ve found online that haven&#8217;t seemed to work, such as a command-line switch for <code>certutil</code> that&#8217;s supposed to overwrite the old CRL with the new one (it just imports the new one and leaves the old one in place). We want to automate this process into a scheduled task, so it can run early in the morning when our users aren&#8217;t on the system and without human intervention.</p>
<p>Here are the tools available to me:</p>
<ul>
<li>As previously stated, <code>certutil</code> (part of Microsoft&#8217;s Certificate Services package);</li>
<li>Windows PowerShell;</li>
<li>Anything I can throw into a .NET assembly and build an executable out of (preferably C# code);</li>
<li>Good old fashioned batch files.</li>
</ul>
<p>I&#8217;ll tell you, I&#8217;m pretty frustrated and exhausted by this task. It&#8217;s not that I can&#8217;t do the research and figure it out for myself; I <em>have</em> done the research, and everything I&#8217;ve read applies to certificates and not CRLs, and they&#8217;re not exactly a direct swap in usage. I&#8217;d prefer not to provide much more detail than this for security reasons.</p>
<p>For the time being, I&#8217;ve been manually removing the old CRLs through MMC and then running a batch script to do the import every morning as my first task. That&#8217;s working fine for now, when I&#8217;m in the office every morning, but I&#8217;ll be taking some vacation time soon that will start to cause problems. I swear, if this was OpenSSL and Apache on Linux, I&#8217;d have this solved in a heartbeat (or at least an afternoon). If you have any suggestions, please feel to post a comment or shoot me a direct e-mail at the usual address.</p><div><a class="addthis_button" href="//addthis.com/bookmark.php?v=250" addthis:url='http://www.jeffdarlington.com/2009/07/09/need-help-removing-old-certificate-revocation-lists-in-windows/' addthis:title='Need help: Removing old certificate revocation lists in Windows '><img src="//cache.addthis.com/cachefly/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.jeffdarlington.com/2009/07/09/need-help-removing-old-certificate-revocation-lists-in-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Look, Ma! I&#8217;m on Security Now!</title>
		<link>http://www.jeffdarlington.com/2008/07/14/look-ma-im-on-security-now/</link>
		<comments>http://www.jeffdarlington.com/2008/07/14/look-ma-im-on-security-now/#comments</comments>
		<pubDate>Mon, 14 Jul 2008 14:54:52 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[cookie]]></category>
		<category><![CDATA[DoubleClick]]></category>
		<category><![CDATA[podcast]]></category>
		<category><![CDATA[Security Now]]></category>
		<category><![CDATA[Steve Gibson]]></category>
		<category><![CDATA[TWiT]]></category>

		<guid isPermaLink="false">http://www.jeffdarlington.com/?p=148</guid>
		<description><![CDATA[I hope to post more on this when there&#8217;s more data to post, but I thought I&#8217;d throw up a quick note stating that the latest episode of the Security Now! &#8220;netcast&#8221; features a question posed by yours truly. (The best part was listening to Leo Laporte stumble over my long-winded rambling. ) The high-quality [...]]]></description>
			<content:encoded><![CDATA[<p>I hope to post more on this when there&#8217;s more data to post, but I thought I&#8217;d throw up a quick note stating that the <a title="Security Now! #152 (TWiT.tv)" href="http://twit.tv/sn152">latest episode of the Security Now! &#8220;netcast&#8221;</a> features a question posed by yours truly. (The best part was listening to Leo Laporte stumble over my long-winded rambling. <img src='http://www.jeffdarlington.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ) The high-quality version of the show can be found at the previous link; a low-bandwidth version as well as a text-only transcript can be found at the <a title="Security Now! #152 (GRC.com)" href="http://www.grc.com/sn/sn-152.htm">corresponding page at GRC.com</a>. A search in the transcript for &#8220;Darlington&#8221; will take you to the beginning of my question; in the netcast, it starts around 38 minutes, 22 seconds in. (Of course, I encourage everyone to read/listen to the entire thing.)</p>
<p>For the full effect, though, you&#8217;ll also need to listen to/read the previous two non-Q&amp;A episodes of the show, <a title="Security Now! #149 (TWiT.tv)" href="http://twit.tv/sn149">#149</a> and <a title="Security Now! #151 (TWiT.tv)" href="http://twit.tv/sn151">#151</a>. (Low-bandwidth and trascriptions can be found <a title="Security Now! #149 (GRC.com)" href="http://www.grc.com/sn/sn-149.htm">here</a> and <a title="Security Now! #151 (GRC.com)" href="http://www.grc.com/sn/sn-151.htm">here</a>.) The entire dialog concerns the recent trend of <a title="Internet service provider article on Wikipedia" href="http://en.wikipedia.org/wiki/Internet_service_provider">ISPs</a> selling out their customers to allow third-party advertisers to come in and install hardware at the ISP to facilitate tracking the ISPs&#8217; customers&#8217; surfing habits across sites. While the ad companies in question claim to not be recording personally identifyable information about the ISPs&#8217; customers, the capability is there and the possibilities for abuse are enormous. It brings back many shades of the <a title="DoubleClick article on Wikipedia" href="http://en.wikipedia.org/wiki/DoubleClick">DoubleClick</a> controversies of the late 1990s-early 2000s, only much more ominous. I provided a unqiue standpoint to the discussion: that of a Web developer hosting a site and encountering similiar mysterious &#8220;first party&#8221; cookies set for my domain but not set by me.</p>
<p>The full body my question is present, but I&#8217;m not completely satisfied with the answer. <img src='http://www.jeffdarlington.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' />  Let&#8217;s just say I think Steve Gibson made an assumption about the <a title="General Protection Fault" href="http://www.gpf-comics.com/">GPF</a> site that&#8217;s not 100% true. I&#8217;ve replied to his response with additional information. I don&#8217;t necessarily expect another response (he does, after all, have his own agenda to follow on <em>his</em> show), and even if he does it will likely be in episode #154, the next scheduled Q&amp;A episode. If anyone is interested, I&#8217;ll post updates if and when this occurs. If I don&#8217;t get a response, I&#8217;ll post my response here, especially since it contains some disturbing observations about &#8220;first party&#8221; cookies that have mildly paranoid folks like me nervous. (I&#8217;d hate to see what it does to <em>really</em> paranoid people.)</p><div><a class="addthis_button" href="//addthis.com/bookmark.php?v=250" addthis:url='http://www.jeffdarlington.com/2008/07/14/look-ma-im-on-security-now/' addthis:title='Look, Ma! I&#8217;m on Security Now! '><img src="//cache.addthis.com/cachefly/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.jeffdarlington.com/2008/07/14/look-ma-im-on-security-now/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Cookie cunundrum</title>
		<link>http://www.jeffdarlington.com/2008/02/06/cookie-cunundrum/</link>
		<comments>http://www.jeffdarlington.com/2008/02/06/cookie-cunundrum/#comments</comments>
		<pubDate>Wed, 06 Feb 2008 15:07:20 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[GPF]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[cookies]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[HTTPS]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.jeffdarlington.com/2008/02/06/cookie-cunundrum/</guid>
		<description><![CDATA[By now, I&#8217;m assuming most of you have read Mondays GPF News item. (If you haven&#8217;t, shame on you.) GPF is leaving Keenspot, and I&#8217;m neck-deep in unit testing the new site with hopes of releasing it to beta testers soon. If you&#8217;re interested in beta testing, you can volunteer in this thread on the [...]]]></description>
			<content:encoded><![CDATA[<p>By now, I&#8217;m assuming most of you have read <a href="http://www.gpf-comics.com/news/d/20080204.html" title="GPF News: Monday, February 4, 2008">Mondays GPF News item</a>. (If you haven&#8217;t, shame on you.) <a href="http://www.gpf-comics.com/" title="General Protection Fault">GPF</a> is leaving <a href="http://www.keenspot.com/" title="Keenspot">Keenspot</a>, and I&#8217;m neck-deep in unit testing the new site with hopes of releasing it to beta testers soon. If you&#8217;re interested in beta testing, you can volunteer in <a href="http://forums.keenspot.com/viewtopic.php?t=100407" title="Keenspot Forums: Volunteering for beta-testing new site location">this thread on the old forum</a>.</p>
<p>However, I&#8217;ve hit upon one little programming snag, so I thought I&#8217;d put out an appeal for help. I thought the blog would be more appropriate venue for this than the forum; that assumption could be wrong, but I&#8217;ll go with it anyway. For those of you with some Web-based programming knowledge, especially in the areas of <a href="http://www.php.net/" title="PHP">PHP</a> and <a href="http://en.wikipedia.org/wiki/HTTP_cookie" title="HTTP cookie article on Wikipedia">cookies</a>, please put on your thinking caps.</p>
<p>As part of the new site, I&#8217;m implementing my own version of Keenspot&#8217;s PREMIUM service, reusing the old relabeling of GPF Premium. Keenspot PREMIUM is going away (for several reasons I won&#8217;t go into here), but as the service&#8217;s biggest proponent and largest beneficiary, I&#8217;d hate to lose that functionality. So the new site will launch with its own independent Premium functionality including all the old service&#8217;s features (optional ad-free surfing, weekly archives, High-Def archives, tons of exclusives like Jeff&#8217;s Sketchbook, etc.) plus a few new features that I&#8217;ve been wanting to implement but haven&#8217;t had the time or technological hoop-jumping expertise to work on at Keen.</p>
<p>For security reasons, I want to secure Premium sign-ups and account management via secure <a href="http://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol" title="Hypertext Transfer Protocol article on Wikipedia">HTTP</a> (<a href="http://en.wikipedia.org/wiki/Https" title="HTTPS article on Wikipedia">HTTPS</a>). The benefits should be obvious. By encrypting account creation &amp; management pages, you eliminate <a href="http://en.wikipedia.org/wiki/Packet_sniffer" title="Packet sniffer article on Wikipedia">sniffing attacks</a> and protect user privacy. While these pages may still be susceptible to other forms of attacks (and I&#8217;ve coded them to be as resilient as I know how), encrypting the traffic end-to-end can go a long way to cutting off those vectors of attack.</p>
<p>However, I seem to have hit a brick wall when it comes to setting the Premium authentication cookie. Like Keenspot&#8217;s implementation, the subscriber&#8217;s browser will be &#8220;enabled&#8221; by &#8220;branding&#8221; it with a cookie, which will be read and authenticated each time the page is loaded. If valid, Premium features for that page will be turned on; if invalid, the page will default to a non-enabled state, which could be a simple as showing all ads or as complex as denying access to the content within. Unlike Keenspot&#8217;s implementation, which was <a href="http://en.wikipedia.org/wiki/JavaScript" title="JavaScript article on Wikipedia">JavaScript</a> based, mine is scripted server-side in PHP, meaning it should be more accessible to a wider range of browsers and in theory more secure (no Premium content is sent at all if Premium is not enabled, rather than letting the client browser decide). My implementation has been thoroughly tested and appears to work pretty much flawlessly&#8230; with one hitch.</p>
<p>The problem occurs when I set the cookie over the encrypted HTTPS connection, then try to read it over unencrypted HTTP. I appears that none of my test browsers send the cookie back when the encryption state changes. The reverse is the same; if I change the URL and set the cookie over HTTP, then try to access a page via HTTPS, the encrypted page can&#8217;t see the cookie either. It works like an either-or situation, when what I really want is both. If I set a cookie over HTTPS, I want to see it in both HTTP and HTTPS mode.</p>
<p>PHP&#8217;s primary cookie interface is the <a href="http://www.php.net/manual/en/function.setcookie.php" title="PHP Manual: setcookie"><code>setcookie()</code></a> method (for setting) and the <a href="http://www.php.net/manual/en/reserved.variables.php" title="PHP Manual: Predefined Variables"><code>$_COOKIE</code> array</a> (for reading). <code>setcookie()</code> includes a <a href="http://en.wikipedia.org/wiki/Boolean_logic" title="Boolean logic article on Wikipedia">boolean</a> parameter for secure cookies, i.e. cookies that will only be sent via HTTPS. What&#8217;s annoying is that even when I set this flag to false to force it to be insecure, the scripts continue to exhibit the same behavior: cookies set via HTTP can only be read via HTTP and vice versa. I&#8217;ve also tried setting the same cookie both ways&#8211;first in one protocol, then the other, without erasing the first cookie&#8211;but that didn&#8217;t seem to work. The second cookie overwrites the first one, effectively turning it off.</p>
<p>I had heard that <a href="http://en.wikipedia.org/wiki/Internet_Explorer" title="Internet Explorer article on Wikipedia">IE</a> 6 exhibited this behavior as a bug. However, I tried the exact same tests in <a href="http://www.mozilla.com/en-US/firefox/" title="Firefox">Firefox</a> 2.0.0.11, <a href="http://www.opera.com/" title="Opera">Opera</a> 9.24, and <a href="http://www.apple.com/safari/download/" title="Safari">Safari</a> 3.0.4 (all on <a href="http://en.wikipedia.org/wiki/Microsoft_Windows" title="Microsoft Windows article on Wikipedia">Windows</a>) as well as IE 7, and all reacted the same way. Cookies set over HTTP could not be read over HTTPS and vice versa. It&#8217;s a bit frustrating. Obviously, I don&#8217;t want my Premium folks to be forced to use the new site in encrypted mode all the time, as this would slow down all the pages and put a significant extra load on the server as the number of subscribers increases. But I want to protect my users&#8217; privacy and settings (and one of my important revenue streams) by encrypting their account access.</p>
<p>So I guess I&#8217;m looking for answers to two questions:</p>
<ol>
<li>Is this some new standard of behavior that I&#8217;m missing? I was operating under the assumption that secure cookies (those set with the boolean secure flag) were restricted to HTTPS, but otherwise all other cookies should be sent regardless of whether it was encrypted or not. When I use the awesome Firefox <a href="http://chrispederick.com/work/web-developer/" title="Web Developer">Web Developer plugin</a>, it tells me that the cookie <em>should</em> be there regardless of the encrypted state. Yet it still doesn&#8217;t get sent. But am I asking too much? Am I not understanding the specifications, or has something changed that I wasn&#8217;t aware of? Can I not have my cake and eat it too?</li>
<li>
<ol style="list-style-type: lower-alpha">
<li>If I&#8217;m right and this <em>should</em> be working, what am I doing wrong? Is there a feature of PHP I should be use other than setcookie() to do this? Is it a bug, either in PHP or the browsers?</li>
<li>If I&#8217;m wrong and this behavior is expected, is there a workaround I can use to let the same Premium features work over both HTTP and HTTPS? Or should I just give up on the encrypted account management and assume my stuff isn&#8217;t worth stealing enough to bother?</li>
</ol>
</li>
</ol>
<p>Any responses via e-mail or (preferred) comments below will be appreciated.</p>
<p><em>Update March 5, 2008:</em> Thanks to the input of many commentors below, it looks like I&#8217;ve got a solution. The problem, as usual, was somewhere between the chair and the keyboard and the faulty component has been sufficiently flogged with a wet noodle. Immense thanks to everyone who provided feedback and suggestions.</p><div><a class="addthis_button" href="//addthis.com/bookmark.php?v=250" addthis:url='http://www.jeffdarlington.com/2008/02/06/cookie-cunundrum/' addthis:title='Cookie cunundrum '><img src="//cache.addthis.com/cachefly/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.jeffdarlington.com/2008/02/06/cookie-cunundrum/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Disturbing: PayPal in cahoots with DoubleClick?</title>
		<link>http://www.jeffdarlington.com/2007/11/27/disturbing-paypal-in-cahoots-with-doubleclick/</link>
		<comments>http://www.jeffdarlington.com/2007/11/27/disturbing-paypal-in-cahoots-with-doubleclick/#comments</comments>
		<pubDate>Tue, 27 Nov 2007 16:52:57 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[cookie]]></category>
		<category><![CDATA[DoubleClick]]></category>
		<category><![CDATA[PayPal]]></category>
		<category><![CDATA[Security Now]]></category>
		<category><![CDATA[Steve Gibson]]></category>
		<category><![CDATA[TWiT]]></category>

		<guid isPermaLink="false">http://www.jeffdarlington.com/2007/11/27/disturbing-paypal-in-cahoots-with-doubleclick/</guid>
		<description><![CDATA[I don&#8217;t usually do link-and-run posts (I prefer to have actual content in a blog), but I thought this was disturbing enough to disseminate. I&#8217;ll probably add my own blathering commentary which will make it more than a link-and-run post anyway. (After all, I know all of you who come here really come for the [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t usually do link-and-run posts (I prefer to have actual <em>content</em> in a blog), but I thought this was disturbing enough to disseminate. I&#8217;ll probably add my own blathering commentary which will make it more than a link-and-run post anyway. (After all, I know all of you who come here <em>really</em> come for the blathering. I&#8217;m just so blatherful&#8230;.)</p>
<p>I&#8217;m not sure how many of you out there follow the <a href="http://www.twit.tv/sn" title="The TWiT Netcast Network: Security Now!">Security Now!</a> podcast over at <a href="http://www.twit.tv/" title="The TWiT Netcast Network">TWiT</a>, but it&#8217;s probably obvious by now that I do, given <a href="http://www.jeffdarlington.com/2007/11/07/roaming-authentication-with-apache-mod_rewrite/" title="Roaming authentication with Apache mod_rewrite, November 7th, 2007">recent</a> <a href="http://www.jeffdarlington.com/2007/10/31/wordpress-security-tweaks/" title="WordPress security tweaks, October 31st, 2007">posts</a>. This past week&#8217;s episode, <a href="http://www.twit.tv/sn119" title="TWiT: Security Now! #119">#119</a>, exposes a rather unsettling fact that shouldn&#8217;t be ignored.  (The high quality 64kbps MP3 can be found at that link, while a 16kbps MP3, a transcript in various formats, and additional notes can be found <a href="http://www.grc.com/SecurityNow.htm#119" title="GRC | Security Now!">here</a>.) While I encourage you to download and listen/read the facts for yourself, I&#8217;ll see if I can summarize it below for the attention-span impaired.</p>
<p>For a long time, I&#8217;ve defended <a href="https://www.paypal.com/" title="PayPal">PayPal</a> as a method of monetary transfer. They&#8217;ve always been good to me personally, even during the stormy periods where some <a href="http://www.gpf-comics.com/" title="General Protection Fault">GPF</a> readers boycotted them for &#8220;questionable&#8221; practices. (See the <a href="http://en.wikipedia.org/wiki/PayPal" title="PayPal article on Wikipedia">PayPal Wikipedia entry</a> for an abbreviated history.) For that matter, many online comics wouldn&#8217;t be able to monetize themselves in <em>any</em> fashion if it weren&#8217;t for PayPal, as many webcomics use the service for donations and online stores. (PayPal has always been an acceptable form of payment in every incarnation of the <a href="https://www.jeffdarlington.com/store/" title="The Official GPF Store">GPF Store</a>.) They&#8217;ve always had issues with customer service, but they&#8217;ve also been champions in <a href="http://en.wikipedia.org/wiki/Phishing" title="Phishing article on Wikipedia">anti-phishing</a> campaigns.</p>
<p>But Steve Gibson and Leo Laporte have helped disclose a rather shady new practice: In a previous Security Now! episode, a listener mentioned problems downloading a software service from PayPal, only to discover that the download link was sending him to a server over at <a href="http://www.doubleclick.com/" title="DoubleClick.com">DoubleClick</a> rather than PayPal. Since he was locally blocking access to the domain &#8220;doubleclick.net&#8221; in his <a href="http://en.wikipedia.org/wiki/Hosts_file" title="Hosts file article on Wikipedia">hosts file</a>, the link failed and the software would not download. Gibson promised to investigate the incident and after a number of side-tracks finally presented his results.</p>
<p>DoubleClick, for the few out there unfamiliar with it, is one of the Internet&#8217;s largest online advertising agencies, serving ad banners to millions of Web sites (including, indirectly, GPF). DoubleClick has long been unpopular among netizens for its questionable policies of tracking Web surfers across multiple sites, using a trick with <a href="http://en.wikipedia.org/wiki/HTTP_cookie#Privacy_and_third-party_cookies" title="Privacy and third-party cookies section of the HTTP Cookie Wikipedia article">tracking cookies</a> to follow you from site to site. Privacy concerns were raised even further when <a href="http://www.google.com/" title="Google">Google</a>, a company that itself stores and indexes a lot of personal information about its users of GMail, Ad-Sense, and other services, recently purchased DoubleClick. DoubleClick eventually bowed to pressure from the Net at large and created an <a href="http://www.doubleclick.com/privacy/dart_adserving.aspx" title="DoubleClick.com: Privacy: Dart Ad Serving: Opt-Out">opt-out page</a> so their tracking cookie would contain &#8220;non-personally-identifiable information&#8221; and thus negate some of the tracking cookie&#8217;s effectiveness. (This opt-out page is still linked to (now indirectly, as the URL has changed) from the <a href="http://www.gpf-comics.com/privacy.html" title="GPF: Privacy Statement and Ad Info">GPF privacy policy page</a>.) Many folks these days, however, including myself, simply run <a href="http://en.wikipedia.org/wiki/Spyware" title="Spyware article on Wikipedia">spyware</a> scanners like <a href="http://www.safer-networking.org/" title="Spybot: Search &amp; Destroy">Spybot: Search &amp; Destroy</a> or<a href="http://www.lavasoftusa.com/" title="Lavasoft"> Ad-Aware</a> and periodically delete such tracking cookies, or just block the &#8220;doubleclick.net&#8221; domain and its subdomains using the hosts file trick mentioned above. (This is how, in part, Spybot&#8217;s immunization against cookies works.) This eliminates or at least minimizes the opportunity for your Web surfing habits to be linked personally to you.</p>
<p>However, PayPal&#8217;s new links bypass many of these anti-drive-by-cookie-ing techniques by sending you directly to DoubleClick&#8217;s servers, rather than inlining content like Flash or images from their site. Since these are internal PayPal URLs and not links that are expected to send you to the outside, they should be immediately suspicious. What&#8217;s even worse is that if you examine the URL closely, there appears to be some sort of &#8220;user ID&#8221; like number included that may personally identify you if you click on it. What&#8217;s even <em>more</em> disturbing is the number of these links you run across as you surf the PayPal site; while some obviously ad-like images contain the &#8220;doubleclick.net&#8221; URL, many links in the site bar that look like ordinary navigational links contain it as well. While Gibson points out&#8211;quite rightly&#8211;that there is no evidence to support any sort of conspiracy theories that many come to mind, it <em>is</em> obvious enough that <em>some</em> sort of information sharing is going on between the two companies, and that if a unique user identifier is indeed being passed along with the URL, there&#8217;s a likelihood that both companies can link your potential spending habits with PayPal to your surfing habits tracked by DoubleClick.</p>
<p>Now it&#8217;s easy to be alarmist and to say everyone should boycott PayPal. Unfortunately, so many of us in webcomics depend on PayPal for survival, so there&#8217;s no way we can easily remove ourselves from it. And there&#8217;s no competitor out there with enough critical mass to really challenge PayPal for dominance, so there aren&#8217;t many viable alternatives. Thus the only current immunization option is diligent observation.</p>
<p>The good news is that the DoubleClick URLs within PayPal&#8217;s site all contain at the end PayPal URL you will eventually be redirected to. It&#8217;s trivial to copy the URL, paste it into your address bar, crop out the DoubleClick portion, and go directly the the PayPal internal destination. Laporte even suggested that it won&#8217;t be long before someone comes up with a <a href="http://www.mozilla.com/firefox/" title="Firefox">Firefox</a> <a href="https://addons.mozilla.org/en-US/firefox/" title="Firefox Add-ons">plugin</a> that does that for you on the fly. The problem I see with this is that it won&#8217;t be long before the diabolical duo figures out savvy users are bypassing the links and they find a better way to obscure the redirection target URL so the copy/paste/edit trick will no longer work. While true encryption might be a bit too much server load for them to handle <em>en masse,</em> a simple ROT13 or Base64 encode might be enough to thwart all but the most stalwart gearheads.</p>
<p>So&#8230; should <em>you</em> avoid PayPal? That&#8217;s up to you. I <em>can&#8217;t,</em> but I&#8217;ll be a lot more careful of where I click on their site from now on.</p><div><a class="addthis_button" href="//addthis.com/bookmark.php?v=250" addthis:url='http://www.jeffdarlington.com/2007/11/27/disturbing-paypal-in-cahoots-with-doubleclick/' addthis:title='Disturbing: PayPal in cahoots with DoubleClick? '><img src="//cache.addthis.com/cachefly/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.jeffdarlington.com/2007/11/27/disturbing-paypal-in-cahoots-with-doubleclick/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Roaming authentication with Apache mod_rewrite</title>
		<link>http://www.jeffdarlington.com/2007/11/07/roaming-authentication-with-apache-mod_rewrite/</link>
		<comments>http://www.jeffdarlington.com/2007/11/07/roaming-authentication-with-apache-mod_rewrite/#comments</comments>
		<pubDate>Wed, 07 Nov 2007 21:25:59 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[authentication]]></category>
		<category><![CDATA[cookie]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[Security Now]]></category>
		<category><![CDATA[Steve Gibson]]></category>
		<category><![CDATA[TWiT]]></category>

		<guid isPermaLink="false">http://www.jeffdarlington.com/2007/11/07/roaming-authentication-with-apache-mod_rewrite/</guid>
		<description><![CDATA[I mentioned last week that I was working on a neat Apache mod_rewrite trick for locking down access to certain administration pages, but that I wasn&#8217;t having much success with it. Well, it seems to be working now and, as promised, I wanted to share it with anyone who might be interested. Fair warning to [...]]]></description>
			<content:encoded><![CDATA[<p>I <a href="http://www.jeffdarlington.com/2007/10/31/wordpress-security-tweaks/" title="WordPress security tweaks, October 31st, 2007">mentioned last week</a> that I was working on a neat <a href="http://httpd.apache.org/" title="Apache Web server">Apache</a> <a href="http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html" title="mod_rewrite documentation"><code>mod_rewrite</code></a> trick for locking down access to certain administration pages, but that I wasn&#8217;t having much success with it. Well, it seems to be working now and, as promised, I wanted to share it with anyone who might be interested. Fair warning to non-technical readers: extreme geekery lies ahead.</p>
<p>First and foremost, I can&#8217;t claim full credit for this idea. It borrows some from <a href="http://www.grc.com/default.htm" title="Gibson Research Corporation">Steve Gibson</a>&#8216;s roaming authentication scheme outlined in episode #113 of the <a href="http://www.grc.com/SecurityNow.htm" title="GRC | Security Now!">Security Now! podcast</a>. In that show (and subsequently continued in episode #115), Gibson outlines his method of allowing his employees to access secure portions of his site while traveling. The method described here is not quite as secure as his, as I&#8217;m forcing things to happen at the Web server software layer as opposed to the application layer and thus don&#8217;t have the same fine granularity of control he has. However, it uses many of the same ideas.</p>
<p>It&#8217;s relatively easy with <code>mod_rewrite</code> to protect certain resources of a site by restricting access to certain IP addresses. Consider the following:</p>
<blockquote><p><code>RewriteCond %{REQUEST_URI}   ^/store/admin/.*<br />
RewriteCond %{REMOTE_ADDR} !^192\.168\.13\.<br />
RewriteCond %{REMOTE_ADDR} !^127\.0\.0\.1$<br />
RewriteRule ^/store/admin/.* /store/ [R,L]</code></p></blockquote>
<p>This rule set essentially says: (1) if the requested URL starts with the string &#8220;/store/admin/&#8221; and (2) the IP address of the requesting client does not begins with &#8220;192.168.13.&#8221; or (3) is not exactly &#8220;127.0.0.1&#8243; then (4) redirect all requests for URLs starting with &#8220;/store/admin/&#8221; to the root URL of the store, &#8220;/store/&#8221;. Essentially, we&#8217;re only allowing access to what is apparently the administrative portions of an online store to a very limited number of IP addresses, one of which is fully qualified (the &#8220;loop-back&#8221; address of 127.0.0.1) and the rest belonging to a range (192.168.13.0 through 192.168.13.255). Anyone outside these IPs will be transparently redirected to the front page of the store. (Redirecting is much friendlier than outright forbidding access.) All of this takes place in Apache itself, before we even get to the application and any potential security flaws it might have. There are no worries about hacking the store software itself to deny access.  Of course, we can list any number of <code>REMOTE_ADDR</code> entries that we wish; each condition is a regular expression (which are negated here by the &#8220;bang&#8221; at the front) so we can filter on any octet we want and can easily specify real, outside IPs rather than private ones. For example, for this site I limit access to my various admin sections to the IP of my cable modem and our outside IP at work.</p>
<p>However, what happens when you are required to go on a trip and need to access the administrative parts of the site while on the go? Obviously, you can&#8217;t add the hotel&#8217;s outside IP to this rule set in advance (imagine asking the front desk for <em>that</em> information), and you probably won&#8217;t be able to add it easily once you get there. Sure, <a href="http://wordpress.org/" title="WordPress">WordPress</a> and the store front software have login security on their various admin interfaces, but we&#8217;re trying to protect those from hackers, right? Aside from reopening them to the entire Internet before the trip and closing them again once we get back, there aren&#8217;t very many options. How then can we identify approved &#8220;roaming&#8221; users and/or machines so they can access the admin sites without being inside a hard-coded list of IPs?</p>
<p>Gibson&#8217;s answer was to optionally set a secure cookie in the user&#8217;s browser if they access the admin site within one of the approved IPs first. Being within an approved IP, they aren&#8217;t restricted by the access rule and they are allowed to reach the login prompt. During login, they are prompted on whether or not they want to enable roaming access on this particular machine. If they agree, a secure cookie is set in the browser and set to expire at some date in the future. Later, when the user attempts to access the admin site outside of the approved IP list, the site checks to see if the cookie has been set. If present, the user is allowed to log in, just as if they were within one of the approved IPs. The cookie acts as a kind of two-factor authentication: the first factor being &#8220;something you know&#8221;, the user name and password, and the second being &#8220;something you have&#8221;, the cookie. Since the cookie is set in secure mode (HTTPS), it will only be sent back to the site over a secure connection. And since (well behaved) browsers only allow a site to read the cookies it has itself set, no other site should be able to read it.</p>
<p>This is all well and good&#8230; <em>if</em> you have access to the source of the application you&#8217;re trying to secure and you&#8217;re willing to hack it. Gibson wrote his own store front, so this was relatively easy for him to integrate. But I want to secure WordPress, a third-party store app, and a few random subdirectories that are pretty much statically built HTML. As much as I like running Open Source software, I usually prefer not to muck around with things if I can help it, lest I screw something up. Thus, I don&#8217;t particularly want to hack WP and the store to add this extra layer of functionality. Fortunately, though, <code>mod_rewrite</code> gives us a mechanism through which we can accomplish basically the same thing without modifying the underlying application. In theory, since all this occurs <em>before</em> we even reach the application, one could argue it may even be <em>more</em> secure than the application&#8217;s authentication mechanisms themselves.</p>
<p>You can actually set browser cookies via <code>mod_rewrite</code> rules. Consider what happens if we insert the following before the rules we defined above:</p>
<blockquote><p><code>RewriteCond %{REMOTE_ADDR} ^192\.168\.13\.<br />
RewriteCond %{HTTP_COOKIE} "!</code><code>(.+; )*admincookie=uniqueval(; .+)*"</code><br />
<code> RewriteRule .* - [CO=admincookie:uniqueval:.domainname.tld:43200:/store/]</code></p></blockquote>
<p>This rule set essentially says: (1) if the remote IP starts with &#8220;192.168.13.&#8221; and (2) there isn&#8217;t a cookie already set by the name &#8220;admincookie&#8221; then (3) set a cookie named &#8220;admincookie&#8221; with the value &#8220;uniqueval&#8221; for the domain &#8220;.domainname.tld&#8221; (assuming that&#8217;s our real domain name) for a period of 30 days (60 minutes x 24 hours x 30 days = 43,200 minutes) restricted to the path &#8220;/store/&#8221; and its subdirectories. Now let&#8217;s modify the rule set from before:</p>
<blockquote><p><code>RewriteCond %{REQUEST_URI}   ^/store/admin/.*<br />
RewriteCond %{REMOTE_ADDR} !^192\.168\.13\.<br />
RewriteCond %{REMOTE_ADDR} !^127\.0\.0\.1$<br />
RewriteCond %{HTTP_COOKIE} "!(.+; )*admincookie=uniqueval(; .+)*"<br />
RewriteRule ^/store/admin/.* /store/ [R,L]</code></p></blockquote>
<p>Note that we&#8217;ve added a new condition. In addition to checking for the approved IP list, we also check to see if the &#8220;admincookie&#8221; has been set and that its value is what we expect (&#8220;uniqueval&#8221;). Note the parenthetical parts at the beginning and end of the cookie regex; these should make sure we match the unique cookie name/value pair, regardless of how many cookies are present. (Also note the quotes around this regex; since whitespace delimits the parts of the rewrite statements, the quotes are required to include the spaces after the semicolons in the regex. Without the quotes, the regex produces a &#8220;bad flag delimiters&#8221; error when Apache parses the configuration file.) Since each approved item&#8217;s entry is negated, the rule is only applied if none of them match. So now we should be able to get into the site remotely if and only if we&#8217;re inside an approved IP or we have the secret cookie, which we know is only set if we&#8217;ve been in one of the approved IPs first. Instant roaming authentication!</p>
<p>To summarize, the primary advantages to this scheme are:</p>
<ul>
<li>Restricts access to specific requested URIs to specific IP addresses and/or ranges and to machines outside those addresses that have a special roaming authentication cookie.</li>
<li>The roaming cookie can only be set from within one or more of the authorized IPs.</li>
<li>The cookie is set and checked at the Web server level, before the request reaches application code, so this scheme can be placed on top of third-party applications as an additional layer of security. No changes to the application layer are required.</li>
</ul>
<p>There are, of course, a few caveats:</p>
<ul>
<li>Based on these rules alone, none of the information transmitted back and forth is encrypted; it&#8217;s all sent in the clear, which may potentially be sniffed by a man in the middle. Then again, you can always use <code>mod_rewrite</code> to force certain URLs to always use SSL (assuming you have a secure certificate), thereby securing the connection first. All WP admin functions, the <a href="https://www.jeffdarlington.com/store/" title="GPF Store">GPF Store</a>, and my other secured admin locales here on this site are all secured via SSL, so that helps in keeping my site secure by eliminating sniffing. (Of course, if you go this route, don&#8217;t forget to copy any necessary rules from the main Apache configuration file to the SSL config file, as the secure site will be treated as a different virtual host with its own set of rewriting rules. This little hiccup is what was keeping me from publishing this for quite a while.)</li>
<li>Forcing SSL, however, doesn&#8217;t necessarily protect the cookie itself. Gibson&#8217;s roaming authentication cookie required an SSL connection. This is called a secure mode cookie. While I&#8217;m still doing research into this, as far as I can tell so far <code>mod_rewrite</code> does not have the facility to specify secure mode in a cookie set by a rewrite rule. Thus, the above cookie is <em>not</em> secure and will be sent with each request in or below the specified path, encrypted or not. The cookie is then theoretically susceptible to sniffing attacks. Setting a secure mode cookie is easy enough to do in application code, but not apparently so in <code>mod_rewrite</code>.</li>
<li>The value of the cookie is currently hard-coded to a set value, and every browser accessing it within the approved IP will receive the same hard-coded cookie value. Ideally, the cookie should be unique to each browser and somehow obscured or, better yet, encrypted. Unfortunately, while I&#8217;ve been researching this also, so far I haven&#8217;t come up with a way to create such a unique token natively within <code>mod_rewrite</code>. (Remember, all this is occurring in Apache before we even reach application code.) Right now, <strike>I&#8217;m using a rather large hash of a unique pass phrase string</strike> I use a small command-line script to create a very long, highly random string using random numbers, several hashes, a little bit of Blowfish encryption, and some random string manipulation, but the cookie value is still technically hard coded. It may be possible to write a cron that will periodically create a new value token, update the Apache config file, and restart Apache. This will update the value every so often, but it seems quite a hassle.  (Plus, the user under which the cron runs has to be root in order to modify both the config file and to restart Apache.)</li>
<li>Similarly, there&#8217;s no way to distinguish between browsers behind the approved IP. My desktop is unlikely to roam anywhere, so it technically doesn&#8217;t need the cookie. Meanwhile, if my parents bring their laptop over and visit this site from that machine while within my network, they&#8217;d get the roaming cookie as well. Neither of these scenarios are ideal. In application code, it would be simple to set the cookie only after the user has been authenticated by the app&#8217;s internal mechanism first. But we&#8217;re not working with application code; we&#8217;re rewriting URLs in the server. Thus, this becomes a different security concern: controlling access to the approved IPs, which could be both a physical (who can patch directly in via Ethernet) and a logical issue (who can access the wireless LAN). One thing I&#8217;ve done to get around this problem is to require the browser to be authorized for roaming access to first navigate to a very large (~50 characters), randomly-generated alphanumeric subdirectory alias (generated using the same command-line script mentioned above) that is highly improbably that some might guess. This alias can only be accessed within a single authorized IP address that I directly control. It is only then that the cookie set. This eliminates the unintentional cookie setting by casual browsing of the site from other machines behind the approved IP.</li>
<li><strike>The regular expression to match the cookie should probably be more precise. For example, the expression as stated above could also match the string &#8220;myadmincookie=uniquevalnum2&#8243;, which technically isn&#8217;t what we want. Since we&#8217;re only dealing with cookies that should be set by our domain, it may not be that big of a deal, but it&#8217;s still a vulnerability nonetheless. If nothing else, there&#8217;s always the potential of colliding with cookies sent by other applications running on your site, so picking a unique cookie name and value is important. The <code>%{HTTP_COOKIE}</code> variable gets all the cookies for a given site/path as one big string, with each name/value pair delimited by a semi-colon and a space (&#8220;; &#8220;) and the name and value are glued together with an equal sign. I&#8217;m looking into a better regex to match this more precisely and I&#8217;ll update this post if I find one.</strike> I&#8217;ve updated the regex so it should match the cookie name/value pair more exactly.</li>
<li>Of course, none of this by itself can completely secure a site. In addition to this scheme, I force SSL on certain paths, deny access for all users to other paths that should never be accessed directly, and even explicitly block certain IP ranges that have attempted to hack the site. It&#8217;s not fool proof by any means, but combined with many other secure practices and mechanisms, it adds one more layer of protection, and sometimes one added layer can make all the difference.</li>
</ul>
<p>I welcome any feedback on how to improve this, especially if anyone knows how to get around the secure and unique cookie caveats.</p>
<p><em>Appendium:</em>  I should also point out that this scheme should be equally usable if you place the code in your master Apache configuration file (usually something like <code>/etc/httpd/conf/httpd.conf</code> on UNIX clones) or in per-directory <code>.htaccess</code> files. I usually prefer to put such rules in the master config file, mostly because it&#8217;s more secure (outside of the document root) and only gets parsed and loaded once while <code>.htaccess</code> files are read and parsed each time there&#8217;s a request in that directory (or any of its subdirectories). However, that only works if you have access to the master config, which most shared hosting services don&#8217;t provide. Of course, such rules placed in an <code>.htaccess</code> file will only apply to that directory and its subdirectories, so you&#8217;d have to tweak the rules (such as file paths and the cookie path) as necessary.</p>
<p><em>Update 11/20/2007:</em> Updated cookie regex to better match the exactly name/value pair; added notes about rotating cookie values.</p>
<p><em>Update 11/30/2007:</em>  Put cookie regex in quotes to correct avoid &#8220;bad flag delimiters&#8221; parsing errors; added advantage summary to better showcase the advantages of the scheme; updated my cookie value scheme; added highly-random subdirectory alias to avoid unintentional cookie-ing</p><div><a class="addthis_button" href="//addthis.com/bookmark.php?v=250" addthis:url='http://www.jeffdarlington.com/2007/11/07/roaming-authentication-with-apache-mod_rewrite/' addthis:title='Roaming authentication with Apache mod_rewrite '><img src="//cache.addthis.com/cachefly/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.jeffdarlington.com/2007/11/07/roaming-authentication-with-apache-mod_rewrite/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress security tweaks</title>
		<link>http://www.jeffdarlington.com/2007/10/31/wordpress-security-tweaks/</link>
		<comments>http://www.jeffdarlington.com/2007/10/31/wordpress-security-tweaks/#comments</comments>
		<pubDate>Wed, 31 Oct 2007 20:31:29 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.jeffdarlington.com/2007/10/31/wordpress-security-tweaks/</guid>
		<description><![CDATA[If you guys haven&#8217;t figured it out by now, I&#8217;m been becoming quite the Internet security nut over the past few years. A thorough search of the Technology category reveals a good bit of my interests in SSH, SSL, public key cryptography, etc. Maybe I ought to experiment with subcategories and introduce a Security category [...]]]></description>
			<content:encoded><![CDATA[<p>If you guys haven&#8217;t figured it out by now, I&#8217;m been becoming quite the <a href="http://en.wikipedia.org/wiki/Internet_security" title="Internet security article on Wikipedia">Internet security</a> nut over the past few years. A thorough search of the <a href="http://www.jeffdarlington.com/category/technology/" title="Category: Technology">Technology category</a> reveals a good bit of my interests in <a href="http://en.wikipedia.org/wiki/Secure_Shell" title="Secure Shell article on Wikipedia">SSH</a>, <a href="http://en.wikipedia.org/wiki/Transport_Layer_Security" title="Transport Layer Security article on Wikipedia">SSL</a>, <a href="http://en.wikipedia.org/wiki/Public-key_cryptography" title="Public-key cryptography article on Wikipedia">public key cryptography</a>, etc. Maybe I ought to experiment with subcategories and introduce a Security category under Technology&#8230;.</p>
<p>Anyway, <a href="http://wordpress.org/" title="WordPress">WordPress</a> usually includes some default feeds in the Dashboard after you log in, mostly from WP developers. One recent entry linked to a <a href="http://dougal.gunters.org/" title="geek ramblings">&#8220;geek ramblings&#8221;</a> post about <a href="http://dougal.gunters.org/blog/2007/10/30/securing-wordpress" title="geek ramblings: Creating a secure WordPress install">creating a secure WordPress install</a>, which in turn references a <a href="http://blogsecurity.net/wordpress/wordpress-security-whitepaper/" title="BlogSecurity: WordPress Security Whitepaper">WordPress security whitepaper</a> over at <a href="http://blogsecurity.net/" title="BlogSecurity">BlogSecurity</a>. (If you didn&#8217;t know any of these sites existed, don&#8217;t feel bad. Neither did I until today.) There&#8217;s lots of interesting reading there, especially if you&#8217;re (a) interested in securing your WordPress site and (b) you happen to be curious and/or adept enough to dabble in a number of arcane Web server settings. I happen to fit both of those criteria.</p>
<p>One of the main reasons I&#8217;m mentioning this is that there might be a few changes and improvements for folks who have registered to comment. The site now redirects you to a secure SSL page on login, and your <a href="http://en.wikipedia.org/wiki/HTTP_cookie" title="HTTP cookie article on Wikipedia">cookies</a> will be stored in secure mode too, meaning they can&#8217;t be read unless sent over an SSL connection. This might require you to log in the next time you try to comment, even if you&#8217;ve told the site to remember you, because the old cookies won&#8217;t be secure and will need to be reset. Otherwise, you probably will never notice the difference unless you go to edit your profile, which most of you probably will never worry about once you&#8217;ve registered.</p>
<p>The rest of the changes are all behind the scenes, so I won&#8217;t bother you with them. Just read the links if you&#8217;re curious. I&#8217;m experimenting with some arcane <a href="http://httpd.apache.org/" title="Apache Web server">Apache</a> <a href="http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html" title="Apache mod_rewrite documentation">mod_rewrite</a> rules to really locking down the admin pages, all outside the scope of the links listed above, but so far those tests don&#8217;t seem to work. However, if I get them to do what I want, I might post them here (to give back to the community and all). It will be pretty sweet and borrows a few ideas from recent episodes of the <a href="http://www.grc.com/SecurityNow.htm" title="GRC | Security Now!">Security Now! podcast</a> (#113 specifically) to lock down access to the admin site from only certain locations or certain roaming computers.</p><div><a class="addthis_button" href="//addthis.com/bookmark.php?v=250" addthis:url='http://www.jeffdarlington.com/2007/10/31/wordpress-security-tweaks/' addthis:title='WordPress security tweaks '><img src="//cache.addthis.com/cachefly/static/btn/v2/lg-share-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/></a></div>]]></content:encoded>
			<wfw:commentRss>http://www.jeffdarlington.com/2007/10/31/wordpress-security-tweaks/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

