Add TD5 q3 (first part)
This commit is contained in:
parent
72564e2e2d
commit
4f61441bb9
7 changed files with 229 additions and 0 deletions
|
@ -0,0 +1,19 @@
|
|||
.data
|
||||
.globl filename
|
||||
filename:
|
||||
.asciz "/tmp/pwn"
|
||||
|
||||
.text
|
||||
.globl _start
|
||||
|
||||
_start:
|
||||
# creat("/tmp/pwn", 0666)
|
||||
movq $0666, %rsi # read-write perms
|
||||
movq $filename, %rdi # name of file
|
||||
movq $85, %rax # system call number (sys_creat)
|
||||
syscall # call kernel
|
||||
|
||||
# exit(42)
|
||||
movq $42, %rdi # set return code to 42
|
||||
movq $60, %rax # system call number (sys_exit)
|
||||
syscall # call kernel
|
Loading…
Add table
Add a link
Reference in a new issue