<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Dipesh Kumar</title>
    <description>The latest articles on Forem by Dipesh Kumar (@dipesh_kumar_2fa6e436346e).</description>
    <link>https://forem.com/dipesh_kumar_2fa6e436346e</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3858894%2F45fceb76-9e28-4216-96aa-7077a7d65ebb.jpg</url>
      <title>Forem: Dipesh Kumar</title>
      <link>https://forem.com/dipesh_kumar_2fa6e436346e</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/dipesh_kumar_2fa6e436346e"/>
    <language>en</language>
    <item>
      <title>Building a SIEM-Style Threat Detection Dashboard Using ELK Stack and Docker</title>
      <dc:creator>Dipesh Kumar</dc:creator>
      <pubDate>Fri, 03 Apr 2026 09:16:12 +0000</pubDate>
      <link>https://forem.com/dipesh_kumar_2fa6e436346e/building-a-siem-style-threat-detection-dashboard-using-elk-stack-and-docker-5de6</link>
      <guid>https://forem.com/dipesh_kumar_2fa6e436346e/building-a-siem-style-threat-detection-dashboard-using-elk-stack-and-docker-5de6</guid>
      <description>&lt;p&gt;Building a SIEM-Style Threat Detection Dashboard Using ELK Stack and Docker&lt;/p&gt;

&lt;p&gt;In modern cybersecurity operations, centralized log collection and real-time visibility are essential for identifying suspicious behavior before it turns into a real incident. Security teams rely heavily on log analysis platforms to detect failed logins, brute-force attempts, abnormal DNS activity, and other indicators of compromise.&lt;/p&gt;

&lt;p&gt;To better understand how this works in practice, I built a SIEM-style threat detection lab using the ELK Stack (Elasticsearch, Logstash, Kibana) deployed with Docker. The goal of this project was to ingest logs, simulate attack patterns, and visualize security events through a dashboard that could support threat hunting and incident response.&lt;/p&gt;

&lt;p&gt;This hands-on project gave me practical exposure to:&lt;br&gt;
log ingestion and parsing&lt;br&gt;
dashboard creation in Kibana&lt;br&gt;
basic detection engineering&lt;br&gt;
attack simulation&lt;br&gt;
security monitoring workflows&lt;/p&gt;

&lt;p&gt;🎯 Objectives:&lt;br&gt;
The main goals of this project were:&lt;/p&gt;

&lt;p&gt;Deploy the ELK Stack using Docker&lt;br&gt;
Configure Logstash pipelines for log ingestion&lt;br&gt;
Forward logs from a macOS host&lt;br&gt;
Simulate suspicious activity from Kali Linux&lt;br&gt;
Detect attack patterns such as:&lt;br&gt;
credential stuffing&lt;br&gt;
brute-force behavior&lt;br&gt;
suspicious DNS activity&lt;br&gt;
Build interactive dashboards in Kibana&lt;/p&gt;

&lt;p&gt;🖥️ Lab Environment:&lt;br&gt;
This project was implemented in a small lab setup using the following environment:&lt;/p&gt;

&lt;p&gt;Component   Specification&lt;br&gt;
Host System macOS&lt;br&gt;
ELK Deployment  Docker Desktop&lt;br&gt;
ELK Version 8.x&lt;br&gt;
Attacker Machine    Kali Linux VM&lt;br&gt;
Log Source  macOS system/application logs&lt;br&gt;
Memory Allocation   8 GB for Docker&lt;br&gt;
Storage 50 GB free space&lt;/p&gt;

&lt;p&gt;🏗️ Architecture Overview:&lt;br&gt;
The overall setup was designed to simulate a basic security monitoring workflow.&lt;/p&gt;

&lt;p&gt;Kali Linux (Attacker)&lt;br&gt;
        |&lt;br&gt;
        |  Simulated Attack Traffic&lt;br&gt;
        v&lt;br&gt;
macOS Host (Docker Desktop + Log Sources)&lt;br&gt;
   ├── Elasticsearch&lt;br&gt;
   ├── Logstash&lt;br&gt;
   ├── Kibana&lt;br&gt;
   └── Filebeat / Native Log Forwarding&lt;/p&gt;

&lt;p&gt;This setup allowed me to generate both normal and malicious traffic, send logs into the ELK pipeline, and monitor the resulting events visually in Kibana.&lt;/p&gt;

&lt;p&gt;🛠️ Tools and Technologies Used&lt;br&gt;
Tool    Purpose&lt;br&gt;
Elasticsearch   Centralized log storage and search&lt;br&gt;
Logstash    Log ingestion and processing&lt;br&gt;
Kibana  Visualization and dashboards&lt;br&gt;
Docker  Containerized ELK deployment&lt;br&gt;
Filebeat    Lightweight log shipper&lt;br&gt;
Kali Linux  Attack simulation&lt;br&gt;
macOS   Host system and log source&lt;br&gt;
🐳 Deploying ELK Stack with Docker&lt;br&gt;
1) Verify Docker Installation:&lt;br&gt;
Before starting, I verified that Docker was installed correctly:&lt;br&gt;
      docker --version&lt;br&gt;
      docker compose version&lt;/p&gt;

&lt;p&gt;2) Create the Project Directory:&lt;br&gt;
      mkdir elk-stack &amp;amp;&amp;amp; cd elk-stack&lt;br&gt;
      nano docker-compose.yml&lt;/p&gt;

&lt;p&gt;3) Docker Compose Configuration:&lt;br&gt;
    I used the following docker-compose.yml file to deploy     Elasticsearch, Logstash, and Kibana.&lt;/p&gt;

&lt;p&gt;version: '3.8'&lt;br&gt;
services:&lt;br&gt;
  elasticsearch:&lt;br&gt;
    image: docker.elastic.co/elasticsearch/elasticsearch:8.11.0&lt;br&gt;
    container_name: elasticsearch&lt;br&gt;
    environment:&lt;br&gt;
      - discovery.type=single-node&lt;br&gt;
      - ES_JAVA_OPTS=-Xms2g -Xmx2g&lt;br&gt;
      - xpack.security.enabled=false&lt;br&gt;
    ports:&lt;br&gt;
      - "9200:9200"&lt;br&gt;
      - "9300:9300"&lt;br&gt;
    volumes:&lt;br&gt;
      - elasticsearch_data:/usr/share/elasticsearch/data&lt;br&gt;
    networks:&lt;br&gt;
      - elk-network&lt;/p&gt;

&lt;p&gt;logstash:&lt;br&gt;
    image: docker.elastic.co/logstash/logstash:8.11.0&lt;br&gt;
    container_name: logstash&lt;br&gt;
    volumes:&lt;br&gt;
      - ./logstash/pipeline:/usr/share/logstash/pipeline&lt;br&gt;
      - ./logstash/config:/usr/share/logstash/config&lt;br&gt;
    ports:&lt;br&gt;
      - "5000:5000"&lt;br&gt;
      - "5044:5044"&lt;br&gt;
      - "9600:9600"&lt;br&gt;
    depends_on:&lt;br&gt;
      - elasticsearch&lt;br&gt;
    networks:&lt;br&gt;
      - elk-network&lt;/p&gt;

&lt;p&gt;kibana:&lt;br&gt;
    image: docker.elastic.co/kibana/kibana:8.11.0&lt;br&gt;
    container_name: kibana&lt;br&gt;
    environment:&lt;br&gt;
      - ELASTICSEARCH_HOSTS=&lt;a href="http://elasticsearch:9200" rel="noopener noreferrer"&gt;http://elasticsearch:9200&lt;/a&gt;&lt;br&gt;
    ports:&lt;br&gt;
      - "5601:5601"&lt;br&gt;
    depends_on:&lt;br&gt;
      - elasticsearch&lt;br&gt;
    networks:&lt;br&gt;
      - elk-network&lt;/p&gt;

&lt;p&gt;volumes:&lt;br&gt;
  elasticsearch_data:&lt;br&gt;
    driver: local&lt;/p&gt;

&lt;p&gt;networks:&lt;br&gt;
  elk-network:&lt;br&gt;
    driver: bridge&lt;/p&gt;

&lt;p&gt;Note: For lab simplicity, xpack.security.enabled=false was used. In a production environment, authentication, TLS, and role-based access control should always be enabled.&lt;/p&gt;

&lt;p&gt;4) Create the Logstash Pipeline:&lt;br&gt;
     mkdir -p logstash/pipeline&lt;br&gt;
     nano logstash/pipeline/logstash.conf&lt;/p&gt;

&lt;p&gt;I used the following Logstash configuration:&lt;/p&gt;

&lt;p&gt;input {&lt;br&gt;
  tcp {&lt;br&gt;
    port =&amp;gt; 5000&lt;br&gt;
    codec =&amp;gt; json&lt;br&gt;
    type =&amp;gt; "application_logs"&lt;br&gt;
  }&lt;/p&gt;

&lt;p&gt;udp {&lt;br&gt;
    port =&amp;gt; 5001&lt;br&gt;
    type =&amp;gt; "syslog"&lt;br&gt;
  }&lt;/p&gt;

&lt;p&gt;beats {&lt;br&gt;
    port =&amp;gt; 5044&lt;br&gt;
  }&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;filter {&lt;br&gt;
  date {&lt;br&gt;
    match =&amp;gt; ["timestamp", "ISO8601"]&lt;br&gt;
    target =&amp;gt; "@timestamp"&lt;br&gt;
  }&lt;/p&gt;

&lt;p&gt;grok {&lt;br&gt;
    match =&amp;gt; { "message" =&amp;gt; "%{IP:client_ip}" }&lt;br&gt;
  }&lt;/p&gt;

&lt;p&gt;if [message] =~ /login.*failed/ {&lt;br&gt;
    mutate {&lt;br&gt;
      add_tag =&amp;gt; ["credential_stuffing_candidate"]&lt;br&gt;
    }&lt;br&gt;
  }&lt;/p&gt;

&lt;p&gt;if [message] =~ /dns.*query/ {&lt;br&gt;
    mutate {&lt;br&gt;
      add_tag =&amp;gt; ["dns_activity"]&lt;br&gt;
    }&lt;br&gt;
  }&lt;/p&gt;

&lt;p&gt;geoip {&lt;br&gt;
    source =&amp;gt; "client_ip"&lt;br&gt;
    target =&amp;gt; "geo"&lt;br&gt;
  }&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;output {&lt;br&gt;
  elasticsearch {&lt;br&gt;
    hosts =&amp;gt; ["elasticsearch:9200"]&lt;br&gt;
    index =&amp;gt; "logs-%{+YYYY.MM.dd}"&lt;br&gt;
  }&lt;/p&gt;

&lt;p&gt;stdout {&lt;br&gt;
    codec =&amp;gt; rubydebug&lt;br&gt;
  }&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;This pipeline was used to:&lt;/p&gt;

&lt;p&gt;parse timestamps&lt;br&gt;
extract IP addresses&lt;br&gt;
tag suspicious login failures&lt;br&gt;
identify DNS-related activity&lt;br&gt;
enrich IP addresses with GeoIP data&lt;/p&gt;

&lt;p&gt;5) Start the ELK Stack:&lt;br&gt;
     docker compose up -d&lt;/p&gt;

&lt;p&gt;To verify everything was running correctly:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; docker ps
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Expected containers:&lt;br&gt;
   Elasticsearch&lt;br&gt;
   Logstash&lt;br&gt;
   Kibana&lt;/p&gt;

&lt;p&gt;6) Verify Services:&lt;br&gt;
   Check Elasticsearch:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  curl http://localhost:9200
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Then open Kibana in the browser:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  http://localhost:5601
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;📥 Collecting Logs from macOS&lt;br&gt;
    1) Install Filebeat (Optional)&lt;/p&gt;

&lt;p&gt;To forward logs more efficiently, Filebeat can be installed:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   brew install elastic/tap/filebeat-full
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;2) Configure Filebeat&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  Edit the Filebeat configuration:

     nano /usr/local/etc/filebeat/filebeat.yml
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Use the following configuration:&lt;/p&gt;

&lt;p&gt;filebeat.inputs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;type: log
enabled: true
paths:

&lt;ul&gt;
&lt;li&gt;/var/log/system.log&lt;/li&gt;
&lt;li&gt;/var/log/apache2/*.log&lt;/li&gt;
&lt;li&gt;/var/log/nginx/*.log&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;

&lt;/ul&gt;

&lt;p&gt;output.logstash:&lt;br&gt;
  hosts: ["localhost:5044"]&lt;/p&gt;

&lt;p&gt;3) Start Filebeat&lt;br&gt;
       sudo filebeat -e -c /usr/local/etc/filebeat/filebeat.yml&lt;br&gt;
   4) Send a Test Log&lt;/p&gt;

&lt;p&gt;To confirm that logs were reaching Logstash correctly:&lt;/p&gt;

&lt;p&gt;echo '{"timestamp":"2024-01-15T10:30:00","message":"login failed for user admin from 192.168.1.100"}' | nc localhost 5000&lt;/p&gt;

&lt;p&gt;If everything is working correctly, the event should appear in Elasticsearch and later in Kibana.&lt;/p&gt;

&lt;p&gt;🎯 Attack Simulation&lt;/p&gt;

&lt;p&gt;To test the detection pipeline, I simulated suspicious behavior from a Kali Linux machine and from generated log events.&lt;/p&gt;

&lt;p&gt;1) Credential Stuffing / Failed Login Simulation&lt;/p&gt;

&lt;p&gt;A simple way to simulate repeated failed login events:&lt;/p&gt;

&lt;p&gt;for i in {1..100}; do&lt;br&gt;
  echo "{\"timestamp\":\"$(date -Is)\",\"message\":\"login failed for user test$i from 192.168.1.$((RANDOM % 255))\"}" | nc localhost 5000&lt;br&gt;
done&lt;/p&gt;

&lt;p&gt;This creates a spike of failed authentication events that can be detected and visualized.&lt;/p&gt;

&lt;p&gt;2) Simulated Brute Force Testing&lt;/p&gt;

&lt;p&gt;For brute-force style testing, tools such as Hydra can be used in a lab environment:&lt;/p&gt;

&lt;p&gt;sudo apt install hydra -y&lt;/p&gt;

&lt;p&gt;Example concept:&lt;/p&gt;

&lt;p&gt;hydra -L users.txt -P passwords.txt http-post-form "/login:user=^USER^&amp;amp;pass=^PASS^:F=incorrect"&lt;/p&gt;

&lt;p&gt;This was used only in a controlled lab environment for detection testing.&lt;/p&gt;

&lt;p&gt;3) Suspicious DNS Activity Simulation&lt;/p&gt;

&lt;p&gt;To simulate suspicious DNS-style logs:&lt;/p&gt;

&lt;p&gt;for i in {1..50}; do&lt;br&gt;
  random_string=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1)&lt;br&gt;
  echo "{\"timestamp\":\"$(date -Is)\",\"message\":\"dns query for $random_string.malicious.com\"}" | nc localhost 5000&lt;br&gt;
done&lt;/p&gt;

&lt;p&gt;This helped simulate basic indicators often associated with suspicious DNS activity.&lt;/p&gt;

&lt;p&gt;Important: This is not full DNS tunneling detection, but rather a lab-based approximation using long/suspicious DNS query patterns.&lt;/p&gt;

&lt;p&gt;🧠 Threat Detection Logic&lt;/p&gt;

&lt;p&gt;This project focused on detecting suspicious activity using simple but useful logic.&lt;/p&gt;

&lt;p&gt;Credential Stuffing Detection&lt;/p&gt;

&lt;p&gt;Credential stuffing behavior was approximated by detecting a high volume of failed login attempts in a short period of time.&lt;/p&gt;

&lt;p&gt;Detection idea:&lt;br&gt;
repeated "login failed" events&lt;br&gt;
clustering by source IP&lt;br&gt;
spikes over time&lt;/p&gt;

&lt;p&gt;Example detection query:&lt;/p&gt;

&lt;p&gt;{&lt;br&gt;
  "name": "Credential Stuffing Detection",&lt;br&gt;
  "index": "logs-*",&lt;br&gt;
  "query": {&lt;br&gt;
    "bool": {&lt;br&gt;
      "must": [&lt;br&gt;
        { "match": { "message": "login failed" } }&lt;br&gt;
      ],&lt;br&gt;
      "filter": [&lt;br&gt;
        { "range": { "@timestamp": { "gte": "now-5m" } } }&lt;br&gt;
      ]&lt;br&gt;
    }&lt;br&gt;
  }&lt;br&gt;
}&lt;br&gt;
Suspicious DNS Activity Detection&lt;/p&gt;

&lt;p&gt;Suspicious DNS activity was simulated by generating log entries containing long, random-looking subdomains.&lt;/p&gt;

&lt;p&gt;Detection idea:&lt;br&gt;
DNS query logs&lt;br&gt;
unusually long domain strings&lt;br&gt;
repeated unusual query behavior&lt;/p&gt;

&lt;p&gt;Example detection logic:&lt;/p&gt;

&lt;p&gt;{&lt;br&gt;
  "name": "Suspicious DNS Activity",&lt;br&gt;
  "index": "logs-*",&lt;br&gt;
  "query": {&lt;br&gt;
    "bool": {&lt;br&gt;
      "must": [&lt;br&gt;
        { "match": { "message": "dns query" } }&lt;br&gt;
      ]&lt;br&gt;
    }&lt;br&gt;
  }&lt;br&gt;
}&lt;br&gt;
📊 Building the Kibana Dashboard&lt;/p&gt;

&lt;p&gt;Once logs were being ingested successfully, I created a Security Monitoring Dashboard in Kibana.&lt;/p&gt;

&lt;p&gt;1) Create an Index Pattern&lt;/p&gt;

&lt;p&gt;In Kibana:&lt;/p&gt;

&lt;p&gt;Go to Stack Management&lt;br&gt;
Open Index Patterns / Data Views&lt;br&gt;
Create:&lt;br&gt;
logs-*&lt;br&gt;
Select:&lt;br&gt;
@timestamp&lt;/p&gt;

&lt;p&gt;as the time field.&lt;/p&gt;

&lt;p&gt;2) Create Visualizations&lt;/p&gt;

&lt;p&gt;I built the following visualizations:&lt;/p&gt;

&lt;p&gt;Failed Logins Over Time&lt;br&gt;
Type: Line Chart&lt;br&gt;
X-axis: @timestamp&lt;br&gt;
Y-axis: count of failed login events&lt;br&gt;
Top Attack Sources&lt;br&gt;
Type: Horizontal Bar Chart&lt;br&gt;
Bucket: client_ip&lt;br&gt;
Event Types Distribution&lt;br&gt;
Type: Pie Chart&lt;br&gt;
Bucket: message.keyword&lt;br&gt;
Geographic Source Distribution&lt;br&gt;
Type: Map / Coordinate Visualization&lt;br&gt;
Based on GeoIP data&lt;br&gt;
3) Dashboard Layout&lt;/p&gt;

&lt;p&gt;The dashboard was designed like this:&lt;/p&gt;

&lt;p&gt;┌─────────────────────────────────────────────────────────────┐&lt;br&gt;
│                    Security Monitoring Dashboard            │&lt;br&gt;
├────────────────────────────-─┬──────────────────────────────┤&lt;br&gt;
│  Failed Logins Over Time     │  Top Attack Sources          │&lt;br&gt;
│  [Line Chart]                │  [Bar Chart]                 │&lt;br&gt;
├─────────────────────────────-┼──────────────────────────────┤&lt;br&gt;
│  Event Types Distribution    │  Geographic Distribution     │&lt;br&gt;
│  [Pie Chart]                 │  [Map]                       │&lt;br&gt;
├─────────────────────────────-┴──────────────────────────────┤&lt;br&gt;
│  Recent Alerts / Log Table                                  │&lt;br&gt;
└─────────────────────────────────────────────────────────────┘&lt;/p&gt;

&lt;p&gt;This dashboard made it much easier to quickly identify spikes, suspicious IPs, and recurring event types.&lt;/p&gt;

&lt;p&gt;🧪 Testing and Validation&lt;/p&gt;

&lt;p&gt;To validate the setup, I performed multiple tests.&lt;/p&gt;

&lt;p&gt;1) Verify Elasticsearch Indices&lt;br&gt;
curl &lt;a href="http://localhost:9200/_cat/indices" rel="noopener noreferrer"&gt;http://localhost:9200/_cat/indices&lt;/a&gt;&lt;br&gt;
2) Search Ingested Logs&lt;br&gt;
curl -X GET "&lt;a href="http://localhost:9200/logs-*/_search?pretty" rel="noopener noreferrer"&gt;http://localhost:9200/logs-*/_search?pretty&lt;/a&gt;"&lt;br&gt;
3) Confirm Detection Visibility in Kibana&lt;/p&gt;

&lt;p&gt;Expected observations:&lt;/p&gt;

&lt;p&gt;spike in failed logins&lt;br&gt;
suspicious DNS-related events visible&lt;br&gt;
top source IPs shown in charts&lt;br&gt;
logs searchable through Kibana Discover&lt;/p&gt;

&lt;p&gt;📈 Detection Results:&lt;br&gt;
The dashboard successfully surfaced suspicious behavior during testing.&lt;/p&gt;

&lt;p&gt;Attack / Activity        Detection Method             Status&lt;br&gt;
Credential Stuffing    Failed login spike           ✅ Detected&lt;br&gt;
Brute-Force Activity&lt;br&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnamvjcz6lizp2pd141vm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnamvjcz6lizp2pd141vm.png" alt=" " width="800" height="453"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2px41n7njx1s8sep3mnb.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2px41n7njx1s8sep3mnb.png" alt=" " width="800" height="499"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F479peylvzelaieuq85tr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F479peylvzelaieuq85tr.png" alt=" " width="800" height="454"&gt;&lt;/a&gt;Repeated authentication attempts ✅ Detected&lt;br&gt;
Suspicious DNS Activity Long/random DNS query patterns  ✅ Detected&lt;br&gt;
Suspicious Visibility   GeoIP enrichment + IP grouping  ✅ Identified&lt;/p&gt;

&lt;p&gt;🛡️ Incident Response Workflow:&lt;br&gt;
Once suspicious activity was identified, the following investigation workflow was used.&lt;/p&gt;

&lt;p&gt;1) Investigate in Kibana&lt;/p&gt;

&lt;p&gt;Example query:&lt;/p&gt;

&lt;p&gt;client_ip: "192.168.1.100"&lt;/p&gt;

&lt;p&gt;Time-based filtering:&lt;/p&gt;

&lt;p&gt;@timestamp: [now-1h TO now]&lt;/p&gt;

&lt;p&gt;Specific failed login investigation:&lt;/p&gt;

&lt;p&gt;message: "login failed" AND client_ip: "192.168.1.100"&lt;/p&gt;

&lt;p&gt;2) Correlate with Other Logs&lt;br&gt;
client_ip: "192.168.1.100" OR source_ip: "192.168.1.100"&lt;/p&gt;

&lt;p&gt;This helped determine whether the same IP appeared across multiple suspicious events.&lt;/p&gt;

&lt;p&gt;3) Example Response Actions&lt;br&gt;
block suspicious IPs&lt;br&gt;
investigate repeated authentication failures&lt;br&gt;
document findings&lt;br&gt;
escalate as needed&lt;/p&gt;

&lt;p&gt;Example ticket format:&lt;/p&gt;

&lt;p&gt;{&lt;br&gt;
  "title": "Potential Credential Stuffing Activity",&lt;br&gt;
  "source_ip": "192.168.1.100",&lt;br&gt;
  "timestamp": "2024-01-15T10:30:00",&lt;br&gt;
  "severity": "HIGH",&lt;br&gt;
  "recommendation": "Investigate source IP and implement rate limiting"&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;⚠️ Challenges Faced:&lt;br&gt;
A few practical challenges came up during the project:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  Challenge                           Solution
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Docker memory allocation issues  Increased Docker memory to 8 GB&lt;br&gt;
Logstash pipeline errors     Validated pipeline configuration carefully&lt;br&gt;
Kibana connectivity issues   Verified Docker networking and service dependencies&lt;br&gt;
Noisy or weak detections     Tuned detection logic and thresholds&lt;br&gt;
Inconsistent log formats     Used parsing and extraction rules&lt;/p&gt;

&lt;p&gt;These issues were useful because they reflected the kind of troubleshooting that often happens in real-world deployments.&lt;/p&gt;

&lt;p&gt;📌 Limitations:&lt;br&gt;
This lab setup was useful for learning, but it still has limitations:&lt;/p&gt;

&lt;p&gt;i.   single-node Elasticsearch only&lt;br&gt;
ii.  not production-scale&lt;br&gt;
iii. basic rule logic&lt;br&gt;
iv.  no automated response&lt;br&gt;
v.   detection quality depends on available logs&lt;br&gt;
vi.  security disabled for lab simplicity&lt;/p&gt;

&lt;p&gt;This project was built for hands-on learning and detection workflow understanding, not as a production-ready SIEM.&lt;/p&gt;

&lt;p&gt;🚀 Future Improvements:&lt;br&gt;
There are several ways this project could be improved:&lt;/p&gt;

&lt;p&gt;i.   integrate Elastic Agent&lt;br&gt;
ii.  enable TLS and authentication&lt;br&gt;
iii. add Slack / email alerting&lt;br&gt;
iv.  build custom SOC dashboards&lt;br&gt;
v.   use Elastic Security detection rules&lt;br&gt;
vi.  add machine learning-based anomaly detection&lt;br&gt;
vii. expand to a multi-node ELK cluster&lt;/p&gt;

&lt;p&gt;📚 Key Learning Outcomes:&lt;br&gt;
This project helped me build practical experience in:&lt;/p&gt;

&lt;p&gt;i.   deploying the ELK Stack with Docker&lt;br&gt;
ii.  configuring Logstash pipelines&lt;br&gt;
iii. forwarding and parsing logs&lt;br&gt;
iv.  building Kibana dashboards&lt;br&gt;
v.   writing simple threat detection logic&lt;br&gt;
vi.  simulating suspicious security events&lt;br&gt;
vii. performing basic log-based threat hunting&lt;/p&gt;

&lt;p&gt;🎯 Conclusion:&lt;br&gt;
This project helped me understand how centralized log collection and visualization can support security monitoring and threat detection in a practical way.&lt;/p&gt;

&lt;p&gt;By building an ELK Stack lab using Docker, simulating suspicious activity, and creating a security-focused dashboard in Kibana, I was able to experience a simplified SIEM workflow end-to-end — from log ingestion to detection to investigation.&lt;/p&gt;

&lt;p&gt;For anyone learning cybersecurity, blue teaming, SOC analysis, or SIEM fundamentals, this is a very valuable hands-on project.&lt;/p&gt;

&lt;p&gt;🔗 References:&lt;br&gt;
i. Elastic Stack Documentation&lt;br&gt;
ii. Elasticsearch Docker Guide&lt;br&gt;
iii. Logstash Pipeline Documentation&lt;br&gt;
iv. Kibana Dashboard Documentation&lt;br&gt;
v. OWASP Credential Stuffing Guidance&lt;/p&gt;

</description>
      <category>elasticsearch</category>
      <category>kibana</category>
      <category>siem</category>
      <category>docker</category>
    </item>
    <item>
      <title>Building a Network Intrusion Detection System (NIDS) with Snort on Linux: A Complete Hands-on Guide</title>
      <dc:creator>Dipesh Kumar</dc:creator>
      <pubDate>Fri, 03 Apr 2026 08:17:54 +0000</pubDate>
      <link>https://forem.com/dipesh_kumar_2fa6e436346e/building-a-network-intrusion-detection-system-nids-with-snort-on-linux-a-complete-hands-on-guide-3bna</link>
      <guid>https://forem.com/dipesh_kumar_2fa6e436346e/building-a-network-intrusion-detection-system-nids-with-snort-on-linux-a-complete-hands-on-guide-3bna</guid>
      <description>&lt;ol&gt;
&lt;li&gt;Introduction:
In today’s rapidly evolving digital environment, organizations face a growing number of cyber threats such as port scans, brute-force attacks, denial-of-service (DoS) attacks, and web-based exploitation attempts. Detecting these threats in real time is essential for maintaining network security and system availability.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This project focuses on the design and implementation of a Network Intrusion Detection System (NIDS) using Snort and Wireshark on Ubuntu Linux. The main goal of this project was to monitor network traffic, identify suspicious activities, and generate alerts based on custom-defined detection rules.&lt;/p&gt;

&lt;p&gt;Through this implementation, I gained hands-on experience in network traffic analysis, intrusion detection, Snort rule writing, and basic incident response mechanisms.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Objectives:
The main objectives of this project were:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;To install and configure Snort IDS on Ubuntu Linux&lt;br&gt;
To monitor live network traffic for malicious activity&lt;br&gt;
To create and test custom Snort rules&lt;br&gt;
To detect common network attacks in a lab environment&lt;br&gt;
To analyze suspicious packets using Wireshark&lt;br&gt;
To perform basic incident response actions after attack detection&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Lab Environment:
The project was implemented in a controlled lab environment with the following specifications:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Component             Specification&lt;br&gt;
Operating System    Ubuntu 22.04 LTS&lt;br&gt;
RAM                       4 GB&lt;br&gt;
CPU                     2 Cores&lt;br&gt;
Storage                 20 GB Free Space&lt;br&gt;
IDS Tool                  Snort&lt;br&gt;
Packet Analyzer             Wireshark&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Project Architecture:
The architecture of this project consists of an attacking system, a target monitoring system, and traffic inspection tools.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Attacker Machine (Kali Linux / Test System)&lt;br&gt;
        |&lt;br&gt;
        |  (ICMP / TCP / HTTP / SSH Attack Traffic)&lt;br&gt;
        v&lt;br&gt;
Target Ubuntu Monitoring System&lt;br&gt;
   ├── Snort IDS&lt;br&gt;
   ├── Custom Detection Rules&lt;br&gt;
   ├── Wireshark Packet Analysis&lt;br&gt;
   ├── iptables Firewall&lt;br&gt;
   └── fail2ban (SSH Protection)&lt;/p&gt;

&lt;p&gt;This setup allowed me to generate controlled attack traffic and verify whether the intrusion detection system was able to identify suspicious behavior successfully.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Tools and Technologies Used:
The following tools and technologies were used during this project:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Snort – for real-time intrusion detection&lt;br&gt;
Wireshark – for packet capture and traffic analysis&lt;br&gt;
Ubuntu Linux – as the deployment environment&lt;br&gt;
iptables – for firewall-based blocking&lt;br&gt;
fail2ban – for brute-force mitigation&lt;br&gt;
Nmap – for port scan simulation&lt;br&gt;
Hydra – for SSH brute-force simulation&lt;br&gt;
ping / flood traffic – for ICMP flood testing&lt;br&gt;
sqlmap – for SQL injection testing&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Installation and Configuration:&lt;br&gt;
6.1 System Update:&lt;br&gt;
The system was first updated to ensure all packages were current.&lt;/p&gt;

&lt;p&gt;cmd: sudo apt update &amp;amp;&amp;amp; sudo apt upgrade -y`&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;6.2 Install Required Dependencies:&lt;br&gt;
    The necessary libraries and development tools required for Snort were installed using the following command:&lt;/p&gt;

&lt;p&gt;cmd: sudo apt install -y build-essential libpcap-dev libpcre3-dev \&lt;br&gt;
  cmd: libdumbnet-dev bison flex libnghttp2-dev zlib1g-dev \&lt;br&gt;
  cmd: libssl-dev libnetfilter-queue-dev libdnet-dev&lt;/p&gt;

&lt;p&gt;6.3 Install Snort:&lt;br&gt;
   cmd: Snort was installed and verified using:&lt;br&gt;
   cmd: sudo apt install snort -y&lt;br&gt;
   cmd: snort -V&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;This step confirmed that Snort was successfully installed and ready for configuration.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;6.4 Install Wireshark:&lt;br&gt;
   Wireshark was installed for network traffic capture and packet inspection.&lt;/p&gt;

&lt;p&gt;cmd: sudo apt install wireshark -y&lt;br&gt;
   cmd: sudo dpkg-reconfigure wireshark-common&lt;br&gt;
   cmd: sudo usermod -a -G wireshark $USER&lt;/p&gt;

&lt;p&gt;Wireshark was used throughout the project to visually inspect suspicious packets and confirm Snort alerts.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Snort Rule Configuration:&lt;br&gt;
7.1 Understanding Snort Rule Structure:&lt;br&gt;
 Each Snort rule consists of two main parts:&lt;/p&gt;

&lt;p&gt;Rule Header → Defines traffic conditions&lt;br&gt;
  Rule Options → Defines alert message, classification, SID,    thresholds, and payload matching&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;General Snort rule format:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; [action] [protocol] [source IP] [source port] -&amp;gt; [destination IP] [destination port] (options)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;7.2 Creating a Custom Rule File:&lt;br&gt;
      A custom rule file was created to store locally written detection rules.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  cmd: sudo nano /etc/snort/local.rules
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt;Custom Detection Rules:
The following custom Snort rules were created to detect common attack patterns.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;8.1 ICMP Flood Detection (DoS Attack):&lt;br&gt;
     This rule detects excessive ICMP echo requests from the same source within a short time window.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;alert icmp $EXTERNAL_NET any -&amp;gt; $HOME_NET any (
    msg:"ICMP FLOOD ATTACK DETECTED";
    threshold:type both, track by_src, count 100, seconds 5;
    classtype:attempted-dos;
    sid:1000001;
    rev:1;
)

Purpose:
  Detects possible ICMP flood or ping flood attacks.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;8.2 Nmap SYN Port Scan Detection:&lt;br&gt;
     This rule detects rapid SYN packets sent to the monitored host, which may indicate an Nmap SYN scan.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;alert tcp $EXTERNAL_NET any -&amp;gt; $HOME_NET any (
    msg:"NMAP SYN SCAN DETECTED";
    flags:S;
    threshold:type both, track by_src, count 20, seconds 10;
    classtype:attempted-recon;
    sid:1000004;
    rev:1;
)

Purpose:
  Detects suspicious reconnaissance activity such as port scanning.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;8.3 SSH Brute Force Detection:&lt;br&gt;
      This rule monitors repeated connection attempts targeting the SSH service.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;alert tcp $EXTERNAL_NET any -&amp;gt; $HOME_NET 22 (
    msg:"SSH BRUTE FORCE ATTEMPT";
    flow:to_server,established;
    detection_filter:track by_src, count 10, seconds 60;
    classtype:attempted-recon;
    sid:1000009;
    rev:1;
)

Purpose:
   Detects repeated SSH authentication attempts from a single source IP.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;8.4 SQL Injection Detection:&lt;br&gt;
     This rule attempts to identify common SQL injection patterns in HTTP requests.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;alert tcp $EXTERNAL_NET any -&amp;gt; $HOME_NET 80 (
    msg:"SQL INJECTION ATTEMPT";
    flow:to_server,established;
    content:"union"; http_uri; nocase;
    content:"select"; http_uri; nocase;
    classtype:web-application-attack;
    sid:1000012;
    rev:2;
)

Purpose:
  Detects simple SQL injection attempts in web traffic.

Note: This rule was implemented for educational demonstration purposes and would require more tuning for real-world production environments.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;8.5 Cross-Site Scripting (XSS) Detection:&lt;br&gt;
     This rule detects possible XSS payloads in HTTP requests.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;alert tcp $EXTERNAL_NET any -&amp;gt; $HOME_NET 80 (
    msg:"CROSS-SITE SCRIPTING (XSS) ATTEMPT";
    flow:to_server,established;
    content:"&amp;lt;script"; http_uri; nocase;
    pcre:"/(\&amp;lt;script|\%3Cscript)/Ui";
    classtype:web-application-attack;
    sid:1000013;
    rev:2;
)

Purpose:
  Detects simple reflected or encoded XSS payload attempts.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Including Custom Rules in Snort Configuration:&lt;br&gt;
The local rule file was included in the Snort configuration file:&lt;/p&gt;

&lt;p&gt;cmd: sudo nano /etc/snort/snort.conf&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The following line was added:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; include $RULE_PATH/local.rules
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;This allowed Snort to load the custom detection rules during execution.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Running Snort in IDS Mode:&lt;br&gt;
Snort was executed in IDS mode to inspect live traffic and generate alerts in real time.&lt;/p&gt;

&lt;p&gt;cmd: sudo snort -A console -q -c /etc/snort/snort.conf -i eth0&lt;br&gt;
 Explanation:&lt;br&gt;
  -A console → Displays alerts in terminal&lt;br&gt;
  -q → Quiet mode&lt;br&gt;
  -c → Specifies configuration file&lt;br&gt;
  -i eth0 → Selects the network interface&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Attack Simulation and Testing:&lt;br&gt;
To verify the effectiveness of the intrusion detection system,  several attack simulations were performed in a controlled environment.&lt;/p&gt;

&lt;p&gt;11.1 Port Scan Detection Test:&lt;br&gt;
   A SYN scan was launched using Nmap:&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; cmd: nmap -sS [TARGET_IP]
Expected Snort Alert
 [**] [1:1000004:1] NMAP SYN SCAN DETECTED [**]
 [Priority: 3]
 04/03 14:30:12 192.168.1.100 -&amp;gt; 192.168.1.10
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;11.2 ICMP Flood Test:&lt;br&gt;
    An ICMP flood was generated using:&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  cmd: ping -f [TARGET_IP]
 Expected Outcome:
    Snort generated repeated alerts once the threshold was crossed.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;11.3 SSH Brute Force Test:&lt;br&gt;
     A brute-force attempt was simulated using Hydra:&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; cmd: hydra -l root -P pass.txt ssh://[TARGET_IP]
 Expected Outcome:
    Snort detected repeated SSH connection attempts from the attacking source.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;11.4 SQL Injection Test:&lt;br&gt;
    SQL injection traffic was simulated using:&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   cmd: sqlmap -u "http://[TARGET_IP]/page?id=1"
 Expected Outcome:
   Snort generated an alert when matching suspicious SQL keywords were identified.
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Packet Analysis with Wireshark:&lt;br&gt;
Wireshark was used to inspect and validate the traffic that triggered Snort alerts.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Traffic Analysis Activities Performed&lt;br&gt;
Observed SYN packets during Nmap scanning&lt;br&gt;
Monitored repeated ICMP echo requests during flood testing&lt;br&gt;
Analyzed SSH traffic patterns during brute-force attempts&lt;br&gt;
Inspected suspicious HTTP requests containing SQLi/XSS payloads&lt;/p&gt;

&lt;p&gt;Using Wireshark alongside Snort improved visibility into the exact packet behavior and helped confirm whether alerts were legitimate or false positives.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Detection Results:
The custom intrusion detection system successfully identified multiple attack patterns during testing.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Attack Type      Command Used                Detection Status&lt;br&gt;
ICMP Flood      ping -f target                   Detected&lt;br&gt;
Port Scan       nmap -sS target                  Detected&lt;br&gt;
SSH Brute Force  hydra -l root -P pass.txt ssh://target Detected&lt;br&gt;
SQL Injection      sqlmap -u "&lt;a href="http://target/page?id=1" rel="noopener noreferrer"&gt;http://target/page?id=1&lt;/a&gt;"  Detected&lt;/p&gt;

&lt;p&gt;The results demonstrate that Snort, when configured with custom rules, can effectively detect suspicious traffic patterns in a controlled lab setup.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Incident Response Actions Taken:&lt;br&gt;
After attack detection, basic incident response measures were applied to reduce further malicious activity.&lt;/p&gt;

&lt;p&gt;14.1 Blocking Malicious IP Addresses:&lt;br&gt;
    The attacking IP was blocked using iptables:&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  cmd: sudo iptables -A INPUT -s 192.168.1.100 -j DROP
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;14.2 Rate Limiting ICMP Requests:&lt;br&gt;
     To mitigate ICMP flood attacks, rate limiting was applied:&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;    cmd: sudo iptables -A INPUT -p icmp --icmp-type echo-request -m limit --limit 1/second -j ACCEPT
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;14.3 Enabling SSH Protection with fail2ban:&lt;br&gt;
      fail2ban was installed and enabled to reduce SSH brute-force attempts.&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;       cmd: sudo apt install fail2ban -y
       cmd: sudo systemctl enable fail2ban
       cmd: sudo systemctl start fail2ban
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;14.4 Viewing Firewall Rules:&lt;br&gt;
      Firewall rules were verified using:&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;        cmd: sudo iptables -L -n
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Challenges Faced:&lt;br&gt;
During the implementation of this project, several practical challenges were encountered:&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Configuring Snort correctly on Ubuntu required careful attention to rule paths and interface settings&lt;br&gt;
Some initial rules generated noisy alerts and required threshold tuning&lt;br&gt;
Application-layer attacks such as SQL injection and XSS were more difficult to detect reliably than network-layer attacks&lt;br&gt;
Testing needed to be performed in a controlled environment to avoid accidental impact on normal traffic&lt;/p&gt;

&lt;p&gt;These challenges helped improve my understanding of real-world intrusion detection limitations and the importance of tuning.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Limitations:
Although the project was successful, it also had some limitations:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The IDS was tested only in a small lab environment&lt;br&gt;
Detection logic for web attacks was basic and signature-based&lt;br&gt;
Some attacks may evade detection through encoding or obfuscation&lt;br&gt;
The system currently focuses mainly on detection, not full automated prevention&lt;br&gt;
Performance under high enterprise-level traffic was not evaluated&lt;/p&gt;

&lt;p&gt;These limitations highlight areas for future improvement.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Future Improvements:
This project can be further enhanced in several ways:&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Integrate ELK Stack for centralized logging and visualization&lt;br&gt;
Add Zeek for deeper protocol and behavioral analysis&lt;br&gt;
Automate response actions using Python scripts&lt;br&gt;
Configure email or Slack alerts for real-time notifications&lt;br&gt;
Improve rule quality using more advanced Snort signatures&lt;br&gt;
Store and correlate alerts for better incident investigation&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Key Learning Outcomes:
This project provided strong practical exposure to several core cybersecurity concepts.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Skills Gained&lt;br&gt;
Hands-on experience with Snort IDS&lt;br&gt;
Network traffic analysis using Wireshark&lt;br&gt;
Writing and tuning custom detection rules&lt;br&gt;
Understanding attack patterns such as:&lt;br&gt;
Port scanning&lt;br&gt;
ICMP flood attacks&lt;br&gt;
SSH brute-force attempts&lt;br&gt;
Basic web attack payloads&lt;br&gt;
Performing basic incident response&lt;br&gt;
Applying layered defense concepts using IDS + firewall + fail2ban&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Conclusion:
This project demonstrated how a Network Intrusion Detection System (NIDS) can be designed and implemented using Snort and Wireshark in a Linux environment.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;By configuring Snort, writing custom detection rules, simulating attack scenarios, analyzing traffic, and applying response measures, this project provided practical exposure to real-world network defense techniques. It also emphasized the importance of traffic visibility, rule tuning, and defense-in-depth in cybersecurity operations.&lt;/p&gt;

&lt;p&gt;Overall, this project significantly improved my understanding of network monitoring, threat detection, and incident response, and it served as a valuable hands-on learning experience in cybersecurity.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;References: 
i. Snort Official Documentation
ii. Wireshark Official Documentation
iii. Nmap Documentation
iv. Hydra Tool Documentation
v. sqlmap Documentation&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>cybersecurity</category>
      <category>linux</category>
      <category>ids</category>
      <category>wireshark</category>
    </item>
  </channel>
</rss>
