Some OS X Applications Vulnerable to MITM Attacks
vulnsec.com
vulnsec.com
Think of it this way. If I'm one of those agencies I ask myself the following:
What applications do people typically use?
How do those applications typically interact
with the Internet?
How can we insert ourselves into that process to
spy on people or to take control of their systems?
What if NSA devoted 10 people full time to looking for vulnerabilities like this? What if they coordinated amongst the Five Eyes and, together, they had 50 full time people looking for vulnerabilities like this?Could they afford to do it? Yes! Would they find a plethora of vulnerabilities? Yes! So, are they doing it? Probably, what's to stop them (other than legalities of course)?
It's low hanging fruit, compared to all the other, more esoteric stuff we know they are already doing.
When history is written this will probably turn out to be the Golden Age of governments spying on civilians. Robust crypto everywhere just can't happen soon enough.
I think the best we can do is to build honeypots and get an understanding of whether these vulnerabilities are actually being exploited.
find /Applications ~/Applications -name Sparkle.framework -exec plutil -extract SUFeedURL xml1 -o - {}/../../Info.plist \; | grep '<string>http://'> To fix and avoid RCE in your app, you need to edit Info.plist file and replace http -> https for SUFeedURL key.
So to check for vulnerable apps I just grepped for SUFeedURL in my Applications folder:
snowwrestler$ grep -R SUFeedURL /Applications/*
Binary file /Applications/Coda 2.app/Contents/Frameworks/Sparkle.framework/Sparkle matches
Binary file /Applications/Coda 2.app/Contents/Frameworks/Sparkle.framework/Versions/A/Sparkle matches
Binary file /Applications/Coda 2.app/Contents/Frameworks/Sparkle.framework/Versions/Current/Sparkle matches
/Applications/Coda 2.app/Contents/Info.plist: <key>SUFeedURL</key>
Then I looked in that Info.plist file and saw: <key>SUFeedURL</key>
<string>https://www.panic.com/updates/update.php</string>
HTTPS, so I think I am good, right?If I found HTTP strings I could protect myself by just setting them to HTTPS. Either the app would update over HTTPS (if available), or the update mechanism would just break. I'd have to manually check for updates though.
- Macdown - Transmission - XQuartz
2 of the apps I checked (Sequel Pro and Stuffit Expander) had empty plist files which seems odd. Initially I thought I had maybe updated the software and not opened it since so the file wasn't yet generated but in this case the grep wouldn't have found a plist file at all. Do you know why they would be empty?
Try something like this:
find /Applications -name '*.plist' -exec grep SUFeedURL {} +1) Using secure and let's say trusted VPN and then all your connections are going to be encrypted by default 2) Update your applications in trusted environment like your home network
There is only one thing to remember - don’t connect to public Wi-Fi Hotspots unless you know what you do.
Note that the problem isn't just with the updater, but with the update checker. That means that merely running these apps makes you vulnerable, if you've configured them to automatically check for updates (usually the default). You don't have to actually update, just have an automatic check performed.
To be safe from this, you'll want to disable automatic update checks in the settings for each app. Of course, running the app to do this is dangerous, but the odds of being targeted in this small window are low, especially if you avoid easy targets like public WiFi while doing it. If you want to be extremely paranoid, you can disconnect from the internet first. Once the app makers publish updates, you can update out of band by downloading the new version directly from their web site (over https, hopefully) and then you can safely re-enable automatic update checking.
I'm not sure why NSXMLNodeLoadExternalEntitiesSameOriginOnly was used instead of NSXMLNodeLoadExternalEntitiesNever at the time[1]
I wonder if the hacky 10.6 code using NSXMLDocumentTidyXML was actually more effective.
[1] https://github.com/sparkle-project/Sparkle/commit/b7dc2438a7...
I would consider it as 2 different vulnerabilities.
Things like this is why The Update Framework (TUF) Specification was created:
https://theupdateframework.github.io/
The specification covers exactly this kind of attack and has signing of all of the data about an update:
https://github.com/theupdateframework/tuf/blob/develop/docs/...
But, as far as I know, there isn't an implementation of TUF that works with ObjectiveC and all the other parts of Sparkle, to actually update an OSX application.
I bet if this were a Microsoft story, it would have been left alone.