본문으로 건너뛰기
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

복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.

사용 방법

가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/configuring-snort-ids-for-intrusion-detection/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

AI에게 요청하는 예시

“네트워크를 모니터링하고 의심스러운 활동이 있으면 알려 주도록 Snort를 설정해 주세요.”

매주 새 스킬 5개. 읽는 데 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란 무엇인가요?

네트워크 침입 탐지 시스템(NIDS) 역할을 하는 무료 프로그램입니다. 네트워크 트래픽에서 악의적인 활동을 모니터링하고 관리자에게 잠재적 위협을 알릴 수 있습니다.

Snort의 '규칙'이란 무엇인가요?

Snort가 무엇을 찾아야 하는지 알려 주는 지시문과 같습니다. 공격이나 원치 않는 활동을 나타낼 수 있는 트래픽 패턴을 정의합니다.

'오탐(false positive)'이란 무엇인가요?

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
업데이트
2026. 8. 31.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬