Introduction To Intrusion
Introduction To Intrusion
Need to intrusion:
1. Isolate the affected systems: Disconnect compromised devices from the network to prevent
further spread of the intrusion.
2. Alert your team: Inform your IT/security team about the intrusion so they can assess the
situation and take appropriate actions.
3. Change passwords: Immediately change passwords for all affected accounts and systems.
Ensure that strong, unique passwords are used.
4. Scan for malware: Run antivirus and anti-malware scans on all affected systems to identify
and remove any malicious software.
5. Review logs: Examine system logs, network traffic logs, and any other relevant logs to
identify the source and extent of the intrusion.
6. Patch vulnerabilities: If the intrusion exploited known vulnerabilities, apply patches and
updates to affected systems to prevent further exploitation.
7. Inform stakeholders: Depending on the severity and impact of the intrusion, consider
notifying relevant stakeholders, such as customers, partners, and regulatory authorities.
8. Restore from backups: If necessary, restore affected systems from clean backups to ensure
they are free from any malicious activity.
9. Implement security enhancements: Strengthen your security measures by implementing
additional security controls, such as intrusion detection systems, firewalls, and access
controls.
10. Conduct a post-mortem: After the immediate threat is mitigated, conduct a thorough
investigation to understand how the intrusion occurred and identify any weaknesses in your
security posture. Use this information to improve your security defenses
Vulnerability
A vulnerability is a weakness that can be exploited by cybercriminals to gain unauthorized
access to a computer system. After exploiting a vulnerability, a cyberattack can run malicious
code, install malware, and even steal sensitive data. Vulnerabilities can be exploited by a variety
of methods, including SQL injection, buffer overflows, cross-site scripting (XSS), and open-
source exploit kits that look for known vulnerabilities and security weaknesses in web
applications. Many vulnerabilities impact popular software, placing the many customers using
the software at a heightened risk of a data breach, or supply chain attack. Such zero-day exploits
are registered by MITRE as a Common Vulnerability Exposure (CVE).
Sources Of Vulnerabilities
Software Bugs
Software bugs are one of the leading causes of vulnerabilities. These are errors or faults in a
program that cause it to produce incorrect or unexpected results or behave in unintended ways.
They can be introduced during the software development process due to oversight, lack of
understanding, or even subtle errors in coding.
1. Functional errors
This is a broad type of error that happens whenever software doesn’t behave as
intended. For example, if the end user clicks the “Save” button, but their entered data isn’t
saved, this is a functional error. After some investigation, a software tester may identify a
more specific culprit behind the error and reclassify it as a different type of bug.
2. Syntax errors
A syntax error occurs in the source code of a program and prevents the program
from being properly compiled. This type of error is very common and typically occurs
when there are one or more missing or incorrect characters in the code. For example, a
single missing bracket could cause a syntax error.
Compiling programs typically indicate where a syntax error has occurred so the
programmer can fix it.
3. Logic errors
A logic error represents a mistake in the software flow and causes the software to
behave incorrectly. This type of error can cause the program to produce an incorrect
output, or even hang or crash. Unlike syntax errors, logic errors will not prevent a program
from compiling. A common logic error is the infinite loop. Due to poorly written code, the
program repeats a sequence endlessly until it crashes or halts due to external intervention,
such as the user closing a browser window or turning the power off.
4. Calculation errors
Anytime software returns an incorrect value — whether it’s one the end user sees
or one that’s passed to another program — that’s a calculation error. This could happen for
several reasons:
The software is using the wrong algorithm to calculate the value.
The calculation has a data type mismatch.
The developers have coded the calculation or value hand-off to another program
incorrectly.
While such an error can be costly in certain contexts — like in banking, where an
incorrect calculation can result in the loss of money — hunting down the calculation error
is typically just a matter of math.
5. Unit-level bugs
David LaVine, founder of RocLogic Marketing and a former engineer, says unit-
level software bugs are the most common. They’re also typically the easiest to fix. After
your software is initially coded, you need to see how it works through unit testing —
taking a small, logical section of code and verifying that it performs as designed. This is
where various forms of state machine bugs, calculation errors, and basic logic bugs are
often uncovered.
“The bugs are relatively easy to isolate when you’re dealing with a small amount of
code that’s within your control,” LaVine says. “They’re also relatively easy to replicate
because there aren’t a lot of complex, asynchronous interactions taking place yet.”
6. System-level integration bugs
This type of bug occurs when two or more pieces of software from separate subsystems
interact erroneously. Often the two sets of code are written by different developers.
LaVine explains that even when there’s a solid set of requirements for developers to
follow, there’s usually some level of interpretation required or details that get overlooked,
causing the interaction between two pieces of software to fail.
“System-level integration bugs are harder to fix because you’re dealing with more than
one piece of software, so the complexity increases while overall visibility decreases,”
LaVine says. “This class of bug is often caused by things like byte-swapping, message
parsing, or memory overflow issues.”
7. Out of bounds bugs
LaVine notes that these types of software bugs show up when the end user interacts
with the software in ways that weren’t expected. This often occurs when the user sets a
parameter outside the limits of intended use, such as entering a significantly larger or
smaller number than coded for or inputting an unexpected data type, like text where a
number should be
8. Misconfiguration
Misconfiguration refers to the incorrect setup of an application, database, network device,
or security control. This can inadvertently leave gaps in a system’s defense, giving malicious
actors potential entry points to exploit.
Insufficient Testing
Insufficient or improper testing can also result in vulnerabilities. If software or systems aren’t
thoroughly tested for potential security issues before deployment, vulnerabilities may go
undetected and provide an open door for attackers Security Weakness Prevalence COMMON
Detectability EASY Insufficient input/output validation vulnerability occurs when an application
fails to properly check and sanitize user input or validate and sanitize output data. This
vulnerability can be exploited in the following ways:
Insufficient Input Validation: When user input is not thoroughly checked, attackers can
manipulate it by entering unexpected or malicious data. This can bypass security measures and
lead to code execution vulnerabilities or unauthorized system access.
Insufficient Output Validation: If output data is not properly validated and sanitized, attackers
can inject malicious scripts that get executed by users’ browsers. This can lead to cross-site
scripting (XSS) attacks, enabling data theft, session hijacking, or the manipulation of displayed
content.
Lack of Contextual Validation: Failing to consider the specific context or expected data
formats can result in vulnerabilities like SQL injection or format string vulnerabilities. These
occur when unvalidated user input is directly incorporated into database queries or improperly
handled in format string functions, allowing attackers to manipulate queries or execute arbitrary
code.
Failure to Validate Data Integrity: Without validating data integrity, the application becomes
vulnerable to data corruption or incorrect processing. Attackers can tamper with critical system
variables or introduce malformed data that disrupts the application’s functionality.
These vulnerabilities often arise from errors in application logic, incomplete implementation of
validation checks, lack of security awareness, or insufficient testing and code review practices.
The four Typical IDS Components are an IDS sensor or agent, a management server, a
database server, and an IDS console.
1. IDS sensor or agent
They are the first component of an IDS. These sensors can either be host or network-
based. It is the part of IDS that deploy on a network or host to monitor their activity.
Sensors monitor wired or wireless networks (network traffic, system logs, and other data
sources for suspicious activity). They provide alerts when potential breaches are detected. It
is responsible for the collection of data and monitor the activity.
2. Management server
A Management server is responsible for collecting data from sensors. The
management server can also correlate and analyze this data to determine intrusion has
occurred.
3. Database server
An IDS database server is where you’ll store the event data your IDS sensors and
agents record. Some IDS tools store data in an embedded database, while others use an
external database like MySQL, Oracle, or MS SQL.
4. IDS console/User interface
The IDS console is where you’ll perform administrative or management tasks. It
is responsible for displaying GUI and generating alerts.
Basically, some IDS consoles can configure sensors/agents and conduct monitoring
and analysis, while others are only capable of configuring sensors/agents.
(or)
The major components of IDS are Audit data processor, Knowledge base, Decision engine,
Alarm generation and responses.
Common Components of an IDS/IPS
ARCHITECTURE (IDS)
An intrusion detection system is similar to an automated auditing mechanism. Like the
auditing systems, it consists of three parts: an agent, a director, and a notifier.
Fig: General IDS Architecture
Sensors/Agent:
Data gathering device (sensor) is responsible for collecting data from the monitored system.
An agent obtains information from the target such as a computer system or a data sources. The
source may be a log file, another process or network packets. The information may be sent
directly to the analyzer. These are responsible for monitoring network traffic or system activity
for suspicious behaviour or security policy violations. Usually, it is pre-processed into a specific
format. Also the agent may discard information that it deems irrelevant.
Host-based agents usually use system and application logs to obtain records of events and
analyze them. The events to look for and to analyze are determined by the intrusion detection
mechanism.
Network-based agents use a variety of devices and software to monitor network traffic. It can
detect network-oriented attacks such as denial of service attack introduced by flooding a network.
It can monitor traffic for a large number of hosts. It can also examine the contents of the traffic
itself.
Analyzers and Recognition Model:
The analyzers or Detector ( Intrusion Detection ( ID) analysis engine) processes the data
collected from sensors to identify intrusive activities or to determine if an attack is in progress or
has occurred. The analyzer itself reduces the incoming log entries to eliminate unnecessary and
redundant records. It then uses an analysis engine, this aims at analyzing the collected
information and detecting cyber attack patterns or possible abnormal behaviour, by using
predefined rules, utilizing specific attack techniques such as (signature or statistical and
AI,anomaly detection), or machine learning algorithms.
Because the functioning of the analyzer is critical to the effectiveness of the intrusion
detection system, it is usually run on a separate system.
Knowledge base (database ):
It contains information collected by the sensors, but in pre-processed format (e.g. knowledge
base of attacks and their signatures, filtered data, data profiles, etc.). This information is usually
provided by network and security experts. A database server is an important component of the
overall IDS/IPS architecture. It is a repository of all the events triggered by the sensors, logs
generated, user policies and profiles, and other functional information.
Configuration device:
It provides information about the current state of the IDS.
Response
Component initiates actions when an intrusion is detected. These responses can either be
automated (active) or involve human interaction (inactive).
The notifier accepts information from the analyzer and takes the appropriate action. In some
cases, this is simply a notification to the system security officer that an attack is believed to be
underway. In other cases, the notifier may take some action to respond to the attack.
User Interface:
The user interface provides a way for security analysts or administrators to view alerts,
configure the IDS settings, and take action on detected threats. It may include dashboards,
reports, and alert notifications. A management console provides an interface to the users and
administrators for configuring and managing sensor systems. The users connect to the
management console through a client system over a web interface or any other client software. A
Management Graphical Interface should provide the following:
Alert/Event Viewer: Displays all the intrusions detected by the sensors, which have
violated the defined set of policies. The alert viewers should be able to provide drill-
down capabilities to view all the details of individual alerts such as host, destination,
service, type of attack, and action taken.
Incident Generator: This enables the creation of real-time correlative analysis of
attacks on the network. This should provide the type of incident that has occurred and
when it has occurred.
Report Generators: To generate various security reports for the management and
further analysis. It should have the capability of generating reports automatically as
well e-mailing them to individuals.
System Configuration Tools: Provides all the system configuration features. Setting
polices, profiles, responses to attacks, sensor mode of operation, user created profiles,
baseline scheduling, defining user roles and responsibilities, sending alerts to central
network management console, and other sensor level configurations. It should also
have the capabilities to send alerts to the central network management console and
alerting administrators through triggering cell phone calls and SMS services.
The actual architecture of IDS may vary depending on the specific implementation and
deployment environment.
Overall View
The primary function of a sensor is to analyze traffic and respond when the attacks are
detected. The sensor examines each and every packet's header and data content that enters the
network. The sensor looks for a pattern and behavior in the network traffic that indicates
malicious activity and sends alerts to the management console. The sensor examines the packets
and checks against the user-defined policies or rule sets, which contains the priorities of the
attacks to be monitored and the counter measures to be taken when an attack is detected.
If an attack is detected, the sensor sends an alert to the management console, logs the alert,
and responds to the attack as per the defined policy. The policies for sensors can be configured to
several types of responses generating alerts, logging events, resetting TCP connections, blocking
traffic at firewalls, scrubbing malicious packets, and even dropping the packets entirely before
reaching the final destination.
How does an IDS work?
An IDS monitors the traffic on a computer network to detect any suspicious activity.
It analyzes the data flowing through the network to look for patterns and signs of
abnormal behavior.
The IDS compares the network activity to a set of predefined rules and patterns to
identify any activity that might indicate an attack or intrusion.
Then if, IDS detects something that matches one of these rules or patterns, it sends
an alert to the system administrator.
The system administrator can then investigate the alert and take action to prevent
any damage or further intrusion.
Terminology
Alert/Alarm
A signal suggesting that the system has been or being is attacked.
True positive
A legitimate attacks which triggers an IDS to produce an alarm
True Negative
When no attack has taken place and no alarm is raised.
False Positive
An event signalling an IDS to produce an alarm when no attack has taken place.
False Negative
An failure of an IDS to detect an actual attack.
Countermeasures of attacks
Security countermeasures are the controls used to protect the confidentiality, integrity,
and availability, authority of data and information systems.
Common examples of countermeasures include security controls, policies,
procedures, or technology created to prevent the effects of security incidents.
Types of Attacks
There are different types of attacks such as malware attacks, database security threats,
Trojans and so on.
Attacks against availability, confidentiality, integrity, authority. Attacks against
miscellaneous security objectives.
Countermeasures of Attacks
The some of the counter measures are,
Authentication
Access control is a security technique that regulates who or what can view or use
resources in a computing environment. There are two types of access control: physical and
logical. Physical access control limits access to campuses, buildings, rooms and physical IT
assets. Logical access control limits connections to computer networks, system files and data.
Audit and intrusion detection
Cryptography is the process of hiding or coding information so that only the person a
message was intended for can read it. Encrypting data with different keys may take different
times. The key and the data affects the time taken to encrypt or decrypt, which gives a
leakage of information about the key. Even monitoring power consumption may reveal which
instructions are being executed.
Deploying Firewall and NGFW
Traditional firewalls and NGFWs are both designed to identify and block malicious or
unwanted traffic from crossing network boundaries. A next-generation firewall (NGFW) is a
network security device that provides capabilities beyond a traditional, stateful firewall.
Anti-virus software
Antivirus is a kind of software used to prevent, scan, detect and delete viruses from a
computer. Antivirus products work by detecting, quarantining and/or deleting malicious code
(such as viruses), to prevent malware from causing damage to your device.
Conduct Audits Regularly
It's important to keep your software up to date because updates enhance existing
features, patch security flaws, add new security features, fix bug issues and improve
performance for devices.
Installing Endpoint Detection & Response (EDR)
Endpoint detection and threat response (EDTR), is an endpoint security solution that
continuously monitors end-user devices to detect and respond to cyber threats like ransomware and
malware. Installing EDR is needed.
Bring Awareness About Cyber Attacks and Be cautious while clicking any links and
files to be download.
Do keep all devices, such as laptops and computer physically secured. If a device is
lost or stolen, report it immediately to competent authority. Antivirus software should be
installed on computer and it should be kept updated. Don't install unauthorized programs on
your work computer / laptop.
Classification Of Intrusion Detection Systems:
There are two main types of IDSes based on where the security team sets them up:
● Network intrusion detection system (NIDS).
● Host intrusion detection system (HIDS).
The way an intrusion detection system detects suspicious activity also allows us to define two
categories:
● A signature-based intrusion detection system (SIDS).
● An anomaly-based intrusion detection system (AIDS).
Depending on your use case and budget, you can deploy a NIDS or HIDS or rely on
both main IDS types. The same applies to detection models as many teams set up a hybrid
system with SIDS and AIDS capabilities.
Reference:
https://www.cs.clemson.edu/course/cpsc420/material/Security%20Practice/Intrusion
%20Detection/Architecture.pdf
https://www.researchgate.net/publication/232623012_Intrusion_Detection_A_Survey
https://www.researchgate.net/figure/General-IDS-Architecture_fig1_329467494
https://ebrary.net/26724/computer_science/idsips_system_architecture_framework