Using Wireshark

Video Activity
Join over 3 million cybersecurity professionals advancing their career
Sign up with
or

Already have an account? Sign In »

Time
21 hours 43 minutes
Difficulty
Intermediate
CEU/CPE
22
Video Transcription
00:00
using wire Shark
00:02
in this lesson. We're to understand the basic use of wire Shark is both an attacker and defender. As well as I understand the traffic we generate within map.
00:11
So wire shark is an open source packet capture tool and it also analyzes packets as well. It's used by system admins or network admins to debug networking issues. It's also used by the blue team guys, the defenders to look for malicious traffic. And we can also use it as Attackers
00:31
to figure out what kind of noise our tools are making or maybe one of our tools isn't working.
00:35
And we want to know why. So we use wire Shark to kind of debug our own issues. Um as well as understand perhaps we set up a server and we want to see um what the hosts are that are coming to our website and we'll see a little bit later how we can weaponize that, which is pretty fun.
00:55
So wire Shark with end map, it's important. I said it's important to know what your tools do over the wire. And we're gonna look at two different scans with end map. There's the S. T. Flag or the full three way handshake. Uh TCP handshake. And these are also the syn scan or stealth scan. So
01:11
I want to show you what that looks like over the wire and wire shark
01:15
first. Um You want to pick your correct interface? So I use I. P. Space A. Or if you're old school I. F. Config, I know that's deprecating now though, but I'm gonna use my home network which is zero. Um You may have a different network, especially if you're connected to a VPN. It maybe tap
01:32
or something like that. So ensure that you pick the correct interface
01:37
and you can either go to the top left and look for wire shark in the search bar there or open up a terminal and type wire shark. And it should launch the application.
01:48
So we're gonna scan using that S. T. Flag or the full three way handshake on port 23. As you can see here. I'm the root user. So I'm doing end map. And I'm specifying that S. T. Flag. If you're the Cali user of the non root user, it should do this by default. That that three way handshake.
02:09
So you'll see here in wire shark. Uh you know, I started my capture, which is the shark fin on the upper left hand corner. And I'm also now I'm trying to drill down on that specific traffic on port 23. You'll notice when you're capturing traffic and wire shark. It's very noisy, very quickly. So
02:28
knowing how to filter is very important. So what I did was TCP dot port equals equals 23.
02:34
And you can see here, that means the attacker sends a syn packet. We get a syn ack packet back from that host. Uh We send an ack packet to do that full three way handshake, and then we set a, send a reset ack packet to terminate the connection.
02:53
So now I'm gonna as the root user. If you're not the root user, you have to use Sudo, but I'm not specifying any flag. So it should do the stealth scan of the syn scan by default. Again, we're scanning port 23.
03:07
So here you'll see that our host sends a syn packet. We get a syn ack packet back, and then we send a reset packet
03:16
uh to terminate that. And without finishing the three way handshake again, I'm drilling down using using the filter up there and you can see here, it says TCP dot port equals equals 23. So I'm just looking at the traffic going to port 23 the TCP traffic going to port 23 I should say.
03:34
Mhm.
03:35
So per end map, they prefer the stealth scan or the syn scan. The irony being that a lot of defensive tools look for that nowadays. So they're actually looking for that, that stealth scan. So it's actually not very stealthy.
03:49
Um You know, in the osc p, we don't have to be too concerned. We don't have blue team members trying to stop us. Um but I do want you to know that that when you're using this, maybe you're doing a pen test. Um and there are blue team members there to know what your traffic looks like.
04:04
Also, I talked about those flags. I like using an N map, the SV flag for version and sc for default scripts just now. When you run that, that you'll see here. We if I did I did a search TCP contains end map,
04:18
you can see here. I think this is the user agent header, has end map scripting engine printed in it. So if you just do a default scan like this, uh you will be very noisy and end map will print uh it's it's and map scripting engine in the user agent header
04:39
and you can see here the protocols http.
04:42
So now it's your turn to use end map and wire shark. Make sure you use it on a host or authorized to do it. But see what kind of traffic you generate, you know, figure out how to use filters. Um and also figure out how to change your user agent from a map scripting engine to something else. So go out there and figure out how to do that.
05:01
Um, just so, you know, a little bit more about end map and and the flags and options you have there,
05:08
and also know what your traffic looks like over the wire using wire Shark.
05:12
So in summary, we should now understand the basic use of wire. Shark is both an attacker and defender
05:17
as well as I understand the traffic we generate within map.
Up Next
Offensive Penetration Testing

The Offensive Penetration Testing course opens the doors to those wanting to begin a penetration testing career. This course will prepare learners to begin their pentesting career journey by understanding what tools, techniques, and resources are available for someone starting out in offensive penetration testing.

Instructed By