Meritshot Tutorials

  1. Home
  2. »
  3. Evading IDS, Firewalls, and Honeypots

Cyber Security Tutorial

Evading IDS, Firewalls, and Honeypots

IDS (Intrusion Detection System)

An Intrusion Detection System (IDS) is a network security technology originally built for detecting vulnerability exploits against a target application or computer.

The IDS is also a listen-only device. The IDS monitors traffic and reports results to an administrator. It cannot automatically take action to prevent a detected exploit from taking over the system.

Attackers are capable of exploiting vulnerabilities quickly once they enter the network. Therefore, the IDS is not adequate for prevention. Intrusion detection and intrusion prevention systems are both essential to security information and event management.

Evading IDS

These points describe various techniques used by attackers to evade Intrusion Detection Systems (IDS) and execute their attacks successfully. Here’s a broader explanation of each technique:

1.  Insertion Attack

  • Explanation: In an insertion attack, the attacker exploits the trust of an IDS. The IDS “blindly” accepts and logs packets even if they contain misleading or extraneous information. However, the target system may discard these packets as invalid.
  • Impact: The IDS’s log contains misleading data, making it difficult for security analysts to detect the true attack This tactic disrupts forensic analysis and hampers detection efforts.

2.  Evasion

  • Explanation: In this method, the attacker sends packets that the IDS rejects as invalid, but the target system This occurs because the attacker

tailors the packets to exploit discrepancies between the IDS and the target system’s packet validation mechanisms.

  • Impact: The  attacker’s  malicious  payload  reaches  the  target  without

triggering alarms in the IDS, allowing stealthy exploitation of the host.

3.  Denial-of-Service (DoS) Attack on IDS

  • Explanation: Attackers flood the IDS with high volumes of data or invalid requests, overwhelming it to the point where it fails to log intrusion attempts or drops legitimate packets.
  • Impact: While the IDS is overwhelmed, attackers can launch real attacks without being detected. This disrupts the IDS’s primary function of monitoring and reporting intrusions.

4.  Obfuscating Techniques

  • Explanation: Attackers encode their payload in ways the target system can decode but the IDS cannot understand. For instance:
    • Polymorphic Code: Malware that changes its structure to avoid

signature-based detection.

  • Encoding Variants: Transforming attack strings into base64 or other encoded formats.
  • Impact: By using obfuscation,  attackers bypass signature-based IDS mechanisms, reducing the chance of detection.

5.  False Positive Generation

  • Explanation: Attackers craft packets designed to trigger false alarms in the IDS. These alerts are deliberately harmless but flood the system with
  • Impact: The barrage of false positives can overwhelm analysts, causing them to miss actual threats hidden within the noise. It reduces the effectiveness of the IDS in prioritizing and responding to real attacks.

6.  Session Splicing

  • Explanation: Attackers split a malicious payload across multiple small packets sent in a fragmented manner over time. Each packet is benign when analyzed individually.
  • Impact: The IDS may fail to reassemble the session and recognize the full payload as malicious. Meanwhile, the target system processes the reassembled attack.

7.  Unicode Evasion Technique

  • Explanation: Attackers convert attack strings into Unicode characters. Since Unicode allows multiple representations of the same character, the IDS might fail to match attack patterns against its signature database.
  • Impact: The target system understands the Unicode characters and processes the attack, but the IDS fails to recognize it as malicious.

8.  Fragmentation Attack

  • Explanation: Attackers send fragmented packets with delays between fragments to evade detection. An IDS may fail to reassemble these fragments correctly, especially if there are long delays.
  • Impact: The target system reassembles the fragments and executes the payload, while the IDS either misses the fragments or fails to interpret the payload correctly.

9.  TTL (Time to Live) Attacks

  • Explanation: Attackers manipulate the TTL field in the packet header, which determines how many hops a packet can take before being dropped. This tactic requires knowledge of the victim’s network topology.
  • Impact: By sending packets designed to expire before reaching the IDS, attackers ensure only the target system receives the payload, bypassing IDS

10.  Invalid RST Packets

  • Explanation: Attackers use invalid TCP RST (Reset) packets to terminate a connection prematurely in the eyes of the However, the communication continues with the target host.
  • Impact: The IDS assumes the session has ended and stops monitoring it, while the attacker continues exploiting the target.

11.  URG (Urgency Flag) Abuse

  • Explanation: The URG flag in the TCP header is used to indicate data requiring immediate processing. Many IDS systems ignore this flag.
  • Impact: Attackers exploit this oversight to sneak malicious data through, as the IDS fails to inspect packets marked with the URG flag.

12.  Polymorphic Shellcode

  • Explanation: Shellcode is a small piece of code used as a payload in exploits. Polymorphic shellcode encrypts or encodes the shellcode and includes a decoding stub to reconstruct the payload at runtime.
  • Impact: Signature-based IDS systems, which rely on known patterns, fail to detect polymorphic shellcode because it constantly changes its appearance.

13.  Application Layer Attacks

  • Explanation: Attackers exploit weaknesses in the application layer. For instance, they might send a malicious payload within a compressed file that the IDS cannot inspect because it lacks decompression capabilities.
  • Impact: Attack payloads reach the target system unexamined, allowing exploitation through hidden channels.

Firewalls

A firewall is a network security device designed to monitor, filter, and control incoming and outgoing network traffic based on predetermined security rules. The primary purpose of a firewall is to establish a barrier between a trusted internal network and untrusted external networks.

Firewalls come in both hardware and software forms, and they work by inspecting data packets and determining whether to allow or block them based on a set of rules. Organizations can configure these rules to permit or deny traffic based on various criteria, such as source and destination IP addresses, port numbers, and protocol type.

What Does A Firewall Do?

Firewalls protect against malicious traffic. They’re strategically positioned at the network edge or in a data center, allowing them to closely monitor anything attempting to cross this boundary.

This visibility also allows a network firewall to granularly inspect and authenticate data packets in real time. This involves checking the data packet against predefined criteria to determine whether it poses a threat. If it fails to meet the criteria, the firewall blocks it from entering or leaving the network.

Firewalls regulate both inbound and outbound traffic, protecting the network from:

  • External threats such as viruses, backdoors, phishing emails, and denial-of-service (DoS) attacks. Firewalls filter incoming traffic flows, preventing unauthorized access to sensitive data and thwarting potential malware infections.
  • Insider threats like known bad actors or risky applications. A firewall can enforce rules and policies to restrict certain types of outgoing traffic, which helps identify suspicious activity and mitigate data exfiltration.

Firewall Functions: NAT and VPN

Network Address Translation (NAT) and Virtual Private Network (VPN) are two distinct technologies that serve different purposes in network security and connectivity. While NAT focuses on address translation to manage routing, VPNs provide secure, encrypted communication over the internet.

Network Address Translation (NAT)

NAT works by modifying the source or destination IP addresses in data packets as they pass through a firewall. This process enables multiple devices within a private network to share a single public IP address for internet access. It effectively hides the internal network from external threats, adding a layer of security.

Example in Practice

In a typical office, employees use individual devices with unique private IP addresses to access online services such as email, cloud platforms, or web browsing. When these devices send data outside the network, NAT ensures that all outgoing traffic appears to originate from the same public IP address assigned to the office. This makes it more difficult for external attackers to pinpoint and target specific devices within the internal network.

Virtual Private Network (VPN)

A VPN acts as a secure intermediary between a device or network and the broader internet. It processes web requests by routing them through an encrypted tunnel, safeguarding data from interception or unauthorized access.

How It Works

VPNs extend private networks over public infrastructure like the internet. This creates a secure connection that allows users to transmit data as if they were directly connected to the private network. Commonly used in corporate environments, VPNs enable remote employees to securely access internal systems, even from geographically distant locations.

Example in Practice

When an employee works remotely, a VPN establishes an encrypted connection between their device and the company’s network. This ensures that sensitive information, such as login credentials or business documents, is transmitted securely, protecting it from potential cyber threats.

Key Differences

NAT: Focuses on IP address translation to enable multiple devices to share a public IP and to enhance security by obscuring internal addresses.

VPN: Ensures secure, encrypted communication between devices and networks, protecting data from interception while enabling remote access.

Types of Firewalls

Firewalls are essential for network security, providing a barrier between trusted internal networks and untrusted external networks. Below are the four primary types of firewalls, each with its own functions and features:

1.  Packet Filter Firewalls

Packet filtering firewalls regulate network access by analyzing incoming and outgoing data packets. They make decisions to allow or block packets based on parameters such as:

  • Source and destination IP addresses
  • Protocols (e.g., TCP, UDP)
  • Port numbers

How It Works:

These firewalls operate at the network layer (IP layer) of the TCP/IP model. They inspect the header of each packet and apply a set of predefined rules to determine whether the packet is allowed through.

Key Features:

  • Simple and
  • Works well for basic filtering but does not provide deep inspection of

2.  Circuit-Level Gateways

Circuit-level gateways operate at the session layer of the OSI model. Their primary function is to monitor and validate TCP handshakes to ensure that a session is legitimate.

How It Works:

  • These firewalls establish a connection between the user’s device and the remote
  • The communication appears to originate from the user’s system, masking details about the private network.

Key Features:

Advantages:

  • Cost-effective.
  • Conceals private network

Limitations:

  • Does not filter individual packets or inspect data

3.  Application-Level Gateways (Proxy Firewalls)

Application-level gateways work at the application layer of the OSI model. They are designed to filter traffic based on application-specific commands and content, such as HTTP requests (e.g., POST, GET).

How It Works:

  • These firewalls act as intermediaries, inspecting and filtering data passing between the client and the server.
  • They examine the content of the packets to identify potential

Key Features:

  • Ideal for enforcing strict application-specific security
  • Slower than other firewalls due to detailed inspection of application

4.  Stateful Inspection Firewalls

Stateful inspection firewalls integrate the capabilities of the other three types, providing advanced filtering across multiple layers.

How It Works:

  • They operate at the network layer to examine packet
  • They monitor and validate session states to ensure that packets belong to a legitimate session.
  • At the application layer, they evaluate the contents of packets for deeper

Key Features:

  • Combines packet filtering, session validation, and application-level
  • Offers comprehensive protection but is more complex and resource-

Firewalls have evolved through four distinct phases:

  1. First-generation firewalls began in 1989 with the packet filtering These firewalls examine individual data packets, making decisions to allow or block them based on predefined rules. However, these were unable to identify if  those  packets  contained  malicious  code  (i.e.,  malware).
  2. Second-generation firewalls began in the early 2000s. Otherwise known as stateful firewalls, these track the state of active By observing

network traffic, they use context to identify and act on suspicious behavior. Unfortunately,   this   generation   also   has   its   limitations.

  1. Third-generation firewalls emerged in the latter half of the early

Often called proxy firewalls or application-level gateways, these act as intermediaries between a client and server, forwarding requests and filtering responses.

  1. Fourth-generation firewall, also known as next-generation firewall (NGFW), started in 2010. NGFWs combine traditional capabilities with new, advanced features such as intrusion prevention (IPS), application-layer

filtering, and advanced threat detection.

Honeypots

Honeypots in cybersecurity are decoy servers or systems designed to mimic genuine production environments. These are strategically placed alongside operational systems to attract potential attackers. Their primary purpose is to monitor security threats, analyze attack patterns, and divert attackers from real targets.

Honeypots come in various types, tailored to an organization’s specific needs. By simulating authentic systems, they act as traps, enabling early detection of attacks. While an attacker is engaged with the honeypot, security teams can collect valuable information about the nature of the attack, including the techniques and tools used. This intelligence is crucial for fortifying defenses and responding effectively to threats.

For a honeypot to be effective, it must convincingly mimic a legitimate system, running similar processes and containing realistic-looking decoy files. Placing the honeypot behind the organization’s firewall is often recommended. This setup ensures that threats bypassing the firewall can be closely examined while minimizing risks. Additionally, the firewall serves as a barrier, preventing an attacker from launching further attacks from a compromised honeypot. During an attack, the firewall can intercept malicious activities and neutralize them before they cause harm.

How do honeypots work?

A honeypot is designed to closely resemble a legitimate computer system. It includes applications and data that cybercriminals typically seek out when identifying targets. For example, a honeypot can simulate a system containing sensitive consumer information, such as credit card details or personal identification data. This system is filled with fake, yet convincing, data to attract attackers. When an attacker breaches the honeypot, the IT team can observe their actions, study their techniques, and evaluate the system’s vulnerabilities. This insight is then used to improve the organization’s overall security defenses.

Honeypots work by intentionally exposing security vulnerabilities to draw in attackers. For instance, they may include open ports susceptible to a port scan, a common method attackers use to identify entry points into a network. Once the attacker engages with the honeypot, security teams can monitor their approach and analyze their tactics.

Unlike other security measures, a honeypot does not aim to prevent attacks directly. Instead, its primary purpose is to enhance an organization’s intrusion detection system (IDS) and threat response strategies, helping to better manage and prevent future attacks.

There are two main types of honeypots: production honeypots and research honeypots.

  1. Production honeypots are deployed alongside real production servers to detect potential breaches and mislead attackers. They mimic real systems by running similar services, helping to identify vulnerabilities within the organization’s internal network.

Research honeypots focus on gathering intelligence about attack methods and trends on a broader scale. These honeypots analyze how threats behave both within the organization and across the global cyber landscape. This data enables administrators to design stronger security measures, prioritize patches, and ensure critical systems are protected with up-to-date defenses.

Different types of honeypots and how they work

Malware Honeypot

A malware honeypot uses known attack methods to attract and study malware. For example, it might simulate a Universal Serial Bus (USB) storage device. When a computer is targeted, the malware is tricked into attacking the emulated USB, allowing the system to analyze its behavior.

Spam Honeypot

Spam honeypots are designed to attract spammers by leveraging open proxies and mail relays. Spammers often test mail relays by sending themselves emails. If the test is successful, they use the relay to distribute spam. A spam honeypot detects these tests and blocks the subsequent spam attempts.

Database Honeypot

A database honeypot creates fake databases to attract attacks targeting database vulnerabilities, such as SQL injections. These honeypots can help identify and analyze such threats. They are often implemented with a database firewall for added security.

Client Honeypot

Client honeypots simulate client systems to attract malicious servers used by attackers. These honeypots monitor how attackers manipulate servers during an attack. They typically operate in a virtualized environment with containment measures to protect researchers from potential risks.

Honeynet

A honeynet is a network of interconnected honeypots designed to study a variety of attack types, such as distributed denial-of-service (DDoS) attacks, content delivery network (CDN) attacks, or ransomware attacks. A honeynet captures and contains all inbound and outbound traffic to ensure the rest of the organization’s systems remain secure while researchers analyze the attacks.

What Is Honeypot Network Security & How Is It Used?

In cybersecurity, honeypot network security involves creating a fake network environment designed to attract attackers. The goal is to:

  • Understand what attackers are
  • Observe their methods and
  • Gain insights to strengthen defenses and prevent future

A network honeypot simulates an environment containing enticing digital assets. It allows an organization to monitor how hackers attempt to infiltrate the system and analyze their actions once inside. This information is invaluable for enhancing overall security measures.