Lesson 1 - The top line
This is an ongoing series to dissect the PhreakNIC v3.0 code, which
seen at http://www.phreaknic.org/phreaknic.txt.
Okay, one tough thing about this lab is going to be that we've got
people here working at different speeds. I know that some of you have
already gotten quite a ways through the code, but please, for the purposes of
this discussion, don't give us a text dump of all your work so far... I'd
like others to get the <cough> "joy" of solving the thing on their own, as we
work through stuff.
As we progress through each section, feel free to ask questions,
or, if it's
a section that you *haven't* solved yet, suggest ideas on this list. To be
honest, I'm quite curious how other people are thinking through this code.
Also, there are different paths through the code, so that not all parts need
to be solved in order to arrive at the center. Or in other words, there may
be some section that I *haven't* solved yet, so if you see something that
I've missed, feel free to speak up about it.
If you're shy and would prefer not to post messages to the list,
have a question, go ahead and write to me directly... I can then take your
question, strip off your name and Email address, and just post the question,
and my reply, to the Projects list.
Also, if you're getting frustrated at how slow some other folks
through one section, and you just *have* to share your own solution that you
came up with 2 months ago, go ahead and send it to me in private Email. I'll
then congratulate you, put a gold star on your forehead and magnetize you to
my refrigerator. :)
Okay, on to the code. Take a look at it in its blocky entirety.
daunting, ain't it? Well, we're going to dissect it piece by piece, and then
once we have all its internal organs all laid out on the table in front of
us, it'll... well... I guess it'll look pretty gross. ;)
But first, let's just give it a buzz cut. We're going to start
with just the
first line of the code today:
Looking at it closely, we see that it's a mix of alphabetic and
Ignore the numbers for a moment, and just look at the letters.
What letters are there? E's A's and a D, but nothing higher
in the alphabet.
When there are a lot of numbers, mixed in with letters, and no letter is
higher than the letter F, that's a clue that you may be dealing with
hexadecimal numbers. Maybe. At least it's something worth trying.
You all know what hexadecimal numbers are, right? Right.
Okay, let's go
o.... Hmmm, I saw someone raising their hand in the back of the room there,
so okay, let's bring everyone up to speed. I'm not going to go into an
elaborate explanation, but there are plenty of other places out on the web
that *do*. Here's what I try when I want to learn something: I go to a
search engine and look for tutorials. So you could go search on something
like "hexadecimal tutorial" or "binary hexadecimal ascii tutorial", or
whatever turns you on. To save time, I picked a site more at less at random
that has some of the info that you'll need:
Read all 3 sections, then come back. We'll wait...
<tick tick tick tick> . . .
Ah, that was quick. And wow, you look smarter, too. :)
TIP: Understanding binary & hexadecimal numbers is an excellent
way to better
understand computers and digital electronics. I strongly recommend that you
memorize the first 15 binary numbers (from 0001 to 1111), so that you can
instantly look at any variation and be able to say what number it is in
decimal, *and* what number it is in hex, and be able to convert at least
those 15 numbers back and forth without using a chart. So like, if you heard
somebody ask, "D in Hexadecimal equals what?" you could rattle off, "13
decimal or 1101 binary" without even looking up. This kind of knowledge will
be useful later (and yes that's a hint).
Okay, let's take another look at that string:
And chop it up into 2-digit segments:
41 76 70 72 20 66 67 6E 65 and so forth.
Now take your handy-dandy hex/ASCII chart... What, don't have
either? Again, go try a search engine, or here's one I plucked out at
Now tracing down the columns in the chart, we learn that:
41 Hex is the letter "A"
76 Hex is the letter "v"
and so on.
So here's your homework: Figure out what letters or characters
the rest of
those hexadecimal numbers represent.
(1) WRITE IT DOWN. Don't do it in your head.
(2) Don't be surprised if the letters don't make sense. We've got more
decryption to do yet.
(3) A common mistake is to look at the "decimal" column on the chart
instead of the "hexadecimal" column. Be sure you're using the right one
(4) Pay attention to whether a letter should be lower-case or upper-case.
Transcribe it exactly.
(5) Some codes may not be letters or numbers, but will refer to a symbol of
punctuation, or "white space" such as a carriage return, tab, line feed, or
spaces between words. Transcribe all of it as best you can. Every single
character can be important.
Okay, first person to figure it out, feel free to post it here.
tomorrow or Monday, I'll post some information on where to start grabbing
some of the utilities and decryption software that we'll need later.
"If you're not failing every so often, then you're not trying hard
- Woody Allen