<?xml version="1.0" encoding="utf-8"?><feed xmlns="http://www.w3.org/2005/Atom" ><generator uri="https://jekyllrb.com/" version="3.10.0">Jekyll</generator><link href="https://timosarkar.xyz/feed.xml" rel="self" type="application/atom+xml" /><link href="https://timosarkar.xyz/" rel="alternate" type="text/html" /><updated>2026-11-27T14:46:46+00:00</updated><id>https://timosarkar.xyz/feed.xml</id><title type="html">Timo Sarkar</title><subtitle>yo wassup, this my blog</subtitle><author><name>Timo Sarkar</name></author><entry><title type="html">yo</title><link href="https://timosarkar.xyz/2026/11/27/yo.html" rel="alternate" type="text/html" title="yo" /><published>2026-11-27T09:00:00+00:00</published><updated>2026-11-27T09:00:00+00:00</updated><id>https://timosarkar.xyz/2026/11/27/yo</id><content type="html" xml:base="https://timosarkar.xyz/2026/11/27/yo.html"><![CDATA[<p>yo</p>]]></content><author><name>Timo Sarkar</name></author><summary type="html"><![CDATA[yo]]></summary></entry><entry><title type="html">I decompiled 3.3 million lines of CrowdStrike</title><link href="https://timosarkar.xyz/2026/11/27/crowdstrike.html" rel="alternate" type="text/html" title="I decompiled 3.3 million lines of CrowdStrike" /><published>2026-11-27T00:00:00+00:00</published><updated>2026-11-27T00:00:00+00:00</updated><id>https://timosarkar.xyz/2026/11/27/crowdstrike</id><content type="html" xml:base="https://timosarkar.xyz/2026/11/27/crowdstrike.html"><![CDATA[<p align="center"><img src="https://upload.wikimedia.org/wikipedia/commons/4/4f/CrowdStrike_logo.svg?utm_source=de.wikipedia.org&amp;utm_campaign=index&amp;utm_content=original" alt="CrowdStrike" width="320" /></p>

<p>As many of you might know, I work on <a href="https://vulcansiem.com">VulcanSIEM</a> which is my custom ultra high-performance security analytics engine and SIEM. I started working on it around 2 years ago and have now reached a point where it is getting serious. Recent benchmarks prove VulcanSIEM to ingest and query data, orders of magnitude faster than competitors.</p>

<p>Naturally I did some basic competitor analysis and found <a href="https://www.crowdstrike.com/">CrowdStrike</a> to be my toughest competitor. Their metrics already claim very high numbers.</p>

<p>Today I took some time to do some decompilation and reverse engineering of CrowdStrike LogScale for fun and so I can understand their core internals and ingestion logic at a much better niveau.</p>

<p>This was done via the official Docker image (<code class="language-plaintext highlighter-rouge">humio/humio-single-node-demo</code>, documented <a href="https://library.humio.com/deployment/installation-containers-humio.html">here</a>). I pulled the rootfs with <a href="https://github.com/containers/skopeo">skopeo</a>, then let <a href="https://github.com/skylot/jadx">jadx</a> loose on the JVM classes. The image called itself LogScale <strong>1.258.4</strong>.</p>

<p>Luckily for me (bad for CrowdStrike), they shipped JVM classes. Decompilation is easy in theory: JVM bytecode gets you close to the original source. In practice, Scala makes jadx work for it, but you still end up with something you can read.</p>

<p>I expected a couple of jars. I got <strong>736</strong>. 410 of them contain <code class="language-plaintext highlighter-rouge">com/humio</code> classes. Decompiling all of them gave me:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>29,527 Java files
3,339,116 lines of code
129 com.humio packages
</code></pre></div></div>
<p><img src="https://pbs.twimg.com/media/HYIyllSXUAE3voQ?format=jpg&amp;name=4096x4096" alt="img" /></p>

<p><img src="https://pbs.twimg.com/media/HX-lyztX0AAjTwn?format=jpg&amp;name=4096x4096" alt="decompiled CrowdStrike LogScale line count" /></p>

<p>That’s 3.3 million lines of decompiled CrowdStrike. Here is what stood out.</p>

<p><strong>Kafka is the spine.</strong> The biggest surprise: Kafka is not an optional add-on. Even a single node runs it, and the cluster’s control plane is three topics: <code class="language-plaintext highlighter-rouge">global-events</code> (every entity change, plus the global snapshot), <code class="language-plaintext highlighter-rouge">chatter</code> (running queries and stats), and <code class="language-plaintext highlighter-rouge">humio-ingest</code> (the ingest queue). Nodes elect a leader, heartbeat through global state, and treat a Kafka epoch change as fatal rather than risk split-brain.</p>

<p>That’s a bold design. Kafka is not just a queue here; it is the source of truth and the coordination layer.</p>

<p><strong>Ingestion is a pipeline with a lot of seatbelts.</strong> The protocol surface is huge: native JSON, Elastic bulk, Splunk HEC, OTLP, raw, Logplex, plus TCP/UDP listeners for syslog, GELF and NetFlow. Beats and Fluent Bit come in through the Elastic path.</p>

<p>The flow is roughly: token → dataspace → parser → tags → Kafka. AutoSharding kicks in when a dataspace gets too many datasources. A digest leader per partition consumes the queue and writes segments. Offsets are not committed to Kafka; they are rebuilt from segment metadata, so a crash replays the last window. At-least-once, by design.</p>

<p>What impressed me is how much code exists just to stop one bad parser or one slow tenant from taking down ingestion. Timeouts, limiter jobs, drop ratios, backpressure. Very operational.</p>

<p><strong>Storage is immutable segments.</strong> Mini-segments are LZ4 blocks with an index block and a bloom-filter sidecar. Normal segments are recompressed with Zstd and a trained dictionary. Merges happen in the background; uploads go to S3/Azure/GCS; replication is weighted rendezvous hashing. The upload rule is beautifully simple: only the first current owner uploads. No distributed lock.</p>

<p>Retention keeps segments that still have a Kafka offset so replay stays possible. Deletes are query-driven segment rewrites.</p>

<p><strong>Queries are coordinated per query.</strong> A query picks a coordinator, then a state machine (live, historical time slicer, table, multi-pass, federated). Historical queries split into up to five cache-aligned slices. Each segment is assigned to exactly one host, so replicas are for failover, not parallel reads. The coordinator polls and merges partial reducer states. Bloom filters let it skip whole blocks.</p>

<p>It is pragmatic. Not academically pretty, but very much built for real workloads.</p>

<p><strong>Multi-tenancy is everywhere.</strong> Organization → View/repository → Dataspace. Every entity is org-tagged. Permissions have five tiers, roles, groups and query prefixes. The interesting code is at the boundaries: global requesters, internal requesters, and org impersonation. That is where a SIEM either holds up or doesn’t.</p>

<h2 id="the-tax-jvm--scala--pekko--kafka">The tax: JVM + Scala + Pekko + Kafka</h2>

<p>Everything above buys durability and coordination. It also costs.</p>

<p><strong>Kafka is on the critical path, even for one node.</strong> Every event goes HTTP → parser → Kafka produce → Kafka consume → segment. That is an extra network hop, an extra serialization and an extra disk write compared with writing the segment directly. The producer uses <code class="language-plaintext highlighter-rouge">acks=all</code> and <code class="language-plaintext highlighter-rouge">linger.ms=3</code>; production adds RF 3 and cross-AZ replication. The demo sets RF to 1, but then you have paid for Kafka without the durability.</p>

<p><strong>The control plane is one partition.</strong> All entity writes serialize through <code class="language-plaintext highlighter-rouge">global-events</code>, and every node replays it at boot. It is simple and correct, but it is a single-lane road for cluster metadata. Token churn, config updates and segment metadata all queue behind each other. Retention is capped at 20 GB, and the transactions are JSON.</p>

<p><strong>Query coordination is poll-based.</strong> Coordinators tick their state machines on the order of 700 ms to 1.5 s (first tick 1.5 s, then 700 ms for live queries). Historical queries go through time slices and a state cache. For an interactive SIEM, that polling cadence is latency you feel.</p>

<p><strong>The JVM and Scala tax is real.</strong> The demo runs two JVMs (LogScale and Kafka), 736 jars, a bundled JDK, and a Scala codebase full of companions, <code class="language-plaintext highlighter-rouge">Option</code>/<code class="language-plaintext highlighter-rouge">Seq</code> allocations, boxed primitives and anonymous classes. Heap is sized to 75% of RAM and direct memory gets a quarter GB per core. That is a lot of surface for GC pauses, JIT warmup and classloading before you have indexed a single event.</p>

<p><strong>Pekko/Akka is powerful and opaque.</strong> Actors, dispatchers, mailboxes and FSMs make the distributed coordination possible, but backpressure is explicit queue limits rather than a property of the model. Debugging a query that is stuck across a coordinator FSM, polling actors and segment fetchers is not fun.</p>

<p><strong>The operational weight is the real cost.</strong> Kafka is mandatory; a Kafka epoch change is fatal by design; ingest offsets are rebuilt from segments; partition ownership is a compare-and-swap; consumer groups are avoided with manual assignment. All of it is reasonable. All of it is machinery you have to run to store logs.</p>

<p>Kafka buys replay, durability and a clean control plane. If you do not need a shared log, you are paying for one. For a single node or a latency-sensitive local pipeline, this architecture is heavier than it needs to be. I did not benchmark it; these are costs visible in the code and the defaults.</p>

<p>Two big pieces are missing from the Java dump.</p>

<p><strong>The collector (and how I got it).</strong> The LogScale Collector is a separate closed-source Go binary (Go 1.27.3 in the 1.12.2 build). The server only implements the fleet-management control plane: install tokens, enroll/poll/pull/push/refresh, metrics, update checks, and a YAML config schema with 12 source types (file, journald, syslog, cmd, wineventlog, unifiedlog, Postgres, MySQL, Oracle, MSSQL, …) and 4 sink types (LogScale, HEC, loopback).</p>

<p>Getting the agent was easier than expected. The docs point at a public Helm repo:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>https://registry.crowdstrike.com/log-collector-us1-prod/index.yaml
</code></pre></div></div>

<p>Chart 1.6.2 pins the image in <code class="language-plaintext highlighter-rouge">values.yaml</code>:</p>

<div class="language-plaintext highlighter-rouge"><div class="highlight"><pre class="highlight"><code>registry.crowdstrike.com/log-collector/us-1/release/logscale-collector:1.12.2
</code></pre></div></div>

<p>That registry allows anonymous pulls. One command gets the container:</p>

<div class="language-bash highlighter-rouge"><div class="highlight"><pre class="highlight"><code>skopeo copy <span class="nt">--override-os</span> linux <span class="nt">--override-arch</span> arm64 <span class="se">\</span>
  docker://registry.crowdstrike.com/log-collector/us-1/release/logscale-collector:1.12.2 <span class="se">\</span>
  <span class="nb">dir</span>:logscale-collector
</code></pre></div></div>

<p>The layer contains <code class="language-plaintext highlighter-rouge">/usr/bin/humio-log-collector</code>: a 29 MB arm64 / 32 MB amd64 stripped Go binary. The image is Ubuntu-based; the entrypoint is <code class="language-plaintext highlighter-rouge">tini</code> plus <code class="language-plaintext highlighter-rouge">run-humio-log-collector.sh</code>, and the config lives at <code class="language-plaintext highlighter-rouge">/etc/humio-log-collector/config.yaml</code>.</p>

<p>The other routes are gated. The server’s update manifest (<code class="language-plaintext highlighter-rouge">https://lc-update.humio.com/manifest.json</code>) wants the LogScale license as a bearer token and returns 401 anonymously. The <code class="language-plaintext highlighter-rouge">.deb</code>/<code class="language-plaintext highlighter-rouge">.rpm</code>/<code class="language-plaintext highlighter-rouge">.msi</code>/<code class="language-plaintext highlighter-rouge">.pkg</code> downloads are proxied by a running LogScale instance with an API token. The public OCI image needs neither.</p>

<p>The agent is still closed source: this gets you the binary, not the Go source.</p>

<p>The <strong>frontend</strong> ships in three pure-asset jars that contain no <code class="language-plaintext highlighter-rouge">com/humio</code> bytecode, which is why the class decompile missed them: <code class="language-plaintext highlighter-rouge">ui.jar</code> (compiled Elm), <code class="language-plaintext highlighter-rouge">webcomponents.jar</code> (seven esbuild components), <code class="language-plaintext highlighter-rouge">api-explorer.jar</code> (Monaco). The web components have source maps, but no <code class="language-plaintext highlighter-rouge">sourcesContent</code>. The Elm bundle has no source map at all. No free frontend source.</p>

<p><strong>Decompiling is not magic.</strong> JVM bytecode gets you close to the original structure, but not byte-level accuracy. Scala companions, <code class="language-plaintext highlighter-rouge">$$anonfun</code> classes and erased generics are everywhere; some files are decompiler artifacts. Treat line numbers as approximate and verify behavior against the running binary.</p>

<p>And the things that are not shipped — the Go agent, the Elm UI, the TypeScript — are not recoverable from the jars. You can read the bundles; you cannot get the source back.</p>

<p>If I had to compress it into a few takeaways:</p>

<ul>
  <li>Kafka-first is a real commitment. Simple durability and coordination; a mandatory latency and blast-radius component.</li>
  <li>Immutable segments + bloom filters + late merges fit append-heavy security data.</li>
  <li>The query design is pragmatic: one owner per segment, merge partial states, reuse cached slices.</li>
  <li>The hard part of a SIEM is not storing logs. It is multi-tenancy and the long tail of ingestion formats. LogScale has both.</li>
</ul>

<h2 id="whats-next">What’s next</h2>

<p>I want to spend more time on the segment format and query planner, and to analyze the collector binary. The frontend is a dead end without source maps, though the module graph is interesting. I will also at some point need to benchmark logscale against my own high-variance dataset to compare its performance metrics against VulcanSIEM.</p>

<p>That’s it. 3.3 million lines of Scala later, I still think LogScale is one of the most impressive log platforms out there.</p>

<p>P.S: @crowdstrike if ur reading this, please dont sue me. I love you guys &lt;3</p>]]></content><author><name>Timo Sarkar</name></author><summary type="html"><![CDATA[]]></summary></entry></feed>