An Open-Source Approach
Total Page:16
File Type:pdf, Size:1020Kb
1 Network Security: An Open-Source Approach Blain R. Jones variety of functions which can be described as: (1) A product Abstract— This paper attempts to introduce the reader to the such as Snort performs the collection function. (2) People Network Security Monitoring (NSM) model and the availability perform the analysis. (3) Processes guide the escalation. of robust open-source network security utilities to achieve a Escalation involves informing decision makers about network defensible network. To achieve a secure network, the analyst intruders. must fully implement all aspects of the Security Life Cycle. The Security Life Cycle is a process for maintaining an acceptable NSM is just one part of the process of securing a network. level of perceived risk of network security. Detection is one By combining NSM and perimeter protection, e.g., firewall, component of the process. Open source tools that can be used in it’s possible to achieve a complete security lifecycle. NSM the detection phase of the security life cycle include Sguil, can be used for the assessment, detection, and response aspect MySQL, Snort, Barnyard, Tcpflow, Sancp, P0f, and of the security lifecycle, and protection can be achieved Ethereal/Tethereal.[1] through perimeter protection devices. Index Terms— Intrusion Detection System, network security, Open source, II. SECURITY LIFECYCLE Network Security Monitoring, Security Life Cycle A process for maintaining an acceptable level of perceived risk is security. It is not an end state, but rather a process. I. INTRODUCTION There are four steps in a security lifecycle: assessment, HAT is network security monitoring (NSM)? NSM involves protection, detection, and response. collecting, analyzing, and increasing indications and warnings W A. Assessment to detect and respond to intrusions. This operational model was inspired by the United States Air Force's signals intelligence Assessment pertains to policies, procedures, laws, (SIGINT) collection methods and Todd Heberlein's "Network regulations, budgeting, and other functions that are preparation Security Monitor" [2]. SIGINT is a process of collecting information for the other three dimensions of the process. on communication and transforming this information into intelligence [3]. B. Protection This may sound a lot like an Intrusion Detection System Although protection is the desired end result, in this context (IDS), but IDS differs in that it does not have any signature to protection refers to the process of implementing detect against structured attacks that employ stealth, countermeasures to reduce the likelihood of a compromised encryption, zero-day exploits. In contrast NSM can collect all network. network traffic data related to an alert, this allows network C. Detection security analysis to drilling down through the data to analyze and validate the indicator or warning.[3] Detection is the process of identifying policy violators who Indications are observable actions which define enemy are unauthorized to use or perform unacceptable actions on a capabilities and intentions. Within the context of NSM computer network. This subject is the focus of this paper indicators are outputs from products which are created by IDS D. Response and are usually referred to as alerts. Trained people who may Response is acting on the information gathered during the be referred to as analysts should be engaged in interpreting detection phase. The activities that occur during the response intrusions. The interpretation of indicators results in warnings. phase include maintenance on the countermeasures Warnings are human conclusions which indicate to decision implemented during the protection phases and prosecution of makers that a network may have been compromised [4]. intruders. [4] Intrusion Detection Systems (IDS) function as a secondary system designed to backup systems such as firewalls, encryption, and authentication. A secondary system is required in case a primary system’s rule set is not updated correctly [5]. One can see then that NSM is more than just the IDS model. Many confuse NSM with IDS; however, NSM includes a Manuscript revised July 17, 2005 Blain R. Jones is an Information Technology instructor at a Community college 2 Assessment Response Protection Detection Figure 1 Security Lifecycle Although it is challenging to defend a network from Figure 2 Sguil Interface intruders, it is important to realize that there are open-source tools that can be used in the detection phase of the security lifecycle III. OPEN-SOURCE The UNIX philosophy for building tools/utilities is one of cooperation. According to Doug McIlroy “This is the UNIX philosophy: Write programs that do one thing and do it well. Write programs to work together. Write programs to handle text streams, because that is the universal interface.”[6] This is what Sguil (pronounced sgweel) does for NSM; it allows the integration of several cross-platform tools including Tcl/Tk, MySQL, Snort, Barnyard, SANCP, Tcpflow, p0f, and tcpdump. [4] A. Sguil (http://sguil.sourceforge.net/) Figure 3 Sguil Component interactions There are thee main components of Sguil: a plugin to The analyst can use these components to view Snort events barnyard (op_sguil), a GUI server (sguild), and a GUI client in near real time. There are seven incident categories for (sguil.tk). Sguil is completely written in Tcl/Tk. Tool classifying Snort events or events may be marked for no Command Language (Tcl) is an interpreted programming further future action required (NA). To retrieve archived language well suited for rapid application development. Tk is events the analyst can create a custom query using SQL or the graphic tool kit that generates the Sguil interface (Figure 2) through preformatted queries.[4] on the analyst’s screen. This analysis interface is what makes Also, the Sguil package provides a patch for the portscan Sguil valuable to the end user. Sguil displays to the end user preprocessor (logs to a pipe deliminated file), a patch for the network packet information from a variety of open source stream4 preprocessor (keepstas type ‘db’ for logging pipe utilities in real time. In fact, it has a tab called “real time deliminated stats to a file), and a tcl script (sensor agent.tcl) events.” By default the screen is broken down into three for loading the modified outputs into the database. Using windows with the top window showing the most severe alerts, these components the analyst may gain immediate access to the middle the less serious alerts, and the bottom the least protscan and session data.[4] serious alerts. In the bottom half of the display, the window is Final components are used for the analysis of the raw data broken vertically into two halves. The left side of the display associated with a specific session. Xcriptd is a daemon that provides host name and Whois database information. The monitors requests from Sguil client program. Once queried, it right side of this window provides detailed information for the converts raw tcpdump files for packets matching the requested highlighted alert in the real time event tab. If alerts warrant session. Then, the stream is either fed through Tcpflow to further investigation, the alert can be moved to the “Escalated create a transcript or the binary data is sent back to the Sguil Events” tab where the information may be further investigated. client to be loaded into Ethereal for further analysis[7]. A diagram defining how the different Sguil components interact with each other is indicated in figure 3. B. MySQL (http://www.mysql.com/) MySQL is used to store the alerts and packet data gathered from Snort. Using MySQL as the database gives the analyst 3 the ability to interface with the network data in three different every connection is an event that must be validated through ways. First, Sguil provides an integrated database query tool. some means. With Sancp rules are used to identify, record, To access the query tool, open up the "Query" menu from the and tag traffic of interest. A new feature since v1.4.0 main menu bar, then select "Query Builder". At this point it’s Connections (‘stats’) is “tagging” a connection to be loaded possible to query the event, sessions or sancp table. Secondly, into a database for further analysis.[11] click the GUI elements to build a valid query for a particular Three types of logging for a connection are controlled using table or simply type the query into the text area. By running Sancp rules: pcap, stats, and realtime. Pcap refers to packet queries from the Query Builder, they will show up in the Sguil data captured on the connection in tcpdump format, stats refers console, and it will be possible to right-click on the rows to to a single line summary of an full connection once it is closed, and realtime is a snapshot of stats based on the initial packet, perform all the common Sguil actions. Third, a well versed for immediate reporting Stats and realtime contain fields user of MySQL client may use it to access the information which may be utilized for recording packet statistics, TCP desired. Due to the nature of Sguil being an open-source flags, p0f data, and other vitals about how to handle the project, information on the contents of each table can be found connection.[11] in Sguil’s documentation. G. P0f (http://lcamtuf.coredump.cx/p0f.shtml) C. Snort (http://www.snort.org/) A versatile passive operation system identification tool is Snort is one of the most well-known open-source network- P0f. P0f attempts to identify the operating system of the hosts based intrusion detection systems [8]. It also has the capability it encounters using one of these tests: (1) By default it uses a to collect and view packets. Snort provides the alert data to SYN packet test. P0f does this by watching inbound SYN the Sguil database.