5 hours 21 minutes
Hello and welcome to command line basics. In this video, we're gonna learn Lennox Final commands five. I'm Christopher Aller Unless begin,
So are lending objectives for this video. We're gonna do a quick refresher on hashes and encoding the differences between them and what you can expect. We're gonna understand. The base 64 command learned the MD five some command and learn the shall one command. And if you're not very familiar with any cryptography you hashing or encoding,
don't worry about it too much. This is a very brief overview toe help you feel comfortable lighted from the command line.
So pre assessment, once a file is encoded with base 64 it can't be read. This is true or false.
The answer is false. So encoding by itself it will change it. So it's not human readable. But the encoding is always reversible. So even though we encoded it with basics before we can decode it with base 64 again, that way it could be human, readable,
readable, compared that with encryption. Unless we have the key, we cannot read an encrypted file.
All right, So kind of refreshing on hash Shannon coding encoding changes plain text, and it is easily reversible. So imagine you know, I speak English and let's say there's somebody else in the room that speaks French, even though they may be speaking French to me.
I can't understand it because it's not plain text to me
now. If I had an interpreter, someone who spoke French and English, they could change that encoding for me.
That way I could understand the French through that encoding scheme.
And, uh, this is a very useful, you know, easy way to kind of remember how encoding works, and it's important to understand that encoding is reversible. So it's not a valid way to store a secret.
Now hashing it's a one way algorithm
and hashing is used to verify integrity for either a string or for a file. And hashes uses all sorts of these different algorithms running over and over again in order to be able to specifically output a fixed string of characters
and that is used to validate integrity, it cannot be reversed, so hashing is not encryption
when it is used to verify the integrity of history.
All right, so based 64 what we're gonna do is going to take standard input standard output. Pipe it into the base 64 command, and it will encode it into these non human, readable characters.
So this is used for file transfers, e mails and all sorts of different things that you'll see on the Internet. And it's also commonly used to you office gate malware commands or hide, you know, different power show commands. So this is something you will see in your cybersecurity career pretty often.
So it's important to be comfortable with basics before and know how to decrypt or decode base 64 in the command line as well.
So let's give a demonstration of this in my legs machine. Let's say I'm going to echo.
This is my
and we could see it echoes this properly to the term. Now I'm going to you,
Inco this with base 64
and look at that. If you did not know
that I typed, this is my encoded string.
Don't even begin to tell me that you can understand. That is what that means. This is not human readable. I can't understand this. You can't understand it. Computers can understand if we tell it how to.
So let's say we have his output.
This is our base 64. And Cody, I'm going to copy this,
and I'm going to echo this into our shell.
And in order to decode base 64 it's gonna be the basics to four command space dash D for decode
and check it out. It decoded this non human readable string,
and it decoded it to This is my encoded strength. So this is a very useful way to quickly encode and decode. Uh, these strings
so empty five some is a hashing algorithm and he uses the empty five hashing algorithm and provides hasher there a file or standard input or for a string, very useful way to determine the integrity of something.
So let's say
you're going thio to the hash of this base 64 incoming. So we're gonna do nd five some
and check it out as a randy fivesome for that string.
Now we can run this on the final A swell. So let's say I want to do em defy some on my program
and there we go. So this is the MD five for this program that I work for myself.
So This is a very useful way. Thio determine the integrity of a file.
And just like the NT five, some we have the show won some. And this is another command, just like the previous one, where except it would use the shall one algorithm instead of the empty five some.
And there's also you shot 2 56 summers won't if you want to do a shot to 56 hash and, uh, just like the base 64 the Indy five some, it will be used on standard outplayed standard input and, uh, you know, on the file as well.
So this is gonna be very similar. I'm going to do this on our base 64 coated string. So shallow one son.
And as you can see, the shell one,
uh, some are longer than the MD five is well,
because it's running more difficult and longer different types of encryption or not encryption. Excuse me algorithms to create this, uh, hash. And if you're interested in this kind of stuff on highly recommend looking enough online learning more about this topic work topsy.
All right. Supposed assessment hashes can be reversed to read the encrypted message. is true or false.
The answer is false. Hashes cannot be reversed, so this is something you'll see if you haven't learned already. Hashes are used to store passwords in a system because they cannot be reversed.
The system always hashes three password that he's it provides and compares it with the hash inside of the password of the shadow file.
So this could be very useful. Thio validate the integrity of a password. Validate the integrity of a file that it wasn't changed or modified.
So hashes are very important understand in your career.
All right, so in this video, we learned a refresher on hashes and encoding. Understood the base 64 command learning the MD five. Some command and learned the shell one. Some command and I hope to see you in the next video.
SOC Analyst Assessment Level 1
Cydefe's SOC Analyst Assessment, Level 1, Capture-the-Flag (CTF) Assessment
How to Use GDB (BSWJ)
In this part of the Breaking Stuff with Joe (BSWJ) series, Joe Perry demonstrates how ...
Certificate of Completion Offered