eJPT Exploitation with Metasploit 4 — Questions and Answers
Question 1: Which Metasploit auxiliary module is commonly used to perform a TCP port scan?
- auxiliary/scanner/portscan/syn
- auxiliary/scanner/portscan/tcp (Correct answer)
- auxiliary/recon/portscan/full
- auxiliary/discover/tcp_sweep
Correct answer: auxiliary/scanner/portscan/tcp
auxiliary/scanner/portscan/tcp performs a full TCP connect scan against specified hosts and port ranges.
Question 2: What is a 'staged' payload in Metasploit?
- A payload that runs in multiple stages on the attacker machine
- A small first-stage stager that downloads the larger payload from the attacker (Correct answer)
- A payload encoded in multiple layers
- A payload that requires manual trigger to execute
Correct answer: A small first-stage stager that downloads the larger payload from the attacker
Staged payloads use a small stager component to connect back and download the full payload (stage), reducing initial shellcode size.
Question 3: Which msfvenom encoder is commonly used to obfuscate payloads for basic AV evasion?
- x86/nop_slide
- x86/shikata_ga_nai (Correct answer)
- x86/xor_dynamic
- x86/base64_encode
Correct answer: x86/shikata_ga_nai
x86/shikata_ga_nai is a polymorphic XOR additive feedback encoder widely used to encode Metasploit payloads.
Question 4: What Meterpreter command shows information about the current user on the compromised target?
- whoami
- getuid (Correct answer)
- sysinfo
- id
Correct answer: getuid
'getuid' returns the user account that the Meterpreter session is running as on the target system.
Question 5: In Metasploit, what does RHOSTS refer to when configuring an exploit?
- The attacker's reverse host
- The target host(s) to exploit (Correct answer)
- A list of relay hosts for pivoting
- The hostname of the Metasploit RPC server
Correct answer: The target host(s) to exploit
RHOSTS specifies the remote (target) host or hosts that the exploit or auxiliary module will run against.
Question 6: Which post-exploitation Meterpreter command can be used to record keystrokes on the target?
- keylog_start
- keyscan_start (Correct answer)
- capture_keys
- keyboard_hook
Correct answer: keyscan_start
'keyscan_start' begins a keylogger on the target and 'keyscan_dump' retrieves the captured keystrokes.
Question 7: What is the function of the Metasploit module 'exploit/multi/handler'?
- Scans multiple hosts simultaneously
- Listens for incoming connections from reverse payloads (Correct answer)
- Manages multiple exploitation sessions at once
- Handles multi-stage exploit chains
Correct answer: Listens for incoming connections from reverse payloads
exploit/multi/handler is a generic listener that catches reverse shell callbacks from any payload executed on a target.
Which Metasploit auxiliary module is commonly used to perform a TCP port scan?