What You Will Learn
SEC503 is one of the most important courses that you will take in your information security career. While past students describe it as the most difficult class they have ever taken, they also tell us it was the most rewarding. This course isn't for people who are simply looking to understand alerts generated by an out-of-the-box Intrusion Detection System (IDS). It's for people who want to deeply understand what is happening on their network today, and who suspect that there are very serious things happening right now that none of their tools are telling them about. If you want to be able to find zero-day activities on your network before disclosure, this is definitely the class for you.
What sets this course apart from any other training is that we take a bottom-up approach to teaching network intrusion detection and network forensics. Rather than starting with a tool and teaching you how to use that tool in different situations, this course teaches you how and why TCP/IP protocols work the way they do. After spending the first two days examining what we call "Packets as a Second Language," we add in common application protocols and a general approach to researching and understanding new protocols. With this deep understanding of how network protocols work, we turn our attention to the most widely used tools in the industry to apply this deep knowledge. The result is that you will leave this class with a clear understanding of how to instrument your network and the ability to perform detailed incident analysis and reconstruction.
These benefits alone make this training completely worthwhile. What makes the course as important as we believe it is (and students tell us it is), is that we force you to develop your critical thinking skills and apply them to these deep fundamentals. This results in a much deeper understanding of practically every security technology used today.
Preserving the security of your site in today's threat environment is more challenging than ever before. The security landscape is continually changing from what was once only perimeter protection to protecting exposed and mobile systems that are almost always connected and sometimes vulnerable. Security-savvy employees who can help detect and prevent intrusions are therefore in great demand. Our goal in SEC503: Intrusion Detection In-Depth is to acquaint you with the core knowledge, tools, and techniques to defend your networks with insight and awareness. The training will prepare you to put your new skills and knowledge to work immediately upon returning to a live environment.
Mark Twain said, "It is easier to fool people than to convince them that they've been fooled." Too many IDS/IPS solutions provide a simplistic red/green, good/bad assessment of traffic, and too many untrained analysts accept that feedback as the absolute truth. This course emphasizes the theory that a properly trained analyst uses an IDS alert as a starting point for examination of traffic, not as a final assessment. SEC503 imparts the philosophy that the analyst must have access and the ability to examine the alerts to give them meaning and context. You will learn to investigate and reconstruct activity to deem if it is noteworthy or a false indication.
This course delivers the technical knowledge, insight, and hands-on training you need to defend your network with confidence. You will learn about the underlying theory of TCP/IP and the most used application protocols, such as DNS and HTTP, so that you can intelligently examine network traffic for signs of an intrusion. You will get plenty of practice learning to master a variety of tools, including tcpdump, Wireshark, Snort, Zeek, tshark, and SiLK. Daily hands-on exercises suitable for all experience levels reinforce the course book material so that you can transfer knowledge to execution. Evening Bootcamp sessions and exercises force you to take the theory taught during the day and apply it to real-world problems immediately. Basic exercises include assistive hints, while advanced options provide a more challenging experience for students who may already know the material or who have quickly mastered new material.
A Virtual machine (VM) is provided with tools of the trade. It is supplemented with demonstration PCAPs containing network traffic. This allows you to follow along on your laptop with the course material and demonstrations. The PCAPs also provide a good library of network traffic to use when reviewing the material, especially for the GCIA certification associated with this course.
SEC503 is most appropriate for students who monitor and defend their network, such as security analysts, although others may benefit from the course as well. Students range from seasoned analysts to novices with some TCP/IP background. Please note that the VMware image used in class is a Linux distribution, so we strongly recommend that you spend some time getting familiar with a Linux environment that uses the command line for entry, along with learning some of the core UNIX commands, before coming to class.
You Will Learn
- How to analyze traffic traversing your site to avoid becoming another "Hacked!" headline
- How to identify potentially malicious activities for which no IDS has published signatures
- How to place, customize, and tune your IDS/IPS for maximum detection
- Hands-on detection, analysis, and network forensic investigation with a variety of open-source tools
- TCP/IP and common application protocols to gain insight about your network traffic, enabling you to distinguish normal from abnormal traffic
- The benefits of using signature-based, flow, and hybrid traffic analysis frameworks to augment detection
You Will Be Able To
- Configure and run open-source Snort and write Snort signatures
- Configure and run open-source Bro to provide a hybrid traffic analysis framework
- Understand TCP/IP component layers to identify normal and abnormal traffic
- Use open-source traffic analysis tools to identify signs of an intrusion
- Comprehend the need to employ network forensics to investigate traffic to identify a possible intrusion
- Use Wireshark to carve out suspicious file attachments
- Write tcpdump filters to selectively examine a particular traffic trait
- Craft packets with Scapy
- Use the open-source network flow tool SiLK to find network behavior anomalies
- Use your knowledge of network architecture and hardware to customize placement of IDS sensors and sniff traffic off the wire
The hands-on training in SEC503 is intended to be both approachable and challenging for beginners and seasoned veterans. There are two different approaches for each exercise. The first contains guidance and hints for those with less experience, and the second contains no guidance and is directed toward those with more experience. In addition, an optional extra credit question is available for each exercise for advanced students who want a particularly challenging brain teaser. A sampling of hands-on exercises includes the following:
- Day 1: Hands-On: Introduction to Wireshark
- Day 2: Hands-On: Writing tcpdump filters
- Day 3: Hands-On: IDS/IPS evasion theory
- Day 4: Hands-On: Snort rules
- Day 5: Hands-On: Analysis of three separate incident scenarios
- Day 6: Hands-On: The entire day is spent engaged in the NetWars: IDS Version challenge
What You Will Receive
- Electronic Courseware with each section's material
- Electronic Workbook with hands-on exercises and questions
- TCP/IP electronic cheat sheet
- MP3 audio files of the complete course lecture
Syllabus (46 CPEs)Download PDF
The first section of this course begins our bottom-up coverage of the TCP/IP protocol stack, providing a refresher or introduction, depending on your background, to TCP/IP. This is the first step in what we think of as a "Packets as a Second Language" course. Students begin to be introduced to the importance of collecting the actual packets involved in attacks and are immediately immersed in low-level packet analysis. We will cover the essential foundations such as the TCP/IP communication model, theory of bits, bytes, binary and hexadecimal, and the meaning and expected behavior of every field in the IP header. Students are introduced to the use of open-source Wireshark and tcpdump tools for traffic analysis.
We begin our exploration of the TCP/IP communication model with the study of the link layer, the IP layer, both IPv4 and IPv6, and packet fragmentation in both. We describe the layers and analyze traffic not just in theory and function, but from the perspective of an attacker and defender.
All traffic is discussed and displayed using both Wireshark and tcpdump, with the pros and cons of each tool explained and demonstrated. Students can follow along with the instructor viewing the sample traffic capture files supplied. Multiple hands-on exercises after each major topic offer you the opportunity to reinforce what you just learned.
Concepts of TCP/IP
- Why is it necessary to understand packet headers and data?
- TCP/IP communications model
- Data encapsulation/de-encapsulation
- Discussion of bits, bytes, binary, and hex
Introduction to Wireshark
- Navigating around Wireshark
- Examination of Wireshark statistics
- Stream reassembly
- Finding content in packets
Network Access/Link Layer: Layer 2
- Introduction to 802.x link layer
- Address resolution protocol
- ARP spoofing
IP Layer: Layer 3
- Examination of fields in theory and practice
- Checksums and their importance, especially for an IDS/IPS
- Fragmentation: IP header fields involved in fragmentation, composition of the fragments, fragmentation attacks
- Comparison with IPv4
- IPv6 addresses
- Neighbor discovery protocol
- Extension headers
- IPv6 in transition
Section 2 continues where the first section ended, completing the "Packets as a Second Language" portion of the course and laying the foundation for the much deeper discussions to come. In this section, students will gain a deep understanding of the primary transport layer protocols used in the TCP/IP model. Two essential tools, Wireshark and tcpdump, are further explored, using advanced features to give you the skills to analyze your own traffic. The focus of these tools is to filter large scale data down to traffic of interest using Wireshark display filters and tcpdump Berkeley Packet Filters. These are used in the context of our exploration of the TCP/IP transport layers covering TCP, UDP, and ICMP. Once again, we discuss the meaning and expected function of every header field, covering a number of modern innovations that have very serious implications for modern network monitoring, and we analyze traffic not just in theory and function, but from the perspective of an attacker and defender.
Once again, students can follow along with the instructor viewing the sample capture files supplied. Hands-on exercises after each major topic offer you the opportunity to reinforce what you just learned.
The bootcamp material at the end of this section moves students out of theory and begins to work through real-world application of the theory learned in the first two sections. Students learn the practical mechanics of command line data manipulation that are invaluable not only for packet analysis during an incident but also useful for many other information security and information technology roles.
Wireshark Display Filters
- Examination of some of the many ways that Wireshark facilitates creating display filters
- Composition of display filters
Writing BPF Filters
- The ubiquity of BPF and utility of filters
- Format of BPF filters
- Use of bit masking
- Examination of fields in theory and practice
- Packet dissection
- Normal and abnormal TCP stimulus and response
- Importance of TCP reassembly for IDS/IPS
- Examination of fields in theory and practice
- UDP stimulus and response
- Examination of fields in theory and practice
- When ICMP messages should not be sent
- Use in mapping and reconnaissance
- Normal ICMP
- Malicious ICMP
Real-World Analysis -- Command Line Tools
- Regular Expressions fundamentals
- Rapid processing using command line tools
- Rapid identification of events of interest
Section 3 builds on the foundation of the first two sections of the course, moving into the world of application layer protocols. Students are introduced to the versatile packet crafting tool Scapy. This is a very powerful Python-based tool that allows for the manipulation, creation, reading, and writing of packets. Scapy can be used to craft packets to test the detection capability of an IDS/IPS, especially important when a new user-created IDS rule is added, for instance for a recently announced vulnerability. Various practical scenarios and uses for Scapy are provided throughout this section.
The focus of the section is on some of the most widely used, and sometimes vulnerable, crucial application protocols: DNS, HTTP(S), SMTP, and Microsoft communications. Particular attention is given to protocol analysis, a key skill in intrusion detection. Additional Wireshark capabilities are explored in the context of incident investigation and forensic reconstruction of events based on indicators in traffic data.
The course day ends with a discussion of modern IDS/IPS evasions, the bane of the analyst. Students are introduced to the theory behind these evasions, and several undocumented modern evasions are explained, along with discussion of the current detection gaps in the IDS marketplace at large. The theory and possible implications of evasions at different protocol layers are examined.
Again, students can follow along with the instructor viewing the sample traffic capture files supplied. Four hands-on exercises, one after each major topic, offer students the opportunity to reinforce what they just learned.
The end of section 3 again moves students from the realm of theory to practical application. Students continue in a guided exploration of real-world network data, applying the skills and knowledge learned over the first three sections of the course to an investigation of the data that will be used in the final capstone challenge.
- Packet crafting and analysis using Scapy
- Writing a packet(s) to the network or a pcap file
- Reading a packet(s) from the network or from a pcap file
- Practical Scapy uses for network analysis and network defenders
- Exporting web objects
- Extracting arbitrary application content
- Wireshark investigation of an incident
- Practical Wireshark uses for analyzing SMB protocol activity
Detection Methods for Application Protocols
- Pattern matching, protocol decode, and anomaly detection challenges
- DNS architecture and function
- Malicious DNS, including cache poisoning
- Detection challenges
- Practical Wireshark application
Modern HTTP and TLS
- Protocol format
- Why and how this protocol is evolving
- Detection challenges
- Protocol format
- Sample of attacks
- Detection challenges
IDS/IPS Evasion Theory
- Theory and implications of evasions at different protocol layers
- Sampling of evasions
- Necessity for target-based detection
Identifying Traffic of Interest
- Finding anomalous application data within large packet repositories
- Extraction of relevant records
- Application research and analysis
- Hands-on exercises after each major topic that offer students the opportunity to reinforce what they just learned.
The fundamental knowledge gained from the first three sections provides the foundation for deep discussions of modern network intrusion detection systems during section 4. Everything that students have learned so far is now synthesized and applied to designing optimized detection rules for Snort/Firepower, and this is extended even further with behavioral detection using Zeek (formerly known as Bro).
We begin with a discussion on network architecture, including the features of intrusion detection and prevention devices, along with a discussion about options and requirements for devices that can sniff and capture the traffic for inspection. This section provides an overview of deployment options and considerations, and allows students to explore specific deployment considerations that might apply to their respective organizations.
The remainder of the section is broken into two main parts. The first covers the most commonly used approach, signature-based detection using Snort or Firepower. The second is an introduction to Zeek, followed by a shift to constructing anomaly-based behavioral detection capabilities using Zeek's scripting language and cluster-based approach. One student who was already running Zeek (or Bro) prior to class commented that, "after seeing this section of the class, I now understand why [Zeek] matters; this is a real game changer."
After covering basic proficiency in the use of Zeek, the instructor will lead students through a practical threat analysis process that is used as the basis for an extremely powerful correlation script to identify any potential phishing activity within a defended network. Further practical examples are provided to students, demonstrating how this approach to behavioral analysis and correlation can close the enormous gap in relying solely on signature-based detection tools.
This section has less formal instruction and longer hands-on exercises to encourage students to become more comfortable with a less guided and more independent approach to analysis. This is intended to simulate the environment of an actual incident investigation that you may encounter at your sites. Hands-on exercises, one after each major topic, offer you the opportunity to reinforce what you just learned.
The material at the end of this section once again moves students out of theory and into practical use in real-world situations. Students continue to expand their understanding of the developing incident under analysis in preparation for the final capstone by applying all of the techniques learned so far.
- Instrumenting the network for traffic collection
- IDS/IPS deployment strategies
- Hardware to capture traffic
Introduction to IDS/IPS Analysis
- Function of an IDS
- The analyst's role in detection
- Flow process for Snort and Bro
- Similarities and differences between Snort and Bro
- Introduction to Snort
- Running Snort
- Writing Snort rules
- Solutions for dealing with false negatives and positives
- Tips for writing efficient rules
- Introduction to Zeek
- Zeek Operational modes
- Zeek output logs and how to use them
- Practical threat analysis
- Zeek scripting
- Using Zeek to monitor and correlate related behaviors
- Hands-on exercises, one after each major topic, offer students the opportunity to reinforce what they just learned.
The fifth section continues the trend of less formal instruction and more practical application in hands-on exercises. It consists of three major topics, beginning with practical network forensics and an exploration of data-driven monitoring vs. alert-driven monitoring, followed by a hands-on scenario that requires students to use all of the skills developed so far. The second topic continues the theme of data-driven analysis by introducing large-scale analysis and collection using NetFlow and IPFIX data. Following a discussion of the powerful correlations and conclusions that can be drawn using the network metadata, students will work on a second guided scenario that leverages this set of tools, in addition to other skills learned throughout the week. The section concludes with a detailed discussion of practical TLS analysis and interception and more general command and control trends and detection/analysis approaches. A third scenario is provided for students to work on after class.
Introduction to Network Forensics Analysis
- Theory of network forensics analysis
- Phases of exploitation
- Data-driven analysis vs. Alert-driven analysis
- Hypothesis-driven visualization
Using Network Flow Records
- NetFlow and IPFIX metadata analysis
- Using SiLK to find events of interest
- Identification of lateral movement via NetFlow data
Examining Command and Control Traffic
- Introduction to command and control traffic
- TLS interception and analysis
- TLS profiling
- Covert DNS C2 channels: dnscat2 and Ionic
- Other covert tunneling, including The Onion Router (TOR)
Analysis of Large pcaps
- The challenge of analyzing large pcaps
- Students analyze three separate incident scenarios.
The course culminates with a fun, hands-on, score-server-based IDS challenge. Students compete as solo players or on teams to answer many questions that require using tools and theory covered in the first five sections. The challenge presented is based on hours of live-fire, real-world data in the context of a time-sensitive incident investigation. The challenge is designed as a "ride-along" event, where students are answering questions based on the analysis that a team of professional analysts performed of this same data.
GIAC Certified Intrusion Analyst
The GIAC Intrusion Analyst certification validates a practitioner’s knowledge of network and host monitoring, traffic analysis, and intrusion detection. GCIA certification holders have the skills needed to configure and monitor intrusion detection systems, and to read, interpret, and analyze network traffic and related log files.
Fundamentals of Traffic Analysis and Application Protocols
Open-Source IDS: Snort and Bro
Network Traffic Forensics and Monitoring
- Students must have at least a working knowledge of TCP/IP and hexadecimal. To test your knowledge, see our TCP/IP and Hex Quizzes.
- Familiarity and comfort with the use of Linux commands such as cd, sudo, pwd, ls, more, less
Important! Bring your own system configured according to these instructions!
We ask that you do 5 things to prepare prior to class start. This early preparation will allow you to get the most out of your training. One of those five steps is ensuring that you bring a properly configured system to class. This document details the required system hardware and software configuration for your class. You can also watch a series of short videos on these topics at the following web link https://sansurl.com/sans-setup-videos.
A properly configured system is required to fully participate in this course. If you do not carefully read and follow these instructions, you will likely leave the class unsatisfied because you will not be able to participate in hands-on exercises that are essential to this course. Therefore, we strongly urge you to arrive with a system meeting all the requirements specified for the course.
You will need to run a Linux VMware image supplied at the training event on your laptop for the hands-on exercises that will be performed in class. Some familiarity and comfort with Linux and entering commands via the command line will facilitate your experience with the hands-on exercises.
Host Operating System: Latest version of Windows 10, macOS 10.15.x or later, or Linux that also can install and run VMware virtualization products described below. It is necessary to fully update your host operating system prior to the class to ensure you have the right drivers and patches installed to utilize the latest USB 3.0 devices. Those who use a Linux host must also be able to access exFAT partitions using the appropriate kernel or FUSE modules. You also must have 8 GB of RAM or higher for the VM to function properly in the class, in addition to at least 60 gigabytes of free hard disk space.
Download and install either VMware Workstation Pro 15.5.x, VMware Player 15.5.x or Fusion 11.5.x or higher versions before class. If you do not own a licensed copy of VMware Workstation or Fusion, you can download a free 30-day trial copy from VMware. VMware will send you a time-limited serial number if you register for the trial at their website.
Other virtualization software, such as VirtualBox and Hyper-V, are not appropriate because of compatibility and troubleshooting problems you might encounter during class.
VMware Workstation Pro and VMware Player on Windows 10 is not compatible with Windows 10 Credential Guard and Device Guard technologies. Please disable these capabilities for the duration of the class, if they're enabled on your system, by following instructions in this document.
Mandatory Laptop Hardware Requirements
- x86- or x64-compatible 2.4 GHz CPU minimum or higher
- USB Port
- 8GB RAM or higher
- 60 GB free hard drive space
- Latest version of Windows 10, macOS 10.15.x or later, or Linux that also can install and run VMware virtualization products described below.
- VMWare Workstation, Fusion, or Player, as stated above
- Wireless Ethernet 802.11 B/G/N/AC
Do not bring a laptop with sensitive data stored on it. SANS is not responsible if your laptop is stolen or compromised.
By bringing the right equipment and preparing in advance, you can maximize what you will learn and have a lot of fun.
Your course media will now be delivered via download. The media files for class can be large, some in the 40 - 50 GB range. You need to allow plenty of time for the download to complete. Internet connections and speed vary greatly and are dependent on many different factors. Therefore, it is not possible to give an estimate of the length of time it will take to download your materials. Please start your course media downloads as you get the link. You will need your course media immediately on the first day of class. Waiting until the night before the class starts to begin your download has a high probability of failure.
SANS has begun providing printed materials in PDF form. Additionally, certain classes are using an electronic workbook in addition to the PDFs. The number of classes using eWorkbooks will grow quickly. In this new environment, we have found that a second monitor and/or a tablet device can be useful by keeping the class materials visible while the instructor is presenting or while you are working on lab exercises.
When I began developing network monitoring and intrusion detection tools in the mid-1990s, I quickly realized that there were effectively no commercial solutions and no meaningful training. I had the pleasure of attending the initial version of this very course in late 1998 and knew immediately that I had found my home. Since that time, I've come to realize that network monitoring, intrusion detection, and packet analysis represent some of the very best data sources within our enterprise. These can be used to very rapidly confirm whether or not an incident has occurred, and allow an experienced analyst to determine, often in seconds or minutes, what the extent of a compromise might be. In a very real sense, I have found this to be the most important course that SANS has to offer. Not only will it cause you to think about your network in a very different way as a defender, but it is incredibly relevant for penetration testers who are looking to "fly under the radar." The concepts that you will learn in this course apply to every single role in an information security organization!
- David Hoelzer
"David Hoelzer is obviously an experienced and knowledgeable instructor. He communicates the concepts clearly and does a good job of anticipating questions and issues we (the students) will have." - James Haigh, Verizon