I received an email recently suggesting I take a look at a HTML obfuscator. The tool is called Online HTML Obfuscator by PhpKobo , and claims to “heavily obfuscate HTML code”. I was a little skeptical of this claim, and decided to investigate to see how it was protecting the HTML. If we visit the site we can obfuscate their demo HTML code, which is a simple page which some emojis bouncing across…
Today we will be taking a look at one of, if not the hardest, reversing challenges from Hack The Box . The challenge is called vmcrack and is well known among the HTB community for being difficult. This is backed up by the difficulty ratings for the challenge: the majority of users rated it 10/10, known as brainfuck difficulty. Preface : This was one of my personal favourite challenges and if you…
Today I will be discussing a sample binary which features virtual machine obfuscation, an obfuscation technique where the source code is compiled to a custom bytecode language and executed by an interpreter for this language. I will not be covering the basics of how VM obfuscation works; if you would like to read about that there are plenty of good resources online such as this . The sample is…
This post will describe solving a challenge from BYU Capture the Flag 2024. The challenge was called Deal or No Deal and was in the rev category. A compiled Rust binary is provided. Binary Ninja wasn’t great at handling this sample, so I used Ghidra instead. Following the entry point leads us to the main function of the Rust program, which looks like: So it reads a line from stdin, then counts the…
This post describes reverse engineering a Rust binary from the rev section of TBTL Capture The Flag 2024. The challenge is named Safe Rust and provides a compiled Rust program. The challenge description indicates that the program “ isn’t functioning properly ”, and indeed when we run it we get the message thread 'main' has overflowed its stack fatal runtime error: stack overflow Interesting, let’s…
Today I’ll be discussing an interesting challenge from the rev category of University of Maryland Capture The Flag 2024. The challenge is named Typecheck and is accompanied by the cryptic description “ My C++ code won’t type check. Can you fix that for me? ”. Two files are provided: main.cpp and templates.cpp . The main file looks like: #include "templates.hpp" // flag is 60 chars using flag_t =…
This post is a write up of the Travel the Dunes with OCaml challenge from the rev category of University of Maryland Capture The Flag 2024. The challenge provides a file, ocaml_executable and states that it is “ a flag checker compiled and assembled from OCaml using ocamlopt ”. Loading it into Binary Ninja and jumping to the start function we see a libc entry point: We follow this to main , which…
This post describes the cmsc430 challenge by aparker , in the rev category of University of Maryland Capture The Flag 2024. The challenge provides a single binary, chal , which the author states “ was compiled by an hand-crafted, artisan racket compiler ”. Die tells us it was a C/C++ program compiled by GCC. Loading the binary into Binary Ninja and jumping to the _start function, we see a typical…
This post describes the Donations and Donations (but I fixed it) challenges by tahmid-23 in the web category of University of Maryland Capture The Flag 2024. Donations Starting off with the first challenge, when we visit the provided website we are met with: The message Welcome to donations. Can you get the most donations? suggests the goal is to accumulate as much virtual currency as possible.…