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가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
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 --versionto 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. '
인기도
- GitHub 스타
- 35k
- 순위
- #7765
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 8. 31.
댓글
- …
이 저장소의 다른 스킬
abusing-dpapi-for-credential-access
35kAI 에이전트에게 특정 작업을 위한 준비된 지침을 제공해, 더 잘하고 더 빠르게 처리하도록 합니다.
abusing-shadow-credentials-for-privesc
35kAI 에이전트가 명확하고 잘 구성된 텍스트를 쓰도록 가르칩니다.
achieving-cmmc-level-2-compliance
35kCMMC Level 2 규정 준수를 위한 환경을 준비하도록 돕습니다. 보안 요구 사항을 구현하고 필요한 문서를 관리합니다.
acquiring-disk-image-with-dd-and-dcfldd
35k에이전트가 하드 드라이브의 정확한 복사본을 만들도록 돕습니다. 조사 중 정보가 손실되거나 변경되지 않도록 하는 데 유용합니다.
비슷한 스킬
openclaw-update
394k에이전트가 설치 방식에 맞는 방법을 골라 기존 OpenClaw Gateway를 업데이트하고, 세션이 계속 작동하도록 돕습니다.
diagnose-gateway
394k에이전트가 설정, 채널, 포트를 확인해 OpenClaw Gateway가 왜 실패하는지 찾되, 아무것도 바꾸지 않도록 돕습니다.
crabbox-apps
394k에이전트가 임시 클라우드 머신에서 앱을 열고 실행한 뒤, 그 화면을 채팅의 측면 패널에 보여 주도록 돕습니다.