0% found this document useful (0 votes)
13 views18 pages

Chapter Two

Uploaded by

Geleta Safoyi
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
Download as pptx, pdf, or txt
0% found this document useful (0 votes)
13 views18 pages

Chapter Two

Uploaded by

Geleta Safoyi
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1/ 18

Chapter 2

m m e rc i a l Is s u e s
Overview of Co
Basic of Cryptography: ™
• Cryptography is the science of using mathematics to encrypt and
decrypt data.
• Cryptography enables you to store sensitive information or transmit it
across insecure networks (like the Internet) so that it cannot be read by
anyone except the intended recipient. ™
• While cryptography is the science of securing data, cryptanalysis is
the science of analyzing and breaking secure communication.
• Classical cryptanalysis involves an interesting combination of
analytical reasoning, application of mathematical tools, pattern
finding, patience, determination, and luck.
• Cryptanalysts are also called attackers. ™ When Julius Caesar sent
messages to his generals, he didn't trust his messengers. Only someone
who knew the “shift by 3”rule could decipher his messages. And so we
begin.
Cryptography (Encryption Techniques): ™

• Cryptography: Schemes for encryption and decryption.


™
• Encryption: The process by which plaintext is converted
into cipher-text. ™
• Decryption: Recovering plaintext from the cipher-text. ™
• Secret key: Used to set some or all of the various
parameters used by the encryption algorithm. ™
• Cryptanalysis: The study of “breaking the code”. ™
• Cryptology: Cryptography and cryptanalysis together
constitute the area of cryptology.
Cryptography has five ingredients:
• ™ Plaintext
• Encryption algorithm
• Secret Key
• Cipher text
• Decryption algorithm

™ Security depends on the secrecy of the key, not


the secrecy of the algorithm.
• Prev slides: Have provably secure algorithm for every crypto task imaginable.

Cryptography & Security


Q: How come nothing is secure?

A1: Not all of these are used or used correctly:



Strange tendency to use “home-brewed” cryptosystems.

Combining secure primitives in insecure way

Misunderstanding properties of crypto components.


Strict efficiency requirements for crypto/security:
 The cost is visible but benefit invisible.
 Many provably secure algs not efficient enough


Easy to get implementation wrong – many subtleties

Compatibility issues, legacy systems,

5
What is Web Security?

The web poses some additional security troubles because:


• So very many different computers are involved in any networked environment;
• The fundamental protocols of the Internet were not designed with security in
mind; and,
• The physical infrastructure of the Internet is not owned or controlled by any one
organization, and no guarantees can be made concerning the integrity and
security of any part of the Internet.
• Unfortunately, a web-based system is often advertised as "secure" merely
because the web server uses SSL encryption to protect portions of the site.
Layers Involved in Web Security
• Many "layers" must work in concert to produce a functioning web-based
system. Each layer has its own security vulnerabilities, and its own procedures
and techniques for coping with these vulnerabilities.
• We'll examine each such layer in turn, proceeding from the hardware (furthest
from the end user) to the web browser (closest to the end user).
• Keep in mind that many attacks take advantage of weaknesses in multiple
layers. Even if one such weakness does not expose the service to attack, that
weakness in concert with others can be used for nefarious purposes. The
complexity of these layers' interaction only makes the job of the security
professional that much more difficult.
a. Hardware
• Physical access to computer hardware gives even a slightly-skilled
person total control of that hardware. Without physical security to
protect hardware (i.e. doors that lock) nothing else about a computer
system can be called secure.
• Of course, there are many ways in which malicious humans can attack
hardware:
 Using operating system installation floppies and CDs to circumvent
normal OS access control to devices and hard disk contents;
 Physical removal or destruction of the hardware;
 Electromagnetic interference, including nuclear EMP munitions and e-
bombs;
 Direct eavesdropping technologies such as keyboard loggers and network
sniffers; and
 Indirect eavesdropping technologies such as van Eck Phreaking
(reconstituting the display of a computer monitor in a remote location by
gathering the emitted radiation from that monitor.
Hardware…

• Hardware is also most susceptible to natural occurrences:


smoke and dust;
water and humidity;
 heat and fire;
 lightning and other electrical phenomenon;
radiation, particularly alpha particles which can flip memory bits;
 flora and fauna, especially circuit board-eating molds and
insects; and
 weather and geological effects such as tornados, hurricanes, and
earthquakes.
b. Operating System
• As the software charged with controlling access to the hardware, the file system,
and the network, weaknesses in an operating system are the most valued amongst
crackers.
• Most OS authentication is handled through user names and passwords. Biometric
(e.g. voice, face, retina, iris, fingerprint) and physical token-based (swipe cards,
pin-generating cards) authentication are sometimes used to augment simple
passwords, but the costs and accuracy of the technology limit their adoption.
• Once authenticated, the OS is responsible for enforcing authorization rules for a
user's account. The guiding thought here is the Principle of Least Privilege:
disallow every permission that isn't explicitly required.
• Protecting an operating system from attack is a cat and mouse game, that requires
constant vigilance. Obviously, code patches must be applied (if the benefit of the
patch is deemed to outweigh the risk of changing a functioning system), but
system logs must be gathered and studied on a regular basis to identify suspicious
activity.
Operating System….

• A number of tools can be used to strengthen and monitor the


security of an OS
– File system rights (sometimes access control lists and partition
mount permissions limit non-super user accounts to only the files
they require;
– Disk quotas prevent users from intentionally or accidentally filling a
disk, thereby denying other users' access to the partition;
– Change-detection software (e.g. Tripwire) reports modifications to
system-critical files and directories;
– Firewalls (i.e. packet filters, proxy servers, Network Address
Translation, and Virtual Private Networks) help to block out spurious
network traffic, but don't stop attacks on the layers that follow;
– Intrusion-detection software (e.g. Snort) identify network-based
attacks based on a library of attack profiles; and
– Anti-virus software removes, disables, or warns about dangerous
viruses, worms, or trojan horses.
c. Service
• A "service" is any class of software that typically runs unattended on a server-style
computer and performs some task in response to a network-originated request.
• Web servers (e.g. Apache, IIS, including server-side scripting platforms), FTP
servers, email servers (e.g. Sendmail, Qmail, Exim), Telnet and SSH servers, file
and print servers (e.g. SMB/Samba), database servers (e.g. Oracle, SQL Server,
MySQL, DB/2, PostgreSQL) and so on are all example of these services.
• The most common attack on these services involves a buffer overflow: sending a
message containing too much data for a limited storage space in the computer's
memory, overflowing the bounds of that space and in some cases executing the
code that was delivered at the end of the message.
• The infamous Code Red and Code Red II worms of 2001 sent overly long query
strings to the Microsoft IIS webserver's indexing service, inducing a buffer
overflow, and allowing the worm to propagate and damage the infected system. An
example Code Red attack looks like this in an Apache webserver's log (a single
wrapped line):
• The best defense is to limit the access the service has to the computer it runs on,
and to other computers in its network neighborhood.
d. Data
• As an organization's most valuable IT asset, the casual treatment and security of
data is often surprising. What is not surprising is that crackers know this and
most of their efforts are ultimately focused on displaying, corrupting, or stealing
an organization's data.
• Backups of critical (and what data is not critical?) data must obviously be
performed on a regular schedule, and must also be checked periodically so that
it's known that all data is backed up properly and that the backup media is
functioning. Backup media must also be removed to remote sites to guard
against large-scale natural disaster. Transporting the media must be performed
by trusted couriers.
• Finally, backups should be encrypted in some way to prevent any of the many
people that come into contact with the media from reading all of the
organization's data. In practice, this encryption is rarely performed.
• Since most web applications use some form of special application account to
access the database, the permissions granted to this account must follow the
Principle of Least Privilege. While not a complete solution, this does reduce the
chance that an application layer exploit, or a simple programming error, might
damage the contents of the database.
e. Application
• The application layer consists of specialty software that performs the
specific tasks required of the web system. This software may be
custom-written in-house or through outsourcing, or may be
purchased as a shrink-wrapped product.
• Generally, this sort of software is not used by many different
organizations, and so is not examined by as many people for
security defects. On the other hand, the relative obscurity of such
software means that few crackers will be aware of any such defects
• The main vulnerability of web applications is Cross-Site Scripting
(XSS).
• Cross-Site Scripting (a.k.a. XSS, script embedding, or script
injection) is more an attack on the users of a web application, than
on the web system itself.
Application…..
• It usually involves injecting some client-side browser scripting
code (i.e. JavaScript) into one of the application's forms that,
once displayed on the site, results in that code being run (on
the end user's browser).
• This code can do anything that client-side script code can do,
but is often used to redirect the user to another site for some
malevolent purpose.
• Such script code can also forward the user's session key to
another site, so that the recipient of this key can impersonate
the legitimate owner of this key.
• The best method for defeating this type of attack is to validate
all input to a web application and disable (perhaps by mapping
to HTML entity codes) any special HTML characters such as,
but not limited to: "<", ">", and "&".
f. Network Protocol
• It is at the network protocol layer that most of the web system
security is addressed by product marketing departments. While
important, as we've seen this is only one piece of a very large pie.
• The primary technology that protects the web application protocol
in question, HTTP, is the Secure Sockets Layer (SSL), now renamed
Transport Layer Security (TLS).
• TLS provides both authentication and encryption services to
communicating computers using digital certificates issued by
Certificate Authorities (CAs) also known as Trust Authorities.
• TLS encrypts all data between client browser and webserver for
those pages where it is deemed necessary (identified with URLs
beginning with HTTPS://).
• The level and method of encryption is negotiated between client and
server, but relies on public key cryptography to scramble and
digitally sign the message
Network Protocol….

• Encryption protects the message from:


 Eavesdropping, or simple monitoring of the unprotected traffic;
 Modification of the message to erroneous or meaningless data;
 Man-in-the-middle attacks, which allow the attacker to interpose
himself between the client and the server, relaying messages
between both, while modifying some to his own ends; and,
 Replay attacks, used by the attacker to retransmit the same
message over and over to the server in order to execute web
application functionality over and over, usually to detriment of
the original sender.
• TLS also provides authentication through the same digital
certificate. In most cases, this means that the user can verify
that the web application they are visiting is indeed
registered to the company that purports to provide this
service.
g. Browser
• Unfortunately, given the design of the HTTP protocol
(even when secured through SSL/TLS), there is very
little that can be done to protect the web system at the
browser layer.
• Hence, web applications may never trust any data
originating from a client browser.
• TLS-based client digital certificates can be used to more
positively identify clients to servers, but they are as yet
rarely used, partially because of expense, but also
because they are difficult to move from one client
computer to another, thereby diminishing one of the
benefits of web systems: client location transparency.

You might also like