


























































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



























































Question 1. Which of the following best describes the purpose of a heap spray in exploit development? A) To bypass network firewalls B) To increase the probability of code execution by placing shellcode at predictable memory locations C) To encrypt malicious payloads D) To perform privilege escalation on the target system Answer: B Explanation: A heap spray fills the process heap with many copies of the attacker’s shellcode, making it more likely that a memory corruption bug will jump to a location containing the payload.
Question 2. What is the main advantage of using Return-Oriented Programming (ROP) over classic code injection? A) It requires no knowledge of the target architecture B) It avoids the need for executable memory pages, bypassing DEP/NX protections C) It can be executed without any memory corruption bug D) It automatically escalates privileges to SYSTEM Answer: B Explanation: ROP reuses existing executable code snippets (gadgets) in the binary, allowing code execution even when Data Execution Prevention (DEP) prohibits executing injected code.
Question 3. In the context of eCXD, which Windows API function is commonly used to allocate executable memory for shellcode? A) VirtualAlloc
B) CreateFile C) GetMessage D) RegOpenKeyEx Answer: A Explanation: VirtualAlloc can allocate memory with PAGE_EXECUTE_READWRITE permissions, which is often required to store and run shellcode.
Question 4. What does the term “ASLR” stand for, and what is its primary security benefit? A) Automatic System Log Rotation – reduces log size B) Address Space Layout Randomization – randomizes memory addresses to hinder exploitation C) Application Security Layered Routing – protects network traffic D) Asymmetric Secure Login Routine – improves authentication Answer: B Explanation: ASLR randomizes the location of executable code and libraries in memory, making it difficult for an attacker to predict where gadgets or shellcode will reside.
Question 5. Which of the following is a typical indicator that a binary has been compiled with Position Independent Executable (PIE) enabled? A) Presence of the .text section only B) Relocation entries for all functions C) The binary’s entry point is at a fixed address (e.g., 0x400000) D) The binary uses static linking exclusively Answer: B
Question 8. Which of the following is a typical step in the exploit development lifecycle? A) Conducting a phishing campaign B) Performing a vulnerability assessment, developing a PoC, refining reliability, and creating a full payload C) Installing a rootkit before finding any vulnerability D) Using social engineering to obtain credentials Answer: B Explanation: The eCXD methodology emphasizes a structured process: discover, proof-of-concept, reliability improvement, and payload development.
Question 9. In a buffer overflow, why is the “NOP sled” useful? A) It encrypts the payload to avoid detection B) It provides a large landing zone so the exact jump address does not need to be precise C) It disables antivirus software D) It compresses the shellcode for faster execution Answer: B Explanation: A series of NOP (No-Operation) instructions creates a buffer that safely guides the instruction pointer to the shellcode even if the jump address is slightly off.
Question 10. Which of the following techniques is most effective for bypassing Windows User Account Control (UAC) when exploiting a privileged service? A) Using a DLL hijacking attack against a service that runs with elevated rights
B) Modifying the registry key “HKLM\Software\Microsoft\Windows\CurrentVersion Policies\System\EnableLUA” to 0 C) Disabling UAC via Group Policy from a remote machine D) Exploiting a kernel driver vulnerability directly Answer: A Explanation: DLL hijacking against a service that runs elevated can cause the service to load malicious code with higher privileges, effectively bypassing UAC restrictions.
Question 11. What does the term “egg hunting” refer to in exploit development? A) Searching for hidden files on the target system B) Scanning memory for a unique marker that identifies the location of the shellcode C) Using a brute-force password attack D) Performing a DNS exfiltration technique Answer: B Explanation: Egg hunting involves placing a known marker (the “egg”) before the payload and then using a small stub to search memory for that marker and jump to the payload.
Question 12. Which Linux kernel protection mitigates “null-pointer dereference” exploits? A) SELinux B) PaX C) Kernel Null Pointer Dereference (KNP) protection – prevents mapping of page zero
Question 15. What is the purpose of “stack pivoting” in exploit development? A) To move the stack pointer to a controlled buffer, enabling the execution of a ROP chain stored elsewhere B) To encrypt the stack for confidentiality C] To reset the call stack after a crash D) To allocate additional heap memory for shellcode Answer: A Explanation: Stack pivoting changes the value of ESP/RSP to point to attacker-controlled data, allowing the execution flow to continue through a crafted ROP chain.
Question 16. Which of the following best describes a “use-after-free” (UAF) vulnerability? A) The program reads from a file that no longer exists B) The program accesses memory that has been freed but not yet reallocated, leading to potential code execution C) The attacker reuses a password after it has been changed D) The system reboots after a crash Answer: B Explanation: UAF occurs when a pointer references memory that has been returned to the allocator, allowing an attacker to manipulate the freed memory for malicious purposes.
Question 17. When exploiting a format string vulnerability, which specifier is most often used to read arbitrary memory? A) %s B) %x or %lx C) %d D) %c Answer: B Explanation: %x/%lx prints values from the stack, enabling an attacker to read memory addresses and potentially leak sensitive data.
Question 18. What is the primary goal of “privilege escalation” in the context of exploit development? A) To obtain higher user or system privileges than initially granted B) To hide the exploit from antivirus software C) To increase network bandwidth for data exfiltration D) To bypass firewall rules Answer: A Explanation: After initial foothold, attackers seek to gain administrative or SYSTEM privileges to broaden control over the target.
Question 19. Which Windows security feature restricts the loading of unsigned drivers, thereby impeding kernel-mode exploitation? A) Driver Signature Enforcement (DSE) B) BitLocker C) Windows Defender SmartScreen
Explanation: JIT-spray abuses Just-In-Time compilation engines (e.g., in browsers) to create executable memory pages filled with attacker-controlled code, bypassing DEP.
Question 22. What does the “ROP chain” term refer to in exploit development? A) A series of network packets used for denial-of-service attacks B) A linked list of gadgets executed sequentially to perform arbitrary operations C) A chain of encrypted messages sent over a covert channel D) A set of malicious DLLs loaded by the target process Answer: B Explanation: A ROP chain is a sequence of return-oriented gadgets that collectively achieve the attacker’s intended computation without injecting new code.
Question 23. Which method can be used to discover gadgets in a binary for building a ROP chain? A) Using the “objdump -d” command and manually scanning for “ret” instructions B) Running the binary in a sandbox and observing network traffic C) Performing a DNS query to a malicious server D) Using a password cracking tool like John the Ripper Answer: A Explanation: Disassembling the binary and searching for instruction sequences ending in “ret” is a standard approach for gadget discovery.
Question 24. In Linux, which system call is commonly abused to perform a “write-what-where” primitive after gaining kernel code execution? A) mmap B) ptrace C) ioctl with a vulnerable driver D) fork Answer: C Explanation: Vulnerable drivers often expose ioctl interfaces that allow arbitrary memory writes, enabling “write-what-where” primitives crucial for kernel exploitation.
Question 25. **What is the main purpose of “stack canaries” in modern compilers? ** A) To encrypt stack contents for confidentiality B) To detect buffer overflows by placing a known value before the return address and verifying it before returning C) To increase the size of the stack for larger applications D) To enable multi-threaded execution of stack frames Answer: B Explanation: Canaries are random values placed on the stack; any overflow that overwrites the return address will also corrupt the canary, causing the program to abort.
Question 26. Which of the following is a typical characteristic of a “heap overflow” exploit? A) Overwrites adjacent heap metadata, allowing manipulation of future allocations
Explanation: The system() function can be invoked with “/bin/sh” as an argument, providing a command shell when combined with a controlled return address.
Question 29. Which of the following best describes “code-reuse attacks” in the eCXD context? A) Injecting new assembly code into the target process B) Reusing existing executable code fragments (gadgets) within the target binary to achieve malicious goals C) Using a remote code execution vulnerability to download additional binaries D) Recompiling the target program with malicious modifications Answer: B Explanation: Code-reuse attacks avoid injecting new code, instead chaining together existing instructions to perform arbitrary actions.
Question 30. What is the primary function of the “ptrace” system call in Linux exploitation? A) To create a new process B) To allow one process to observe and control the execution of another, often used for debugging or to inject code C) To encrypt files on disk D) To manage network sockets Answer: B Explanation: ptrace enables a debugging process to read/write the memory and registers of a traced process, which can be abused for code injection.
Question 31. Which of the following is a typical indication that a binary has been compiled with “Stack Smashing Protector” (SSP) enabled? A) The presence of the “__stack_chk_fail” symbol in the binary B) A .text section larger than 10 MB C) The binary being signed with a digital certificate D) The use of static linking for all libraries Answer: A Explanation: SSP adds a canary check that calls __stack_chk_fail when the canary is corrupted; the symbol appears in the binary when SSP is active.
Question 32. **In the context of web application exploitation, which eCXD technique is used to achieve remote code execution by abusing a deserialization vulnerability? ** A) Command injection via unsanitized input B) Object injection that triggers malicious code during deserialization C) Cross-site scripting (XSS) D) SQL injection to dump the database Answer: B Explanation: Deserialization attacks involve feeding crafted serialized objects that, when deserialized, execute attacker-controlled code.
Question 33. What does the “–fno-stack-protector” compiler flag do, and why might an attacker be interested in binaries compiled with it? A) Enables stack canaries, making exploitation harder
Explanation: By placing a malicious DLL in a location that the application searches before the legitimate one, the attacker forces the process to load the malicious code.
Question 36. Which of the following best describes a “JIT spray” technique? A) Overloading the network with Just-In-Time requests B) Exploiting a Just-In-Time compiler to generate large amounts of executable memory containing attacker-controlled byte patterns C) Using a spray bottle to physically damage a server D) Injecting JavaScript into a web page to cause a denial-of-service Answer: B Explanation: JIT spray leverages JIT compilation engines (e.g., in browsers or .NET) to produce executable pages filled with predictable code sequences useful for exploitation.
Question 37. What is the effect of the “–z execstack” linker option on a Linux binary? A) It marks the stack as non-executable, enforcing DEP B) It marks the stack as executable, allowing shellcode execution on the stack C) It disables address randomization for the binary D) It enables stack canaries automatically Answer: B Explanation: –z execstack tells the linker to set the PT_GNU_STACK flag to executable, permitting code execution on the stack.
Question 38. In the eCXD exam, which technique is used to gain code execution on a system that enforces both DEP and ASLR, but allows JIT compilation? A) Classic buffer overflow with shellcode injection B) Return-to-libc with a static address C) JIT spray combined with a ROP chain that disables DEP D) JIT spray to create executable memory, then jump to shellcode placed there Answer: D Explanation: JIT spray creates a large region of executable memory containing attacker-controlled bytes, bypassing DEP, while ASLR is mitigated because the JIT region’s address can be inferred or leaked.
Question 39. Which of the following is a common way to leak a heap address in a Windows application? A) Using a format string vulnerability to print a pointer from the heap B) Overwriting the MBR of the disk C) Modifying the system time via NTP D) Changing the DNS settings to a malicious server Answer: A Explanation: Format string exploits can read arbitrary memory locations, including heap pointers, providing the address needed to defeat ASLR.
Question 40. **What is the purpose of the “ret2plt” technique in Linux exploitation? ** A) To call functions in the Procedure Linkage Table (PLT) using a known address, bypassing ASLR for those entries
D) Cross-site scripting on the service’s web UI Answer: B Explanation: Many Windows services load auxiliary DLLs from their working directory; placing a malicious DLL there can cause the service to load and execute attacker code.
Question 43. What is the main advantage of using “one-gadget” ROP chains over multi-gadget chains? A) Simpler to construct because a single gadget sets up registers and calls execve("/bin/sh") directly B) Requires no knowledge of the target binary’s memory layout C) Works on both Windows and Linux without modification D) Automatically disables all security mitigations Answer: A Explanation: One-gadget exploits locate a single instruction sequence that already sets up the necessary registers for execve, reducing the complexity of the chain.
Question 44. Which of the following is a typical step in “kernel exploitation” after achieving a “write-what-where” primitive? A) Overwriting the system’s bootloader B) Modifying the credentials of the current process in the kernel’s task_struct to gain root privileges C) Deleting all log files on the system D) Changing the BIOS password via software Answer: B
Explanation: By overwriting fields in the task_struct (e.g., uid, gid), an attacker can elevate the current process to root/system without further code execution.
Question 45. In the eCXD curriculum, what does the acronym “CVE” stand for, and why is it important for exploit developers? A) Common Vulnerability Enumeration – it provides a unique identifier for publicly known security flaws, facilitating research and exploit development B) Critical Virtual Environment – a sandbox for testing exploits C) Code Validation Engine – a compiler feature D) Certificate Verification Endpoint – used for TLS Answer: A Explanation: CVE IDs standardize the naming of vulnerabilities, allowing exploit developers to reference and locate details about specific flaws.
Question 46. **Which of the following best describes the “shellshock” vulnerability? ** A) A buffer overflow in the Windows kernel B) An issue in Bash where specially crafted environment variables allow arbitrary command execution C) A cross-site scripting flaw in a popular CMS D) A hardware bug in Intel CPUs Answer: B Explanation: Shellshock (CVE- 2014 - 6271) allows attackers to inject commands via environment variables processed by Bash, leading to remote code execution.