Remote Exploitation
◾
173
In this particular example, we will scan our network for all live hosts with open ports within
our local network 192.168.75.1/24 and then export the results to ncrack, where it will automati-
cally attempt to crack all the services requiring authentication.
Now, from ncrack, we will execute the following command to
brute-force all the network
services requiring authentication.
Note
: This will not work for ms-term-service due to a bug in the tool. Therefore, for rdp, you
need to try it separately by using the method I explained earlier.
Command
:
ncrack –vv –u administrator –P/pentest/passwords/wordlists/darkc0de.lst
–iX/root/Desktop/output.xml –f
ncrack will now start cracking the services that have authentication, leaving out the others. So
now you’ve seen how easy it is to combine nmap and ncrack to automate our process.
Attacking SMTP
The SMTP protocol is mostly used for sending e-mails. It was created a long time ago, and at that
time, the
focus was on adding features, not on security. In the “Information Gathering Techniques”
chapter (Chapter 3), we discussed some enumeration techniques with SMPT. We talked about the
VRFY command that could be used to check if a particular user exists or not, which later we can use to
brute-force SMTP accounts using any of our favorite tools, Hydra or Medusa. Since we have already
discussed approaches to cracking the authentication
of various protocols, we won’t discuss it here.
174
◾
Ethical Hacking and Penetration Testing Guide
Instead, we will look at another interesting attack, where we can use the target mail server to
send spoofed e-mails to any e-mail address. This can be used in social engineering attacks such as
speared phishing.
Dostları ilə paylaş: