UNIT1
UNIT1
(CY5010)
UNIT 1 : INTRODUCTION
• You (the wizard) have data (fruit) that you'd like to share with some people.
But you know that if you just let everyone have free access to your server
farm (orchard), there'll be disastrous results. People will deface your
servers (vandalize the trees), they'll install botnets or other mal ware to
take the servers over for themselves (steal the trees), and they'll try to deny
service to the servers so no one can use them (burn the trees down).
• In response to these threats, you erect a firewall (lava moat) to keep
everyone out. This is good because it keeps the attackers out, but
unfortunately it keeps all your legitimate users out too.
• So, you write a web application (a giant) that can pass through the firewall.
The web application needs a lot of privileges on the server (the way a giant
is very powerful and strong) so it can access the system's database and the
file system.
• However, while the web application is very powerful, it's not necessarily
very smart, and this is where web application vulnerabilities come in.
• By exploiting logic flaws in the web application, an attacker can essentially
"trick" the web application into performing attacks on his behalf (getting
the giant to do his bidding).
• He may not be able to just connect into the servers directly to vandalize
them or steal from them any more, but if he can get a highly privileged
application to do it for him, then that's just as good. He may even be able to
read the application source code (the wizard's scrolls) out of the file
system.
1.2 The OWASP Top Ten List
• OWASP (Open Web Application Security Project) is an open-source project
with the goal of improving web application security.
• But the best-known OWASP resource by far is its Top Ten List.
• The OWASP Top Ten List of the Most Critical Web Application Security Risks
is compiled from both objective and subjective data.
• Attacker certainly take the opportunity to change that parameter and see
what other internal data he can get access to. He might set up an automated
crawler to find all the datafiles in the system, from " l .txt" through
"99999999.txt". Or he might get even sneakier and try to break out of the
application's data directory entirely, by entering a datafile parameter like
"../..1../passwords.txt".
1.2 The OWASP Top Ten List
• 5. Cross-Site Request Forgery (CSRF)
• Another type of attack that takes advantage of the disconnected, stateless
nature of HTTP.
• A web browser will automatically send any cookies it's holding for a web
site back to that web site every time it makes a request there.
• This includes any active session identification or authentication token
cookies it has for that site too.
• Attacker may send the specially crafted email messages or lure messages
which will make your browser request for any site on the internet,
• The site receives the request, sees that the request includes your current
session token, and assumes that you really did mean to send it.
• every site on the Internet that relies on cookies to identify its users - and
there are millions of these sites - is vulnerable to this attack by default.
1.2 The OWASP Top Ten List
• 6. Security Misconfiguration
• configuration vulnerabilities when development settings are accidentally
carried over into production environments.
• Web applications in particular are designed to be easy to deploy.
• Sometimes deployment is as simple as copying the files from the
developer's machine to the production server.
• However, developers usually set their configuration settings to give them as
much debugging information as possible, to make it easier for them to fix
bugs.
• If a developer accidentally deploys his configuration settings files onto the
server, then that whole treasure trove of internal data may now be visible to
potential attackers.
• Attacker may exploit any other vulnerability on the system.
1.2 The OWASP Top Ten List
• 7. Insecure Cryptographic Storage
• Sensitive data like passwords should never be stored unencrypted in
plaintext on the server. In fact, it's rarely necessary for passwords to be
stored at all.
• Whenever you can, it's better to store a one-way cryptographic hash of a
user's password rather than the password itself.
• The benefit of this approach is that hash functions only work in one
direction: it's easy to compute the hash of a string, but it's impossible to
recompute the original string from the hash. Even if an attacker somehow
manages to obtain the list of password hashes, he' II still have to take a
brute-force approach to testing for an original value that matches my SHA-1
hash.
1.2 The OWASP Top Ten List
• 8. Failure to Restrict URL Access
• One way that web applications sometimes keep unauthorized users out of
certain pages on the site is to selectively hide or display the links to those
pages.
• If the only thing keeping attacker out is the fact that he is not supposed to
know the site is there, that's not sufficient protection.
• If someone on the inside accidentally reveals the secret site, or if attacker
just happen to guess it, then he will be able to just get straight in.
1.2 The OWASP Top Ten List
• 9. Insufficient Transport Layer Protection
• Using Hypertext Transfer Protocol Secure (HTTPS) for your website gives
you many security benefits that regular HTTP does not. HTTPS uses either
the Secure Sockets Layer (SSL) protocol or, better yet, the Transport Layer
Security (TLS) protocol, which provides cryptographic defenses against
eavesdropping attackers or "men-in-the-middle."
• SSL/TLS encrypts messages sent between the client and the web server,
preventing eavesdroppers from reading the contents of those messages. It
also uses message authentication codes (MACs) to ensure that the
messages haven 't been modified in transit.
• Unfortunately, because HTTPS is slower than standard HTTP (and therefore
more expensive since you need more servers to serve the same number of
users), many web applications don't use HTTPS as thoroughly as they
should.
1.2 The OWASP Top Ten List
• 10. Unvalidated Redirects and Forwards
• There shouldn’t be any invalidated redirects and forwards in the web
application.
1.3 Input Validation
• NEVER TRUST THE USER
tqixleq
https://classroom.google.com/c/NzI1NDc2NDg0MDM3?cjc=tqixleq
1.5 Classifying and prioritizing threats
• There is a need to prioritize and classify the threats to minimize the risk.
• STRIDE : It is a threat classification system originally designed by Microsoft
security engineers.
• STRIDE does not attempt to rank or prioritize vulnerabilities, instead the
purpose of STRIDE is only to classify vulnerabilities according to their
potential effects.
• STRIDE is an acronym, standing for:
• Spoofing
• Tampering
• Repudiation
• Information Disclosure
• Denial of Service
• Elevation of Privilege
• Spoofing vulnerabilities allow an attacker to claim to be someone they're
not, or in other words, to assume another user's identity.
• Tampering vulnerabilities let an attacker change data that should only be
readable to them (or in fact, not even readable to them). Ex. SQL injection
• Repudiation vulnerabilities let the user deny that they ever performed a
given action.
1.5 Classifying and prioritizing threats
• Information disclosure vulnerabilities allow an attacker to read data that
they're not supposed to have access to.
• Denial-of-service attacks are some of the oldest attacks against web
applications. Put simply, denial-of-service (or DoS) attacks attempt to knock
out a targeted application so that users can't access it any more. Another
form of the DoS is DDoS which is much more severe.
• Elevation of privilege, is generally considered to be the most serious type of
all of the STRIDE categories. Elevation of privilege (EoP) vulnerabilities
allow attackers to perform actions they shouldn't normally be able to do.
1.5 Classifying and prioritizing threats
• IIMF
• As a more simplified alternative to STRIDE, one can consider classifying
potential vulnerabilities according to the IIMF model: interception,
interruption, modification, and fabrication.
• Interception is equivalent to the STRIDE category of information disclosure.
• Interruption is equivalent to the STRIDE category of denial-of-service.
• Modification and fabrication are both subtypes of tampering: modification
vulnerabilities allow an attacker to change existing data, and fabrication
vulnerabilities allow an attacker to create his own forged data.
1.5 Classifying and prioritizing threats
• CIA
• A closely related concept to IIMF is CIA: the triad of confidentiality,
integrity, and availability.
• Where interruption, interception, modification, and fabrication are types of
threats, confidentiality, integrity, and availability are the aspects of the
system that we want to protect.
• In other words, CIA are the traits we want the system to have, and IIMF are
the ways attackers break CIA.
1.5 Classifying and prioritizing threats
• Common Weakness Enumeration (CWE)
• The Common Weakness Enumeration (or CWE) is a list of general types of
software vulnerabilities, such as:
• • SQL injection (CWE-89)
• • Buffer overflow (CWE-120)
• • Missing encryption of sensitive data (CWE-311)
• • Cross-site request forgery (CWE-352)
• • Use of a broken or risky cryptographic algorithm (CWE-327)
• • Integer overflow (CWE-190)
• The CWE list (maintained by the MITRE Corporation) is more specific than
the general concepts of STRIDE or IIMF, and is more akin to the OWASP Top
Ten list discussed.
1.5 Classifying and prioritizing threats
• DREAD
• Like STRIDE, DREAD is another system originally developed by Microsoft
security engineers during the "security push"-a special security-focused
development milestone phase-for Microsoft Visual Studio .NET
• STRIDE is meant to classify potential threats, DREAD is meant to rank them
or score them according to their potential risk.
• DREAD scores are composed of five separate subscores, one for each letter
of D-R-E-A-D:
• Damage potential
• Reproducibility (or Reliability)
• Exploitability
• Affected users
• Discoverability
• The damage potential component of the DREAD score is pretty
straightforward: If an attacker was able to pull off this attack, just how
badly would it hurt you? If it's just a minor nuisance attack, say maybe it
just slowed your site's response time by one-half of one percent, then the
damage potential for that attack would be ranked as the lowest score, one
out of ten.
1.5 Classifying and prioritizing threats
• But if it's an absolutely devastating attack, for example if an attacker could
extract all of the personal details and credit card numbers of all of your
application's users, then the damage potential would be ranked very high,
say nine or ten out of ten.
• The reproducibility (or reliability) score measures how consistently an
attacker would be able to exploit the vulnerability once he's found it. lf it
works every time without fail, that's a ten. If it only randomly works one
time out of 100 then the reproducibility score might be only one or two.
• Exploitability refers to the ease with which the attack can be executed: how
many virtual "hoops" would an attacker have to jump through to get his
attack to work? For an attack requiring only a "script kiddie" level of
sophistication, the exploitability score would be a ten. For an attack that
requires a successful social engineering exploit of an administrative user
within a five-minute timeframe of the time the attack was launched, the
exploitability score would be much lower.
• The affected users score is another pretty straightforward measure: the
more users that could be impacted by the attack, the higher the score.
1.5 Classifying and prioritizing threats
• The discoverability score-in other words, given that a vulnerability exists in
the application, how likely is it that an attacker could actually find it?
• obvious vulnerabilities like login credentials or database connection
strings left in HTML page code would score high, whereas something
more obscure, like an LDAP injection vulnerability on a web service
method parameter, would score low.
1.5 Classifying and prioritizing threats
• Common Vulnerability Scoring System CCVSS)
• CVSS is an open standard, originally created by a consortium of software
vendors and nonprofit security organizations, including:
• Carnegie Mellon University's Computer Emergency Response Team
Coordination Center (CERT/CC)
• Cisco
• U.S. Department of Homeland Security (DHS)/MITRE
• IBM Internet Security Systems
• Microsoft
• eBay
• Symantec
1.6 Mobile phone threats and vulnerabilities exploits
• Particular focus on wireless devices—including Internet of Things (IoT)—
and mobile devices (where it applies)
• The first step to formulating any security plan is to ask questions, such as
the following:
• What are you trying to protect? : Is it corporate data, intellectual property,
customer data, financial assets, or remote control of a physical device?
• Why are you trying to protect it? : Is protection mandated by a government
or industry agency, or is it an internal best practice?
• What is the value of the asset? Have the assets been quantified? Has the
cost of a data breach been estimated?
• What are you protecting it from? : Are the threats internal or external? Are
they aimed at data theft, device control, or system access? Are the threats
environmental or human in origin?
• What constraints prevent you from protecting the asset? Is broad access
required? Does the data change or move around?
1.6 Mobile phone threats and vulnerabilities exploits
• The answers to these basic questions will help you identify the assets you
must secure, as well as the priority and value of each individual asset. This
is vitally important.
• Security must be cost-effective.
1.6 Mobile phone threats and vulnerabilities exploits
• General Threat Categories:
• Outsider
• Insider
• Often known as Intruders : Who access the resources without permission.
• The core principle of information security remains same: C-I-A triad
• However, it has been expanded been expanded to cater to the specific
requirements of new technologies and business models. These expanded
principles of information security are as follows:
• Confidentiality
• Integrity
• Availability
• Accountability : Making users accountable for their actions
The key point is authentication. A user cannot be accountable if the
system has not authenticated them. Authentication on its own, however, is
of limited use because it simply verifies that the user is who they claim to
be and places no restrictions on access to resources.
• Nonrepudiation : Preventing the denial that an action has been taken
1.6 Mobile phone threats and vulnerabilities exploits
• Threats to Wireless and Mobile Devices
• Three categories:
• Data theft
• Device control
• System access
• Remember : virtually every threat that exists on wired networks also exists
on wireless and mobile networks. In addition to these threats, some threats
are specific to wireless and mobile or now have wireless and mobile
variants
1.6 Mobile phone threats and vulnerabilities exploits
• Data theft Threats :
• Often, hackers go after a target of opportunity rather than instigating a
targeted attack on a specific company.
• In such a case, they will look for personally identifiable information (PII),
which is information that can be used to identify, contact, or locate a single
person, or to identify an individual in context, with any business-related
data.
• The most common threats are:
• Sniffing (snooping) : In radio-based communication (wireless) the signals
can be easily intercepted through a process called sniffing or snooping.
• No physical access to the medium is needed.
• Remedy: Encryption
• Malicious applications (malware) : applications range from malware that
can be auto installed on phones to spyware that can copy emails, texts, and
contacts.
• There is also a significant privacy issue due to the ability to track the
location of a mobile device.
• Remedy: Strict restrictions on downloading apps
1.6 Mobile phone threats and vulnerabilities exploits
• Browser exploits : Specifically targeting mobile users, these exploits take
advantage of vulnerabilities on mobile web browsers.
• A big consideration for Bring Your Own Device (BYOD) environments
because unlike company-owned assets, on which updates can be mandated
and managed, personal devices can and often are several updates behind.
• Which means that simply by visiting an unsafe webpage, a user can trigger
a browser exploit that installs malware or performs other actions on their
device.
• Remedy: MDM – Mobile Device Management in BYOD environment.
• Wireless phishing : Phishing involves sending fake emails or Short
Message Service (SMS) messages to a target in an attempt to get the victim
to click a link that will take them to a fraudulent website.
• Phishing is more effective due to smart devices with small viewing screens,
which can make it difficult to notice some of the tell tale signs of phishing.
• Hackers can also take advantage of users who connect to rogue access
points.
1.6 Mobile phone threats and vulnerabilities exploits
• Lost or stolen devices: Not only do lost or stolen devices result in data loss
they also can result in unauthorized system access.
• The device is compromised, especially if it has remote access software
configured for access to the corporate network.
• Remedy: Timely notification and blocking or wiping the device are the best
options if it is lost or stolen.
• System or device takeover : With IoT, specifically with wireless controlled
IoT deives, attackers can block physical or remote access.
1.6 Mobile phone threats and vulnerabilities exploits
• Device Control threats : With control of the device, the hacker not only has
ongoing access to data but can also use the device to launch other attacks or
leverage the permissions on the device to gain access to higher-valued
targets such as internal servers.
• It occurs through a process of lateral movement across the network called
lily padding, or island hopping, in which the hacker “hops” from one device
to another, with each hop getting the hacker closer to the target
• Examples of device control threats include the following:
• Unauthorized and modified clients : clients—Users sometimes create
vulnerabilities when they try to modify policies or device configurations.
• This can open backdoors and other vulnerabilities.
• Examples of this include user hacks found on the Internet to alter a smart
device (referred to as jailbreaking) and opening a smartphone hotspot
(without security).
1.6 Mobile phone threats and vulnerabilities exploits
• Endpoint attacks : Several tools now exist that can attack wireless clients
directly.
• An automated tool called Metasploit, for example, can be used to probe Wi-
Fi clients for thousands of known vulnerabilities. Once exposed and
exploited, the Wi-Fi client can be controlled and/or monitored.
• Bluetooth Wi-Fi hacks : Traditionally, vulnerabilities in Bluetooth
protocols have enabled hackers to gain access to and control of mobile
devices.
• However, this is no longer as easy as it used to be because Bluetooth is now
switched off and set to non discovery mode by default.
• If a user changes this setting, however, hackers can easily take control of a
Bluetooth-enabled mobile device
• Near field communication and proximity hacking : One technology that
allows an ad hoc wireless connection between two devices that are within a
few feet of each other is near field communication (NFC).
• Unlike Bluetooth, the pairing process is automatic. Already used extensively
for social media and to exchange contact information, the future of NFC
includes the ability to auto pay via credit card at point-of-sale (PoS)
terminals and will likely become a prime target for hackers.
1.6 Mobile phone threats and vulnerabilities exploits
• System Access Threats : There are cases in which hackers are more
interested in breaking the network or disrupting network access for
political or financial gain or, in some cases, to exact revenge for a real or
perceived insult or injury. Examples of these types of system access threats
include the following:
• DoS attacks
• Evil twin access points : An access point can easily be set to the same SSID
(service set identifier) as a legitimate WLAN or hotspot, fooling
unsuspecting users into connecting.
• This is not a new problem, but there are new hacker tools that can listen to
clients to see what SSIDs they are looking for and then configure
themselves to look like one of those networks. The client will then connect
without the user having done a thing. Once connected, the client is subject
to a full host of network attacks.
1.6 Mobile phone threats and vulnerabilities exploits
• Rogue access points : Unauthorized or rogue access points have been a
problem for as long as Wi-Fi has been commercially available.
• Today, the appearance of rogue access points is usually due to poor site
planning, which results in wireless dead zones.
• Out of frustration, an employee may set up a rogue access point to gain
access to the network. But if a hacker gains entry to a building, they can
easily set one up as well.
• Unless regular site survey sweeps are conducted, rogue access points may
go unnoticed by IT for some time, resulting in a lingering vulnerability.
1.6 Mobile phone threats and vulnerabilities exploits
• Risk Mitigation:
• Mobile device screen locks and password protection
• Remote locks and data wipes for mobile devices : If a device is lost or
stolen, a remote lock can temporarily secure a device. If the device is not
recovered, a remote data wipe or swipe will prevent all future access to
business data and accounts stored on the phone.
• Mobile GPS location and tracking
• Stored data encryption—In most cases, device locks and data wipes are
sufficient to mitigate the risk of data theft, data loss, and data leakage. But
as an added security measure, executives and other employees with access
to sensitive information should encrypt data on their personal devices
1.6 Mobile phone threats and vulnerabilities exploits
• Mitigate risk of BYOD:
• Mobile Device Management (MDM) :
• MDM is a technology that has emerged to enable network security
administrators to manage mobile devices. MDM typically sends over the- air
signals to mobile devices to distribute applications and configuration
settings for all makes of mobile phones and other mobile devices.
• The intent is to provide a central point of control and policy from which to
enhance the functionality and efficiency of mobile communications while
reducing costs and risk.
• MDM architecture : two elements : Server element and Client element
• Server element is a central management system and a client element,
resides on the mobile device.
• MDM Server: The MDM server provides automatic identification and
configuration of any new mobile device that attempts to join the network
for the first time.
• it maintains a history of all configurations and updates sent to the devices
on the network and can send new updates over the air (OTA) when
required.
1.6 Mobile phone threats and vulnerabilities exploits
• The server can initiate MDM security features, which send the commands
OTA to the remote mobile device. E.g. remote locking, device wiping,
location tracking etc.
• The job of MDM is not just to keep mobile devices up to date. The
application typically provides other essential services such as remote
locking, location tracking, and wiping of the device in case of loss or theft.
• MDM provides a valuable management facility for administering and
securing mobile devices on large networks. MDM can be expensive for
smaller companies, but that capital expense can be avoided through the use
of a Software as a Service (SaaS) cloud based MDM solution.
1.6 Mobile phone threats and vulnerabilities exploits
• Mitigate risk of BYOD:
• Mobile Application Management (MAM) :
• MDM provides a method for configuration and policy management, but
what about application management and control?
• In MAM particular concern are applications of unknown origin or quality
residing on the employee’s device.
• After all, the employee is likely to download all sorts of recreational
applications, some of which open backdoors to the device. To mitigate this
risk, the following steps must be taken:
• Secure applications
• Secure network access
• Encryption
• MAM is responsible for administering and managing applications on mobile
devices.
• MAM software controls the provisioning and distribution of in-house
mobile applications and, in some cases, commercially available applications
through an enterprise application store.
• With MAM, the IT department can verify and authorize the download of in-
house and commercial applications from the central store. This goes a long
way toward establishing a secure application management system
1.7 Mobile device security models
• The major smartphone vendors—Google, Apple, and Microsoft—has
adopted an approach to improve security and lower risk for users.
Interestingly, these vendors’ approaches don’t significantly differ.
• All three are based in part on the two main concepts of controlling access to
applications (downloads) and compartmentalizing applications and their
resources once downloaded.
• Mobile device security models are :
• The Android security model
• The iOS security model
• The windows phone 8 security model
1.7 Mobile device security models
• The Android security model :
• 1. Linux Kernel Foundation: Android is built on the Linux kernel, which
provides a strong security foundation with features like user-based
permissions, process isolation, and inter-process control mechanisms.
• 2. Process Sandboxing: Each Android application runs in its own Dalvik
virtual machine (VM), isolated within its own Linux process, ensuring
robust application-level security.
• 3. Linux Security Features: The Linux kernel's multiuser capabilities
prevent unauthorized access between users, ensuring one user's files,
applications, or resources remain inaccessible to another.
• 4. Android Sandbox: Android enhances Linux's security features by creating
the "Android sandbox," which isolates applications and resources for added
security.
• 5. Kernel-Centric Security: While the Java and Dalvik VMs are secure,
Android relies on the Linux kernel—not the VMs—to enforce security,
removing unsecure kernel elements where necessary.
1.7 Mobile device security models
• The Android Sandbox:
• 1. Application Isolation: Android assigns a unique user ID to each
application, running it as a separate user process with its own permissions,
isolating files, resources, and memory.