Skip to content

Instantly share code, notes, and snippets.

View bruce30262's full-sized avatar
🤔
Hmmm......

Bruce Chen bruce30262

🤔
Hmmm......
View GitHub Profile
@bruce30262
bruce30262 / qemu-networking.md
Created June 18, 2019 10:31 — forked from extremecoders-re/qemu-networking.md
Setting up Qemu with a tap interface

Setting up Qemu with a tap interface

There are two parts to networking within QEMU:

  • The virtual network device that is provided to the guest (e.g. a PCI network card).
  • The network backend that interacts with the emulated NIC (e.g. puts packets onto the host's network).

Example: User mode network

@bruce30262
bruce30262 / seccomp_ptrace_escape.c
Created October 28, 2018 12:29 — forked from thejh/seccomp_ptrace_escape.c
PoC for bypassing seccomp if ptrace is allowed (known, documented issue, even mentioned in the manpage)
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <signal.h>
#include <errno.h>
#include <fcntl.h>
#include <stddef.h>
#include <sys/syscall.h>
#include <sys/types.h>
#include <sys/stat.h>
@bruce30262
bruce30262 / picturemgr2.py
Created August 16, 2017 08:14 — forked from seanwupi/picturemgr2.py
DEFCON 2017 CTF picturemgr sprintf Stack Overflow Exploit
#!/usr/bin/env python
# By Sean @ HITCON
import re
import socket
import sys
import string
import random
@bruce30262
bruce30262 / solib-deps.sh
Created October 26, 2016 07:04 — forked from toojays/solib-deps.sh
Given a shared library (or executable) print the symbols it uses from libraries it directly depends on.
#!/bin/bash
set -e
# Given a shared library, print the symbols it uses from other libraries it
# directly depends on.
LIB=$1
# Use readelf rather than ldd here to only get direct dependencies.
DEPS=$(readelf -d $LIB | awk '/Shared library:/{ print substr($5, 2, length($5) - 2) }')
@bruce30262
bruce30262 / ARMDebianUbuntu.md
Last active June 12, 2023 11:43 — forked from Liryna/ARMDebianUbuntu.md
Emulating ARM on Debian/Ubuntu

You might want to read this to get an introduction to armel vs armhf.

If the below is too much, you can try Ubuntu-ARMv7-Qemu but note it contains non-free blobs.

Running ARM programs under linux (without starting QEMU VM!)

First, cross-compile user programs with GCC-ARM toolchain. Then install qemu-arm-static so that you can run ARM executables directly on linux

If there's no qemu-arm-static in the package list, install qemu-user-static instead