Posts

Showing posts with the label reverse engineering

Insomni'hack 2024 - Award Challenge

Image
As I haven't posted for a long time and now participated in the Insomni'hack 2024 CTF, I thought I write about the challenge "award", which I thought was quite interesting. After solving another easy challenge, I spent pretty much the entire night of the CTF on it, but only finished the next day, when the CTF was already over. Given was a binary. If you want to follow-along, you can find the binary here  (encoded as base64 with added line breaks). Additionally, there was given an nc command to run that remote, so the binary was only for analysis of what runs on the remote side. So the analysis and decompilation of the binary could be easily done in any of the usual tools. I used Binary Ninja , as I have a license for it and it's not that expensive. I spent quite some time in setting the right variable names etc. The decompiled code looks like this: Decompiled Code Note: There were also stack cookies in the main function added by the compiler, but that code has be...

Insomni'hack 2019: phpain

Image
I participated at the Insomni'hack CTF 2019 with some colleagues. One of the challenges that we solved was the phpain challenge. I'd like to give a description here and explain how I solved it. This was one of the easiest challenges that most teams solved. Given was a network IP address and the source code of the page. With this information you can also try to solve it. So I downloaded the source code, which was PHP and I just found this obfuscated code, when opening it in Notepad: View of source code in Notepad So as you can see, this is nicely obfuscated code. As I was working on Windows, I suspected that the file endings were note working, so I opened it in Visual Studio: Opening the obfuscated file in Visual Studio My first idea was to manually de-obfuscate this. But given the size of the file, that idea was quickly discarded. Also, I wanted to try out how this works, because I was not used to PHP. The first statement probably takes the uninitialized variable ...

Hackvent 2017 Solutions

Image
I participated in the Hackvent 2017 . This is a nice CTF-like event with a new challenge every day during Advent. It starts easy and gets harder with later challenges. Here's my write-up of the challenges and how I solved them (for those I did). I did not finish all of them, much less on the same day, but at least the easy and medium ones are here. All files that were downloadable are included here as well, with a link to pastebin (base64 encoded and days 18 and 21 additionally zipped). Let me know if you find any mistakes or if you have additional comments. I think I made about 24 points in total, but you needed 60 points minimum for getting a bronze title and 120 points maximum (I think 115 was required for gold or so). One big problem was to solve everything on time. As usual, I learned a few things and I can hopefully learn even more by reading the correct solutions. Maybe this write-up can help you too. Day 1 - 5th anniversary Level: easy Text and hints: Day...