Ali Abdulla 202102238
UNI Bahrain Polytechnic
ETHICAL HACKING
Practical Sessions
This workbook contains the lab sessions for the Ethical Hacking course at Bahrain Polytechnic. Any
written answers should be submitted on paper to your tutor. All electronic submissions should be
done via Moodle. The tutor reserves the right to change the lab questions/structure at any time.
Table of Contents
Lab session 5 3
Introduction 3
Lab 5 : Social engineering attacks 4
LAB 5.1 Network Topology 4
LAB 5.2 Hacking facebook account using Social Engineering ToolKit (SET) 5
LAB 5.2 : Hack windows machines using Social Engineering ToolKit (SET) 5
Lab session 5
Introduction
Reference:
Learning Outcomes Assessed
The following learning outcomes are being assessed in this lab session:
1. Implement advanced ethical penetration tests on a controlled test environment..
Lab 5 : Social engineering attacks
Introduction
Social engineering refers to the method of deceiving or finding a way for cheating the people to
reveal sensitive information in order to perform some malicious action.
Attackers can easily breach the security of an organization using social engineering tricks.
Despite having security policies in place, organizations can be compromised because social
engineering attacks target the weakness of people to be helpful or unaware of what he is doing.
LAB 5.1 Network Topology
You can use this topology as shown if Figure 1 to implement your attack or you can build your
topology.
Figure 1
IP addressing Table
Device Name Interface IP address Subnet Mask Default
Gateway
Router G0/1 192.168.10.1 255.255.255.0 N/A
G0/2 192.168.20.1 255.255.255.0 N/A
PC-A Any SW port 192.168.10.10 255.255.255.0 192.168.10.1
Server -A Any SW port 192.168.20.10 255.255.255.0 192.168.20.1
WIN server 2003 Any SW port 192.168.20.100 255.255.255.0 192.168.20.1
VM
Server -B Any SW port 192.168.20.20 255.255.255.0 192.168.20.1
Linux OS VM Any SW port 192.168.20.200 255.255.255.0 192.168.20.1
LAB 5.2 Hacking facebook account using Social Engineering ToolKit (SET)
The Social Engineering ToolKit (SET) is an open source tool aimed at penetration testing
around Social-Engineering. It is specifically designed to perform advanced attacks and trick
people into giving away sensitive data.
This is a challenge lab where students are rquired to implement an online social engineering attack,
where they have to host their KALI linux machine in a free hosting website. You are required to send
the fake facebook link using your email to your friend in the class. Once your friend entered the fake
username and password, they will appear in your kali liux.
Task:
Documnt every step with required screenshots.
LAB 5.3 : Hack windows machines using Social Engineering ToolKit (SET)
The Social Engineering ToolKit (SET) is an open source tool aimed at penetration testing
around Social-Engineering. It is specifically designed to perform advanced attacks against the
human element.
Lab scenario
Social engineering is a growing attack for organization all over the world. Those type of attacks
are used to decive the user in order to compromise the organizations, companies …etc every
day.
As an ethical hacker, netwok security administrator or penetration tester, you should be
familiar with the Social engineering Toolkit ( SET) to perform various tests for vulnerabilities on
the network.
Software/Hardware needed:
- Computer running kali linux with Internet connection
- Computer running Windows 7 or 10
Lab objective:
The objective of this lab is to help students perform:
- Create a Malicious web link.
- Create a sessions from victim’s computer to hacker’s computer.
- Create a malicious code using Backtrack to be run on a victim’s computer.
- Using social engineering attacks to deceive the user to run the malicious code.
- Control remote computer for malicious intentions.
In this Lab you need to:
- Review the video link below about social engineering. you can see how to use the Social
Engineering Toolkit.
https://www.youtube.com/watch?v=xm5TH5EYcM0ck
- Go online and research on how to exploit remote windows machines, using the links
below:
https://manishbhardwajblog.wordpress.com/2017/02/13/hack-windows-788-110-with-set/
- You can use network topology in figure 1 to implement this attack.
Objectives required to complete activity
Instruction :
1. Create a meliciouse web link as shown in figure 2. To create a meilciouse web link
ensure that you have select java applet attack to or metasploit browser inject the
malicious code. Use the link and vedio provided to learn how to do this.
Figure 2
2. Take a screen shot for the created web link as shown in figure 2 from your Kali linux.
3. Paste it below in the screen shots page.
4. Place the Malicious Web Link in the Address Bar as shown in figure 3.
5. Once you run the code on victim’s computer, take a screen shot from Kali linux to show the
established sessions on the victim’s computer stated a victim’s IP address and session ID as
shown in figure 4.
6. Paste it below in the screen shots page.
7. Do the following on victim’s computer :
- Create new directory.
- Clear log files .
- Upload/download files.
- Open some application like calculator, Notepad,Ms word …etc
- Start the keystroke sniffer.
Figure 3
Figure 4
Screen Shots
Pinging the vm
Extracting and downloading ngrok to expose the local server to the internet
Run an apache2 server to make your ngrok client available
Ngrok stopped working after this step: I was able to clone the site facebook but the
data wasn’t readable by machine or human.
***************************************************************************
SOCIAL ENGIINEERING ATTACK USING PYPHISER:
Install the tool using git clone command, cd into the directory created and run the tool
using python3 pyphiser.py
Output should look like this. Select Facebook Traditional
Send the customized random URLS to the victim, once the victim clicks on the link
you are able to obtain information about the victim’s machine.
Victim’s IP information
Extra step to confuse the victim:
Use a URL shortener to make the URL seem and look less suspicious .
Questions
How we can avoid to be avictim of a social engineering attack?
1. Use Strong Authentication:
o Implement strong, unique passwords for all accounts and use multi-
factor authentication (MFA) whenever possible.
o Avoid using easily guessable information like birthdays or common
words as passwords.
2. Limit Information Sharing on Social Media:
o Be mindful of the information you share on social media. Attackers
often gather personal details from your online presence to craft
convincing attacks.
3. Protect Your Devices:
o Keep your computer, smartphone, and other devices up to date with
the latest security patches and updates.
o Use reputable antivirus and anti-malware software to protect
against malicious software.
4. Be Skeptical of Urgent Requests:
o Social engineers often create a sense of urgency or pressure to
manipulate victims. Take your time to verify requests, especially
those demanding immediate action.
5. Check URLs and Links:
o Hover over links in emails to see the actual destination URL before
clicking.
o Be cautious about clicking on links or downloading attachments
from unknown sources.
6. Secure Physical Access:
o Protect your physical work environment. Ensure no one can access
your computer or workspace without authorization.
7. Report Suspicious Activity:
o If you suspect that you've been targeted by a social engineering
attack or have received a phishing attempt, report it to your
organization's IT or security team.
8. Security Training and Policies:
o Employers should provide security training to employees, teaching
them how to recognize and respond to social engineering threats.
o Organizations should have clear security policies and procedures in
place to address these threats.
9. Use Encrypted Communication:
o Whenever possible, use encrypted communication methods such as
end-to-end encryption for messaging apps and secure email
services.
ALWAYS DOUBLE CHECK DOMAIN NAMES
In under 300 words, write a reflection on social engineering attacks in terms of how we can
implement the attack, the technology used and countermeasures to prevent this type of attacks
occurring.
Social engineering attacks exploit human psychology rather than technical
vulnerabilities to manipulate individuals or organizations into divulging sensitive
information or taking harmful actions. Attackers employ various tactics, including
pretexting, phishing, and baiting, to achieve their goals.
To implement a social engineering attack, an attacker often begins with
reconnaissance, gathering information from publicly available sources such as
social media. They then craft a convincing pretext, such as impersonating a trusted
entity or creating a sense of urgency. The attacker may use technology like
spoofed emails, fake websites, or malicious attachments to deceive their target.
Successful attacks can lead to data breaches, financial losses, or unauthorized
access.
Countermeasures to prevent social engineering attacks involve a combination of
education, technology, and security practices. Employee training programs should
raise awareness of the tactics used in social engineering and promote a skeptical
mindset. Organizations can implement robust email filtering and authentication
systems to detect and block phishing attempts. Multi-factor authentication (MFA)
adds an additional layer of security, making it harder for attackers to compromise
accounts. Regularly updating systems and software patches is essential to prevent
attackers from exploiting known vulnerabilities. Strong access controls, both
physical and digital, limit unauthorized access to sensitive information.
In summary, social engineering attacks leverage human psychology and deception.
To defend against them, organizations and individuals must prioritize
cybersecurity education, adopt advanced technology solutions, and establish
stringent security practices to mitigate the risk of falling victim to these
manipulative tactics.
What can a hacker do to a remote computer once a system is compromised. Mention five
malicious actions that could take place.
Once a hacker gains unauthorized access to a remote computer, there are numerous
malicious actions they can take. Here are five examples:
Data Theft: Hackers can steal sensitive data, including personal information, financial
data, intellectual property, or login credentials. This stolen information can be used for
identity theft, financial fraud, or sold on the dark web.
Ransomware: They can deploy ransomware, encrypting the victim's files and
demanding a ransom for the decryption key. If paid, there's no guarantee the hacker will
provide the key, and the victim may suffer data loss.
Remote Control: A hacker can take full control of the compromised system, allowing
them to monitor user activity, manipulate files, install additional malware, or carry out
other malicious actions. This can lead to further compromise or data destruction.
Botnet Recruitment: Hackers may turn the compromised computer into part of a
botnet, a network of infected machines controlled by the attacker. Botnets can be used
for various malicious purposes, such as launching DDoS attacks, sending spam, or mining
cryptocurrency.
Keylogging and Password Theft: Hackers can install keyloggers to record keystrokes,
capturing login credentials and sensitive information as users type. This information can
be used for unauthorized access to accounts, systems, or networks.