Unit 2: Dynamic Analysis and Assembly Language - Practice Quiz

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

1 What is the main purpose of dynamic malware analysis?

Dynamic analysis steps Easy
A. To observe malware while it runs
B. To rewrite the malware source code
C. To compress the malware file
D. To verify the malware license

2 Where should suspected malware normally be executed for dynamic analysis?

Dynamic analysis steps Easy
A. In a shared office computer
B. On a production web server
C. In an isolated virtual machine
D. On a personal mobile phone

3 Which malware behavior can be observed using a process-monitoring tool?

Analysing malware Easy
A. Changing the monitor brightness
B. Creating and terminating processes
C. Repairing damaged hardware
D. Improving the processor speed

4 Why is a baseline snapshot recorded before executing malware?

Analysing malware Easy
A. To convert malware into source code
B. To compare system changes afterward
C. To increase the malware file size
D. To disable all processor registers

5 What does DLL stand for in Windows?

DLL analysis Easy
A. Direct Load Language
B. Digital Link Loader
C. Dynamic Link Library
D. Data Logic Layer

6 Which Windows utility is commonly used to manually load and execute an exported DLL function?

DLL analysis Easy
A. mspaint.exe
B. calc.exe
C. notepad.exe
D. rundll32.exe

7 What is assembly language?

Introduction to assembly language basics Easy
A. A database query language
B. A document formatting language
C. A network configuration language
D. A low-level programming language

8 What is an assembly instruction mnemonic?

Introduction to assembly language basics Easy
A. A password stored in memory
B. A symbolic name for an operation
C. A physical address on a network
D. A comment added by the compiler

9 What is a processor register?

Registers Easy
A. A remote network storage service
B. A small high-speed storage location
C. A file containing program settings
D. A large permanent storage device

10 Which x86 register commonly holds the current stack pointer?

Registers Easy
A. EAX
B. EDX
C. ECX
D. ESP

11 Which assembly instruction is commonly used to copy data from a source to a destination?

Data transfer instructions Easy
A. MOV
B. CMP
C. ADD
D. JMP

12 What does the instruction PUSH EAX normally do?

Data transfer instructions Easy
A. Adds one to the value in EAX
B. Removes a value from the stack
C. Compares EAX with the stack pointer
D. Places the value of EAX on the stack

13 Which instruction adds a source operand to a destination operand?

Arithmetic operations Easy
A. CMP
B. XOR
C. ADD
D. SUB

14 If EAX contains , what value will it contain after INC EAX?

Arithmetic operations Easy
A.
B.
C.
D.

15 Which bitwise instruction is commonly used to clear selected bits with a mask?

Bitwise operations Easy
A. CALL
B. OR
C. AND
D. JMP

16 What is the result of applying XOR to a value with itself?

Bitwise operations Easy
A. The original value
B. The inverted value
C. One
D. Zero

17 Which instruction performs an unconditional branch to another location?

Branching and conditionals Easy
A. JMP
B. CMP
C. RET
D. JE

18 Which instruction is commonly used to invoke an assembly function?

Loops and functions Easy
A. NOP
B. RET
C. CALL
D. TEST

19 How are elements of a basic array usually stored in memory?

Arrays and strings Easy
A. In separate processor cores
B. In random disk partitions
C. In unrelated network packets
D. In consecutive memory locations

20 How are individual fields commonly accessed within a structure in assembly language?

Structures Easy
A. Using unrelated internet addresses
B. Using only processor flags
C. Using random instruction codes
D. Using offsets from a base address

21 Which sequence is most appropriate when dynamically analysing an unknown malware sample in a virtual machine?

Dynamic analysis steps Medium
A. Execute the sample, create a snapshot, start monitoring, and delete the logs
B. Disassemble the sample, modify its imports, execute it, and retain the infected state
C. Connect the virtual machine to the production network, disable monitoring controls, execute the sample, and manually remove any resulting files
D. Create a baseline snapshot, start monitoring, execute the sample, collect evidence, and revert

22 A malware sample exits because it cannot contact its command-and-control server. Which laboratory adjustment best supports further dynamic analysis?

Dynamic analysis steps Medium
A. Route traffic to isolated simulated network services
B. Increase the virtual machine's processor count
C. Provide unrestricted Internet access through the organisation's production gateway so every external service remains reachable
D. Rename the malware executable before each run

23 A monitored process calls VirtualAllocEx, WriteProcessMemory, and CreateRemoteThread on another process. What behaviour does this sequence most strongly indicate?

Analysing malware Medium
A. Import table reconstruction followed by normal loading of a dependency from the application directory
B. File system encryption
C. Registry-based persistence
D. Remote process injection

24 Which comparison would most directly reveal that a malware sample established persistence during execution?

Analysing malware Medium
A. Compare only the sample's file hashes
B. Compare only the process CPU usage
C. Compare only the packet capture size
D. Compare pre- and post-run autorun entries

25 A suspicious DLL exports a function named StartW. Which command is commonly used to invoke that export for controlled analysis?

DLL analysis Medium
A. regsvr32.exe sample.dll,StartW
B. cmd.exe sample.dll StartW
C. tasklist.exe sample.dll StartW
D. rundll32.exe sample.dll,StartW

26 A DLL performs extensive network communication inside DllMain and frequently deadlocks when loaded. What is the best corrective design?

DLL analysis Medium
A. Defer complex work to an exported function
B. Wait in DllMain until every worker thread has completed
C. Enumerate every loaded module and validate each header while the loader lock remains held
D. Perform all network communication before returning from DllMain

27 In Intel syntax, what does mov eax, [ebx+4] do?

Introduction to assembly language basics Medium
A. Loads a 32-bit value from memory at address EBX + 4 into EAX
B. Stores the address EBX + 4 into memory referenced by EAX
C. Loads the immediate value EBX + 4 without accessing memory
D. Adds the immediate value 4 to both EAX and EBX

28 In x86-64 mode, RAX initially contains 0xFFFFFFFFFFFFFFFF. What is its value after mov eax, 1?

Registers Medium
A. 0x00000000FFFFFFFF
B. 0x0000000000000001
C. 0xFFFFFFFF00000001
D. 0xFFFFFFFFFFFFFF01

29 What is the effect of lea eax, [ebx+ecx*4]?

Data transfer instructions Medium
A. Compute EBX + ECX * 4 and place it in EAX
B. Add the memory value at ECX * 4 to EBX
C. Load the memory value at EBX + ECX * 4 into EAX
D. Store EAX at the memory address EBX + ECX * 4

30 Given EAX = 10 and EBX = 3, what is the final value of EAX after the following instructions?

sub eax, ebx

imul eax, 2

Arithmetic operations Medium
A. 20
B. 7
C. 6
D. 14

31 An 8-bit register contains AL = 0x7F. After add al, 1, which result and flag combination is correct?

Arithmetic operations Medium
A. AL = 0x00, OF = 1, CF = 1
B. AL = 0x7E, OF = 0, CF = 0
C. AL = 0x80, OF = 0, CF = 1
D. AL = 0x80, OF = 1, CF = 0

32 Which instruction clears bits 4 through 7 of EAX while preserving all other bits?

Bitwise operations Medium
A. and eax, 0xFFFFFF0F
B. and eax, 0x000000F0
C. xor eax, 0xFFFFFF0F
D. or eax, 0x000000F0

33 After cmp eax, ebx, which jump instruction branches when EAX is greater than EBX under a signed comparison?

Branching and conditionals Medium
A. jg target
B. ja target
C. jz target
D. jb target

34 Suppose EAX = 0xFFFFFFFF and EBX = 1. What happens after cmp eax, ebx followed by ja target?

Branching and conditionals Medium
A. The jump is not taken because the zero flag is set
B. The jump is taken because EAX is larger in an unsigned comparison
C. The jump is taken because signed overflow must occur during every comparison involving 0xFFFFFFFF
D. The jump is not taken because EAX represents signed -1

35 What is the final value of EAX after this loop executes?

mov eax, 0

mov ecx, 4

L1: add eax, ecx

loop L1

Loops and functions Medium
A. 10
B. 16
C. 12
D. 20

36 Under the Windows x64 calling convention, a function modifies RBX and then calls another function. What should it do before returning to its caller?

Loops and functions Medium
A. Return the modified RBX value in the RAX register
B. Clear RBX before calling the helper function
C. Copy RBX into volatile R10 and leave it there
D. Save RBX on entry and restore it before return

37 A row-major array int a[3][5] begins at address 0x1000, and each integer occupies 4 bytes. What is the address of a[2][3]?

Arrays and strings Medium
A. 0x1034
B. 0x1038
C. 0x1040
D. 0x102C

38 With the direction flag cleared, RDI pointing to a null-terminated string, AL = 0, and a sufficient RCX, what does repne scasb do when it finds the null byte?

Arrays and strings Medium
A. RDI remains at the first character
B. RDI points directly at the null byte
C. RDI is reset to the beginning of the string after every byte is compared against the value in AL
D. RDI points one byte after the null byte

39 Assuming standard natural alignment, what is the size of the following structure?

struct Item { char tag; int count; short code; };

Structures Medium
A. 10 bytes
B. 7 bytes
C. 8 bytes
D. 12 bytes

40 An x64 instruction is mov eax, [rip+0x20]. If RIP for the next instruction is 0x1007, which memory address is read?

x64 architecture Medium
A. 0x0FE7
B. 0x1027
C. 0x1020
D. 0x1007

41 A malware sample contacts a domain, sleeps for ten minutes, and creates persistence only if both checks succeed. Which experimental design best determines whether the DNS response and elapsed time are independent activation gates?

Dynamic analysis steps Hard
A. Enable simulated DNS and bypass the sleep in one run, then inspect the resulting persistence artifacts.
B. Patch both checks permanently, execute the modified sample, and compare its behavior with static disassembly.
C. Run four reverted snapshots covering both DNS outcomes and both timer outcomes while keeping all other inputs fixed.
D. Capture one unrestricted execution with packet inspection and infer the activation sequence from network timestamps.

42 A sample creates a registry key, reads it from a child process, and deletes it before termination. A before-and-after registry comparison shows no change. Which addition most directly captures this transient behavior?

Dynamic analysis steps Hard
A. Search the executable for registry path strings and reconstruct accesses from cross-references.
B. Acquire another final-state registry image after increasing the sample's execution timeout.
C. Compare cryptographic hashes of the registry hive files before and after execution.
D. Collect continuous registry API events with timestamps, process identifiers, and call results.

43 A process starts a legitimate executable in a suspended state, calls NtUnmapViewOfSection, writes a replacement image into the target, changes the initial thread context, and resumes it. Which technique is most specifically indicated?

Analysing malware Hard
A. Process Doppelgänging
B. Reflective DLL loading
C. Thread execution hijacking
D. Process hollowing

44 A suspicious DLL exposes only export ordinal 17. The function expects two pointers and returns an integer, rather than using the callback prototype expected by rundll32.exe. What is the safest reliable way to execute the export dynamically?

DLL analysis Hard
A. Rename ordinal 17 to DllRegisterServer and invoke the DLL through regsvr32.exe.
B. Set ordinal 17 as the PE entry point and start the DLL directly as an executable image.
C. Pass #17 to rundll32.exe and append the two pointer values as command-line arguments.
D. Use an isolated harness that calls LoadLibrary, resolves ordinal 17, and invokes the correct prototype.

45 A DLL's DllMain creates a worker thread during DLL_PROCESS_ATTACH and waits for that thread to signal completion. The worker never reaches its entry routine, and the loading thread hangs. What best explains and fixes the problem?

DLL analysis Hard
A. The worker lacks shadow space; reserve 32 bytes inside DllMain before creating it.
B. Address-space layout randomization invalidates the thread entry point; disable relocation processing.
C. Control Flow Guard rejects newly created threads; mark DllMain as a valid call target.
D. The loader lock blocks thread initialization; keep DllMain minimal and initialize after loading.

46 Memory at address buf contains the bytes 78 56 34 12. On a little-endian x86-64 system, what is the final value of EAX after mov eax, dword ptr [buf] followed by bswap eax?

Introduction to assembly language basics Hard
A. 0x12345678
B. 0x56781234
C. 0x78563412
D. 0x34127856

47 Which x86-64 instruction cannot be encoded because accessing one operand requires a REX prefix while accessing the other forbids a REX prefix?

Registers Hard
A. mov ah, bl
B. mov spl, al
C. mov r8b, al
D. mov ah, spl

48 Assume RAX = 0xAAAAAAAAAAAAAAAA. What is RAX after executing mov eax, 0xFFFFFFFF in 64-bit mode?

Registers Hard
A. 0x00000000FFFFFFFF
B. 0xFFFFFFFFFFFFFFFF
C. 0xAAAAAAAAFFFFFFFF
D. 0xFFFFFFFFAAAAAAAA

49 Memory at [RDI] contains the 16-bit value 0xFF80. What is RAX after movsx eax, word ptr [rdi]?

Data transfer instructions Hard
A. 0xFFFFFFFFFFFFFF80
B. 0x00000000FFFFFF80
C. 0x000000000000FF80
D. 0xFFFFFFFF0000FF80

50 Suppose RDI = 0xFFFFFFFFFFFFFFF0 and RSI = 4. What does lea rax, [rdi+rsi*4+8] do?

Data transfer instructions Hard
A. It sets RAX to 0x8 without reading memory or modifying arithmetic flags.
B. It sets RAX to 0x8 and updates the arithmetic flags for the wrapped addition.
C. It loads eight bytes from address 0x8 and preserves the arithmetic flags.
D. It raises an overflow exception because the effective-address calculation exceeds 64 bits.

51 Before idiv rcx, the registers contain RDX = 0, RAX = 0xFFFFFFFFFFFFFFFF, and RCX = 1. What happens?

Arithmetic operations Hard
A. A divide-error exception occurs because the signed quotient cannot fit in RAX.
B. RAX becomes 0x7FFFFFFFFFFFFFFF, and RDX becomes zero.
C. RAX becomes 0xFFFFFFFFFFFFFFFF, and RDX becomes zero.
D. RAX becomes zero, and RDX becomes 0xFFFFFFFFFFFFFFFF.

52 Given RDX = 5 and RAX = 0xFFFFFFFFFFFFFFFF, what are the values after add rax, 1 followed by adc rdx, 0?

Arithmetic operations Hard
A. RDX = 6, RAX = 1
B. RDX = 5, RAX = 1
C. RDX = 6, RAX = 0
D. RDX = 5, RAX = 0

53 If EAX = 0x80000000, which flag state follows test eax, eax?

Bitwise operations Hard
A. ZF = 0, SF = 0, CF = 0, OF = 1
B. ZF = 0, SF = 1, CF = 1, OF = 0
C. ZF = 1, SF = 1, CF = 0, OF = 0
D. ZF = 0, SF = 1, CF = 0, OF = 0

54 Let AL = 0x81. After rol al, 1, what are AL, CF, and OF?

Bitwise operations Hard
A. AL = 0x03, CF = 0, OF = 1
B. AL = 0xC0, CF = 1, OF = 0
C. AL = 0x02, CF = 1, OF = 0
D. AL = 0x03, CF = 1, OF = 1

55 Assume EAX = 0xFFFFFFFF and EBX = 1. After cmp eax, ebx, how do jl and jb behave?

Branching and conditionals Hard
A. Neither jl nor jb is taken.
B. jb is taken, but jl is not taken.
C. Both jl and jb are taken.
D. jl is taken, but jb is not taken.

56 Immediately before loop target, RCX = 1 and ZF = 1. What happens when the instruction executes?

Loops and functions Hard
A. RCX becomes zero, the branch is not taken, and ZF becomes clear.
B. RCX becomes zero, the branch is not taken, and ZF remains set.
C. RCX becomes zero, the branch is taken, and ZF becomes clear.
D. RCX remains one, the branch is not taken, and ZF remains set.

57 Under the Windows x64 ABI, a function begins with $RSP \bmod 16 = 8$ and needs to call another function without local variables. Which sequence correctly supplies shadow space and call-site alignment?

Loops and functions Hard
A. sub rsp, 32; call target; add rsp, 32
B. sub rsp, 40; call target; add rsp, 40
C. sub rsp, 8; call target; add rsp, 8
D. sub rsp, 48; call target; add rsp, 48

58 A routine must copy 16 bytes from src to dst = src + 2 using rep movsb without corrupting overlapping data. Which setup implements the required backward copy?

Arrays and strings Hard
A. Set RSI = src+15, RDI = dst+15, RCX = 16, execute std; rep movsb; cld.
B. Set RSI = src+15, RDI = dst+15, RCX = 15, execute std; rep movsb; cld.
C. Set RSI = src+16, RDI = dst+16, RCX = 16, execute std; rep movsb; cld.
D. Set RSI = src, RDI = dst, RCX = 16, execute cld; rep movsb.

59 Under a typical x64 C ABI with natural alignment, consider struct S { char tag; uint32_t count; uint16_t code; void *next; };. Which layout is correct?

Structures Hard
A. count at 8, code at 12, next at 16, total size 24 bytes
B. count at 1, code at 5, next at 7, total size 15 bytes
C. count at 4, code at 8, next at 16, total size 24 bytes
D. count at 4, code at 8, next at 10, total size 18 bytes

60 At virtual address 0x1000, the six-byte instruction mov eax, dword ptr [rip+0x20] executes. From which virtual address is the four-byte value loaded?

x64 architecture Hard
A. 0x1020
B. 0x1006
C. 0x101A
D. 0x1026