Advanced Wireshark Network Forensics - Part 3/3

Netsec Explained
27 Jan 201912:00

Summary

TLDRThis script details a network security analysis of a denial-of-service attack on an FTP server. The investigation uncovers an ARP scan, port scanning, and a brute-force attack resulting in unauthorized file access. The presenter guides through packet analysis techniques, using tools to filter and identify malicious activities, ultimately carving out and examining the downloaded file. The session concludes with resources for further learning in network security and forensics.

Takeaways

  • πŸ” The script describes a network security analysis scenario involving a denial-of-service attack on an FTP server.
  • πŸ“ The attacker's IP address is identified as 101.168.56.101, and the FTP server's address is 56.1.
  • πŸ•΅οΈβ€β™‚οΈ The analysis aims to determine the cause of the FTP traffic spike and events leading to the server going offline, including file transfers and user account compromises.
  • πŸ“ Documentation of goals, steps, and results is emphasized as a crucial part of the analysis process.
  • πŸ”Ž The capture file is filtered to show only two IP addresses, indicating a focus on the attacker and the FTP server.
  • 🌐 An ARP scan is detected, suggesting the attacker was mapping the network to find the FTP server.
  • πŸ”‘ A port scan reveals open ports 21, 445, 139, 135, and unregistered high-number ports, which might be related to Microsoft NetBIOS.
  • πŸš€ The script details a brute-force attack on the FTP server, with the attacker successfully logging in using the 'anon anon' credentials.
  • πŸ“ The attacker downloaded a file named 'why we can't have nice cat.PNG', which was carved out of the network traffic for further analysis.
  • πŸ”‘ The file's hash was taken to ensure integrity and to compare against the original file on the server.
  • πŸ“š The presenter recommends resources for learning more about network security, including forensics contest, honeynet.org, and malware traffic analysis.

Q & A

  • What type of attack was reported against the FTP server?

    -A denial-of-service attack was reported against the FTP server.

  • What was the IP address of the attacker?

    -The IP address of the attacker was 101.168.56.101.

  • What was the IP address of the FTP server that was attacked?

    -The IP address of the FTP server that was attacked was 56.1.

  • What was the purpose of the ARP scan mentioned in the script?

    -The ARP scan was used by the attacker to discover the IP address of the FTP server and potentially other devices on the network.

  • How many IP addresses were visible in the capture file according to the statistics?

    -Only two IP addresses were visible in the capture file, which were the attacker's address and the FTP server's address.

  • What ports were found open by the attacker during the port scan of the FTP server?

    -The attacker found ports 21, 445, 139, and 135 open during the port scan.

  • What is the FTP response code that indicates a successful login?

    -FTP response code 230 indicates a successful login.

  • What file did the attacker download from the FTP server?

    -The attacker downloaded a file named 'why we can't have nice cat.PNG'.

  • What method was used to verify the integrity of the downloaded file?

    -The file was carved out of the network bytes and its hash was taken to compare it with the hash of the original file on the server.

  • What resources were recommended in the script for further learning in network security?

    -Resources recommended include forensicscontest.com, honeynet.org, malware-traffic-analysis.net, and books such as 'Practical Packet Analysis' and 'Network Forensics: Tracking Hackers through Cyberspace'.

  • What is the significance of the file signature in the context of the script?

    -The file signature, such as 'PNG' in the case of the image file, helps in identifying the type of file that was downloaded by the attacker and ensures it matches the expected file format.

Outlines

00:00

πŸ›‘οΈ Investigating a Denial-of-Service Attack on FTP Server

The script begins with an examination of a denial-of-service attack on an FTP server, with a focus on understanding the cause of a spike in FTP traffic prior to the server going offline. The investigation includes identifying the attacker's IP address and the FTP server's address, and aims to determine whether files were transferred or user accounts compromised. The process involves documenting goals, analyzing the pcap file, and looking for indicators of compromise. The script describes the initial steps of the analysis, including filtering ARP traffic to identify network devices and conducting a port scan to find open ports, which in this case were ports 21, 445, 139, and 135. The analysis also notes the presence of unregistered high-number ports, suggesting potential NetBIOS traffic.

05:00

πŸ”’ Analyzing FTP Traffic and Identifying a Brute-Force Attack

This paragraph delves into the FTP traffic on port 21, revealing a significant volume of traffic that appears to be part of a brute-force attack, with numerous login attempts. The script details the process of identifying successful login attempts by filtering for FTP response code 230, which indicates a successful login. It is discovered that the attacker logged in using the 'anon anon' credentials and downloaded a file named 'why we can't have nice cat.PNG'. The file is carved out of the network traffic, and its hash is taken for integrity checking. The script also discusses the importance of filtering packets and conversations when analyzing pcap files and provides a method for quickly identifying downloaded files by their size in the conversations list.

10:01

πŸ“š Resources for Network Security Enthusiasts and Recap

The final paragraph provides a recap of the findings from the investigation, which include an ARP scan, port scan, and the discovery of a brute-force attack that led to unauthorized file download. The attacker's activities are summarized, and resources for further learning in network security are recommended. These include forensics contest websites, books like 'Practical Packet Analysis' and 'Network Forensics: Tracking Hackers through Cyberspace', and NIST publication 886 for integrating forensic techniques into incident response. The script concludes by inviting feedback and suggestions for future topics, and encourages viewers to like, subscribe, and check out the provided links.

Mindmap

Keywords

πŸ’‘Denial-of-Service (DoS) Attack

A Denial-of-Service (DoS) attack is a malicious attempt to disrupt the normal functioning of a network, service, or website by overwhelming it with traffic. In the video, it is mentioned that an attack was reported against an FTP server, which is a type of DoS attack that aims to make the server unavailable to its intended users.

πŸ’‘FTP Server

FTP stands for File Transfer Protocol, and an FTP server is a computer program that allows users to transfer files to and from the server over a network. In the script, the FTP server with the IP address 192.168.1 is the target of the DoS attack and subsequent investigation.

πŸ’‘Traffic Spikes

Traffic spikes refer to sudden, significant increases in network traffic. In the video, traffic spikes were observed on the FTP server prior to it going offline, indicating unusual activity that could be related to the DoS attack.

πŸ’‘ARP Scan

ARP, or Address Resolution Protocol, is used to map an IP address to a physical hardware address on a local network. An ARP scan is a method used to discover all the devices on a network by sending ARP requests. In the script, the attacker uses an ARP scan to find the IP address of the FTP server.

πŸ’‘Port Scan

A port scan is a process of checking a series of IP addresses to identify open ports and the services running on them. In the video, the attacker performs a port scan on the FTP server to find open ports, which are then used to determine potential vulnerabilities.

πŸ’‘FTP Traffic

FTP traffic refers to the data packets that are transmitted during FTP sessions. In the script, a flood of FTP traffic is mentioned, which is later analyzed to understand the attacker's activities, such as brute-force login attempts.

πŸ’‘Brute-Force Attack

A brute-force attack is a method of cracking a password by systematically checking all possible combinations until the correct one is found. In the video, the attacker uses a brute-force attack to attempt to gain access to the FTP server by trying multiple login credentials.

πŸ’‘FTP Response Code 230

FTP response codes are three-digit numbers that indicate the status of FTP commands. Code 230 specifically means 'User logged in, proceed'. In the script, the presence of this code indicates a successful login to the FTP server by the attacker.

πŸ’‘Packet Capture (PCAP)

A packet capture is a recording of all the data packets that pass through a network. PCAP files contain this data and can be analyzed to understand network activity. The video script describes the analysis of a PCAP file to investigate the FTP server attack.

πŸ’‘File Carving

File carving is the process of extracting files from a larger file or data stream, such as a PCAP file. In the video, the term is used to describe the extraction of a downloaded file by the attacker from the network traffic for further analysis.

πŸ’‘Hash

In computing, a hash is a unique fixed-size string of characters that is generated from a file or data set. Hashes are used for verifying data integrity. In the script, the hash of the carved file is taken to compare it with the original file on the server.

Highlights

A denial-of-service attack was reported against an FTP server with IP 192.168.1.

FTP traffic spikes were observed prior to the server going offline.

The attacker's IP address was identified as 101.168.56.101.

An abstract goal was set to determine the cause of the FTP traffic spike and events leading to the server's offline status.

A methodology was proposed to document goals, steps, and results for analyzing the pcap file.

ARP scan activity was detected, indicating the attacker's reconnaissance of the network.

A third IP address, 56.100, was discovered during ARP replies, suggesting potential unknown network traffic.

Over 7,000 TCP connections were made between the two known IP addresses.

Port scanning revealed open ports 21, 445, 139, and 135 on the FTP server.

A brute-force attack was conducted on the FTP server, evidenced by multiple login attempts.

FTP response code 230 indicated a successful login by the attacker.

The attacker downloaded a file named 'why we can't have nice cat.PNG' using anonymous credentials.

The file 'why we can't have nice cat.PNG' was carved out of the network traffic for further analysis.

The file's hash was taken for integrity checks against the original file on the server.

Resources for further learning in network security were recommended, including forensics contest, honeynet, and malware traffic analysis.

Books such as 'Practical Packet Analysis' and 'Network Forensics: Tracking Hackers through Cyberspace' were suggested for deeper understanding.

NIST publication 800-86 was highlighted as a guide for integrating forensic techniques into incident response processes.

The importance of using file signature databases for identifying file types was emphasized.

Transcripts

play00:00

okay let's look at scenario two it looks

play00:04

like there was a denial-of-service

play00:04

attack that was reported against our FTP

play00:07

server

play00:10

192.168.1 and it also seems like there

play00:13

was some FTP traffic spikes that were

play00:15

seen prior to the FTP server being taken

play00:17

offline so what do we know we know the

play00:21

address of the attacker 1 i2 1 6 8 56 .

play00:25

101 and the address of the FTP server

play00:28

56.1 but what are we trying to figure

play00:32

out this one's a little bit more

play00:34

abstract so generally what we want to

play00:38

find out is what caused the spike in the

play00:39

FTP traffic and what events took place

play00:42

prior to the FTP server being taken

play00:44

offline so where any files transferred

play00:47

where any user accounts compromised

play00:49

things like that so let's take a look

play00:54

before we get started we always want to

play00:56

make sure that we document our goals

play00:58

steps and results in this scenario our

play01:01

goals are a little bit more abstract and

play01:02

will depend on what we find in the pcap

play01:04

in the meantime we at least know what

play01:07

types of things that we're looking for

play01:08

indicators of compromise so let's start

play01:12

with what happened before during and

play01:14

after the attack on the FTP server so in

play01:17

this case we want to know what led up to

play01:20

the attack what types of attacks did the

play01:22

attacker perform and were they able to

play01:24

get in and what did they find

play01:27

okay so now that we have our goals

play01:29

written down let's open the pcap whoa

play01:32

that's a lot of our frames being sent

play01:35

looking at the info column we can see

play01:38

that in most of these are per quests the

play01:39

IP address is going up for each request

play01:42

this looks like an ARP scan being sent

play01:44

off by 56 top 101 here the attacker

play01:47

address it might be a little crazy to

play01:50

sort through all the requests here so

play01:52

first let's take a look at how many

play01:53

conversations are within the capture

play01:55

file to begin with so that we see

play01:56

exactly how many IP addresses are in

play01:58

this we can do that by going to

play02:01

statistics and then conversations

play02:04

looking at the ipv4 tab the only IPs

play02:07

that we see are our 56.1

play02:09

and 101 addresses that we were already

play02:12

aware of

play02:13

that's good it means that this capture

play02:16

file was already filtered down for us

play02:18

glancing over at our TCP tab we can also

play02:21

see over 7,000 TCP connections were made

play02:24

just between these two addresses we're

play02:27

not gonna find anything interesting in

play02:28

there right away so let's make a mental

play02:31

note of that and move on now we already

play02:34

know that this capture file only has two

play02:35

IP addresses but even with that we want

play02:38

to look through the attack traffic and

play02:40

try to find out what the attacker was

play02:41

able to see on our network let's look at

play02:43

the ARP scans again our scans work by

play02:46

sending out a bunch of art requests

play02:48

throughout the network the idea is that

play02:50

when another device on the network

play02:51

receives an ARP request it will send an

play02:53

ARP reply so let's filter this down to

play02:56

show only the ARP replies okay cool we

play03:00

have the 56.1 and dot 101 that we

play03:04

expected but there's a third address dot

play03:08

100 we don't have any information on it

play03:11

so it's possible there was no

play03:12

communication from the attacker at all

play03:14

or it could have been filtered out from

play03:17

the capture either way let's make a note

play03:20

of this and move on at this point we're

play03:24

done with the ARP traffic so let's

play03:26

filter that out

play03:29

now we're starting to see a flood of

play03:31

packets coming from our attacker and

play03:32

based on the changing port numbers this

play03:34

is pretty obviously a network port scan

play03:37

so it looks like we're gonna have to do

play03:39

the same thing again from here how can

play03:41

we figure out what open ports the

play03:43

attacker was able to find in their scan

play03:45

of the system well we already know that

play03:47

when we send out a syn we expect to see

play03:49

a syn ack returned so let's filter by

play03:52

packets with the syn ACK flag set and

play03:55

just like that we were able to see the

play03:58

ports the attacker was able to find open

play03:59

here we have port 21 445 139 and 135 we

play04:06

also have these forty nine thousand

play04:08

number ports they're unregistered port

play04:10

so it's impossible to know exactly what

play04:12

protocols these belong to but with a

play04:14

little googling you'll see that

play04:16

Microsoft NetBIOS is the top hit either

play04:19

way let's document what we have hmm it

play04:24

looks like we still have a lot more data

play04:25

to come through we know this is an FTP

play04:28

server so let's eliminate the obvious

play04:30

and filter out port 21 with that we can

play04:33

separate the signal from the noise and

play04:34

verify that these are the only open

play04:36

ports the attacker was able to find and

play04:38

sure enough this is all we have there

play04:42

seems to be a few more syn ACK flagged

play04:43

packets in the mix but looking at the

play04:45

stream ID those aren't seen until well

play04:47

beyond the attackers port scan results

play04:49

which makes sense given how TCP works

play04:53

you can take a look at these on your own

play04:55

if you would like we will eventually get

play04:57

to them but following a formal

play04:58

methodology doesn't just mean that

play05:00

you'll get the answers that you're

play05:01

looking for it also means that you'll

play05:03

get the context of those answers so in

play05:07

the mean time these can be safely

play05:08

ignored now let's look at the ftp

play05:11

traffic on port 21 okay so this looks

play05:15

like the huge flood of ftp traffic we

play05:17

were told about we've already seen the

play05:19

traffic that's part of stream 20 that

play05:21

was the port scan we documented earlier

play05:23

but after that we start to see a lot of

play05:26

connection requests going straight to

play05:28

port 21 let's follow one of the streams

play05:30

and see what we can find hmm this looks

play05:34

like a bunch of login attempts

play05:35

let's hit the up arrow a few times and

play05:38

check out the other streams you know

play05:40

this definitely looks like a brute-force

play05:42

attack

play05:43

with all these attempted logins there's

play05:45

probably a burning question in the back

play05:46

ear mind did they get in so how can we

play05:51

figure that out well we can see these

play05:53

FTP codes like five thirty login

play05:56

incorrect there has to be one for a

play05:58

successful login well let's check on

play06:00

Google

play06:07

there it is FTP response code 230 let's

play06:12

put that in our filter and see what we

play06:13

can find awesome

play06:16

there's only two streams and it looks

play06:18

like both of them have the response to

play06:20

30 let's check them out okay the first

play06:25

one looks like it was still part of the

play06:27

brute-force attack they logged in but

play06:29

didn't go anywhere with it now let's

play06:31

look at the second one we can hit the

play06:33

down key to go to our previous filter

play06:38

ah this one's a bit more interesting

play06:41

here we can see that they logged in with

play06:44

the anon anon then they listed the

play06:46

directory changed to images listed the

play06:49

directory again and downloaded the file

play06:51

called why we can't have nice cat PNG

play06:55

and the server is even so kind as to

play06:58

tell us the exact size of the file so we

play07:00

definitely want to write this down since

play07:05

this is all over the network we can see

play07:07

the results of each command

play07:08

let's hit the up arrow a couple of times

play07:09

and step through the streams here we can

play07:12

see the contents of the first directory

play07:14

the second directory and then this looks

play07:16

like the PNG that the attacker

play07:18

downloaded if we didn't know any better

play07:20

we could look at the first few bytes and

play07:22

match that to a file signature in this

play07:24

case PNG files simply spell out PNG in

play07:27

their signature so that makes it easy on

play07:29

us now something that I want to point

play07:32

out is with real-world capture files it

play07:34

won't always be as easy as pressing the

play07:36

up arrow and streams list sometimes the

play07:39

next stream or the next several streams

play07:40

are actually parts of other traffic this

play07:43

is why you need to filter packets and

play07:45

list conversations as your first steps

play07:47

when analyzing pcap files another way we

play07:50

can quickly find a downloaded file is to

play07:52

look in the conversations list we know

play07:55

the size of the file given by the FTP

play07:57

servers response so all I need to do is

play07:59

find a conversation that has at least

play08:01

the same number of bytes then we can

play08:03

filter by that and look at the stream

play08:05

this is also how I tend to do a quick

play08:08

and dirty analysis of a packet capture

play08:10

to see if there are any obvious files

play08:12

within the pcap that can be extracted

play08:16

okay now that we've located the file

play08:19

let's carve it out like we did in

play08:20

scenario one and take a hash of it that

play08:23

way we can compare the hash against the

play08:25

hash of the original file on the server

play08:27

for integrity

play08:33

last step let's go ahead and open the

play08:36

file so that we can see what the

play08:38

attacker was able to get their hands on

play08:40

well that's disturbing

play08:43

but hey you know what we're done let's

play08:46

hop back to the slides and review what

play08:48

we found okay

play08:50

recap the attacker set off an ARP scan

play08:53

of the subnet 1 & 2 1 6 8 56 0 they were

play08:57

able to find the address 56.1 which was

play09:00

the FTP server we were looking in to

play09:02

begin with and we also found this

play09:04

address 56 dot 100 which we don't have

play09:07

any traffic so we couldn't really do any

play09:09

further analysis on the attacker then

play09:12

started a port scan against the host

play09:14

56.1 and found several ports so port 21

play09:19

4 4 5 139 135 and so on after the port

play09:25

scan the attacker set off a brute-force

play09:26

attack and was able to find the

play09:28

credentials anon anon and with those

play09:31

credentials they were able to download a

play09:32

file why we can't have nice cat PNG and

play09:36

we were able to carve that file out of

play09:38

the network bytes and we have a sum of

play09:40

the file to compare to what's on the

play09:41

server well that's all I have for you

play09:44

guys if you manage to stick through this

play09:47

far I just want to say thank you net SEC

play09:50

is a passion of mine and I'm just glad

play09:52

to have the opportunity to share this

play09:53

with you now I don't want to let you go

play09:56

empty-handed

play09:57

here's a few resources that I use to get

play09:59

started and a few more that I still use

play10:01

to better my own skills some of the ones

play10:04

that I want to point out here are

play10:05

forensics contest comm honeynet org and

play10:08

malware traffic analysis net forensics

play10:12

contest comm I cannot recommend enough

play10:14

this is the group that runs or at least

play10:17

used to run the DEF CON network forensic

play10:20

challenges their online puzzles start

play10:22

off pretty easy

play10:23

and then slowly build to incredibly

play10:25

complex challenges hands down the best

play10:28

place to start here next on e network I

play10:32

would say are more intermediate and

play10:34

advanced level challenges they'll

play10:36

require you to do some of the same stuff

play10:37

we did in here plus a little bit more

play10:40

malware analysis on the end finally if

play10:43

you want a real-world challenge

play10:44

check out malware traffic analysis net

play10:47

this

play10:48

Blagh is almost exclusively real-world

play10:50

attack traffic and you're gonna really

play10:52

need to think outside of the box

play10:53

sometimes to find what you're looking

play10:55

for if some light readings more your

play10:58

thing here's a few books you're gonna

play10:59

want to check out practical packet

play11:01

analysis another great resource for

play11:04

beginners once you're finished with that

play11:05

network forensics tracking hackers

play11:08

through cyberspace is a good one to bump

play11:10

up your skills to the next level this

play11:13

one was also written by the DEF CON

play11:14

Network forensics people if you wanna

play11:17

learn how to use these techniques into

play11:18

your current Incident Response process

play11:20

check out NIST publication 886 as a

play11:23

guide to integrating forensic techniques

play11:25

and then of course the file signature

play11:28

database that we used earlier gary

play11:30

kessler net well again thank you for

play11:34

taking the time and I hope you learned

play11:36

something new if you like this workshop

play11:38

series or whatever you want to call it

play11:40

let me know your thoughts in the

play11:42

comments down below

play11:43

also let me know if there's a particular

play11:45

net SEC topic you'd like me to cover

play11:47

next who knows I might make a video of

play11:49

it anyways check out the links in the

play11:52

description below and don't forget to

play11:53

Like and subscribe to see more videos

play11:55

like this I'll see you next time

Rate This
β˜…
β˜…
β˜…
β˜…
β˜…

5.0 / 5 (0 votes)

Related Tags
Network SecurityFTP ServerCyber AttackDenial-of-ServiceTraffic AnalysisPort ScanARP ScanBrute ForceIncident ResponseDigital ForensicsCyber Threats