implementing-log-integrity-with-blockchain
What it does
This tool creates a secure, tamper-proof log. Each new entry in the log contains a unique code (hash) of the previous entry, ensuring any modification is easily detected.
When to use it
- ✓To reliably store security logs.
- ✓When you need to prove a record hasn't been altered.
- ✓For audits and forensic investigations.
Skill link
https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/implementing-log-integrity-with-blockchain/SKILL.mdCopy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.
How to use
The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.
Ready-to-paste message
For Claude Code, Codex or Cursor: run it in your project folder and the skill gets installed.
Download the SKILL.md and drop it into your agent’s skills folder.
Example of what to ask your AI
“Create a secure log for my web server logs and check if they have been tampered with.”
5 new skills a week. 1 minute to read.
How it works
The tool takes each new piece of information (log), adds a unique code from the previous information and a timestamp, and generates a new code. If someone tries to change something, the codes won't match anymore, revealing the tampering.
Technical content (original SKILL.md)
Original text by the author, straight from 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.
FAQ
What is a 'hash'?
It's like a unique fingerprint for each piece of information. Even a tiny change in the text generates a completely different fingerprint.
Why use 'blockchain' here?
It's not a full blockchain, but it uses the idea of chaining information with codes. This makes the log very secure against changes, like a chain where each link depends on the previous one.
How do I know if something was changed?
The tool compares the calculated codes with the original codes. If there's a difference at any point in the chain, it warns that the log has been tampered with from that point onwards.
Details
Original description by the author
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
Popularity
- GitHub stars
- 35k
- Ranking position
- #8070
- License
- Apache-2.0
- Updated
- 8/31/2026
Comments
- …
More skills from this repository
abusing-dpapi-for-credential-access
35kGives your AI agent ready-made instructions for a specific task, so it does it better and faster.
abusing-shadow-credentials-for-privesc
35kTeaches your AI agent to write clear, well-structured text.
achieving-cmmc-level-2-compliance
35kHelps your agent prepare an environment for CMMC Level 2 compliance. It implements security requirements and manages necessary documentation.
acquiring-disk-image-with-dd-and-dcfldd
35kHelps your agent create exact copies of hard drives. This is useful for ensuring no information is lost or altered during investigations.
Similar skills
openclaw-update
394kHelps your agent update an existing OpenClaw Gateway, choosing the update method that fits how it was installed and keeping your session working.
diagnose-gateway
394kHelps your agent find out why your OpenClaw Gateway is failing by checking settings, channels, and ports without changing anything.
crabbox-apps
394kHelps your agent open and run an app on a temporary cloud machine, then show its view in your chat side panel.