Docsity

EXP 100 Exploit Development Prerequisites Practice Exam, Exams of Technology

Toggle sidebar
bg1
EXP 100 EXPLOIT DEVELOPMENT PREREQUISITES
Practice Exam
**Question 1. Which x86 register is conventionally used to point to the top of the
stack?**
A) EAX
B) EBX
C) ESP
D) EDI
Answer: C
Explanation: ESP (or RSP in x86‑64) always contains the address of the current top
of the stack; push/pop instructions modify it automatically.
**Question 2. In a 64‑bit architecture, which of the following registers holds the
instruction pointer?**
A) RIP
B) EIP
C) RSP
D) RBP
Answer: A
Explanation: RIP (Register Instruction Pointer) is the 64‑bit version of EIP and
points to the next instruction to execute.
**Question 3. What does the ISA acronym stand for?**
A) Internal System Architecture
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Partial preview of the text

Download EXP 100 Exploit Development Prerequisites Practice Exam and more Exams Technology in PDF only on Docsity!

Practice Exam

Question 1. Which x86 register is conventionally used to point to the top of the stack? A) EAX B) EBX C) ESP D) EDI Answer: C Explanation: ESP (or RSP in x86‑64) always contains the address of the current top of the stack; push/pop instructions modify it automatically. Question 2. In a 64‑bit architecture, which of the following registers holds the instruction pointer? A) RIP B) EIP C) RSP D) RBP Answer: A Explanation: RIP (Register Instruction Pointer) is the 64‑bit version of EIP and points to the next instruction to execute. Question 3. What does the ISA acronym stand for? A) Internal System Architecture

Practice Exam

B) Instruction Set Architecture C) Integrated Software Application D) Immediate Stack Access Answer: B Explanation: ISA is the set of instructions that a processor can execute, defining how software interacts with hardware. Question 4. Which instruction transfers control to a subroutine while saving the return address on the stack? A) JMP B) CALL C) RET D) PUSH Answer: B Explanation: CALL pushes the address of the next instruction onto the stack and then jumps to the subroutine address. Question 5. Which of the following instructions copies data from one register to another? A) MOV B) POP C) PUSH

Practice Exam

Explanation: .kernel is not part of user‑mode process memory; it belongs to the privileged kernel space. Question 8. Which cache level is usually the smallest and fastest? A) L B) L C) L D) L Answer: A Explanation: L1 cache resides closest to the CPU core, offering the lowest latency but smallest capacity. Question 9. What does the MMU primarily handle? A) Process scheduling B) Virtual‑to‑physical address translation C) Disk I/O buffering D) Network packet routing Answer: B Explanation: The Memory Management Unit translates virtual addresses used by programs into physical RAM addresses.

Practice Exam

Question 10. Which Linux file permission bit allows a user to execute a file? A) r B) w C) x D) s Answer: C Explanation: The ‘x’ bit grants execute permission; without it a file cannot be run as a program. Question 11. In Windows NTFS, which attribute stores file data? A) $MFT B) $DATA C) $INDEX_ROOT D) $BITMAP Answer: B Explanation: The $DATA attribute contains the actual file contents; NTFS can have multiple $DATA streams per file. Question 12. Which C function allocates memory on the heap and zero‑initializes it? A) malloc()

Practice Exam

D) memcpy(dest, src, n); Answer: B Explanation: strcpy copies until a null byte is found without checking the destination size; if src is larger, overflow occurs. Question 15. In a linked list node defined as struct node { int val; struct node *next; };, what does the next field store? A) The value of the next node B) The address of the next node C) The size of the list D) The index of the next node Answer: B Explanation: next is a pointer to another struct node, holding the memory address of the following element. Question 16. Which of the following statements about unions in C is true? A) All members occupy separate memory locations. B) The size of a union is the sum of its members’ sizes. C) Only one member can be used at a time. D) Unions cannot contain pointers. Answer: C

Practice Exam

Explanation: All members share the same memory area; only the last stored member is valid. Question 17. Which register typically holds the base address of the current stack frame in x86? A) ESP B) EBP C) ESI D) EDI Answer: B Explanation: EBP (or RBP in x86‑64) is used as a frame pointer to reference local variables and saved registers within a function. Question 18. What does the push ebp instruction accomplish at the start of a function? A) Saves the caller’s base pointer on the stack B) Clears the stack pointer C) Loads the address of the function into EBP D. Allocates space for local variables Answer: A Explanation: push ebp stores the caller’s frame pointer so it can be restored on function exit.

Practice Exam

A) Pipes B) Message queues C) Shared memory (POSIX) D) Named pipes (FIFOs) Answer: D Explanation: FIFOs appear as special files in the filesystem and provide a one‑way byte stream between processes. Question 22. What is the primary purpose of the chmod command in Unix‑like systems? A) Change file owner B) Change file permissions C) Change file timestamps D) Change file name Answer: B Explanation: chmod modifies the read/write/execute bits for user, group, and others. Question 23. Which of the following is a characteristic of physical memory? A) It can be larger than the addressable virtual space. B) It is directly accessed by the CPU without translation.

Practice Exam

C) It is managed by the OS’s virtual memory subsystem. D) It is shared across all processes without protection. Answer: B Explanation: Physical RAM is the actual hardware memory; the CPU reads/writes it after address translation. Question 24. In a page table entry, what does the “present” flag indicate? A) The page is writable. B) The page is currently in RAM. C) The page is executable. D) The page is shared. Answer: B Explanation: The present bit tells the MMU whether the page resides in physical memory or needs to be fetched from disk. Question 25. Which of the following best describes a “race condition”? A) A deadlock caused by circular waiting. B) A situation where the program’s output depends on the timing of unsynchronized threads. C) An overflow of the stack pointer. D) A buffer overflow caused by user input.

Practice Exam

Explanation: __stdcall passes all arguments on the stack; the callee cleans up the stack before returning. Question 28. In the context of buffer overflow exploitation, what does “NOP sled” refer to? A) A sequence of no‑operation instructions used to slide execution into shellcode. B) A list of prohibited system calls. C) A debugging technique for tracing stack frames. D) An array of null bytes used to terminate strings. Answer: A Explanation: A NOP sled increases the chance that the instruction pointer lands somewhere in a series of NOPs before reaching the payload. Question 29. Which of the following is true about the .bss segment? A) It stores read‑only constants. B) It contains uninitialized global/static variables. C) It holds the executable code. D) It is mapped as executable memory. Answer: B Explanation: The .bss segment reserves space for variables that are zero‑initialized at runtime.

Practice Exam

Question 30. What does the ret instruction do in x86? A) Pops the top of the stack into EIP, returning to the caller. B) Pushes the current EIP onto the stack. C) Clears the registers. D) Jumps to a fixed address. Answer: A Explanation: ret pops the return address saved by call from the stack and transfers control to it. Question 31. Which of the following best describes a “stack overflow”? A) The stack pointer wraps around to address zero. B) The stack grows beyond its allocated limit, overwriting adjacent memory. C) The stack is locked by another thread. D) The stack contains only NOP instructions. Answer: B Explanation: When a program writes more data to the stack than allocated, it corrupts neighboring memory, often leading to crashes or exploitation. Question 32. In C, what is the result of the expression sizeof(char) on any platform? A) 0

Practice Exam

Answer: A Explanation: pushad saves EAX, ECX, EDX, EBX, ESP, EBP, ESI, and EDI onto the stack (in that order). Question 35. Which of the following is a characteristic of a “heap” allocation? A) Fixed size determined at compile time. B) Automatically freed when a function returns. C) Managed via malloc and free. D) Stored in the .text segment. Answer: C Explanation: The heap is a region of memory for dynamic allocation; malloc obtains memory and free releases it. Question 36. In a 32‑bit process, what is the maximum theoretical size of virtual address space? A) 2 GB B) 4 GB C) 8 GB D) 16 GB Answer: B Explanation: 32 bits allow 2³² distinct addresses, which equals 4 GB.

Practice Exam

Question 37. Which of the following statements about the execve system call is correct? A) It creates a new process. B) It replaces the current process image with a new program. C) It suspends the calling process. D) It returns the PID of the new program. Answer: B Explanation: execve loads a new executable into the current process, discarding the previous code and data. Question 38. Which Windows permission grants the ability to delete a file? A) Read B) Write C) Execute D) Delete Answer: D Explanation: The Delete permission specifically allows removal of a file; Write alone does not permit deletion. Question 39. In x86‑64, which register is typically used to pass the first integer argument to a function under the System V AMD64 ABI?

Practice Exam

C) printf("%s", user_input); D) free Answer: C Explanation: printf with an uncontrolled %s will copy the user‑supplied string onto the stack if the format string isn’t bounded. Question 42. What does the EIP register hold after a CALL instruction executes? A) The address of the called function. B) The address of the next instruction after the call. C) The address of the return location (pushed on the stack). D) Zero. Answer: B Explanation: EIP is updated to point to the first instruction of the callee; the previous EIP (return address) is saved on the stack. Question 43. Which of the following best describes “address space layout randomization” (ASLR)? A) Randomly shuffling the order of instructions in a binary. B) Randomly placing the stack, heap, and libraries at different virtual addresses each execution. C) Encrypting the executable on disk.

Practice Exam

D) Using a random key for memory allocation. Answer: B Explanation: ASLR randomizes base addresses of memory regions to make exploitation harder. Question 44. In C, what is the effect of the volatile qualifier on a variable? A) The compiler may cache its value in a register. B) The compiler must reload the variable from memory each time it is accessed. C) The variable becomes read‑only. D) The variable is automatically synchronized across threads. Answer: B Explanation: volatile tells the compiler that the variable can change outside the program’s flow, preventing optimizations that assume stability. Question 45. Which page‑replacement algorithm replaces the page that has not been used for the longest time? A) FIFO B) LRU C) Random D) Clock Answer: B