Archive for November, 2009

The password problem

Friday, November 27th, 2009

Odds are good if you’ve reached this blog, you have an account on at least one website somewhere on the wild wild web. This account could be on a web application ranging from something as critical as a finical institution or your primary email account to something as trivial as your account on some random blog. I’ve got far too many to even be able to number, falling everywhere in between those two lines, and have created my fair share of passwords. Normally, this is the point where the blogger starts ranting about “longer passwords” or “use a passPHRASE” or “use special characters.” This time however, I’m pointing the finger at the application designers.

Originally, this post was going to be little more than my frustration with not being able to use passwords that I desired, due to restrictive requirements on applications. After gathering some data, to have a soap box to stand on, I realized that some of these “requirements” actually go beyond the surface level annoyance and actually affect the security of your account directly. Some of these applications go as far as to actually prevent you from using a secure password or reveal other weaknesses in the application’s design. I’m sure this isn’t a new find by any means, but some of the “requirements” I’ve seen are pretty outrageous. The most startling bit is a good majority of the examples I’ll be using in this post have come from accounts falling into that “critical” category.

Before I go on and discuss the various “vulnerabilities”, I’d like to note that the list below is definitely not a comprehensive list of all web application password vulnerabilities. Rather, everything below was gathered from requirement messages listed at the time of creating the password and other things I noticed while creating the account. The purpose of this list is to explain each issue, on both a technical and non-technical level, as well as to provide recommendations for end users encountering each. Examples used here are gathered from live, current web applications to represent the current issue as well as to provide real world examples as teaching tools for detection.

Restrictive Length

This was probably the most prevalent poor password requirement I came across, which is odd to me as I’ve never seen any reason to restrict a user’s password other than to require a minimum length. Despite this, we see the following types of messages all across the web:

Password must be 6 to 8 characters in length

Please enter a password that has a maximum length of 12 characters

By reducing limiting the number of characters a password can contain the number of possible passwords, the keyspace, is also reduced. This means that a malicious user who is either brute forcing the application or has obtained a copy of the hash and is cracking it has to check a smaller number of passwords.

Other than simply restricting length through verbose and obnoxious warnings, some developers will simply truncate your password. In some situations, this truncation happened through an html attribute defining the maximum length of the password creation field as well as the login field. This double-combo actually makes things worse as it may be some time before you notice that your 23 character password is being cut-off at 12 characters.

Restrictive Character Set

I can almost build a case for these requirements. Almost. I’ve spoken with developers who have restricted characters allowed in your password by the same rules they disallow characters for SQL injection blocking or cross site scripting prevention. In other cases, I’ve seen character sets reduced by case-insensitivity.

Contain no spaces or special characters (eg <, &, >, *, $, @)

No spaces or invalid symbols

Contain 6 to 8 characters – at least one letter and one number (not case sensitive)

In these examples you can see developers trying to limit their attack surface by preventing any sort of attack on their application through the password field. Where this argument breaks down is, a proper application should be one-way hashing the passwords. When the password is hashed these special characters are eliminated and thus rendered safe.

In the third example, you can see that the keyspace is reduced even further by removing 26 characters, either the upper or lower case letters. At the same time they have reduced the keyspace characters to 36, they’ve also limited password length on both the upper and lower end.The combination of these two restrictions effectively reduces the keyspace from 218,340,105,584,896 (8 characters, upper/lower-case, numbers) to 2,821,049,441,280 (6-8 characters, case insensitive, numbers), just over 1% of the password possibilities.

Defending yourself

In many cases, when you come upon a web application as inherently insecure as the ones listed above it’s probably best to simply walk away and not bother with it, however; there are cases where you may need to create and use and account. It’s possible to mitigate some of the risks of restrictive passwords by paying attention and adjusting your password accordingly.

Probably the greatest risk of the issues outlined above is the possibility of your password being compromised by another user. As it’s impossible to create a stronger password than the application will allow, this reduces our options drastically. I suggest creating a couple passwords and then group accounts into “security levels” based on their requirements. By having multiple passwords and using them on web applications with varying levels of security, you can ensure that a compromise due to one of these poor password policies is limited to a password only used on other such sites.

Detection is important because without it you aren’t able to correctly classify the security level of the application’s password policies. Beyond simply looking at the requirements listed, a complex password designed to trigger applications with poor password management to fail can be used to test the application.

#th!$iSaG<><>|)’test–p@ssword”!*

The password above can be used to test applications. By including common SQL injection characters, cross site scripting characters, upper/lower case, numbers, commonly denied symbols and a length 33 characters of  you can test the whole array of restrictions. Beyond simply testing the restrictions, it actively tests the application for SQL injection potential. The ‘ and ” characters included in the password are designed to trigger SQL errors if they are not handled (either by hashing or SQL character stripping.) An application that throws an error on this password should actually be considered significantly less secure.

My new friend Larry…

Saturday, November 21st, 2009

Today while I was working on reorganizing some of my wiki, I received an unexpected message from a fellow internet user, a friend going by the name of “Larry.”

Below is my conversation with Larry, who refused to give even the most basic information. How he got my screen name, for example. His business seemed to be getting my credit card number, location, and even assistance in hacking!

I look forward to my next chat with Larry. He’s a nice enough guy, just a bit hard to understand.

[4:02] <icando ike> icando ike wants your attention!
[4:02] <icando ike> hi
[4:03] <icando ike> how are u doing?
[4:03] <icando ike> It larry
[4:03] <icando ike> Longtime
[4:03] <samurai> i think you’ve got the wrong number bub
[4:03] <icando ike> Lolz
[4:03] <icando ike> What do you have?
[4:04] <icando ike> Do you have CC?
[4:05] <samurai> why do you need to know that?
[4:05] <icando ike> I need it
[4:05] <icando ike> Dont you hack again
[4:05] <icando ike> ?
[4:05] <icando ike> Let me know
[4:06] <samurai> no
[4:06] <samurai> are you some sort of scam artist?
[4:06] <samurai> because you really suck at it
[4:06] <icando ike> okay Dude
[4:06] <samurai> im not giving you a CC #
[4:07] <samurai> im not helping you hack anything
[4:07] <icando ike> i see
[4:07] <icando ike> So what do you do now?
[4:07] <samurai> currently, i heard sheep
[4:08] <samurai> rough economy. gotta get work wherever you can man
[4:08] <samurai> thank god sheep are too dumb to sort things out for themselves… we’ll always need shepherds
[4:09] <icando ike> Thank right
[4:10] <samurai> so, unless you have some sheep
[4:10] <samurai> that need managing
[4:10] <samurai> i dont see that we have any further business together, larry was it?
[4:13] <samurai> are you a bot or a person?
[4:14] <icando ike> A person
[4:14] <icando ike> Where do you stay right?
[4:14] <samurai> where do i live?
[4:15] <icando ike> yeah
[4:15] <samurai> in an apartment
[4:16] <icando ike> I see
[4:16] <icando ike> Where are u Located?
[4:16] <samurai> you dont need to know that
[4:16] <icando ike> Lol
[4:16] <icando ike> You speak to me in a mannerfull way
[4:16] <icando ike> I need to know
[4:17] <samurai> why?
[4:17] <icando ike> Why??????????????
[4:17] <icando ike> Dont you read what i type
[4:17] <icando ike> ?
[4:17] <samurai> i did read what you typed… but you didnt give a reason
[4:18] <samurai> you’ve just demanded to know my location
[4:18] <samurai> i have no clue who you are buddy
[4:18] <samurai> or why you’re talking to me
[4:20] <icando ike> I see
[4:20] <icando ike> You seems to be a Pretender or what
[4:20] <icando ike> You are a Hacker,and we deak together as well
[4:20] <icando ike> Suddenly you never show up here
[4:21] <icando ike> I was lucky i found you today
[4:21] <samurai> show up where?
[4:21] <samurai> online
[4:21] <samurai> ?
[4:21] <icando ike> yes onine
[4:21] <icando ike> Then i told you i need Stuff
[4:21] <samurai> how did you get my screen name ?
[4:21] <icando ike> You saying things i dont Understand
[4:22] <icando ike> Guess you Dude,Seem you dont Read what i type
[4:22] <samurai> i like you larry
[4:22] <samurai> you make me smile
[4:23] <icando ike> Thanks Andrew .dude
[4:23] <samurai> ;)
[4:24] <samurai> so you’re a hacker?
[4:25] <icando ike> Question or what
[4:26] <icando ike> Are u pulling my Legs or what the hell is happening here
[4:26] <samurai> that’s what i’d like to know
[4:27] <samurai> so you’re a hacker?
[4:28] <icando ike> yes..why asking
[4:28] <samurai> are you a good hacker?
[4:28] <samurai> are you 1337?
[4:28] <icando ike> Common i hate all this Pracks
[4:29] <icando ike> Enough of this
[4:29] <samurai> what is your business with me larry?
[4:30] <icando ike> Dude i’m off
[4:30] <samurai> okay
[4:30] <samurai> enjoy your evening larry
[4:30] <samurai> talk to you later :)

A new mindset – A new box

Friday, November 13th, 2009

It’s been sometime since I’ve last made a post (like a really long time,) but I’m changing that with this post (obviously) and yet again promising to be more attentive. This time however, the change isn’t simply “more blog posts”, but instead a radical change. SamuraiNet will be merging with the psych0tik network and I will be joining with richo and CarbonLifeForm to run the new and improved psych0tik. Over the next couple months we’ll be releasing more information, including a real release date (to hold ourselves to getting this done.)

All these changes mean only one thing, we needed to amp up our gear. As it’d been a while since I bought a new machine and I was itching to get something fun I volunteered to make the first addition to our network, Storm.

Storm’s Specs:

Built on: Shuttle SA76G2 Barebone 

AMD Phenom II x4 Black (4 Cores@3.2Ghz)

4Gb Patriot Viper DDR2 800 (PC2 6400)

Seagate Barracuda 1.5Tb (7200 rpm) SATA drive

Western Digital Velociraptor 150Gb (10000 rpm) SATA drive