Futaba _ Webs πŸ•ΈπŸ•ΈπŸŽƒπŸ•ΈπŸ•Έ

RCE Binary Injection πŸ•ΈπŸ•ΈπŸŽƒπŸ•ΈπŸ•Έ

Today, I’m going to dive further into binary injection exploits, and cover how to exploit them for RCE, remote code execution. I’m also going to show you how to use one of the most common tools that is used to analyze code flow as well as binary applications overall which is the GDB debugger. I’ll explain a bit about what that is as well.

πŸŽƒ Article πŸŽƒ Glossary πŸŽƒ Catalog πŸŽƒ Home πŸŽƒ Search Mode

πŸŽƒ Article Glossary

πŸ•Έ Synopsis πŸ•Έ

Today, I’m going to dive further into binary injection exploits, and cover how to exploit them for RCE, remote code execution. I’m also going to show you how to use one of the most common tools that is used to analyze code flow as well as binary applications overall which is the GDB debugger. I’ll explain a bit about what that is as well.

Disclaimer

As always, personal disclaimer, any and all information for this is strictly for educational purposes and I do not condone any form of illegal activity, nor am I responsible for anything you should use this information for. DO NOT pen-test on anyone's network unless it is your own, or you have permission to do so. Now, let's begin!

πŸ•Έ Article Topics πŸ•Έ

I'll be discussing the following topics in order:

πŸŽƒ Premise

πŸŽƒ Why is RCE with Buffer Overflow Important?

πŸŽƒ What is the GDB Debugger?

You can click on any of the topics to simply check that one out if it interests you!

NOTE: Articles are read from LEFT to RIGHT via 2 columns! Read the first column all the way down and then move to the next one!

πŸ•Έ Key Links πŸ•Έ

Here's a quick run down on all the main links that are in the article in case you want to check them out first.

πŸŽƒ LinkedIn Version

πŸŽƒ Patreon Version

πŸŽƒ RCE Binary Injection

Premise πŸ•ΈπŸ•ΈπŸŽƒπŸ•ΈπŸ•Έ

Last time, I showed you how to exploit vulnerable functions inside of a program via end user input in order to call other functions within the program via memory EVEN if the function is NEVER explicitly called in the program itself. This was to highlight the dangers of leaving vulnerable code within an application and how it can be exploited by threat actors to execute it which can be problematic if you’ve left stuff like backdoors in the code that the threat actor can easily piggyback off of to compromise internal infrastructures.

This time around, we are going to take it a step further and exploit the overall application to have it perform ANY form of RCE that we want against a target application whether it be in plain text format or binary format.

This is a CRUCIAL skill to master, as you’ll often run into various CTF challenges that require you to know binary exploitation, as well as overall in general if you are running some security tests. It overall comes in handy if you’re just a hacker in general and is a STAPLE skill to master. You’ll go a long way, ESPECIALLY if you plan to do forensic with this skill set.

Why is RCE with Buffer Overflow Important? πŸ•ΈπŸ•ΈπŸŽƒπŸ•ΈπŸ•Έ

There are situations where web application servers will have a program with a service running binded to a port. When you connect to it, the program will run. In some cases, you’ll run into a situation where the program will ask you for user input, which is a common thing. You can fuzz it like how I showed you in previous examples to trigger a segmentation fault which can result in you landing RCE against the server side application, potentially a lot more if you can secure the source code for the application.

To give you a better example of what I mean, run the following command nc canyouhack.us 1985.

THIS IS A CHALLENGE IS FROM β€œSECURITY INNOVATION” THAT HOSTS THE β€œCANYOUHACK.US” CHALLENGE WHICH HOSTS A BINARY EXPLOITATION SERVER LEGAL FOR TESTING. YOU CAN LOOK THIS UP BEFORE YOU RUN THE COMMAND

Next, if you run some input you’ll notice it will close. You can’t see the end user output from the command due to security, BUT, they leave you the source code for the challenge when you go to it, which you can test against. There are vulnerable sections in the code where you can exploit it to send you the flag to solve the challenge. You have to pipe it over the nc command which you can do with certain tools of course.




What is the GDB Debugger? πŸ•ΈπŸ•ΈπŸŽƒπŸ•ΈπŸ•Έ

This is one of the most commonly used tools for binary exploitation, whether the code is in direct plain text format, or binary format such as an executable like a .exe file that you commonly see on windows. When you try to open one of those, should you try to do so, you’ll notice all the code is garbled and is in what is known as binary format.

Using a debugger you can analyze all the code flow and function calls on a lower lever, in some cases, being able to retrieve the code itself (minus comments as those are removed when the program is compiled), allowing you to find weak points in order to exploit the program.

I’ll be covering some of the basic commands and options, as well as explain what they do.

I RECOMMEND THAT YOU LEARN MORE ABOUT β€œSTACKS” AND β€œREGISTERS” VIA ASSEMBLY, AS THIS WILL ALLOW YOU TO BETTER UNDERSTAND WHAT I’M TALKING ABOUT ON A LOWER LEVEL.

I’m still going to explain everything and keep it simple, but if you’re still lost, I recommend that you look this stuff up.

BEFORE WE START, I RECOMMEND YOU COVER MY LAST VIDEO ON THE BASICS OF BINARY EXPLOITATION. WE ARE STICKING WITH 64 BIT AS THIS IS WHAT IS COMMONLY USED TODAY!


portfolio img

If you like to see the more advanced version of this article that talks about methods that can be used to mitigate, as well as any videos included, SUBSCRIBE TO MY PATREON CYBER SECURITY TIER!

If you enjoyed this post give it a thumbs up! I’ll be keeping track of whose reacting from now on as there is a β€œspecial” reason for it. Just know the more you support my content the more there is in stored!


- The Hacker Who Laughs πŸ•ΈπŸ•ΈπŸŽƒπŸ•ΈπŸ•Έ

portfolio img

πŸŽƒ CONTACT ME

AnOnYmOuS

futaba.webs@gmail.com

New York, NY United States