The Recycle Bin

Entries from June 2008

Holy anti-feature, batman

June 13, 2008 · Leave a Comment

I had the opportunity to attend at talk by Mark Russinovich, of Sysinternals fame, during last week’s Trustworthy Computing Conference.  The topic of the talk was about security boundaries in Windows, and more specifically, what is not a security boundary.  The talk was very interesting, and I don’t want to reveal too much here, but there was one part of it that stuck with me and has been bothering me for a little while now.  One of the technologies he addressed was Patchguard, or Kernel Patch Protection, which was introduced in 64-bit Vista and Server 2008.  Patchguard is intended to keep programs from patching, hooking, or otherwise tampering with the internals of the NT kernel.  It does this by periodically taking a checksum of some important structures in the kernel (SSDT, interrupt table, HAL tables, etc) and comparing the current value with the previous one.  Any discrepancy here will indicate that the kernel has been subverted.  If it notices any changes to these structures, it throws an exception which throws a blue screen error.  Sounds good, right?  Sounds like a great new security feature, no more rootkits!  Well, not really.  The truth is, KPP really does nothing to stop malicious code, and in fact, is pretty useless in doing so.  Mark revealed in his talk, that that was never the intention of KPP, but rather, it was conceived as a way to force legitimate developers to stop using these techniques in their own programs.  See, most anti-virus and security products will use some level of system hooking in order to get a good view of activity.  In fact, one of Mark’s very own tools, RegMon, hook’s the SSDT to watch registry activity.  He even wrote a publication about the technique!  The problem with kernel hooking is that it is entirely unsupported and significantly reduces stability.

So here’s what I don’t understand.  Microsoft has recognized that system hooking leads to instability.  They’ve decided that programmers aren’t good enough to extend a kernel function safely without throwing a blue screen exception, so now they’re not going to allow us to hook certain system structures (pfft, allow is a funny thought).  But, instead of actually fixing the gaping holes in their system, they’re going to simply watch for system hooking, and then guarantee that the system will crash, by causing the crash.  Oh yeh, and they are going to blame it on the developer.  It’s like a car company deciding that talking on your cell phone while driving is dangerous, so they’re going to create a system that detects if you’re on the phone and then drives the car off the road for you.  That will show you! 

I just don’t understand this anti-feature.  There are plenty of legitimate reasons for hook these system functions, and it can be done safely.  I know it can because Mark has done it, and I’ve done it.  If you don’t want developers to subvert the kernel, then provide a complete API that we can use to extend and monitor the system, and fix the problems with your system that allows someone to take write-protected virtual memory, map it to physical memory, strip all the restrictions off of it, and send it back patched.  Don’t just come behind perfectly valid code, throw an exception and blame it on us. 

Categories: Security · Vista · microsoft · programming
Tagged: , , , , , ,

Live Writer Update

June 11, 2008 · Leave a Comment

I blogged about Live Writer back when I started this site and I’ve been using it the whole time.  It has treated me well and I think it’s one of the most useful programs from the Live suite.  Well, they’ve just released a new version as a Community Technical Preview (CTP), which is like an alpha version – relatively stable, yet not feature complete.  There are some new features that they want feedback on so give it a try if you’re feeling adventurous.  You can read about it here.  One feature I’m enjoying is the real-time word count, since I’ve noticed my posts are getting kind of long and I think everyone is bored.  I’ll try to keep them short!

Windows Live Writer Technical Preview

Categories: General · microsoft
Tagged: , , ,

Safari Carpet Bomb (Update)

June 4, 2008 · Leave a Comment

I love being right.  Remember the Safari carpet bomb I posted about back in April?  Remember how Apple said it wasn’t a “security concern” and I scolded them for it?  Well, now it’s got interesting.  Apparently there is a known flaw in Internet Explorer that allows a website to execute any program on the user’s desktop without their consent.  Normally, this flaw isn’t as much of a concern because all new executables downloaded (by anything but Safari) get marked with an alternate data stream tag that indicates that is from the Internet Zone.  Any time an application with this tag is opened, the user is prompted and the action must be explicitly allowed.  Now when we include Safari’s carpet bombing technique that downloads an exe without notification or ADS marking, then this IE flaw becomes a critical security concern.  This is a great example of what is called a blended threat.  Two seemingly innocuous bugs combine to create a gaping security hole.  The IE team was not concerned with their bug because there was no way to get an unmarked exe onto the desktop without the user knowing, and the Safari team wasn’t concerned with their’s because you couldn’t execute the exes that it downloaded automatically.

So yeh, here’s the MS Security Advisory

Categories: Apple · Security · microsoft
Tagged: , , ,

Meshing the Common Feed List

June 4, 2008 · Leave a Comment

Last week I blogged a little bit about a new cloud syncing product called Live Mesh.  I mentioned how in its current incarnation it really only serves as a file syncing and sharing tool, but in the future it will have an open API that will allow programmers to add application specific data to the system instead of whole files.  I concluded with a short wish list of programs that might take advantage of this API which included a cloud synced RSS feed list.  Well, I was playing around with this the other night, and figured out that this can already be done with just the file-based Mesh.

Quick Background:  with IE7, Microsoft introduced what is known as the Common Feed List within Windows.  When you click on the little orange RSS icon in IE and subscribe to a feed, it gets added into a system wide collection of feeds.  There is a background service that keeps all of these feeds up to date.  The feeds are then visible to any application on the system that wants to interact with them.  Right now, FeedDemon and RSS Bandit interact with the Common Feed List as well as IE, Outlook and Live Mail.  So, as far as offline feed readers go, the Common Feed List is a pretty good idea.  What I would like to do is push that list up into the cloud, and allow me to access it from any computer I’m at.  I’m not talking about just an OPML file of feeds that I’m subscribed to, but instead it’s a full version of the CFL, including a read and unread marking on all entries.  So far, I think I’ve got a working solution.

In Vista, and Feed List is stored in

C:\Users\$USERNAME$\AppData\Local\Microsoft\Feeds

and, in XP it is in

C:\Documents and Settings\$USERNAME$\Local Settings\Application Data\Microsoft\Feeds

I just added that folder to Mesh and synced it to that location on all of my other machines.  It seems to work like a charm.  While Google Reader is probably a better solution to all of this, I still sort of like this set up.  You must be careful to allow Live Mesh to update before the Common Feed List does, or your read/write tags will get a little messed up.

[UPDATE]

I’ve been running this set for about a week or two now and I can say for sure that it does work, however it will clutter your Recycle Bin with .feed-ms files.  Why?  I cannot explain…

Categories: microsoft
Tagged: , , , ,