Posts

Showing posts with the label Reverse engineering

CSAW CTF 2014: greenhornd Writeup

Image
Introduction Nowadays, I'm trying to learn windows exploitation by reading the tutorials and solving tasks that recommended by open-source seminar written with the Korean language (Thanks to google translate) besides other external resources. So, I decided to provide writeups for the chosen challenges existed within the seminar repository. Consequently, I am going today to solve my first 32-bit windows pwn challenge within window10 which is greenhornd from CSAW CTF 2014 using the Open-Read-Write ROP chain to read the file named key from a remote server. Additionally, I will use AppJailLauncher to launch the exe file for providing a game server experience using the following command. Finding the Vulnerability First of All, I executed the greenhornd exe, and the following text got printed to the screen which asks you to find the secret key and it suggested that you can look at strings within the binary using strings utility or IDA disassembler (sorry I will use R2 cutter xD ).  ...

Patching ELF with Rair

Image
Introduction In this post, I will try to solve oracle level 3 challenge from chapter 5 of practical binary analysis book using Rair which is a Reverse Engineering Framework that's under development. Briefly, Its rewrite of radare2 but in rust to become more memory safe and more stable along with superior features that are under development. Today, I will just use Rair hex-editor feature for patching the ELF Binary file to solve our challenge. Installation in Linux 1. Install Rust. 2. Add Rust to your system PATH manually. 3. Use cargo Rust’s build system and package manager to download Rair. Level-3 Analysis At the start, I execute the lvl3 binary and kinda get an error that file has an invalid format.   Also, when I tried to check the file format of lvl3 using file utility command I still get an error. Now we know something wrong is going on with format and we need to dig deeper by checking ELF headers to know what causes this error with t...

Windows Service Analysis

Image
Introduction In my first post, I will analyze the dropper of Shamoon 3.0 malware which is windows service executable that differs from a normal executable structure and execution method. So by analyzing dropper of Shamoon 3.0, we can understand: 1) windows service structure. 2) how to analyze & debug windows service.    So let us understand what's windows service and how it structured before jumping to Analysis. Windows service program a program that executed by Service Control Manager (SCM) and conforms to its rules. it runs in the background with no GUI interface as it doesn't need a user to interact with it. It can be started automatically at system boot. Windows Service Structure The Window Service Structure program consists of three important functions as seen in windows service structure Figure: 1. Main entry point function  the main function of the windows service program, its goal to inform the...