1
00:00:00,270 --> 00:00:08,730
What exactly is legs, so legs is an open source free alternative operating system that can run pretty

2
00:00:08,730 --> 00:00:09,430
much any hardware.

3
00:00:09,450 --> 00:00:14,770
So if you have, like an old laptop somewhere, you can wipe it clean and put Linux on it entirely free.

4
00:00:15,120 --> 00:00:19,760
Typically, Linux is very lightweight and it's very secure by default.

5
00:00:20,310 --> 00:00:25,470
Of course it has vulnerabilities, but it's a little bit more secure than other systems by default.

6
00:00:26,010 --> 00:00:28,860
And then also it's typically a command line focused.

7
00:00:28,860 --> 00:00:34,580
But you can also, you know, get a distribution of Linux that has, you know, Buist.

8
00:00:34,830 --> 00:00:40,220
So there are hundreds of different flavors as people call in the industry.

9
00:00:40,470 --> 00:00:45,930
These are just different versions of Linux and you can just search for them on the Web and you can find

10
00:00:45,930 --> 00:00:50,010
them and see which one, you know, fits you the best, but the one we're going to be using for this

11
00:00:50,010 --> 00:00:53,760
horse and that you would most likely be using, you know, if you were doing this.

12
00:00:54,090 --> 00:01:00,090
Hacking is calling Linux, and it's designed primarily to be used for penetration testing and ethical

13
00:01:00,090 --> 00:01:00,440
hacking.

14
00:01:00,480 --> 00:01:04,750
So let's just go over some of the basics and Linux, you know, so the terminal.

15
00:01:05,700 --> 00:01:11,210
So a lot of the things that you're going to be doing, Linux, is going to be in line, especially with

16
00:01:11,240 --> 00:01:13,080
politics and hacking stuff.

17
00:01:13,080 --> 00:01:16,560
So you're going to have to get used to it, you know, get used to staring at the black box.

18
00:01:16,770 --> 00:01:17,270
All right.

19
00:01:17,730 --> 00:01:23,100
And just the lines and lines of code type stuff now so that you're not really going to be looking at

20
00:01:23,310 --> 00:01:27,440
just going to be looking at the different demands and outputs from it is not anything to say.

21
00:01:27,450 --> 00:01:29,900
Don't worry, we're going to get into Astarte, very basic.

22
00:01:29,910 --> 00:01:33,870
So to access the command line, you're going to need to open a terminal.

23
00:01:34,080 --> 00:01:41,970
So in what you're going to want to do is click that black box you see up there that has a white outline

24
00:01:41,970 --> 00:01:45,250
on it and it's going to open up a terminal from that terminal.

25
00:01:45,250 --> 00:01:46,520
We entering commands.

26
00:01:46,740 --> 00:01:53,820
So I have a list of some of the basic Linux commands that I want to go over, which you guys there's

27
00:01:53,820 --> 00:01:55,500
a handful of commands that you need to know.

28
00:01:55,500 --> 00:01:58,050
You don't have to be like a Linux master to become an ethical hacker.

29
00:01:58,170 --> 00:02:00,960
But there are some commands that you really do need to know.

30
00:02:01,380 --> 00:02:05,430
And, you know, just note that Linux is case sensitive all the time.

31
00:02:05,730 --> 00:02:12,880
So make sure that you're inputting commands exactly how I, you know, show the show, you know.

32
00:02:12,930 --> 00:02:15,690
So just to briefly go over some of the commands.

33
00:02:16,560 --> 00:02:24,350
So who am I to username the current user hostname press the hostname or device puede press the current

34
00:02:24,360 --> 00:02:29,850
directory that you're in, which is just a folder else list out the contents of the current directory

35
00:02:29,850 --> 00:02:33,210
that you're in could followed by the directory name.

36
00:02:33,210 --> 00:02:34,770
It changes to that directory.

37
00:02:36,070 --> 00:02:38,610
Dot backs up about one directory.

38
00:02:38,620 --> 00:02:46,560
So like if I'm in the homeslice user folder, if I post CD enter, it'll take me back to the home folder.

39
00:02:46,710 --> 00:02:50,280
OK, so my dear.

40
00:02:50,520 --> 00:02:51,630
And then a directory name.

41
00:02:51,630 --> 00:02:59,610
So this creates a new directory, R.M. file name at least the file name that you indicate right there.

42
00:03:01,020 --> 00:03:07,650
And then there's RDR delete the least integrated directory Asou Dasht username.

43
00:03:07,650 --> 00:03:10,950
It'll allow you to switch users like in Windows.

44
00:03:10,950 --> 00:03:13,830
We typically have to log in and out in Linux.

45
00:03:13,830 --> 00:03:16,470
You do a command line and it's very, very quick.

46
00:03:16,680 --> 00:03:21,120
You can just as you dash use the name and then you're good to go.

47
00:03:21,270 --> 00:03:23,820
But in the past what are you good suto.

48
00:03:23,820 --> 00:03:29,830
And then any command excuse that command with room privileges, which is the same as administrator privileges

49
00:03:29,910 --> 00:03:35,010
of a pseudo dashi, allows you to switch immediately to the root user account.

50
00:03:35,430 --> 00:03:40,880
And history shows a list of all the reasons commands that you have executed.

51
00:03:41,250 --> 00:03:46,650
So I have config prints out the IP address and network interface information for the system.

52
00:03:46,920 --> 00:03:52,910
And then S.H., MIT and ABC right there is going to be like it's going to be three numbers by the there

53
00:03:52,930 --> 00:03:57,240
of a placeholder and then the filename so that I'll change the permission of the indicative file and

54
00:03:57,240 --> 00:03:58,060
we're going to go over that.

55
00:03:58,080 --> 00:04:02,940
So now let's go over to our colleague, the next machine and actually try some of these commands.

56
00:04:03,090 --> 00:04:06,210
OK, so we're the home screen of our colonics machine.

57
00:04:06,390 --> 00:04:08,670
So this is the terminal box right here.

58
00:04:08,910 --> 00:04:13,380
So click on that and then it should open up a terminal window right here.

59
00:04:13,560 --> 00:04:17,460
So let's go to the commands that we, you know, just went over and I slide really quickly.

60
00:04:17,640 --> 00:04:24,450
So you type in where my inner ear tells me that's my username to see the current username.

61
00:04:24,690 --> 00:04:27,070
You know, the answer to that executed that command.

62
00:04:27,360 --> 00:04:30,420
So now let's try the hostname command post.

63
00:04:30,460 --> 00:04:33,420
They remember I name this this box tally.

64
00:04:33,420 --> 00:04:37,070
So, of course, so puede present working directory.

65
00:04:37,260 --> 00:04:42,690
This tells me that I'm currently in the home county voter and if I wanted to see what was in here,

66
00:04:42,690 --> 00:04:43,840
I'm not sure there's anything in here.

67
00:04:43,980 --> 00:04:47,250
There is so less and less of the contents of the directory.

68
00:04:47,640 --> 00:04:52,720
You can add different switches on else I like to do play.

69
00:04:53,340 --> 00:04:58,350
It shows all files and lists them out like vertically and shows permissions as well.

70
00:04:58,350 --> 00:04:59,760
So that's something that I like to do.

71
00:05:00,090 --> 00:05:05,430
Something you will probably find useful as well as other Haggard and then so let us see it as a blessing

72
00:05:05,430 --> 00:05:05,670
in.

73
00:05:05,820 --> 00:05:13,410
So if I want to change to the documents, folder, its CD documents, and then switch to documents for

74
00:05:13,410 --> 00:05:17,910
voters to affirm that Puedes when Homeslice counted such documents.

75
00:05:18,240 --> 00:05:26,100
So now if I wanted to go back because the SAS should have on record a CD space dat dat and now I'm back

76
00:05:26,100 --> 00:05:27,460
in homes like California.

77
00:05:27,810 --> 00:05:28,440
There you go.

78
00:05:28,620 --> 00:05:38,850
So if I want to make a directory called, you know, hacking tools will do mediaa hacking tools.

79
00:05:39,300 --> 00:05:45,780
And now if we do, unless we see that as a directory there with the switch to it's a CD hacking tools.

80
00:05:45,780 --> 00:05:46,660
So that's pretty cool.

81
00:05:46,920 --> 00:05:47,970
So that's backout.

82
00:05:50,040 --> 00:05:55,540
So let's say that we wanted to remove her file, so I'm just going to make a fire really quick.

83
00:05:55,570 --> 00:05:57,240
This is another listener.

84
00:05:57,480 --> 00:06:00,550
It's called Touch and then a text file.

85
00:06:00,570 --> 00:06:01,500
It just makes a file.

86
00:06:01,510 --> 00:06:03,330
So Nici test file right there.

87
00:06:03,660 --> 00:06:07,880
So what we can do, we can remove this test file.

88
00:06:07,890 --> 00:06:15,810
So if one deleted because it was a mistake, you know, R.M. and then test file and now test files is

89
00:06:15,810 --> 00:06:16,220
no longer.

90
00:06:16,500 --> 00:06:17,520
There you go.

91
00:06:17,970 --> 00:06:22,710
So now armed are the other remove function we can take.

92
00:06:22,710 --> 00:06:25,230
We can get rid of the hacking tools that we need.

93
00:06:26,010 --> 00:06:29,730
Oh and also at any time with Lennix, this is a quick little nugget.

94
00:06:29,880 --> 00:06:35,830
You can hit tab when you starting to type things and it'll autocomplete it for you as very useful.

95
00:06:35,830 --> 00:06:40,830
We don't need trying to rush or it just makes things a little bit easier and you get into the flow a

96
00:06:40,830 --> 00:06:41,080
lot.

97
00:06:41,100 --> 00:06:44,150
You'll start seeing that using the tag function a lot.

98
00:06:44,340 --> 00:06:48,780
But anyway, so armed you are hacking tools is no longer there.

99
00:06:48,990 --> 00:06:53,080
So now let's say I wanted to switch to another user.

100
00:06:53,100 --> 00:06:59,310
I don't think I'm another user here, but let's see if DSU Caleigh and then you put in a password,

101
00:07:00,390 --> 00:07:03,180
super secret password and it switches to that user.

102
00:07:03,270 --> 00:07:13,170
I don't think I have any other uses on here, but we can do a pseudo dashi and this will allow us to

103
00:07:13,170 --> 00:07:16,810
switch to root them.

104
00:07:17,000 --> 00:07:18,090
And now I'm the root user.

105
00:07:18,300 --> 00:07:24,240
And if any time you switch users or anything or you switch to room, you just type in exit and you can

106
00:07:24,240 --> 00:07:25,020
get right out of it.

107
00:07:25,140 --> 00:07:32,190
So also, if I wanted to do like let's say like this directory here, I can see right now and list out

108
00:07:32,190 --> 00:07:34,320
the directory, everything is in it.

109
00:07:34,320 --> 00:07:39,990
But if I didn't have rights to this folder, like maybe it was owned by Rupert and I couldn't see any

110
00:07:39,990 --> 00:07:44,700
of this stuff and I couldn't I could see this coming in here, I would do a pseudo command and then

111
00:07:44,700 --> 00:07:45,600
I would do less.

112
00:07:46,260 --> 00:07:52,140
And typically the pseudo command will also, depending on how your system is set up, it'll ask you

113
00:07:52,320 --> 00:07:55,950
for your password, but it doesn't always do that.

114
00:07:56,130 --> 00:08:03,210
But also note that when you do, you suto in last, I'm not sure the exact time interval, but it lasts

115
00:08:03,210 --> 00:08:09,330
for a good while after you do Souto and then you want to do it again for a while until you don't execute

116
00:08:09,330 --> 00:08:10,390
any commands for a while.

117
00:08:10,620 --> 00:08:16,620
So moving on to the next command, let's say we want to see what we've been doing because there's something

118
00:08:16,620 --> 00:08:20,250
I did earlier that I need to doing in because I need to see it.

119
00:08:20,460 --> 00:08:21,420
This is very helpful.

120
00:08:21,430 --> 00:08:26,390
So you type in the history enter and it shows you the history of your commands.

121
00:08:26,520 --> 00:08:30,980
So then I have config, which is going to show us our networking information.

122
00:08:30,990 --> 00:08:35,310
So the way this county VM is set up is different than the older ones.

123
00:08:35,310 --> 00:08:36,630
You actually have to do pseudo.

124
00:08:37,020 --> 00:08:43,290
I have config and then it'll show you everything is set up a little bit more secure than the older ones

125
00:08:43,290 --> 00:08:43,430
were.

126
00:08:43,450 --> 00:08:45,480
So we have to destroy disruptively then.

127
00:08:46,020 --> 00:08:47,070
You might not have to do that.

128
00:08:47,070 --> 00:08:48,660
But the way they set these, you have to.

129
00:08:49,380 --> 00:08:56,600
So now let's make another five really quick because we are in homeground, so let's make another file.

130
00:08:57,630 --> 00:09:09,600
So touch test file too, just because so we see test pilot who is there and we see sorry else.

131
00:09:10,500 --> 00:09:13,140
Just so sometimes it gets a little bit overwhelming.

132
00:09:13,140 --> 00:09:13,530
We do.

133
00:09:13,530 --> 00:09:17,790
l'Est, L.A. so with the test file too.

134
00:09:17,790 --> 00:09:24,830
So you can see that the owner of the file, which is Calli, we see equally twice.

135
00:09:25,140 --> 00:09:27,630
So the first one represents the owner of the file.

136
00:09:27,630 --> 00:09:30,760
The second one represents the group that the file belongs to.

137
00:09:30,960 --> 00:09:36,060
So the owner of the file has read write access, which is represented by the RW that you see there.

138
00:09:36,060 --> 00:09:41,150
And the group actually has read access and then everyone else has read access as well.

139
00:09:41,460 --> 00:09:46,290
So this is typically how you'll see Linux permissions and that's how you would interpret them.

140
00:09:46,500 --> 00:09:50,370
So we can change these permissions, if you want, with the C H Marchman.

141
00:09:50,550 --> 00:09:56,940
So besiegement and then those numbers I talked about before where the ABC was the placeholders.

142
00:09:57,180 --> 00:10:02,940
So let's say we want to make sure everybody can see and read this file and executed if it's the executable

143
00:10:02,940 --> 00:10:14,340
file, we my 777 and then test file two and now Tesfai to execute a moulis when it color changed.

144
00:10:14,490 --> 00:10:22,710
And now everyone has read, write and execution access accessing look are more specifics of the Linux

145
00:10:22,710 --> 00:10:23,250
permissions.

146
00:10:23,250 --> 00:10:24,720
I'm not going to go over them in detail here.

147
00:10:25,020 --> 00:10:30,030
Gonna confuse me, but I'll include something in the resources for you guys to be able to go learn a

148
00:10:30,030 --> 00:10:34,350
little bit more about Linux permissions, because it's something that's very important to learn as well.
