Hey everybody welcome to the next video.
In this video we're gonna be talking about hex.
Hex is also known as hexadecimal.
Now this is not actually a quote encoding as we've spoken about before but I wanted to touch base on
it because it's important when you're interfacing with memory you're trying to talk to a computer at
a lower level and that's what it's originally designed to do.
Now machines and operating systems computers will interface at a at a binary 1 or 0.
But we need a way to represent our data in a more read a human readable format.
So what we have is hexadecimal for this now.
How does this work.
Now we can identify hex in a few different ways.
So if you've ever worked with graphics or photoshop paint anything that requires a color you have seen
a pound sign with the 6 6 or so digits after it.
That represents a color that is hexadecimal for that particular color.
Again there's H is pretended there's an sign.
In some cases but 0 x.
And then the number is going to be your most common from the security aspect of things.
Now the pound sign is going to be for more graphic stuff.
The and sign is going to be more around the programming side of things when you're referencing a memory
address of a pointer that say but zero x is going to be more on the security side when you're interfacing
with memory memory addresses everything like that.
Now hex uses a base 16 type system we normally count on as a base tense.
We have 10 digits on our fingers so we count as a base 10.
So when we count something we go from zero to nine.
That's 10 digits while hex is this base 16.
That would be like having 16 digits on your hand.
So what it needs is we can go from zero to nine that's perfectly fine.
However when we get to nine we need to we need to still keep going to 16.
So we're going to have the alphabet A through F so every letter between A and F is also considered the
next digit.
So for example a would be the equivalent to 10 B would be eleven.
So you can kind of get there.
So we need to count all the way up to 16 total before we go to the next set which would be you know
one F one A one B.
So keep that in mind.
It's a base 16 so 0 3 9 and 8 do f unfortunately there's not a formula for this.
This is a hex value that has been specifically identified to a specific character of some kind whether
it's Unicode or whether it's an ASCII table when I've had you look up the ascii table if you did that
if you haven't do it now is.
You can see a hex entry for individual digits.
So if you go and look up in ASCII table and you look for a capital A you're going to see forty one in
the hex value so to write that has had to be 0 x forty one.
Now the lower case a 0 x sixty one it's important to note that uppercase and lowercase are two completely
different characters as far as hex is concerned and some in some ways it's the same character but for
hex everything is different that's uppercase lowercase doesn't matter it's going to be a different character
I want you to take a little bit of time go Google an online hex converter to ascii converter.
Play around with it understand what it looks like then when you convert your ASCII to hex take your
hex and then convert it back with an ASCII table not with an online converter to go ahead and give that
a try play around with it get familiar with ASCII zero x forty one is gonna be something you're going
to see quite often Xerox forty two and then forty three you're going to see a lot as well so Xerox forty
two is B capital B zero x forty three is C A lot of people use a as their buffer for exploit development
and then they'll when they find where e eyepiece overwritten they're going to use B's so they can get
exactly four B's to show what what they have overwritten for that register which will go over in the
exploitation course just want to give you an idea that it is used actively for exploitation.