Real Midterm Flashcards
(150 cards)
The returns of strcpy() store in what register that have the address of what buffer?
EAX, Destination
Which of the following step/steps is/are required to execute a shell code in memory?
Find the vulnerability, store the shellcode to the executable memory, hijack control flow/EIP to shellcode
Will comparing a signed integer with an unsigned integer cause an integer overflow?
Yes
Why is it important to execute an exit() syscall for the code reuse attacks?
To avoid a crash and leave no attack trace
Which one of the following is a safe libc function?
strncpy
A shell code can be used for what?
Creating a new user, changing user password, opening a connection to the attackers machine
Suppose we have the following gadgets
G1:
pop %ebx
ret
G2:
pop %ecx
ret
G3:
movl %ebx, %(ecx)
To achieve the following operation, determine the order of gadgets
store 10 at memory address 0x805000
G2, 0x805000, G1, 10, G3
NOP equivalence for stack pointer (esp) move is a gadget that only contains a what instruction?
ret
Finding gadgets is traditionally a what recursive traverse algorithm and searchable through a what representation?
Backward, Trie
True or false: Type confusion bugs are caused by inappropriate up-casts.
False
Direct function calls are what?
Not exploitable
For ROP attacks, any gadget should ends with a what instruction?
ret
The leave instruction (AT&T) combines what instructions?
mve %ebp, %esp
pop %ebp
Format string specifier %n is significant for what?
Writing the number of characters printed so far in a pointer
The following order can be used in position independent shellcode to get the address of a string
Execute jmp to a call instruction sits right before the string, then call instructions goes back to jump+1 after pushing to the return address to the stack
True or False: In a double free, an exploitation occurs when the program calls free(q) on a region that contains data set by the attacker and the second free(q) will try to use the fake chunk tag.
True
The ret instruction is equivalent to what?
pop %eip
To execute a system call, a shellcode must contain what?
Store syscall id in EAX register
Why is it difficult to detect a Use-After-Free vulnerability?
They only exist in a particular execution path
Code reuse attacks can bypass what defenses?
Code signing and Write or Execute
What vulnerability is a double fetch bug a form of?
A race condition
In Stack Guard implementation the function prologue does what?
Stores a canary word between return address and locals
/GS protection alone is not enough to defend against exception handler based exploits because?
The exception is triggered before the canary is checked
In StackGuard implementation the function epilogue does what?
Checks canary before the function returns