WEBVTT - This file was automatically generated by VIMEO

0
00:00:04.900 --> 00:00:07.700
Hello everyone. So in

1
00:00:07.700 --> 00:00:10.300
 this video we are going to see how to

2
00:00:10.300 --> 00:00:13.800
 use nmap script arguments. So

3
00:00:13.800 --> 00:00:15.800
 what are script arcs?

4
00:00:16.500 --> 00:00:19.900
So in nmap, whenever you're going to use any script,

5
00:00:19.900 --> 00:00:22.500
 you can specify your own

6
00:00:22.500 --> 00:00:26.200
 arguments also, so basically in

7
00:00:25.200 --> 00:00:28.800
 this video we are going to see how we

8
00:00:28.800 --> 00:00:31.600
 can specify arguments to a

9
00:00:31.600 --> 00:00:34.600
 NEC script in which we are going to give our

10
00:00:34.600 --> 00:00:38.000
 own username and password word list.

11
00:00:39.600 --> 00:00:42.600
So the syntax of doing this particular scan is

12
00:00:42.600 --> 00:00:45.700
 and map Target IP hyphen hyphen

13
00:00:45.700 --> 00:00:48.200
 script equals to the script name and then

14
00:00:48.200 --> 00:00:49.600
 hyphen hyphen script

15
00:00:50.700 --> 00:00:52.800
hyphen, args and the arguments

16
00:00:54.100 --> 00:00:57.300
you can always add hyphen V to see the output in verbose mode

17
00:00:57.300 --> 00:01:00.400
 the example of doing this scan is nmap. The

18
00:01:00.400 --> 00:01:03.300
 target IP address followed by hyphen hyphen

19
00:01:03.300 --> 00:01:06.700
 script equals to the script name and hyphen hyphen script hyphen

20
00:01:06.700 --> 00:01:09.300
 arcs and you can specify the arguments.

21
00:01:10.500 --> 00:01:13.000
So it is the Practical time and let's see this type of

22
00:01:13.500 --> 00:01:14.100
 scan in action.

23
00:01:14.800 --> 00:01:18.000
as you can see on the screen, I have written nmap

24
00:01:17.400 --> 00:01:20.600
 -script FTP hyphen

25
00:01:20.600 --> 00:01:23.700
 brute, which means I'm going to use a script

26
00:01:23.700 --> 00:01:24.300
 which is

27
00:01:25.200 --> 00:01:28.500
used for brute forcing the FTP username and

28
00:01:28.500 --> 00:01:28.700
 password

29
00:01:31.200 --> 00:01:34.500
now you should know that nmap has its own

30
00:01:34.500 --> 00:01:37.800
 word list of username and password, but I

31
00:01:37.800 --> 00:01:40.900
 want to specify my own made custom

32
00:01:40.900 --> 00:01:44.200
 word list, which is basically nothing a

33
00:01:43.200 --> 00:01:44.500
 username.

34
00:01:45.300 --> 00:01:48.400
dot txt file and a password dot txt

35
00:01:48.400 --> 00:01:50.000
 file in which I have put

36
00:01:51.200 --> 00:01:52.800
some usernames and passwords

37
00:01:54.200 --> 00:01:57.800
so you can see here. I'm going to use this particular script

38
00:01:57.800 --> 00:02:00.600
 and I'm going to specify some arguments.

39
00:02:01.900 --> 00:02:04.700
Which is hyphen hyphen script hyphen args,

40
00:02:04.700 --> 00:02:06.000
 what are the arguments?

41
00:02:07.300 --> 00:02:10.500
Here I'm saying the user DB which is

42
00:02:10.500 --> 00:02:13.400
 the username should be located from this particular

43
00:02:13.400 --> 00:02:16.800
 path that is uses Rohit and

44
00:02:16.800 --> 00:02:19.000
 map for list username.txt. This is

45
00:02:19.100 --> 00:02:22.200
 the part that I have given and the password should be

46
00:02:22.200 --> 00:02:25.200
 retrieved or the password should be

47
00:02:25.200 --> 00:02:28.400
 fetched from this particular path. Where is the

48
00:02:28.400 --> 00:02:29.500
 passwords are saved?

49
00:02:30.200 --> 00:02:33.900
Run the script on put 999 because

50
00:02:33.900 --> 00:02:36.500
 FTP is running on this particular

51
00:02:36.500 --> 00:02:37.000
 port.

52
00:02:38.300 --> 00:02:38.900
on the target

53
00:02:39.800 --> 00:02:42.900
Okay - p n not to do ping

54
00:02:42.900 --> 00:02:46.100
 Discovery. This is our Target IP hyphen

55
00:02:45.100 --> 00:02:48.500
 SV stands for service version detection

56
00:02:48.500 --> 00:02:51.500
 and I want to see all the output on my screen in

57
00:02:51.500 --> 00:02:52.700
 verbose mode.

58
00:02:54.500 --> 00:02:54.900
Perfect.

59
00:02:56.400 --> 00:02:59.700
So now we are going to copy this particular script

60
00:02:59.700 --> 00:03:02.600
 and then we are going to paste this onto

61
00:03:02.600 --> 00:03:05.500
 our terminal and the brute forcing will

62
00:03:05.500 --> 00:03:06.700
 automatically start.

63
00:03:07.700 --> 00:03:10.100
Remember in user DB you have to

64
00:03:10.100 --> 00:03:13.400
 give the path of the username file in

65
00:03:13.400 --> 00:03:16.500
 past DB you have to give the path of

66
00:03:16.500 --> 00:03:18.100
 the password file.

67
00:03:21.200 --> 00:03:24.500
this is the custom port number where FTP is running the target IP

68
00:03:24.500 --> 00:03:27.400
 address followed by hyphen SV and

69
00:03:27.400 --> 00:03:30.200
 to see the output inverse mode - we

70
00:03:37.600 --> 00:03:40.200
so now let me just copy this go into my

71
00:03:41.300 --> 00:03:44.400
Terminal as you can see, this port number is running

72
00:03:44.400 --> 00:03:47.600
 FTP. We have already identified by running a

73
00:03:47.600 --> 00:03:49.600
 scan as you can see over here.

74
00:03:53.900 --> 00:03:54.000
now

75
00:03:57.100 --> 00:04:00.600
I'm going to paste our script and I'm going to hit enter.

76
00:04:00.600 --> 00:04:03.800
 So the brute forcing will automatically start

77
00:04:03.800 --> 00:04:06.600
 and nmap will identify the correct

78
00:04:06.600 --> 00:04:07.900
 username and password.

79
00:04:12.500 --> 00:04:13.700
This is the username file.

80
00:04:14.700 --> 00:04:17.300
And this is the password file, which is

81
00:04:17.300 --> 00:04:19.000
 been used by nmap.

82
00:04:20.100 --> 00:04:23.300
Let me show you where I have created. This this have been created in

83
00:04:23.300 --> 00:04:26.900
 the users Rohit and map word list folder. This

84
00:04:26.900 --> 00:04:29.100
 is the same path which nmap is

85
00:04:29.100 --> 00:04:29.900
 using right now.

86
00:04:33.700 --> 00:04:35.500
I will just skip this scan.

87
00:04:36.100 --> 00:04:38.800
And directly jump to the output the results.

88
00:04:39.600 --> 00:04:43.200
As you can see here, we have got the output wherein

89
00:04:42.200 --> 00:04:45.200
 we have we can see the output of

90
00:04:45.200 --> 00:04:48.600
 the FTP root script is we have found out

91
00:04:48.600 --> 00:04:51.600
 two valid credentials. What are those two valid

92
00:04:51.600 --> 00:04:54.200
 credentials? First one is Rohit.

93
00:04:55.300 --> 00:04:58.200
And Rohit username is Rohit password is Rohit the second

94
00:04:58.200 --> 00:05:01.500
 one we have found out is admin admin. So we have

95
00:05:01.500 --> 00:05:04.600
 found out two valid credentials and one more which is

96
00:05:04.600 --> 00:05:07.300
 anonymous anonymous. So in total, we have

97
00:05:07.300 --> 00:05:10.500
 found out three valid credentials which

98
00:05:10.500 --> 00:05:13.600
 are running on this particular port and

99
00:05:13.600 --> 00:05:16.800
 these are the username and password through which an attacker

100
00:05:16.800 --> 00:05:18.000
 can login into

101
00:05:19.200 --> 00:05:20.700
so I hope you guys understood this.

102
00:05:21.900 --> 00:05:22.300
Thank you.
