# Can.ac > Reverse-engineering and whatnot ## The Minutiae of Tool-calling - URL: https://blog.can.ac/2026/08/03/the-minutiae-of-tool-calling/ - Date: 2026-08-03 - Markdown: https://blog.can.ac/2026/08/03/the-minutiae-of-tool-calling/index.md - Categories: software-engineering - Tags: llm, tool-calling, agents, benchmarks Two years ago I was hosting my own SMTP server and had a simple goal: receiving one-time codes + the occasional human email. But I kept running into two issues: It was a PITA to extract the number/link in a generic way It kept receiving spam, being a wild-card inbox This was around the time GPT 3 came out, but we didn’t have structured output yet, let alone tool-calls, so I came up with this beautiful strategy: 1// Mail classifier. 2// 3const classifyMail = createPipeline( 4 'mail corpus', 5 … --- ## Snapcompact: SoTA Compaction — Instant, Local, Free. Pick 3 - URL: https://blog.can.ac/2026/06/10/snapcompact/ - Date: 2026-06-10 - Markdown: https://blog.can.ac/2026/06/10/snapcompact/index.md - Categories: software-engineering - Tags: llm, context, vision, benchmarks A 1568×1568 PNG fits about 40,000 characters of text in a 6×10 pixel font. That’s ~10,000 tokens worth of text, billed by Anthropic’s pixel formula as 3,279 image tokens. Do you see where I’m going with this? Snapcompact: when the context window fills up, render it into dense pixel-font bitmaps and hand those back as images. “A picture is worth a thousand words” turns out to be quite literally true — the model reads it back near-verbatim, at a third of the input price. Obligatory benchmark: This … --- ## I Improved 15 LLMs at Coding in One Afternoon. Only the Harness Changed. - URL: https://blog.can.ac/2026/02/12/the-harness-problem/ - Date: 2026-02-12 - Markdown: https://blog.can.ac/2026/02/12/the-harness-problem/index.md - Categories: software-engineering - Tags: llm, coding-agents, benchmarks Cross-posted from X / @_can1357 In fact only the edit tool changed. That’s it. 0x0: The Wrong Question The conversation right now is almost entirely about which model is best at coding, GPT-5.3 or Opus. Gemini vs whatever dropped this week. This framing is increasingly misleading because it treats the model as the only variable that matters, when in reality one of the bottlenecks is something much more mundane: the harness. Not only is it where you capture the first impression of the user (is … --- ## Optimizing Bracha's Reliable Broadcast: Shaving Rounds off a 37-Year-Old Algorithm - URL: https://blog.can.ac/2025/12/25/optimizing-brachas-reliable-broadcast/ - Date: 2025-12-25 - Markdown: https://blog.can.ac/2025/12/25/optimizing-brachas-reliable-broadcast/index.md - Categories: distributed-systems - Tags: byzantine-fault-tolerance, reliable-broadcast, tla+, formal-verification Bracha’s reliable broadcast has been the go-to Byzantine broadcast primitive since 1987. Three rounds, \(O(n^2)\) messages, optimal fault tolerance at \(n > 3f\). Textbook stuff. I’ve been trying to get a fast multi-value agreement primitive: something where all nodes propose values and agree on one (or ⊥ if they’re hopelessly split). Reliable broadcast is the natural building block, but three rounds felt like overkill for the happy path. So I went digging. Months of searching the literature … --- ## Reverse Engineering Hyperliquid ft. SetYesterdayUserVlm - URL: https://blog.can.ac/2025/12/20/reverse-engineering-hyperliquid/ - Date: 2025-12-20 - Markdown: https://blog.can.ac/2025/12/20/reverse-engineering-hyperliquid/index.md - Categories: web3, software-analysis What happens when you take IDA Pro to a $30B “decentralized” exchange? Hyperliquid markets itself as a “fully on-chain order book perpetual exchange.” $1 trillion in trading volume. $30 billion valuation. Crypto Twitter calls it the future of DeFi. I decided to see what the hype was and googled “hyperliquid github”. To my surprise, there was no source code. The repository tells you to download this hl-visor blob, run it, and let it download more blobs to execute for you. Say what now? How did … --- ## PgC: Garbage collecting Patchguard away - URL: https://blog.can.ac/2024/06/28/pgc-garbage-collecting-patchguard/ - Date: 2024-06-28 - Markdown: https://blog.can.ac/2024/06/28/pgc-garbage-collecting-patchguard/index.md - Categories: windows-internals I have released another article about Patchguard almost 5 years ago, ByePg, which was about exception hooking in the kernel, but let’s be frank, it didn’t entirely get rid of Patchguard; in this article I will be discussing an entirely different approach to bypass Patchguard, PgC. Now there already is plenty of great research on Patchguard, Tetrane even released a 61-page whitepaper on all the intricacies of Patchguard. What makes PgC different is that it does not actually depend on how … --- ## Speculating the entire x86-64 Instruction Set In Seconds with This One Weird Trick - URL: https://blog.can.ac/2021/03/22/speculating-x86-64-isa-with-one-weird-trick/ - Date: 2021-03-22 - Markdown: https://blog.can.ac/2021/03/22/speculating-x86-64-isa-with-one-weird-trick/index.md - Categories: x86 As cheesy as the title sounds, I promise it cannot beat the cheesiness of the technique I’ll be telling you about in this post. The morning I saw Mark Ermolov’s tweet about the undocumented instruction reading from/writing to the CRBUS, I had a bit of free time in my hands and I knew I had to find out the opcode so I started theory-crafting right away. After a few hours of staring at numbers, I ended up coming up with a method of discovering practically every instruction in the processor using a … --- ## Writing an optimizing IL compiler, for dummies, by a dummy: 0x1 Symbolic Expressions - URL: https://blog.can.ac/2020/04/11/writing-an-optimizing-il-compiler-for-dummies-by-a-dummy/ - Date: 2020-04-11 - Markdown: https://blog.can.ac/2020/04/11/writing-an-optimizing-il-compiler-for-dummies-by-a-dummy/index.md - Categories: software-analysis Before I begin this series of blog posts, I would like to add a small disclaimer. I have no prior experience or academic knowledge when it comes to compiler development so I might not use the correct jargon or state of the art algorithm, but nonetheless, I wanted to share my journey working on VTIL which is a project I started aiming to make the translation of a virtual machine architecture –e.g. VMProtect– into x86-64 easier. You will be able to find the source code for most of the things I … --- ## ByePg: Defeating Patchguard using Exception-hooking - URL: https://blog.can.ac/2019/10/19/byepg-defeating-patchguard-using-exception-hooking/ - Date: 2019-10-19 - Markdown: https://blog.can.ac/2019/10/19/byepg-defeating-patchguard-using-exception-hooking/index.md - Categories: exploits, windows-internals Now I know what you are thinking, exception hooks? …in kernel-mode? Yes, it is certainly is not as easy as a mere call to kernel32!AddVectoredExceptionHandler, but with some thinking out of the box we actually can implement a system-wide exception handler. As much as Microsoft wants you to forget, filling WDK with abstractions over abstractions, frightening you with their fearsome guard dog PatchGuard barking at anything and everything, your driver is executing in kernel-mode. That is as high as … --- ## Arbitrary Code Execution at Ring 0 using CVE-2018-8897 - URL: https://blog.can.ac/2018/05/11/arbitrary-code-execution-at-ring-0-using-cve-2018-8897/ - Date: 2018-05-11 - Markdown: https://blog.can.ac/2018/05/11/arbitrary-code-execution-at-ring-0-using-cve-2018-8897/index.md - Categories: exploits, windows-internals, x86 Just a few days ago, a new vulnerability allowing an unprivileged user to run #DB handler with user-mode GSBASE was found by Nick Peterson (@nickeverdox) and Nemanja Mulasmajic (@0xNemi). At the end of the whitepaper they published on triplefault.io, they mentioned that they were able to load and execute unsigned kernel code, which got me interested in the challenge; and that’s exactly what I’m going to attempt doing in this post. Before starting, I would like to note that this exploit may not … --- ## Making the Perfect Injector: Abusing Windows Address Sanitization and CoW - URL: https://blog.can.ac/2018/05/02/making-the-perfect-injector-abusing-windows-address-sanitization-and-cow/ - Date: 2018-05-02 - Markdown: https://blog.can.ac/2018/05/02/making-the-perfect-injector-abusing-windows-address-sanitization-and-cow/index.md - Categories: windows-internals, x86 By the end of this post, I aim to make an injector unlike any other: one that by design makes your DLL not debuggable from UM, makes your pages invisible to NtQueryVirtualMemory and NtReadVirtualMemory, and lets you execute code in target process without even having a valid handle; and while doing this I want it to be compatible with Patchguard, have no kernel driver loaded while the target is running and require no handle at all. Now, this may seem like a stupidly complicated goal, however, it … --- ## Escaping SMEP Hell: Exploiting Capcom Driver In a Safe Manner - URL: https://blog.can.ac/2018/04/28/escape-smep-exploiting-capcom-safely/ - Date: 2018-04-28 - Markdown: https://blog.can.ac/2018/04/28/escape-smep-exploiting-capcom-safely/index.md - Categories: exploits, windows-internals Trapped in a SMEP disabled payload not being able to do anything reliably? You have come to the right place. I’ve seen so many people using Capcom driver in an unsafe manner that I wanted to make this post, simply explaining why some practices are incredibly unsafe and how we can fix this. When these problems are pointed out, the reply most of the times is “works on my machine /shrug” but when you are not the only user you are setting yourself up for failure (speaking from personal experience). … --- ## Splitting Data from Code, Forgotten x86 Feature: Segmentation - URL: https://blog.can.ac/2018/04/26/splitting-data-from-code-forgotten-x86-feature-segmentation-n/ - Date: 2018-04-26 - Markdown: https://blog.can.ac/2018/04/26/splitting-data-from-code-forgotten-x86-feature-segmentation-n/index.md - Categories: x86 With the introduction of sTLB with Intel Nehalem, TLB splitting – once a reliable technique – became a thing of the past. Those who had to hook user-mode stealthily started looking into hypervisors; specifically EPT violations. However, implementing a hypervisor means implementing bloated, platform dependent code which is not the best way to go when you are trying to ship a software – especially if you are trying to be stealthy as virtualization is rather simple to detect and hard to hide. This … ---