Format String Vulnerabilities Flashcards

1
Q

What does %x do?

A

Tells printf to fetch whatever is at the top of the stack and interpret it as a hexadecimal number

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is %u used for?

A

Padding

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What does %n do?

A

Writes to a memory address

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What do we need to exploit the vulnerability?

A
  • Distance from the buffer (offset)
  • Location of shellcode (return address)
  • Location of GOT entry to overwrite (return location)
  • Split retaddr into incremental retlocs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What does the executable file contain in static vs dynamic linking?

A

Static: whole code, data of shared library
Dynamic: code, references to symbols to be used from shared libraries

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the PLT?

A

Procedure Linkage Table
Used to call and external procedures/functions whose address is only known at run time, as an indirect layer to the invocation of library functions.
When a shared library function is called by a program it calls the address in the corresponding entry in the PLT
Read-only

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is the GOT?

A

Global Offset Table
Used to resolve addresses
A memory region that contains several function pointers, executables and shared libraries
Readable and Writeable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly