1
1

00:00:00,600  -->  00:00:02,370
<v Instructor>Google hacking.</v>
2

2

00:00:02,370  -->  00:00:04,380
Now, when I talk about Google hacking
3

3

00:00:04,380  -->  00:00:07,290
I'm not talking about hacking Google servers.
4

4

00:00:07,290  -->  00:00:08,700
That's not really what we mean here
5

5

00:00:08,700  -->  00:00:10,980
and this often gets students confused.
6

6

00:00:10,980  -->  00:00:13,890
Google hacking is a form of open source intelligence.
7

7

00:00:13,890  -->  00:00:15,930
It's an open source intelligence technique
8

8

00:00:15,930  -->  00:00:17,760
that uses Google search operators to
9

9

00:00:17,760  -->  00:00:20,670
locate vulnerable web servers and applications.
10

10

00:00:20,670  -->  00:00:23,520
Basically, we can do advanced searches using Google to
11

11

00:00:23,520  -->  00:00:25,230
find all sorts of information
12

12

00:00:25,230  -->  00:00:28,380
because Google is one of the best search engines out there.
13

13

00:00:28,380  -->  00:00:29,910
Now, there are lots of different things that we
14

14

00:00:29,910  -->  00:00:32,370
can do when we're doing these advanced operations.
15

15

00:00:32,370  -->  00:00:35,130
We can use things like quotes, not,
16

16

00:00:35,130  -->  00:00:39,090
and and or, Scope, and URL modifiers.
17

17

00:00:39,090  -->  00:00:41,340
Let's talk about each of these really quickly.
18

18

00:00:41,340  -->  00:00:43,050
First, we have quotes.
19

19

00:00:43,050  -->  00:00:44,310
When you use double quotes
20

20

00:00:44,310  -->  00:00:46,380
you get to specify the exact phrase
21

21

00:00:46,380  -->  00:00:48,720
and make a search much more precise.
22

22

00:00:48,720  -->  00:00:52,650
For example, if I wanted to have the word Jason Dion
23

23

00:00:52,650  -->  00:00:54,330
if I just type them into the Google search
24

24

00:00:54,330  -->  00:00:56,640
with Jason Space Dion, you're going to end
25

25

00:00:56,640  -->  00:01:00,570
up finding everything that relates to Jason or Dion or both.
26

26

00:01:00,570  -->  00:01:03,289
But if you put quote Jason Dion, you're only
27

27

00:01:03,289  -->  00:01:07,293
going to find words that have Jason Dion together like that.
28

28

00:01:07,293  -->  00:01:08,940
Now, that's kind of a silly example
29

29

00:01:08,940  -->  00:01:11,190
but you could see how this could be very useful
30

30

00:01:11,190  -->  00:01:12,630
as you're trying to narrow down the results
31

31

00:01:12,630  -->  00:01:15,660
for a specific phrase or term that you're looking for.
32

32

00:01:15,660  -->  00:01:18,270
The next thing we want to talk about is the not operator.
33

33

00:01:18,270  -->  00:01:21,300
Now, the not operator uses the minus sign in front of a word
34

34

00:01:21,300  -->  00:01:24,480
or quoted phrase to take that out of your search results
35

35

00:01:24,480  -->  00:01:26,550
so you don't find that in the results.
36

36

00:01:26,550  -->  00:01:29,580
For example, if I wanted to find all of the examples
37

37

00:01:29,580  -->  00:01:33,930
of CYSA, but I didn't want anything from Dion training
38

38

00:01:33,930  -->  00:01:38,610
I could type in CYSA space minus Dion Training
39

39

00:01:38,610  -->  00:01:40,800
and that will give me all the CYSA results
40

40

00:01:40,800  -->  00:01:43,560
without any of the Dion training results.
41

41

00:01:43,560  -->  00:01:46,350
The next thing we want to talk about is ands and ors.
42

42

00:01:46,350  -->  00:01:48,270
These are logical operators
43

43

00:01:48,270  -->  00:01:50,430
and they're used to require both search terms
44

44

00:01:50,430  -->  00:01:53,100
if you use the and, or either search term
45

45

00:01:53,100  -->  00:01:54,300
if you use the or.
46

46

00:01:54,300  -->  00:01:57,210
Much like I said, Jason Dion in quotes
47

47

00:01:57,210  -->  00:01:59,700
gave me Jason and Dion that would give it
48

48

00:01:59,700  -->  00:02:01,890
to me only if they're right next to each other.
49

49

00:02:01,890  -->  00:02:04,950
But what if I want every result out there that had Jason
50

50

00:02:04,950  -->  00:02:08,160
and Dion in it, but I didn't want them necessarily together?
51

51

00:02:08,160  -->  00:02:11,250
For instance, maybe I wanted Jason, middle name, Dion
52

52

00:02:11,250  -->  00:02:12,510
or something like that.
53

53

00:02:12,510  -->  00:02:17,010
Well, I could just put Jason, the and symbol, and then Dion
54

54

00:02:17,010  -->  00:02:20,040
or if I wanted to use the or and get Jason or Dion
55

55

00:02:20,040  -->  00:02:23,070
I could use Jason O R for or
56

56

00:02:23,070  -->  00:02:25,980
and then Dion or use the pipe character, the up and down
57

57

00:02:25,980  -->  00:02:28,200
which is also the character for or.
58

58

00:02:28,200  -->  00:02:29,880
The next advanced search term we want to talk
59

59

00:02:29,880  -->  00:02:31,830
about is defining your scope.
60

60

00:02:31,830  -->  00:02:33,540
Now, you can have different keywords that are
61

61

00:02:33,540  -->  00:02:35,730
used to select the scope of the search.
62

62

00:02:35,730  -->  00:02:39,960
Things like site, file type, related, all in title
63

63

00:02:39,960  -->  00:02:42,360
all in URL, or all in anchor.
64

64

00:02:42,360  -->  00:02:44,220
Based on these, you'll put in the word
65

65

00:02:44,220  -->  00:02:47,880
like file type, a colon, and then the file type you want.
66

66

00:02:47,880  -->  00:02:50,640
For example, if I wanted to search for just PDF files
67

67

00:02:50,640  -->  00:02:53,820
I could type file type colon pdf, and then
68

68

00:02:53,820  -->  00:02:55,920
whatever my search term was, and I would get only
69

69

00:02:55,920  -->  00:02:59,160
results that had PDFs containing that search term.
70

70

00:02:59,160  -->  00:03:02,190
<v ->Lastly, we can use a URL modifier.</v>
71

71

00:03:02,190  -->  00:03:03,720
Now, these modifiers can be added
72

72

00:03:03,720  -->  00:03:06,420
to the results page to affect your results.
73

73

00:03:06,420  -->  00:03:08,790
These are things like, and PWS equals zero
74

74

00:03:08,790  -->  00:03:11,310
which means don't give me personalized results
75

75

00:03:11,310  -->  00:03:13,320
or and filter equals zero, which says
76

76

00:03:13,320  -->  00:03:17,820
don't filter the results or, and TBS equals li:one
77

77

00:03:17,820  -->  00:03:20,250
which says, do not autocorrect my search terms.
78

78

00:03:20,250  -->  00:03:22,740
Search for it exactly as I typed it.
79

79

00:03:22,740  -->  00:03:26,010
All of these are different ways to modify your URL.
80

80

00:03:26,010  -->  00:03:27,300
Now, another thing we need to talk about
81

81

00:03:27,300  -->  00:03:28,770
when we talk about search hacking
82

82

00:03:28,770  -->  00:03:33,570
and Google hacking is the Google hacking database or GHDB.
83

83

00:03:33,570  -->  00:03:36,120
Now, the Google Hacking database provides a database
84

84

00:03:36,120  -->  00:03:38,160
of different search strings that you can use
85

85

00:03:38,160  -->  00:03:39,240
that are already optimized
86

86

00:03:39,240  -->  00:03:42,210
for locating vulnerable websites and services.
87

87

00:03:42,210  -->  00:03:44,400
This site is maintained by offensive security
88

88

00:03:44,400  -->  00:03:46,920
and it contains an entire database of different
89

89

00:03:46,920  -->  00:03:49,290
search strings that you can use that are pre-run.
90

90

00:03:49,290  -->  00:03:51,630
We like to call these Google dorks.
91

91

00:03:51,630  -->  00:03:52,590
You could see here on the screen
92

92

00:03:52,590  -->  00:03:54,030
we have a couple of examples,
93

93

00:03:54,030  -->  00:03:55,890
and notice they're basically giving you information
94

94

00:03:55,890  -->  00:03:56,760
that you can use.
95

95

00:03:56,760  -->  00:04:00,120
For example, if you have in title, WebView login,
96

96

00:04:00,120  -->  00:04:03,390
alcatel lucent, that might be something to identify switches
97

97

00:04:03,390  -->  00:04:05,250
and routers that are alcatel lucent
98

98

00:04:05,250  -->  00:04:07,950
that have a login page that's available online, or maybe
99

99

00:04:07,950  -->  00:04:10,710
we have something like in title, index of
100

100

00:04:10,710  -->  00:04:12,600
WP Security Audit log.
101

101

00:04:12,600  -->  00:04:13,920
That may be something that provides us
102

102

00:04:13,920  -->  00:04:14,940
with interesting results
103

103

00:04:14,940  -->  00:04:17,862
if we're a penetration tester or a bad actor.
104

104

00:04:17,862  -->  00:04:20,130
So let's put all this information together
105

105

00:04:20,130  -->  00:04:21,660
with a quick example.
106

106

00:04:21,660  -->  00:04:22,920
Here on the screen you can see
107

107

00:04:22,920  -->  00:04:25,290
a Google search that I'm running using some
108

108

00:04:25,290  -->  00:04:28,140
of these advanced characteristics, for example, you see
109

109

00:04:28,140  -->  00:04:31,890
google.com/search, and then this big long list.
110

110

00:04:31,890  -->  00:04:34,680
Let's break those down individually one at a time.
111

111

00:04:34,680  -->  00:04:36,870
First, we have file type.
112

112

00:04:36,870  -->  00:04:39,300
The file type is one of those advanced operators that says
113

113

00:04:39,300  -->  00:04:41,910
I'm only looking for this type of file, and then
114

114

00:04:41,910  -->  00:04:46,910
you see percent three AXLS, which tells me percent three A
115

115

00:04:47,520  -->  00:04:50,190
is the colon, but written in this format
116

116

00:04:50,190  -->  00:04:54,120
and then XLS saying, I want an Excel spreadsheet file
117

117

00:04:54,120  -->  00:04:55,380
so whatever I'm searching for
118

118

00:04:55,380  -->  00:04:57,690
it better come back as a spreadsheet.
119

119

00:04:57,690  -->  00:04:59,940
Next, you see, I have the word password.
120

120

00:04:59,940  -->  00:05:01,290
That's what I'm searching for.
121

121

00:05:01,290  -->  00:05:04,440
This is my search term, and then you see, I have site,
122

122

00:05:04,440  -->  00:05:06,060
this is the next modifier.
123

123

00:05:06,060  -->  00:05:09,000
I only want to find things at a particular website
124

124

00:05:09,000  -->  00:05:12,630
and then again, I have percent three a Diontraining.com
125

125

00:05:12,630  -->  00:05:15,210
which is colon Dion training.com.
126

126

00:05:15,210  -->  00:05:16,140
So what this is telling me
127

127

00:05:16,140  -->  00:05:19,320
if I put all this together is find me any files
128

128

00:05:19,320  -->  00:05:22,590
that are of file type xls, an Excel spreadsheet,
129

129

00:05:22,590  -->  00:05:24,420
that contained the word password
130

130

00:05:24,420  -->  00:05:27,420
and are hosted on the site, Diontraining.com.
131

131

00:05:27,420  -->  00:05:29,520
Now, if you run this search, you're going to come back
132

132

00:05:29,520  -->  00:05:31,800
with zero results, and that's a good thing.
133

133

00:05:31,800  -->  00:05:33,810
It means me and my staff are not hosting
134

134

00:05:33,810  -->  00:05:36,510
any Excel spreadsheets with the word password
135

135

00:05:36,510  -->  00:05:39,245
on our website, but again
136

136

00:05:39,245  -->  00:05:40,590
this is a silly example to show you how you can break
137

137

00:05:40,590  -->  00:05:41,970
down these different things.
138

138

00:05:41,970  -->  00:05:43,890
Now, as a cybersecurity analyst
139

139

00:05:43,890  -->  00:05:45,480
do you need to know how to do this?
140

140

00:05:45,480  -->  00:05:47,220
Well, yes and no.
141

141

00:05:47,220  -->  00:05:48,840
You don't necessarily need to be able to create
142

142

00:05:48,840  -->  00:05:51,720
these yourself because you're not trying to attack somebody
143

143

00:05:51,720  -->  00:05:53,940
and you're not trying to find out information about them.
144

144

00:05:53,940  -->  00:05:56,820
But if you see these type of things in your proxy logs
145

145

00:05:56,820  -->  00:05:58,140
you should be able to know what
146

146

00:05:58,140  -->  00:06:00,990
that insider is trying to do and what they're searching for
147

147

00:06:00,990  -->  00:06:02,490
because you could be held responsible
148

148

00:06:02,490  -->  00:06:05,130
as a company for their operations.
149

149

00:06:05,130  -->  00:06:07,560
The next area we want to talk about is Shodan.
150

150

00:06:07,560  -->  00:06:10,380
Now, Shodan is found at Shodan.io
151

151

00:06:10,380  -->  00:06:12,240
and it is a search engine that's optimized
152

152

00:06:12,240  -->  00:06:15,330
for identifying vulnerable internet attached devices.
153

153

00:06:15,330  -->  00:06:17,970
Basically, Shodan is a website that allows you to
154

154

00:06:17,970  -->  00:06:20,850
do a search for all sorts of different devices out there.
155

155

00:06:20,850  -->  00:06:23,160
They can search for things like thermostats
156

156

00:06:23,160  -->  00:06:26,580
and webcams and ICS and SCADA devices
157

157

00:06:26,580  -->  00:06:28,770
and any other kind of device that's out there.
158

158

00:06:28,770  -->  00:06:30,360
And the way they do this is they go out
159

159

00:06:30,360  -->  00:06:33,060
routinely and they start scanning the entire internet
160

160

00:06:33,060  -->  00:06:35,220
and they conduct banner grabbing to identify the types
161

161

00:06:35,220  -->  00:06:36,810
of devices and the firmware
162

162

00:06:36,810  -->  00:06:39,720
and the OS and the applications that are in use, and
163

163

00:06:39,720  -->  00:06:42,720
if those are vulnerable, that now gives us a place to look
164

164

00:06:42,720  -->  00:06:45,060
at and start attacking people from.
165

165

00:06:45,060  -->  00:06:47,970
Now, again, we are not pen testers and we're not hackers
166

166

00:06:47,970  -->  00:06:49,890
so we're not going to be using it in that manner,
167

167

00:06:49,890  -->  00:06:52,440
but as a cybersecurity analyst, you could go
168

168

00:06:52,440  -->  00:06:55,620
on Shodan and start searching across your devices
169

169

00:06:55,620  -->  00:06:58,050
and see if any of yours have been found to be vulnerable
170

170

00:06:58,050  -->  00:06:59,400
such as your IP addresses,
171

171

00:06:59,400  -->  00:07:01,830
your host names, your geographic location
172

172

00:07:01,830  -->  00:07:03,240
or any of your different devices
173

173

00:07:03,240  -->  00:07:04,890
that are connected to the internet.
174

174

00:07:04,890  -->  00:07:06,780
Again, when you have internet of things
175

175

00:07:06,780  -->  00:07:08,520
these are vulnerable, and Shodan is one
176

176

00:07:08,520  -->  00:07:10,770
of the ways to find those vulnerabilities.
177

177

00:07:10,770  -->  00:07:13,860
Now, let me give you a couple of quick exam tips.
178

178

00:07:13,860  -->  00:07:15,210
When it comes to the exam,
179

179

00:07:15,210  -->  00:07:17,280
what do you need to know from this lesson?
180

180

00:07:17,280  -->  00:07:19,230
Well, as a cybersecurity analyst
181

181

00:07:19,230  -->  00:07:22,110
you do not need to put these queries together yourself
182

182

00:07:22,110  -->  00:07:23,880
but if I give you a search string
183

183

00:07:23,880  -->  00:07:25,980
like that Google search I gave you earlier
184

184

00:07:25,980  -->  00:07:27,210
you should be able to read that
185

185

00:07:27,210  -->  00:07:29,970
and then pick the results you would expect based on that.
186

186

00:07:29,970  -->  00:07:31,470
This is just a basic level
187

187

00:07:31,470  -->  00:07:33,360
of analysis that you should be able to do
188

188

00:07:33,360  -->  00:07:34,740
if you're going through a proxy log
189

189

00:07:34,740  -->  00:07:36,890
and you see somebody doing a Google search.
