WEBVTT

00:00:00.000 --> 00:00:03.493 align:middle line:90%


00:00:03.493 --> 00:00:06.487 align:middle line:90%
[AUDIO LOGO]

00:00:06.487 --> 00:00:09.990 align:middle line:90%


00:00:09.990 --> 00:00:10.750 align:middle line:90%
Welcome back.

00:00:10.750 --> 00:00:13.200 align:middle line:84%
In this lab, we're going
to dig into TShark.

00:00:13.200 --> 00:00:15.810 align:middle line:84%
It is the command line
version of Wireshark.

00:00:15.810 --> 00:00:19.080 align:middle line:84%
And it'll be really
fun to get used to.

00:00:19.080 --> 00:00:23.120 align:middle line:90%


00:00:23.120 --> 00:00:26.960 align:middle line:84%
We're in our interface,
and the first thing

00:00:26.960 --> 00:00:31.130 align:middle line:84%
that we want to take a look
at is, what version of TShark

00:00:31.130 --> 00:00:33.530 align:middle line:90%
do we have?

00:00:33.530 --> 00:00:34.320 align:middle line:90%
It's pretty easy.

00:00:34.320 --> 00:00:39.140 align:middle line:84%
The command is tshark, and we'll
look at tack v for Version.

00:00:39.140 --> 00:00:44.900 align:middle line:84%
Another way we go about that is
tack h or minus h, if you will.

00:00:44.900 --> 00:00:49.360 align:middle line:84%
And what that will bring
up is the Help menu.

00:00:49.360 --> 00:00:51.080 align:middle line:84%
Now, this is going
to be an eyesore.

00:00:51.080 --> 00:00:52.820 align:middle line:90%
Sorry.

00:00:52.820 --> 00:00:54.930 align:middle line:84%
There's quite a lot
in this whole menu.

00:00:54.930 --> 00:00:59.870 align:middle line:84%
So what we'll do is
we'll pipe that to more.

00:00:59.870 --> 00:01:02.413 align:middle line:84%
And then, we get
one page at a time.

00:01:02.413 --> 00:01:03.830 align:middle line:84%
So you have the
version up there--

00:01:03.830 --> 00:01:06.860 align:middle line:84%
2.61-- and then
some information.

00:01:06.860 --> 00:01:10.460 align:middle line:84%
If we want to capture with
TShark, we can use tack i

00:01:10.460 --> 00:01:11.780 align:middle line:90%
and pick an interface.

00:01:11.780 --> 00:01:19.220 align:middle line:84%
Tack d there will print a
list of interfaces and exit.

00:01:19.220 --> 00:01:21.770 align:middle line:90%
That can be quite useful.

00:01:21.770 --> 00:01:24.180 align:middle line:90%
We'll take a look at that.

00:01:24.180 --> 00:01:29.060 align:middle line:84%
There's also, we could take
an input from a file, tack r.

00:01:29.060 --> 00:01:33.830 align:middle line:84%
So if we had saved
a PCAP or a PCAP NG,

00:01:33.830 --> 00:01:38.090 align:middle line:84%
we can look at it
with that tack r.

00:01:38.090 --> 00:01:40.230 align:middle line:90%
So let's see what else.

00:01:40.230 --> 00:01:42.350 align:middle line:90%
There's more processing.

00:01:42.350 --> 00:01:44.525 align:middle line:84%
There's some outputs
that we can choose.

00:01:44.525 --> 00:01:47.860 align:middle line:90%


00:01:47.860 --> 00:01:53.820 align:middle line:84%
There's a tack v in
there in the outputs,

00:01:53.820 --> 00:01:55.205 align:middle line:90%
so you can output a tree.

00:01:55.205 --> 00:01:57.920 align:middle line:90%


00:01:57.920 --> 00:01:59.420 align:middle line:90%
You can do tack z.

00:01:59.420 --> 00:02:02.373 align:middle line:84%
There's different
types of statistics,

00:02:02.373 --> 00:02:04.415 align:middle line:84%
and we could see that if
we go into the man page.

00:02:04.415 --> 00:02:08.090 align:middle line:90%


00:02:08.090 --> 00:02:11.600 align:middle line:84%
For example, you
would man tshark.

00:02:11.600 --> 00:02:21.960 align:middle line:90%


00:02:21.960 --> 00:02:23.500 align:middle line:90%
That should have done it.

00:02:23.500 --> 00:02:26.930 align:middle line:90%


00:02:26.930 --> 00:02:29.100 align:middle line:84%
We'll just play
with what we have.

00:02:29.100 --> 00:02:31.950 align:middle line:84%
So let's look at what
interfaces can we interact on.

00:02:31.950 --> 00:02:34.700 align:middle line:90%
So tack d gives us a nice list.

00:02:34.700 --> 00:02:38.640 align:middle line:90%
We have eth0 listed in there.

00:02:38.640 --> 00:02:41.010 align:middle line:84%
So let's take a
look at that one.

00:02:41.010 --> 00:02:46.820 align:middle line:90%
Let's do tshark tack i eth0.

00:02:46.820 --> 00:02:51.230 align:middle line:84%
And unfortunately, we
are not on the sudoers,

00:02:51.230 --> 00:02:53.120 align:middle line:90%
and we're not sudo or root.

00:02:53.120 --> 00:02:56.480 align:middle line:84%
So we don't have
authorization to actually run

00:02:56.480 --> 00:02:59.840 align:middle line:90%
a dump on that interface.

00:02:59.840 --> 00:03:04.070 align:middle line:84%
Instead, what we can
do is we have a PCAP.

00:03:04.070 --> 00:03:11.150 align:middle line:84%
So let's run tshark
tack r on that PCAP,

00:03:11.150 --> 00:03:12.950 align:middle line:90%
and then this is going to hurt.

00:03:12.950 --> 00:03:15.740 align:middle line:84%
So the screen is
going to scroll and go

00:03:15.740 --> 00:03:18.800 align:middle line:84%
through all of this
packet capture.

00:03:18.800 --> 00:03:21.940 align:middle line:90%


00:03:21.940 --> 00:03:22.630 align:middle line:90%
There's a lot.

00:03:22.630 --> 00:03:24.110 align:middle line:90%
There's a lot going on there.

00:03:24.110 --> 00:03:30.960 align:middle line:84%
We're already looking at tens
and 20s of thousands of PCAPs--

00:03:30.960 --> 00:03:37.500 align:middle line:90%
30,418 packets or frames.

00:03:37.500 --> 00:03:38.970 align:middle line:90%
It's a lot in there.

00:03:38.970 --> 00:03:42.940 align:middle line:84%
That you might be wondering,
how do we sort through this?

00:03:42.940 --> 00:03:45.540 align:middle line:84%
How do we do anything
with this knowing

00:03:45.540 --> 00:03:48.040 align:middle line:90%
that there's so much out there?

00:03:48.040 --> 00:03:52.260 align:middle line:84%
Let's do a word count
just to confirm.

00:03:52.260 --> 00:04:00.150 align:middle line:84%
Yep, 30,418 lines--
so a lot going on.

00:04:00.150 --> 00:04:03.860 align:middle line:84%
We're not going to go
through this the same way

00:04:03.860 --> 00:04:08.090 align:middle line:84%
that we did with Wireshark,
where we have the graphical,

00:04:08.090 --> 00:04:11.150 align:middle line:84%
and you go through and
look at different packets.

00:04:11.150 --> 00:04:13.490 align:middle line:84%
This is going to be more
for targeted analysis.

00:04:13.490 --> 00:04:15.590 align:middle line:84%
If you are looking for
something specific,

00:04:15.590 --> 00:04:17.720 align:middle line:84%
you want to pull that
information out, turn it

00:04:17.720 --> 00:04:18.649 align:middle line:90%
into something else.

00:04:18.649 --> 00:04:22.580 align:middle line:84%
This is for processing when you
already know what you're doing,

00:04:22.580 --> 00:04:24.360 align:middle line:90%
what you're looking for.

00:04:24.360 --> 00:04:27.800 align:middle line:84%
It's a little more in-depth,
a little more targeted,

00:04:27.800 --> 00:04:28.700 align:middle line:90%
a little faster.

00:04:28.700 --> 00:04:32.580 align:middle line:84%
And when you get this
stuff working properly,

00:04:32.580 --> 00:04:34.760 align:middle line:84%
you can script it,
include it in tools,

00:04:34.760 --> 00:04:39.910 align:middle line:84%
and then you don't even have
to manually do it yourself.

00:04:39.910 --> 00:04:42.430 align:middle line:84%
You do a capture, you
run your tool against it,

00:04:42.430 --> 00:04:45.460 align:middle line:84%
and it finds the
information that you want.

00:04:45.460 --> 00:04:48.130 align:middle line:84%
You can't really set that
up in the GUI version.

00:04:48.130 --> 00:04:51.340 align:middle line:84%
GUI version is great for
looking and moving around.

00:04:51.340 --> 00:04:55.180 align:middle line:84%
But TShark allows you to
do a lot more of this stuff

00:04:55.180 --> 00:04:56.124 align:middle line:90%
automated.

00:04:56.124 --> 00:04:57.873 align:middle line:90%
Automation is awesome.

00:04:57.873 --> 00:04:59.540 align:middle line:84%
No matter what you're
doing in security,

00:04:59.540 --> 00:05:01.832 align:middle line:84%
but if you're a pen tester
and you can automate things,

00:05:01.832 --> 00:05:04.270 align:middle line:84%
so you don't have to do it
over and over and over again

00:05:04.270 --> 00:05:06.760 align:middle line:84%
or pull out the
useful information,

00:05:06.760 --> 00:05:09.700 align:middle line:84%
plug it into me, so I can
then put that on my notes

00:05:09.700 --> 00:05:12.080 align:middle line:84%
and then get moving with
the rest of your pen test.

00:05:12.080 --> 00:05:17.950 align:middle line:84%
You've only got so long
on during your assessment,

00:05:17.950 --> 00:05:21.180 align:middle line:84%
so you need to make
good time of that.

00:05:21.180 --> 00:05:23.690 align:middle line:84%
So this can be really helpful
when you have it down.

00:05:23.690 --> 00:05:28.330 align:middle line:90%


00:05:28.330 --> 00:05:33.660 align:middle line:84%
Let's look at this information,
and let's run some statistics

00:05:33.660 --> 00:05:34.720 align:middle line:90%
on it.

00:05:34.720 --> 00:05:43.470 align:middle line:84%
So we had the ability
to do our hierarchy

00:05:43.470 --> 00:05:49.470 align:middle line:90%
before in Wireshark in the GUI.

00:05:49.470 --> 00:05:50.310 align:middle line:90%
We can do that.

00:05:50.310 --> 00:05:56.070 align:middle line:84%
We can do a protocol hierarchy
here with this tack z

00:05:56.070 --> 00:06:03.240 align:middle line:84%
for statistics and then,
io,phs is going to give us

00:06:03.240 --> 00:06:05.800 align:middle line:84%
our hierarchy along
with the tack q.

00:06:05.800 --> 00:06:11.630 align:middle line:84%
So these are what we
would be used to seeing.

00:06:11.630 --> 00:06:16.862 align:middle line:84%
So how many of these frames
are of different types?

00:06:16.862 --> 00:06:18.440 align:middle line:90%
There's PNGs.

00:06:18.440 --> 00:06:23.190 align:middle line:84%
There's all sorts of
different media in here.

00:06:23.190 --> 00:06:27.660 align:middle line:84%
Only six of them are
actually HTTP frames,

00:06:27.660 --> 00:06:29.183 align:middle line:90%
and you gets some ARP.

00:06:29.183 --> 00:06:32.640 align:middle line:90%


00:06:32.640 --> 00:06:39.780 align:middle line:84%
Now, this is not a
really crazy lesson.

00:06:39.780 --> 00:06:42.660 align:middle line:84%
I just wanted to show
you what the tool can do,

00:06:42.660 --> 00:06:46.380 align:middle line:84%
a little bit of what you
might expect from it.

00:06:46.380 --> 00:06:49.350 align:middle line:84%
And hopefully, you got
something helpful out of this.

00:06:49.350 --> 00:06:51.180 align:middle line:84%
We're going to dive
a little deeper,

00:06:51.180 --> 00:06:55.230 align:middle line:84%
use a little more analysis
because what you can get out

00:06:55.230 --> 00:06:58.590 align:middle line:84%
of looking at traffic
and what you can use it

00:06:58.590 --> 00:07:03.450 align:middle line:84%
for is really the meat and
potatoes of this course

00:07:03.450 --> 00:07:06.250 align:middle line:84%
and what I want you to
take away from it all.

00:07:06.250 --> 00:07:08.390 align:middle line:90%
Now, with that--

00:07:08.390 --> 00:07:09.000 align:middle line:90%