Wednesday, February 10, 2010

Death of a Hacker

On February 5th, the last living person on Earth speak the Bo language, which is believed to be roughly 70,000 years old, died. This got me to thinking, as I was preparing for my upcoming network security courses at UAT. I was talking to one of my students today explaining the significance of our numbering system and how it's based on humans having 10 fingers. This is so significant because it related to the way we count things, perform math, and more. It's also called Base 10. To intensify my concern, I happened to be reading a book on Assembly to improve my skills in reverse engineering and exploit writing. (In case you're curious, the book is "Assembly Language: Step by Step", by Jeff Duntemann, and I highly recommend it.)

There are a steadily declining number of hackers that understand the concepts of Base 10, Base 16 (hex) and binary (base 2), and it saddens me. We've gotten so good at creating software that we can call a person a hacker that may not actually understanding how a computer works at its deepest level. So with that in mind, here's a quick (and very basic refresher).

Base 10 is the numbering system that is based on the number of fingers we have (most of us, anyway). The base numbers are 0 through 9. Once we reach 9, we add a 1 to the column to the left, and revert the 9 to a zero, thus making 10 (ten). The first column on the far right is ones, the next to the left is tens, and the one after that is hundreds. Each column to the left is a power of 10 times the column to its right. I know, sounds pretty simple, right? But it's the very basis for how a computer operates.

Imagine a light switch on your wall at home. When you switch the light on, you have power flowing. When the switch is off, there is no power flowing. You basically have two conditions, on and off. In essence, your computer is like this, in that it reads whether a switch (or gate) has power or not. To put it more simply, your computer only has 2 fingers. :-)

This is called binary... your computer uses binary to calculate, perform instructions, etc. Off = 0 and On =1. If we use our model from above to determine how these numbers works, we start with the far right column. Since this is base 2, we only have 2 options for each column, a 1 or a 0; with 1 being the highest number that any column can contain before we move to the next column to the left. Each column is a power of 2 of the column to its right. So the first column is one, the second column is two, the next one is four, the next one is eight, and the next one is sixteen. So the number 28, when written in binary would look like:

1 1 1 0 0 = 16(x1) + 8(x1) +4(x1) + 2(x0) + 1(x0) = 28

I'm not going to go much deeper than this here, but suffice it to say that students that truly want to understand the computer better, and become better hackers, will spend the time necessary to learn these bases of numbers, and why they're so important. Additionally, learn Hexadecimal, or hex, as well. It's Base 16 and provides a powerful translation between binary and base 10.

No comments:

Post a Comment