Cryptography · Unit 7 · 3 hrs
Malicious Logic
Exam-focused notes for Malicious Logic (Cryptography, CSC327): what the TU syllabus asks and how it has actually been tested, with 7 solved past questions from this unit.
Malicious Logic in short
The final unit turns from protecting data in transit to protecting the systems that store and process it, covering the software threats that try to subvert a system from within and the intruders and detection systems that try to catch them.
What this unit covers
- Malicious Logic
- Types of Malicious Logic: Virus, Worm, Trojan Horse, Zombies, Denial of Service Attacks
- Intrusion
- Intruders and their types
- Intrusion Detection System
Types of Malicious Logic
2082 · 5 marks
Describe any three types of malicious logic. [5]
Show solved answerHide answer
Malicious Logic
Malicious Logic (Malicious Code / Rogue Programs)
Malicious logic refers to a set of instructions or programs that are intentionally designed to cause harm, unauthorized access, or disruption to a computer system or network.
1. Trojan Horse
A Trojan Horse is a program that appears to perform a legitimate or useful function but secretly contains hidden code that performs unauthorized or harmful actions when executed.
- It does not replicate itself (unlike a virus).
- It tricks the user into running it by disguising itself as a legitimate program.
- Example: A user downloads what appears to be a free game, but the program secretly installs a backdoor, allowing an attacker to gain remote access to the system.
- Damage: Data theft, unauthorized access, system damage.
2. Virus
A virus is a piece of malicious code that attaches itself to a legitimate program or file and replicates when that program is executed. It requires a host program to spread.
- It can spread from one computer to another through infected files, email attachments, or removable media.
- A virus typically has two phases:
- Infection phase: It attaches itself to other programs.
- Attack phase: It performs its malicious activity (deleting files, corrupting data, etc.).
- Example: A virus attached to a
.exefile that corrupts system files when executed. - Damage: File corruption, system crashes, data loss.
3. Worm
A worm is a self-contained, self-replicating program that spreads across networks without needing to attach itself to a host program. Unlike a virus, it does not require user interaction to propagate.
- It exploits vulnerabilities in operating systems or network services to spread automatically.
- Worms consume network bandwidth and system resources, causing slowdowns or crashes.
- Example: The Morris Worm (1988) spread across the Internet by exploiting UNIX vulnerabilities, causing widespread system slowdowns.
- Damage: Network congestion, system resource exhaustion, data theft.
Summary Table
| Type | Replicates? | Needs Host? | Spreads Via |
|---|---|---|---|
| Trojan Horse | No | Yes (disguise) | User deception |
| Virus | Yes | Yes (host file) | Infected files/media |
| Worm | Yes | No | Network/vulnerabilities |
Other types of malicious logic include Logic Bombs (code that triggers under specific conditions) and Trapdoors/Backdoors (hidden entry points left by developers for unauthorized access).
2079 · 5 marks
Differentiate between Trojan horse and virus. Describe any two types of intruders. [5]
2076 · 5 marks
How does the nature of worms differ from viruses? Define PKI with its architecture model. [5]
Intrusion Detection System
2081 · 5 marks
What is intrusion? Explain any two types of intrusion detection system. [5]
Show solved answerHide answer
Intrusion and Intrusion Detection Systems
What is Intrusion?
Intrusion detection is the process of identifying and responding to malicious activity targeted at a resource. An intrusion refers to any unauthorized attempt to access, manipulate, or compromise a system's resources, data, or services.
An Intrusion Detection System (IDS) is a system designed to test/analyze network system traffic/events against a given set of parameters and alert/capture data when these thresholds are met. IDS uses collected information and pre-defined knowledge-based systems to reason about the possibility of an intrusion. It also provides services to cope with intrusion such as giving alarms and activating programs to deal with intrusion.
Two Types (Approaches) of Intrusion Detection System
1. Statistical Anomaly Detection
Statistical anomaly detection involves the collection of data relating to the behaviours of legitimate users over a period of time. Then statistical tests are applied to observed behaviour to determine with a high level of confidence whether the behaviour is that of a legitimate user or not.
It falls into two broad categories:
-
Threshold Detection:
- Involves counting the number of occurrences of a specified event type over an interval of time.
- If the count exceeds a reasonable number, an intrusion is assumed.
- Example: Too many failed login attempts within a short time.
-
Profile-Based Anomaly Detection:
- Focuses on characterizing the past behaviour of individual users or related groups of users.
- Significant deviations from the established profile are flagged as potential intrusions.
2. Rule-Based Detection
Rule-based detection involves an attempt to define a set of rules that can be used to decide whether a given behaviour is that of an intruder.
It falls into two broad categories:
-
Rule-Based Anomaly Detection:
- Historical audit records are analyzed to identify usage patterns.
- Rules are generated automatically to describe those patterns.
- Any behaviour that deviates from these rules is flagged as suspicious.
-
Rule-Based Penetration Identification:
- Uses rules for identifying known penetrations or penetrations that would exploit known weaknesses.
- Rules are typically defined by security experts based on known attack signatures.
- Example: A rule that detects a specific sequence of commands known to exploit a vulnerability.
Summary Table:
| Approach | Basis | Method |
|---|---|---|
| Statistical Anomaly Detection | Behaviour deviation from normal | Threshold / Profile-based |
| Rule-Based Detection | Predefined rules | Anomaly rules / Penetration rules |
2078 · 5 marks
What does intrusion mean? How the system detect intrusion? List any four types of firewall. [5]
Malicious Logic
2080 · 5 marks
What is malicious logic? How zombies are different from trojan horses? [5]
Intruders and their types
2076 · 5 marks
Write short notes on: a. Classes of Intruder b. SSL c. DoS Attack [5]
Make Unit 7 stick
Practice CSC327 with flashcards & quizzes