Skip to content

Instantly share code, notes, and snippets.

@cedriczirtacic
Last active June 29, 2017 16:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cedriczirtacic/ebfb842be2a26a30ec5faafcb8bc78c7 to your computer and use it in GitHub Desktop.
Save cedriczirtacic/ebfb842be2a26a30ec5faafcb8bc78c7 to your computer and use it in GitHub Desktop.
.section .text
.global _start
_start:
pushq %rbp
movq %rsp, %rbp
subq $13, %rsp
shellcode:
movb $0x05, -1(%rbp)
movb $0x0f, -2(%rbp)
movb $0xc7, -3(%rbp)
movb $0xfe, -4(%rbp)
movb $0x40, -5(%rbp)
movb $0xff, -6(%rbp)
movb $0x30, -7(%rbp)
movb $0x40, -8(%rbp)
movb $0x3c, -9(%rbp)
movb $0xb0, -10(%rbp)
movb $0xc0, -11(%rbp)
movb $0x31, -12(%rbp)
movb $0x48, -13(%rbp)
leaq -13(%rbp), %rcx
call *%rcx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment