Client Side Exploitation
◾
199
Step 2
—Press “1” and it will display all the social engineering attack vectors and then press the
fourth option that states “Create a payload and a listener.”
Note
: It is always good practice to
update the SET before using it, which you can do by pressing
“5” on your keyboard.
Step 3
—Next, it will ask for your reverse IP, which in this case is my local IP address for my
BackTrack box. If you are attacking over the Internet, you need to do port forwarding on
your router, which we will discuss in Attack Scenario 2.
Step 4
—Next, you need to choose the appropriate payload. You can choose any one of them
based on your requirements. For the sake of simplicity, I would
be choosing the first one,
“Windows Shell Reverse_TCP”, which will send a reverse shell back to my IP, which in this
case is 192.168.75.144.
200
◾
Ethical Hacking and Penetration Testing Guide
Step 5
—Next, it will ask you what type of encoding you want. In this case, we will use
shikata_ga_nai. Notice that the SET has suggested that “backdoored executable” is the best
type of encoding.
In real-world scenarios, you need to encode them multiple times before
you get past multiple antiviruses.
Step 6
—Next, it will ask you on what port to listen for connections. In my case, I would choose
port “4444”; you can select any port you want. This might take some time, since it would
start up Metasploit in the back end, which itself takes much time to launch.
Step 7
—Now, our backdoor would be created on root directory
our/pentest/exploits/
set
named msf.exe. Now you need to convince the victim to execute it inside his system;
once he executes it, you will have a session opened.
You can
now interact with the shell, by using the following command:
sessions –i 1
Using an executable may not be the best method, so we will talk about an approach that is
more useful in real-world scenarios.
Client Side Exploitation
◾
201
PDF Hacking
PDF hacking is one of the topics on ethical hacking and penetration testing that is close to my
heart. I was totally unaware of the power of PDFs for a long time. Once I learned about them and
familiarized with them, PDF hacking became one of my favorite subjects in ethical hacking.
Lots of penetration testers are unaware of the power of PDFs and their
effectiveness in penetra-
tion tests. PDF hacking and PDF reconnaissance are most of the times ignored by penetration
testers, even those at an advanced level.
Dostları ilə paylaş: