Introduction to Intel AES-NI

Notice

This article was originally published on Anquanke: original article

AES-NI is Intel’s x86-64 SIMD extension for accelerating AES. Anyone familiar with SIMD probably knows it exists, but AES’s asymmetric structure and AES-NI’s unusual design require considerable detail and theory to use correctly. Using easyRE from N1CTF 2021 as an example, this article summarizes my understanding; corrections are welcome.

TCTF 2021 0bf: Emulating Obfuscated Code with Unicorn

Notice

This article was originally published on Anquanke: original article

Introduction

With tremendous help from my teammates, we won the Rising Star division of the TCTF 2021 Finals. The challenge from which I learned the most was 0bf, a ten-round cipher hidden beneath extensive code obfuscation. The official post-event solution deobfuscated it first, but during the competition we lacked time to study the obfuscation pattern and had to analyze it directly. This was also my first use of Unicorn to emulate function logic.

An Introduction to Reversing mruby Bytecode

Notice

This article was originally published on Anquanke: original article

Introduction to mruby

mruby is a lightweight implementation of Ruby. It works much like CPython: Ruby source is compiled to bytecode, which is then interpreted by a virtual machine.

I first encountered mruby bytecode in the DEF CON 2021 Finals. The barb-metal challenge used mruby bytecode to run simulated IoT firmware. A few months later, another mruby reversing challenge appeared in the Fifth Space online competition, so I decided to summarize the characteristics of mruby bytecode.

PlaidCTF 2021 Watness 3

In PlaidCTF 2021, I solved the challenge The Watness III, then I spent my time on another challenge dr. Unfortunately, the regular expression algorithm in dr is too complex to understand, thus I failed to solve it.

There was a similar challenge in PlaidCTF 2020, The Watness II. I solved that last year when I was a member of A*0*E; it was a reverse challenge of a HyperCard game on the m68k platform. I thought that this challenge had the same game logic as the previous one, so I spent some time finding the color logic used in The Watness II. But the result shows that this challenge is different from that one.