CIT 485: Network Forensics
Total Page:16
File Type:pdf, Size:1020Kb
CIT 485/585 Network Forensics The primary objective of this assignment is to learn a process for investigating security incidents and to give students practice analyzing such an incident using captured network data. 1S TUDENT LEARNING OUTCOMES 1. Describe digital evidence and how the type of legal dispute affects evidence used to resolve it. 2. Describe the steps of the OSCAR network forensics methodology. 3. Identify and decode protocols used on non-standard ports. 4. Investigate suspicious network data for malicious activity. 2D IGITAL EVIDENCE Digital evidence refers to any data collected in digital form from any computer, whether that computer is a desktop, mobile device, game console, printer, or IoT device. A primary goal of digital forensics is ensuring evidence integrity, the preservation of evidence in its original form. Evidence integrity is supported by a chain of custody, a set of documentation that describes the acquisition, copying, and analysis of digital evidence. As analysis of digital data often changes that data (reading a file will not modify the file itself but will change the last accessed time on the file), cryptographic checksums such as SHA-256 are often used to ensure that copies of digital evidence match the original evidence. Details of digital evidence handling are discussed in CIT 430: Computer Forensics. Digital evidence in a criminal case is returned through an inventory of items take through a search warrant. Any devices that may contain an embedded computer can contain digital evidence. Defense attorneys can request an invetory of items and obtain forensic copies of the data from those devices. If items have been collected and not forensically analyzed, defense can request that forensic copies be made and provided to them. Discovery in civil cases is governed by the Federal Rules of Civil Procedure (FRCP) and each party is responsible for requesting digital evidence. However, parties may not know what devices exist that may contain digital evidence, as there is no inventory as is provided in a criminal case. 3N ETWORK EVIDENCE While disk forensics can rely on copied images made of disks, network evidence is ephemeral. Packets flow across the wire in milliseconds and then are gone forever. The data captured from the network at the time of the security incident is the most that will be available, whether that evidence be logs from network devices or services, email messages, browser activity, netflow records, or full packet capture data from one or more perspectives. While a desktop or server can be shut down for a short period of time to have its hard drive copied, network devices often do not have permanent storage and so evidence disappears upon a reboot. While a well prepared organization will setup packet capturing systems and log aggregators that network devices can forward log messages to for long term storage, such data is not stored forever. Most organizations delete 1 older log files and packet captures due to the cost of storage, so the amount of information availability to investigators decreases over time. 4N ETWORK FORENSICS INVESTIGATIVE METHODOLOGY (OSCAR) Analyzing network evidence needs to follow a procedure so that results are both accurate and reproducible. One such methodology is the OSCAR approach to network forensics. • Obtain Information • Strategize • Collect Evidence • Analyze • Report 4.1O BTAIN INFORMATION At the beginning of an investigation, investigors must obtain information about the incident and the network environment in which is occurred. Important information includes what happened, when it happened, who was involved with the incident, which systems and data were affected, and what actions were taken about the incident already. 4.2S TRATEGIZE It is important to identify the goals of an investigation and plan the incident handling process. In particular, it is important to prioritize collection of different types of evidence. Not only are some forms of evidence more useful than others, but most forms of network evidence are volatile and will not longer be available after a certain amount of time. It is is important to • Understand the goals and time frame of the investigation. • Identify resources, including personnel and equipment. • Identify likely sources of evidence. • Estimate the value and cost of obtaining each type of evidence. • Prioritze evidence acquisition. 4.3C OLLECT EVIDENCE It is important to document all evidence acquired, recording the source and type of the evidence, the time when it was acquired, and the system from which it was obtained. When making copies of evidence, use cryptographic checksums like SHA-256 so that you can verify that the copies are identical to the original evidence. 2 4.4A NALYZE One of the essential parts of analysis is correlating multiple sources of evidence. Evidence often includes log files and packet captures. Time stamps and IP addresses can be used to correlate events recorded in different types of evidence. Once evidence is correlated, the investigator can build a timeline of events, identifying who did what, when, and on what systems. The analysis process is iterative, with initial findings leading to the need to collect new sources of evidence, which fuels further analysis. 4.5R EPORT None of the efforts above matter unless you are able to convey the results to others. Reports should be tailored to the audience, which may be nontechnical. It is important to be able to explain what happened during a security incident and how it can be demonstrated that the events happened as described to a broad audience. 5P ORTS AND PROTOCOLS Wireshark has powerful abilities to dissect different application layer protocols, but it can be fooled by the simple expedient of running a service on a nonstandard port, since Wireshark decides which application layer protocol dissector to use based on the TCP port and not on the actual application layer contents of the TCP packets being analyzed. To work around this common problem, Wireshark provides the Decode As option in the right click menu that gives the user the ability to choose how to interpret application layer data. Open the capture file ssh-different-port.pcapng. When you open this file, you will see the pro- tocol for all packets listed as TCP. The packets form a complete TCP stream, starting with the 3-way hand- shake and end with FIN packets acknowledge by both sides of the conversation. Looking for the server port number, we find it to be 2222, which is not a well known standard port number for any service. The first step towards determine what protocol is being used is to right click on a packet and follow the TCP stream. When you follow the TCP stream, you should find plaintext strings beginning with SSH-2.0, which is a clear indicator that this stream is an ssh session. Right click on any of the packets in the stream, then select the option to decode the stream. This will bring up a window, in which you can select a port number (use the port number discovered above) and select a protocol from a list (select SSH). Click on OK, and you will see that the value in the Protocol column has changed to SSHv2 for many of the packets (similarly to our experience with HTTP above, packets containing only data with no decodable application information are just listed as TCP even though they are part of a stream associated with a known application layer protocol. If you examine the newly labeled SSHv2 packets, you will find an option to open the application layer. In the application layer component on various packets, you can see text strings identifying the protocol version, client and server versions, and cryptographic protocol suites that are being negotiated for use during the ssh session. You will also see additional information about keys, padding, and so forth that are not text strings and which are very difficult to find from the TCP stream. Based on what you learned above, answer the following questions: 1. What version of ssh is the client using? 2. What version of ssh is the server using? 3 3. Which encryption algorithm is used for the packets in this session? 4. Which message authentication code is used for this session? 5. What is the smallest amount of data contained in an ssh packet in this session? 6A NN’S BAD AIM Anarchy-R-Us, Inc. suspects that one of their employees, Ann Dercover, is really a secret agent working for their competitor. Ann has access to the companys prize asset, the secret recipe. Security staff are worried that Ann may try to leak the companys secret recipe. Security staff have been monitoring Anns activity for some time, but havent found anything suspicious–until now. Today an unexpected laptop briefly appeared on the company wireless network. Staff hypothesize it may have been someone in the parking lot, because no strangers were seen in the building. Anns computer, (192.168.1.158) sent IMs over the wireless network to this computer using AOL Instant Messenger (AIM). The rogue laptop disappeared shortly thereafter. The organization has captured the packets from the network activity in the file evidence01.pcap. When investigating suspicious network activity, you want to be able to determine 1. Who: who are the hosts performing most of the communication in this capture file. Identify the hosts by DNS name, IP address, and MAC address if possible. 2. When: when did the communication occur. Wireshark provides times as seconds from the start of the capture by default. You want to report times as 24-hour timestamps in Coordinated Universal Time (UTC). 3. What: what happened on the network during this capture. We want to know this at a high level, e.g.