Skillpedia
النشر والسحابة (DevOps)35k · #7765

configuring-snort-ids-for-intrusion-detection

ما الذي تفعله

يشرح هذا الدليل كيفية تثبيت Snort وإعداده، وهو برنامج يعمل كشرطي مرور لشبكتك. يراقب كل حركة الإنترنت الداخلة والخارجة، باحثًا عن النشاط المشبوه أو الخبيث، مثل المتسللين الذين يحاولون الدخول إلى نظامك.

متى تستخدمها

  • ✓عندما تريد حماية شبكتك من الهجمات.
  • ✓عندما تريد كتابة قواعدك الخاصة لرصد تهديدات محددة.
  • ✓عندما تريد ضبط القواعد الحالية لتجنب الإنذارات الكاذبة.

رابط المهارة

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

انسخه والصقه في الذكاء الاصطناعي الذي تستخدمه (Claude أو ChatGPT أو Cursor) واطلب منه اتباع التعليمات.

طريقة الاستخدام

أسهل طريقة: انسخ الرسالة والصقها في الذكاء الاصطناعي الذي تستخدمه. سيقرأ المهارة وينفّذ تعليماتها.

رسالة جاهزة للصق

استخدم هذه المهارة لمساعدتي: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/configuring-snort-ids-for-intrusion-detection/SKILL.md اقرأ ملف SKILL.md في هذا الرابط ونفّذ تعليماته لمهمتي.
تريد أن يجد الذكاء الاصطناعي مهارات مثل هذه بنفسه؟ثبّت خادم Skillpedia MCP المجاني: سطر واحد، ويبحث في 15,000+ مهارة قبل كل مهمة.ثبّته في دقيقة واحدة →

مثال على ما تطلبه من الذكاء الاصطناعي

“اضبط Snort لمراقبة شبكتي وتنبيهي إلى النشاط المشبوه.”

5 مهارات جديدة كل أسبوع. قراءة في دقيقة واحدة.

كيف تعمل

يُثبَّت 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 برنامج مجاني يعمل كنظام كشف التسلل على الشبكة (NIDS). يراقب حركة الشبكة بحثًا عن النشاط الضار، ويمكنه تنبيه المسؤولين إلى التهديدات المحتملة.

ما هي « القواعد » في Snort؟

القواعد تعليمات تخبر Snort بما يبحث عنه. وهي تحدد أنماط حركة البيانات التي قد تدل على هجوم أو نشاط غير مرغوب فيه.

ما هي « الإنذارات الكاذبة »؟

تحدث الإنذارات الكاذبة عندما ينبه Snort إلى شيء ليس تهديدًا فعليًا. وضبط القواعد يساعد على تقليل هذه الإنذارات الخاطئة.

التفاصيل

الوصف الأصلي من المؤلف

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

هل هذه المهارة مفيدة؟

0

سجّل الدخول للتصويت.

التعليقات

  • …

المزيد من المهارات من هذا المستودع

مهارات مشابهة