Seatext library / BotRefund evidence

Proving Evidence Integrity: A Step-by-Step Guide to Hashing and Immutable Storage

Learn how to establish an undeniable chain of custody for digital evidence. By combining client-side behavioral logging, cryptographic hashing, and immutable storage, you can create tamper-proof records that stand up to rigorous audit standards...

Built for advertisers who need clear, refund-ready traffic evidence.

In the world of digital advertising and cybersecurity, proving that evidence has not been tampered with is the difference between a successful refund claim and a rejected dispute. When you report invalid traffic or bot activity to platforms like Google or Meta, you are essentially acting as a forensic investigator. You must provide proof that is not only accurate but also verifiable.

The core challenge is that digital data is inherently malleable. Without a secure process, an auditor cannot know if the logs you provide are the original records or if they were modified to suit your narrative. To solve this, you must implement a system based on cryptographic hashing and immutable storage. This creates a digital "seal" that makes any unauthorized alteration immediately obvious.

The Mechanics of Evidence Integrity

Evidence integrity relies on two fundamental concepts: authenticity and immutability. Authenticity ensures the data originated from a trusted source, while immutability ensures that once recorded, the data cannot be changed, deleted, or overwritten.

When you capture data, such as a user's click path or session duration, you are creating a snapshot of a specific moment. If you store this in a standard database, a malicious actor or a system error could alter that record. By applying a cryptographic hash—a unique digital fingerprint—to that data, you create a reference point. If even a single bit of the original data changes, the hash will no longer match, alerting you to tampering.

Step 1: Capture Raw Evidence with Client-Side Logging

The first step in building a tamper-proof record is capturing data at the source. Server-side logs are often insufficient because they can be manipulated before they reach your storage system. Client-side logging, however, records the user's actual behavior within their browser.

To build a robust case, you should capture more than just a click. You need a comprehensive set of behavioral signals. This includes:

  • Pointer behavior: Tracking mouse movements to identify robotic, linear paths versus natural human tremor.
  • Speed behavior: Measuring input speed to catch superhuman interactions that occur in under 1ms.
  • Session behavior: Monitoring visit lengths that are too uniform or too short to be human.
  • Path behavior: Detecting grid-aligned movements that suggest automated scripts.

By capturing these signals in real-time, you create a rich dataset that is much harder to fake than simple server-side timestamps.

Step 2: Generate Cryptographic Hashes for Every Entry

Once you have captured the raw log, you must "seal" it. This is done using a cryptographic hash function, such as SHA-256. A hash function takes your input data—the JSON object containing your log—and produces a fixed-length string of characters.

This process is one-way. You can generate a hash from your data, but you cannot recreate the data from the hash. This is exactly what makes it a perfect seal. If you store the hash alongside your log, you can verify the integrity of the log at any time by re-hashing the original data and comparing it to the stored hash. If they match, the evidence is intact.

Step 3: Utilize Immutable Storage Solutions

Hashing alone is not enough if the storage medium itself can be edited. You need an immutable storage solution—a system where data can be written but never modified or deleted. Common options include:

  • Append-only databases: Systems designed to only allow new entries, preventing the modification of existing rows.
  • Cloud storage with versioning: Services that keep a history of every change, making it impossible to overwrite a file without leaving a trail.
  • Blockchain ledgers: The gold standard for immutability, where every entry is cryptographically linked to the previous one, making the entire history tamper-evident.

For most advertisers, using a dedicated bot-detection service that handles this infrastructure is the most efficient path. These services automatically log hashes during the audit process, removing the risk of manual error.

Step 4: Cross-Check with Independent Signals

Evidence is strongest when it is corroborated. A single signal, such as a "window.open" tamper, might be a false positive caused by a privacy tool or a corporate network. However, when you combine that signal with other independent data points, the picture becomes clear.

Effective evidence collection involves over 100 independent checks per visit. By cross-checking behavioral signals against network, device, and browser data, you build a multi-layered case. If a session shows robotic mouse movements, superhuman speed, and an invalid IP address, the probability of it being a bot is near 100%. This AI-validated approach is what makes modern evidence so difficult to dispute.

Step 5: Generate Audit-Ready Reports

The final step is to package your evidence into a format that ad platforms can easily review. A professional report should include:

  • A summary of anomalies: Clearly state why the traffic was flagged.
  • Timestamped logs: Provide the raw, hashed data for each event.
  • Verification steps: Explain the hashing algorithm used and provide instructions on how the auditor can verify the integrity of the logs.

By providing a clear, transparent chain of custody, you reduce the burden on the platform's support team, significantly increasing your chances of a successful refund.

Common Pitfalls in Evidence Collection

Even with the right tools, mistakes can undermine your case. Avoid these common errors:

  • Relying on server-side logs: These are easily manipulated. Always prioritize client-side capture.
  • Manual hashing: Human error is the enemy of integrity. Automate your hashing process to ensure consistency.
  • Ignoring context: A hash proves the data hasn't changed, but it doesn't prove the data is meaningful. Always include contextual signals like device fingerprints.
  • Storing logs without hashes: Without a cryptographic seal, your logs are just text files that can be edited by anyone with access.

Frequently Asked Questions

What if my logging tool doesn't support hashing?

You can implement a hashing layer externally. After your logs are captured, pass them through a script that generates a SHA-256 hash and stores it in a separate, secure database. However, using a purpose-built tool is safer and more reliable.

How long should I store hashed evidence?

For ad platform disputes, 90 days is the standard. For legal matters, you should consult with your counsel, but keeping records for at least one year is generally recommended.

Can a third party verify my hashes?

Yes. As long as you provide the original data and the hashing algorithm used, any auditor can generate the hash themselves and compare it to your record.

Is this process expensive?

Basic hashing is computationally inexpensive and can be done with free, open-source tools. The cost usually comes from the storage and the expertise required to set up an automated, immutable pipeline.

What is the first step if I suspect tampering?

If you suspect your current evidence is being tampered with, immediately move your logging to a secure, client-side environment and implement hashing for all new entries. Document the transition period clearly for any future audits.

Why is client-side logging better?

Client-side logging captures the user's actual interaction with your site. Server-side logs only show what the server received, which can be spoofed or altered by sophisticated botnets before it ever reaches your backend.

Further reading and comparison sources

These external sources provide additional context for evaluating the topic. Their inclusion is not an endorsement.

Learn more

Visit the website for more information.

Learn more