implementing-log-integrity-with-blockchain
Builds an immutable log integrity chain using blockchain. Ensures logs are not altered and detects tampering.
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.
Example of what to ask your AI
“Create a secure log for my web server logs and check if they have been tampered with.”
Want more? Open the sections below.
How to use
The easiest way: copy the message below and paste it into Claude, ChatGPT, Cursor or any AI. It reads the skill and follows the instructions.
Skill link
Ready-to-paste message
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.
Installation
Easiest way: copy the skill link and paste it into Claude, ChatGPT or Cursor asking it to follow the instructions.
In the terminal (Claude Code, Codex, Cursor), in your project folder:
npx skills add mukul975/Anthropic-Cybersecurity-Skills --skill implementing-log-integrity-with-blockchainOr download just the file:
curl -L https://raw.githubusercontent.com/mukul975/Anthropic-Cybersecurity-Skills/main/skills/implementing-log-integrity-with-blockchain/SKILL.md -o SKILL.mdTechnical 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
- #5907
- License
- Apache-2.0
- Updated
- 8/31/2026
Comments
- …
More skills from this repository
abusing-dpapi-for-credential-access
Gives your AI agent ready-made instructions for a specific task, so it does it better and faster.
mukul975/Anthropic-Cybersecurity-Skills
abusing-shadow-credentials-for-privesc
Teaches your AI agent to write clear, well-structured text.
mukul975/Anthropic-Cybersecurity-Skills
achieving-cmmc-level-2-compliance
Helps your agent prepare an environment for CMMC Level 2 compliance. It implements security requirements and manages necessary documentation.
mukul975/Anthropic-Cybersecurity-Skills
acquiring-disk-image-with-dd-and-dcfldd
Helps your agent create exact copies of hard drives. This is useful for ensuring no information is lost or altered during investigations.
mukul975/Anthropic-Cybersecurity-Skills
Similar skills
bun-runtime
Has your agent use Bun to run, organize, and test code. It helps choose Bun over other tools and migrate existing projects.
affaan-m/ECC
database-migrations
Helps your agent make safe changes to databases. It ensures changes can be undone and minimizes downtime.
affaan-m/ECC
deployment-patterns
Sets up deployment and CI/CD workflows, containerization, and rollback strategies to ensure safe releases.
affaan-m/ECC