Documento 1 Ciber
Documento 1 Ciber
Documento 1 Ciber
Fundamentals
Based on Security+
Hello!
I am Abdulrahman AlDaej
2
1.
Security 101
3
“
Nothing is ever completely or truly
secure. There is always a way
around or through any security
precaution that we construct.
4
Great!
Now that it’s
understood that there is
no perfect scenario, we
can move on to some
security basics
5
The Basics of Information Security
◎ Information security:
is the act of protecting data and information systems from
unauthorized access, unlawful modification and disruption,
disclosure, corruption, and destruction
◎ Unauthorized access:
Access to computer resources and data without consent of
the owner. It might include approaching the system, ,
communicating, storing and retrieving data.
◎ Malicious software:
Known as malware, this includes computer viruses, worms,
Trojan horses, spyware, rootkits, adware, ransomware.
◎ Anti-malware software:
Anti-malware protects a computer from the various forms
of malware and, if necessary, detects and removes them.
6
The CIA of Computer Security
7
The AAA of computer security:
8
Time for Testing ourselves and answering
some questions!
9
Part 1 . Threats,
Attacks
Malware types
10
MALWARE:
Malware refers to software that has been designed for
some nefarious purpose
• Gather information
• Participate in a group
• Show you advertising
• Encrypt your data
11
Malware types
◎ Viruses
◎ Ransomware
◎ Worms
◎ Trojan Horse
◎ Rootkit
◎ Keylogger
◎ Adware/Spyware
◎ Botnet
12
Viruses
13
Types of Viruses
• Polymorphic:
• Change its code using encryption key
• Each copy looks different after each use
• Changes are designed not to affect the functionality
• Armored:
• Tricking the Antivirus into thinking that it is located in a different
place from where it actually resides.
• Boot sector:
• Loads into the first sector of the hard drive; when the computer
boots, the virus then loads into memory
14
Ransomware:
A malware that restrict access to a computer
and demands that a ransom be paid.
• Crypto-malware:
Encrypts files on a system and then leaves them unusable either
permanently acting as a denial of service, or temporarily until a ransom
is paid, making it ransomware.
15
16
Protecting against ransomware
ExamAlert
Ransomware is unique, in that the attacker directly demands payment, often through
cryptocurrencies. The amount requested often is relatively low, to ensure a higher
likelihood of payment.
17
Worm
ExamAlert
Viruses are executed by some type of action, such as running a program.
Worms act like a virus but also have the ability to travel without human action. 18
Trojan Horse
ExamAlert
Trojans trick users by disguising their true intent to deliver a malicious payload. When
executed, a remote access Trojan provides a remotely accessible backdoor for an attacker
to covertly monitor the system or easily gain entry.
19
Rootkit
20
Finding and Removing rootkits
ExamAlert
Rootkits can be included as part of software packages, can be installed through an
unpatched vulnerability, or can be downloaded and installed by users.
21
Keylogger
22
Adware
23
Spyware
24
Bots and Botnet
25
Logic Bomb
26
Backdoor
27
Time for Testing ourselves and answering
some questions!
28
Part 1 . Threats,
Attacks
Attacks Types
29
Social Engineering
ExamAlert
the best defense against social engineering is ongoing user
awareness and education.
30
Social Engineering Examples
31
Principles of Social Engineering
(Reasons for Effectiveness)
• Authority:
I’m calling from the help desk/office of the CEO/police.
• Intimidation
There will be bad things if you don’t help
• Consensus / social proof
Your co-worker Jill did this for me last week
• Scarcity/ Urgency
Act quickly, don’t think
• Familiarity / liking
Someone you know, we have common friends
• Trust
I’m from IT, and I’m here to help
32
Phishing and Related Attacks
ExamAlert
Phishing combines technical deceit with the elements of
traditional social engineering. Be sure to know the variants
of phishing attacks.
33
Phishing types
• Spear phishing:
This is a targeted version of phishing. Whereas phishing often
Involves mass emailing, spear phishing might go after a specific individual.
• Whaling:
Whaling is identical to spear phishing, except for the size of the
fish. Whaling employs spear phishing tactics but goes after high- profile
targets such as an executive within a company.
• Vishing:
This attack is also known as voice phishing. The attacker uses fake
caller ID to appear as a trusted organization and attempts to get the
individual to enter account details via the phone.
• Smishing:
Also known as SMS phishing, this attack uses phishing methods
through text messaging.
34
The big phish
35
Tailgating (Piggybacking)
36
Impersonation
37
Dumpster Diving
38
Shoulder Surfing
39
Hoaxes
40
Watering Hole Attacks
41
APPLICATION/SERVICE ATTACKS
• Denial-of-service (DoS) :
42
DoS Attacks:
• SYN flood :
43
DoS Attacks:
• Smurf/smurfing:
The attacker sends (ICMP) ping packets to the broadcast
address of the network, replacing the original source
address in the ping packets with the source address of the
victim.
• Fraggle attack :
The same as Smurf but uses User Datagram Protocol UDP
44
DoS Attacks:
• Ping flood:
45
DoS Attacks:
• The Teardrop:
Packet fragments are sent in a jumbled
and confused order. When the receiving
device attempts to reassemble them, but
won’t know how to handle the request.
Older versions of operating systems will
simply just crash when this occurs.
• Land attack:
Packet send to the victim system with the
same source and destination IP address
46
Distributed Denial-of-Service
(DDoS)
47
◎That’s it for today
48
OSI Model
49
Man-in-the-Middle
ExamAlert
A man-in-the-middle attack takes place when a computer
intercepts traffic and either eavesdrops on the traffic or
alters it. 50
Man-in-the-Browser
51
ARP Poisoning
Every hardware has MAC address that must be
associated with an IP address. Address Resolution
Protocol (ARP), which operates at Layer 2 (data link
layer) of the OSI model, associates MAC addresses to
IP addresses. ARP is a simple lower-layer protocol
that consists of requests and replies without
validation.
54
Cross-Site Scripting (XSS)
The cause of the XSS is weak user input
validation. If input is not validated properly,
an attacker can include a script in their input
make cause unwanted action on user’s
browser.
• Login to Haraj
• Haraj saved cookie (Your ID session)
• An Attacker submitted an ad in Haraj with
java script (no validation)
• You visited his AD, and he stole your
cookie after the script executed by your
browser.
56
Privilege Escalation
• Exploit a vulnerability
• Gain higher-level access to a system
From normal user to an admin
• Higher-level access means more capabilities
57
DNS Poisoning (Spoofing)
An attack that exploits vulnerabilities in the domain
name system (DNS) to divert Internet traffic away
from legitimate servers and towards fake ones.
58
Zero Day
An attack to exploit computer application
vulnerabilities that are unknown to others or
even the software developer and not patched
yet.
ExamAlert
Effective security policies, training, and mitigating controls are
more effective, even compared to the most aggressive patch-
management strategies, when it comes to zero-day exploits.
59
Hijacking and Related Attacks
Hijacking is a form of attack where the
attacker hijacks a user’s experience,
typically after the exchange of credentials.
• Session Hijacking :
An attacker uses source-routed IP packets to insert
commands into an active communication
60
Hijacking and Related Attacks
• Clickjacking:
You’re clicking on a button but you’re actually
clicking on something else.
61
Driver Manipulation
• Shimming:
Shimming is the process of putting a layer of
code between the device driver and the
operating system.
62
WIRELESS ATTACKS
63
Replay Attack
EXAM TIP
The best method for defending against replay attacks is
through the use of encryption
64
Rogue access points
Access point that has been added to one's network
without one's knowledge.
Evil Twins
Access point that looks and acts just like a legitimate
AP and entices the end-user to connect to our access
point.
65
Jamming
Jamming is a form of denial of service that
specifically targets the radio spectrum aspect of
wireless.
WPS
Wi-Fi Protected Setup (WPS) is a network security
standard that was created to provide users with an
easy method of configuring wireless networks
66
Bluejacking
Sending of unauthorized messages to another
Bluetooth device
Bluesnarfing
Instead of sending an unsolicited message to the
victim’s phone, the attacker copies off the victim’s
information
67
RFID
Radio frequency identification (RFID) tags are used in
a wide range of use cases. From tracking devices to
keys
RFID Attacks:
• Data capture
• View communication
• Spoof the reader
• Write your own data to the tag
68
Cryptographic Attacks
The basic intention of an attacker is to break a
cryptosystem and to find the plaintext from the
ciphertext.
Brute Force
The password-cracking program attempts all
possible password combinations.
69
Dictionary
A password-cracking program that uses a list
of dictionary words to try to guess the
password
• People use common words as passwords
• You can find them in the dictionary
• password, ninja, football, admin
• Many common wordlists available on the ‘net
• Some are customized by language or line of work
Hybrid Attack
Dictionary Attack method as well as brute force
attack
70
Rainbow Tables
71
Known Plaintext/Ciphertext
72
Downgrade
• Example :
intercepting web traffic and redirecting
the user from the secure, HTTPS version
of a website to an unencrypted HTTP
version.
73
Time for Testing ourselves and answering
some questions!
74
Part 1 . Threats,
Attacks
Threat Actor Types
75
THREAT ACTOR TYPES
Script Kiddies
Script kiddies use tools without any knowledge
And cannot write sophisticated code and might
not even know how to program.
76
Hacktivists
77
Organized Crime
• Very sophisticated
• Motivated by money
• One person hacks, another sells the data,
another handles customer support
• Funding is not an issue
78
Nation States/APT
• Highest sophistication
• United States and Israel destroyed 1,000
nuclear centrifuges with the Stuxnet worm.
• Massive resources available
79
Competitors
• Many different motivations
• DoS, espionage, harm reputation
• High level of sophistication
• Shut down your competitor during an
event
• Steal customer lists
• Corrupt manufacturing databases
• Take financial information
80
Threat Actor Attributes
Internal/External:
Internal threat actors have access to the system.
External threat actors have an additional step, the
establishment of access to the system
• Level of Sophistication
• Resources/Funding
• Intent/Motivation
81
Open Source Intelligence (OSINT)
• Television
• Newspapers and magazines
• Social-networking sites
• Company websites
• Conferences
82
Time for Testing ourselves and answering
some questions!
83
Part 1 . Threats,
Attacks
Penetration Testing
84
Penetration Testing
• Exam Alert:
Pen Tests are focused efforts to determine the effectiveness of
the security controls used to protect a system..
85
Passive Reconnaissance
86
Active Reconnaissance
87
Initial Exploitation
88
The pivot
89
Persistence
This enables the tester to gain additional
compromising information. Achieving
persistence also involves planting back
doors to allow continued remote access into
the systems.
• Set up a backdoor
• Build user accounts, change or verify
default passwords
Escalation of Privilege
The movement from a lower-level account to
an account that enables root-level activity.
Can help to delete logs that could lead to
detection of the attack.
90
Black Box Test
• The pen tester knows nothing about the systems
under attack
• “Blind” test
• Not actually test how secure your systems are. It
really only tests how well hidden they are
91
Time for Testing ourselves and answering
some questions!
92
Part 1 . Threats,
Attacks
Vulnerability Scanning
93
Vulnerability scanning
94
Vulnerability Scanning Scan Types
Non-intrusive scans:
• Gather information, don’t try to exploit a
vulnerability
Intrusive Scans:
• You’ll try out the vulnerability to see if it works
Non-credentialed scans
• The scanner can’t login to the remote device
Credentialed scans
• You’re a normal user, emulates an insider attack.
95
Vulnerability scan results
• Lack of security controls
• No firewall, no anti-virus
• Misconfigurations - Open shares, guest access
• Real vulnerabilities
False positive
• “False alarm", a result that indicates a given
danger exists, when it does not.
False Negative
• “No alarm", a result which wrongly indicates
that a danger is absent
96
Vulnerability Types
Race condition
When a device or system attempts to perform two
or more operations at the same time.
• The operations must be done in the proper
sequence
End-of-life vulnerabilities
• Without vendor support, no security patches.
• WannaCrypt ransomware infects hundreds of
thousands of computers
• End-of-live systems were wide open
97
Vulnerability Types
98
Vulnerability Types
Memory Leak
• The application fails to release memory when
no longer needed
• Begins to slowly grow in size
• Eventually uses all available memory and
system crashes
Architecture/design weaknesses
• The best security system fails if you don’t have
locks on the doors
• What if firewall is not in the right place?
100
Time for Testing ourselves and answering
some questions!
101
Part 2 . Technology
and Tools
PERIMETER SECURITY
Small Tip:
Keep in mind that each organization
has different needs and might use
additional tools for perimeter defense
102
Firewall
• A device or application that analyzes packet headers
and enforces policy based on protocol type, source
address, destination address, source port, and/or
destination port. Packets that do not match policy are
rejected
Firewall Rules
• Access control lists (ACLs) Allow or disallow traffic
based on Source IP, Destination IP, port number, time
of day, application.
Implicit deny:
• Most firewalls include a deny at the end of the list Even
if you didn’t put one.
• Unless you explicitly permit it, traffic cannot pass.
103
104
Stateless firewall
• Access Control List (ACL) firewall
• Does not keep track of traffic flows
• Each packet is individually examined,
regardless of past history
• Faster and perform better under heavier traffic
loads
Stateful Firewall
• Remembers the “state” of the session
• Watch traffic streams from end to end
• Everything within a valid flow is allowed
• Better at identifying unauthorized and forged
communications
105
VPN Concentrators
• A VPN concentrator is a type of networking
device that used to allow multiple external
users to access internal network resources
using secure features that are built into the
device (VPN)
• Often integrated into a firewall
Site-to-Site VPN
• Always-on or almost always
• Firewalls often act as VPN concentrators
Probably already have firewalls in place
106
IP Sec (Internet Protocol Security)
• A set of protocols that provides security
for Internet Protocol (layer 3)
• Authentication and encryption for every
packet
• Confidentiality and integrity/anti-replay
Encryption.
• Common to use multi-vendor
implementations
IPSec protocols
Authentication Header (AH):
• Hash of the packet and a shared key
using MD5, SHA-1, or SHA-2 (Integrity)
108
IDS/IPS Detection technologies
109
Passive Monitoring
• Examine a copy of the traffic
• Port mirror (The switch sends a copy of all
network packets seen on one port)
• No way to block (prevent) traffic
Out-of-band response
• When malicious traffic is identified, IDS/IPS
sends TCP RST (reset) frames
• After-the-fact
Inline monitoring
• IDS/IPS sits physically inline
• All traffic passes through the IDS/IPS
In-band response
• Malicious traffic is immediately identified
• Dropped at the IPS
• Does not proceed through the network
110
Routers
SWITCH
A switch is a device in a computer network
that connects together other using ports.
• layer 2 device
• Forwards traffic based on MAC address
111
Port Security
Enables individual switch ports to be configured
to allow only a specified number of source MAC
addresses to come in through the port.
• MAC addresses can be spoofed
• Port security can provide useful network
security functionality.
Loop Prevention
• Connect two switches to each other
• They’ll send traffic back and forth forever
• There’s no “counting” mechanism at the MAC
layer
• This is an easy way to bring down a network
• Easy to resolve using Spanning Tree Protocol
112
Proxy
A Server or an application sits between the users
and the external network.
• Receives the user requests and sends the
request on their behalf (the proxy)
• Useful for caching information, access
control,
• URL filtering, content scanning
• Transparent, Users will not notice it
Forward Proxy
Destination server thinks the requests coming from
the proxy (to protect the internal users)
Reverse Proxy
Users thinks the response coming directly from the
server. (To protect the internal servers)
113
LOAD BALANCER
A load balancer is a device that acts as a reverse
proxy and distributes network or application
traffic across a number of Servers
Round-Robin scheduling
• Sending each new request to the next server
• All requests are sent to servers in equal.
Affinity scheduling
• Designed to keep a host connected to the same
server across a session.
• Web applications, can benefit from affinity-based
scheduling.
114
Active-Passive Load Balancing
First load balancer is actively doing the
balancing while the secondary load balancer
passively observes and is ready to step in at any
time the primary system fails.
115
Wireless Access Point (WAP)
Networking hardware device that allows a Wi-
Fi device to connect to a wired network
• WAP is an OSI layer 2 device
Signal Strength
• Set it as low as you can, How low is low?
• Require some additional study
• Location, location, location
116
Wi-Fi Band Selection
• 2.4-GHz band used for older standards
such as 802.11a/b/g is crowded and
subject to interference
• Newer standards such as 802.11n and
802.11ac use the 5-GHz band
Antenna types:
Omnidirectional antennas:
• Included on most access points
• Signal is evenly distributed on all sides
• No ability to focus the signal
Directional antennas:
• Focus the signal
• Increased distances
• Send and receive in a single direction
117