Time
5 hours 21 minutes
Difficulty
Beginner
CEU/CPE
6

Video Transcription

00:00
Hello and welcome to command line basics. In this video, we're gonna learn Lennox Final commands five. I'm Christopher Aller Unless begin,
00:08
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,
00:26
don't worry about it too much. This is a very brief overview toe help you feel comfortable lighted from the command line.
00:34
So pre assessment, once a file is encoded with base 64 it can't be read. This is true or false.
00:43
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,
00:59
readable, compared that with encryption. Unless we have the key, we cannot read an encrypted file.
01:07
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.
01:23
I can't understand it because it's not plain text to me
01:27
now. If I had an interpreter, someone who spoke French and English, they could change that encoding for me.
01:34
That way I could understand the French through that encoding scheme.
01:38
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.
01:53
Now hashing it's a one way algorithm
01:56
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
02:14
and that is used to validate integrity, it cannot be reversed, so hashing is not encryption
02:20
when it is used to verify the integrity of history.
02:25
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.
02:38
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.
02:54
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.
03:04
So let's give a demonstration of this in my legs machine. Let's say I'm going to echo.
03:10
This is my
03:14
included
03:15
string,
03:16
and we could see it echoes this properly to the term. Now I'm going to you,
03:23
Inco this with base 64
03:27
and look at that. If you did not know
03:30
that I typed, this is my encoded string.
03:32
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.
03:45
So let's say we have his output.
03:47
This is our base 64. And Cody, I'm going to copy this,
03:53
and I'm going to echo this into our shell.
03:58
And in order to decode base 64 it's gonna be the basics to four command space dash D for decode
04:05
and check it out. It decoded this non human readable string,
04:12
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
04:23
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.
04:38
So let's say
04:41
you're going thio to the hash of this base 64 incoming. So we're gonna do nd five some
04:48
and check it out as a randy fivesome for that string.
04:53
Now we can run this on the final A swell. So let's say I want to do em defy some on my program
05:00
and there we go. So this is the MD five for this program that I work for myself.
05:05
So This is a very useful way. Thio determine the integrity of a file.
05:11
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.
05:24
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.
05:41
So this is gonna be very similar. I'm going to do this on our base 64 coated string. So shallow one son.
05:50
And as you can see, the shell one,
05:54
uh, some are longer than the MD five is well,
06:00
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.
06:17
All right. Supposed assessment hashes can be reversed to read the encrypted message. is true or false.
06:27
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.
06:39
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.
06:47
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.
06:57
So hashes are very important understand in your career.
07:00
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.

Up Next

Command Line Basics

In this course you will learn the fundamentals of Command Line, a fundamental tool for any user of Windows and Linux machines. Command line allows developers to manipulate files easily and quickly. Learning command line saves developers time and resources.

Instructed By

Instructor Profile Image
Christopher Haller
Senior Intelligence Operations Analyst at Centripetal
Instructor