This file contains 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
# Add docker apt repository | |
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 | |
sudo sh -c "echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list" | |
# Update packages | |
sudo apt-get update; sudo apt-get upgrade -y; | |
# Install development tools | |
sudo apt-get install -y git python-pip python2.7-dev postgresql libpq-dev lxc-docker | |
sudo pip install -U pip |
This file contains 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
# Generates and prints a new SECRET_KEY for Django to STDOUT. | |
# Run directly from the command line without requiring a script file. | |
python -c "import random; import string; print (''.join( [random.SystemRandom().choice(string.digits + string.ascii_letters + string.punctuation).replace('\"', '').replace('\'','') for i in range(100)] ))" | |
# Environment variable example. | |
# $ export SECRET_KEY=$(python -c "import random; import string; print (''.join( [random.SystemRandom().choice(string.digits + string.ascii_letters + string.punctuation).replace('\"', '').replace('\'','') for i in range(100)] ))") | |
# Heroku example. |
This file contains 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
; exit_x86-linux-intel.s | |
[SECTION .text] | |
global _start | |
_start: | |
xor eax,eax ; zero out eax, no null | |
xor ebx,ebx ; zero out ebx, no null | |
mov bl,42 ; return code is 42 | |
mov al,1 ; exit is syscall 1 |
This file contains 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
// exit_x86-linux.c - exit() x86 linux shellcode. | |
char sc[] = "\x31\xc0\x31\xdb\xb3\x2a\xb0\x01\xcd\x80"; | |
int main() | |
{ | |
int (*func)(); | |
func = (int (*)()) sc; | |
(int)(*func)(); | |
} |
This file contains 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
#exit_x86-linux-att.s | |
.text | |
.globl _start | |
_start: | |
xor %eax,%eax #zero out eax, no null | |
xor %ebx,%ebx #zero out ebx, no null | |
mov $42,%bl #return code is 42 | |
mov $1,%al #exit is syscall 1 |
This file contains 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
// exit_x86-linux-att.c - inline exit() shellcode | |
static void exit() | |
{ | |
__asm__(".att_syntax prefix"); | |
__asm__ volatile( | |
"xor %eax,%eax \n" //zero out eax, no null | |
"xor %ebx,%ebx \n" //zero out ebx, no null" | |
"mov $42,%bl \n" //return code is 42" |
This file contains 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
// exit_x86-linux-intel.c - inline exit() shellcode | |
static void exit() | |
{ | |
__asm__(".intel_syntax noprefix"); | |
__asm__ volatile( | |
"xor eax,eax \n" //zero out eax, no null | |
"xor ebx,ebx \n" //zero out ebx, no null" | |
"mov bl,42 \n" //return code is 42" | |
"mov al,1 \n" //exit is syscall 1" |
This file contains 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
/* Generated by shextor | |
* | |
* exit_x86-linux_shextor.c - shellcode harness | |
* | |
* SC Length: 10 bytes | |
* | |
* Time: 2015-08-23 16:58:04 | |
* Execuable: exit | |
* Format: elf32-i386 | |
* SHA1: 28e8ef986ec2ef8789662d7cd585aed4a854740d |
This file contains 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
; callpop_x86-intel.s - call/pop buffer reference example. | |
[SECTION .text] | |
global _start | |
_start: | |
jmp short load ; jump to call | |
shellcode: | |
pop ebx ; save the string address |
This file contains 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
; stackbuffer_x86-intel.s - Stack buffer example. | |
; Build string on the stack: "ABCDEFG"\x00 | |
[SECTION .text] | |
global _start | |
_start: | |
push 0xFF474645 ; 'EFG'<pad> in little endian | |
push 0x44434241 ; 'ABCD' in little endian | |
inc byte [esp+7] ; null terminate 'ABCDEFG' |
OlderNewer