This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* gcc -o nostdlib nostdlib.c -m32 -z execstack -nostdlib */ | |
/* Who needs libc or asm() when you can abuse the ABI in horrible ways?*/ | |
typedef int (*sc_fun)(int,int,int,int,int,int,int); | |
void _start(void) { | |
char syscall[] = "\x60\x83\xc4\x24\x58\x5b\x59\x5a\x5e\x5f\x5d\xcd\x80\x83\xec\x40\x61\xc3"; | |
((sc_fun)syscall)(4, 0, "Hello, World\n", 13, 0, 0, 0); | |
((sc_fun)syscall)(1, 0, 0, 0, 0, 0, 0); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
commit 6297e8bbfa2ef9b870a182c29a26f189297b4b63 | |
Author: Nelson Elhage <[email protected]> | |
Date: Tue Oct 5 10:57:58 2010 -0400 | |
Don't use a pager when called through M-x grep. | |
diff --git a/pager.c b/pager.c | |
index dac358f..32ff2f3 100644 | |
--- a/pager.c | |
+++ b/pager.c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Hi pdos, | |
For tomorrow's group meeting, I will be giving a talk on a survey of | |
linux kernel vulnerabilities. | |
The talk will present data on 141 Linux kernel vulnerabilities discovered in | |
the past 15 months, and examine how well state-of-the-art techniques | |
address these real bugs. The main findings are that no techniques are | |
fully effective, and that semantic bugs---violations of high-level security |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
struct hentry { | |
int foo; | |
char word[1]; | |
}; | |
int main(void) { | |
struct hentry h, *h1 = &h, *h2 = (struct hentry*)malloc(sizeof(struct hentry) - 1 + 10); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{- | |
Copyright (c) 2011 Nelson Elhage | |
All rights reserved. | |
Redistribution and use in source and binary forms, with or without | |
modification, are permitted provided that the following conditions | |
are met: | |
1. Redistributions of source code must retain the above copyright | |
notice, this list of conditions and the following disclaimer. | |
2. Redistributions in binary form must reproduce the above copyright |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class smart_object_base { | |
public: | |
smart_object_base() : obj_(0) { | |
}; | |
operator git_object** () { | |
return &obj_; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <fstream> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include <sys/time.h> | |
#include <sys/mman.h> | |
#include <stdint.h> | |
#include <string.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fluid-let |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <stdio.h> | |
#define NALLOC (1 << 10) | |
#define ALLOCSZ (1 << 12) | |
int main(void) { | |
void *buffers[NALLOC]; | |
int i; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdlib.h> | |
#include <stdio.h> | |
struct doit_kwargs { | |
int a, b, c; | |
}; | |
void __doit(struct doit_kwargs kw) { | |
printf("%d %d %d\n", kw.a, kw.b, kw.c); | |
} |
OlderNewer