implementing-log-integrity-with-blockchain
できること
このツールは、改ざんされにくい安全なログを作成します。ログの新しい各エントリには、直前のエントリから作られた一意のコード(ハッシュ)が含まれるため、どこかが書き換えられればすぐに検出できます。
使う場面
- ✓セキュリティログを確実に保存したいとき
- ✓ある記録が改ざんされていないことを証明する必要があるとき
- ✓監査やフォレンジック調査を行うとき
スキルのリンク
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-log-integrity-with-blockchain/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“Webサーバーのログを安全な形式で記録し、改ざんされていないか確認できるようにしてください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
このツールは、新しい情報(ログ)ごとに、直前の情報から得た一意のコードとタイムスタンプを組み合わせて、新しいコードを生成します。誰かが内容を変更しようとすると、コードが一致しなくなるため、改ざんが分かります。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Implementing Log Integrity with Blockchain
When to Use
- When deploying or configuring implementing log integrity with blockchain capabilities in your environment
- When establishing security controls aligned to compliance requirements
- When building or improving security architecture for this domain
- When conducting security assessments that require this implementation
Prerequisites
- Familiarity with security operations concepts and tools
- Access to a test or lab environment for safe execution
- Python 3.8+ with required dependencies installed
- Appropriate authorization for any testing activities
Instructions
- Install dependencies:
pip install requests - Ingest log entries from syslog, JSON, or plain text files.
- For each entry, compute SHA-256 hash of: previous_hash + timestamp + log_content.
- Store the chain as a JSON ledger with entry index, timestamp, content hash, previous hash, and chain hash.
- Verify chain integrity by recomputing all hashes and detecting breaks.
- Optionally anchor checkpoint hashes to an external timestamping service.
python scripts/agent.py --log-file /var/log/syslog --chain-file log_chain.json --verify --output integrity_report.json
Examples
Chain Entry Structure
{"index": 42, "timestamp": "2024-01-15T10:30:00Z", "content_hash": "a1b2c3...",
"prev_hash": "d4e5f6...", "chain_hash": "SHA256(prev_hash + timestamp + content_hash)"}
Tamper Detection
If entry 42 is modified, chain_hash[42] will not match SHA256(chain_hash[41] + ...), and all entries from 42 onward will be flagged as invalid.
よくある質問
「ハッシュ」とは何ですか?
情報ごとの固有の指紋のようなものです。文章がわずかに変わるだけでも、まったく別の指紋が生成されます。
なぜここで「ブロックチェーン」を使うのですか?
完全なブロックチェーンではありませんが、情報をコードでつなげていくという考え方を使っています。各要素が直前の要素に依存する鎖のような仕組みなので、改ざんに対して非常に強くなります。
変更があったことはどうやって分かりますか?
ツールは計算したコードと元のコードを比較します。鎖のどこかに違いがあれば、その時点以降のログが改ざんされている可能性があると警告します。
詳細
作者による元の説明
Builds an append-only log integrity chain using SHA-256 hash chaining, where each entry incorporates the previous entry's hash so tampering invalidates all subsequent hashes; covers log ingestion (syslog/JSON/plain text), chain verification, pinpoint tamper detection, and checkpoint anchoring to external timestamping services. Use for tamper-evident log storage for compliance or forensics, or to v
人気
- GitHubのスター
- 35k
- ランキング
- #8070
- ライセンス
- Apache-2.0
- 更新日
- 2026/8/31
コメント
- …
このリポジトリの他のスキル
abusing-dpapi-for-credential-access
35k特定のタスク向けに用意された指示をAIエージェントに与え、より良く、より速く作業できるようにします。
abusing-shadow-credentials-for-privesc
35kAIエージェントに、明確で構成のしっかりした文章の書き方を教えます。
achieving-cmmc-level-2-compliance
35kエージェントがCMMC Level 2への準拠に向けた環境を整えられるようにします。セキュリティ要件を実装し、必要なドキュメントを管理します。
acquiring-disk-image-with-dd-and-dcfldd
35kエージェントがハードディスクの完全なコピーを作成できるようにします。調査中に情報が失われたり改変されたりしないようにするのに役立ちます。
似ているスキル
openclaw-update
394k既存のOpenClaw Gatewayを更新するようエージェントを支援します。インストール方法に合った更新方法を選び、セッションを動かし続けます。
diagnose-gateway
394k設定、チャンネル、ポートを確認して、OpenClaw Gatewayが失敗している理由を、何も変更せずに突き止めるようエージェントを支援します。
crabbox-apps
394k一時的なクラウドマシン上でアプリを開いて実行し、そのビューをチャットのサイドパネルに表示するようエージェントを支援します。