NETWORK SECURITY MODULE 4
NETWORK SECURITY MODULE 4
NETWORK SECURITY MODULE 4
NETWORK SECURITY
animus toward her former employee; she simply wanted the data because it would be useful to her. latter are readily available on hacker bulletin boards.
Although IDS and IPS facilities can be useful in countering insider attacks, other more direct ● Collect information about users, such as their full names, the names of their spouse and
approaches are of higher priority. Examples include the following: children, pictures in their office, and books in their office that are related to hobbies.
● Enforce least privilege, only allowing access to the resources employees need to do their job. ● Try users’ phone numbers, Social Security numbers, and room numbers.
● Set logs to see what users access and what commands they are entering. ● Try all legitimate license plate numbers for this state.
● Protect sensitive resources with strong authentication. ● Use a Trojan to bypass restrictions on access.
● Upon termination, delete employee’s computer and network access. ● Tap the line between a remote user and the host system.
● Upon termination, make a mirror image of employee’s hard drive before reissuing it. That
evidence might be needed if your company information turns up at a competitor.
Intrusion Detection
Inevitably, the best intrusion prevention system will fail. A system’s second line of defence is
Intrusion Techniques intrusion detection, and this has been the focus of much research in recent years. This interest is motivated
The objective of the intruder is to gain access to a system or to increase the range of privileges by a number of considerations, including the following:
accessible on a system. Most initial attacks use system or software vulnerabilities that allow a user to
If an intrusion is detected quickly enough, the intruder can be identified and ejected from the
execute code that opens a back door into the system. Alternatively, the intruder attempts to acquire
system before any damage is done or any data are compromised. Even if the detection is not
Network Security 21EC742
sufficiently timely to pre-empt the intruder, the sooner that the intrusion is detected, the less the
amount of damage and the more quickly that recovery can be achieved.
An effective intrusion detection system can serve as a deterrent, so acting to prevent Intrusions.
Intrusion detection enables the collection of information about intrusion techniques that can be
that the task of detecting a misfeasor (legitimate user performing in an unauthorized fashion) is more 2. Rule-based detection: Involves an attempt to define a set of rules that can be used to decide
difficult, in that the distinction between abnormal and normal behaviour maybe small. Anderson that a given behaviour is that of an intruder.
concluded that such violations would be undetectable solely through the search for anomalous behaviour. ● Anomaly detection: Rules are developed to detect deviation from previous usage patterns.
However, misfeasor behaviour might nevertheless be detectable by intelligent definition of the class of ● Penetration identification: An expert system approach that searches for suspicious
conditions that suggest unauthorized use. Finally, the detection of the clandestine user was felt to be behaviour.
beyond the scope of purely automated techniques. These observations, which were made in 1980, remain Audit Records
true today.
A fundamental tool for intrusion detection is the audit record. Some record of ongoing activity by
users must be maintained as input to an intrusion detection system. Basically, two plans are used:
● Native audit records: Virtually all multiuser operating systems include accounting software that
collects information on user activity. The advantage of using this information is that no additional
collection software is needed. The disadvantage is that the native audit records may not contain
the needed information or may not contain it in a convenient form.
Network Security 21EC742
● Detection-specific audit records: A collection facility can be implemented that generates audit The decomposition of a user operation into elementary actions has three advantages:
records containing only that information required by the intrusion detection system. One advantage ● Because objects are the protectable entities in a system, the use of elementary actions enables an
of such an approach is that it could be made vendor independent and ported to a variety of systems. audit of all behaviour affecting an object. Thus, the system can detect attempted subversions of
The disadvantage is the extra overhead involved in having, in effect, two accounting packages access controls (by noting an abnormality in the number of exception conditions returned) and can
running on a machine. detect successful subversions by noting an abnormality in the set of objects accessible to the subject.
A good example of detection-specific audit records is one developed by Dorothy Denning. Each audit ● Single-object, single-action audit records simplify the model and the implementation.
record contains the following fields: ● Because of the simple, uniform structure of the detection-specific audit records, it may be relatively
● Subject: Initiators of actions. A subject is typically a terminal user but might also be process acting easy to obtain this information or at least part of it by a straightforward mapping from existing
on behalf of users or groups of users. All activity arises through commands issued by subjects. native audit records to the detection-specific audit records.
Subjects may be grouped into different access classes, and these classes may overlap.
● Action: Operation performed by the subject on or with an object; for example, login, read, perform
I/O, execute. Statistical Anomaly Detection
● Object: Receptors of actions. Examples include files, programs, messages, records, terminals,
printers, and user- or program-created structures. When a subject is the recipient of an action, such As was mentioned, statistical anomaly detection techniques fall into two broad categories:
as electronic mail, then that subject is considered an object. Objects may be grouped by type. Object threshold detection and profile-based systems. Threshold detection involves counting the number of
granularity may vary by object type and by environment. For example, database actions may be occurrences of a specific event type over an interval of time. If the count surpasses what is considered a
audited for the database as a whole or at the record level. reasonable number that one might expect to occur, then intrusion is assumed.
● Exception-Condition: Denotes which, if any, exception condition is raised on return. Threshold analysis, by itself, is a crude and ineffective detector of even moderately sophisticated
● Resource-Usage: A list of quantitative elements in which each element gives the amount used of attacks. Both the threshold and the time interval must be determined. Because of the variability across
some resource (e.g., number of lines printed or displayed, number of records read or written, users, such thresholds are likely to generate either a lot of false positives or a lot of false negatives.
processor time, I/O units used, session elapsed time). However, simple threshold detectors may be useful in conjunction with more sophisticated techniques.
● Time-Stamp: Unique time-and-date stamp identifying when the action took place. Profile-based anomaly detection focuses on characterizing the past behaviour of individual users
Most user operations are made up of a number of elementary actions. For example, a file copy involves or related groups of users and then detecting significant deviations. A profile may consist of a set of
the execution of the user command, which includes doing access validation and setting up the copy, plus parameters, so that deviation on just a single parameter may not be sufficient in itself to signal an alert.
the read from one file, plus the write to another file. Consider the command The foundation of this approach is an analysis of audit records. The audit records provide input
COPY GAME.EXE TO <Libray>GAME.EXE to the intrusion detection function in two ways. First, the designer must decide on a number of
Issued by Smith to copy an executable file GAME from the current directory to the<Library> directory. quantitative metrics that can be used to measure user behaviour. An analysis of audit records over a period
The following audit records may be generated: of time can be used to determine the activity profile of the average user. Thus, the audit records serve to
define typical behaviour. Second, current audit records are the input used to detect intrusion. That is, the
intrusion detection model analyzes incoming audit records to determine deviation from average
behaviour.
Examples of metrics that are useful for profile-based intrusion detection are the following:
In this case, the copy is aborted because Smith does not have write permission to<Library>.
● Counter: A nonnegative integer that may be incremented but not decremented until it is reset by
management action. Typically, a count of certain event types is kept over a particular period of
time. Examples include the number of logins by a single user during an hour, the number of times
Network Security 21EC742
a given command is executed during a single user session, and the number of password failures can be deduced from certain types of activities. For example, a large number of login attempts over a
during a minute. short period suggest an attempted intrusion.
● Gauge: A nonnegative integer that may be incremented or decremented. Typically, a gauge is used As an example of the use of these various metrics and models, Table 6.2 shows various measures
to measure the current value of some entity. Examples include the number of logical connections considered or tested for the Stanford Research Institute(SRI) intrusion detection system(IDES) .The
assigned to a user application and the number of outgoing messages queued for a user process. main advantage of the use of statistical profiles is that a prior knowledge of security flaws is not required.
● Interval timer: The length of time between two related events. An example is the length of time The detector program learns what ―normalǁ behaviour is and then looks for deviations. The approach is
between successive logins to an account. not based on system-dependent characteristics and vulnerabilities. Thus, it should be readily portable
● Resource utilization: Quantity of resources consumed during a specified period. Examples include among a variety of system.
the number of pages printed during a user session and total time consumed by a program execution.
Given these general metrics, various tests can be performed to determine whether current activity fits
within acceptable limits. [DENN87] lists the following approaches that may be taken: Table 4.1: Measures That May Be Used for Intrusion Detection
Mean and standard deviation
● Multivariate
● Markov process
● Time series
● Operational
The simplest statistical test is to measure the mean and standard deviation of a parameter over some
historical period. This gives a reflection of the average behaviour and its variability. The use of mean and
standard deviation is applicable to a wide variety of counters, timers, and resource measures. But these
measures, by themselves, are typically too crude for intrusion detection purposes.
A multivariate model is based on correlations between two or more variables. Intruder behavior
may be characterized with greater confidence by considering such correlations (for example, processor
time and resource usage, or login frequency and session elapsed time).
A Markov process model is used to establish transition probabilities among various states. As an
example, this model might be used to look at transitions between certain commands.
A time series model focuses on time intervals, looking for sequences of events that happen too
rapidly or too slowly. A variety of statistical tests can be applied to characterize abnormal timing.
Finally, an operational model is based on a judgment of what is considered abnormal, rather than an
automated analysis of past audit records. Typically, fixed limits are defined and intrusion is suspected for
an observation that is outside the limits. This types of approach works best where intruder behavior
Network Security 21EC742
● Users should not be logged in more than once to the same system.
● Users do not make copies of system programs.
● Users must not write other users’ files. data. Integrity is required to prevent an intruder from masking his or her activities by altering the
● Users who log in after hours often access the same files they used earlier. transmitted audit information. Confidentiality is required because the transmitted audit information
● Users do not generally open disk devices directly but rely on higher-level operating system could be valuable.
utilities.
Network Security 21EC742
● Either a centralized or decentralized architecture can be used. With a centralized architecture, changing a file’s access control. At the next higher level, the agent looks for sequences of events, such
there is a single central point of collection and analysis of all audit data. This eases the task of as known attack patterns (signatures). Finally, the agent looks for anomalous behaviour of an individual
correlating incoming reports but creates a potential bottleneck and single point of failure. With a user based on a historical profile of that user, such as number of programs executed, number of files
decentralized architecture, there are more than one analysis centers, but these must coordinatetheir accessed, and the like.
activities and exchange information.
Figure 20.2 shows the overall architecture, which consists of three main components: individual systems for copies of HARs to correlate with those from other agents.
• Host agent module: An audit collection module operating as a background process on a monitored The LAN monitor agent also supplies information to the central manager. The LAN monitor agent
system. Its purpose is to collect data on security related events on the host and transmit these to the audits host-host connections, services used, and volume of traffic. It searches for significant events, such
central manager. as sudden changes in network load, the use of security-related services, and network activities such as
• LAN monitor agent module: Operates in the same fashion as a host agent module except that it rlogin.
analyzes LAN traffic and reports the results to the central manager. The architecture depicted in Figures 7.2 and 7.3 is quite general and flexible. It offers a foundation
• Central manager module: Receives reports from LAN monitor and host agents and processes and for a machine-independent approach that can expand from stand-alone intrusion detection toa system that
correlates these reports to detect intrusion. is able to correlate activity from a number of sites and networks to detect suspicious activity that would
The scheme is designed to be independent of any operating system or system auditing otherwise remain undetected.
implementation. Figure 20.3 [SNAP91] shows the general approach that is taken. The agent captures
each audit record produced by the native audit collection system. A filter is applied that retains only those
records that are of security interest. These records are then reformatted into a standardized format referred
to as the host audit record (HAR). Next, a template-driven logic module analyzes the records for
suspicious activity. At the lowest level, the agent scans for notable events that are of interest independent
of any past events. Examples include failed file accesses, accessing system files, and
Network Security 21EC742
Honey pots
A relatively recent innovation in intrusion detection technology is the honey pot. Honey pots are
Malicious software programs, Viruses and related Threats, Virus Countermeasure.
decoy systems that are designed to lure a potential attacker away from critical systems. Honey pots are
designed to
● Divert an attacker from accessing critical systems
CHAPTER 2 - MALICIOUS
● Collect information about the attacker’s activity SOFTWARE
● Encourage the attacker to stay on the system long enough for administrators to respond The terminology in this area presents problems because of a lack of universal agreement on all of
These systems are filled with fabricated information designed to appear valuable but that a the terms and because some of the categories overlap.
legitimate user of the system wouldn’t access. Thus, any access to the honey pot is suspect. The system Malicious software can be divided into two categories: those that need a host program, and those
is instrumented with sensitive monitors and event loggers that detect these accesses and collect that are independent. The former, referred to as parasitic, are essentially fragments of programs that
information about the attacker’s activities. Because any attack against the honey pot is made to seem cannot exist independently of some actual application program, utility, or system program. Viruses, logic
successful, administrators have time to mobilize and log and track the attacker without ever exposing bombs,
productive systems. Table 4.2 Terminology of Malicious Programs
Initial efforts involved a single honey pot computer with IP addresses designed to attracthackers.
More recent research has focused on building entire honey pot networks that emulate an enterprise,
possibly with actual or simulated traffic and data. Once hackers are within the network, administrators
can observe their behaviour in detail and figure out defences.
Viruses and other malware may operate in multiple ways. The terminology is far from uniform; the infected computer comes into contact with an uninfected piece of software, a fresh copy of the virus
this subsection gives a brief introduction to several related concepts that could be considered multiple- passes into the new program. Thus, the infection can be spread from computer to computer by
threat malware. unsuspecting users who either swap disks or send programs to one another over a network. In a network
A multipartite virus infects in multiple ways. Typically, the multipartite virus is capable of environment, the ability to access applications and system services on other computers provides a perfect
infecting multiple types of files, so that virus eradication must deal with all of the possible sites of culture for the spread of a virus.
infection. A virus can do anything that other programs do. The difference is that a virus attaches itself to
A blended attack uses multiple methods of infection or transmission, to maximize the speed of another program and executes secretly when the host program is run. Once a virus is executing, it can
contagion and the severity of the attack. Some writer’s characterize a blended attack as a package that perform any function, such as erasing files and programs that is allowed by the privileges of the current
includes multiple types of malware. An example of a blended attack is the Nimda attack, erroneously user.
referred to as simply a worm. Nimda uses four distribution methods: A computer virus has three parts :
● E-mail: A user on a vulnerable host opens an infected e-mail attachment; Nimda looks for e- mail ● Infection mechanism: The means by which a virus spreads, enabling it to replicate. The
addresses on the host and then sends copies of itself to those addresses. mechanism is also referred to as the infection vector.
Network Security 21EC742
● Trigger: The event or condition that determines when the payload is activated or delivered. to the original program. If the infection phase of the program is reasonably rapid, a user is unlikely to
● Payload: What the virus does, besides spreading. The payload may involve damage or may notice any difference between the execution of an infected and an uninfected program.
involve benign but noticeable activity. A virus such as the one just described is easily detected because an infected version of a program
During its lifetime, a typical virus goes through the following four phases: is longer than the corresponding uninfected one. A way to thwart such a simple means of detecting a
● Dormant phase: The virus is idle. The virus will eventually be activated by some event, such as virus is to compress the executable file so that both the infected and uninfected versions are of identical
a date, the presence of another program or file, or the capacity of the disk exceeding some limit. length. Figure 7.2 shows in general terms the logic required. The key lines in this virus are numbered,
Not all viruses have this stage. illustrates the operation. We assume that program P1 is infected with the virus CV. When this program
● Propagation phase: The virus places a copy of itself into other programs or into certain system is invoked, control passes to its virus, which performs the following steps:
areas on the disk. The copy may not be identical to the propagating version; viruses often morph 1. For each uninfected file P2 that is found, the virus first compresses that file to produce ,
to evade detection. Each infected program will now contain a clone of the virus, which will itself which is shorter than the original program by the size of the virus.
enter a propagation phase. 2. A copy of the virus is prepended to the compressed program.
● Triggering phase: The virus is activated to perform the function for which it was intended. As 3. The compressed version of the original infected program, , is uncompressed.
with the dormant phase, the triggering phase can be caused by a variety of system events, 4. The uncompressed original program is executed.
including a count of the number of times that this copy of the virus has made copies of itself.
● Execution phase: The function is performed. The function may be harmless, such as a message
on the screen, or damaging, such as the destruction of programs and data files. Most viruses carry
out their work in a manner that is specific to a particular operating system and, in some cases,
specific to a particular hardware platform. Thus, they are designed to take advantage of the details
and weaknesses of particular systems.
Viruses Classification A more effective approach is to use encryption.The strategy of the encryption virusis followed. The
portion of the virus that is responsible for generating keys andperforming encryption/decryption is
There has been a continuous arms race between virus writers and writers of antivirus software
referred to as the mutation engine. The mutationengine itself is altered with each use.
since viruses first appeared. As effective countermeasures are developed for existing types of viruses,
newer types are developed. There is no simple or universally agreed upon classification scheme for
Virus Kits
viruses, In this section, classify viruses along two orthogonal axes: the type of target the virus tries to
Another weapon in the virus writers’ armory is the virus-creation toolkit. Such a toolkit enables a relative
infect and the method the virus uses to conceal itself from detection by users and antivirus software.
novice to quickly create a number of different viruses. Although viruses created with toolkits tend to be
A virus classification by target includes the following categories: less sophisticated than viruses designed from scratch, the sheer number of new viruses that can be
• Boot sector infector: Infects a master boot record or boot record and spreads when a system is generated using a toolkit creates a problem for antivirus schemes.
booted from the disk containing the virus.
• File infector: Infects files that the operating system or shell consider to be executable.
Macro Viruses
• Macro virus: Infects files with macro code that is interpreted by an application. A virus
In the mid-1990s, macro viruses became by far the most prevalent type of virus.Macro viruses are
classification by concealment strategy includes the following categories:
particularly threatening for a number of reasons:
• Encrypted virus: A typical approach is as follows. A portion of the virus creates a random
1. A macro virus is platform independent. Many macro viruses infect MicrosoftWord documents
encryption key and encrypts the remainder of the virus. The key is stored with the virus. When an
or other Microsoft Office documents. Any hardware platformand operating system that supports these
infected program is invoked, the virus uses the stored random key to decrypt the virus. When the
applications can be infected.
virus replicates, a different random key is selected. Because the bulk of the virus is encrypted with
2. Macro viruses infect documents, not executable portions of code. Most of theinformation
a different key for each instance, there is no constant bit pattern to observe.
introduced onto a computer system is in the form of a documentrather than a program.
• Stealth virus: A form of virus explicitly designed to hide itself from detectionby antivirus
3. Macro viruses are easily spread.A very common method is by electronic mail.
software.Thus, the entire virus, not just a payload is hidden.
4. Because macro viruses infect user documents rather than system programs, traditionalfile
• Polymorphic virus: A virus that mutates with every infection, making detectionby the
system access controls are of limited use in preventing their spread.
―signatureǁ of the virus impossible.
• Metamorphic virus: As with a polymorphic virus, a metamorphic virus mutateswith every
infection.The difference is that a metamorphic virus rewrites itself completely at each iteration,
increasing the difficulty of detection.
Network Security 21EC742
Macro viruses take advantage of a feature found in Word and other officeapplications such as macros.This goal is, in general, impossible to achieve,although prevention can reduce the number of
Microsoft Excel, namely the macro. In essence, a macro is anexecutable program embedded in a word successful viral attacks.The next best approach is to be able to do the following:
processing document or other type of file.Typically, users employ macros to automate repetitive tasks • Detection: Once the infection has occurred, determine that it has occurredand locate the virus.
and thereby savekeystrokes. The macro language is usually some form of the Basic • Identification: Once detection has been achieved, identify the specific virusthat has infected a
programminglanguage.A user might define a sequence of keystrokes in a macro and set it up sothat the program.
macro is invoked when a function key or special short combination of keysis input. • Removal: Once the specific virus has been identified, remove all traces of thevirus from the
Successive releases of MS Office products provide increased protectionagainst macro viruses. For infected program and restore it to its original state. Remove thevirus from all infected systems so that
example, Microsoft offers an optional Macro VirusProtection tool that detects suspicious Word files and the virus cannot spread further.If detection succeeds but either identification or removal is not possible,
alerts the customer to thepotential risk of opening a file with macros.Various antivirus product vendors then the alternative is to discard the infected file and reload a clean backup version.Advances in virus
havealso developed tools to detect and correct macro viruses. As in other types ofviruses, the arms race and antivirus technology go hand in hand. Early viruseswere relatively simple code fragments and could
continues in the field of macro viruses, but they no longer arethe predominant virus threat. be identified and purged withrelatively simple antivirus software packages. As the virus arms race has
evolved,both viruses and, necessarily, antivirus software have grown more complex andsophisticated.
A more recent development in malicious software is the e-mail virus. The firstrapidly spreading • First generation: simple scanners
e-mail viruses, such as Melissa, made use of a Microsoft Wordmacro embedded in an attachment. If the • Second generation: heuristic scanners
recipient opens the e-mail attachment, theWord macro is activated.Then • Third generation: activity traps
1. The e-mail virus sends itself to everyone on the mailing list in the user’s e-mailpackage. • Fourth generation: full-featured protection
A first-generation scanner requires a virus signature to identify a virus. Thevirus may contain
2. The virus does local damage on the user’s system.
―wildcardsǁ but has essentially the same structure and bit patternin all copies. Such signature-specific
In 1999, a more powerful version of the e-mail virus appeared. This newerversion can be activated
scanners are limited to the detection of knownviruses. Another type of first-generation scanner maintains
merely by opening an e-mail that contains the virus ratherthan opening an attachment. The virus uses
a record of the length ofprograms and looks for changes in length.
the Visual Basic scripting languagesupported by the e-mail package.
A second-generation scanner does not rely on a specific signature. Rather, thescanner uses
Thus we see a new generation of malware that arrives via e-mail and uses e-mailsoftware features to
heuristic rules to search for probable virus infection. One class of suchscanners looks for fragments of
replicate itself across the Internet. The virus propagates itself assoon as it is activated (either by opening
code that are often associated with viruses. Forexample, a scanner may look for the beginning of an
an e-mail attachment or by opening thee-mail) to all of the e-mail addresses known to the infected host.
encryption loop used in a polymorphicvirus and discover the encryption key. Once the key is discovered,
As a result, whereasviruses used to take months or years to propagate, they now do so in hours.This
the scanner can decrypt the virus to identify it, then remove the infection and returnthe program to service.
makesit very difficult for antivirus software to respond before much damage is done.Ultimately, a greater
Another second-generation approach is integrity checking. A checksum canbe appended to each
degree of security must be built into Internet utility and applicationsoftware on PCs to counter the
program. If a virus infects the program without changing thechecksum, then an integrity check will catch
growing threat.
the change. To counter a virus that issophisticated enough to change the checksum when it infectsa
program, anencrypted hash function can be used. The encryption key is stored separately fromthe
VIRUS COUNTERMEASURES program so that the virus cannot generate a new hash code and encrypt that. Byusing a hash function
Antivirus Approaches rather than a simpler checksum, the virus is prevented fromadjusting the program to produce the same
The ideal solution to the threat of viruses is prevention: Do not allow a virus to getinto the system hash code as before.
in the first place, or block the ability of a virus to modify any filescontaining executable code or
Network Security 21EC742
Third-generation programs are memory-resident programs that identify avirus by its actions
rather than its structure in an infected program. Such programshave the advantage that it is notnecessary
to develop signatures and heuristics for awide array of viruses. Rather, it is necessary only to identify the
small set of actionsthat indicate an infection is being attempted and then to intervene.
Fourth-generation products are packages consisting of a variety of antivirustechniques used in
conjunction. These include scanning and activity trap components.In addition, such a package includes
access control capability, which limits theability of viruses to penetrate a system and then limits the
ability of a virus to updatefiles in order to pass on the infection.
The arms race continues.With fourth-generation packages, a more comprehensivedefense strategy is
employed, broadening the scope of defense to moregeneral-purpose computer security measures.