WEBVTT

1
00:00:00.210 --> 00:00:07.020
Now we're going to be installing a tool called asset finder so in previous videos we use sub Lister

2
00:00:07.020 --> 00:00:08.870
to find subdomains.

3
00:00:08.910 --> 00:00:09.970
It's okay.

4
00:00:09.990 --> 00:00:16.380
It was good when it first came out and it was ahead of its time honestly but now it's kind of it's just

5
00:00:16.380 --> 00:00:21.540
all right and there's better tools out there and I want to introduce you to those so asset finder is

6
00:00:21.540 --> 00:00:24.480
a great tool at finding subdomains.

7
00:00:24.480 --> 00:00:31.520
So we're gonna go ahead and just type an asset finder and we should be finding Tom nom nom here.

8
00:00:31.560 --> 00:00:33.380
Tom is a great guy.

9
00:00:33.390 --> 00:00:36.160
He's a great programmer great bug bounty hunter.

10
00:00:36.180 --> 00:00:39.030
He makes awesome tools asset finder is one of them.

11
00:00:39.480 --> 00:00:45.660
So go ahead and just click on asset finder and scroll down and we're gonna do is or is going to highlight

12
00:00:45.660 --> 00:00:46.330
this.

13
00:00:46.380 --> 00:00:54.450
Copy it and we're going to open up a terminal and all we've got to do is paces in the terminal hit enter

14
00:00:56.290 --> 00:00:59.410
and now asset finder should be installed.

15
00:00:59.410 --> 00:01:03.080
You start typing it and then just tab asset finder is there.

16
00:01:03.490 --> 00:01:07.040
So let's take a look at what asset finder can do.

17
00:01:07.060 --> 00:01:14.040
So if we say asset finder and we say Tesla dot com OK look how fast that worked.

18
00:01:14.250 --> 00:01:23.970
Let's actually let's put this to a file let's just call this Tesla sub subs don t t and it's quick and

19
00:01:23.970 --> 00:01:31.350
then we can cap Tesla subs that t t and we can just say word count and we'll do a dash alt account.

20
00:01:31.350 --> 00:01:33.690
Three hundred and forty seven.

21
00:01:33.690 --> 00:01:34.040
All right.

22
00:01:34.050 --> 00:01:34.640
And.

23
00:01:35.280 --> 00:01:35.840
OK.

24
00:01:35.880 --> 00:01:42.300
There are some repeats as you can see here so it's not going to be completely unique but still three

25
00:01:42.300 --> 00:01:43.830
hundred and forty seven really fast.

26
00:01:43.830 --> 00:01:51.240
Now the one thing that this is doing is it is not just it's not taking out only the subs right.

27
00:01:51.240 --> 00:01:55.280
So you could see if we look through here there's like Berkeley dot to you.

28
00:01:55.350 --> 00:02:00.810
It's also finding assets related to Tesla or that should or might be owned by Tesla.

29
00:02:01.260 --> 00:02:03.690
However we don't always want this in here.

30
00:02:03.690 --> 00:02:11.610
So what we can do is we could say asset finder subs only so only if it's related to that subdomain Tesla

31
00:02:11.610 --> 00:02:15.120
dot com and that will pull down only related to it.

32
00:02:15.810 --> 00:02:23.880
Now what I have actually found is that it's better to run asset finder like this and then later grep

33
00:02:24.000 --> 00:02:26.620
out the subdomains.

34
00:02:26.670 --> 00:02:28.380
So that's my opinion.

35
00:02:28.380 --> 00:02:32.020
And let's start writing a tool that's going to do this for us.

36
00:02:32.070 --> 00:02:35.970
So I'm going to open a new tab or we're going to automate as we go.

37
00:02:36.600 --> 00:02:38.130
So here's what we're gonna do.

38
00:02:38.160 --> 00:02:45.280
We're gonna say get it and we're just gonna call this run by s age and the first thing we're gonna do

39
00:02:45.280 --> 00:02:48.730
here is where it is going to shebang.

40
00:02:48.730 --> 00:02:56.590
Bin bash and I want to declare a variable of your URL because that's what we're gonna be providing and

41
00:02:56.590 --> 00:03:01.440
we'll make your URL equal to dollar sign 1 meaning the first argument.

42
00:03:01.570 --> 00:03:02.010
OK.

43
00:03:02.770 --> 00:03:09.730
And what we're gonna do is we're going to say we're going to use asset finder so let's let's make a

44
00:03:09.730 --> 00:03:16.120
couple tabs down here and we're just gonna say echo and we can make this pretty something like this

45
00:03:16.120 --> 00:03:22.610
will say harvesting subdomains with asset finder.

46
00:03:23.170 --> 00:03:23.620
OK.

47
00:03:23.620 --> 00:03:30.430
And then we can just declare what we're gonna do is we're gonna say asset finder and you are L and now

48
00:03:30.490 --> 00:03:39.100
I want to put this in to a folder so let's make it for the URL and let's actually let's call this let's

49
00:03:39.100 --> 00:03:43.580
call it recon and we'll call this file assets dot tag.

50
00:03:43.590 --> 00:03:46.540
So we're gonna put everything in the assets dot text.

51
00:03:46.540 --> 00:03:52.750
Now the issue here is we don't have a folder called recon nor do we have a folder for our your l.

52
00:03:52.750 --> 00:03:54.460
So we have to make that.

53
00:03:54.700 --> 00:03:58.780
So the easy way to do this is to make an if statement that looks something like this.

54
00:03:58.780 --> 00:04:05.890
We can say if and then we could say does not have a folder ok.

55
00:04:05.980 --> 00:04:11.500
Of your URL then we're gonna go ahead and just make that folder.

56
00:04:11.500 --> 00:04:17.470
So we'll say then and then we're gonna go ahead and just say make sure of yourself.

57
00:04:18.280 --> 00:04:21.300
So the directory doesn't exist of our your URL.

58
00:04:21.370 --> 00:04:24.490
We're gonna go ahead make it and guess what.

59
00:04:24.610 --> 00:04:37.510
If the directory does not exist of you are L and then recon we're gonna go ahead and just make that

60
00:04:37.510 --> 00:04:38.240
as well.

61
00:04:38.260 --> 00:04:44.460
So let's say then make dir your l recon and then.

62
00:04:44.620 --> 00:04:48.340
And if there so that's the first part.

63
00:04:48.950 --> 00:04:54.750
So we're going to we're gonna take asset finder and we're going to look for the assets.

64
00:04:54.800 --> 00:04:57.500
Now we only want subs in here.

65
00:04:57.740 --> 00:04:59.990
Only the subdomains related to our scope.

66
00:04:59.990 --> 00:05:01.090
We don't want to go out of scope.

67
00:05:01.100 --> 00:05:07.970
So if our client is Tesla dot com then we want to stay in Tesla dot coms subdomains.

68
00:05:07.970 --> 00:05:09.860
So what can we do here.

69
00:05:09.860 --> 00:05:16.940
Well we can go ahead and sort this out so we can say something like cat and we'll say you are L recon

70
00:05:17.480 --> 00:05:23.620
assets that text and we're going to just graph out dollar sign 1.

71
00:05:23.660 --> 00:05:29.780
So whatever we put in there Tesla dot com we're only going to grep out what's in there which is Tesla

72
00:05:29.780 --> 00:05:31.490
dot com or we could do a graph of your.

73
00:05:31.490 --> 00:05:34.940
All right let's put this into something like this.

74
00:05:34.940 --> 00:05:42.680
We'll put it into a new document we'll call it recon and we'll call it final text just like this.

75
00:05:42.700 --> 00:05:43.440
OK.

76
00:05:43.460 --> 00:05:53.300
And we'll go ahead and just remove the file we just created which was your l recon assets that text

77
00:05:53.870 --> 00:05:57.500
and then we should have a final that text stored in that folder.

78
00:05:57.620 --> 00:06:03.200
So all we've done so far is make a couple directories and then we're going to hit gonna go ahead and

79
00:06:03.200 --> 00:06:04.840
run asset finder.

80
00:06:04.880 --> 00:06:12.110
We're gonna put it all into assets dot text and then we're going to sort that out put it into final

81
00:06:12.110 --> 00:06:13.550
text and remove assets.

82
00:06:13.640 --> 00:06:20.450
Tax let's save this and let's go ahead and just run this and what we'll do is it should make the folder

83
00:06:20.450 --> 00:06:22.590
here for recon for it.

84
00:06:22.670 --> 00:06:27.500
So I'll ask just to prove concept that it's not here as of right now.

85
00:06:27.620 --> 00:06:35.340
And then what we're gonna do is we're just going to say see h my plus X on run dot SDH run the s h age

86
00:06:35.390 --> 00:06:43.910
and we'll say Tesla dot com line 3 command not found I messed up here.

87
00:06:44.080 --> 00:06:51.100
Apologies C I am I'm terrible sometimes at this you're out equals dollars sign 1 OK let's control see

88
00:06:51.100 --> 00:06:53.860
this let's try running it one more time.

89
00:06:54.250 --> 00:06:55.250
There we go.

90
00:06:55.330 --> 00:07:03.070
So this will attempt now to run and harvest this if we Ellis We should have the folder here for Tesla

91
00:07:03.070 --> 00:07:11.440
dot com which we do you see Tesla dot com if we see into Tesla dot com slash recon we l s and here we

92
00:07:11.440 --> 00:07:18.690
have final that text which let's just get it to make it easier and we come through here and now everything

93
00:07:18.690 --> 00:07:25.720
is related to Tesla dot com we don't see anything in here that's not Tesla dot com OK and we're still

94
00:07:25.720 --> 00:07:32.050
gonna have potential repeats we'll get rid of that as the script goes on but for now we have all of

95
00:07:32.050 --> 00:07:37.120
these subdomains available to us now we're going to have to take the next step from here and improve

96
00:07:37.120 --> 00:07:40.050
upon this to find what's actually out there and alive.

97
00:07:40.090 --> 00:07:42.190
So let's go ahead and do that in the next video.
