Time
10 hours 19 minutes
Difficulty
Intermediate
CEU/CPE
12

Video Transcription

00:05
you never talk about network traffic itself. It was one thing to say. There's I can stop this traffic. I can block this. I can alert on this. But what about when you actually want to look at the traffic into the analysis on that as a go afterwards?
00:21
So what's the purpose? What can you get from network traffic analysis?
00:25
Well, on just on the normal kind of support operations and doting operations are keeping the network running. I understand. Never performance, like sometimes identified the greater performance. Okay, we're normally seen this much We're seeing elevated volume. Um, we're seeing that there's issues with this subject of the network of traffic's not getting through here.
00:45
Okay, Well, is it your system?
00:47
Is it the router? Maybe it's somewhere in between we looking network traffic and see if there's issues there.
00:53
Evidence of malicious activity is a very broad statement. Um, but you can find a lot of that a network traffic for an attacker to get into your network
01:02
most of the time. Say most
01:03
have to be going through the network. So somewhere on that network, the whole point of what they're doing so exploited. Therefore, there's some traffic that's there. And the good thing about this is like not opposite of what's on the hostess on the hosting. What cooking cleaner tracks into a lot of stuff to remove evidence of them being there
01:23
once a packet goes through. If it's captured,
01:25
the only way to for an attacker toe stop somebody from looking at that
01:29
is to find where it is and delete it and remove it and wipe it whatever. So pack it goes through its there.
01:34
Here's the downfall. The office decide on the response
01:37
component.
01:38
If a packet goes through and I don't capture it, I will never see it again.
01:42
That could be the, you know, the,
01:44
um
01:46
the silver bullet that put says, this was the answer. This is what I needed to know. But if it goes by and you don't get it the first time, no second chance.
01:53
So that'll come into play with figuring out What do I want to capture? And how does one capture
01:59
you also have seen baseline give you establish those this what we see normally on a network, you know, when you first stand up and get things going to put a new service on our server workstation. Okay, here's the normal traffic. We see no into a baseline. I could detect anomalies off that
02:12
again. Troubleshooting communication issues. Part of that. Never performance in general,
02:15
and it helps to get a picture. And that is necessarily entire baseline. I would say about activity, but who's talking to who?
02:23
You know there's different ways to do that. Not just to analyze traffic itself, but net flow. Endpoint analysis can help you figure that out.
02:30
So what'd you expect to find?
02:31
Well, if I'm talking to Paul in the back,
02:36
Um, and there's communication between us. You can find evidence of that communication even if it's encrypted.
02:42
You know, there was communication.
02:44
You can see. You know, you may not be able to decipher it, but, you know it existed.
02:46
You could find out what protocols is running on the network. Aside from looking at a host, I could set up a sniffer and capture some traffic from the main point of land. Say okay. For some reason, we disallowed Ping wise pink. Was icmp going around?
03:02
Okay. You know, maybe something to help you find out. I can tell you what Attackers using.
03:07
I can also tell you time stamps, then also abnormal traffic host communication. I see. Normally a host
03:16
on Lee is up on the network, you know, from 9 to 5.
03:20
And then that host is having traffic in the evening. Or also they're sending out significantly Maur
03:25
data or more volume traffic going out. You can only find that too.
03:30
So it's about some tools. Um, there are many, many, many, many tools to do. Traffic analysis
03:38
paid free command line, gooey. All sorts of different ones, too, will go over. Talk about two of the really common ones. Wire shark is been around for a long time. Used to be ethereal or depending who you are. You may say it differently than that, but I go with that one.
03:53
Um
03:54
so this conduce disc and capture traffic not in itself, its software. So you need to have a system in place to do it, but this will help you capture it in analyzed number traffic.
04:05
There's two parts to filtering, and this is true across anything you're gonna do. Packet capturing with
04:13
or analysis. There's capture, filters and display filters.
04:17
I know the difference.
04:19
Yes, After filter is gonna be What? Where shark is capturing off the line. You display filters is gonna be after the after you don't capture what you're looking at inside the cab, right?
04:30
So the capture filter, I say I only want http traffic, and I put it on the network. That's all I'll capture if all malicious traffic is on port 22. I will not get any of it because I'm only capturing Http.
04:43
Unless there's a Steve defeat packets going to port 22 I suppose,
04:46
um, with a display filter, it takes whatever you capture, it takes what you have, and it breaks it down and filters through what you're just looking at, so you can collect everything. But I finally want to look at http. I could filter that you're gonna set a capture filter which often times is ah, good thing to do,
05:02
because we'll talk about how large captures peak. Asking it,
05:06
uh, make sure you said it right the first time.
05:10
And you know what you're doing? Test it. Test it on something a similar. Never gonna test it beforehand. Because once those packets go, packets are gone.
05:18
But ideally, overall
05:20
packet filtering or capture or display filters. Reduce the amount of stuff you have to look at. Open up a peek up sometime and see all the other stuff in there. It's a mess. If you can filter that somehow, it'll help you in the long run.
05:32
So here's wire shark. It's kind of a short example or a small,
05:36
visually small example.
05:39
So is where shark has three panes. The 1st 1 the first top part list all the packets, usually in order, unless you click on some other sorting mechanism. On top is the Time Sam Source destination. You can customize all that, but that's the list of packets. The 2nd 1 actually breaks it down by layer of the O. S. I model. For the most part,
05:58
it tells you. Okay, I want to look at the I P
06:00
and the network layer. You can click on it and will say, Here's all the stuff that's in the I P header and break it down by section.
06:08
Our segment of the header on the bottom one actually shows you
06:12
the exit decimal value and using
06:15
asking as much as possible on the right.
06:18
The contents of that packet and it will highlight whatever you're actually looking at.
06:23
This one is a really common tool. It's free is really useful for helping filter the up above. Receive time Source. Source. Port of Destination.
06:32
That's your display filter. So when you go through that, you can sort everything out.
06:38
TCB Dump is a command line utility. Refuse Mac. It's on their Lennox systems. It's usually on there.
06:45
Um, I should I'll say wire. Shark also has a command line version T shark. But TCP dump does very similar things.
06:54
You can capture traffic off the wire. You said the interface. You wanna listen to me. I wanna listen to this. I want to write it to this file. I want a print to standard out where the console. You configure it a lot of different ways, but it will do the same thing. It will read packets off the wire. It'll reading files you have, and you could filter out what you want to see.
07:11
They're ah, TCP dump. You can use that in conjunction. Do a little shell scripting. You're just
07:17
decent command line usage. You can actually pass the output, the other tools. So if you have a packet, capture
07:25
Ah, peak cap of something and you want to run it against snort. You could take snore and actually read the output from TCP dump right into snore so it doesn't have to capture it alive. You can read files from it. Start also, just read a peek up to,
07:36
but it's just another utility available for analyzing. You're looking at network traffic.
07:43
So what do you need
07:44
very similar to an I. D. S I p s. You're gonna need something that can actually capture all the packets
07:48
If you got a 10 gigabit line somewhere and you put 100 megabits Nick on there,
07:54
odds are if there's enough traffic, you're gonna start dropping packets. You're gonna be missing things. You might see them spaces in the traffic that you're analyzing or packet sequence numbers missing a lot of things, but you end up can possibly been missing packets.
08:07
You need a computer to do it. You need something that will actually be able to process it all the same time.
08:13
Uh,
08:13
deceives piece of advice anytime you're doing a printing to the screen, especially during a live capture,
08:20
uh, it takes resource is from the computer from the system.
08:24
So if you're doing live stuff like you deploy, snort, live or you're actually capturing peek at live
08:28
printing the screen, it takes a lot of power away from the computer.
08:31
So send it to a file. We'll get something else. If it's a long term thing, you don't want a pea cap print into the screen for 48 hours.
08:41
If you have 1 48 R P cap, it is gonna be miserable anywhere.
08:46
Uh, so you need the nick that is capable of doing it. If you put the sniffer in line to actually record this, you need to Nick's because it's got to go in and out
08:52
and a device to capture from your catcher from a switch router. You can put the device on a span port on the switcher rodder, or you can put it in line.
09:03
So the constance behind it. So if you're on a switch or a router,
09:07
you get a SPAN port. Okay, this pan port is can be configured to take traffic from any of the other ports or all the other ports and send it up to that one basically copies it and sent it out
09:18
really fast for a switch to do this. Um,
09:22
but as with an I D S r I p s or anything else, it only collect what passes through there if you put it on a switch.
09:28
And there's most of traffic on a switch on another side of the router, her off another port on the router, you're not gonna get it.
09:33
So you got to know where you're placing it,
09:37
and you're gonna put in this on because an incident is happening. You know, in a large organization, you gotta find a spot to put it. You may have to get authorization to get it configured to actually put it on there.
09:46
And then if you picked the wrong host or the wrong switch again traffic past, you're not getting it back.
09:54
So in line capture between two nodes
09:56
that could be in line between really anything
09:58
routed router writer, switch firewall to switch firewalled router host around her host to switch hub hub. However you want to work, it would be fun. You can put it anywhere you can sniff on a host.
10:11
You can go on your computer and threw up wire shark and just start running.
10:15
You look after anything from your host
10:16
going out back and forth.
10:18
Um, if you use
10:20
some other tools A like a wireless card, some of them you can put in promiscuous mode. You consider all wireless traffic going around, obviously encrypted. There's different parts that you can't figure out, but,
10:31
um, but you can do it on the host can remember. Ah, host you. You're only getting what the system can see would only the nick can see. So the Knicks not going to see the whole network, is only to see traffic that's meant for it
10:43
on wireless. Again. Get a card that put in promiscuous mode. But the thing with wireless is they can actually capture all the traffic because of transmission medium.
10:52
With a wired network, the wire comes in
10:56
that wire is what deliver is a transmission medium for my system, so I can only connect what that can see.
11:01
Wireless environment. It's just flying through the air. If you can lock onto the signal, you can capture the traffic that's on it.
11:11
So best practices implementation. Use an NDR network data recorder that can capture it line speeds, especially
11:18
if you're gonna put it in line.
11:20
If you have a high volume segment, they're gonna put it on, make sure that that can capture at high volume.
11:26
Otherwise, you're gonna get dropped packets, missed information, and they don't come back.
11:31
And make sure you place it where you actually want to capture it
11:35
again. Put it on one switch and you want it on the other. Or there's incident intrusion happening on another. You may not get the information,
11:43
you know. Then in the network world on packet side, once they're gone, they're going. So you don't get a lot of second chances. There's a long term event you like, get stuff, but you don't get a lot of easy second chances.
11:56
So data storage, Uh,
11:58
who's worked with large pickups?
12:01
Annoyingly large peak ***. Right.
12:05
So
12:07
what's the longest time it's taken into apply display filter for you?
12:11
10 minutes. 10 minutes.
12:15
Well, that's gentle. How big was it?
12:16
Uh,
12:18
it's like seven gig. Oh, Okay.
12:22
So, I, uh I was doing an exercise one point,
12:24
and we captured traffic at a
12:28
I kind of like Jonah, a main point in the environment,
12:31
and we end up with a 20 something big peak at
12:35
and I started the filter. I started to apply the filter
12:39
and it's at and it sat and I sat for Well, about ended up canceling because I couldn't I couldn't wait that long. I had to do something else. But it was well over an hour that it was gonna take. Just apply that filter.
12:50
Now, remember, you apply one filter now I gotta send, like Okay, well, I've narrowed it down. Now we need to narrow it down more. So there I go. I got to apply another filter Eventually. I was like, Okay, lesson learned. I need to either junkies in segments,
13:05
I should do some sort of capture filter. So I didn't collect all that information because eventually, I just did. A
13:11
time based denial of service of my own resource is that I don't have the time to do all of what I needed to do.
13:18
So
13:20
storage is at a premium. If you can segment them, you chunk them in some part. That be great.
13:24
You have a place to storm. They get big. I mean, your capture and all travelling across the network, you go to AA a large hub somewhere are large volume segment. It's gonna grow quick.
13:37
Find a place, archive it. You're gonna want him for a long time. Especially if you're in the middle of an incident. Archive that stuff. Keep it because you can look back on that later, after the incident is done and say OK, we figure out what happened. We made it stop. But maybe we could look back and get some more lessons learned out of this.
13:50
Ah, and secure. Um you know, I said, once it goes by, it's there. If it's captured, it's captured the adversary. An attacker can't do anything.
13:58
If you leave them sitting on a system and that system becomes compromised, no one attacker could just delete him
14:03
again. Now you don't have resources,
14:05
so not only set permissions are secure them so they can't be accessed by an attacker or people who are unauthorized moving to overheat only location. You don't want to override him.
14:16
You don't want them anything to accidentally happen to him. You want him safe secure so you can look at them at any given time.
14:24
So storing them, you know, if your segment and captures or like, you know, it's a one gig to gig per cat.
14:31
Um, getting dates and time. Don't call him. Capture one. Capture to capture three. It's gonna be really fun. We're like Well,
14:37
uh, this happened at 10 a.m. Okay. Well, I have 55 p kept files labeled one through 55.
14:43
Which one do I want? Who knows? So you open number one? Nope. That's from 9 to 9 20 Open number 29 29. 32.
14:52
It's a name that have some have some kind of
14:56
methodical process behind it. If you have more. Small inns are easier to work with. Like I said, I've worked with a 11 pea cap. Had to be over 20 to 40 gig and it took forever.
15:07
Even if I had smaller ones to work with, I could've said Okay, this peacock has information I want, but it's not the beginning of a session I'm not looking for, so I know I can move forward or backwards. You can combine them afterwards if you need to. But
15:20
realistically, smaller are easier to work with.
15:22
Make copies
15:24
don't work with the original. You always have the kind of an archived original copy somewhere that you can work from, so you get multiple working off the same thing and validate that you are working on the actual peek if you need it.
15:35
And the amount we talked about the different about capture filters. If you can do full cap, full packet capture
15:41
at line speeds and you have the storage to do it all. I mean, that might be cool. You might never need to look through it, but you might. There's no no, no talent either way from the get go. Um, but
15:54
you can only keep stuffers. And realistically, you can keep stuff for so long. If you do full packet capture on a very high volume network.
16:03
Eventually, you just you're storing stuff, storing stuff, storing stuff, storing stuff, sources. Are you gonna look through it? Are you not? It might be overkill, just depending on the situation.

Up Next