Exploit Reliability and Targeting
Before running an exploit, use the info command to read the module description, check the Rank (how reliable the exploit is), and confirm the Targets (which OS/service versions it works against).
Setting Specific Targets
Some exploits can attack different OS versions or architectures. If the module has multiple targets, you must select the correct one using the target index.
-
View available targets: msfconsole show targets
-
Select the appropriate target (e.g., target 1 for Windows XP): msfconsole set TARGET 1
Handling Dependencies
Sometimes, an exploit requires prerequisite information or an auxiliary scan to run correctly. For instance, some Windows exploits require you to know a valid username/password pair, which would be set using the RUSERNAME and RPASSWORD options.