WEBVTT

00:06.880 --> 00:11.460
Hello, guys, and welcome to
another video on this chapter.

00:11.480 --> 00:13.280
In this video, we're going to learn how to

00:13.310 --> 00:19.260
convert, PCAP file to an XML format
in order to do that.

00:19.290 --> 00:21.960
We are going to use a command line based

00:21.990 --> 00:27.560
tool called the tshark. T
shark is being developed by Wireshark.

00:27.580 --> 00:29.480
And the only difference between the

00:29.510 --> 00:34.740
Wireshark and the tshark command
is that Wireshark is a gui based tool.

00:34.770 --> 00:40.760
If you go ahead and your
Kali Linux terminal and tshark space dash

00:40.790 --> 00:48.560
h, you're going to see the how the users
of tshark command, how the Tshark command

00:48.590 --> 00:54.940
is being structured and used, and what
sorts of flags and arguments you can use.

00:54.970 --> 01:00.060
Tshark is
a tool that can be used by people who do

01:00.090 --> 01:04.460
capturing and investigating
packets via command line. We will

01:04.490 --> 01:09.930
use Tshark come online
with external source

01:09.960 --> 01:19.850
we can also view our data packets
in XML format and also later on we can.

01:19.880 --> 01:25.660
Well, this XML command into a more
presentable HTML format,

01:25.690 --> 01:30.820
so to achieve that, first we need to save
our Data packets

01:30.850 --> 01:37.160
in the PDML format and then convert it to
an XML format using the commands you can

01:37.190 --> 01:40.490
see in front of you, which is
Tshark space.

01:40.520 --> 01:48.290
Dash r and then you type the path of the
pcap file together with the extension.

01:48.320 --> 01:54.380
And then as we said, we are going
to use the dash t argument Pdml.

01:54.410 --> 01:57.280
And then you are going to.

01:57.320 --> 01:59.780
Use that to the new XML

01:59.810 --> 02:04.660
name that you're going to type next
and bonus from this lesson.

02:04.690 --> 02:10.140
We also going to use the
building written command.

02:10.170 --> 02:14.730
To convert the XML File into
HTML. So lets

02:14.760 --> 02:20.100
just jump right into our Kali Linux
machine and see how the first command

02:20.130 --> 02:24.100
is done, and then we are going to
explore the second in command.

02:24.120 --> 02:25.480
That's the Bonus of this lesson.

02:26.640 --> 02:29.340
So back to our Kali Linux Machine,

02:29.370 --> 02:34.890
you will see that I have
placed on my desktop and

02:34.920 --> 02:41.480
HTTP traffic that I have captured through
Wireshark and we are going to use this

02:41.510 --> 02:47.180
capture format and we are going
to convert it to an XML format.

02:47.210 --> 02:53.220
You can use command or you can just go
Switch to Route account

02:53.250 --> 03:00.440
and always navigate, as I do most of the
times, to the location where the file that

03:00.470 --> 03:05.680
you would like to convert is placed
in makes it easier because in the same

03:05.710 --> 03:10.880
folder you can save the
other five from that.

03:10.910 --> 03:14.740
You would like to convert it to
the check first where we are.

03:14.770 --> 03:16.180
So we are on desktop.

03:16.210 --> 03:19.740
That's a good at last at least
all the files that we have.

03:19.760 --> 03:21.180
And there you go.
You have it.

03:21.210 --> 03:25.320
So let's just go ahead and use
the tshark command space -r.

03:32.520 --> 03:36.120
And then we type the name of the
captured file on our desktop.

03:49.120 --> 03:53.440
As we said next, we are going
to use the -t flag space pdml.

04:05.960 --> 04:08.500
And then we are going to save that into

04:08.530 --> 04:13.560
let's say let's change the name as
well so it can be Azure to type.

04:17.760 --> 04:23.880
And to be packets xML.

04:24.520 --> 04:28.120
So go ahead and press enter
and you will see that.

04:28.760 --> 04:30.100
So we made a mistake here.

04:30.130 --> 04:32.460
We typed pcap.

04:32.480 --> 04:34.960
But the extension of the file is cap, so

04:34.980 --> 04:40.100
let's go ahead and press and hit enter
one more time and you will see that.

04:40.130 --> 04:44.660
Now, it's written you saw
earlier, it has been created.

04:44.690 --> 04:47.080
With the previous command.

04:48.320 --> 04:53.240
Faulty, but we
set up the correct command and now the XML

04:53.270 --> 04:58.160
file being created,
you can go ahead and open it with.

04:58.280 --> 05:04.440
Any kind of ID that you have in this case,
are we going to use the Gvim

05:04.760 --> 05:08.820
to see it from and its very colorful you
can distinguish between it

05:08.840 --> 05:13.500
list, so let's just expand a little
bit so you can see it better.

05:13.520 --> 05:14.680
You can see that we have all the

05:14.710 --> 05:22.000
information, the XML version, everything,
encapsulation and so on and so forth.

05:22.030 --> 05:26.940
And also it's presented
Kali, Linux in a colorful

05:26.970 --> 05:32.440
way and you can separate out
the information between them.

05:32.760 --> 05:39.000
You can use this XML format to any
kind of purposes that you want to.

05:40.160 --> 05:43.060
So this XML file

05:43.090 --> 05:49.400
will be safe in a location
under usr, Wireshark

05:49.560 --> 05:58.440
and so we are going to use
the XSml tool to execute these file.

05:58.960 --> 06:02.400
Which will help us to create our HTML

06:02.420 --> 06:08.260
Breach, which, as I told you earlier, it's
the bonus for this video,

06:08.290 --> 06:15.140
creating the XML page will
format all the necessary information.

06:15.170 --> 06:18.700
And only let us use the usable data.

06:18.720 --> 06:20.360
So this is very useful when you're using

06:20.390 --> 06:26.080
that tshark like the command line based
tool to search and capture package, which

06:26.100 --> 06:31.980
will present presented in a very
structured way in a human readable.

06:32.010 --> 06:38.240
More simple human readable format,
you can use the command, as we indicated

06:38.270 --> 06:46.660
in our slides earlier, so we are
going to use the xsltproc space.

06:46.690 --> 06:55.160
As we said, we are going to type the
delegation that the XML file is named.

07:12.320 --> 07:14.400
So this is going to be

07:14.840 --> 07:19.000
a /usr/share/wireshark/pdml2html.xsl

07:23.280 --> 07:27.000
then space we are going to use.

07:28.800 --> 07:34.280
The name of the file that we
created, so in this case, it was.

07:34.800 --> 07:37.960
So in this case, it's
going to be the packet.

07:40.440 --> 07:42.000
XML.

07:44.960 --> 07:49.480
we're going to type the name
that we would like to have.

07:51.520 --> 07:56.800
In HTML format so we're going
to basically use the same name.

07:57.600 --> 07:59.120
It is packets.html.

08:00.920 --> 08:02.400
So from the moment that we are going to

08:02.420 --> 08:08.260
press enter, you will see that an e-mail
file has been created in our desktop

08:08.290 --> 08:14.600
so we can just go ahead and open
this with any Browser of your like.

08:15.040 --> 08:18.720
So I have opened with Firefox and see.

08:18.840 --> 08:21.780
So you can see that pretty much everything

08:21.800 --> 08:26.580
is appearing from this capture
file that we did with Tshark.

08:26.600 --> 08:33.480
And we converted it in a more
presentable way, like having the.

08:34.080 --> 08:37.840
The graphical user interface of.

08:41.000 --> 08:46.480
Like your viewing it in Wireshark,
so you can see you can expand the frame

08:46.510 --> 08:52.460
here and you can see all the information
pretty similar to as you see it.

08:52.490 --> 08:57.240
In Wireshark, you can
see the Internet source.

08:58.320 --> 09:00.280
They didn't protocol very soon and so on

09:00.310 --> 09:05.260
and so forth, see that this
is makes it a lot easier.

09:05.290 --> 09:15.420
For an operator to see and view. It
captured it in a more structured manner.

09:15.440 --> 09:17.540
And so that was it for this video.

09:17.560 --> 09:19.720
I hope you learned something and when

09:19.720 --> 09:22.260
you're ready, you can go ahead
and click on the next video.

09:22.280 --> 09:23.860
What you are going to learn how to detect

09:23.890 --> 09:27.760
ICMP Flooding or otherwise
known as Smurf Attack.

