<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Projects on pugachev.io</title><link>https://pugachev.io/tags/projects/</link><description>Recent content in Projects on pugachev.io</description><generator>Hugo</generator><language>en-US</language><copyright>© Maxim Pugachev</copyright><lastBuildDate>Thu, 03 Dec 2026 14:53:20 +0100</lastBuildDate><atom:link href="https://pugachev.io/tags/projects/index.xml" rel="self" type="application/rss+xml"/><item><title>angr_ctf, rebuilt</title><link>https://pugachev.io/2026/11/18/angr_ctf-rebuilt/</link><pubDate>Wed, 18 Nov 2026 18:21:11 +0100</pubDate><guid>https://pugachev.io/2026/11/18/angr_ctf-rebuilt/</guid><description>&lt;p&gt;I first met &lt;a href="https://angr.io" target="_blank" rel="noopener"&gt;angr&lt;/a&gt; while solving &lt;a href="https://pugachev.io/2024/01/08/spooky-license-by-hack-the-box/"&gt;&amp;quot;Spooky License&amp;quot; from Hack The Box&lt;/a&gt;. The crackme was quite simple and didn't force me to dive into angr itself. I found out that &lt;a href="https://docs.angr.io/en/latest/quickstart.html#going-further" target="_blank" rel="noopener"&gt;angr's docs&lt;/a&gt; mention &lt;a href="https://github.com/jakespringer/angr_ctf" target="_blank" rel="noopener"&gt;angr_ctf&lt;/a&gt;, so I thought it would be a good idea to solve it as well and learn more. I played with it a bit back then, but never finished and eventually forgot about it completely.&lt;/p&gt;&#10;&lt;p&gt;angr is a kind of &amp;quot;must have&amp;quot; on my small roadmap for learning RE, so I decided to finally grasp the basics properly and came back to angr_ctf. It's Jake Springer's set of eighteen small challenges, each teaching a single symbolic-execution idea: reach an address, prune the dead paths, inject a symbol into a register or onto the stack, fake the heap, hook a function, merge states, and so on. But it turned out that its binaries are 32-bit only, and it was written for an angr from several versions ago (back when &lt;code&gt;claripy&lt;/code&gt; was still its own package), so it doesn't work with angr 10 out of the box. And my developer's urge was to update it first, solving all the challenges while rewriting them.&lt;/p&gt;&#10;&lt;p&gt;Now that I've solved them all, I don't think it's a great start for beginners. It's nice and useful, but very one-sided and artificial. Unfortunately, angr doesn't have proper, up-to-date docs at all (mostly a &lt;a href="https://docs.angr.io/en/latest/examples.html" target="_blank" rel="noopener"&gt;long list of solved CTFs&lt;/a&gt; as examples), and I don't know anything better. But hey, it's open source, so go and fix it if you don't like it, right? Looks like it's worth adding one more line to my &amp;quot;write a book about...&amp;quot; to-do list.&lt;/p&gt;&#10;&lt;p&gt;The result has the same eighteen levels (plus a new one, more on that below) with the same concepts in the same order and (mostly) the same C generators, brought up to angr 10 and built for both x86-64 and the original i386. The scaffolds (commented skeletons of the solutions with the angr parts left blank for you) and the reference solutions run on angr 10 too. I checked every binary and every solution on both architectures after solving each level, so the right password really gets you &lt;code&gt;Good Job.&lt;/code&gt; in return.&lt;/p&gt;&#10;&lt;p&gt;A few things I had to do differently, and they turned out to be interesting in themselves:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;The arbitrary read/write/jump levels (15-17) need a target at an address you can type as printable ASCII. Upstream pinned a whole section (&lt;code&gt;.rodata&lt;/code&gt;, &lt;code&gt;.data&lt;/code&gt; or &lt;code&gt;.text&lt;/code&gt;, depending on the level) to a hand-picked address and hoped the layout held. I found another way: I put the target into its own &lt;code&gt;.secret&lt;/code&gt; section and pinned that, so it always lands at the right address. And it works for a function too, so level 17's jump target is real executable code.&lt;/li&gt;&#10;&lt;li&gt;The Veritesting level stopped working. Veritesting is angr's way of merging the branches of a region back into one state instead of forking on each of them. In angr 10, it seems that it no longer merges a loop body for some reason, so the original 32-iteration loop just forks forever. I split it in two: level 12 keeps the straight-line form that Veritesting still collapses, and the new level 12_1 keeps the loop and merges the states by hand.&lt;/li&gt;&#10;&lt;li&gt;Old angr needed a manual trick to drive a multi-field &lt;code&gt;scanf&lt;/code&gt;, and angr 10 just does it. So seven levels ship a second, shorter solution that relies on that, next to the one that still teaches the technique the old way.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;The prebuilt binaries are in the repo, so all you need to start is Python and angr 10. It's all here: &lt;a href="https://github.com/itwaseasy/angr_ctf_rebuilt" target="_blank" rel="noopener"&gt;angr_ctf_rebuilt&lt;/a&gt;.&lt;/p&gt;&#10;&lt;p&gt;Happy CTFing!&lt;/p&gt;&#10;</description></item><item><title>IOLI crackmes, rebuilt</title><link>https://pugachev.io/2026/11/05/ioli-crackmes-rebuilt/</link><pubDate>Thu, 05 Nov 2026 21:38:23 +0100</pubDate><guid>https://pugachev.io/2026/11/05/ioli-crackmes-rebuilt/</guid><description>&lt;p&gt;If you've read a beginner writeup on reverse engineering in the last ten years or so, chances are it used one of the IOLI crackmes. These are ten tiny exercises by Pau Oliva Fora (pof) from 2007, and none of them takes more than an hour. I don't remember where I first heard about them, but they're even mentioned in the &lt;a href="https://book.rada.re/crackmes/ioli/intro.html" target="_blank" rel="noopener"&gt;radare2 book&lt;/a&gt;. I found and &lt;a href="https://pugachev.io/2023/12/16/solutions-for-ioli-crackmes/"&gt;solved them back in 2023&lt;/a&gt;: fun at the beginning, a bit boring at the end, but still a classic.&lt;/p&gt;&#10;&lt;p&gt;The binaries, though, haven't aged well. They're 32-bit only: Linux x86, Windows x86 and Windows CE on ARM (does anyone still remember what that was?). There's no x64 version at all. &lt;a href="https://github.com/BinaryResearch/IOLI64" target="_blank" rel="noopener"&gt;IOLI64&lt;/a&gt; did port them to x86-64, but it's Linux-only, built from roughly reconstructed sources, and the repo is archived.&lt;/p&gt;&#10;&lt;p&gt;So, ladies and gentlemen, I'm proud to present my rebuild of them. The goal of this pet project was C sources that compile to code as close to the originals as a modern compiler allows: the same compilation flags, the same functions in the same order, the same conditions, and even the dead code the original compiler (or author?) left in. Then my fellow AI friend and I checked every level against the original Linux and Windows binaries, function by function. The result comes pre-compiled for Linux, Windows and macOS on x86, x64 and arm64, and there's a &lt;code&gt;CMakeLists.txt&lt;/code&gt; if you ever want to try other architectures, operating systems or compilers.&lt;/p&gt;&#10;&lt;p&gt;It's all here: &lt;a href="https://github.com/itwaseasy/IOLI-crackmes-rebuilt" target="_blank" rel="noopener"&gt;IOLI-crackmes-rebuilt&lt;/a&gt;.&lt;/p&gt;&#10;&lt;p&gt;Happy hacking!&lt;/p&gt;&#10;</description></item><item><title>How to generate Ghidra fidb files</title><link>https://pugachev.io/2023/12/31/how-to-generate-ghidra-fidb-files/</link><pubDate>Sun, 31 Dec 2023 16:38:42 +0100</pubDate><guid>https://pugachev.io/2023/12/31/how-to-generate-ghidra-fidb-files/</guid><description>&lt;p&gt;While working on one of the crackmes, I discovered that it uses &lt;code&gt;ncurses&lt;/code&gt; to &amp;quot;draw&amp;quot; things in the terminal. So, to avoid digging into the library's internals when reversing, the obvious move is to use IDA's FLIRT signatures or generate your own. That works if you have the full version with all the bells and whistles, which, unfortunately, is not my case. Even if you are ready to create signatures yourself, the necessary utilities are not included in IDA Free. It's sad, of course, but I still didn't want to reverse engineer code that I didn't need. So I had to switch to Ghidra.&lt;/p&gt;&#10;&lt;p&gt;Honestly, I don't like Ghidra, but sometimes you need to use whatever tool you have if it helps. And Ghidra does help in this case, because you can generate signatures when needed (&lt;a href="https://htmlpreview.github.io/?https://github.com/NationalSecurityAgency/ghidra/blob/master/Ghidra/Features/FunctionID/src/main/help/help/topics/FunctionID/FunctionID.html" target="_blank" rel="noopener"&gt;Function ID&lt;/a&gt;, as it is called there). The only problem is that there are no command-line tools for this, at least none that I know of. Using a GUI for such purposes is, in my opinion, overkill.&lt;/p&gt;&#10;&lt;p&gt;Luckily, there is an abandoned project called &lt;a href="https://github.com/threatrack/ghidra-fid-generator" target="_blank" rel="noopener"&gt;ghidra-fid-generator&lt;/a&gt; that does exactly what I wanted: it generates a fidb file from a deb package. Even though it works, there are some things about it that I don't like, for example:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;It does not work with the latest versions of Ghidra.&lt;/li&gt;&#10;&lt;li&gt;Function ID uses so-called &amp;quot;common symbols&amp;quot; when creating the database. The goal is to tune the matching algorithm so that if a match is found but the function is marked as &amp;quot;very common&amp;quot;, it does not use the parent/child relationship as a distinguisher. In other words, a &amp;quot;very common&amp;quot; function's weight in the overall score will not be taken into account if it is a parent/child of another node. The problem with the original &lt;code&gt;ghidra-fid-generator&lt;/code&gt; is that it marks all symbols from the library it processes as common, which affects the algorithm.&lt;/li&gt;&#10;&lt;li&gt;It uses its own &lt;code&gt;AutoCreateMultipleLibraries.java&lt;/code&gt;, a modified copy of Ghidra's &lt;code&gt;CreateMultipleLibraries.java&lt;/code&gt;. Even though the original isn't updated too often, you still need to sync the copy with it from time to time, just in case.&lt;/li&gt;&#10;&lt;li&gt;It doesn't parse Debian package names correctly, which breaks the fidb file metadata.&lt;/li&gt;&#10;&lt;li&gt;It uses 7-Zip, which is kind of an alien on Linux: gzip and bzip2 are the way to go there, while 7z comes from the Windows world.&lt;/li&gt;&#10;&lt;li&gt;It doesn't work on macOS.&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;and many other little things that bother me too. So I just decided to fork the idea and completely rewrite it.&lt;/p&gt;&#10;&lt;p&gt;I've fixed almost all the problems I mentioned, except for the &amp;quot;common symbols&amp;quot;: to use them correctly, you first need to generate fidb files for the standard *nix libraries you want (glibc, libstdc++ and so on) to be able to find these symbols. In addition, you need to prepare your own version of the &lt;a href="https://github.com/NationalSecurityAgency/ghidra/blob/master/Ghidra/Features/FunctionID/ghidra_scripts/RemoveFunctions.java" target="_blank" rel="noopener"&gt;RemoveFunctions.java&lt;/a&gt; script, which the Ghidra team only has for MSVC. So for my tiny crackme task, I decided to skip it for now, since it works just fine without it.&lt;/p&gt;&#10;&lt;p&gt;In any case, I will be happy to improve these scripts if anyone other than me needs them. It's on GitHub, so feel free to report an issue or submit a PR here: &lt;a href="https://github.com/itwaseasy/ghidra-fid-generator" target="_blank" rel="noopener"&gt;ghidra-fid-generator&lt;/a&gt;.&lt;/p&gt;&#10;</description></item></channel></rss>