Metasploit Module — Introduction TryHackMe
Here you can find it Module
Metasploit: Introduction
Task 1:
Metasploit is the most widely used exploitation framework. Metasploit is a powerful tool that can support all phases of a penetration testing engagement, from information gathering to post-exploitation.
Answer: No need
Task 2:
you can access Metasploit Framework via command line
msfconsole- Auxiliary
Any supporting module, such as scanners, crawlers and fuzzers, can be found here.
- Encoders
Encoders will allow you to encode the exploit and payload in the hope that a signature-based antivirus solution may miss them.
- Evasion
While encoders will encode the payload, they should not be considered a direct attempt to evade antivirus software. On the other hand, “evasion” modules will try that, with more or less success.
- Exploits
Exploits, neatly organized by target system.
- NOPs
NOPs (No OPeration) do nothing, literally. They are represented in the Intel x86 CPU family with 0x90, following which the CPU will do nothing for one cycle. They are often used as a buffer to achieve consistent payload sizes.
- Payloads
Payloads are codes that will run on the target system.
Exploits will leverage a vulnerability on the target system, but to achieve the desired result, we will need a payload.
- Post
Post modules will be useful on the final stage of the penetration testing process listed above, post-exploitation.
Q1: Exploit
Q2: Payload
Q3: Singles
Get Mohamed Sayed (U S A N)’s stories in your inbox
Join Medium for free to get updates from this writer.
Q4: Singles
Task 3:
- lists the contents of the folder from which Metasploit was launched “ ls ”
- help command can be used on its own or for a specific command “help”
- to see commands you have typed earlier “history”
- The module to be used can also be selected with the
usecommand followed by the number at the beginning of the search result line. - you can see what options to fill with “show options”
- to see payloads you could use “show payloads”
- you can leave the context using “back”
- Further information on any module can be obtained by “info”
- “search” This command will search the Metasploit Framework database for modules relevant to the given search parameter. You can conduct searches using CVE numbers, exploit names (eternalblue, heartbleed, etc.), or target system.
Q1: search Apache
Q2: todb
Task 4:
All parameters are set using the same command syntax:set PARAMETER_NAME VALUE
- RHOSTS: “Remote host”, the IP address of the target system.
- RPORT: “Remote port”, the port on the target system the vulnerable application is running on.
- PAYLOAD: The payload you will use with the exploit.
- LHOST: “Localhost”, the attacking machine (your AttackBox or Kali Linux) IP address.
- LPORT: “Local port”, the port you will use for the reverse shell to connect back to. This is a port on your attacking machine, and you can set it to any port not used by any other application.
- SESSION: Each connection established to the target system using Metasploit will have a session ID. You will use this with post-exploitation modules that will connect to the target system using an existing connection.
you can use “unset” to clear any parameter value and “unset all” to clear all set parameters
we use “setg” to set parameter with global value applied for all modules
to run the exploit we use
run #will run the exploit
exploit #will run the exploit
exploit -z #will run the exploit and background the session as soon as it opensSome modules support the check option. This will check if the target system is vulnerable without exploiting it.
you can use the background command to background the session prompt and go back to the msfconsole prompt or “ CTRL + Z ”.
The sessions command can be used from the msfconsole prompt or any context to see the existing sessions.
To interact with any session, you can use the sessions -i command followed by the desired session number.
Q1: set LPORT 6666
Q2: setg RHOSTS 10.10.19.23
Q3: unset PAYLOAD
Q4: exploit
Task 5:
As we have seen so far, Metasploit is a powerful tool that facilitates the exploitation process. The exploitation process comprises three main steps; finding the exploit, customizing the exploit, and exploiting the vulnerable service.
Metasploit provides many modules that you can use for each step of the exploitation process. Through this room, we have seen the basic components of Metasploit and their respective use.
Q1: No need
You’ll find rest of the module in another walkthrough….
Hope you enjoyed this walkthrough — keep experimenting, stay curious, and make your learning journey with Metasploit an exciting adventure while having fun with cybersecurity! ✅








