1
00:00:02,140 --> 00:00:06,820
In this section we are going to learn directory bursting and host enumeration.

2
00:00:06,820 --> 00:00:11,260
That is very important concept in website pentesting and bug bounty.

3
00:00:13,810 --> 00:00:20,510
Rectory busting refers to finding directories and pages of a website, whereas in Vhost enumeration

4
00:00:20,540 --> 00:00:23,420
we are looking to find subdomains of a website.

5
00:00:25,400 --> 00:00:28,250
We are going to see two tools in this tutorial.

6
00:00:29,380 --> 00:00:30,810
Go-buster and Alpha.

7
00:00:31,940 --> 00:00:37,550
Go-buster is an open source directory and files Bruteforcing tool written in go programming language.

8
00:00:37,850 --> 00:00:43,250
It is used for discovering hidden files directories on a web server by generating a list of possible

9
00:00:43,250 --> 00:00:46,700
directories and file names and then trying to access them.

10
00:00:47,570 --> 00:00:53,660
Purpose is another tool that is becoming popular due to its fast speed and flexibility that it provides.

11
00:00:58,480 --> 00:01:00,820
Another important concept is word lists.

12
00:01:01,850 --> 00:01:07,670
Word lists are lists of words or phrases that are used in directory and vhost brute forcing to generate

13
00:01:07,670 --> 00:01:09,890
possible directory and host names.

14
00:01:10,860 --> 00:01:16,440
These word lists typically contain common words and phrases that are used in file and directory naming

15
00:01:16,440 --> 00:01:20,520
conventions, as well as common vhost names and subdomains.

16
00:01:21,410 --> 00:01:26,750
We will be using psychedelics for our lecture, which can be installed by using the following command

17
00:01:26,990 --> 00:01:29,030
on Kali Linux or parrot OS.

18
00:01:32,480 --> 00:01:33,620
First of all, let's see.

19
00:01:33,650 --> 00:01:34,760
Directory bursting.

20
00:01:36,370 --> 00:01:40,810
The commands for directory bursting are very simple for both Go-buster and F5.

21
00:01:41,440 --> 00:01:46,930
In go-buster use their flag, specify the URL and the dictionary file.

22
00:01:48,150 --> 00:01:50,850
And if you need to provide the first word.

23
00:01:51,890 --> 00:01:55,250
At the end of where you are going to find the Rectories.

24
00:01:58,320 --> 00:02:04,290
Before finding the files, we can specify the extensions for searching files for that extension in the

25
00:02:04,290 --> 00:02:05,520
specific directory.

26
00:02:06,470 --> 00:02:07,220
In Go-buster.

27
00:02:08,270 --> 00:02:14,090
You can specify the extensions by X flag and list down the extensions with comma in between.

28
00:02:16,840 --> 00:02:19,570
Efforts can also be used to brute force the files.

29
00:02:21,290 --> 00:02:23,870
Extensions are specified with dash e flag.

30
00:02:28,860 --> 00:02:31,560
Now let's see some host enumeration commands.

31
00:02:34,050 --> 00:02:38,340
Rehost rumination is the process of identifying virtual hosts on a web server.

32
00:02:38,940 --> 00:02:43,500
A virtual host is a method of hosting multiple domain names on a single web server.

33
00:02:43,950 --> 00:02:49,380
Each domain name is associated with a unique IP address or port number, and the web server uses this

34
00:02:49,380 --> 00:02:54,050
information to route incoming requests to the appropriate website via host.

35
00:02:54,060 --> 00:02:59,520
Enumeration is often used as part of the recursive phase of a web application pentesting or Vulnerability

36
00:02:59,520 --> 00:03:00,270
assessment.

37
00:03:00,960 --> 00:03:07,080
Attackers can use host enumeration to identify all the virtual hosts hosted on a web server and then

38
00:03:07,080 --> 00:03:10,950
focus their efforts on those hosts that may be vulnerable to attacks.

39
00:03:11,710 --> 00:03:13,090
For Vhost enumeration.

40
00:03:13,090 --> 00:03:13,980
Just use the flag.

41
00:03:13,990 --> 00:03:14,650
Vhost.

42
00:03:14,680 --> 00:03:15,430
Go-buster.

43
00:03:15,730 --> 00:03:19,600
Specify the URL the wordlist and use dash.

44
00:03:19,600 --> 00:03:19,880
Dash.

45
00:03:19,900 --> 00:03:20,500
Append dash.

46
00:03:20,500 --> 00:03:21,880
Domain flag.

47
00:03:22,270 --> 00:03:29,200
For if you need to specify the dash head that specifies the header and specify the host.

48
00:03:31,630 --> 00:03:33,310
So let's see the demonstration.

49
00:03:36,350 --> 00:03:39,710
So I am using web enumeration room from tryhackme.

50
00:03:39,740 --> 00:03:41,480
For demonstration purposes.

51
00:03:43,020 --> 00:03:44,790
Scroll down to Go-buster tasks.

52
00:03:45,030 --> 00:03:50,490
The room first explains different modes that Go-buster uses, which we have already seen.

53
00:03:50,520 --> 00:03:53,610
The dark mode and the host enumeration mode.

54
00:03:55,010 --> 00:03:57,170
Now go to Task six and start the machine.

55
00:03:59,990 --> 00:04:02,240
Here we are provided a website address.

56
00:04:03,610 --> 00:04:06,190
First of all, we need to add this to our host file.

57
00:04:06,730 --> 00:04:11,680
I'm already connected to my Tryhackme VPN, so open a terminal.

58
00:04:12,760 --> 00:04:14,410
And open your host file.

59
00:04:17,579 --> 00:04:19,800
Add the IP address and the domain name.

60
00:04:22,860 --> 00:04:23,790
And save the file.

61
00:04:25,690 --> 00:04:25,800
Do.

62
00:04:25,840 --> 00:04:29,800
You can install go-buster with sudo app install go-buster command.

63
00:04:30,800 --> 00:04:32,900
It's already installed on my Kali machine.

64
00:04:36,820 --> 00:04:44,110
The first question is run a directory scan on the host and find other directories except CS images and

65
00:04:44,110 --> 00:04:45,160
JS directory.

66
00:04:50,140 --> 00:04:51,940
Let's first visit the website.

67
00:04:56,720 --> 00:05:00,740
And we have a static page without any other information.

68
00:05:02,160 --> 00:05:02,670
Dollars.

69
00:05:02,680 --> 00:05:04,710
Just try to bust in with Go-buster.

70
00:05:08,030 --> 00:05:10,310
With the command Go-buster dash you.

71
00:05:13,330 --> 00:05:15,800
The double flag gave the name.

72
00:05:16,390 --> 00:05:17,460
Use the directory list.

73
00:05:17,470 --> 00:05:20,620
2.3 medium word list from cyclist.

74
00:05:22,880 --> 00:05:26,750
Here, you can see that Go-buster has already found some directories.

75
00:05:28,790 --> 00:05:32,150
So we have changes, video and public directory.

76
00:05:32,630 --> 00:05:34,310
Just answer the first question.

77
00:05:42,320 --> 00:05:42,710
No.

78
00:05:42,710 --> 00:05:47,930
In second question, we need to find what file extension exists in the changes directory.

79
00:05:48,400 --> 00:05:51,320
So use the command as shown on the screen.

80
00:05:51,410 --> 00:05:53,990
Specify the extension with dash x flag.

81
00:05:54,080 --> 00:05:59,030
I'm using dash to increase the threads to 32 and using the same dictionary file.

82
00:06:05,510 --> 00:06:10,740
So it has found a few files that changes dconf and bootstrap dot js.

83
00:06:13,240 --> 00:06:16,600
So answer the question on Try hack me with the found extensions.

84
00:06:20,890 --> 00:06:25,360
So the next question is, there is a flag out there that can be found by directory scanning.

85
00:06:25,390 --> 00:06:26,170
Find it.

86
00:06:26,880 --> 00:06:31,010
So we may just check the directories one by one and find the flag file.

87
00:06:34,680 --> 00:06:38,670
Just open the browser and visit the directories one by one.

88
00:06:44,930 --> 00:06:48,140
So we do have a flag file in videos directory.

89
00:06:50,390 --> 00:06:53,050
Let's go up with the flag and paste it on Tryhackme.

90
00:06:57,930 --> 00:07:00,150
No, let's just move to host enumeration.

91
00:07:01,340 --> 00:07:04,580
The next question is there are some virtual hosts running on the server.

92
00:07:04,730 --> 00:07:05,600
What are they?

93
00:07:07,390 --> 00:07:11,590
Open the new terminal with the Go-buster with host flag.

94
00:07:13,080 --> 00:07:16,320
Abusing the worldly subdomains to 1 million from cyclist.

95
00:07:17,550 --> 00:07:18,690
And start the scan.

96
00:07:20,900 --> 00:07:24,650
The go-buster found two subdomains learning and products.

97
00:07:29,080 --> 00:07:30,970
To answer the question, we'll try hack me.

98
00:07:32,270 --> 00:07:33,530
With the subdomains name.

99
00:07:39,010 --> 00:07:46,480
Once you find any subdomains in solving any challenge, just remember to add them to your Etsy host

100
00:07:46,480 --> 00:07:46,930
file.

101
00:07:51,460 --> 00:07:52,720
Now try to visit them.

102
00:07:59,870 --> 00:08:02,990
And you can see that both websites are working now.

103
00:08:08,350 --> 00:08:12,250
So we need to brute force the flag file in both subdomains.

104
00:08:14,620 --> 00:08:16,420
Just use the Go-buster command.

105
00:08:17,430 --> 00:08:20,790
Specify the sub domain and the text extension.

106
00:08:23,130 --> 00:08:26,940
We'll use the same command for learning as well as the product subdomain.

107
00:08:35,570 --> 00:08:38,630
And we have found the flag file if products of domain.

108
00:08:40,650 --> 00:08:42,090
Please visit the website.

109
00:08:44,460 --> 00:08:47,460
Copy the flag and paste it onto a hair clip.

110
00:08:49,950 --> 00:08:52,050
So we have completed the challenges.

111
00:08:52,680 --> 00:08:55,560
Now let's just do the same task with F.

112
00:08:57,320 --> 00:09:00,260
So the first task was to brute force the directories.

113
00:09:03,070 --> 00:09:10,860
Use the command f dash URL and use the same word list of directory list 2.3 medium.

114
00:09:13,510 --> 00:09:16,030
Then you can see that it has found the directories.

115
00:09:20,570 --> 00:09:25,490
Similarly for finding extensions specify the extensions with E flag.

116
00:09:34,790 --> 00:09:36,590
And it has found our extensions.

117
00:09:43,200 --> 00:09:46,620
Similarly, we can use F for enumeration.

118
00:09:47,460 --> 00:09:49,860
Specify the header with dash h flag.

119
00:09:53,730 --> 00:09:57,570
And use the sub domains to a 1 million dictionary file from checklist.

120
00:10:04,880 --> 00:10:05,990
Let's start the scan.

121
00:10:08,300 --> 00:10:11,300
If you get a lot of false positive, stop the scan.

122
00:10:12,810 --> 00:10:14,430
And you can filter the results.

123
00:10:15,360 --> 00:10:16,680
The word size.

124
00:10:17,040 --> 00:10:19,070
By using the flag.

125
00:10:19,080 --> 00:10:22,020
It specifies the word size, which is 205.

126
00:10:22,050 --> 00:10:23,010
In this case.

127
00:10:25,020 --> 00:10:26,940
Well it is found are both subdomains.

128
00:10:28,520 --> 00:10:34,910
Now to find the flag, specify the first keyword after the sub domain and specify the extension.

129
00:10:38,720 --> 00:10:40,910
And it has found the flag dot txt file.

130
00:10:42,430 --> 00:10:51,040
So in this manner we can use F and Go-buster to do directory bursting and vhost enumeration on web applications.

131
00:10:51,670 --> 00:10:54,970
I hope you like this lecture and see you in the next lecture.

