1
00:00:00,940 --> 00:00:04,740
Hello everyone and welcome to the password sniffer project.

2
00:00:04,840 --> 00:00:10,540
Since we finished our arsenal for the best idea would be to continue with a project that we can combine

3
00:00:10,540 --> 00:00:14,850
with our arsenal for in order to be able to do a complete attack.

4
00:00:14,890 --> 00:00:19,870
We already know the cover ups for four can create man in the middle that allows us to sniff the packets

5
00:00:19,870 --> 00:00:25,480
from the target machine that we specify and right now we need the passwords sniffer that will be able

6
00:00:25,480 --> 00:00:30,100
to extract usernames and passwords from all the packets that flow by.

7
00:00:30,940 --> 00:00:32,380
Therefore let's get this going.

8
00:00:32,380 --> 00:00:39,910
Hopefully you're excited and let's create the new project go on file new project and password sniffer

9
00:00:41,100 --> 00:00:42,780
let's call it like that.

10
00:00:42,790 --> 00:00:44,730
We want to create it in a separate window

11
00:00:47,640 --> 00:00:52,800
creating the virtual environment as usual and for this project we're going to use some libraries that

12
00:00:52,800 --> 00:00:55,160
we haven't encountered before.

13
00:00:55,350 --> 00:00:57,260
So let's import them straight away.

14
00:00:57,280 --> 00:01:01,010
We're going to create our file new python file.

15
00:01:01,040 --> 00:01:06,440
Now let's call it pass dash sniffer dot B Y.

16
00:01:06,510 --> 00:01:07,590
Simple as that.

17
00:01:07,590 --> 00:01:14,370
We are going to need this KP library which we used before so not really to explain right here.

18
00:01:14,370 --> 00:01:17,880
And we will also need the U.R.L. lib library

19
00:01:24,150 --> 00:01:25,110
alright.

20
00:01:25,130 --> 00:01:31,040
And the third library that we are going to need is going to be the R E or the regex library and the

21
00:01:31,040 --> 00:01:35,720
radical library is something that we are going to need in order to extract the usernames and passwords

22
00:01:35,870 --> 00:01:37,640
from the entire packet.

23
00:01:37,640 --> 00:01:38,820
All right.

24
00:01:38,870 --> 00:01:42,230
Now our program will have two different functions.

25
00:01:42,230 --> 00:01:45,260
One of the functions will pass the packets that we sniff.

26
00:01:45,770 --> 00:01:51,680
And the second function will try to extract the user name and password from those packets.

27
00:01:51,950 --> 00:01:57,380
But before we do any of that and before we code those two functions we first of all need to start sniffing

28
00:01:57,380 --> 00:01:59,130
for the packets.

29
00:01:59,150 --> 00:02:01,850
Now let's imagine that our article 4 is running.

30
00:02:01,850 --> 00:02:08,720
So what we will want to do is we want to try to sniff those packets and this sniff function is something

31
00:02:08,720 --> 00:02:11,730
that exists in KP So we don't really need to code it.

32
00:02:11,840 --> 00:02:18,370
We simply just specify sniff and it will gather all the packets on the specified interface sounds.

33
00:02:18,370 --> 00:02:18,750
Right.

34
00:02:19,060 --> 00:02:23,110
So since I said that it will get the packets on a specified interface.

35
00:02:23,110 --> 00:02:31,030
Therefore we need to specify the interface we will select the eye face to be equal to eye face and we

36
00:02:31,030 --> 00:02:32,590
can code up here.

37
00:02:32,590 --> 00:02:35,210
I fail to be equal to your interface.

38
00:02:35,320 --> 00:02:37,550
In my case that is ADHD.

39
00:02:38,170 --> 00:02:43,450
Now in order to check out what is the name of your interface you simply just open up your terminal and

40
00:02:43,450 --> 00:02:46,060
you can type IV config.

41
00:02:46,060 --> 00:02:55,000
The interface is the name right here since I'm using ethernet cable and clinics and this is the actual

42
00:02:55,150 --> 00:03:01,890
interface which I am using to connect to the internet I will specify this name inside of my program.

43
00:03:02,020 --> 00:03:07,930
If you are for example using a part of this adapter you want to specify this interface you want to specify

44
00:03:07,930 --> 00:03:11,910
the wireless adapter which you are using to connect to the Internet.

45
00:03:12,040 --> 00:03:17,290
If you're simply just connecting over the attachment cable like me feel free to specify the Ethernet

46
00:03:17,380 --> 00:03:18,240
interface.

47
00:03:18,380 --> 00:03:18,880
All right.

48
00:03:18,880 --> 00:03:19,690
Simple as that.

49
00:03:19,720 --> 00:03:21,180
Let's close this.

50
00:03:21,310 --> 00:03:25,860
Now that we got that out of the way let's continue with our sneak function.

51
00:03:26,140 --> 00:03:32,230
The next parameter is going to be p r n which simply means whatever we specified after the equal sign

52
00:03:33,310 --> 00:03:39,930
that function will be used in order to pass the packets that we sniffed using this function.

53
00:03:40,060 --> 00:03:45,670
So we're going to create later on a function called packet parser.

54
00:03:45,670 --> 00:03:49,780
And the third parameter and last parameter is going to be store to be equal to zero.

55
00:03:49,780 --> 00:03:53,550
So we don't want to store anything whether we want to save it anywhere.

56
00:03:53,560 --> 00:03:55,620
We simply just wanted to flow by.

57
00:03:56,420 --> 00:03:56,830
All right.

58
00:03:56,830 --> 00:04:00,860
So as I mentioned before there are two functions that we are going to need.

59
00:04:00,880 --> 00:04:06,580
The first one will be the packet parser which we use to pass the packets from our sniff function as

60
00:04:06,580 --> 00:04:08,560
we can see right here.

61
00:04:08,560 --> 00:04:16,870
So packet parser this packet parser would take one parameter which will be the packet itself or we can

62
00:04:16,870 --> 00:04:30,400
simply type it like this packet and the second function would be define get log in pass and this function

63
00:04:30,400 --> 00:04:35,830
would also take a parameter of which will be well for now and we're not we're going to leave it without

64
00:04:35,830 --> 00:04:38,350
the parameter and we're going to add later on.

65
00:04:38,800 --> 00:04:40,390
We created these two functions.

66
00:04:40,450 --> 00:04:45,950
All we're left to do is run the code inside them but let's not get ahead.

67
00:04:46,120 --> 00:04:52,090
We're just going to leave them for this video and right here we're going to add B except statement of

68
00:04:52,090 --> 00:05:01,150
course keyboard to interrupt if we interrupt the keyboard then we can print for example exiting and

69
00:05:01,150 --> 00:05:09,030
we can then this or we can simply just exit the program since we don't have the CIS library important.

70
00:05:09,070 --> 00:05:15,210
And one more thing before we finish off with this video is that we need to install this KP library.

71
00:05:15,430 --> 00:05:16,420
We know how to do that.

72
00:05:16,450 --> 00:05:23,930
P 3 install KP and after these downloads we should be good to go and which should be ready to code.

73
00:05:23,930 --> 00:05:27,240
These two functions in the next few readers.

74
00:05:27,350 --> 00:05:32,240
So thank you for watching this introductory video on passport sniffer and I will see you in the next

75
00:05:32,240 --> 00:05:33,680
lecture by.
