Now, you must specify the IP address of your target. This step is tricky since IP addresses
may vary. For this example, you need to access the XP virtual machine and launch a
command prompt. Type “ipconfig” and search for the machine’s IP address. Let’s assume
that the IP address of your virtual machine is 192.168.62.122.
Return to your Kali OS and enter the following:
set RHOSTS 192.168.62.122
Type “run” to begin the process. Metasploit will display all of the open ports present in
your virtual machine. If the scan didn’t show any open ports, go back to your XP OS and
turn off its firewall. Then, run the scan again. Let’s assume that the scan discovered two
open ports: 135 and 445.
Important Note: In actual practice, you won’t know the IP address of your target. That
means you need to use NMAP to find targets and their IP addresses.
3. Search for exploits.
This is one of the most important phases of the attack. You must find an exploit that works
on your chosen target. Exit the Port Scanner by typing “back”. In the main screen of
msfconsole, type “search dcom”. The “dcom” exploit is one of the best tools that can use
to hack an XP computer.
Metasploit will show you the search results. Look for the module called
“exploit/windows/dcerpc/ms03_026_dcom” and copy its name. Then, type the following:
use exploit/windows/dcerpc/ms03_026_dcom
Display the available options by typing:
show options
Indicate the IP address of your target. Here’s the code:
set RHOST 192.168.62.122
Précédent

- 66/94

Suivant