06 Security, Privacy & Data Integrity
06 Security, Privacy & Data Integrity
integrity
6.1
In this chapter, you will learn about
Data security
★ the terms security, privacy and integrity of data
★ the need for security of data and security of computer systems
★ security measures to protect computer systems such as user
accounts, passwords, digital signatures, firewalls, antivirus and
anti-spyware software and encryption
★ security threats such as viruses and spyware, hacking, phishing and
pharming
★ methods used to reduce security risks such as encryption and access
rights
★ the use of validation to protect data integrity
★ the use of verification during data entry and data transfer to reduce or
eliminate errors.
Key terms
Data privacy – the privacy of personal information, or User account – an agreement that allows an individual
other information stored on a computer, that should not to use a computer or network server, often requiring a
be accessed by unauthorised parties. user name and password.
Data protection laws – laws which govern how data Authentication – a way of proving somebody or
should be kept private and secure. something is who or what they claim to be.
Data security – methods taken to prevent unauthorised Access rights (data security) – use of access levels to ensure
access to data and to recover data if lost or corrupted. only authorised users can gain access to certain data.
159
User accounts
User accounts are used to authenticate a user (prove that a user is who
they say they are). User accounts are used on both standalone and networked
computers in case the computer can be accessed by a number of people. This is
often done by a screen prompt asking for a username and password:
160
6.1
username
Data security
password
keep me logged in
Sign In
User accounts control access rights. This often involves levels of access. For
example, in a hospital it would not be appropriate for a cleaner to have
EXTENSION access to data about one of the patients. However, a consultant would need
ACTIVITY 6A such access. Therefore, most systems have a hierarchy of access levels
depending on a person’s level of security. This could be achieved by
An airport uses a username and password with each username (account) linked to the
computer system appropriate level of access.
to control security,
flight bookings, Use of passwords
passenger lists,
administration and Passwords are used to restrict access to data or systems. They should be hard
customer services. to crack and changed frequently to retain security. Passwords can also take the
Describe how it is form of biometrics (such as on a mobile phone, as discussed later). Passwords
possible to ensure are also used, for example, when
the safety of the
» accessing email accounts
data on the system
» carrying out online banking or shopping
so that senior staff
can see all data, » accessing social networking sites.
while customers can
only access flight It is important that passwords are protected. Some ways of doing this are to
times (arrivals and » run anti-spyware software to make sure your passwords are not being relayed
departures) and duty to whoever put the spyware on your computer
free offers. » regularly change passwords in case they have been seen by someone else,
illegally or accidentally
» make sure passwords are difficult to crack or guess (for example, do not use
your date of birth or pet’s name).
EXTENSION ACTIVITY 6B
Which of the following are weak passwords and which are strong
passwords?
Explain your decision in each case.
6 Security, privacy and data integrity
a) 25-May-2000
b) Pas5word
c) ChapTer@06
d) AbC*N55!
e) 12345X
Digital signatures
Digital signatures protect data by providing a way of identifying the sender of,
for example, an email. These are covered in more depth in Chapter 17.
Use of firewalls
A firewall can be software or hardware. It sits between the user’s computer and
an external network (such as the internet) and filters information in and out
of the computer. This allows the user to decide to allow communication with
an external source and warns a user that an external source is trying to access
their computer. Firewalls are the primary defence to any computer system to
protect from hacking, malware (viruses and spyware), phishing and pharming.
firewall (software
user’s computer internet
or hardware)
▲ Figure 6.2 Firewall
162
6
be software installed on a computer, sometimes as part of the operating system.
However, sometimes the firewall cannot prevent potential harmful traffic. It
cannot
» prevent individuals, on internal networks, using their own modems to
by-pass the firewall
» control employee misconduct or carelessness (for example, control of
passwords or user accounts)
» prevent users on stand-alone computers from disabling the firewall.
6.1
Data security
These issues require management and/or personal control to ensure the firewall
can work effectively.
Antivirus software
Running antivirus software in the background on a computer will constantly
check for virus attacks. Although different types of antivirus software work in
different ways, they all
» check software or files before they are run or loaded on a computer
» compare possible viruses against a database of known viruses
» carry out heuristic checking (check software for behaviour that could
indicate a virus, which is useful if software is infected by a virus not yet on
the database)
» quarantine files or programs which are possibly infected and
– allow the virus to be automatically deleted, or
– allow the user to make the decision about deletion (it is possible that
the user knows that the file or program is not infected by a virus – this
is known as a false positive and is one of the drawbacks of antivirus
software).
Antivirus software needs to be kept up to date since new viruses are constantly
being discovered. Full system checks need to be carried out regularly (once a
week, for example), since some viruses lie dormant and would only be picked up
by this full system scan.
Anti-spyware software
Anti-spyware software detects and removes spyware programs installed
illegally on a user’s computer system. The software is either based on rules
(it looks for typical features associated with spyware) or based on known file
structures which can identify common spyware programs.
Encryption
If data on a computer has been accessed illegally (by a hacker, for example) it
is possible to encrypt the data, making it virtually impossible to understand
without encryption keys to decode it. This cannot stop a hacker from deleting
the files, but it will stop them using the data for themselves. This is covered in
more depth in Chapter 17.
Biometrics
In an attempt to stay one step ahead of hackers and malware writers, many
modern computer devices use biometrics as part of the password system.
Biometrics rely on the unique characteristics of human beings. Examples
include fingerprint scans, retina scans (pattern of blood capillary structure),
face recognition and voice recognition.
163
while the scan takes place; it is very secure since nobody has yet found a way to
duplicate the blood vessels patterns’ (accuracy is about 1 in 10 million).
Mobile phones use biometrics to identify if the phone user is the owner.
Malware
Malware is one of the biggest risks to the integrity and security of data on a
computer system. Many software applications sold as antivirus are capable of
identifying and removing most of the forms of malware described below.
Viruses
Programs or program code that can replicate and/or copy themselves with the
intention of deleting or corrupting files or causing the computer to malfunction.
164
6
system that has already been infected before they can run.
Worms
A type of stand-alone virus that can replicate themselves with the intention of
spreading to other computers; they often use networks to search out computers
with weak security.
Logic bombs
Code embedded in a program on a computer. When certain conditions are met
6.1
(such as a specific date) they are activated to carry out tasks such as deleting
Data security
files or sending data to a hacker.
Trojan horses
Malicious programs often disguised as legitimate software. They replace all or
part of the legitimate software with the intent of carrying out some harm to
the user’s computer system.
Bots (internet robots)
Not always harmful and can be used, for example, to search automatically for
an item on the internet. However, they can cause harm by taking control over a
computer system and launching attacks.
Spyware
Software that gathers information by monitoring, for example, key presses on
the user’s keyboard. The information is then sent back to the person who sent
the software – sometimes referred to as key logging software.
Phishing
Phishing is when someone sends legitimate-looking emails to users. They
may contain links or attachments which, when clicked, take the user to a fake
website, or they may trick the user into responding with personal data such as
bank account details or credit card numbers. The email often appears to come
from a trusted source such as a bank or service provider. The key is that the
recipient has to carry out a task (click a link, for example) before the phishing
scam causes harm.
There are numerous ways to help prevent phishing attacks:
» Users need to be aware of new phishing scams. Those people in industry or
commerce should undergo frequent security awareness training to become
aware of how to identify phishing (and pharming) scams.
» Do not click on links unless certain that it is safe to do so; fake emails
can often be identified by greetings such as ‘Dear Customer’ or ‘Dear
[email protected]’, and so on.
» It is important to run anti-phishing toolbars on web browsers (this includes
tablets and mobile phones) since these will alert the user to malicious
websites contained in an email.
» Look out for https and/or the green padlock symbol in the address bar (both
suggest that traffic to and from the website is encrypted).
» Regularly check online accounts and frequently change passwords.
» Ensure an up-to-date browser, with all of the latest security upgrades,
is running, and run a good firewall in the background at all times. A
combination of a desktop firewall (usually software) and a network firewall
(usually hardware) considerably reduces risk.
165
6
through your defences, do not click on ‘cancel’ since this often leads to
phishing or pharming sites – the best option is to select the small X in the
top right hand corner of the pop-up window, which closes it down.
Pharming
Pharming is malicious code installed on a user’s computer or on a web
server. The code re-directs the user to a fake website without their
knowledge (the user does not have to take any action, unlike phishing). The
6 Security, privacy and data integrity
creator of the malicious code can gain personal data such as bank details
from users. Often, the website appears to belong to a trusted company and
can lead to fraud or identity theft.
Why does pharming pose a threat to data security?
Pharming redirects users to a fake or malicious website set up by, for example,
a hacker. Redirection from a legitimate website can be done using DNS cache
poisoning.
Every time a user types in a URL, their web browser contacts the DNS
server. The IP address of the website is then sent back to their web
browser. However, DNS cache poisoning changes the real IP address values
to those of the fake website consequently, the user’s computer connects to
the fake website.
Pharmers can also send malicious programming code to a user’s computer. The
code is stored on the HDD without their knowledge. Whenever the user types in
the website address of the targeted website, the malicious programming code
alters the IP address sent back to their browser which redirects it to the fake
website.
Protection against pharming
It is possible to mitigate the risk of pharming by
» using antivirus software, which can detect unauthorised alterations to a
website address and warn the user
» using modern web browsers that alert users to pharming and phishing
attacks
» checking the spelling of websites
» checking for https and/or the green padlock symbol in the address bar.
It is more difficult to mitigate risk if the DNS server itself has been infected
(rather than the user’s computer).
EXTENSION ACTIVITY 6C
Pharmers alter IP addresses in order to send users to fake websites.
However, the internet does not only have one DNS server. Find out how a
user’s internet service provider (ISP) uses its own DNS servers which cache
information from other internet DNS servers.
166
6.1
data (for example, operation
accidental deletion of n save data on a regular basis
Data security
a file) n use passwords and user IDs to restrict
access to authorised users only
167
For each issue described, describe a way to mitigate the threat which has
been posed.
2 Define these three terms.
a) Worm
b) Logic bomb
c) Trojan horse
3 John works for a car company. He maintains the database which contains
all the personal data of the people working for the car company. John was
born on 28 February 1990 and has two pet cats called Felix and Max.
a) John needs to use a password and a username to log onto the
database. Why would the following three passwords not be a good
choice?
i) 280290
ii) FeLix1234
iii) John04
b) Describe how John could improve his passwords.
How should he maintain his passwords to maximise database
security?
c) When John enters a password on his computer, he is presented with
the following question on screen.
168
Automatic repeat range checks whether data typing in somebody’s typing in somebody’s
request (ARQ) – a type entered is between age as −120 age as 48
of verification check. a lower and an upper
Acknowledgement – limit
message sent to a format checks whether data typing in the date as typing in the date as
receiver to indicate that has been entered in the 12-12-20 where the 12/12/2020 where the
data has been received
agreed format format is dd/mm/yyyy format is dd/mm/yyyy
without error.
length checks whether data typing in a telephone typing in a telephone
Timeout – time allowed
to elapse before an
has the required number as 012 345 678 number as
acknowledgement is number of characters or when it should contain 012 345 678 90 when it
received. numbers 11 digits should contain 11 digits
presence checks to make sure a please enter passport please enter passport
field is not left empty number:……………… number: AB 1234567 CD
when it should contain
data
existence checks if data in a file data look up for car data look up for a file
or a file name actually registration plate A123 called books_in_stock
exists BCD which does not which exists in a
exist database
limit check Checks only one of typing in age as −25 typing in somebody’s
the limits (such as where the data entered age as 72 where the
the upper limit OR the should not be negative upper limit is 140
lower limit)
consistency checks whether data typing in Mr in the title typing in Ms in the
check in two or more fields field and then choosing title field and then
match up correctly female in the sex field choosing female in the
sex field
uniqueness checks that each choosing the user name choosing the website
check entered value is unique MAXIMUS222 in a social name Aristooo.com
networking site but which is not already
the user name already used
exists
▲ Table 6.1 Common validation
6.2.2 Verification
Verification is a way of preventing errors when data is entered manually (using a
keyboard, for example) or when data is transferred from one computer to another.
170
Figure 6.6 shows a barcode with an ISBN-13 code with check digit.
9780340983829 An example of a check digit calculation is modulo-11. The following algorithm
▲ Figure 6.6 Barcode is used to generate the check digit for a number with seven digits:
1 Each digit in the number is given a weighting of 7, 6, 5, 4, 3, 2 or 1, starting
from the left.
2 The digit is multiplied by its weighting and then each value is added to
make a total.
3 The total is divided by 11 and the remainder subtracted from 11.
4 The check digit is the value generated; note if the check digit is 10 then
X is used.
For example:
When this number is entered, the check digit is recalculated and, if the same
value is not generated, an error has occurred. For example, if 4 1 5 7 6 1 0 4
was entered, the check digit generated would be 3, indicating an error.
171
3 Find a common use for the modulo-11 method of generating check digits.
When a block of data is about to be transmitted, the checksum for the bytes
is first calculated. This value is transmitted with the block of data. At the
receiving end, the checksum is re-calculated from the block of data received.
This calculated value is compared to the checksum transmitted. If they are the
same, then the data was transmitted without any errors; if they are different,
then a request is sent for the data to be re-transmitted.
172
▲ Figure 6.8
If this byte is using even parity, then the parity bit needs to be 0 since there is
already an even number of 1-bits (in this case, four).
If odd parity is being used, then the parity bit needs to be 1 to make the
number of 1-bits odd. Therefore, the byte just before transmission would be:
either (even parity): 0 1 1 0 1 1 0 0
parity bit
or (odd parity): 1 1 1 0 1 1 0 0
parity bit
▲ Figure 6.9
EXTENSION ACTIVITY 6E
Find the parity bits for each of the following bytes:
1 1 1 0 1 1 0 1 even parity used
2 0 0 0 1 1 1 1 even parity used
3 0 1 1 1 0 0 0 even parity used
4 1 1 1 0 1 0 0 odd parity used
5 1 0 1 1 0 1 1 odd parity used
If a byte has been transmitted from ‘A’ to ‘B’, and even parity is used, an error
would be flagged if the byte now had an odd number of 1-bits at the receiver’s
end.
For example:
Sender’s byte: 0 1 0 1 1 1 0 0
parity bit
Receiver’s byte: 0 1 0 0 1 1 0 0
parity bit
▲ Figure 6.10
173
6
parity, while the byte from the sender had even parity (four 1-bits). This means
an error has occurred during the transmission of the data.
The error is detected by the computer re-calculating the parity of the byte
sent. If even parity has been agreed between sender and receiver, then a
change of parity in the received byte indicates that a transmission error has
occurred.
EXTENSION ACTIVITY 6F
6 Security, privacy and data integrity
Naturally, any of the bits in the above example could have been changed
leading to a transmission error. Therefore, even though an error has been
flagged, it is impossible to know exactly which bit is in error.
One of the ways around this problem is to use parity blocks. In this method,
a block of data is sent and the number of 1-bits are totalled horizontally and
vertically (in other words, a parity check is done in both horizontal and vertical
directions). As the following example shows, this method not only identifies
that an error has occurred but also indicates where the error is.
In this example, nine bytes of data have been transmitted. Agreement has
been made that even parity will be used. Another byte, known as the parity
byte, has also been sent. This byte consists entirely of the parity bits
produced by the vertical parity check. The parity byte also indicates the end
of the block of data.
Table 6.2 shows how the data arrived at the receiving end:
parity bit bit 2 bit 3 bit 4 bit 5 bit 6 bit 7 bit 8
byte 1 1 1 1 1 0 1 1 0
byte 2 1 0 0 1 0 1 0 1
byte 3 0 1 1 1 1 1 1 0
byte 4 1 0 0 0 0 0 1 0
byte 5 0 1 1 0 1 0 0 1
byte 6 1 0 0 0 1 0 0 0
byte 7 1 0 1 0 1 1 1 1
byte 8 0 0 0 1 1 0 1 0
byte 9 0 0 0 1 0 0 1 0
parity 1 1 0 1 0 0 0 1
byte
▲ Table 6.2
174
which would also correct column 5 giving an even vertical parity (now has four
1-bits).
This byte could, therefore, be corrected automatically, as shown above, or an
error message could be relayed back to the sender asking them to re-transmit
the block of data. One final point; if two of the bits change value following
data transmission, it may be impossible to locate the error using the above
method.
For example, using the above example again:
0 1 0 1 1 1 0 0
This byte could reach the destination as:
0 1 1 1 1 1 0 1
or: 0 1 0 1 0 0 0 0
or: 0 1 0 1 0 1 1 0
All three are clearly incorrect, but they have retained even parity so will
not trigger an error message at the receiving end. Clearly, other methods to
complement parity when it comes to error checking of transmitted data are
required (such as checksum).
Automatic repeat request (ARQ)
Automatic repeat request (ARQ) is another method to check data following
data transmission. This method can be summarised as follows:
» ARQ uses acknowledgement (a message sent to the receiver indicating that
data has been received correctly) and timeout (the time interval allowed to
elapse before an acknowledgement is received).
» When the receiving device detects an error following data transmission, it
asks for the data packet to be re-sent.
» If no error is detected, a positive acknowledgement is sent to the sender.
» The sending device will re-send the data package if
– it receives a request to re-send the data, or
– a timeout has occurred.
» The whole process is continuous until the data packet received is correct or
until the ARQ time limit (timeout) is reached.
» ARQ is often used by mobile phone networks to guarantee data integrity.
175
byte 1 0 1 1 0 0 0 1 0
byte 2 1 0 1 1 1 1 1 1
byte 3 1 0 0 1 1 0 0 0
byte 4 0 1 1 0 1 0 1 0
byte 5 1 1 1 0 0 1 1 0
byte 6 1 0 0 0 0 1 0 1
byte 7 0 1 1 1 0 0 0 0
byte 8 0 0 0 0 0 0 0 1
byte 9 0 1 1 1 1 0 1 0
parity 1 0 1 1 1 1 0 0
byte
① Name of person
② Date of birth
③ Telephone number
④ Title
176
177