Page 2 of 2

Understanding buffer overflows using Radare2 Jan 6 2020

Many people have heard about the perils of buffer overflows, but it’s something different to hear about it and another to try to make one yourself and play with it. In this post, we’ll explore the basics of buffer overflow and create an example to understand them better.

We’ll be using radare2, so if you need to install it, go ahead and read the instructions in their GitHub repository.

Let’s start by creating a small program to analyse and exploit with a buffer overflow.

Read More...

Using Radare2 to patch a binary Dec 28 2019

When reversing a binary, sometimes it’s useful to modify how the binary behaves. We can accomplish this by changing the binary itself. If we had the source code, it’d be easy, but for us, it’ll require looking at the decompiled code and deciding which bytes to modify to get our desired behaviour. We can, for example, change the control flow by changing the jump condition. Or we could modify a string that is used on a comparison, etcetera. The modification of a binary is known as patching. In this post, we are going to learn how to use radare2 to patch a binary.

Read More...

Newsletter #15 - Using radare2 to patch a binary Dec 28 2019

Hello,

I hope that you had a good week, and if you celebrate Christmas, I hope you had a good one. I’ve been enjoying this week playing with binaries.

I sometimes feel like keeping up with high-level languages like Swift and JavaScript is very tiring. There is always something “new” and not all the time easy to grasp the implications of the changes. Anyways, it’s fun to see that the old assembly languages are still there and I can jump back to them after a few years and find them familiar.

Read More...

Using LLDB for reverse engineering Dec 20 2019

I’ve been exploring reverse engineering, and it’s a fascinating topic. There are many ways to analyse a binary. Usually, the analysis is divided into two types, static and dynamic. Static analysis is when you decompile the binary and read the assembly code and try to figure out what it does. On the other hand, in dynamic analysis, you execute the binary and analyse it while running. In general, for dynamic analysis, we use a debugger. As you can imagine, there are many debuggers out there. In this post, we are going to use LLDB to analyse a binary. I’ll explain the basic commands we would use and a general setup that I find useful when doing dynamic analysis.

Read More...

Newsletter #14 - Using LLDB for reverse engineering Dec 20 2019

Hello,

I hope all of you are enjoying the holiday season. I like this season, everyone seems to be in a good mood, and also, there is an excuse to get hot chocolate more often than in any other season.

Did you see everything that Apple released yesterday?

The security platform document will keep you busy during the weekend (157 pages if you were wondering). Have a look and let me know what you think.

Read More...

Let's write some assembly code in macOS for Intel x86_64 Dec 12 2019

This is going to be a small article on the basics of working with Assembly Language. We won’t go deep into building extensive programs in assembly. The main idea of this post is to clarify the workflow for creating an assembly program and some key concepts so you can comfortably begin your assembly explorations.

Let’s first learn about the different assembly syntaxes and types.


Bash Beyond Basics Increase your efficiency and understanding of the shell

If you are interested in this topic you might enjoy my course Bash Byond Basics. This course helps you level up your bash skills. This is not a course on shell-scripting, is a course on improving your efficiency by showing you the features of bash that are seldom discussed and often ignored.

Read More...

Tracking where settings are stored on macOS Jun 28 2019

In this post, I’ll explain how to figure out where macOS stores specific preferences and how to modify them using the command line tool defaults. Knowing where the preferences are stored and how to manage them programmatically allows us to create scripts that will help us automate the setup of one or many computers. I think you’ll find it useful.

I was sharing some code through Slack when I noticed that all my straight quotes (') were replaced by smart quotes (’). I felt cheated, I remember this happening in other apps before, but I’ve stopped myself in the past from fixing it because I don’t want to run after any premature-optimization or automation. The simple solution is to go to Settings > Keyboard > Text and deselect the “Use smart quotes and dashes” checkbox. But how and where do macOS stores user’s preferences?

Read More...

$