Skip to content

Instantly share code, notes, and snippets.


Martynas Pumputis brb

View GitHub Profile
brb /
Last active Nov 23, 2020
area41 2014 challenge writeup


Being a cheapass student, I couldn't resist to try to win a free entrance to [Area41 Security Conference][3] (don't mix with Alcoholics Anonymous Area 41 in Nebraska) after spotting @gandro23 retweet about the conference and the challenge.

Level 01

The challenge starts after downloading and extracting a [binary][1]. A quick look

brb /
Created Jan 31, 2013
Build deb package from Erlang/OTP source
git svn clone svn:// debian-erlang
cd debian-erlang; git checkout 72f44f02d383d2858ed7480db7e5bbb662ea48d4
git clone git://
cd otp
git checkout OTP_R15B03
rm -rvf lib/*/doc/{archive,standard}/
ln -s ../debian-erlang/debian
./otp_build autoconf
dpkg-buildpackage -rfakeroot -uc -b
brb / dmesg
Last active Mar 8, 2019
vmalloc two failures
View dmesg
2019-03-08T19:36:39,224208+0000 tc: vmalloc: allocation failure, allocated 59392000 of 75501568 bytes, mode:0x6090c0(GFP_KERNEL|__GFP_NORETRY|__GFP_ZERO), nodemask=(null),cpuset=b389e318420d891300ad9658f8e056b59972fda9547dd566245a922c34bb9e42,mems_allowed=0
2019-03-08T19:36:39,224215+0000 CPU: 0 PID: 17378 Comm: tc Tainted: G C OE 5.0.0+ #1
2019-03-08T19:36:39,224216+0000 Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006
2019-03-08T19:36:39,224217+0000 Call Trace:
2019-03-08T19:36:39,224233+0000 dump_stack+0x63/0x85
2019-03-08T19:36:39,224240+0000 warn_alloc+0x10b/0x190
2019-03-08T19:36:39,224242+0000 __vmalloc_node_range+0x173/0x270
2019-03-08T19:36:39,224244+0000 __vmalloc_node_flags_caller+0x47/0x50
2019-03-08T19:36:39,224246+0000 ? htab_map_alloc+0x2e4/0x4e0
2019-03-08T19:36:39,224247+0000 bpf_map_area_alloc+0x45/0x50
brb / proc-meminfo
Created Mar 8, 2019
vmalloc fails to alloc 75MB, Linux 5.0
View proc-meminfo
MemTotal: 4037048 kB
MemFree: 170752 kB
MemAvailable: 2848280 kB
Buffers: 238708 kB
Cached: 2553912 kB
SwapCached: 0 kB
Active: 1720420 kB
Inactive: 1682980 kB
Active(anon): 612384 kB
Inactive(anon): 844 kB
brb / ipvlan.patch
Created Feb 12, 2019
ipvlan-no-netfilter.patch applied to v4.15.18
View ipvlan.patch
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 0936da592..589d7f3a5 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -145,13 +145,15 @@ config MACVTAP
To compile this driver as a module, choose M here: the module
will be called macvtap.
+config IPVLAN_L3S
+ depends on NETFILTER
brb / main.c
Created Jan 31, 2019
View main.c
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
static inline unsigned int bpf_num_possible_cpus(void)
static const char *fcpu = "/tmp/foo";
unsigned int start, end, possible_cpus = 0;
char buff[128];

Keybase proof

I hereby claim:

  • I am brb on github.
  • I am martynasp ( on keybase.
  • I have a public key whose fingerprint is 26E3 A522 51B3 4AD1 C2CD E5CB 5385 B938 B74F 0D71

To claim this, I am signing this object:

brb /
Created Apr 8, 2017
#echo "Renaming JPG -> jpg ..."
#for f in $DIR/*; do
# mv "$f" $(echo "$f" | tr '[:upper:]' '[:lower:]')
for f in $DIR/*; do
# * * * * * /home/brb/Dropbox/battery-stats.txt
set -eu
for b in /sys/class/power_supply/BAT*; do
echo "$(basename "$b") $(date +%s) $(cat ${b}/power_now) $(cat ${b}/energy_now)" >> $1
View withnetns_strace.log
This file has been truncated, but you can view the full file.
execve("./prog/weaveutil/weaveutil", ["./prog/weaveutil/weaveutil", "container-addrs", "weave", "09a29216781c", "859174e2a134", "6f1b45b7ca7f", "84ce7a1efba9", "4b78fdc29e51", "69dd95e85c99", "3b6f18e9cf59", "7266af2ad316", "77f96221b996", "f2cc8f7ba6fd", "44be62695f69", "6caa9c024124", "ee1a86ede15b", "b8cf2435ed46", "f352eaf0ac97", "09fc9dca3e9e", "5c9799078a84", "660ba4a51ef9", "4f2930f97dde", "2a8034422ae8", "21ca7c97d883", "754c0571e48c", "8281423c6b3b", "19328cdafdb8", "36027a3b2639", "e75efc9eae56", "625fd8775652", "86bb47219417", "2da4dd07188b", "4b7ef00a3dac", "a9cdbd956012", "44e62ebb4194", "fc06dddedbbb", "256f08324429", "6b9825a7542a"], [/* 17 vars */]) = 0
uname({sysname="Linux", nodename="fitzroy", ...}) = 0
brk(NULL) = 0x16c7000
brk(0x16c81c0) = 0x16c81c0
arch_prctl(ARCH_SET_FS, 0x16c7880) = 0
set_tid_address(0x16c7b50) = 3357
set_robust_list(0x16c7b60, 24) = 0