<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ginura Binath</title>
    <description>The latest articles on DEV Community by Ginura Binath (@ginura_binath_bff9a5cae5a).</description>
    <link>https://dev.to/ginura_binath_bff9a5cae5a</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4279785%2F61811399-5ec5-43b3-ad56-171729601d61.png</url>
      <title>DEV Community: Ginura Binath</title>
      <link>https://dev.to/ginura_binath_bff9a5cae5a</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ginura_binath_bff9a5cae5a"/>
    <language>en</language>
    <item>
      <title>How I Built a 100% Client-Side, Offline-Verified SOC Log Redactor (with Local Re-hydration)</title>
      <dc:creator>Ginura Binath</dc:creator>
      <pubDate>Thu, 03 Dec 2026 06:22:29 +0000</pubDate>
      <link>https://dev.to/ginura_binath_bff9a5cae5a/how-i-built-a-100-client-side-offline-verified-soc-log-redactor-with-local-re-hydration-3gml</link>
      <guid>https://dev.to/ginura_binath_bff9a5cae5a/how-i-built-a-100-client-side-offline-verified-soc-log-redactor-with-local-re-hydration-3gml</guid>
      <description>&lt;p&gt;SOC analysts run into the same friction every day: you have a noisy Windows Event log, syslog dump, or JSON alert, and you want to paste it into an AI assistant or a vendor support ticket to speed up triage.&lt;/p&gt;

&lt;p&gt;The problem is obvious—raw logs are full of internal RFC1918 IPs, &lt;code&gt;DOMAIN\username&lt;/code&gt; pairs, hostnames, SIDs, and stray tokens. Uploading corporate logs to a random "online log sanitizer" running third-party analytics defeats the entire point of redacting them.&lt;/p&gt;

&lt;p&gt;So I built a &lt;strong&gt;100% client-side Log Anonymizer &amp;amp; Redactor&lt;/strong&gt; as part of &lt;a href="https://siembench.com/tools/log-anonymizer-redactor" rel="noopener noreferrer"&gt;SIEMBench&lt;/a&gt;—a static Astro-based SOC toolkit with zero trackers, no ads, and a strict Content Security Policy.&lt;/p&gt;

&lt;p&gt;Here are the four engineering decisions that made it actually usable for real triage rather than just a regex toy.&lt;/p&gt;




&lt;h3&gt;
  
  
  1. Deterministic Placeholders + Local Re-hydration
&lt;/h3&gt;

&lt;p&gt;Replacing everything with &lt;code&gt;[REDACTED]&lt;/code&gt; destroys log correlation. If an attacker moves laterally from &lt;code&gt;10.0.1.45&lt;/code&gt; to &lt;code&gt;10.0.1.50&lt;/code&gt; using &lt;code&gt;CORP\jsmith&lt;/code&gt;, turning all of those into &lt;code&gt;[REDACTED]&lt;/code&gt; makes the log unreadable.&lt;/p&gt;

&lt;p&gt;Instead, the tool maps each unique value deterministically in order of first appearance (case-insensitively for Windows names, so &lt;code&gt;CORP\jsmith&lt;/code&gt; and &lt;code&gt;corp\JSMITH&lt;/code&gt; stay consistent):&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;10.0.1.45&lt;/code&gt; → &lt;code&gt;[PRIVATE_IP_1]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;CORP\jsmith&lt;/code&gt; → &lt;code&gt;[DOMAIN_1]\[USER_1]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;DC01.corp.local&lt;/code&gt; → &lt;code&gt;[HOST_1]&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once you get an answer back from an AI or vendor referencing &lt;code&gt;[PRIVATE_IP_1]&lt;/code&gt; and &lt;code&gt;[USER_1]&lt;/code&gt;, you can paste that response into the &lt;strong&gt;Restore&lt;/strong&gt; tab. Using the in-memory session map (which never leaves the browser and has a one-click wipe), it swaps the placeholders back to the original values locally.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Preserving Triage Context (SIDs &amp;amp; Public IPs)
&lt;/h3&gt;

&lt;p&gt;Blind redaction strips away the exact details an analyst needs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Public IPs are OFF by default:&lt;/strong&gt; Analysts usually want to keep external attacker IPs visible while masking internal RFC1918/link-local infrastructure.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Built-in Windows SIDs &amp;amp; RIDs survive:&lt;/strong&gt; Well-known SIDs like &lt;code&gt;S-1-5-18&lt;/code&gt; (SYSTEM) and &lt;code&gt;S-1-5-32-544&lt;/code&gt; (Administrators) are left untouched. For domain SIDs (&lt;code&gt;S-1-5-21-...-500&lt;/code&gt;), the domain portion is masked while the trailing built-in RID is preserved—so &lt;code&gt;[DOMAIN_SID_1]-500&lt;/code&gt; still clearly reads as the built-in Administrator.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Guarding Against ReDoS on Large Logs
&lt;/h3&gt;

&lt;p&gt;Running complex regexes over multi-megabyte log dumps in the browser is a classic way to freeze a tab via catastrophic backtracking.&lt;/p&gt;

&lt;p&gt;Every detection pattern (covering Windows XML, rendered event text, JSON, CEF, syslog, SSH lines, JWTs, PEM keys, and API tokens) is tested against 18 classes of adversarial 200,000-character inputs to verify linear-time scaling. A 1 MB+ log redacts and restores cleanly in under 2 seconds.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Strict CSP &amp;amp; Offline Verification
&lt;/h3&gt;

&lt;p&gt;"Client-side" is easy to claim and easy to accidentally break with a single analytics script.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The site runs on static HTML with &lt;strong&gt;zero third-party scripts&lt;/strong&gt;, no Cloudflare RUM/Rocket Loader, and a strict CSP enforced via inline script hashes.&lt;/li&gt;
&lt;li&gt;The automated browser test suite verifies the redactor &lt;strong&gt;completely offline&lt;/strong&gt;—confirming zero network calls are made during redaction or restoration.&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Try It Out
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Log Anonymizer &amp;amp; Redactor:&lt;/strong&gt; &lt;a href="https://siembench.com/tools/log-anonymizer-redactor" rel="noopener noreferrer"&gt;https://siembench.com/tools/log-anonymizer-redactor&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Full Toolkit &amp;amp; 50 Windows/Sysmon Event IDs (SPL, KQL, PowerShell &amp;amp; Sigma):&lt;/strong&gt; &lt;a href="https://siembench.com" rel="noopener noreferrer"&gt;https://siembench.com&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Open-Source Sigma Rules &amp;amp; Reference JSONs (MIT):&lt;/strong&gt; &lt;a href="https://github.com/ginuraB/siembench-sigma-rules" rel="noopener noreferrer"&gt;https://github.com/ginuraB/siembench-sigma-rules&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I'm actively refining the detection patterns—if you spot a log format or edge case it misses, I'd appreciate the feedback in the comments.&lt;/p&gt;

</description>
      <category>cybersecurity</category>
      <category>privacy</category>
      <category>security</category>
      <category>tools</category>
    </item>
  </channel>
</rss>
