Amity - IDS Contents - Study Guide-Final
Amity - IDS Contents - Study Guide-Final
Intrusion Detection and Prevention Systems (IDS & IDP) play a critical role in cybersecurity,
helping organizations detect, analyze, and respond to cyber threats. This module introduces these
concepts, explains their differences, and explores their importance in modern security frameworks.
Conclusion
• IDS and IPS are essential for detecting and preventing cyber threats.
• IDS is passive, while IPS is active in stopping attacks.
• They protect against network-based, host-based, and application-based attacks.
• Modern security frameworks like Zero Trust and Threat Intelligence rely on IDS/IPS.
• Compliance standards (GDPR, NIST, ISO 27001) make IDS/IPS implementation a
necessity.
🛠️ Expected Outcome: Snort should detect the attack and generate an alert.
🚀
This module provides a strong foundation for understanding IDS & IPS, preparing for deeper
cybersecurity concepts in subsequent modules.
=======================================================================
=======================================================================
3. MAC Flooding
• Definition: Attack floods the switch with fake MAC addresses.
• Goal: Exhaust switch’s MAC table → switch enters “fail-open” mode → sends all traffic to
all ports (like a hub).
• Impact:
• Allows attacker to capture all network traffic using a packet sniffer.
• Mitigation Techniques:
• Enable port security on switches.
• Set limits on MAC addresses per port.
2. Analyzers: ( The Intelligence Core) Process data to detect anomalies or known threats.
4. Response Systems – (The Action Takers) Alert admins or integrate with SIEM; may
log or respond (passively or actively).
Function:
• Trigger alerts, send notifications, or initiate automated responses.
Types:
• Passive: Alerts admin via logs, emails, dashboards.
• Active: Automatically blocks IPs, disables ports, or modifies firewall rules.
Tools/Examples:
• SIEM systems, email alert systems, scripts to update ACLs.
Interplay with Analyzers & Databases:
• Based on analyzer input and historical data, determines appropriate response actions.
📌 Architecture of NIDS
• Sensors: Placed at key network points (e.g., firewall or router).
• Analyzer/Detection Engine: Uses rules (signature-based) or AI (anomaly-based) to detect
threats.
• Alert System: Sends notifications to administrators when suspicious activity is detected.
📌 Features of HIDS
• Monitors system files, registry changes, and logs.
• Detects unauthorized application execution.
• Identifies insider threats that bypass network security.
📌 Implementation Steps
1. Install HIDS software on critical systems (e.g., servers, endpoints).
2. Define policies for monitoring (e.g., watch system logs, kernel activities).
3. Configure alert thresholds (e.g., detect multiple failed login attempts).
4. Integrate with SIEM for centralized analysis.
✅ Example Tools: OSSEC, Tripwire, Wazuh
1.3 Hybrid IDS: Combining NIDS & HIDS
📌 Definition:
Hybrid IDS combines network-wide monitoring (NIDS) and host-level analysis (HIDS) for
enhanced threat detection.
📌 Advantages of Hybrid IDS
• Comprehensive visibility: Detects both network-level attacks (DDoS, MITM) and host-
based threats (malware, privilege escalation).
• Reduces false positives: Uses host data to validate network alerts.
• Effective against APTs (Advanced Persistent Threats): Provides layered detection.
✅ Example Tools: Suricata (NIDS) + OSSEC (HIDS) for a hybrid setup.
2. Types of IPS (Intrusion Prevention Systems)
IPS can be classified based on how they detect threats and where they are deployed.
✅
IPS unusual behavior attacks rate
Example Tools:
• Signature-based: Snort, Suricata
• Anomaly-based: Darktrace, AI-powered IPS solutions
🚀
(NIPS) gateways they reach endpoints Cisco Firepower
HIPS vs. NIPS Use Cases
• Use HIPS for endpoint protection (e.g., preventing malware execution).
• Use NIPS for perimeter security (e.g., stopping incoming DDoS attacks).
🚀
Management) threat analysis
Example SOC Workflow with IDS & IPS
1. IDS detects abnormal activity (e.g., repeated failed login attempts).
2. IPS blocks malicious traffic (e.g., an exploit attempt).
3. SIEM collects and analyzes logs from IDS, IPS, firewalls, and endpoints.
4. SOC team investigates and takes further action.
✅ Example SIEM Solutions: Splunk, IBM QRadar, ELK Stack
3.2 IDS & IDP Integration with Firewalls, Antivirus & Threat Intelligence
📌 For a robust security posture, IDS and IPS work alongside firewalls, antivirus, and threat
intelligence.
Integration Functionality
IDS & Firewalls IDS detects suspicious traffic, firewall blocks attackers
IPS & Firewalls IPS prevents attacks that bypass firewall rules
IDS/IPS & Antivirus IDS detects malware signatures, antivirus removes infected files
✅
IDS/IPS & Threat Intelligence Feeds real-time attack data to IDS/IPS for better detection
Example: Cisco Firepower (IPS) + Palo Alto NGFW (Firewall) + CrowdStrike (Threat
Intelligence) for an advanced security architecture.
Conclusion
• NIDS provides network-wide monitoring, while HIDS protects individual hosts.
• Hybrid IDS offers both network and host protection.
• IPS actively blocks threats, using either signature-based or anomaly-based detection.
• NIPS (network-based IPS) protects traffic flow, while HIPS (host-based IPS) secures
endpoints.
• IDS and IPS integrate with firewalls, antivirus, and SIEM platforms to provide layered
security.
• SOC teams use IDS/IPS for proactive threat detection and incident response.
Restart Suricata:
sudo systemctl restart suricata
🛠️ Expected Outcome:
• In IDS mode, Suricata logs the attack.
• In IPS mode, Suricata blocks the request.
🚀
This module provides a detailed understanding of IDS & IPS architectures, setting the stage for
advanced detection techniques in the next module.
=======================================================================
Deployment
Description Pros Cons
Type
Monitors traffic without interfering.
No impact on network Cannot block
Passive IDS Uses network taps or SPAN ports to copy
performance. attacks.
traffic.
Placed directly in the traffic path, Can actively block May introduce
Inline IPS
🚀
allowing real-time attack prevention. malicious traffic. latency.
Best Practice:
• Use Passive IDS for detection-only environments.
• Use Inline IPS in high-security zones (e.g., financial or government networks).
✅
IDS/IPS data center. compliance. complex maintenance.
Example Cloud IDS Solutions:
• AWS GuardDuty (Cloud IDS)
• Azure Security Center
• Google Cloud IDS
🚀 Best Practice: Hybrid deployments use on-premise IDS for internal traffic and cloud-based
IDS for external traffic.
🚀 Explanation:
• Triggers an alert if a single IP sends 10 SYN packets in 2 seconds (common in DDoS).
Enable the rule:
echo "include /etc/snort/rules/ddos.rules" >> /etc/snort/snort.conf
Restart Snort:
sudo systemctl restart snort
🚀 Explanation:
• Detects SQL keywords in HTTP traffic (common in SQL injection).
Enable the rule:
echo "include /etc/suricata/rules/sql_injection.rules" >>
/etc/suricata/suricata.yaml
Restart Suricata:
sudo systemctl restart suricata
🚀 Expected Outcome:
• Alerts appear when an attack pattern is detected.
• Security teams can analyze logs for forensics.
Conclusion
• IDS placement is critical: Perimeter for external threats, Internal for lateral
movements.
• Inline IPS blocks threats, while Passive IDS only detects.
• Open-source IDS tools (Snort, Suricata, Zeek, OSSEC, Wazuh) offer cost-effective
security.
• Hands-on configuration of IDS rules helps detect DDoS, SQL Injection, and other
attacks.
• Logging & alerting mechanisms ensure real-time monitoring.
Next Steps
• Experiment with advanced IDS/IPS rules.
• Integrate IDS/IPS with SIEM solutions like Wazuh or Splunk.
• Explore machine learning-based anomaly detection.
🚀 By mastering IDS/IPS deployment strategies, you build a strong cybersecurity defense
against evolving threats! 🔐
======================================================================
Module 4: Intrusion Detection Mechanisms
Intrusion Detection Systems (IDS) employ various detection mechanisms to identify malicious
activities. These mechanisms can be signature-based, anomaly-based, or hybrid approaches that
combine both. This module provides an in-depth understanding of these mechanisms, including
their strengths, weaknesses, and real-world implementation.
Snort as an IDS
• Snort is a powerful open-source NIDS used for real-time traffic analysis and packet logging.
• Modes of Operation:
• Sniffer Mode: Reads network packets and displays them.
• Packet Logger Mode: Logs packets to a file.
• Network Intrusion Detection Mode: Monitors and analyzes traffic against a set of
rules.
• Detection Engine: Uses rule-based inspection to match network traffic against a list of
defined attack signatures.
Example:
alert tcp any any -> 192.168.1.0/24 80 (msg:"HTTP access detected";
sid:100001; rev:1;)
Additional
1. Signature-Based Detection
Signature-based detection is the most widely used method in IDS/IPS solutions. It matches known
attack patterns (signatures) against network traffic or system logs.
🚀 Explanation:
• Monitors TCP traffic on port 22 (SSH).
• If an IP sends 5 SYN packets in 10 seconds, it generates an alert.
✅ Steps to Activate the Rule:
echo "include /etc/snort/rules/bruteforce.rules" >> /etc/snort/snort.conf
sudo systemctl restart snort
2. Anomaly-Based Detection
Unlike signature-based detection, anomaly-based IDS (AIDS) identifies unusual behavior instead
of relying on predefined attack patterns.
✅
Deep Learning (AI-based IDS) Uses neural networks to detect sophisticated attacks.
Example Tools Using ML for IDS:
• Darktrace (AI-based IDS)
• Zeek (Bro IDS) (Network behavior analysis)
• OpenAI Cybersecurity Models (AI-driven security)
2.2 Behavioral Analysis and Pattern Recognition
📌 Behavioral-based IDS focuses on monitoring user activity:
• Detects deviations in login patterns (e.g., sudden access from a different country).
• Identifies unusual data transfers (e.g., massive file downloads outside office hours).
• Tracks network traffic anomalies (e.g., sudden spikes in connections).
🚀 Real-world Example:
• A normal user logs in between 9 AM – 5 PM daily.
• One day, an unusual login occurs at 2 AM from another country.
• Anomaly-based IDS flags this activity as suspicious.
✅ Use Cases:
• Detecting insider threats.
• Identifying zero-day attacks.
• Spotting lateral movement in Advanced Persistent Threats (APTs).
Conclusion
• Signature-based IDS is effective against known attacks but fails with zero-days.
• Anomaly-based IDS detects unknown threats but has higher false positives.
• Hybrid IDS solutions (like Suricata + Zeek) provide better accuracy and security.
• Machine Learning & AI are revolutionizing IDS, making them more adaptive.
• Heuristic-based detection helps identify evolving threats before widespread outbreaks.
🚀 Expected Outcome:
• Suricata alerts on known attacks.
• Zeek detects unusual traffic patterns.
🚀🔐
By mastering intrusion detection mechanisms, you strengthen your cybersecurity defenses
against evolving threats!
=======================================================================
================
• This rule detects and drops HTTP traffic containing SQL injection attempts.
🚀 Best Practice: Use IPS automation to reduce manual response time.
1.3 IDS vs. IPS Decision Making (Passive vs. Active Response)
📌 IDS (Passive) vs. IPS (Active) Comparison
Feature IDS (Intrusion Detection System) IPS (Intrusion Prevention System)
Function Monitors & detects attacks Detects & prevents attacks
Response Passive (alerts admin) Active (blocks malicious traffic)
Impact on Traffic No interference May introduce latency
Placement Network tap or SPAN port Inline with network flow
✅
Example Snort (IDS mode) Suricata (IPS mode)
When to Choose IDS vs. IPS
• Use IDS when monitoring internal networks for insider threats.
• Use IPS when securing perimeter networks (e.g., firewalls + IPS).
🚀 Best Practice: Combine IDS & IPS for layered threat detection and prevention.
2. Incident Response and Threat Mitigation
When IDS alerts indicate an attack, security teams must respond quickly. This section covers the
incident response process, SOC operations, and real-world attack handling.
Restart Suricata:
sudo systemctl restart suricata
🚀 Expected Outcome:
• Suricata should block the request.
• Alert logs should confirm an SQL injection attempt.
🚀🔐
By mastering intrusion prevention and response, you can build a resilient cybersecurity defense
against real-world threats!
=======================================================================
===================
Module 6: Advanced Threat Detection and AI-
driven IDS
With cyber threats evolving rapidly, traditional IDS/IPS mechanisms struggle to detect
sophisticated attacks. This module explores AI-driven intrusion detection, real-time threat
hunting, and evasion techniques used by attackers. By integrating machine learning (ML) and
artificial intelligence (AI), IDS/IPS can predict, detect, and respond to advanced threats more
effectively.
🚀
(AI) adapt to new threats detection (LSTM, CNN)
Example AI-based IDS Tools:
• IBM Watson for Cybersecurity (AI-driven threat intelligence)
• Darktrace (AI-powered anomaly detection)
• Vectra AI (Behavioral-based threat detection)
✅
Machine Learning (AI) Detects encrypted command-and-control (C2) traffic.
Example Tool: Zeek (Bro IDS) can analyze TLS certificates and anomalies:
cat /var/log/zeek/ssl.log | grep "self-signed"
🚀
Slow-rate Attacks Monitor low & slow attacks using behavior-based detection.
Example: Enabling IDS Fragment Reassembly in Suricata
stream:
reassembly:
enabled: yes
🚀 Expected Outcome: Identifies self-signed certificates often used in phishing and malware
C2 communication.
Next Steps
• Integrate AI-powered SIEM tools (e.g., Splunk, ELK Stack) with IDS logs.
• Deploy AI-based anomaly detection models to improve security posture.
• Use Zeek for threat hunting in encrypted traffic scenarios.
🚀 By mastering AI-driven IDS, you enhance security posture against evolving cyber
threats! 🔐
=======================================================================
============
🚀
Environments difficult to detect.
Mitigation Strategies:
• Deploy agent-based IDS/IPS for host-level monitoring.
• Use cloud-native security services to gain visibility.
• Leverage AI-driven behavioral detection for anomaly-based intrusion detection.
🚀
Firmware Exploits IoT devices often run outdated firmware with unpatched vulnerabilities.
Mitigation Strategies:
• Deploy lightweight IDS solutions optimized for low-power IoT devices.
• Use behavioral anomaly detection to identify deviations in normal IoT traffic.
• Implement AI-driven intrusion detection to detect real-time IoT threats.
📌
Arduino-based IDS Anomaly-based IDS Detects suspicious traffic on IoT networks.
How Lightweight IDS Works:
• Monitors network traffic using signature & anomaly-based methods.
• Uses minimal system resources to avoid device overload.
• Alerts admins when IoT devices show abnormal behavior.
✅ Example: Deploying SVELTE IDS for IoT Security
1. Install SVELTE on an IoT gateway (Raspberry Pi, Linux server).
2. Monitor IoT network traffic for unusual activity.
3. Block IoT malware (e.g., Mirai botnet) using IDS rules.
4. Send alerts to SIEM for analysis.
🚀 Best Practice: Use lightweight IDS in combination with network monitoring to detect
compromised IoT devices.
Next Steps
• Integrate AI-based IDS into IoT environments for advanced anomaly detection.
• Deploy hybrid cloud-IoT security solutions to detect threats across multiple
environments.
• Use SIEM tools (Splunk, Wazuh) to correlate cloud & IoT security logs.
🚀 By mastering cloud and IoT IDS, you enhance your ability to detect and prevent modern
cyber threats! 🔐
====================================================================
Module 8: IDS and IDP Hands-on Labs and
Case Studies
This module is designed to provide practical, hands-on experience with IDS and IPS tools
through guided labs. Additionally, we will analyze real-world cyberattacks and learn how IDS/IPS
solutions played a role in their detection and mitigation.
On CentOS/RHEL:
sudo yum install snort -y
Restart Snort:
sudo systemctl restart snort
Step 3: Detecting Malicious Traffic with Snort
📌 Simulate an attack (ICMP ping flood):
ping -c 5 <target_IP>
Verify installation:
zeek -version
🚀 Outcome: Zeek monitors and logs network activity for further analysis.
Lab 3: Setting up Suricata for Real-time Intrusion Prevention
Objective: Install and configure Suricata as an IPS.
Verify installation:
suricata -V
Restart Suricata:
sudo systemctl restart suricata
🚀 Outcome: Suricata detects attacks in real-time, and logs are visualized in Kibana.
Lab 4: SIEM & IDS Integration
Objective: Use Wazuh (SIEM) and Splunk to analyze IDS logs.