Intro to Hacking Part 5 – A Non-Technical Guide to Password Cracking


We have established now passwords are stored in Part 3 and the most common ways of extracting hashed passwords in Part 4. In Part 5 we will examine how to crack a hashed password.

After the previous post you likely have a short list of random characters that you want to translate into the password the user actually typed into the computer. In other words, crack the password. How the heck do you do it? Is it even possible given the impressiveness of the hash algorithms? Yes it is and there are a number of tools that will even do it for you!

Determining the hash algorithm
The first step is to figure out what algorithm was used to convert the typed in password to gobbledygook. In theory, this should be incredibly difficult. There are literally endless ways that it could be done. In practice though it is quite easy – just about everyone uses the same couple algorithms!

Most websites are going to do what everyone else does – if the hash algorithm works well enough for others, it must be pretty good. In fact, hardly any small website owner is going to put any thought into this – they are just going to use pre-built solutions. Most pre-built solutions and programming languages have the same hash algorithms built in. MD5 by far the most common and SHA-1 is gaining in popularity.

Not to oversimplify things, odds are if your hash is 32 characters long, you’re looking at DM5. 40 characters long, SHA1.

Let’s crack 94804c0a8c1771947cfba8ec3e0a4c30
The first step is determining the hash algorithm used. Keep reading…

Intro to Hacking Part 4 – Obtaining Passwords Through SQL Injection


This is part 4 of the Intro to Hacking series. Check our Parts 1 and 2 for interesting hacker stories, and Part 3 for an introduction to how passwords are stored.

We established in Part 3 that user passwords are stored in a database, but they are hashed – meaning they are stored as gobbledygook which you can’t possibly translate into the original password. Before I proceed to tell you about techniques for transforming the gobbledygook back to the password, I think it is important to establish how a hacker would obtain a hashed passwords from the database.

The most common technique is called a SQL Injection Attack. First, a little background on what SQL is. It’s a querying language for databases. Think of a database as a huge Excel document – you have rows and columns, and can potentially many different sheets all within the same Excel document. Databases have rows and columns, the sheets are called tables, and the Excel document itself is called a database. But databases are typically much larger than Excel documents – with millions of rows in some tables and potentially hundreds or thousands of tables.

The querying language allows you to navigate these behemoths and find the information you are looking for. Imagine we have a table (sheet in Excel) called — USERS with columns — USER_ID, NAME, EMAIL, and PASSWORD. A simple query would be “show me all users with the first name Brian.” A little more complex “show me all users with the first name Brian and a gmail address.” This example is still simple because all the information is stored in one table – but often the information is completely spread out and you have to navigate the web of tables to find it.

Keep reading…

Intro to Hacking Part 3 – How Passwords Are Stored

Every website these days has a log in – it is mandatory to be “social” and allow comments or other user interaction. Popular sights like ESPN, IMDB, Weather.com, PedanticPosts as well as more obscure sites like PassiveAggressiveNotes and HotOrNot. But you can’t have just anyone comment, no no no, they must be validated as an actual person, capable of entering a username and password.

Do you know how your passwords are handled? It’s obvious not every site has the same policy – some websites require at least 7 character passwords, some don’t allow special characters, some require a number or uppercase letter, and some have no requirements whatsoever. Do you trust every website equally with your password? Should you?

Almost all websites have databases which contain the data needed to run the site and store the user information. One important part of the user information is the password. But hardly any website will store your literal password – if your password is “r0xysUrfrGrl” and “r0xysUrfrGrl” was stored in the database, anyone with access to the database would know your password. This would mean that you would have to trust every website administrator with you password. And if a hacker every got ahold of your database (which we will see is quite possible) then they would have everyone’s passwords. Ouch.

Instead, it is common to store a hashed version of the password generated by an algorithm. An example of a dead simple algorithm would be to simply reverse the order of the letters and then replace the vowels with the vowel’s number (i.e. a=1, e=2, etc.). So the password “BeerBuzz” becomes “zz5Br22B”. Not too bad, I doubt you could look at “zz5Br22B” and guess what the password is. Keep reading…

Intro to Hacking Part 2 – More Hacker Stories


This is Part 2 in the Into to Hacking series. Check out Part 1 for additional hacker stories and come back soon for a more technical look at common hacking methods.

Phone Phreaks
Some of the earliest hackers were phone phreaks, dating all the way back to the 1950’s – they took advantage of their knowledge of how phone systems work to do some pretty cool things.

Switch-hooking: making outgoing phone calls by rapidly picking up and hanging up the phone (5-10 times a second) to mimic a rotary dial. If you were good enough you could impress your friends by dialing without pressing any numbers!

Tone dialing: certain tones were used by the phone company which had a specific meaning to the call routing system, such as 2600 Hz to designate that a call was over. This knowledge could be exploited to provide free long-distance and international calls. It was first discovered in 1957 by a seven-year old blind kid with perfect pitch – he whistled the fourth E above middle C (2600 Hz) while on the phone and the call abruptly ended. The legendary John Draper also discovered that the free whistles in Cap’n Crunch cereal boxes also made the same tone (hence his nickname Captain Crunch), while still others used exotic birds or learned the distinct whistle themselves.

Blue boxes: as the systems became more complex, so did the hackers’ techniques. Blue boxes were fairly simple contraptions built to take advantage of some of the phreak knowledge and caught the attention of the young Steve Wozniak and Steve Jobs. As you might expect, Woz was the main engineer and Stevie wanted to sell them and dominate the world. One famous demo of their device involved Woz calling the Pope pretending to be Harry Kissinger …

Free Porsche!
Radio stations love giving things away Keep reading…

Intro to Hacking – Real Hacker Stories Are Even Better than the Movies


This is the first post in the Intro to Hacking series. In future posts I will go into technically how hacking works and how you can protect yourself, but first I’ll whet your appetite with some interesting stories.

Hacking is a broadly defined word with so many different meanings: writing clever computer code, creating an ugly yet effective solution, finding a shortcut, playing a practical joke, or the act of breaking into a computer. Guess which one I am interested in? Well I guess I’m interested in all of them, but I will be writing about breaking into computers. This subject is chock-full of incredibly entertaining stories and interesting things to learn.

There are a zillion different types of hackers. Some are good guys (white hat), some are bad guys (black hat), some it’s even hard to tell (grey hat). Some know only one way to hack and some are computer wizards who seemingly have no barriers holding them back (1337). And some technically know very little about computers and instead rely on tools built by others (script kiddies).

AIM Punters
I remember my first introduction to this world. The year was 1996 and I was finally online. America Online. AOL. And the best part about AOL was the ability to chat instantly with friends or strangers thousands of miles away. Oh the possibilities!

What does this have to do with hacking? Back in the early days of AIM (AOL instant messenger) the program wasn’t exactly robust. There were tools called punters (or IM-bombs) that exploited these weaknesses – you could use them to kick another user off AIM or even make their entire computer crash (they worked by sending HTML code or tons of invalid characters that would cause the other person’s computer to explode like the fembots in Austin Powers when he touches himself). Did I have any idea how it worked? No, and that’s the best part! The barrier was so low – all you had to do was download a program and you had incredible power over your buddies (or strangers). These AOL punters were a likely starting place for many script kiddies.

Anonymous
The motivation for this post was a hack that was recently in the news. It was so bad ass I felt compelled to share it with a larger audience. Keep reading…

Recursion Like You’ve Never Seen Before

One of the first novel ideas you learn in computer programming is the concept of recursion: functions that call themselves. It is a new idea to most and extremely powerful in the world of computers. It is also the point in the programming class where you figure out if you “get it” or if you should just stop now.

So let me explain the basic idea to those who don’t think in terms of functions or methods, or even know what they are. It is all about dividing a problem into a set of smaller problems. Imagine you are at the end of the line for Splash Mountain at Disneyland and they come tell you they need everyone’s phone number to give them a free ticket on a Disney cruise. But you don’t know everyone’s phone number! In fact, you can’t even see to the front of the line. How do you solve the problem?

You break it up into a smaller problem of course. You know your phone number right? And you know how to tell the person in front of you to do the same (smaller problem because that person has one less phone number (yours) they are responsible for). And if you do that enough times, pretty soon you are at the front of the line. Easy.

Keep reading…

Is the Internet Actually a Playground?

It’s no secret that I love the internet. If forced to, I could keep myself entertained for weeks, maybe even months, just poking around and seeing everything that is out there. (Un)fortunately I have friends that keep this from becoming a reality.

What is it that I love about the internet? Well first there is the information. I’m pretty nerdy when it comes to learning outside of the school environment about the things I want to learn. I think there is something out there for everyone – every single subject you can imagine from academic to silly to somewhere in between. From text to videos to audio.

What else do I love? The internet is a playground for mischief! Can’t keep a straight face when making your crank calls? No problem, try your luck on the internet. My favorite is the 7 legged spider email correspondence. Even if you don’t participate, you can check out all the different ways people are creating a disruption on the web. Obama’s internet IDs idea better not bring this to an end.

Are you creative? How would you like to create money out of thin air? There are numerous examples of people doing one simple, creative thing on the internet and making boatloads of money off of it. My favorite example is the Million Dollar Homepage – a 21 year old decided to pay for his college (and a whole lot more) by selling 1 million pixels of advertising at a dollar a pixel. It peaked at the 127th most popular website on the internet and in half a year brought in a million dollars for a pittance of effort. Check out the Wikipedia page and FAQ for some more background.

Your brilliant idea might not be too far away. Clay Shirky’s book Cognitive Surplus is chalk full of interesting ways that the internet is changing the world both socially and economically. Clay is the go to guy for anything internet related – his essays are oozing with ideas and opportunities on the web.

I must conclude that the internet is a playground. But it is also the classroom. It is also the teacher’s lounge, bulletin board, club meeting space, and gymnasium. And it is absolutely a work environment. If I had to sum it up, I’d call it a social experiment – here is this brand new way of communication continuously being reinvented. Really it’s just about anything you want it to be.
 


 
The “somewhere in between” link above is highly recommended. In fact, check out all the Drunk History videos. And looking for a way to contribute to Wikipedia? Believe it or not, there isn’t a Wikipedia page for Drunk History yet!
 

Photo: Vincent Lock

Why Did a Google Engineer Get 6 Million Dollars for Keeping Her Job?

A couple months ago there were reports of absolutely absurd bidding wars taking place between Google and Facebook for the top engineering talent in the valley. How absurd? Millions. And we aren’t talking about high level executives here. Just mid-level staff engineers that happen to be good at what they do. When Facebook came calling for their services Google refused to be outbid – the two biggest engineer payouts leaked were $3.5 and $6 million in stock from Google. Wow!

And the best part about it? Facebook didn’t have to offer them $6 million. Just the idea that Facebook stock would be worth obscene amounts of money when there is an IPO. All it would take is a fairly standard offer of 1/20th of a percent of equity, which could/should be worth tens of millions is just a couple years. That’s all it takes to make Google pay out the wazoo.

This begs the question: what could these engineers possibly do that makes them so valuable? And for Facebook – what are they doing that they think they need to lure these engineers away from Google? At first glance Google is the company that really needs the top tier engineering talent, what with their secretive search technology, complex advertisement algorithms, and cars that drive themselves. Plenty of challenge for the best engineers. But Facebook? They just have one thing: a website that is already way too cluttered. How hard could it be? Haven’t they already done the hard part? Couldn’t they get by with paying way less for someone else?

Keep reading …

Join the Pedantic Posts Mailing List

As I promised on my birthday, I created a mailing list to let Pedantic Post readers know about the latest posts. Don’t worry, this isn’t a spam machine – emails will be sent weekly containing links to the past week’s full articles. You can unsubscribe at any time.

Why sign up for email updates? So you don’t miss any of the action! This is a convenient alternative to daily visiting pedanticposts.com to see if there were any updates.

To sign up, simply enter your email address in the “Mailing List” section on the upper right.


Photo: Ed Siasoco

My Book List is Finally Published

The most loyal Pedantic Post readers have been clamoring for me to publish my reading list rather than the “coming soon” page that held the spot. I have been keeping track of the books I have read over the last two years in a Google doc, awaiting for the day that I would finally share it with the world. Well here it is.

But first some thoughts. I have been reading way more than I expected – roughly a book and a half a month. The current total is 39 books broken down into 1 digital (iPhone), 3 audio, and 35 physical. And I expect my pace will only increase from here, especially if I get that Kindle for Christmas (*hint hint*).

In the most recent months I have also been keeping track of the words for which I look up the definition. I have my iPhone on me at all times and it is fairly easy to look up a definition in the dictionary app and copy it over to the notepad. If you do end up taking a peak at the word lists, please ignore the few rather elementary words. I swear I was just looking them up because I was curious of the exact definition.

I have considered keeping a list of notes or writing some final thoughts about each book I read. Do you have any other ideas?


 
I noticed that I looked up the word garrulous (full of trivial conversation) in both Titan and Starting Something. In my defense, I came across it first in Titan and you can’t expect me to memorize all the four dollar words in that tome.
 

Photo: Wonderlane