Skip to content

Instantly share code, notes, and snippets.

@aidanhs
aidanhs / gist:615c5867fc0373b38276
Created April 27, 2015 15:53
udocker exploit

The instructions are:

$ go build udocker.go
$ chgrp docker udocker
$ chmod g+s udocker
$ mv udocker /usr/local/bin

I have performed the first three and therefore have this:

@aidanhs
aidanhs / gist:a25a6131155834b4c483
Last active August 29, 2015 14:20
golang gdb script hackery
--- runtime-gdb.py 2015-05-05 17:03:21.520510629 +0100
+++ runtime-gdb-hacks.py 2015-05-05 17:05:24.416677753 +0100
@@ -369,6 +369,41 @@
ptr = ptr[linkfield]
+class AidanCmd(gdb.Command):
+ "List all goroutines."
+
+ def __init__(self):
@aidanhs
aidanhs / main.rs
Created September 21, 2016 14:11
use std::io::{BufRead, BufReader};
use std::process::{Child, Command, Stdio};
fn main() {
for id in 1..64_000 {
let mut child = Command::new("echo").arg(id.to_string())
.stdout(Stdio::piped()).stderr(Stdio::piped())
.spawn().unwrap();
output(&mut child, false);
child.wait().unwrap();
[cargobomb-prod cargobomb]$ df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 15G 92K 15G 1% /dev
tmpfs 15G 72K 15G 1% /dev/shm
/dev/xvda1 99G 31G 68G 31% /
/dev/xvdb 985G 801G 134G 86% /home/ec2-user/cargobomb/work
[cargobomb-prod cargobomb]$ df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 15G 92K 15G 1% /dev
tmpfs 15G 72K 15G 1% /dev/shm