मुख्य सामग्री पर जाएँ
Skillpedia
डिप्लॉय और क्लाउड (DevOps)35k · #7765

configuring-snort-ids-for-intrusion-detection

यह क्या करती है

यह गाइड Snort को इंस्टॉल और सेट अप करने का तरीका बताती है। Snort एक ऐसा प्रोग्राम है जो नेटवर्क ट्रैफ़िक पर नज़र रखने वाले ट्रैफ़िक पुलिस की तरह काम करता है। यह आपके नेटवर्क में आने-जाने वाले सारे ट्रैफ़िक को देखता है और संदिग्ध या खतरनाक गतिविधि खोजता है, जैसे घुसपैठिए जो सिस्टम में घुसने की कोशिश करें।

कब इस्तेमाल करें

  • ✓जब आप अपने नेटवर्क को हमलों से बचाना चाहते हैं।
  • ✓जब आप किसी खास खतरे को पकड़ने के लिए अपने नियम बनाना चाहते हैं।
  • ✓जब आप गलत अलर्ट (false alarms) कम करने के लिए मौजूदा नियमों को ठीक करना चाहते हैं।

Skill का लिंक

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/configuring-snort-ids-for-intrusion-detection/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/configuring-snort-ids-for-intrusion-detection/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“Snort सेट करो ताकि वह मेरे नेटवर्क पर नज़र रखे और संदिग्ध गतिविधि के बारे में मुझे अलर्ट करे।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

Snort को इंस्टॉल और कॉन्फ़िगर किया जाता है ताकि वह सारे नेटवर्क ट्रैफ़िक को "सुने"। यह हमले के पैटर्न पहचानने के लिए नियमों के एक सेट का इस्तेमाल करता है। कोई पैटर्न मिलने पर यह अलर्ट जनरेट करता है।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Configuring Snort IDS for Intrusion Detection

When to Use

  • Deploying a network-based intrusion detection system to monitor traffic at key network boundaries
  • Writing custom Snort rules to detect organization-specific threats, attack patterns, or policy violations
  • Tuning existing rulesets to reduce false positives while maintaining detection coverage
  • Integrating Snort alerts with SIEM platforms for centralized security monitoring
  • Validating network security controls by generating test traffic and confirming detection

Do not use as a replacement for endpoint detection, for monitoring encrypted traffic without TLS inspection, or as the sole security control without complementary defenses.

Prerequisites

  • Snort 3.x installed from source or package manager (snort --version to verify)
  • Network interface configured for promiscuous mode on a span port or network tap
  • DAQ (Data Acquisition Library) installed for packet capture integration
  • Registered Snort account for downloading Snort Subscriber (paid) or Community rulesets from snort.org
  • PulledPork 3 or similar rule management tool for automated ruleset updates
  • Sufficient CPU and memory for inline traffic inspection at line rate

Workflow

Step 1: Install and Verify Snort 3

# Install dependencies (Ubuntu/Debian)
sudo apt install -y build-essential libpcap-dev libpcre3-dev libnet1-dev \
  zlib1g-dev luajit hwloc libdumbnet-dev bison flex libcmocka-dev \
  libnetfilter-queue-dev libmnl-dev autotools-dev libluajit-5.1-dev \
  pkg-config cmake libhwloc-dev liblzma-dev openssl libssl-dev cpputest \
  libsqlite3-dev uuid-dev

# Install DAQ from source
git clone https://github.com/snort3/libdaq.git
cd libdaq && ./bootstrap && ./configure && make && sudo make install

# Install Snort 3
git clone https://github.com/snort3/snort3.git
cd snort3 && ./configure_cmake.sh --prefix=/usr/local
cd build && make -j$(nproc) && sudo make install
sudo ldconfig

# Verify installation
snort -V

Step 2: Configure Network Interfaces

# Disable offloading features that interfere with packet inspection
sudo ethtool -K eth1 gro off lro off tso off gso off rx off tx off

# Enable promiscuous mode
sudo ip link set eth1 promisc on

# Create systemd service for persistent interface configuration
sudo tee /etc/systemd/system/snort-iface.service << 'EOF'
[Unit]
Description=Configure Snort capture interface
Before=snort.service

[Service]
Type=oneshot
ExecStart=/sbin/ethtool -K eth1 gro off lro off tso off gso off rx off tx off
ExecStart=/sbin/ip link set eth1 promisc on
RemainAfterExit=yes

[Install]
WantedBy=multi-user.target
EOF

sudo systemctl enable snort-iface.service

Step 3: Configure Snort 3 with Lua Configuration

# Create Snort directory structure
sudo mkdir -p /usr/local/etc/snort/{rules,builtin_rules,lists,appid}
sudo mkdir -p /var/log/snort

# Edit the main Snort configuration
sudo tee /usr/local/etc/snort/snort.lua << 'LUAEOF'
-- Snort 3 Configuration

-- Network variables
HOME_NET = '10.10.0.0/16'
EXTERNAL_NET = '!$HOME_NET'

-- Path variables
RULE_PATH = '/usr/local/etc/snort/rules'
BUILTIN_RULE_PATH = '/usr/local/etc/snort/builtin_rules'

-- Configure DAQ
daq = {
    module_dirs = { '/usr/local/lib/daq' },
    modules = { { name = 'afpacket', variables = { 'buffer_size_mb=256' } } }
}

-- Decoder configuration
normalizer = { tcp = { ips = true } }

-- Stream inspection
stream = { }
stream_tcp = { policy = 'linux', session_timeout = 180 }
stream_udp = { session_timeout = 30 }
stream_icmp = { }

-- HTTP inspection
http_inspect = { }

-- DNS inspection
dns = { }

-- SSL/TLS inspection
ssl = { }

-- SMB inspection
dce_smb = { }

-- File identification and processing
file_id = { rules_file = '/usr/local/etc/snort/file_magic.rules' }

-- Port scan detection
port_scan = {
    protos = 'all',
    scan_types = 'all',
    memcap = 10000000
}

-- Reputation-based filtering
-- reputation = {
--     blacklist = RULE_PATH .. '/blocklist.rules'
-- }

-- IPS rules
ips = {
    enable_builtin_rules = true,
    include = RULE_PATH .. '/snort3-community.rules',
    variables = {
        nets = { HOME_NET = HOME_NET, EXTERNAL_NET = EXTERNAL_NET },
        ports = {
            HTTP_PORTS = '80 8080 8443',
            SSH_PORTS = '22',
            DNS_PORTS = '53'
        }
    }
}

-- Alert output
alert_fast = {
    file = true,
    packet = false,
    limit = 100
}

-- Unified2 output for Barnyard2/SIEM integration

…
अक्सर पूछे जाने वाले सवाल

Snort क्या है?

Snort एक मुफ़्त प्रोग्राम है, जो Network Intrusion Detection System (NIDS) के रूप में काम करता है। यह नेटवर्क ट्रैफ़िक पर नज़र रखता है और खतरनाक गतिविधि की स्थिति में एडमिनिस्ट्रेटर को अलर्ट कर सकता है।

Snort में 'rules' क्या होते हैं?

Rules ऐसे निर्देश हैं जो Snort को बताते हैं कि क्या खोजना है। ये ट्रैफ़िक के पैटर्न तय करते हैं जो हमले या अवांछित गतिविधि का संकेत हो सकते हैं।

'false positives' क्या होते हैं?

False positive तब होता है जब Snort किसी ऐसी चीज़ का अलर्ट दे जो असल में खतरा नहीं है। नियमों को ठीक (tune) करने से ऐसे गलत अलर्ट कम होते हैं।

जानकारी

लेखक का मूल विवरण

Installs, configures, and tunes Snort 3 to monitor network traffic for malicious activity using custom and community rulesets, preprocessors, and alert output plugins. Use when deploying network-based intrusion detection at key boundaries, writing custom Snort rules, tuning rulesets to reduce false positives, or integrating Snort alerts with a SIEM. '

repo: mukul975/Anthropic-Cybersecurity-Skills

लोकप्रियता

GitHub स्टार
35k
रैंकिंग में स्थान
#7765
लाइसेंस
Apache-2.0
अपडेट की गई
31/8/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

मिलती-जुलती skills