Docsity

TrainSec Malware Analyst Professional Level 2 Exam, Exams of Technology

Toggle sidebar
bg1
TrainSec Malware Analyst Professional Level
2 Exam
Question 1. **Which calling convention cleans the stack by the caller?**
A) stdcall
B) fastcall
C) cdecl
D) thiscall
Answer: C
Explanation: In the cdecl convention, the caller is responsible for removing arguments from the
stack after the call.
Question 2. **In x86-64 System V ABI, which register is used to pass the first integer
argument?**
A) RCX
B) RDX
C) RDI
D) RSI
Answer: C
Explanation: The first integer or pointer argument is passed in RDI according to the System V
AMD64 calling convention.
Question 3. **What does the XOR instruction commonly achieve in malware obfuscation?**
A) Zeroes a register
B) Swaps two registers
C) Performs addition modulo 256
D) Implements a reversible encryption
Answer: D
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

Partial preview of the text

Download TrainSec Malware Analyst Professional Level 2 Exam and more Exams Technology in PDF only on Docsity!

2 Exam

Question 1. Which calling convention cleans the stack by the caller? A) stdcall B) fastcall C) cdecl D) thiscall Answer: C Explanation: In the cdecl convention, the caller is responsible for removing arguments from the stack after the call. Question 2. In x86-64 System V ABI, which register is used to pass the first integer argument? A) RCX B) RDX C) RDI D) RSI Answer: C Explanation: The first integer or pointer argument is passed in RDI according to the System V AMD64 calling convention. Question 3. What does the XOR instruction commonly achieve in malware obfuscation? A) Zeroes a register B) Swaps two registers C) Performs addition modulo 256 D) Implements a reversible encryption Answer: D

2 Exam

Explanation: XOR is used to encrypt/decrypt data because applying the same XOR key twice restores the original value. Question 4. Which IDA Pro view best visualizes function call relationships? A. Hex View B. Disassembly View C. Graph View D. Text View Answer: C Explanation: Graph View displays basic blocks and their connections, making call graphs and control flow easy to follow. Question 5. When setting a hardware breakpoint in x64dbg, which debug register is used for a read/write memory access? A) DR B) DR C) DR D) DR Answer: D Explanation: DR7 configures the type (execute, read/write, write) and length of hardware breakpoints; the actual address is stored in DR0‑DR3. Question 6. Which Windows API is used to allocate executable memory in a remote process? A) VirtualAllocEx B) HeapCreate

2 Exam

A) .text section B) Import Directory Table C) Resource Directory D) TLS Directory Answer: B Explanation: The Import Directory Table contains entries that point to the names and RVAs of imported functions. Question 10. Which anti‑debugging technique checks the BeingDebugged flag in the PEB? A) IsDebuggerPresent API B) CheckRemoteDebuggerPresent C) PEB flag inspection D) Debugger breakpoints Answer: C Explanation: Directly reading the BeingDebugged byte in the Process Environment Block reveals if a debugger is attached. Question 11. A timing attack that measures the duration of a Sleep call can detect a debugger because: A) Debuggers accelerate Sleep B) Debuggers cause Sleep to return immediately C) Debuggers introduce additional latency D) Sleep is disabled under debugging Answer: C Explanation: Debuggers often add overhead, causing measured sleep intervals to be longer than expected.

2 Exam

Question 12. Which MAC address prefix is commonly associated with VirtualBox? A) 00:05: B) 08:00: C) 00:1C: D) 00:0C: Answer: B Explanation: VirtualBox virtual NICs often use the OUI 08:00:27. Question 13. What does the Windows API GetSystemInfo reveal to anti‑VM checks? A) OS version B) Processor architecture and number of processors C) Installed services D) Network adapters Answer: B Explanation: GetSystemInfo returns SYSTEM_INFO, which includes processor architecture and count, useful for detecting VM environments. Question 14. Which technique allows malware to hide its presence by modifying the Import Address Table at runtime? A) API hooking B) IAT patching C) DLL injection D) Process hollowing Answer: B

2 Exam

D) Resource Hacker Answer: A Explanation: UPX adds a small decompression routine that restores the original executable when the program starts. Question 18. The Original Entry Point (OEP) of a packed PE is typically located after: A. The Import Table B. The stub code C. The Export Table D. The Resource Section Answer: B Explanation: The stub runs first, unpacks the binary, then transfers execution to the OEP, which lies after the stub. Question 19. When manually unpacking, which Windows API can be used to dump the in‑memory image of a process? A) WriteProcessMemory B) CreateToolhelp32Snapshot C) MiniDumpWriteDump D) GetThreadContext Answer: C Explanation: MiniDumpWriteDump writes a snapshot of a process’s memory, useful for extracting the unpacked code. Question 20. Position‑Independent Code (PIC) in shellcode typically accesses data via: A) Absolute addresses

2 Exam

B) Register‑relative offsets C) Global variables D) Hard‑coded pointers Answer: B Explanation: PIC uses offsets from the instruction pointer (e.g., RIP‑relative addressing) so it can run at any memory address. Question 21. Which instruction sequence is commonly used to locate the base address of the loaded module in shellcode? A) CALL + POP B) JMP + NOP C) PUSHAD D) RETN Answer: A Explanation: CALL pushes the next RIP onto the stack; POP retrieves it, giving the current address for base‑relative calculations. Question 22. In 64‑bit shellcode, which register is conventionally used to store the pointer to the loaded library for API resolution? A) RAX B) RBX C) RCX D) RDX Answer: A Explanation: RAX is often used as a temporary register to hold the base address of a module after GetModuleHandle or similar calls.

2 Exam

Explanation: The attacker unmaps the original sections and maps a malicious PE into the suspended process before resuming it. Question 26. Which kernel‑mode technique allows a driver to hide a process from enumeration APIs? A) SSDT hooking B) Inline hooking of NtQuerySystemInformation C) Object Manager callback registration D) All of the above Answer: D Explanation: All listed methods can intercept or modify system calls to conceal processes. Question 27. The API Set Schema in Windows 10 is used to: A) Map logical DLL names to physical ones at runtime B) Store cryptographic keys C) Manage user accounts D) Provide network socket abstraction Answer: A Explanation: API Set Schema redirects calls from generic DLL names (e.g., api-ms-win-core) to the actual system DLLs. Question 28. When analyzing a packed binary, which section is most likely to contain the unpacking stub? A) .rdata B) .text C) .data

2 Exam

D) .rsrc Answer: B Explanation: The stub is executable code, therefore placed in the .text section. Question 29. Which of the following is a hallmark of a “cryptor” routine in ransomware? A) Calls to CreateFileA with .exe extension B) Use of CryptoAPI functions like CryptEncrypt C) Frequent calls to GetTickCount D) Opening network sockets to port 80 Answer: B Explanation: Ransomware uses Windows CryptoAPI (CryptEncrypt, CryptDecrypt) to perform bulk file encryption. Question 30. The Windows API GetProcAddress is often resolved dynamically at runtime to hide imports. Which technique is used to locate it without an explicit import? A) Export table parsing of kernel32.dll in memory B) Using hard‑coded addresses C) Reading the .reloc section D) Using LoadLibraryA only Answer: A Explanation: Malware walks the export directory of kernel32.dll in memory to find GetProcAddress’s address, avoiding static imports. Question 31. Which flag in the PE Optional Header indicates that the binary is a DLL? A) IMAGE_FILE_EXECUTABLE_IMAGE B) IMAGE_FILE_DLL

2 Exam

B) Executing the entire function atomically C) Ignoring memory writes D) Halting only on exceptions Answer: A Explanation: Step Over runs the current instruction and any called functions without breaking inside them. Question 35. Which of the following registers is NOT preserved across function calls in the Microsoft x64 calling convention? A) RBX B) RDI C) R D) R Answer: B Explanation: RDI is used for the first integer argument and is not callee‑saved; RBX, R12, and R13 are non‑volatile. Question 36. What is the purpose of the “PEB_LDR_DATA” structure? A) Stores loaded module list for the process B) Holds environment variables C) Contains thread stack information D) Manages security descriptors Answer: A Explanation: PEB_LDR_DATA maintains linked lists of loaded DLLs, used by loader and for anti‑analysis checks.

2 Exam

Question 37. Which instruction pair is commonly used to detect a hardware breakpoint set by a debugger? A) INT 3; NOP B) MOV DR0, EAX; MOV DR7, ECX C) RDTSC; SUB EAX, EAX D) ICEBP; POPFD Answer: D Explanation: ICEBP (opcode F1) triggers a debug exception only when a hardware breakpoint is active, allowing detection. Question 38. A malware sample uses the API Set “api-ms-win-core-synch-l1- 2 - 0.dll”. This is an example of: A) API forwarding B) API set redirection C) DLL hijacking D) COM object creation Answer: B Explanation: API sets abstract the underlying DLL; the OS redirects calls to the actual implementation DLL. Question 39. Which Windows registry key is commonly modified for persistence via Run key? A) HKLM\Software\Microsoft\Windows\CurrentVersion\Run B) HKCU\Software\Microsoft\Windows\CurrentVersion\Policies C) HKLM\System\CurrentControlSet\Services D) HKCU\Software\Microsoft\Windows\Shell\BagMRU

2 Exam

B) Hide processes from Task Manager C) Prevent the process from being terminated D) Set CPU affinity Answer: C Explanation: By setting the JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE flag, the process can survive termination attempts. Question 43. Which of the following is a common method to bypass Data Execution Prevention (DEP) in 32‑bit malware? A) Use of ROP chains B) Heap spraying C) DLL side‑loading D) Thread injection Answer: A Explanation: Return‑Oriented Programming (ROP) reuses existing executable code fragments to execute malicious payloads despite DEP. Question 44. In the context of Windows kernel drivers, the function ZwSetInformationThread can be used to: A) Hide a thread from enumeration APIs B) Change thread priority C) Terminate a thread D) Create a new thread in user mode Answer: A Explanation: By setting ThreadHideFromDebugger information class, a driver can conceal a thread from debuggers.

2 Exam

Question 45. Which tool can automatically generate a control‑flow graph from a PE file without executing it? A) x64dbg B) IDA Pro C) Process Hacker D) Procmon Answer: B Explanation: IDA Pro performs static analysis and can display the control‑flow graph of functions. Question 46. When a malware sample uses the “NtQuerySystemInformation” API with SystemProcessInformation, what is it typically trying to achieve? A) Enumerate all running processes B) Retrieve system uptime C) Query the current user name D) Get network adapter statistics Answer: A Explanation: SystemProcessInformation returns a list of PROCESS_INFORMATION structures for each active process. Question 47. Which instruction is used to align the stack pointer to a 16‑byte boundary in x86‑64 function prologues? A) SUB RSP, 0x B) AND RSP, - 0x C) LEA RSP, [RSP-0x10]

2 Exam

B) Align the stack pointer C) Trigger a breakpoint D) Call a function indirectly Answer: A Explanation: The short jump skips a fixed number of bytes, allowing the shellcode to reference embedded data that follows the jump. Question 51. Which of the following is NOT a typical symptom of a “sandbox escape” technique? A) Disabling the sandbox’s network interface B) Detecting the presence of a virtual CDROM driver C) Using named pipes to communicate with the host D) Exploiting a kernel vulnerability to gain higher privileges Answer: B Explanation: Detecting a virtual CDROM driver is a VM detection technique, not an escape method. Question 52. The Windows API “SetThreadContext” is most often used in which injection technique? A) DLL injection via LoadLibrary B) Process hollowing C) APC injection D) Reflective DLL injection Answer: C Explanation: APC injection modifies a thread’s context to point to malicious code, then queues an asynchronous procedure call.

2 Exam

Question 53. Which of the following indicates that a PE file has been altered to hide its original entry point? A) The AddressOfEntryPoint points to a stub that jumps to another address B) The SizeOfHeaders is zero C) The NumberOfRvaAndSizes is 0 D) The SectionAlignment is 0x Answer: A Explanation: A common packing technique changes the entry point to a loader stub, which then jumps to the original code after unpacking. Question 54. When analyzing ransomware, which file extension is most commonly appended after encryption? A) .locked B) .enc C) .crypt D) .encrypted Answer: C Explanation: Many ransomware families use “.crypt” to denote encrypted files. Question 55. Which Windows API can be abused to create a hidden window that receives messages without being displayed? A) CreateWindowEx with WS_EX_TOOLWINDOW | WS_EX_LAYERED B) ShowWindow with SW_HIDE C) RegisterClassEx without a window procedure D) CreateWindowEx with WS_EX_NOACTIVATE | WS_EX_TRANSPARENT