本文へスキップ
Skillpedia
デプロイとクラウド(DevOps)35k · #8070

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がスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-log-integrity-with-blockchain/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

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

  1. Install dependencies: pip install requests
  2. Ingest log entries from syslog, JSON, or plain text files.
  3. For each entry, compute SHA-256 hash of: previous_hash + timestamp + log_content.
  4. Store the chain as a JSON ledger with entry index, timestamp, content hash, previous hash, and chain hash.
  5. Verify chain integrity by recomputing all hashes and detecting breaks.
  6. 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

repo: mukul975/Anthropic-Cybersecurity-Skills

人気

GitHubのスター
35k
ランキング
#8070
ライセンス
Apache-2.0
更新日
2026/8/31

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル