Unit 4: Malware Persistence, Injection and Hooking - Practice Quiz

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

1 What is a common purpose of malware?

Malware functionalities Easy
A. Stealing sensitive information
B. Organizing stored files
C. Improving system performance
D. Updating device drivers

2 Which malware functionality allows an attacker to control an infected computer from another location?

Malware functionalities Easy
A. Disk formatting
B. File compression
C. Remote access
D. Software updating

3 What does keylogging malware primarily record?

Malware functionalities Easy
A. Battery usage
B. Keyboard input
C. Network speed
D. Screen brightness

4 What is malware persistence?

Malware persistence methods Easy
A. Increasing the processor speed
B. Remaining active after a restart
C. Scanning files for errors
D. Encrypting a network connection

5 Which Windows feature is commonly abused to launch malware automatically at user sign-in?

Malware persistence methods Easy
A. Disk Cleanup
B. Recycle Bin
C. Registry Run keys
D. Device Manager

6 How can a scheduled task provide persistence for malware?

Malware persistence methods Easy
A. By blocking all user accounts
B. By disabling the system clock
C. By launching it at a specified time
D. By deleting it after every restart

7 Which persistence method involves configuring a program to run as a background Windows component?

Malware persistence methods Easy
A. Changing a wallpaper
B. Installing a service
C. Clearing a cache
D. Creating a document

8 What is virtual memory?

Virtual memory Easy
A. A process-specific logical address space
B. A removable backup medium
C. A physical network storage device
D. A permanent processor register

9 What is a page in a virtual memory system?

Virtual memory Easy
A. A network communication channel
B. A fixed-size block of memory
C. A complete running application
D. A physical processor core

10 What does the operating system use a page table for?

Virtual memory Easy
A. Mapping domain names to IP addresses
B. Mapping virtual addresses to physical memory
C. Mapping users to file permissions
D. Mapping processes to network ports

11 In which processor mode do ordinary applications normally run?

User mode and kernel mode Easy
A. User mode
B. Kernel mode
C. Boot mode
D. Firmware mode

12 Which mode has the highest level of access to system memory and hardware?

User mode and kernel mode Easy
A. Guest mode
B. Safe mode
C. Kernel mode
D. User mode

13 What mechanism allows a user-mode program to request an operating-system service?

User mode and kernel mode Easy
A. System call
B. Page refresh
C. File rename
D. Cache flush

14 What is code injection?

Code injection techniques Easy
A. Placing code inside another process
B. Copying files to another folder
C. Compressing code into an archive
D. Converting source code to text

15 Which code injection technique loads a dynamic-link library into another process?

Code injection techniques Easy
A. Password hashing
B. Disk partitioning
C. DLL injection
D. Packet filtering

16 What is process hollowing?

Code injection techniques Easy
A. Replacing legitimate process code with other code
B. Reducing the memory assigned to a process
C. Pausing a process during an update
D. Removing temporary files from a process

17 Why might malware inject code into a trusted process?

Code injection techniques Easy
A. To repair damaged operating-system files
B. To make malicious activity less noticeable
C. To increase the monitor resolution
D. To improve the keyboard response time

18 What is hooking in malware analysis?

Hooking techniques Easy
A. Encrypting files or folders
B. Intercepting calls or events
C. Creating user accounts
D. Formatting storage devices

19 What can an API hook allow malware to do?

Hooking techniques Easy
A. Add physical memory modules
B. Monitor or alter function calls
C. Change processor architecture
D. Replace a network cable

20 Which hooking technique modifies the beginning of a function so execution jumps to different code?

Hooking techniques Easy
A. Port scanning
B. Inline hooking
C. File carving
D. Log rotation

21 A malware sample records keystrokes only when a web browser is displaying a login page. Which functionality is the malware primarily implementing?

Malware functionalities Medium
A. Process termination
B. File encryption
C. Network propagation
D. Credential collection

22 A sample encrypts documents, deletes available shadow copies, and displays a payment demand. What is its primary malware functionality?

Malware functionalities Medium
A. Advertisement injection
B. Botnet coordination
C. Credential dumping
D. Ransomware extortion

23 An infected host periodically contacts a remote server, receives commands, and sends back execution results. Which functionality best describes this behavior?

Malware functionalities Medium
A. Local privilege enforcement
B. Boot-sector modification
C. Static library replacement
D. Command-and-control communication

24 A suspicious executable is launched whenever a particular user signs in. Analysis shows that its path is stored under the user's Windows Run registry key. What type of persistence is being used?

Malware persistence methods Medium
A. Browser session persistence
B. Registry autorun persistence
C. Kernel callback persistence
D. Bootloader persistence

25 Malware must execute every day at 09:00 even when no interactive user session is active. Which persistence mechanism most directly supports this requirement?

Malware persistence methods Medium
A. A browser extension
B. A scheduled task
C. A document macro
D. A desktop shortcut

26 A malicious executable is registered to start automatically as a Windows service during system startup. Why is this useful for persistence?

Malware persistence methods Medium
A. It encrypts network traffic
B. It replaces the system firmware
C. It can run before user login
D. It disables virtual memory

27 A legitimate application loads a malicious DLL from its working directory because that directory is searched before the intended library location. Which technique is involved?

Malware persistence methods Medium
A. DLL search-order hijacking
B. Stack frame injection
C. Page-table substitution
D. Registry value reflection

28 During analysis, a process allocates a writable memory region, copies code into it, and then changes the region to executable. Why is the permission change significant?

Virtual memory Medium
A. The process enters kernel mode
B. The bytes are automatically saved to disk
C. The region becomes shared with all processes
D. The copied bytes can execute as code

29 The same DLL is loaded at different virtual addresses across two executions of a program. Which operating-system protection most likely caused this variation?

Virtual memory Medium
A. Address Space Layout Randomization
B. Copy-on-write paging
C. Data Execution Prevention
D. Mandatory access control

30 Two processes initially share a read-only mapped page. One process modifies the page and receives its own private copy. Which memory mechanism explains this behavior?

Virtual memory Medium
A. Direct memory access
B. Stack unwinding
C. Demand execution
D. Copy-on-write

31 A memory scanner finds a private region that is executable but has no corresponding executable file mapping. Why might an analyst consider it suspicious?

Virtual memory Medium
A. It must contain the process stack
B. It indicates encrypted disk sectors
C. It proves the kernel is compromised
D. It may contain injected code

32 A user-mode malware process attempts to access a hardware device directly but is blocked by the operating system. What is the main reason?

User mode and kernel mode Medium
A. User mode has restricted privileges
B. Kernel mode cannot access devices
C. User mode cannot allocate memory
D. Kernel mode blocks all system calls

33 How does a user-mode application normally request a privileged operation such as reading data from a disk?

User mode and kernel mode Medium
A. By patching the bootloader
B. Through the system-call interface
C. By changing its page-table entries
D. Through a browser callback

34 Why is a malicious kernel-mode driver generally more dangerous than ordinary user-mode malware?

User mode and kernel mode Medium
A. It always survives firmware replacement
B. It can access privileged system resources
C. It automatically bypasses encryption
D. It cannot be examined in memory

35 A process allocates memory inside another process, writes a payload there, and starts a thread at the payload's address. Which injection technique is most consistent with this sequence?

Code injection techniques Medium
A. Remote thread injection
B. DLL search-order hijacking
C. Import table hooking
D. Process hollowing

36 Malware starts a legitimate executable in a suspended state, replaces its original image with malicious code, and then resumes it. Which technique is being used?

Code injection techniques Medium
A. APC injection
B. Service installation
C. Process hollowing
D. Inline hooking

37 A payload is queued as an asynchronous procedure call for an existing thread and executes when that thread enters an alertable state. Which technique does this describe?

Code injection techniques Medium
A. Remote thread injection
B. Process replacement
C. APC injection
D. Registry autorun

38 A DLL is loaded directly from a memory buffer without being registered through the operating system's normal module-loading path. Which technique best matches this behavior?

Code injection techniques Medium
A. Boot-sector infection
B. Reflective DLL injection
C. Export table hooking
D. Scheduled-task execution

39 Malware modifies a program's Import Address Table so that calls to a file-opening API are redirected to malicious code. Which hooking technique is being used?

Hooking techniques Medium
A. Inline hooking
B. IAT hooking
C. Message hooking
D. SSDT hooking

40 An analyst discovers that the first instructions of an API function were replaced with a jump to an unknown memory region. Which technique most likely caused this modification?

Hooking techniques Medium
A. IAT hooking
B. Process hollowing
C. Inline hooking
D. Scheduled execution

41 A sample periodically captures browser form data but transmits only compact probabilistic summaries rather than raw fields. Which capability is most strongly indicated by this behavior?

Malware functionalities Hard
A. Credential collection with data minimization for covert exfiltration
B. Process discovery using browser-rendered telemetry
C. File encryption with delayed key exchange for impact
D. Network propagation through browser synchronization services

42 Malware resolves domain names generated from the current date, contacts several failed candidates, and accepts commands from the first domain that returns a correctly signed response. What is the primary purpose of combining these behaviors?

Malware functionalities Hard
A. Ensuring payload integrity during local process injection
B. Preventing defenders from analyzing the malware unless every generated domain and corresponding private signing key are available
C. Establishing persistence through periodically registered DNS records
D. Providing resilient command and control with server authentication

43 An investigator finds a permanent WMI event filter and a command-line event consumer, but the payload never executes when the filter condition becomes true. Which missing artifact most directly explains the failure?

Malware persistence methods Hard
A. A scheduled task invoking the event filter
B. A filter-to-consumer binding instance
C. A service configured to host the WMI provider
D. A registry Run value referencing the consumer

44 A Windows service has Start=2, runs as LocalSystem, and references a payload on an encrypted user-mounted volume. The service consistently fails during early boot but starts manually after logon. Which change most directly preserves service-based persistence?

Malware persistence methods Hard
A. Replace LocalSystem with the interactive user
B. Change the service to delayed automatic start
C. Add the payload directory to the system PATH
D. Configure failure recovery to restart the service indefinitely before the encrypted volume has been mounted and unlocked

45 A scheduled task is configured with a logon trigger, but its action points to %TEMP%\stage.exe and runs as SYSTEM. Why may the task fail even though the executable exists in the logged-on user's temporary directory?

Malware persistence methods Hard
A. The SYSTEM account cannot execute portable executable files from any temporary directory
B. Logon-triggered tasks cannot run under the SYSTEM account
C. SYSTEM expands %TEMP% to a different profile directory
D. Task Scheduler removes environment variables from executable paths

46 A process modifies a page from a PAGE_EXECUTE_WRITECOPY image section. VirtualQuery still reports the region as MEM_IMAGE. Which observation best determines whether that specific page became private?

Virtual memory Hard
A. The page retains an executable protection in the working set
B. The region has a nonzero allocation base in VirtualQuery
C. The page has a cleared Shared bit in QueryWorkingSetEx
D. The image file remains open and mapped while the process owns a private page-table hierarchy for all executable regions

47 A manually mapped DLL appears in executable MEM_PRIVATE pages but not in the process loader lists. Which combination most strongly distinguishes it from a normally loaded DLL?

Virtual memory Hard
A. Private executable pages containing PE structures and resolved imports
B. Image-backed executable pages containing PE structures and relocations
C. Mapped data pages containing file names and import descriptors
D. Reserved address space followed by committed read-only pages

48 A position-dependent PE image is mapped away from its preferred base, but its relocation directory was stripped. Under which condition can it still execute reliably without reconstructing relocations?

Virtual memory Hard
A. It is remapped at its preferred image base
B. Its entry point is converted into a remote thread start address by adding the actual allocation base to every absolute operand at runtime
C. Its import address table is resolved twice
D. Its sections are changed to PAGE_EXECUTE_READWRITE

49 On x64 Windows, what fundamentally enforces the privilege transition when a user-mode ntdll system-call stub executes syscall?

User mode and kernel mode Hard
A. The page-table manager marks the calling thread as temporarily trusted
B. The service control manager validates the call and transfers execution through a user-mode callback before kernel dispatch
C. The loader replaces the stub with a kernel-mode function pointer
D. The processor changes privilege level using configured syscall state

50 A kernel rootkit unlinks a process from the operating system's normal active-process list without terminating it. Which detection strategy is most likely to reveal this direct kernel object manipulation?

User mode and kernel mode Hard
A. Comparison of imported functions with the executable's static import table
B. Enumeration of processes through the standard user-mode process API
C. Inspection of autorun registry keys for the process executable
D. Cross-view comparison against scheduler or handle-derived process data

51 Malware queues a user-mode APC containing a payload address to an existing target thread, but the payload never runs. Assuming the address and thread handle are valid, what is the most likely missing condition?

Code injection techniques Hard
A. The APC must first be converted into a kernel APC and delivered while the target owns no synchronization objects
B. The target thread must enter an alertable wait
C. The payload must be backed by a MEM_IMAGE section
D. The target process must create another suspended thread

52 Which ordering correctly describes a conventional process-hollowing workflow?

Code injection techniques Hard
A. Create suspended, resume the original entry point, overwrite the image after initialization, and then repair the discarded thread context
B. Open existing, patch imports, create section, terminate thread
C. Create suspended, replace image, fix state, resume thread
D. Create running, queue APC, unload image, suspend thread

53 A reflective DLL loader has copied all PE sections into a new allocation and resolved imports. The image works only when loaded at its preferred base. Which omitted step most directly explains this behavior?

Code injection techniques Hard
A. Applying base relocations using the actual load-address delta
B. Rebuilding the source file's certificate table and asking the loader to verify its Authenticode signature before calling the entry point
C. Registering every export with the operating system loader
D. Converting all image pages into shared section-backed mappings

54 An injector creates a section, maps one view locally and another into a target process, writes the payload through the local view, and starts execution at the remote view. What is the main injection-specific advantage of this design?

Code injection techniques Hard
A. It prevents endpoint tools from observing executable page creation
B. It can populate remote memory without WriteProcessMemory
C. It guarantees the mapped payload is classified as MEM_IMAGE
D. It automatically resolves imports, relocations, TLS callbacks, exception tables, and loader-lock requirements for any copied PE image

55 During transacted process injection, a payload image is written into a transacted file and an image section is created from it before the transaction is rolled back. Why can the mapped process image remain usable?

Code injection techniques Hard
A. The section object can retain the image data independently
B. Rollback silently commits executable files referenced by sections
C. The process environment block reconstructs the deleted file on demand
D. The cache manager permanently disables transaction rollback whenever a file has been parsed as a portable executable image

56 An analyst patches a process's import address table entry for CreateFileW, but some file opens remain unobserved. Which behavior most directly bypasses this hook?

Hooking techniques Hard
A. Resolving another API dynamically and calling its returned address
B. Calling CreateFileW repeatedly through the patched import slot
C. Loading an additional DLL that shares the process-wide import address table and therefore must inherit every patched entry automatically
D. Invoking the same imported function from a different local thread

57 When installing an x64 inline hook, why is copying a fixed number of initial bytes into a trampoline unsafe even when the jump patch fits?

Hooking techniques Hard
A. Executable pages cannot be read while another thread runs
B. Function prologues are always encrypted until first execution
C. Instructions may be split or use address-relative operands
D. Every x64 function begins with loader metadata that must be copied in full before any machine instruction can be relocated

58 A module's export address table is modified so that one exported function resolves to a hook. Which calls are least likely to be affected?

Hooking techniques Hard
A. Future calls that resolve the export by its documented name
B. Future calls that resolve the export by its ordinal value
C. Calls from modules loaded later that request the modified export through the normal loader resolution path and retain the resulting pointer
D. Calls through function pointers resolved before the modification

59 Why is direct modification of the System Service Descriptor Table generally unstable as a persistent hooking method on modern x64 Windows?

Hooking techniques Hard
A. The table is recreated after every transition from user mode
B. System calls bypass the table whenever kernel ASLR is enabled
C. The table exists only as a user-mode compatibility structure whose entries are copied into each process and overwritten during every context switch
D. Kernel integrity mechanisms may detect the modification and stop the system

60 A hook uses PAGE_GUARD to intercept execution without changing a function's first bytes. After the first interception, later calls are missed. What must the handler typically do to sustain the hook?

Hooking techniques Hard
A. Rewrite the function's import entry after every intercepted call
B. Allocate a new guarded copy of the entire module for every thread and modify the process loader lists before execution resumes
C. Convert the guarded page into a permanently non-present page
D. Re-arm the guard after handling the resulting exception