Overview of Distributed Systems Concepts
Overview of Distributed Systems Concepts
Definition: A collection of independent computers that appears to its users as a single coherent system.
They involve disparate independent entities interacting via common protocols towards a common goal.
Key Aspect 1: Components are autonomous.
Key Aspect 2: Users perceive it as a single system.
This is achieved through a middleware layer that sits between the applications and the local operating systems.
Definition: The primary reasons for creating a system that is distributed across multiple computers.
Inherently Distributed: The problem itself is physically distributed (e.g., sending a message from one phone to another).
Better Reliability: The failure of one node does not cause the entire system to fail.
Better Performance: Tasks can be parallelized and data can be fetched from geographically closer nodes.
Solve Large Problems: To tackle computationally intensive tasks (e.g., scientific computing) that require combined power.
Definition: The fundamental and desirable properties that define a distributed system.
Mandatory Characteristics:
Multiple Entities: Composed of multiple users or sub-systems.
Heterogeneity: Components differ in hardware, software, and policies (e.g., the Internet).
Concurrency: Components run simultaneously, requiring synchronization.
Resource Sharing: The ability to share hardware and software resources.
Desirable Characteristics:
Openness: The system can be extended using open standards.
Scalability: The system can grow in size. It is limited by centralized services, data, or algorithms.
Transparency: The system hides its complex, distributed nature from users. Key types include:
Access: Hides differences in data representation.
Location: Hides where a resource is located.
Replication: Hides that multiple copies of a resource exist.
Failure: Hides the failure and recovery of a resource.
Definition: The main categories of distributed systems based on their primary function.
5. Distributed Architectures
Definition: The high-level structural designs used to organize components in a distributed system.
Client-Server: Classic model where clients request services from centralized servers. Challenges include scalability.
Multi-Node: The server's role is distributed across multiple processing nodes for performance and fault tolerance.
Peer-to-Peer (P2P): No central server; all nodes are equal peers (e.g., file-sharing networks). Offers scalability but has security challenges.
Service-Oriented Architecture (SOA): Systems are built from loosely-coupled, reusable services.
Three fundamental roles • Service provider• Service requestor• Service registry
Web Services: A common implementation of SOA using web standards (XML, HTTP). They are platform-independent and firewall-friendly.
Definition: The fundamental problems that make designing reliable and efficient distributed systems difficult.
Synchronization: The problem of coordinating actions across multiple independent nodes without a global clock or shared memory. Includes:
Clock synchronization, leader election, and mutual exclusion.
Fault Tolerance: The ability of a system to continue operating correctly in the event of failures.
Failures can occur in processing sites or the communication network, leading to issues like network partitions and outdated information.
Security: The complexity of securing multiple points of vulnerability (nodes, network, clients) in a heterogeneous environment.
Definition: The practice of protecting a distributed system from unauthorized access, use, or destruction.
Definition: The key security problems that must be addressed in a distributed system.
This includes code executed by web browsers (JavaScript, Java Applets, ActiveX) or email clients.
A user may download and run code with malicious intent, compromising host security.
Common attack vectors include Trojan horses, spyware, and eavesdropping through internet content.
The need for rich web content has forced applications to allow scripts, which attackers can use to take control of a host or damage its content.
Definition: Malware disguised as legitimate software, tricking users into installing it.
4.2 Spyware
Definition: Software that secretly records user activity to collect sensitive information for commercial gain or malicious purposes.
Can capture credit card details, monitor browsing habits, and collect personal data.
Examples: SearchSeekFind, ShopAtHomeSelect, Surfairy.
4.3 Worms/Viruses
Definition: Self-replicating malicious programs that infect files and spread across systems.
Viruses: Attach themselves to clean files and spread, infecting executables and macros. They are malicious and require user action to spread.
Worms: A more advanced form of virus that spreads autonomously over networks, making it easier to infect multiple hosts.
5. Eavesdropping
Definition: The unauthorized interception of confidential data, access to privileged binaries, or tampering with computational results on a host.
In collaborative systems like Grids, users share resources. Some may have malicious intent and misuse information passing through their system.
This threat is categorized into three classes:
5.1 Unauthorized Access to Confidential Data – by Users
In distributed computing, a scheduler sends jobs (code + data) to a node based on its load.
Job files are often stored in a shared folder (e.g., /tmp) accessible to all users on that host.
A malicious user can quickly copy this sensitive data, analyze it offline, and misuse it (e.g., brute-forcing encrypted data).
If the data contains credentials (user ID/password), the attacker can impersonate the user, leading to severe, hard-to-trace security issues.
A malicious user alters the results of a computation to corrupt or mislead the system.
jobs that post their computation results directly to a centralized system without storing them in intermediate files are difficult to tamper with.
Jobs whose source code is available, which runs for several minutes to hours and uses intermediate files to store results, are often easy targets for such attacks.
Grid jobs run with minimal privileges but can still access poorly secured sensitive data on a host.
They can read and expose private information like password files or system configurations.
If multiple jobs run concurrently on a host, a malicious job can eavesdrop on the data of an innocent job running beside it. The host facilitates this attack
unknowingly.
6. Job Faults
Definition: Failures or errors caused by user-written applications running on a grid, either unintentionally or maliciously.
7. Resource Starvation
Definition: A situation where a job consumes so many resources (CPU, memory) that it starves other jobs or host applications, degrading performance.
Definition: A software vulnerability where a program writes data beyond the allocated memory bounds of a buffer, leading to crashes or allowing arbitrary code
execution.
Buffers are used by software programs to store data. They typically have an upper and a lower bound.
Caused by programming errors (allocating too little space or storing too much data).
Occurs in two ways-1) Allocating too little space 2)Storing too much data
A very common attack mechanism. Famous examples: Morris Worm (1988), Code Red (2001), Slammer (2003), Sasser (2004).
Definition: An overflow that occurs in the stack memory region, which can overwrite critical control data like function return addresses.
The heap contains program data, not control data like return addresses. Therefore, exploiting it is generally more complex than stack overflows.
9. Privilege Escalation
Definition: An attack where an unauthorized user elevates their access level on a host to perform actions they are not allowed to do.
The goal is often to gain root or admin privileges to take full control of the host.
This can lead to severe impacts, such as the host being used in DDoS attacks.
Horizontal: A malicious user tries to assume the identity of a peer in the system.
Vertical: A user assumes the identity of a system administrator (e.g., root in Linux, SYSTEM in Windows), gaining full control.
This allows the malicious user to access all information stored on the host and perform tasks that are otherwise not permissible.
Buffer overflows are the most common way to achieve privilege escalation, as they can be exploited to execute code with higher privileges.
Definition: Injection attacks are attempts by malicious hackers to exploit an application vulnerability that does not handle user inputs securely
Definition: A code injection vulnerability in applications built on server-side scripting engines (PHP, ASP), where malicious code is injected through user inputs.
In-Band SQLi: Uses the same channel to attack and gather results.
Error-based: Forces the database to generate error messages that reveal sensitive data.
Union-based: Uses the UNION SQL operator to combine results from the original query with results from a malicious query, allowing data theft.
Example:
FROM Items
Vulnerable Code:
sql = "SELECT id FROM users WHERE username='" + user + "' AND password='" + pass + "'"
The condition OR 5=5 is always true, allowing login without a valid password.
Definition: Security weaknesses and potential dangers that target the underlying components that support IT systems, such as networks, grid/cluster computing platforms,
and storage systems.
Infrastructure: The fundamental elements that enable IT systems to function, including networking, middleware, and storage.
Securing this infrastructure is critical for national security and economic stability, as our way of life depends on the secure operation of cyberspace.
The main categories of infrastructure threats are:
Network Level Threats: DoS, DNS attacks, routing attacks, wireless threats.
Grid Computing Threats: Architecture, infrastructure, and management issues,Trust issues
Storage Threats: SAN and Distributed File System vulnerabilities.
Definition: An attack with the objective of making a network service unavailable to its intended users.
Packets are routed correctly but the destination and the network become the targets of the attackers.
They are easy to generate but difficult to detect.
In a typical DoS attack, the attacker node spoofs its IP address and uses multiple intermediate nodes to overwhelm other nodes with traffic.
Types:
Ordinary DoS: A single attacker uses a tool to send disabling packets to the target, often with a spoofed source IP.
Distributed DoS (DDoS): A single attacker uses multiple compromised machines ("agents" or "zombies") to amplify the attack effect.
Definition: A popular DDoS attack that exploits the TCP three-way handshake to exhaust server resources.
The attacker sends a flood of TCP SYN (synchronize) packets with spoofed IP addresses.
The server responds with SYN-ACK and waits for the final ACK, leaving "half-open connections" that consume resources in a backlog queue.
This ties up the server's processor and memory, preventing it from responding to legitimate requests.
Definition: A DDoS attack that exploits the TCP protocol's PUSH flag to overwhelm a receiver's buffer.
Definition: A DDoS attack that uses network amplifiers (systems supporting broadcast) to flood a victim with traffic.
The attacker sends ICMP ECHO REQUEST (ping) packets to a broadcast address, with the source IP spoofed to be the victim's IP.
The attacking packets are typically ICMP ECHO REQUESTs, which are packets (similar to a ‘ping’)that request the receiver to generate an ICMP ECHO REPLY
packet.
Every device on that network responds to the victim with an ICMP ECHO REPLY, amplifying the original attack traffic hundreds of times.
Definition: An attack targeting the Domain Name System (DNS), which translates human-readable domain names (e.g., [Link]) into numerical IP addresses.
DNS is a critical, distributed component of the internet. Attacking it can have a massive impact.
Impact of Hacking DNS: Denial of Service, Masquerading (impersonation), Information Leakage, Domain Hijacking.
Cache Poisoning: An attacker feeds bogus information to a DNS server, which caches it. This redirects users intending to visit a legitimate site to a malicious site
under the attacker's control.
Server Compromising: An attacker gains control of a DNS server itself, allowing them to modify any data it serves, leading to cache poisoning or DoS.
Spoofing: An attacker masquerades as a DNS server and provides false IP address information to clients.
Routing tables are used to route packets over any network, especially the Internet.
Routing protocols (Distance Vector, Link State, Path Vector) exchange information to build maps of the network.
Routing Table Poisoning: Maliciously modifying these updates to create incorrect routes., resulting in the creation of incorrect routing tables.
Suboptimal Routing: Packets take longer paths, violating Quality of Service (QoS) for real-time applications (e.g., VoIP, Grid computing).
Congestion: Traffic is artificially directed to specific parts of the network, causing bottlenecks.
Partition: The network is split into isolated segments that cannot communicate with each other.
Overwhelmed Host: Traffic is concentrated on a few servers, taking them down due to excessive load.
Looping: Packets are sent in circles, are eventually dropped, and reduce overall network throughput.
Access to Data: Attackers can snoop on packets by redirecting traffic through a node they control.
Distance Vector (e.g., RIP): Nodes share a vector of shortest distances to [Link] node has the full topology information and each depends on its neighbors for
creating its routing tables. They don't know the full topology, making them vulnerable to false updates from malicious neighbors.
Link State (e.g., OSPF): Nodes share their connectivity with everyone. Each node then computes the full map. More robust but still vulnerable if a router is
compromised...EX:Open Shortest Path Forwarding (OSPF)
Path Vector (e.g., BGP): Each node sends the full shortest path information of all the nodes in the network to its neighbors.
Definition: Weaknesses in wireless networks (Wi-Fi, Bluetooth) that arise from their use of radio waves, making physical containment difficult and introducing new
attack vectors.
WEP (Wired Equivalent Privacy): The first standard (1999). Fatally flawed due to short, static encryption keys and a weak algorithm (RC4). Easily
cracked. Should not be used.
WPA (Wi-Fi Protected Access): An interim standard (2004) to fix WEP. Used TKIP for dynamic keys and added integrity protection. Still used RC4, vulnerable to
attacks.
WPA2: Ratified in 2004. Replaced RC4/TKIP with the stronger AES algorithm and CCMP for encryption and authentication. Became the long-standing standard,
though some vulnerabilities exist.
WPA3: The current standard (2018). Uses stronger 192/256-bit encryption, a more secure handshake (Simultaneous Authentication of Equals - SAE) resistant to
offline attacks, and provides forward secrecy.
2.4.2 Types of Wireless Attacks
Passive Attacks:
Traffic Analysis: Monitoring packet size and number to infer activity, locate access points, and identify protocols. Difficult to detect.
Eavesdropping: Intercepting data transmitted over the air.
Active Attacks:
Unauthorized Access: Gaining access to the network to use it or launch further attacks.
Man-in-the-Middle (MitM): Intercepting and potentially altering communication between two parties. e.g., ARP Poisoning.
Session Hijacking: The attacker takes an authorized and authenticated session away from its proper owner .To execute session hijacking successfully, the
attacker must accomplish two tasks.
1. The attacker must masquerade as the target of the wireless network
2. The attacker must stop the target from continuing the session.
Replay Attack: Capturing and retransmitting data packets at a later time to confuse the [Link] or timestamps are generally used to prevent this type
of attack from taking place.
Access Control Attacks:
War Driving: Searching for wireless networks from a moving vehicle using a smartphone or laptop to find vulnerable and capture sensitive information
Rogue Access Point: An unauthorized wireless Access point connected to organization’s network,leaving the network exposed to potential security threats
MAC Address Spoofing: Changing a device's MAC address to bypass MAC filtering.
Integrity Attacks: (Session Hijacking, Replay, Spoofing, 802.11 frame injection/deletion/replay).
1. Spoofing:The attacker changes the destination IP address of the packet to the IP address of a host they control.
2. The attacker can inject known traffic into the network in order to decrypt future packets in the wireless network. This type of attack can be useful in detecting the
session key of the communicating parties
Definition: Security mechanisms and associated vulnerabilities for short-range wireless communication (Bluetooth).
Security Levels:
L1: No Security. No authentication or encryption.
L2: Unauthenticated Pairing. Encryption without user interaction ("Just Works").Devices require pairing, but the pairing process doesn't involve user
interaction
L3: Authenticated Pairing. Encryption with user interaction (e.g., entering a PIN), protects against Man-in-the-Middle (MITM) by user interaction
L4: LE Secure Connections. Uses stronger 128-bit encryption keys and numeric comparison.
1. Attacker can interfere with the unencrypted process of establishing an encryption key between two Bluetooth BR/EDR (Classic) devices, forcing the key's length to
a very short, 1-byte [Link] allows the attacker to brute-force the key, enabling them to decrypt the data or hijack the devices.
Bluetooth Threats
Bluesnarfing: Unauthorized access to information on a Bluetooth [Link] to improper device configuration.
Bluejacking: Sending unsolicited messages over Bluetooth to Bluetooth devices.
Bluebugging: Hacker can gain unauthorized access to e apps and control them as per their wish through bluebugging,can listen to calls, read messages, etc.
Definition: Security challenges specific to grid computing systems, which connect distributed, often heterogeneous, computing resources to solve large-scale problems.
Concerns include lack of universal standards and the complexity of security across different administrative domains.
Grid security issues are grouped into three categories:1)Architecture-related issues,2)Infrastructure-related issues,3)Management-related issues
Definition: Security problems related to the design and protocols of the grid system [Link] related to the information exchanged between different hosts or
between hosts and users.
Information Security:
Unauthorized Access: Requires strong, flexible authentication mechanisms at all entry points, supporting various methods across different sites.
Confidentiality: Ensuring data is secret both in transit (point-to-point) and at rest (store-and-forward). Requires defining and sharing security contexts.
Integrity: Ensuring messages are not tampered with in [Link] change made to the messages or documents can be identified by the receiver
Single Sign-On (SSO): A user should authenticate once to access multiple resources across different security domains within the grid.
Delegation Vulnerabilities: A service might need to act on a user's behalf (e.g., a job accessing a database). Delegated authority must be strictly scoped and time-
limited to prevent misuse.
Authorization: Determining what resources a user can access. Challenges include:
Scalability: Handling a large number of dynamic users.
Security: Risk of compromise at both user and system levels.
Revocation: Quickly removing a user's access if compromised.
Inter-operability: Making different authorization systems from different organizations work together.
Service Level Security: Securing the "service" concept in a grid.
A service has a provider, consumers, an infrastructure, and publishers.
Threats: QoS Violation (breaking SLAs), Unauthorized Access, DoS Attacks.
Definition: Security problems related to the physical and software components that make up the grid (nodes and network).Host-level security issues: Data protection and
Job starvation
Includes all Host-Level threats (from the previous PDF) like data protection and job starvation.
Network Security: Critical due to the heterogeneity and high-speed needs of grid apps. Challenges include integrating with existing enterprise security like
firewalls.
Globus and Firewalls: Globus is open-source grid software. Its modules (GSI, GRAM, GridFTP, MDS) use specific ports, requiring careful firewall configuration
to allow grid traffic without creating vulnerabilities.
Definition: Security challenges related to the ongoing operation and administration of the grid.
Credential Management (CM): Securely managing the many different credentials (passwords, certificates) needed for various systems in the grid.
Requirements: Secure initiation, storage, accessibility, renewal, translation between domains, delegation, control, and revocation.
Trust Management: A complex issue of establishing and managing trust relationships in the grid.
Lifecycle:
Creation: Deciding on a trust model (policy-based or reputation-based).
Negotiation: When a new node joins, policies are exchanged to establish trust (e.g., exchanging certificates).
Management: Computing trust values, distributing this information securely, storing it, and updating it based on events or time.
Trust Management phase-1)Trust computation-trust value is computed based on trust function2)Trust distribution-secure distribution of trust to
other nodes(CIA to be maintained)3)Trust storage- Secure storage of trust info.(credential repositories can be used)4)Trust update- done based on
event by event basis or in timely manner
Definition: Attacks and weaknesses targeting data storage architectures, primarily Storage Area Networks (SANs) and Distributed File Systems (DFS).Storage Area
Networks (SANs) are network architecture entities that provide large amounts of storage access
Definition: Protecting data within a high-speed network dedicated to providing block-level storage access to servers.
Fibre Channel (FC) Protocol: A high-speed (Gbps) technology commonly used in SANs to transfer data. It uses a layered model (FC-0 to FC-4) similar to TCP/IP.
FC Frame Structure: Frames have a header, optional header, payload (0-2112 bytes), and CRC. The header contains source/destination addresses and sequence
info.
Definition: Securing file systems where data is stored across multiple networked computers.
🔹 Definition
Injection vulnerabilities occur when user input is not properly validated or sanitized, allowing attackers to inject malicious commands or queries.
🔹 Effects
🔹 Description
Occurs when unvalidated user input is concatenated into an SQL query, altering its logic.
Example Vulnerable Code:
SELECT * FROM Users WHERE UserName = '" + strUserName + "' AND Password = '" + strPassword + "'";
Resulting Query:
SELECT * FROM Users WHERE UserName = '' OR 1=1 -- ' AND Password = '';
🔹 Prevention
🔸 b) LDAP Injection
🔹 Description
LDAP (Lightweight Directory Access Protocol) stores sensitive organizational data (e.g., user credentials, printers, etc.) and store information in hierarchical(tree)
structure
When user inputs are used directly in LDAP queries without validation, attackers can inject LDAP statements.
An attacker can exploit this vulnerability by supplying carefully crafted LDAP statements as part of the input, changing the semantics of the LDAP statement.
🔹 Impact
🔹 Example
🔹 Prevention
🔸 c) XPath Injection
🔹 Description
XPath is the language used to query XML documents.
If user inputs are directly inserted into XPath queries without validation, attackers can alter query [Link] attacker can inject XPath constructs as part of the user input,
changing the semantics of the originally intended XPath statement.
Example Query:
Malicious Input:
🔹 Impact
🔹 Prevention
🔹 Description
🔹 Types
🔹 Example
Attacker sends payloads that cause delays or changes in responses to determine database details.
Cross-site scripting (XSS) attacks are made possible by injection vulnerabilities in the application code.
XSS typically occurs in sites which allow user input, and echoes this back to the client without proper validation.
XSS allows attackers to inject malicious scripts (usually JavaScript) into web pages viewed by other users., which is subsequently echoed back to the client browser
Because the browser trusts scripts from the legitimate server, a malicious script runs with site privileges and can read/steal cookies,alter data, and silently modify
page content.
🔹 Cause
Occurs when applications echo user input back to the browser without proper validation.
🔹 Process
1. Attacker injects malicious script into an input field.
2. Server sends it back to the client’s browser.
3. Browser executes it, trusting the server.
🔹 Impact
🔸 Example
An attacker posts:
<script>alert('XSS');</script>
on a public forum.
When another user views it, the script executes.
🔸 Types of XSS
1️⃣ Non-Persistent (Reflected) XSS
Occurs when input is immediately returned by the server (e.g., search bar).
Attacker sends a crafted URL containing a malicious script.
Malicious script stored on server (e.g., in forum posts or DB) which stores it in a repository
Every user who accesses the page gets affected.
🔹 Prevention
HTTP is stateless meaning every request from a browser is treated as independent, so web apps use sessions to maintain user state (via cookies, hidden fields, or URL
rewriting).
In all these techniques, a session identifier that identifies a user session on server will be exchanged in every subsequent request and response between client and
server.
Weak session management leads to broken authentication and session hijacking.
Different attacks are possible, depending on how the session management is designed and implemented.
Brute-force analysis of session IDs is where an attacker tries all possible combinations of session IDs in an exhaustive manner.
Use long random session tokens to prevent guessing.
Attacker forces/fixes a session ID (of their choice) and tricks victim into using it.
Session fixation is possible when the session identifiers are either chosen by the user or set by the server.
🔹 Prevention
Improper error handling vulnerabilities in applications lead to disclosure of sensitive information like database details, platform version details, SQL statements, stack
traces and soon to attackers.
Attackers inject malformed inputs to specifically force applications to [Link] helps the attacker either in getting the sensitive useful information that is leaked
through error messages or,causing denial of service (DoS).
🔹 Example
🔹 Prevention
Use generic error messages for users.
Log detailed errors securely on the server.
use Centralize exception handling to avoid leaks.
cryptography is not the solution for every security problem.; it only provides solutions for specific problems like authentication, data secrecy, nonrepudiation
Its strength lies in the secrecy of keys, not in “hidden algorithms”.
Cryptographic operations require random numbers for generating keys.
characteristics for crypto random numbers are that there should be even distribution, the random numbers should be highly unpredictable
🔹 Common Mistakes
🔹 Prevention
Applications can fail security due to misconfiguration, even with secure code.
🔹 Common Causes
🔹 Prevention
Availability to genuine users when they need access is a key requirement for any application to be successful.
A DoS attack aims to make applications or services unavailable to legitimate users.
🔹 Types
🔹 Example
Login page with no account lockout → attacker can run brute-force attacks.
Automated features abused to overload systems.
🔹 Prevention
🔹 Example
🔹 Risks
Spoofing
Broken access control
Information disclosure
🔹 Prevention
🧠 Summary Table
Vulnerability Type Cause Example Prevention
SQL/LDAP/XPath Injection Improper Input Validation ' OR 1=1 Parameterized Queries
XSS Echoing Unvalidated Input <script>alert(‘XSS’)</script> Input Sanitization
Session Management Flaws Weak Session IDs Session Fixation SSL, Regenerate IDs
Error Handling Leaking System Info Stack Trace Generic Error Messages
Cryptography Misuse Weak Keys or Algorithms Predictable RNG Standard Crypto APIs
Insecure Config Default Passwords Admin/admin Encrypt Configs
DoS Lack of Limits Unlimited Login Attempts Lockout, Throttling
Canonical Flaws Non-Standard Input ..\..\etc\passwd Normalize Input
1. Service-Oriented Architecture (SOA) & Web Services
Definition: A design paradigm where systems are built from well-encapsulated, reusable software bundles (services) that are accessible over networks via well-defined,
open, implementation-independent, standards-based interfaces.
Definition: A layered set of open standards that define how different facets of SOA and Web Services operate, ensuring interoperability.
The stack is built upon XML as its universal language. The key standards are:
SOAP (Simple Object Access Protocol): An XML-based protocol or schema to provide for standards-based packaging of messages sent between service
providers and consumers irrespective of transport protocol (can use HTTP, SMTP, etc.).
WSDL (Web Services Description Language): An XML-based contract that provides a standard for describing the communication and location details of a
service to all service consumers to help them get access to all the details necessary
UDDI (Universal Description, Discovery, and Integration): An XML-based standard for a service registry, acting like a "Yellow Pages" where businesses
can publish and discover services.
WS-BPEL (Web Services Business Process Execution Language): A standard for describing and executing business processes that orchestrate multiple Web
services.
Security Standards: Cross-cutting standards (e.g., WS-Security) that apply security measures like encryption and signatures across all layers, also using XML.
Definition: The specific security needs that must be addressed to protect services in an SOA, which traditional security measures are often inadequate to handle
Traditional Security (like Firewalls & SSL) Is Not Enough for Web Services
Web services use HTTP, which firewalls usually allow without strict checks.
HTTP tunneling can bypass network restrictions.
XML filtering slows down firewalls.
Messages can pass through intermediaries, increasing risk.
SSL/TLS only secures point-to-point links, not the entire message path — allowing MITM attacks in between.
3.1 Authentication
diverse mechanisms (username/password, certificates, Kerberos, etc.) need to be provided for in Web services.
Must allow interoperability between different systems and accept credentials from external partners.
Definition: The ability to log and review service invocations to provide a verifiable record of events.
Auditing captures details of users, access attempts, and failures for analysis.
Non-repudiation provides proof that a specific party invoked a service, preventing them from denying it later.
3.4 Availability
Definition: In any distributed SOA implementation Ensuring that a service is accessible to genuine users when needed, typically guaranteed via Service Level
Agreements (SLAs).
Requires protection against Denial-of-Service (DoS) attacks that use malicious data that appears harmless to firewalls to overload the service.
May necessitate specialized firewalls that can inspect the content of service requests.
Code Inspection of service requests can provide a clue about repeated requests
3.5 Confidentiality
In SOA, a single XML message may pass through many systems — some parts are for all, others are private.
So, only specific sections of the XML are encrypted, allowing each intermediary to see only the parts meant for them
Definition: Ensuring that data has not been altered in an unauthorized manner during storage or transmission.
In SOA, this may require ensuring the integrity of only specific portions of an XML document, while allowing other parts (like routing headers) to be modified by
intermediaries.
3.7 Privacy
Definition: Controlling the use and disclosure of personal information provided by clients, in accordance with stated policies and legal requirements.
Organizations must publish privacy policies and ensure clients follow them.
3.8 Trust
Definition: The confidence that one entity has in another. In SOA, trust must often be established dynamically between entities from different domains based on
message-level information (proof of trust).Trust intermediaries are important in the context of SOA.
Delegation: The ability for one service to transfer its security rights and policies to another trusted service.
Federation: An architecture that allows for Single Sign-On (SSO) across different systems without requiring a central identity store.
Definition: Weaknesses in service design or coding, and the exploits that target them, which can lead to unauthorized access or damage.
[Link] Probing/Scanning:
Definition: An attack where an attacker analyzes a service's WSDL file to gather intelligence.
WSDL is the XML representation of a service contract.
A complete WSDL definition contains all of the information necessary to invoke a Web service.
The WSDL reveals methods, parameters, underlying technologies, and invocation patterns, providing a blueprint for further attacks.
Many Web services use popular open-source components (e.g., Apache Web Server, Axis) with publicly known bugs and security warnings.
Security consortiums issue warnings for proprietary products as well.
While fixes are released via patches, organizations are often slow to apply them.
If fixes are not quickly applied it allows Attackers exploit these known, unpatched vulnerabilities to gain access to underlying systems and hosts.
C. Injection Attacks
1. SQL Injection
-- Intended Query:String sql = Select ... From Order Where dealer_code = "'+[Link]()+"' And dealer_status='C'
-- Resulting Malicious Query:Select ... From Order Where dealer_code = 'X' OR 1=1 --' And dealer_status='C'
The -- comments out the rest of the query, and OR 1=1 makes the condition always true, returning all orders.
Injecting malicious code into XPath queries to manipulate XML data retrieval.
Example: Given an XML database of customers, a legitimate query to find an active customer with ID 'cust1' is:
xpath
//customers/customer[customerID/text()='cust1' and status/text()='A']
This altered query returns all customers because the condition or 1=1 is always true.
Can be orchestrated as a second step to WSDL phishing and session hijacking attacks.
Attackers use XSS to send malicious scripts/code to victims, giving access to sensitive information.
Possible Results:
1. Encrypted SSL connections can become vulnerable.
2. Persistent attacks can be launched, and keystrokes can be monitored.
3. Domain-based security policies can be violated.
Types of XSS Attacks:
Persistent Code Attack: Malicious code is injected and stored on the server. The victim gets infected when requesting data from the server (e.g., via 'search
the Website' or forums).
Reflected Code Attack: Orchestrated after WSDL phishing. The victim is tricked into clicking a malicious link, which injects code that reflects back from a
trusted source.
XSS Testing & Vectors:
Simple Check Attack: A string (";!--"<XSS>=&{()}) to test for vulnerable JavaScript.
XSS Locator: Injecting a specific string to make 'XSS' appear if vulnerable. Using deprecated tags like <PLAINTEXT> can also test vulnerability by messing
up output.
C. Parameter-Based Attacks
Parameter Tampering: A popular and simple attack targeting the application business logic by altering parameters in URL query strings, form fields, and cookies.
Classic Example: Changing values in HTML form fields, especially hidden fields used for status information (e.g., changing a
price VALUE="700.00" to VALUE="70.00").
Web Service Manifestation:
Bad security assumptions during design (e.g., assuming other systems handle authentication and input validation).
Web services invoked via asynchronous JavaScript (XMLHttpRequest) are vulnerable to malicious scripts that change the request object and data.
If the method is GET, parameters are visible in the URL query string and can be tampered with.
Custom session management mechanisms (tokens, pseudo-cookies) passed across requests and stored in hidden fields can be manipulated.
Example Scenario: Amazon cart total stored in a hidden field (<INPUT TYPE="HIDDEN" NAME="COST" VALUE="700.00">). A hacker can save the page, change the
value to 70.00, and invoke the payment Web service, paying a fraction of the price
D. Authentication Attacks
Session Fixation: Attacker sets a known session ID, tricks user into logging in, then impersonates them.
Session Hijacking:
Sniffing network traffic (e.g., packets) to steal session keys/cookies after authentication.
Allows impersonation if post-auth traffic is unencrypted.
Eavesdropping/Sniffing:
Read plaintext SOAP/XML traffic (passwords, config data).
Crack lightly encrypted packets.
Replay Attacks (Spoofing Attacks):
Intercept and resend valid messages (even digitally signed ones).
Can create DoS floods or carry out checksum spoofing (recomputing the hash for a modified message).
Data Integrity Attacks:
Eavesdrop and modify message data (e.g., change target account number in a payment gateway).
F. XML-Based Attacks
Misusing CDATA: Using CDATA sections to sneak system commands past parsers, leading to injection attacks (XPath, XSS) or host manipulation.
xml
XML Bombs: Specially crafted messages to overwhelm the parser (crash, memory consumption, DoS).
Flooding: Sending a large number of legitimate-looking requests to consume resources.
Complex Payload:
Excessive element nesting.
Flooding <any> attributes.
3. Schema-Based Attacks
G. Other Attacks
Parameter-Based Attacks:
Tampering: Modifying parameters in URL query strings, form fields, cookies, or hidden fields (e.g., changing a VALUE="700.00" to VALUE="70.00" in a
payment request).
Web services invoked via JavaScript (XMLHttpRequest) are vulnerable to malicious script injection altering request data.
';alert([Link](88,83,83))//\';alert([Link](88,83,83))//";alert([Link](88,83,83))//\";alert(St
Core Problem: Transient code is untrusted and can be malicious, while resident code, though trusted, can contain bugs.
Primary Solution Strategy: Create 'isolated' environments to contain the ill-effects of code execution, preventing damage to the overall system.
Key Techniques:
Isolation: Sandboxing, Virtualization.
Trust Verification: Proof-Carrying Code (PCC).
Resource Fairness: Resource Management.
Attack Prevention: Memory Firewall, Antimalware.
2. Sandboxing
Definition: A technique for achieving isolation by controlling or restricting an application's access to system resources via system calls.
Principle: By restricting system call access, the harm from malicious code can be contained.
Types of Sandboxing:
2.1 Kernel-Level Sandboxing:
A kernel module hooks the system call entry table to inspect every system call.
A policy engine (in user or kernel space) decides to allow or deny calls based on resources, users, and processes.
Pros: No changes needed to the application.
Cons: Can introduce significant performance overhead.
2.2 User-Level Sandboxing:
Uses OS debugging features (e.g., UNIX ptrace) to let a parent process trace and control the system calls of its child process.
The parent sandboxing process consults a policy engine.
Cons: Higher overhead than kernel-level; requires running the app under a parent sandboxing process.
2.3 Delegation-Based Sandboxing:
In this approach, when a user process invokes a system call the system makes a callback to an emulation library in the user space, which provides
isolation service.
Solves race conditions in other methods by using a user-space delegation agent to execute system calls on behalf of the application.
The kernel module is minimal and more portable.
2.4 File-System Isolation:
Uses system-call interception to create an isolated "shadow" file system.
The hook implemented with the system creates an isolated shadow file system, which records allfile-system changes while leaving the primary file
system untouched.
When a file is updated, the solution uses copy-on-write to duplicate the file and maintain a separate copy, leaving the original as it was.
Allows administrators to review changes before committing them.
3. Virtualization
Definition: A technique that uses a Virtual Machine Monitor (VMM) or hypervisor to create isolated virtual machines (VMs) with properties of a real machine.
Key Properties: Resource control,Efficiency,Equivalence.
Types of Virtualization:
3.1 Full-System Virtualization:
The VMM sits directly on the hardware and fully abstracts it to create VMs.
The VMM handles all resource access; no VM has direct hardware access.
Instructions, other than ones used for resource access, execute directly on the physical hardware,thus reducing any CPU virtualization overheads.
Example: VMware ESX.
3.2 Para-Virtualization:
an instruction set of the hardware which does not support virtualization is modified to a fully virtualizable instruction set, such that the system can
be fully virtualized
The guest Operating System kernel is modified (ported) to run on a hypervisor using a "virtualizable instruction set."
No run-time translation is needed, offering near-native performance.
Drawback: Requires modifying the OS kernel, which is difficult for proprietary OSs like Windows and the kernel needs porting for the hypervisor.
Example: Xen.
3.3 Shared-Kernel Virtualization (OS Virtualization):
Partitions a single OS kernel into multiple isolated containers or zones.
Each container has its own file system, process space, and network identity.
Each container has its own context; the kernel blocks access to resources outside that context.
Pros: Highly efficient. Cons: Less robust isolation; the host kernel must be modified.
Examples: Solaris Zones, Linux VServer.
3.4 Hosted Virtualization:
In this model, the VMM is actually an add-on to an existing OS, which exists as a host, with all theVMs as guests
The VMM runs as an application on top of a host operating system.
The major difference between this and the others is that the hosted virtualization uses the device drivers in the host OS for I/O virtualization.
Examples: VMware Workstation, Microsoft Virtual PC.
3.5 Hardware Assists (e.g., Intel VT):
Modern processors include hardware support for virtualization (e.g., Intel VT, AMD-V).
4. Resource Management
Goal: Prevent resource starvation in shared environments (e.g., grids/clusters) by ensuring fair sharing of resources among competing jobs.
Techniques:
4.1 Advance Reservation: Explicitly reserving resources (CPU, memory) for specific jobs or types of jobs (e.g., dedicating one CPU core to grid jobs).
4.2 Priority Reduction: Lowering the priority of grid jobs to ensure native host jobs are not starved. Can create a simple "cycle-stealing" environment.
Workload Management Solutions:
4.3 Solaris Resource Manager (SRM):
Manages resources for workloads (groups of processes).
SRM has notions of projects and tasks, which are logical groupings of processes owned by a user or a group, to which relative or discrete resources can
be assigned.
Allocates CPU shares and caps physical memory (RSS) for projects and tasks.
Uses a fair-share scheduler to enforce controls.
The memory cap for each project can be set, and SRM will ensure that the physical memory consumption by the project does not exceed the cap.
4.4 Windows System Resource Manager (WSRM):
Creates resource-allocation policies by user or process.
Sets soft CPU caps (percentage) and manages process priorities.
Limits physical memory (working set size) and paging.
4.5 Citrix ARMTech:
Similar to SRM; allocates CPU and memory based on users, applications, or application groups using a share-based model.
Supports tiered policy paths.
ARMTech publishes accounting information on resource usage through the standard Window Management Instrumentation(WMI) interface available
on Windows server platforms.
4.6 Entitlement-Based Scheduling (EBS):
A scheduler for Linux that uses share-based entitlements to manage CPU allocation for processes.
In Linux, the Resident Set Size (RSS) of a process can be directly managed through system calls
EBS is an external add-on to the Linux kernel.
These system calls and EBS help prevent resource starvation
Principle:It is the responsibility of the transient code author to show that the code is [Link] execution host simply verifies that the claim by the author is true
and confirms that the code has not been tampered with
Parties:
Code Producer: Generates code and a proof of its safety.
Code Consumer (Host): Defines a safety policy and validates the proof.
Stages:
1. Certification: Producer computes and attaches the safety proof to the code.
2. Validation: Consumer verifies the proof against the safety policy. This is a one-time cost.
3. Execution: Code is [Link] runs with no run-time overhead.
Challenge: Difficult to implement for internet-scale distribution with millions of potential consumers with different policies.
Goal: Protect against code injection and control-flow hijacking attacks (e.g., buffer overflows).Monitoring control flow transfers to enforce a security policy
Principle:
The target binary code is separated and broken into basic blocks (sequences of instructions ending with a single control-transfer instruction).
A security policy is defined for control transfers (based on origin, function returns, etc.).
The system monitors all control transfers during execution to ensure they comply with the policy.
Benefit: Prevents injection attacks by controlling all control flow.
Example: SecureCode from Determina.
7. Antimalware
Definition: Software designed to identify and remove malware (viruses, worms, Trojan horses, spyware).
Examples: eTrust, McAfee, TrendMicro.
Approaches:
7.1 Signature-Based Scanning:
Compares files against a dictionary of known malware signatures.
Action: Infected files are cleaned, quarantined, or deleted.
Limitation: Relies on an up-to-date [Link] against zero-day attacks (new, unknown malware) and can be evaded by
encryption/polymorphism.
7.2 Real-Time Scanning (Behavioral):
Uses system-call interception to monitor I/O and resource access in real-time.
Checks for anomalous behavior against a [Link] protect against unknown viruses.
Limitation: Can cause significant performance overhead.
7.3 Heuristics-Based Worm Containment:
Uses heuristics to detect anomalies in network or file I/O patterns.
Example: Intel vPro
Inline Processing Unit: Briefly analyzes outgoing packets.
Sideband Processing Unit: A hardware component that runs packet data through a heuristics engine.
Action: If suspicious behavior is detected, the node is isolated from the network.
Benefit: Provides tamper-resistant, hardware-level security against zero-day worms.
7.4 Agent Defense:
Protects the antimalware software itself from being disabled.
Solution: Hardware assists to guarantee agent safety.
Example: Intel's System Integrity Service (SIS), a firmware-based solution that ensures:
Agent Locality: Protects the memory where the agent resides.
Agent Integrity: Verifies the agent code has not been tampered with.
Agent Execution State: Monitors the agent's state via tamper-proof heartbeats.
1. Infrastructure level Solutions
Goal: Provide Confidentiality, Integrity, and Authentication (CIA) via encryption and authentication.
Secure Socket Layer / Transport Layer Security (SSL/TLS):
Secures the transport layer (on top of TCP) and provides security in managing sessions over the transport channel
Protocol Steps:
1. ClientHello: The client contacts the server to initiate an SSL [Link] sends supported crypto algorithms & random number R_C.
2. ServerHello: Server replies by sending its certificate & random number R_S.
3. Client Authentication: Client verifies certificates, extracts server's public key, selects random S, and computes master secret K = f(R_C, R_S, S).
4. Key Exchange: Client sends S and hash of K, encrypted with server's public key.
5. Secure Communication: All subsequent data encrypted with session key K.
Primarily provides server authentication. Mutual authentication is possible if the client has a certificate, but typically uses username/password.
IP Security (IPSec):
Operates at the network layer (IP) to secure all distributed applications.
The principal feature of IPSec is that it can encrypt or authenticate all traffic at the Internet protocol (IP) level.
Can be implemented in networking devices (routers, firewalls) or directly on workstations/servers.
Main Components:
1. Security Mechanisms:
Authentication Header (AH): Authentication only.
Encapsulating Security Payload (ESP): Combined authentication and encryption.
2. Security Associations (SA): Agreement between two peers on security services for an IP traffic stream.
3. Key Management Infrastructure: Sets up SAs between two communicating peers
Modes of Operation:
Transport Mode: AH/ESP applied only to the packet payload;while original IP header untouched.
Tunnel Mode: AH/ESP applied to the entire original IP packet, which is then encapsulated into a new IP packet packet Used for VPNs.
Packet Filtering:based on some prior information,on the basis of which the filtering is carried out
Egress Filtering: The practice of scanning the packet headers of IP packets leaving a network (egress packets) and checking to see if they meet certain
criteria.
If the packets pass the criteria, they are routed outside of the [Link], the packets will not be sent to the intended target.
If the network administrator places a firewall or packet sniffer in the subnetwork to filter out any traffic without an originating IP address
Ingress Filtering: the filtering is done on all packets coming into the network
Distributed Packet Filtering (DPF): Drops packets based on route information (expected source interface).
Application Filtering (XML Firewalls):
Examines the content of SOAP/XML messages to block application-level attacks like XML Denial-of-Service (XDoS)
Applies security policies based on target address, caller identity, and message content to block attacks like entity-expansion (XDoS).
High performance overhead.
Location Hiding (Secure Overlay Service - SOS):
Hides the actual target server behind a network of proxies
Filters only allow traffic from known overlay nodes.
Concerns: Added latency, ineffective against insider attacks.
Throttling:
To prevent servers from going down, use max–min fair server-centric router throttles
An allocation is considered max-min fair if no user's allocated rate can be increased without decreasing the rate of another user who is receiving an
equal or lesser allocation preventing server flooding.
D-WARD: A source-end DDoS defense system deployed at source-end networks that observes traffic, classifies flows, and applies rate-limiting to malicious
flows.
Challenge: Differentiating legitimate from malicious traffic.
Intrusion Detection Systems (IDS):detect attacks based on a set of policies and information
Anomaly Detection: Detects deviations from normal behavior.
Signature Detection: Matches against known attack patterns.
Grid-based IDSs use sensors to monitor and SNORT to analyze.
Identifying the attacker after the attack has been completed assumes that the attack remains active after the completion of the trace.
Link Testing: Iteratively checks upstream links until the source is [Link]
Input Debugging: Routers develop an attack signature based on some attack pattern
Controlled Flooding :The victim floods all the links, based on the assumption that the packet drop taking place from an attacked link (can itself cause DoS).
Logging:
Source Path Isolation Engine (SPIE): Routers (Data Generation Agents - DGAs) compute packet hashes and store them in Bloom filters. As soon as the
attack is detected, the SPIE Traceback Manager (STM) calculates the attack signature of the packets used for the attack.
Problems: High resource usage, scalability issues, ineffective against distributed reflector attacks.
ICMP Traceback: Routers periodically send ICMP messages with packet info to the destination. Vulnerable to ICMP-based DoS attacks.
IP Traceback:
Probabilistic Packet Marking: Routers mark packets with a low [Link] router sends an ICMP traceback message for stored packets, enabling the
destination to trace attacks back to the source.
Node Sampling: Marks node info only(can be overwritten).
Edge Sampling: Marks node info and distance, reducing packets needed for traceback.
Provides data-origin authentication and integrity for DNS using digital signatures.
The digital signature contains the encrypted hash of the resource record set (RR set).The recipient can then check the digital signature against the received data
Each DNS message is signed. The DNS tree hierarchy is used to create a chain of trust from the [Link] node in the DNS tree is associated with a public key
Limitation: Does not provide confidentiality (information leakage is still possible).
E. Routing Attack Solutions:Are mostly concerned with the routing packets flowing between the routers
1. Link State Solutions:If links interrupt selectively, it is possible to have unsynchronized routing tables throughout the [Link]-effects of such routing
tables are looping and DoS
Digital Signatures: The routing updates increase by the size of the [Link] a PKI.
Sequence Information: Uses sequence numbers or timestamps to prevent replay attacks.
Intrusion-Detection: Centralized attack-analyzer module detects attacks based on possible alarm-events sequences (not scalable for the Internet).
Protocol-Driven:where attack detection capability is incorporated in the routing protocol itself
Secure Link State Protocol (SLSP): Requires 'confirmation' from both ends of a link. Works only in symmetric, non-colluding networks.
Consistency-Check (CC) Algorithm: Uses predecessor info in distance-vector updates to trace paths and detect inconsistencies. Whenever a node receives
the distance vector from its neighbors, it carries out CC by tracing the path from each [Link] be defeated by intelligent attackers.
2. Grid-Level Solutions
A. Architecture Security
2. Authorization Systems
VO-Level Systems:
Centralized authorization for an entire Virtual Organization that provides credentials for users to access resources.
Community Authorization Service (CAS): A trusted third-party server that manages and enforces access policies for the community's resources.
Other examples: VOMS, EALS.
Resource-Level Systems:
Allow access to resources based on the credentials presented by the users.
Implement authorization decisions for specific resources.
Akenti: Accesses resources via a resource gateway Policy Enforcement Point (PEP). Stakeholders define access policies via self-signed certificates. The
Akenti server evaluates these to grant access.
Other examples: PERMIS, GridMap.
Adaptive Firewall for Grid (AGF): Dynamically opens and closes firewall ports based on authenticated service [Link] firewall will open the ports when it
receives authenticated [Link] will close them again when there is no service activity on them.
HOSE Service Model: A flexible VPN model where customers specify aggregate traffic requirements, allowing on-demand resource adjustment. Fits the grid
vision but lacks strong QoS guarantees.
1. Credential-Management Solutions
Policy-Based TMS:
Establishes trust based on the exchange of credentials and pre-defined policies.
TrustBuilder: An infrastructure for trust negotiation where credentials are disclosed in a need-to-know manner over TLS, SMTP, etc.
Reputation-Based TMS:
Evaluates trust based on global/local reputation and policies.
PeerTrust: A distributed TMS where each peer stores a portion of global trust data does not use a centralized database for storing trust information
XenoTrust: Built on the XenoServer platform (XenoServers, XenoCorp, XIS) for reputation management in a service-for-payment model.
NICE Framework: A platform for cooperative applications (like grids) to manage trust among peers sharing resources.
3. Storage-Level Solutions
Security levels:
Identification:determining the user ID associated with an operation, Authentication, Authorization, Access Control.
User Information Storage: Local files, NIS (Network Information Service), or LDAP.
Client Authentication: IP address validation, IPSec, or Kerberos.
Since the server must interact with every file-access request for every client, this can quickly become a bottleneck.
NASD’s primary goal is to relieve the server bottleneck by only interacting with each user onetime, and providing a ‘capability key’.With the capability key, the
user can access the appropriate disk(s) directly, without any further server interaction.
Process:
3. OceanStore Security
OceanStore uses a large number of untrusted storage devices to store redundant copies of encrypted files and directories in persistent objects.
Data is replicated and encrypted by clients.
Objects are identified by a GUID (hash of owner's public key + name).
Heavy use of replication and public keys makes access revocation and data deletion difficult but provides a robust decentralized model.
Attackers are now focusing on exploiting design and coding weaknesses in applications.
Reasons for this shift:
Lack of security awareness among software developers.
Wide availability of public information on vulnerabilities and exploits.
Availability of sophisticated tools that automate exploitation.
Solution: Secure application development requires considering security at every stage of the development lifecycle (requirements, design, testing, deployment,
maintenance).
Primary Cause of Vulnerabilities: Insufficient or no input validation leads to SQL/LDAP/XPath Injection, XSS, and buffer-overflow attacks.
Injection Vulnerability: Occurs when user-supplied input is used in a command or query without proper sanitization, allowing an attacker to change its semantics.
Impact: Loss of confidentiality/integrity, broken authentication, arbitrary command execution, full system compromise.
HTTP is stateless; sessions are used to link requests from the same user via session identifiers.
The client and server exchange the session identifier between them as long as the session is valid.
Common Attacks: Session hijacking (stealing a valid session ID) and session fixation (forcing a user to use a known session ID).
1. Session-Identifier Generation
Session IDs can be stored in cookies,appended to URLs, or hidden form fields.
These session identifiers play a crucial role in session-hijacking attacks, in which the attacker’s main objective is to get hold of an active and valid ion
identifier
Requirements for Secure Generation:
Large size to avoid collisions.
Highly random and unpredictable.
Use cryptographically secure random number generators, not standard pseudorandom generators.
2. Session-Identifier Communication
This HTTP traffic includes the session identifiers and once these are known the attacker can launch session-hijacking attacks
Prevent sniffing by exchanging session IDs only over encrypted channels such as SSL/TLS.
For cookies, set the 'SSL only' attribute.
Encrypt the session cookie contents using cryptography to protect against theft via XSS.
3. Session-Data Protection
Store all session data on the server side.
Avoid storing sensitive data in client-side cookies.
Separate session authentication data from other data in different cookies.
Employ appropriate access controls on server-side session storage.
In a Web farm, ensure session data is stored in a shared, authenticated repository.
4. Session Lifetime
Invalidate sessions after a period of inactivity.
Keep the session timeout period as short as possible to reduce the window for hijacking or replay attacks.
C. Cryptography Use
Cryptography is crucial for authentication, confidentiality, integrity, and non-repudiation, but it does not solve all security problems (e.g., DoS).
Cause: Dynamic HTML pages that write back the user input to the browsers without validating the input can cause cross-site scripting.
The user input can come from anywhere including query strings, form variables, cookies, headers and so on.
Risk Applications: Search engines, bulletin boards, blogs – any app that constructs output from user input.
1. Input Filtering
Remove special characters (< > ; % & + - etc.) from all input (query strings, form data, cookies).
Disadvantage: Can cause data loss and may not be suitable if the application requires those characters.
Always perform filtering on the server side.
2. Output Encoding (Safer Approach)
Encode data before writing it to the browser.
Encoding prevents any embedded scripts from executing on the client browser by removing the meaning associated with the special characters.
Advantage: No data loss.
Best Practice: Encode data based on the output context HTML or URL etc.
Poor error handling can leak sensitive information (stack traces, technology versions, database schemas, credentials) to attackers.
These may reveal a lot about the specific technologies used, along with version details, database schema details, SQL query strings, login credentials, directory
structure and so on, giving the attackers a deeper understanding of the application and enabling them to launch more targeted attacks
Inconsistent error states can leave the application vulnerable.
Some language platforms like Java and .NET support a more structured exception-handling technique, but others, such as C and PHP, do not provide
support for exceptions
1. Fail Safe
Ensure the application fails into a safe, determinate state. Also Review handling of fatal errors.
2. Display Safe Error Messages
Show generic, user-friendly error messages to clients.
Never display detailed stack traces, system information, or credentials to the user.
Log detailed errors with stack traces securely for administrators.
3. Use Appropriate Exception Handling
In languages with support (e.g., Java, .NET), implement a structured exception-handling architecture.
Catch all exceptions, log the details, and display a generic message.
In languages without exception support (e.g., C, PHP), diligently check all function return values for errors and handle them.
Introduction:
A corporate security policy's main goal is to protect data by defining procedures, guidelines, and practices. With the rise of Service-Oriented Architecture (SOA), this
policy must be extended to secure assets exposed as services.
A. Core Principles of a Service Security Policy
Extended Scope: It is not limited to network requirements but also includes rules for the design and development of secure Web services.
Foundation: Typically, the service security policy is an extension of the existing corporate information security policy.
Asset Valuation:
Quantitative(monetary) Value: Calculate the financial impact if the asset (data, network, system) is compromised.
Qualitative(Intrinsic) Value: Consider the impact on credibility, reputation, and stakeholder relationships after a security incident.
Threat Evaluation:
Consider both external and internal threats.
Classify services based on parameters like:
1. Classification of information the service manages.
2. Whether it's deployed on the Internet or an intranet.
3. The business criticality of the underlying host system.
4. Results from qualitative and quantitative risk assessments.
5. A risk probability and assessment matrix.
Policy Data Requirements:
The policy should specify requirements for items such as:
1. Transport-level security (SSL, VPNs).
2. Allowed communication protocols (HTTP, SMTP, SOAP, JMS).
3. Port numbers to be exposed for the firewall
4. Network-address translation or IP hiding requirements.
5. Single sign-on (SSO)
6. Authentication mechanisms (PKI, Kerberos, Username/Password).
7. Authorization schemes (SAML, custom).
8. Access control requirements
9. Message-level security and validation.
10. Trusted domains and certificate authorities.
11. Non-functional requirements (scalability, availability).
Introduction:
Web services security standards extend traditional mechanisms (encryption, digital signatures) to handle XML. The stack builds from basic network standards to complex
federated identity management.
Point-to-Point Only: SSL secures only a single hop, but Web services often involve multiple intermediaries (multi-hop), creating weak points.
Certificate Distribution: Distributing client-side SSL certificates to all potential service requesters is impractical.
No Non-Repudiation: SSL sessions are stateless and do not provide proof that a specific transaction occurred, which is critical for Web services.
No Multi-Party Support: SSL cannot establish secure sessions between more than two parties.
B. XML Signature
In Web services, sometimes it is necessary to partially encrypt only specific parts of a SOAP message to ensure secure transmission with authenticity and
integrity.
Purpose: Provides data integrity, authentication, and non-repudiation for XML documents and parts of SOAP messages.
Need: Standard digital signatures don't work well with multi-hop XML messages where different parties need to sign different [Link] mechanisms have been
provided in the XML Signature specification.
Key Features:
Allows multiple parties to sign different parts of an XML message.
XML Signature validation requires that the data object that was signed be [Link] XML Signature itself will generally indicate the location of the
original signed object
Supports various forms: enveloped (signature inside data), enveloping (data inside signature), or detached (external reference).
Requires Canonicalization (C14N) to convert XML to a standard byte-for-byte form before signing, ensuring structurally identical documents produce
identical signatures.
Canonicalization refers essentially to the process of conversion of any XMLdocument to its canonical form and is necessary for XML Signature
computation.
C. XML Encryption
XML Encryption provides end-to-end security for applications that require a secure exchange of data.
Purpose: Provides confidentiality for all or part of an XML message (or non-XML data).
Need: SSL cannot handle partial message encryption or multi-hop confidentiality.
Core requirements for XML Encryption are that it must be able to encrypt an arbitrarily sized XML message and it must do so efficiently.
Key Features:
Built on symmetric-key encryption for efficiency.
Enables persistent confidentiality - data remains encrypted even at rest
Can encrypt an entire XML document, a specific XML element, or just the content within a XML element.
XML Encryption can handle both XML and nonXML (e.g. binary) data.
XML Encryption is the best choice if the application requires a combination of secure and insecure communication
Use Case: Securing only the credit card details in an otherwise plaintext purchase order.
1. Service Policy:
A Web service specifies what claims (like identity, keys, permissions) a request must include. If these claims are missing, the service rejects the message.
2. Requester Proof:
The requester attaches security tokens to the message to prove the required claims and show they are allowed to make the request.
3. Getting Required Claims:
If the requester doesn’t have the needed claims, they can obtain them from Security Token Services (STSs), which issue tokens and help build trust between
different systems.
Username Token: Used when a password is already shared between client and server.A digest (hash of password, nonce, timestamp) is sent to prevent replay
attacks.
Binary Security Token: For embedding X.509 certificates or Kerberos tickets. The message is signed with a private key to prove authenticity and prevent
[Link] server, the signature is verified by getting the decrypted hash back using the client’s public key and comparing it with the hash of data sent with the
message.
Security Token Reference: A reference to claims located elsewhere, avoiding the overhead of embedding large tokens.
One of the main drawbacks associated with WS-Security is its use of asymmetric cryptographic algorithms for encryption, which are computationally intensive
Purpose: An XML-based framework for exchanging authentication and authorization information between different Web-access management and security
domains.
Security information can be expressed as an XML document and securely transmitted from one application to another.
Core Component: Assertions ..An assertion is a declaration of one or more facts (statements) about a subject(eg:user)
Three Types of Assertions:
1. Authentication Statement: Asserts that a user was authenticated at a certain time and in a certain way.
2. Attribute Statement: Asserts information about a user (e.g., role, department).
3. Authorization Decision Statement: Asserts whether a user is permitted to access a resource.
G. WS-Policy
Purpose: Proposed as a standard to capture generic policy requirements and general characteristics of entities in an XML Webservices-based [Link] work in
conjunction with WS-Security
Key Concepts:
Defines a policy to be a collection of policy alternatives, where each policy alternative is a collection of policy assertions
Does not specify how policies are discovered or attached to a Web service.
It works in conjunction with WS-Security to define what is required.
H. WS-Trust
Purpose: An extension to WS-Security that defines how to issue, renew, and validate security tokens across different trust domains.
its main functions are:
Core Mechanism: Uses a Security Token Service (STS) as a broker that issues trusted security tokens in response to requests, enabling secure communication
between entities that don't inherently trust each other.
I. WS-Secure Conversation
Purpose: Builds on WS-Security and WS-Trust to manage secure, long-lived sessions (conversations) across multiple message exchanges.
Benefit: Establishes a security context and derives efficient session keys, improving performance and security for repeated interactions.
XKISS defines a protocol for resolving or validating public keys contained insigned and encrypted XML documents
WS-Privacy explains how to include privacy rules inside Web service policies.
It works with WS-Security, which can attach privacy-related claims to messages (like what data is collected or how it is used).
WS-Privacy is being developed through P3P (Platform for Privacy Preferences), a project that helps websites express their privacy policies in a standard format.
P3P lets websites publish privacy preferences in a format that software (browsers, agents) can automatically understand.
A P3P user agent (like a browser extension) helps users:
See what data a site collects
Understand how the site uses the data
Make automatic decisions (accept, warn, block) based on user preferences
WS-Privacy embeds privacy rules into Web services, and P3P provides a standard, machine-readable way for websites to express how user data is collected and
used.
P3P specifications:
B. XML Firewalls-Operate at or above the application layer in the conventional TCP/IP stack.
Purpose: Protect against XML and Web service-specific attacks that traditional firewalls cannot detect (e.g., XML Injection, packet-filtering,malformed SOAP,
WSDL probing).
XML firewalls can be configured to perform authentication, authorization and auditing, and prevent the various Web-service attacks.
They are typically deployed behind the IP firewall, and control the message flow before it reaches the Web services
Operation: Inspect incoming/outgoing SOAP messages at the application layer before the messages pass on to an application or client.
Deployment Forms: Can be software proxies or hardware appliances (the latter offer higher performance).
Deployment Scenarios:
SOA security standards like WS-Security aim to protect the distributed and interoperable nature of web services by ensuring message integrity and confidentiality, supporting loose coupling and multi-hop message paths . They address challenges such as ineffectiveness of traditional security tools like firewalls, which may allow HTTP traffic without strict checks, risking Man-in-the-Middle attacks . By using security tokens, XML Encryption for message confidentiality, and XML Signature for data integrity and non-repudiation, SOA security standards uphold the security of service communications without compromising interoperability . However, these standards also increase complexity and processing overhead in service interactions .
Improper session management can lead to session hijacking when session identifiers (IDs) are intercepted or predicted, allowing attackers to masquerade as legitimate users. If session IDs are sent over insecure channels, attackers can intercept them, leading to session hijacking through methods like Man-in-the-Middle attacks . Protective measures include using SSL/TLS to encrypt communication, regenerating session IDs upon login, and employing cryptographically secure random number generators to create unpredictable session IDs. Additionally, avoiding exposing IDs in URLs and implementing a rotation or regeneration of IDs are crucial .
Improper error handling can expose sensitive information, such as database details, platform specifics, or stack traces, to attackers, which can be leveraged to craft further attacks like SQL Injection or Denial of Service (DoS). For instance, verbose error messages during login attempts could reveal whether a username exists in the system or expose SQL statements. Preventive measures include displaying generic error messages, sanitizing logs, and ensuring that exception handling does not leak sensitive information to end-users or logs .
DNS vulnerabilities include data integrity and authentication issues, making it susceptible to attacks like phishing and cache poisoning. DNSSEC attempts to mitigate these by providing data-origin authentication and integrity using digital signatures, establishing a chain of trust from the DNS root to the resource records . Each DNS message is signed to verify data authenticity . Despite its advantages, DNSSEC does not address confidentiality, meaning information leakage is still possible, and it introduces complexity in key management and potential increases in query size, which could exacerbate performance issues .
Boolean-Based Blind SQL Injection relies on sending queries that return true or false, enabling attackers to infer database information based on conditional responses . On the other hand, Time-Based Blind SQL Injection measures the time it takes for a server to respond to a crafted query, using response delays to infer success of queries without visible outputs . Both techniques exploit insufficient input validation, but they differ in their reliance on database behavior; one hinges on logical evaluations, while the other on delay-based inference, making the latter generally more complex due to reliance on timing analysis .
Auditing and non-repudiation are critical in SOAs for establishing verifiable records of service interactions, supporting accountability and traceability in mixed trust environments. Auditing involves recording details of user actions and access attempts, which is essential for security analysis and compliance purposes . Non-repudiation ensures that actions performed by a service consumer or provider are indisputable, using cryptographic methods like digital signatures to prevent any involved party from denying their actions later . These measures underpin security objectives by ensuring data integrity, traceability, and accountability within the distributed flexibility of SOAs .
Probabilistic packet marking involves routers marking packets with a low probability as they traverse the network, allowing the destination to reconstruct attack pathways with a higher degree of certainty when sufficient packets are collected . This helps in tracing the origin of attacks like DDoS back to the source. However, potential drawbacks include the need for significant packet sampling to reconstruct paths accurately, which can be challenging in high-volume attacks. Additionally, reliance on statistical methods means that packet loss or insufficient marked packets can hinder traceback accuracy .
Non-persistent (Reflected) XSS attacks occur when a malicious script is immediately returned by the server without storing it, typically via a crafted URL or a search bar, affecting only those who directly access the malicious link . Persistent (Stored) XSS attacks involve malicious scripts that are stored on the server (e.g., in a forum post or database), meaning every user accessing the affected page is impacted . The primary impact on user experience is that persistent attacks have a broader reach, affecting more users, while non-persistent require individual interaction. Both lead to data security risks like theft of cookies, session tokens, or user data, and manipulation of web content .
XML Signature provides data integrity, authentication, and non-repudiation for sections of XML documents and SOAP messages by allowing multiple parties to sign different parts . This is beneficial in multi-hop scenarios where different parties may need to interact with specific parts of a message while keeping others secure. However, standard digital signatures are less effective as they do not allow for selective signing of parts within the same message . Limitations include the requirement for canonicalization to ensure identical document structures yield the same signatures, which can increase processing overhead .
Input validation techniques are fundamental in preventing injection attacks by ensuring that input aligns with expected data formats, types, and values before processing . For SQL, LDAP, or XPath injections, unvalidated inputs can allow attackers to alter query structures, leading to unauthorized access or data manipulation . Techniques like centralized validation routines, avoiding client-side validations for security, and using parameterized queries and proper encoding can prevent attackers from introducing malicious inputs into queries . Adhering to the principle of accepting only known good input and rejecting known bad input is key to defending against such vulnerabilities .