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 verify the malware license
B. To observe malware while it runs
C. To rewrite the malware source code
D. To compress the malware file

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

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

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

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

4 Why is a baseline snapshot recorded before executing malware?

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

5 What does DLL stand for in Windows?

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

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

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

7 What is assembly language?

Introduction to assembly language basics Easy
A. A document formatting language
B. A network configuration language
C. A database query 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 comment added by the compiler
C. A physical address on a network
D. A symbolic name for an operation

9 What is a processor register?

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

10 Which x86 register commonly holds the current stack pointer?

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

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. JMP
D. ADD

12 What does the instruction PUSH EAX normally do?

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

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

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

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. JMP
C. AND
D. OR

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

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

17 Which instruction performs an unconditional branch to another location?

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

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

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

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

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

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

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

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

Dynamic analysis steps Medium
A. Disassemble the sample, modify its imports, execute it, and retain the infected state
B. Connect the virtual machine to the production network, disable monitoring controls, execute the sample, and manually remove any resulting files
C. Execute the sample, create a snapshot, start monitoring, and delete the logs
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. Rename the malware executable before each run
B. Route traffic to isolated simulated network services
C. Provide unrestricted Internet access through the organisation's production gateway so every external service remains reachable
D. Increase the virtual machine's processor count

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

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

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

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

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. tasklist.exe sample.dll StartW
B. rundll32.exe sample.dll,StartW
C. regsvr32.exe sample.dll,StartW
D. cmd.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. Wait in DllMain until every worker thread has completed
B. Perform all network communication before returning from DllMain
C. Enumerate every loaded module and validate each header while the loader lock remains held
D. Defer complex work to an exported function

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

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

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

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

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

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

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. 7
B. 14
C. 20
D. 6

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

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

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

Bitwise operations Medium
A. and eax, 0xFFFFFF0F
B. or eax, 0x000000F0
C. xor eax, 0xFFFFFF0F
D. and 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. jb target
B. ja target
C. jz target
D. jg 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 taken because EAX is larger in an unsigned comparison
B. The jump is taken because signed overflow must occur during every comparison involving 0xFFFFFFFF
C. The jump is not taken because EAX represents signed -1
D. The jump is not taken because the zero flag is set

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. 20
B. 16
C. 12
D. 10

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. Save RBX on entry and restore it before return
B. Clear RBX before calling the helper function
C. Return the modified RBX value in the RAX register
D. Copy RBX into volatile R10 and leave it there

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. 0x1040
B. 0x1034
C. 0x102C
D. 0x1038

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 is reset to the beginning of the string after every byte is compared against the value in AL
B. RDI points one byte after the null byte
C. RDI points directly at the null byte
D. RDI remains at the first character

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. 8 bytes
C. 12 bytes
D. 7 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. 0x1027
B. 0x1020
C. 0x0FE7
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. Run four reverted snapshots covering both DNS outcomes and both timer outcomes while keeping all other inputs fixed.
B. Patch both checks permanently, execute the modified sample, and compare its behavior with static disassembly.
C. Enable simulated DNS and bypass the sleep in one run, then inspect the resulting persistence artifacts.
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. Collect continuous registry API events with timestamps, process identifiers, and call results.
D. Compare cryptographic hashes of the registry hive files before and after execution.

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. Thread execution hijacking
B. Process hollowing
C. Process Doppelgänging
D. Reflective DLL loading

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. Pass #17 to rundll32.exe and append the two pointer values as command-line arguments.
B. Set ordinal 17 as the PE entry point and start the DLL directly as an executable image.
C. Rename ordinal 17 to DllRegisterServer and invoke the DLL through regsvr32.exe.
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 loader lock blocks thread initialization; keep DllMain minimal and initialize after loading.
B. Address-space layout randomization invalidates the thread entry point; disable relocation processing.
C. The worker lacks shadow space; reserve 32 bytes inside DllMain before creating it.
D. Control Flow Guard rejects newly created threads; mark DllMain as a valid call target.

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. 0x34127856
B. 0x12345678
C. 0x56781234
D. 0x78563412

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, spl
B. mov spl, al
C. mov ah, bl
D. mov r8b, al

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

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

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

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

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

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

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

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

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 = 5, RAX = 0
D. RDX = 6, RAX = 0

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

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

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 = 0x03, CF = 1, OF = 1
D. AL = 0x02, CF = 1, OF = 0

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. jl is taken, but jb is not taken.
D. Both jl and jb are 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 remains set.
B. RCX remains one, the branch is not taken, and ZF remains set.
C. RCX becomes zero, the branch is not taken, and ZF becomes clear.
D. RCX becomes zero, the branch is taken, and ZF becomes clear.

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, 8; call target; add rsp, 8
C. sub rsp, 48; call target; add rsp, 48
D. sub rsp, 40; call target; add rsp, 40

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 = 15, execute std; rep movsb; cld.
B. Set RSI = src+15, RDI = dst+15, RCX = 16, 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 1, code at 5, next at 7, total size 15 bytes
B. count at 4, code at 8, next at 10, total size 18 bytes
C. count at 4, code at 8, next at 16, total size 24 bytes
D. count at 8, code at 12, next at 16, total size 24 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. 0x1026
C. 0x1006
D. 0x101A