Unit 3: Disassembly and Malware Debugging - Practice Quiz

INT251 — Malware Analysis And Cyber Defence 60 Questions
0 Correct 0 Wrong 60 Left
0/60

1 What is static code analysis in malware analysis?

Static code analysis Easy
A. Examining code without executing it
B. Restoring files from a backup
C. Running code inside a debugger
D. Monitoring live network traffic

2 Which tool converts machine-code instructions into assembly language?

Static code analysis Easy
A. Disassembler
B. Text editor
C. File compressor
D. Packet analyzer

3 Which information can commonly be found by extracting strings from a suspicious binary?

Static code analysis Easy
A. Live keyboard input
B. Active network bandwidth
C. Embedded URLs and file paths
D. Current processor temperature

4 What is the main purpose of calculating a cryptographic hash of a malware sample?

Static code analysis Easy
A. To repair the file automatically
B. To execute the file safely
C. To identify the file uniquely
D. To increase the file size

5 Which part of a Windows Portable Executable (PE) file lists external functions used by the program?

Static code analysis Easy
A. Audio stream
B. Recycle Bin
C. Import table
D. Bitmap header

6 What does a Windows API call allow a program to do?

Disassembling Windows API Easy
A. Disable all hardware interrupts
B. Request services from Windows
C. Rewrite assembly as source code
D. Replace the processor firmware

7 Which Windows API function is commonly associated with opening or creating a file?

Disassembling Windows API Easy
A. VirtualAlloc
B. RegOpenKey
C. CreateFile
D. CreateThread

8 Which Windows API function is commonly used to allocate virtual memory?

Disassembling Windows API Easy
A. DeleteFile
B. CloseHandle
C. OpenProcess
D. VirtualAlloc

9 What is the purpose of GetProcAddress in Windows?

Disassembling Windows API Easy
A. Calculate a file checksum
B. Find an exported function address
C. Create a new user account
D. Read data from a network socket

10 In disassembled code, which instruction commonly transfers control to a Windows API function?

Disassembling Windows API Easy
A. INC
B. NOP
C. CALL
D. CMP

11 What is debugging?

General concepts of debugging Easy
A. Observing and controlling program execution
B. Deleting and restoring system accounts
C. Encrypting and archiving program files
D. Designing and installing network cables

12 What is a breakpoint?

General concepts of debugging Easy
A. A protocol for sending email
B. A method for compressing binaries
C. A location where execution pauses
D. A file that stores source code

13 What does single-stepping allow an analyst to do?

General concepts of debugging Easy
A. Scan every file for signatures
B. Run several programs in parallel
C. Download multiple updates together
D. Execute one instruction at a time

14 Which processor component stores temporary values such as addresses and calculation results?

General concepts of debugging Easy
A. Packets
B. Directories
C. Registers
D. Sectors

15 What does the instruction pointer normally identify?

General concepts of debugging Easy
A. The last file opened by Windows
B. The current network gateway
C. The size of the system disk
D. The next instruction to execute

16 Why should a suspicious binary be debugged in an isolated environment?

Debugging binaries Easy
A. To increase the processor clock rate
B. To improve the monitor resolution
C. To simplify the binary's license
D. To reduce risk to other systems

17 What does stepping into a function do in a debugger?

Debugging binaries Easy
A. Renames the called function
B. Pauses inside the called function
C. Deletes the called function
D. Skips the entire called function

18 What does stepping over a function call usually do?

Debugging binaries Easy
A. Executes the function without entering it
B. Displays only the function's source file
C. Stops the function from ever running
D. Copies the function into another process

19 Which debugger feature can pause execution when a selected memory location is accessed?

Debugging binaries Easy
A. File signature
B. Import table
C. Checksum
D. Watchpoint

20 What is the purpose of viewing the call stack while debugging a binary?

Debugging binaries Easy
A. To display the installed device drivers
B. To measure the current network speed
C. To inspect the active function calls
D. To list the available disk partitions

21 A suspicious Windows executable has very high entropy in its .text section and contains only a few readable strings. What is the most likely explanation?

Static code analysis Medium
A. The executable contains only debug symbols
B. The executable is packed or encrypted
C. The executable uses position-independent code
D. The executable was compiled without optimization

22 During static analysis, a function repeatedly references the strings cmd.exe, /c, and CreateProcessW. What behavior should an analyst investigate first?

Static code analysis Medium
A. Credential collection through browser databases
B. Command execution through a child process
C. Network communication through a socket
D. Registry persistence through a service

23 A disassembler incorrectly treats embedded data as executable instructions. Which action is most useful for correcting the analysis?

Static code analysis Medium
A. Redefine the region as data and reanalyze references
B. Disable all cross-reference generation in the disassembler
C. Convert the entire section into writable executable memory before continuing the static examination
D. Rename every function using its virtual address

24 Why is examining cross-references to a suspicious string such as Software\\Microsoft\\Windows\\CurrentVersion\\Run useful?

Static code analysis Medium
A. It calculates the executable's cryptographic file hash
B. It identifies code that may configure registry persistence
C. It determines the compiler's exact optimization level
D. It reveals every process that has loaded the executable

25 An executable imports VirtualAlloc, WriteProcessMemory, and CreateRemoteThread. Which capability is most strongly suggested by this combination?

Static code analysis Medium
A. Injecting code into another process
B. Creating a scheduled task for persistence
C. Capturing packets from a network adapter
D. Encrypting files with a symmetric cipher

26 In 32-bit x86 code using stdcall, several values are pushed immediately before a Windows API call. In what order are the function arguments normally pushed?

Disassembling Windows API Medium
A. In register order followed by stack order
B. In alphabetical order by parameter name
C. From leftmost argument to rightmost argument
D. From rightmost argument to leftmost argument

27 A binary imports only LoadLibraryA and GetProcAddress, but later performs network operations. Why might the network APIs be absent from its import table?

Disassembling Windows API Medium
A. The APIs are automatically inserted by the debugger
B. The APIs execute entirely inside the processor firmware
C. The loader converts network instructions into API calls and records them only after the process terminates
D. The APIs are resolved dynamically at runtime

28 A call to CreateFileW returns 0xFFFFFFFF in the EAX register on a 32-bit system. How should this result usually be interpreted?

Disassembling Windows API Medium
A. The file operation failed with INVALID_HANDLE_VALUE
B. The function returned a valid kernel object address
C. The file was created with maximum access rights
D. The call succeeded but produced an empty file

29 While analyzing a call to RegSetValueExW, which argument is most important for determining the actual data written to the registry value?

Disassembling Windows API Medium
A. The pointer passed through the lpData parameter
B. The handle passed through the hKey parameter
C. The return address stored by the call instruction
D. The reserved value passed through the third parameter

30 A disassembly shows calls to InternetOpenW, InternetConnectW, and HttpOpenRequestW. What behavior is most directly indicated?

Disassembling Windows API Medium
A. Preparing an HTTP request to a remote server
B. Installing a kernel driver for packet filtering
C. Opening a named pipe for local communication
D. Enumerating local user account information

31 Why might an analyst prefer a hardware execution breakpoint over a software breakpoint when examining self-checking malware?

General concepts of debugging Medium
A. It allows unlimited breakpoints without processor support
B. It permanently disables all anti-debugging checks
C. It avoids replacing the target instruction with INT 3
D. It automatically reconstructs imports and repairs the executable's PE headers after every breakpoint event

32 What is the practical difference between stepping into and stepping over a CALL instruction?

General concepts of debugging Medium
A. Stepping into skips the function; stepping over enters the function
B. Stepping into changes the stack; stepping over preserves every register
C. Stepping into ends the process; stepping over restarts the process
D. Stepping into enters the function; stepping over pauses after it returns

33 A breakpoint set at a hard-coded virtual address works during one run but fails after restarting the program. Which Windows security feature most likely caused this?

General concepts of debugging Medium
A. Structured Exception Handling
B. User Account Control
C. Data Execution Prevention
D. Address Space Layout Randomization

34 A debugger reports a first-chance access violation, but the program continues normally after the exception is passed to it. What does this indicate?

General concepts of debugging Medium
A. The program handled the exception internally
B. The operating system silently removed the failing instruction
C. The debugger repaired the invalid memory automatically
D. The executable was rebuilt with valid relocation entries

35 Which breakpoint is most appropriate when an analyst wants execution to stop only when a buffer at a particular address is modified?

General concepts of debugging Medium
A. A conditional breakpoint on every imported API
B. A temporary breakpoint on the process exit routine
C. A hardware write breakpoint on the buffer
D. A software execution breakpoint at program entry

36 A packed binary decrypts its original code and then jumps into a newly readable code region. What should the analyst do near this transition?

Debugging binaries Medium
A. Replace the jump with a return instruction and save the file
B. Break at the jump and inspect the possible original entry point
C. Clear every breakpoint and disable memory map monitoring for the remainder of the analysis
D. Terminate the process before the unpacked code executes

37 After dumping an unpacked process from memory, the resulting executable does not run because its imported functions cannot be resolved. What is the likely next step?

Debugging binaries Medium
A. Reconstruct the import address table
B. Replace all API calls with no-operation instructions
C. Delete the executable's relocation section
D. Convert every writable section into a resource section

38 A sample exits when IsDebuggerPresent returns a nonzero value. Which debugging action best allows analysis to continue while preserving the surrounding control flow?

Debugging binaries Medium
A. Modify the return value to zero before the comparison
B. Remove the executable's entire import directory
C. Change all conditional branches in the program into unconditional jumps
D. Force the process to restart after every API call

39 A malware sample creates a child process and then terminates its original process. How should the analyst continue debugging the active behavior?

Debugging binaries Medium
A. Dump the parent's static resources and assume they contain all code executed by the child
B. Disable process creation so the parent remains permanently active
C. Configure the debugger to follow or attach to the child process
D. Set a breakpoint only on the terminated parent's entry point

40 A loop executes thousands of times, but the analyst only wants to stop when register ECX becomes 0x20. What is the most efficient debugging technique?

Debugging binaries Medium
A. Set a conditional breakpoint based on ECX
B. Single-step through every loop iteration
C. Set breakpoints on every instruction in the containing module
D. Patch the loop condition into an unconditional branch

41 A PE32+ sample is loaded at 0x00007FF700000000. A disassembler reports an instruction at RVA 0x2A3C0 containing call qword ptr [rip+0x195A]. The instruction is 6 bytes long. Which virtual address contains the 8-byte call target pointer?

Static code analysis Hard
A. 0x00007FF7000195A0
B. 0x00007FF700044D20
C. 0x00007FF70002BD20
D. 0x00007FF70002BD1A

42 A recursive-traversal disassembler misses a region that later executes, while a linear-sweep disassembler decodes many nonsensical instructions in the same region. Which code pattern best explains both observations?

Static code analysis Hard
A. A jump table reached through a register-indirect branch
B. A sequence of ordinary functions separated by compiler alignment bytes and complete unwind metadata
C. A direct call followed by a standard function epilogue
D. An imported function referenced through the PE import table

43 In a 32-bit malware function, the sequence call next; next: pop esi; sub esi, 0x1050 is observed. The call instruction begins at RVA 0x2050 and is 5 bytes long. What value does ESI hold after the sub, assuming normal call semantics?

Static code analysis Hard
A. The module image base
B. The current stack pointer
C. The preferred entry-point VA
D. The import-directory RVA

44 Static inspection shows a small import table, a writable and executable section with high entropy, and an entry point that repeatedly writes bytes into that section before branching there. Which conclusion is most defensible?

Static code analysis Hard
A. The missing imports prove the binary invokes every service through direct system calls
B. The high-entropy section must contain an encrypted configuration only
C. The sample likely reconstructs or decrypts executable code at runtime
D. The sample is certainly compressed with a specific commercial packer

45 A PE file's declared entry point appears benign, but malicious initialization occurs before it. Which static structure should be examined first for code that the Windows loader may execute before the entry point?

Static code analysis Hard
A. The debug directory
B. The base relocation table
C. The TLS callback array
D. The bound import table

46 Immediately before a Windows x64 call, the disassembly sets RCX to a process handle, RDX to a base address, R8 to a buffer, and R9 to a size. It stores a pointer at [rsp+0x20]. If the target is WriteProcessMemory, what does [rsp+0x20] represent?

Disassembling Windows API Hard
A. A mandatory pointer to the caller's saved nonvolatile registers and exception-unwind metadata
B. The first slot of the callee's local-variable area
C. The return address for WriteProcessMemory
D. The fifth argument, lpNumberOfBytesWritten

47 A 32-bit call site pushes five arguments, executes call eax, and then immediately continues without adjusting ESP. Runtime inspection identifies EAX as CreateFileW. Which calling-convention inference is correct?

Disassembling Windows API Hard
A. The absence of cleanup proves the function never returns normally
B. The caller omitted required cleanup for a normal cdecl API
C. The callee normally removes its arguments using stdcall semantics
D. The arguments were passed using the x64 register convention

48 A sample walks loaded modules, parses export directories, hashes each exported name, and compares the result with embedded constants before calling the matched address. What is the primary analytical consequence?

Disassembling Windows API Hard
A. The export ordinal alone uniquely reveals each requested API across all Windows versions
B. Every resolved address necessarily points to a kernel system-call stub
C. API usage can be read directly from the normal import-name table
D. API usage must be recovered by resolving the hash algorithm and constants

49 While resolving an exported function manually, the export address-table entry points inside the export directory and contains the ASCII text KERNELBASE.CreateFileW. How should this entry be interpreted?

Disassembling Windows API Hard
A. It is a malformed relocation record that should be added to the current module base
B. It is an API-set contract that must always be converted into a system-call number
C. It is a forwarded export that must be resolved in KERNELBASE
D. It is executable code whose bytes happen to form an ASCII string

50 Disassembly shows calls to VirtualAllocEx, WriteProcessMemory, and CreateRemoteThread, all using the same process handle. Which interpretation best synthesizes the API sequence?

Disassembling Windows API Hard
A. It is consistent with allocating, writing, and executing code in another process
B. It only changes the target process's access token before resuming an existing suspended thread
C. It exclusively implements local heap management for the current process
D. It proves that a reflective DLL was injected without any intermediate loader code

51 A debugger implements a software breakpoint by replacing the first byte of an instruction with 0xCC. After the breakpoint exception is reported on x86, what sequence is required to execute the original instruction exactly once and then restore the breakpoint?

General concepts of debugging Hard
A. Decrement ESP, replace the return address, clear all debug registers, and continue until the function returns
B. Increment EIP, retain 0xCC, clear the trap flag, then resume execution
C. Restore the byte, decrement EIP, set the trap flag, resume, then reinsert 0xCC
D. Restore the byte, leave EIP unchanged, set a hardware write breakpoint, then resume

52 A debugger receives a first-chance access-violation notification from a program that uses structured exception handling as normal control flow. What is the correct default interpretation?

General concepts of debugging Hard
A. The process has necessarily crashed and must be terminated immediately
B. The faulting instruction must be patched because first-chance exceptions cannot be intentional
C. The exception has already bypassed every user-mode and kernel-mode handler
D. The debugger may pass it to the program's exception handlers before treating it as unhandled

53 You need to detect writes to a four-byte variable without modifying code or making its entire memory page read-only. Which mechanism is most appropriate on x86/x64?

General concepts of debugging Hard
A. A data hardware breakpoint configured through debug registers
B. A guard page applied only to the variable's four-byte storage range
C. A software execution breakpoint placed at the variable's address
D. A trap flag left enabled continuously on the process's initial thread and inherited automatically by all future threads

54 A multithreaded sample intermittently bypasses a breakpoint because another thread restores the patched byte while the debugger is single-stepping the first thread. Which debugger strategy most directly prevents this race?

General concepts of debugging Hard
A. Disable ASLR so all threads execute at fixed virtual addresses
B. Clear the process's PE checksum before resuming the faulting thread
C. Suspend the other threads during breakpoint restoration and single-step completion
D. Convert the software breakpoint into a conditional source-level breakpoint evaluated only after every thread reaches a synchronization barrier

55 Single-stepping changes a malware sample's behavior because it compares timestamps around a short code region. Which response provides the strongest evidence that the timing check is anti-debugging rather than legitimate timeout logic?

General concepts of debugging Hard
A. Set additional software breakpoints throughout the timed region so that every instruction and API transition can be inspected in greater detail
B. Rename the debugger executable and observe whether the sample's window title changes
C. Disable network access and infer that any subsequent delay is caused by debugger detection
D. Patch or normalize the timing source and observe whether the hidden path becomes stable

56 A breakpoint was recorded at 0x0042F130 when a module loaded at 0x00400000. On the next run, ASLR loads the module at 0x6A100000. At what address should the breakpoint be placed?

Debugging binaries Hard
A. 0x0042F130
B. 0x6A52F130
C. 0x6A0D0ED0
D. 0x6A12F130

57 A packed process has decrypted its original code, transferred control to a stable original entry point, and resolved APIs dynamically. To create a useful reconstructed PE, which action remains essential after dumping the process image?

Debugging binaries Hard
A. Rebuild or repair imports and align dumped sections with valid PE metadata
B. Remove all relocation entries because the dump already contains absolute addresses
C. Preserve the packer's original entry point and discard the unpacked entry-point address
D. Replace every indirect branch with a direct branch to its current runtime target

58 A debugger stops on an execute access violation at a heap address. The bytes there form valid code that the sample just decoded, but the page protection is PAGE_READWRITE. What is the most likely immediate cause?

Debugging binaries Hard
A. Control-flow guard rejected the page because it lacks an import-table entry
B. DEP or NX blocked instruction fetch from a non-executable page
C. The CPU requires all dynamically generated code to reside in the module's original .text section
D. ASLR relocated the heap allocation without applying PE base relocations

59 A 64-bit debugger attached to a WOW64 process reports transitions through both 32-bit user code and 64-bit system components. Why can register and breakpoint handling become misleading?

Debugging binaries Hard
A. All 32-bit addresses are automatically sign-extended and therefore refer to kernel memory after each API call
B. The processor disables debug registers whenever a thread enters a 64-bit system DLL
C. WOW64 converts every 32-bit instruction into a permanent 64-bit replacement in memory
D. WOW64 maintains distinct 32-bit and 64-bit execution contexts during mode transitions

60 A self-modifying routine overwrites instructions that currently contain software breakpoints, causing missed events and corrupted decoded code. Which breakpoint strategy is most robust for the rewritten region?

Debugging binaries Hard
A. Insert additional INT3 bytes before the routine begins rewriting the region
B. Mark the region permanently non-writable and ignore resulting write exceptions
C. Set breakpoints only on imported APIs because self-modifying code cannot invoke them indirectly
D. Use hardware execution breakpoints on selected addresses after the final rewrite