Skip to content

Instantly share code, notes, and snippets.


Ben Holland benjholla

View GitHub Profile
calebstewart / ghidra-9.0.desktop
Created Mar 9, 2019
Desktop File for Ghidra 9.0
View ghidra-9.0.desktop
[Desktop Entry]
Comment[en_US]=Ghidra Software Reverse Engineering Suite
Comment=Ghidra Software Reverse Engineering Suite
GenericName[en_US]=Ghidra Software Reverse Engineering Suite
GenericName=Ghidra Software Reverse Engineering Suite
Name[en_US]=Ghidra 9.0

A C compiler for Brainfuck

I want to share my friend's crazy project because it demonstrates how a simple Turing-machine-like programming language is actually equivalent to usual real-world computers.

I think we all know the theory that all Turing complete programming languages are equivalent in terms of their powers. If languages A and B are Turing complete, A can emulate B and vice versa. But that's not obvious at all. How can a simple programming model like Turing Machine can run "real" programs such as ones that run on a general-purpose PC? If it is possible in theory, it can be demonstrated.

public class GoldbachConjecture {
public static void Goldbach(int x) {
if (x % 2 != 0) {
System.out.println("Not Even");
if (x <= 2) {
System.out.println("Less than 2");
roachhd /
Last active Apr 13, 2021
Basics of BrainFuck


BrainFuck Programming Tutorial by: Katie



dpryden /
Created Oct 20, 2014
Example of a ClassLoader leak in Java
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.Path;
* Example demonstrating a ClassLoader leak.
* <p>To see it in action, copy this file to a temp directory somewhere,
# Connects to servers vulnerable to CVE-2014-0160 and looks for cookies, specifically user sessions.
# Michael Davis (
# Based almost entirely on the quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (
# The author disclaims copyright to this source code.
import select
takeshixx /
Last active Feb 5, 2021
OpenSSL heartbeat PoC with STARTTLS support.
#!/usr/bin/env python2
Author: takeshix <>
PoC code for CVE-2014-0160. Original PoC by Jared Stafford (
Supportes all versions of TLS and has STARTTLS support for SMTP,POP3,IMAP,FTP and XMPP.
import sys,struct,socket
from argparse import ArgumentParser
dergachev /
Last active Jan 25, 2021
How to use setuid to install a root backdoor.

Why You Can't Un-Root a Compromised Machine

Let's say somebody temporarily got root access to your system, whether because you "temporarily" gave them sudo rights, they guessed your password, or any other way. Even if you can disable their original method of accessing root, there's an infinite number of dirty tricks they can use to easily get it back in the future.

While the obvious tricks are easy to spot, like adding an entry to /root/.ssh/authorized_keys, or creating a new user, potentially via running malware, or via a cron job. I recently came across a rather subtle one that doesn't require changing any code, but instead exploits a standard feature of Linux user permissions system called setuid to subtly allow them to execute a root shell from any user account from the system (including www-data, which you might not even know if compromised).

If the "setuid bit" (or flag, or permission mode) is set for executable, the operating system will run not as the cur

Java 0day 1.7.0_10 decrypted source
Originaly placed on
From Russia with love.
import java.lang.invoke.MethodHandle;
import java.lang.invoke.MethodHandles;
import java.lang.invoke.MethodType;
maxcountryman / bf.c
Created Jan 29, 2012
A simple brainfuck interpreter in C
View bf.c
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
// initialize the tape with 30,000 zeroes
unsigned char tape[30000] = {0};
// set the pointer to point at the left-most cell of the tape
unsigned char* ptr = tape;