










































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 Windows subsystem provides the bridge between user-mode code and the kernel for system calls? A) Win32 API B) Native API C) COM Runtime D) .NET CLR Answer: B Explanation: The Native API (exposed through ntdll.dll) is the low-level interface that translates user-mode calls into kernel syscalls, bypassing higher-level Win wrappers. Question 2. In the PE format, which header field determines the preferred load address of the image? A) SizeOfHeaders B) ImageBase C) SectionAlignment D) EntryPoint Answer: B Explanation: The ImageBase field in the Optional Header specifies the preferred virtual address where the loader should map the executable. Question 3. What is the primary purpose of the Process Environment Block (PEB) in Windows? A) Store thread stack limits B) Hold process-wide environment variables and module list C) Manage kernel object handles D) Track CPU scheduling priority Answer: B Explanation: The PEB contains information such as environment strings, loaded module list, and process parameters, accessible to user-mode code.
Question 4. Which calling convention cleans the stack by the callee on x86? A) __cdecl B) __stdcall C) __fastcall D) __vectorcall Answer: B Explanation: In __stdcall, the called function removes the arguments from the stack before returning. Question 5. When creating a minimal C-less executable, which entry point name is typically used in the linker command? A) mainCRTStartup B) WinMainCRTStartup C) _start D) DllMain Answer: C Explanation: Using a custom entry point like _start allows omission of the C runtime library, reducing binary size. Question 6. Which Windows object type is used to share a file handle across processes without duplication? A) Section object B) Event object C) Mutex object D) File object Answer: A Explanation: Section objects (memory-mapped files) can be opened in one process and shared via handle inheritance or duplication. Question 7. Which tool is best suited for performing entropy analysis on a PE file to locate packed sections?
B) Debugger attachment on process start C) Elevated token assignment D) Disabling DEP for the process Answer: B Explanation: The “Debugger” subkey under Image File Execution Options forces Windows to launch a debugger whenever the target executable starts. Question 11. Which of the following is a characteristic of process hollowing? A) Directly injecting shellcode into a remote thread B) Creating a new process in a suspended state, replacing its memory, then resuming C) Using NtCreateThreadEx to execute code in another process D) Overwriting the PEB of a running process Answer: B Explanation: Process hollowing involves creating a legitimate process, unmapping its sections, writing malicious code, and then resuming execution. Question 12. When analyzing a packed binary, which API is most likely to be used to locate the Original Entry Point (OEP)? A) GetModuleFileNameA B) VirtualQueryEx C) GetProcAddress D) NtQueryInformationProcess Answer: D Explanation: NtQueryInformationProcess can retrieve the PEB and other structures that help locate the OEP after the unpacker has transferred control. Question 13. Which Windows service is frequently targeted for persistence via the “ImagePath” registry value? A) Wuauserv B) LanmanServer
C) Sysmon D) Svchost (via custom service) Answer: D Explanation: Creating a new service entry under HKLM\SYSTEM\CurrentControlSet Services with an ImagePath pointing to malicious code is a common persistence technique. Question 14. In the PE Import Address Table (IAT), what is the purpose of the “thunk” data? A) To store the actual function bytes B) To hold the address of the imported function after binding C) To encrypt the import names D) To indicate section permissions Answer: B Explanation: Thunks are placeholders that the loader overwrites with the real addresses of imported functions at load time. Question 15. Which instruction sequence typically indicates a XOR-based string decryption loop in malware? A) mov eax, [ebx]; xor eax, 0xFFFFFFFF; mov [ebx], eax B) xor edx, edx; loop: xor byte ptr [esi+ecx], dl; inc ecx; cmp ecx, length; jne loop C) add eax, 0x41; mov [eax], ebx D) push ebp; mov ebp, esp; call GetProcAddress Answer: B Explanation: XOR-ing each byte with a key (often stored in a register) in a loop is a classic method for decrypting strings at runtime. Question 16. Which Windows native system call is used to create a new process object without invoking the Win32 CreateProcess API? A) NtCreateProcessEx B) NtOpenProcess
D) ImportTableSize Answer: A Explanation: The NumberOfRvaAndSizes field in the Optional Header tells how many data directory entries follow. Question 20. Which Windows API is commonly hooked by endpoint protection products to monitor file creation? A) NtCreateFile B) CreateProcessW C) RegSetValueExA D) SetThreadContext Answer: A Explanation: NtCreateFile is a low-level native call used to open/create files, making it an attractive hook point for security products. **Question 21. Which of the following best describes “export forwarding” in a DLL? ** A) Redirecting an exported function to another DLL’s implementation B) Encrypting exported symbols to hide them from analysis C) Using delay-load to defer resolution of imports D) Overloading the export table with duplicate entries Answer: A Explanation: Export forwarding allows a DLL to expose a function name that actually resolves to an implementation in a different DLL. Question 22. What is the primary advantage of using a “section-only” PE (no resources, no imports) for stealth? A) Faster loading time B) Reduced detection by AV signatures that scan for known imports C) Compatibility with older Windows versions D) Enables automatic code signing
Answer: B Explanation: Removing imports and resources reduces recognizable patterns, making signature-based detection harder. Question 23. In the context of Windows memory management, what does “copy-on-write” achieve? A) Guarantees that two processes share the same physical page permanently B) Defers duplication of pages until a write occurs, saving memory C) Encrypts pages before they are written to disk D) Forces immediate duplication of all pages on fork Answer: B Explanation: Copy-on-write allows multiple processes to map the same physical page read-only; when a process writes, the OS creates a private copy. Question 24. Which tool can dynamically rebuild a runtime-generated IAT for a packed binary? A) PEview B) LordPE C) Import Reconstructor (ImpRec) D) Resource Hacker Answer: C Explanation: Import Reconstructor (ImpRec) analyzes memory dumps to rebuild missing IAT entries after unpacking. Question 25. Which Windows registry hive stores per-user Run keys for persistence? A) HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run B) HKEY_USERS.DEFAULT\Software\Microsoft\Windows\CurrentVersion\Run C) HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run D) HKEY_CLASSES_ROOT\Software\Microsoft\Windows\CurrentVersion\Run Answer: C
Explanation: DEP marks pages as non-executable, preventing classic buffer-overflow shellcode from running. Question 29. In a 64-bit process, which register holds the first integer argument passed to a function according to the Windows x64 calling convention? A) RCX B) RDX C) R D) R Answer: A Explanation: The first four integer or pointer arguments are passed in RCX, RDX, R8, and R9 respectively. Question 30. Which of the following is a typical sign of a “reflective DLL injection” technique? A) Use of LoadLibraryA in the target process B) Manual mapping of the DLL into memory and executing its DllMain without using the loader C) Creation of a remote thread that calls InitCommonControlsEx D) Setting the “AppInit_DLLs” registry value Answer: B Explanation: Reflective injection loads a DLL from memory, resolves imports manually, and calls DllMain, bypassing the standard loader. Question 31. Which Windows API is used to retrieve the address of a function exported by a DLL when the DLL name is known only at runtime? A) GetProcAddress B) LoadLibraryEx C) GetModuleFileName D) CreateProcess Answer: A
Explanation: GetProcAddress resolves the address of an exported function given a module handle and the function name. Question 32. What is the purpose of the “Guard CF” (Control Flow Guard) mitigation in modern Windows binaries? A) Prevent buffer overflows B) Validate indirect call targets against a bitmap to stop hijacking C) Encrypt the PE header at load time D) Enforce ASLR for all modules Answer: B Explanation: Control Flow Guard checks that indirect call/jump targets are legitimate entries in a bitmap generated at compile time. Question 33. Which flag in the PE Optional Header indicates that the image is a DLL? A) IMAGE_DLLCHARACTERISTICS_DYNAMIC_BASE B) IMAGE_FILE_DLL C) IMAGE_SUBSYSTEM_WINDOWS_GUI D) IMAGE_SCN_MEM_EXECUTE Answer: B Explanation: The IMAGE_FILE_DLL flag in the File Header marks the PE as a Dynamic Link Library. Question 34. Which of the following is a legitimate reason for malware to use “NtCreateSection” instead of “CreateFileMapping”? A) To bypass user-mode hook detection on the Win32 API B) To allocate executable memory without a file backing C) To obtain a handle that can be duplicated across sessions D) To request larger page sizes than the system default Answer: A
Explanation: Shellcode is designed to be injected into memory and execute without fixed addresses, using relative offsets. Question 38. In the PE file format, which section typically contains the import descriptors? A) .text B) .rdata C) .data D) .idata Answer: D Explanation: The .idata section stores the Import Directory Table and related structures. Question 39. Which Windows event log source is commonly abused to hide malicious activity via “event log injection”? A) Microsoft-Windows-Security-Audit B) Microsoft-Windows-Application-Experience C) Microsoft-Windows-PowerShell D) Microsoft-Windows-System Answer: C Explanation: PowerShell logs can be forged to embed malicious commands, making detection harder. Question 40. What does the “NtSetInformationThread” system call allow a process to modify? A) Thread priority only B) Thread token, hide from debugger, or set thread name C) Memory protection of the thread stack D) CPU affinity of the process Answer: B
Explanation: NtSetInformationThread can set various thread-level attributes, such as the thread’s token or the ThreadHideFromDebugger flag. Question 41. Which of the following PE sections is most likely to be marked as executable and readable but not writable? A) .rsrc B. .data C) .text D) .bss Answer: C Explanation: The .text (code) section usually has PAGE_EXECUTE_READ protection. Question 42. Which Windows API is used to create a named mutex that can be used for inter-process synchronization? A) CreateEvent B) CreateMutexA C) OpenFileMapping D) InitializeCriticalSection Answer: B Explanation: CreateMutexA (or CreateMutexW) creates a mutex object that can be named and shared across processes. Question 43. In x86-64, which instruction is used to align the stack pointer to a 16 - byte boundary before a call to a Windows API? A) and rsp, 0xFFFFFFFFFFFFFFF B. sub rsp, 0x C. lea rsp, [rsp+0x10] D. push rbp Answer: A Explanation: Windows x64 requires the stack to be 16-byte aligned at the point of a call; masking with 0xFFFFFFFFFFFFFFF0 aligns it.
Question 47. In the context of WMI persistence, which class is commonly used to register an event consumer that runs a malicious script? A) __EventFilter B) __InstanceCreationEvent C) __EventConsumer D. All of the above (filter + consumer + binding) Answer: D Explanation: Persistence via WMI typically involves creating an __EventFilter, an __EventConsumer (e.g., CommandLineEventConsumer), and a __FilterToConsumerBinding. Question 48. Which instruction sequence is most likely to be part of a “stack pivot” used in exploit development? A) mov esp, eax; ret B) push ebp; mov ebp, esp; sub esp, 0x C) lea esp, [ebx+0x200] D. xor esp, esp; call eax Answer: A Explanation: Moving a controlled register value into ESP (e.g., “mov esp, eax”) redirects the stack to attacker-controlled memory. Question 49. Which Windows API can be used to enumerate all loaded drivers in the kernel? A) EnumDeviceDrivers B) GetLogicalDrives C) QueryDosDevice D) GetSystemInfo Answer: A Explanation: EnumDeviceDrivers returns an array of base addresses for all loaded kernel drivers.
Question 50. What does the “DllMain” function receive as its third parameter when the DLL is loaded via LoadLibrary? A) Thread ID of the creating thread B) Reserved, always NULL C) Pointer to a LOAD_DLL_EX_INFO structure (for delayed loading) D) The reason for the call (DLL_PROCESS_ATTACH, etc.) Answer: B Explanation: When a DLL is loaded normally, the third parameter to DllMain is NULL; it is only non-NULL for delayed loading. Question 51. Which of the following is an effect of enabling “Force ASLR” on a Windows executable? A) The loader will randomize the base address even if the image lacks the DYNAMIC _BASE flag B) The binary will be signed automatically C) The PE header will be encrypted on disk D) The process will run under a low-integrity level Answer: A Explanation: “Force ASLR” (via the /DYNAMICBASE linker option or system policy) forces address space layout randomization regardless of the flag. Question 52. Which Windows registry key is used to configure AppInit_DLLs that are loaded into every GUI process? A) HKLM\Software\Microsoft\Windows NT\CurrentVersion\Windows\AppInit_DLLs B) HKCU\Software\Microsoft\Windows\CurrentVersion\Run C) HKLM\System\CurrentControlSet\Services\Tcpip\Parameters D) HKLM\Software\Microsoft\Windows\CurrentVersion\Policies\System Answer: A Explanation: The AppInit_DLLs value under the Windows key lists DLLs that are injected into each GUI process.
Question 56. Which Windows API is used to retrieve the list of loaded modules for the current process without using the Toolhelp snapshot? A) EnumProcessModules B) GetModuleHandleEx C) LdrEnumerateLoadedModules (undocumented) D) LoadLibraryExW Answer: C Explanation: LdrEnumerateLoadedModules is an undocumented NTDLL function that lists modules in the current process. Question 57. In a PE file, what does the “SizeOfImage” field represent? A) The size of the PE header on disk B) The total size of the image when loaded into memory, including alignment C) The size of the .text section only D) The size of the import table Answer: B Explanation: SizeOfImage is the amount of virtual address space the loader reserves for the image, accounting for section alignment. Question 58. Which of the following is a hallmark of a “JIT-spray” technique used by script-based malware? A) Generating large amounts of executable code in memory through Just-In-Time compilation B. Using the Windows Installer service to drop payloads C. Leveraging DLL search order hijacking D. Encrypting payloads with RC Answer: A Explanation: JIT-spray abuses the JIT compiler of scripting engines (e.g., JavaScript) to produce many executable pages that can be redirected to shellcode.
Question 59. Which Windows API can be used to create a remote thread in another process without using CreateRemoteThread? A) NtCreateThreadEx B) RtlCreateUserThread C) OpenThread D) QueueUserAPC Answer: A Explanation: NtCreateThreadEx is a native system call that can spawn a thread in a remote process, often used to bypass user-mode hooks on CreateRemoteThread. Question 60. Which of the following is the correct order of steps for a typical “DLL Side-Loading” attack? A) Place malicious DLL in a directory that is searched before the legitimate one, then launch the benign executable. B) Modify the registry to point to the malicious DLL, then start the service. C) Replace the target DLL with a malicious one in the System32 folder. D) Inject the DLL via SetWindowsHookEx. Answer: A Explanation: Side-loading exploits the DLL search order by placing a malicious DLL where the application loads it before the genuine library. Question 61. Which Windows API is used by malware to programmatically disable Windows Defender real-time protection? A) SetWindowsHookEx B) WinVerifyTrust C) SetServiceStatus D) Windows Defender API via WMI (e.g., Win32_AntivirusProduct) Answer: D Explanation: Malware can use WMI classes such as Win32_AntivirusProduct to change the real-time protection state, though it often requires elevated privileges.