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. Improving system performance
B. Updating device drivers
C. Organizing stored files
D. Stealing sensitive information

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

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

3 What does keylogging malware primarily record?

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

4 What is malware persistence?

Malware persistence methods Easy
A. Remaining active after a restart
B. Scanning files for errors
C. Increasing the processor speed
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. Registry Run keys
B. Recycle Bin
C. Device Manager
D. Disk Cleanup

6 How can a scheduled task provide persistence for malware?

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

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

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

8 What is virtual memory?

Virtual memory Easy
A. A removable backup medium
B. A process-specific logical address space
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 complete running application
B. A network communication channel
C. A physical processor core
D. A fixed-size block of memory

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

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

11 In which processor mode do ordinary applications normally run?

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

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

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

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

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

14 What is code injection?

Code injection techniques Easy
A. Copying files to another folder
B. Placing code inside another process
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. Packet filtering
B. Password hashing
C. Disk partitioning
D. DLL injection

16 What is process hollowing?

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

17 Why might malware inject code into a trusted process?

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

18 What is hooking in malware analysis?

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

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. File carving
B. Inline hooking
C. Port scanning
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. Credential collection
B. Network propagation
C. Process termination
D. File encryption

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. Credential dumping
C. Botnet coordination
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. Command-and-control communication
B. Local privilege enforcement
C. Static library replacement
D. Boot-sector modification

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 document macro
B. A browser extension
C. A scheduled task
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 can run before user login
B. It replaces the system firmware
C. It disables virtual memory
D. It encrypts network traffic

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 copied bytes can execute as code
B. The process enters kernel mode
C. The bytes are automatically saved to disk
D. The region becomes shared with all processes

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. Mandatory access control
B. Copy-on-write paging
C. Address Space Layout Randomization
D. Data Execution Prevention

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. Demand execution
B. Stack unwinding
C. Direct memory access
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 may contain injected code
B. It must contain the process stack
C. It indicates encrypted disk sectors
D. It proves the kernel is compromised

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 cannot allocate memory
B. Kernel mode blocks all system calls
C. Kernel mode cannot access devices
D. User mode has restricted privileges

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. Through the system-call interface
B. Through a browser callback
C. By changing its page-table entries
D. By patching the bootloader

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

User mode and kernel mode Medium
A. It can access privileged system resources
B. It automatically bypasses encryption
C. It always survives firmware replacement
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. Process hollowing
B. Remote thread injection
C. DLL search-order hijacking
D. Import table hooking

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. Service installation
B. Process hollowing
C. APC injection
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. Process replacement
B. Registry autorun
C. Remote thread injection
D. APC injection

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. Reflective DLL injection
B. Export table hooking
C. Scheduled-task execution
D. Boot-sector infection

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. SSDT hooking
C. Message hooking
D. IAT 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. Scheduled execution
D. Inline hooking

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. File encryption with delayed key exchange for impact
B. Credential collection with data minimization for covert exfiltration
C. Network propagation through browser synchronization services
D. Process discovery using browser-rendered telemetry

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. Providing resilient command and control with server authentication
B. Establishing persistence through periodically registered DNS records
C. Preventing defenders from analyzing the malware unless every generated domain and corresponding private signing key are available
D. Ensuring payload integrity during local process injection

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 registry Run value referencing the consumer
D. A service configured to host the WMI provider

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. Configure failure recovery to restart the service indefinitely before the encrypted volume has been mounted and unlocked
B. Replace LocalSystem with the interactive user
C. Add the payload directory to the system PATH
D. Change the service to delayed automatic start

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. Task Scheduler removes environment variables from executable paths
C. Logon-triggered tasks cannot run under the SYSTEM account
D. SYSTEM expands %TEMP% to a different profile directory

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 image file remains open and mapped while the process owns a private page-table hierarchy for all executable regions
B. The page retains an executable protection in the working set
C. The page has a cleared Shared bit in QueryWorkingSetEx
D. The region has a nonzero allocation base in VirtualQuery

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. Mapped data pages containing file names and import descriptors
B. Image-backed executable pages containing PE structures and relocations
C. Reserved address space followed by committed read-only pages
D. Private executable pages containing PE structures and resolved imports

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. Its entry point is converted into a remote thread start address by adding the actual allocation base to every absolute operand at runtime
B. It is remapped at its preferred image base
C. Its sections are changed to PAGE_EXECUTE_READWRITE
D. Its import address table is resolved twice

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

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. Enumeration of processes through the standard user-mode process API
B. Comparison of imported functions with the executable's static import table
C. Cross-view comparison against scheduler or handle-derived process data
D. Inspection of autorun registry keys for the process executable

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 target process must create another suspended thread
B. The target thread must enter an alertable wait
C. The payload must be backed by a MEM_IMAGE section
D. The APC must first be converted into a kernel APC and delivered while the target owns no synchronization objects

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

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

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. Converting all image pages into shared section-backed mappings
D. Registering every export with the operating system loader

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 guarantees the mapped payload is classified as MEM_IMAGE
B. It automatically resolves imports, relocations, TLS callbacks, exception tables, and loader-lock requirements for any copied PE image
C. It can populate remote memory without WriteProcessMemory
D. It prevents endpoint tools from observing executable page creation

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 cache manager permanently disables transaction rollback whenever a file has been parsed as a portable executable image
B. The section object can retain the image data independently
C. Rollback silently commits executable files referenced by sections
D. The process environment block reconstructs the deleted file on demand

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

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. Function prologues are always encrypted until first execution
B. Executable pages cannot be read while another thread runs
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. Calls from modules loaded later that request the modified export through the normal loader resolution path and retain the resulting pointer
B. Future calls that resolve the export by its ordinal value
C. Future calls that resolve the export by its documented name
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. The table exists only as a user-mode compatibility structure whose entries are copied into each process and overwritten during every context switch
C. Kernel integrity mechanisms may detect the modification and stop the system
D. System calls bypass the table whenever kernel ASLR is enabled

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