mirror of
https://github.com/linkedin/school-of-sre
synced 2026-01-07 09:08:02 +00:00
Review and corrections in the Security module
This commit is contained in:
@@ -5,22 +5,22 @@
|
||||
### Cache Poisoning Attack
|
||||
|
||||
- Since DNS responses are cached, a quick response can be provided for repeated translations.
|
||||
DNS negative queries are also cached, e.g., misspelled words, and all cached data periodically times out.
|
||||
DNS negative queries are also cached, e.g., misspelt words, and all cached data periodically times out.
|
||||
Cache poisoning is an issue in what is known as pharming. This term is used to describe a hacker’s attack in which a website’s traffic is redirected to a bogus website by forging the DNS mapping. In this case, an attacker attempts to insert a fake address record for an Internet domain into the DNS.
|
||||
If the server accepts the fake record, the cache is poisoned and subsequent requests for the address of the domain are answered with the address of a server controlled by the attacker. As long as the fake entry is cached by the server, browsers or e-mail servers will automatically go to the address provided by the compromised DNS server.
|
||||
the typical time to live (TTL) for cached entries is a couple of hours, thereby permitting ample time for numerous users to be affected by the attack.
|
||||
|
||||
### DNSSEC (Security Extension)
|
||||
|
||||
- The long-term solution to these DNS problems is authentication. If a resolver cannot distinguish between valid and invalid data in a response, then add source authentication to verify that the data received in a response is equal to the data entered by the zone administrator
|
||||
- DNS Security Extensions (DNSSEC) protects against data spoofing and corruption, and provides mechanisms to authenticate servers and requests, as well as mechanisms to establish authenticity and integrity.
|
||||
- The long-term solution to these DNS problems is authentication. If a resolver cannot distinguish between valid and invalid data in a response, then add source authentication to verify that the data received in response is equal to the data entered by the zone administrator
|
||||
- DNS Security Extensions (DNSSEC) protects against data spoofing and corruption and provides mechanisms to authenticate servers and requests, as well as mechanisms to establish authenticity and integrity.
|
||||
- When authenticating DNS responses, each DNS zone signs its data using a private key. It is recommended that this signing be done offline and in advance. The query for a particular record returns the requested resource record set (RRset) and signature (RRSIG) of the requested resource record set. The resolver then authenticates the response using a public key, which is pre-configured or learned via a sequence of key records in the DNS hierarchy.
|
||||
- The goals of DNSSEC are to provide authentication and integrity for DNS responses without confidentiality or DDoS protection.
|
||||
|
||||
### BGP
|
||||
|
||||
- BGP stands for border gateway protocol. It is a routing protocol that exchanges routing information among multiple Autonomous Systems (AS)
|
||||
- An Autonomous system is a collection of routers or networks with the same network policy usually under a single administrative control.
|
||||
- An Autonomous System is a collection of routers or networks with the same network policy usually under single administrative control.
|
||||
- BGP tells routers which hop to use in order to reach the destination network.
|
||||
- BGP is used for both communicating information among routers in an AS (interior) and between multiple ASes (exterior).
|
||||
|
||||
@@ -29,11 +29,11 @@ the typical time to live (TTL) for cached entries is a couple of hours, thereby
|
||||
## How BGP Works
|
||||
|
||||
- BGP is responsible for finding a path to a destination router & the path it chooses should be the shortest and most reliable one.
|
||||
- This decision is done through a protocol known as Link state. With the link state protocol each router broadcasts to all other routers in the network the state of its links and IP subnets. Each router then receives information from the other routers and constructs a complete topology view of the entire network. The next hop routing table is based on this topology view.
|
||||
- The link state protocol uses a famous algorithm in the field of computer science, Dijkstra’s shortest path algorithm:
|
||||
- We start from our router considering the path cost to all our direct neighbors.
|
||||
- This decision is done through a protocol known as Link state. With the link-state protocol, each router broadcasts to all other routers in the network the state of its links and IP subnets. Each router then receives information from the other routers and constructs a complete topology view of the entire network. The next-hop routing table is based on this topology view.
|
||||
- The link-state protocol uses a famous algorithm in the field of computer science, Dijkstra’s shortest path algorithm:
|
||||
- We start from our router considering the path cost to all our direct neighbours.
|
||||
- The shortest path is then taken
|
||||
- We then re-look at all our neighbors that we can reach and update our link state table with the cost information. We then continue taking the shortest path until every router has been visited.
|
||||
- We then re-look at all our neighbours that we can reach and update our link state table with the cost information. We then continue taking the shortest path until every router has been visited.
|
||||
|
||||
## BGP Vulnerabilities
|
||||
|
||||
@@ -41,34 +41,34 @@ the typical time to live (TTL) for cached entries is a couple of hours, thereby
|
||||
- Injecting bogus route advertising information into the BGP-distributed routing database by malicious sources, accidentally or routers can disrupt Internet backbone operations.
|
||||
- Blackholing traffic:
|
||||
- Blackhole route is a network route, i.e., routing table entry, that goes nowhere and packets matching the route prefix are dropped or ignored. Blackhole routes can only be detected by monitoring the lost traffic.
|
||||
- Blackhole routes are best defence against many common viral attacks where the traffic is dropped from infected machines to/from command & control masters.
|
||||
- Blackhole routes are the best defence against many common viral attacks where the traffic is dropped from infected machines to/from command & control masters.
|
||||
- Infamous BGP Injection attack on Youtube
|
||||
|
||||
- EX: In 2008, Pakistan decided to block YouTube by creating a BGP route that led into a black hole. Instead this routing information got transmitted to a hong kong ISP and from there accidentally got propagated to the rest of the world meaning millions were routed through to this black hole and therefore unable to access YouTube.
|
||||
- EX: In 2008, Pakistan decided to block YouTube by creating a BGP route that led into a black hole. Instead, this routing information got transmitted to a hong kong ISP and from there accidentally got propagated to the rest of the world meaning millions were routed through to this black hole and therefore unable to access YouTube.
|
||||
- Potentially, the greatest risk to BGP occurs in a denial of service attack in which a router is flooded with more packets than it can handle. Network overload and router resource exhaustion happen when the network begins carrying an excessive number of BGP messages, overloading the router control processors, memory, routing table and reducing the bandwidth available for data traffic.
|
||||
- Refer : <https://medium.com/bugbountywriteup/bgp-the-weak-link-in-the-internet-what-is-bgp-and-how-do-hackers-exploit-it-d899a68ba5bb>
|
||||
- Router flapping is another type of attack. Route flapping refers to repetitive changes to the BGP routing table, often several times a minute. Withdrawing and re-advertising at a high-rate can cause a serious problem for routers, since they propagate the announcements of routes. If these route flaps happen fast enough, e.g., 30 to 50 times per second, the router becomes overloaded, which eventually prevents convergence on valid routes. The potential impact for Internet users is a slowdown in message delivery, and in some cases packets may not be delivered at all.
|
||||
- Refer: <https://medium.com/bugbountywriteup/bgp-the-weak-link-in-the-internet-what-is-bgp-and-how-do-hackers-exploit-it-d899a68ba5bb>
|
||||
- Router flapping is another type of attack. Route flapping refers to repetitive changes to the BGP routing table, often several times a minute. Withdrawing and re-advertising at a high-rate can cause a serious problem for routers since they propagate the announcements of routes. If these route flaps happen fast enough, e.g., 30 to 50 times per second, the router becomes overloaded, which eventually prevents convergence on valid routes. The potential impact for Internet users is a slowdown in message delivery, and in some cases, packets may not be delivered at all.
|
||||
|
||||
BGP Security
|
||||
|
||||
- Border Gateway Protocol Security recommends the use of BGP peer authentication, since it is one of the strongest mechanisms for preventing malicious activity.
|
||||
- Border Gateway Protocol Security recommends the use of BGP peer authentication since it is one of the strongest mechanisms for preventing malicious activity.
|
||||
- The authentication mechanisms are Internet Protocol Security (IPsec) or BGP MD5.
|
||||
- Another method, known as prefix limits, can be used to avoid filling router tables. In this approach, routers should be configured to disable or terminate a BGP peering session, and issue warning messages to administrators, when a neighbor sends in excess of a preset number of prefixes.
|
||||
- Another method, known as prefix limits, can be used to avoid filling router tables. In this approach, routers should be configured to disable or terminate a BGP peering session, and issue warning messages to administrators when a neighbour sends in excess of a preset number of prefixes.
|
||||
- IETF is currently working on improving this space
|
||||
|
||||
## Web Based Attacks
|
||||
## Web-Based Attacks
|
||||
|
||||
### HTTP Response Splitting Attacks
|
||||
|
||||
- HTTP response splitting attack may happen where the server script embeds user data in HTTP response headers without appropriate sanitation.
|
||||
- This typically happens when the script embeds user data in the redirection URL of a redirection response (HTTP status code 3xx), or when the script embeds user data in a cookie value or name when the response sets a cookie.
|
||||
- HTTP response splitting attacks can be used to perform web cache poisoning and cross-site scripting attacks.
|
||||
- HTTP response splitting is the attacker’s ability to send a single HTTP request that forces the web server to form an output stream, which is then interpreted by the target as two HTTP responses instead of one response.
|
||||
- HTTP response splitting is the attacker’s ability to send a single HTTP request that forces the webserver to form an output stream, which is then interpreted by the target as two HTTP responses instead of one response.
|
||||
|
||||
### Cross-Site Request Forgery (CSRF or XSRF)
|
||||
|
||||
- A Cross-Site Request Forgery attack tricks the victim’s browser into issuing a command to a vulnerable web application.
|
||||
- Vulnerability is caused by browsers automatically including user authentication data, session ID, IP address, Windows domain credentials, etc with each request.
|
||||
- Vulnerability is caused by browsers automatically including user authentication data, session ID, IP address, Windows domain credentials, etc. with each request.
|
||||
- Attackers typically use CSRF to initiate transactions such as transfer funds, login/logout user, close account, access sensitive data, and change account details.
|
||||
- The vulnerability is caused by web browsers that automatically include credentials with each request, even for requests caused by a form, script, or image on another site. CSRF can also be dynamically constructed as part of a payload for a cross-site scripting attack
|
||||
- All sites relying on automatic credentials are vulnerable. Popular browsers cannot prevent cross-site request forgery. Logging out of high-value sites as soon as possible can mitigate CSRF risk. It is recommended that a high-value website must require a client to manually provide authentication data in the same HTTP request used to perform any operation with security implications. Limiting the lifetime of session cookies can also reduce the chance of being used by other malicious sites.
|
||||
@@ -77,20 +77,20 @@ BGP Security
|
||||
### Cross-Site Scripting (XSS) Attacks
|
||||
|
||||
- Cross-Site Scripting occurs when dynamically generated web pages display user input, such as login information, that is not properly validated, allowing an attacker to embed malicious scripts into the generated page and then execute the script on the machine of any user that views the site.
|
||||
- If successful, Cross-Site Scripting vulnerabilities can be exploited to manipulate or steal cookies, create requests that can be mistaken for those of a valid user, compromise confidential information, or execute malicious code on end user systems.
|
||||
- If successful, Cross-Site Scripting vulnerabilities can be exploited to manipulate or steal cookies, create requests that can be mistaken for those of a valid user, compromise confidential information, or execute malicious code on end-user systems.
|
||||
- Cross-Site Scripting (XSS or CSS) attacks involve the execution of malicious scripts on the victim’s browser. The victim is simply a user’s host and not the server. XSS results from a failure to validate user input by a web-based application.
|
||||
|
||||
### Document Object Model (DOM) XSS Attacks
|
||||
|
||||
- The Document Object Model (DOM) based XSS does not require the web server to receive the XSS payload for a successful attack. The attacker abuses the runtime by embedding their data on the client side. An attacker can force the client (browser) to render the page with parts of the DOM controlled by the attacker.
|
||||
- When the page is rendered and the data is processed by the page, typically by a client side HTML-embedded script such as JavaScript, the page’s code may insecurely embed the data in the page itself, thus delivering the cross-site scripting payload. There are several DOM objects which can serve as an attack vehicle for delivering malicious script to victims browser.
|
||||
- The Document Object Model (DOM) based XSS does not require the webserver to receive the XSS payload for a successful attack. The attacker abuses the runtime by embedding their data on the client-side. An attacker can force the client (browser) to render the page with parts of the DOM controlled by the attacker.
|
||||
- When the page is rendered and the data is processed by the page, typically by a client-side HTML-embedded script such as JavaScript, the page’s code may insecurely embed the data in the page itself, thus delivering the cross-site scripting payload. There are several DOM objects which can serve as an attack vehicle for delivering malicious script to victims browser.
|
||||
|
||||
### Clickjacking
|
||||
|
||||
- The technique works by hiding malicious link/scripts under the cover of the content of a legitimate site.
|
||||
- Buttons on a website actually contain invisible links, placed there by the attacker. So, an individual who clicks on an object they can visually see, is actually being duped into visiting a malicious page or executing a malicious script.
|
||||
- Buttons on a website actually contain invisible links, placed there by the attacker. So, an individual who clicks on an object they can visually see is actually being duped into visiting a malicious page or executing a malicious script.
|
||||
- When mouseover is used together with clickjacking, the outcome is devastating. Facebook users have been hit by a clickjacking attack, which tricks people into “liking” a particular Facebook page, thus enabling the attack to spread since Memorial Day 2010.
|
||||
- There is not yet effective defense against clickjacking, and disabling JavaScript is the only viable method
|
||||
- There is not yet effective defence against clickjacking, and disabling JavaScript is the only viable method
|
||||
|
||||
## DataBase Attacks & Defenses
|
||||
|
||||
@@ -107,7 +107,7 @@ Here the username & password is the input provided by the user. Suppose an attac
|
||||
|
||||
SELECT USERNAME,PASSWORD from USERS where USERNAME='' OR '1'='1' AND PASSOWRD='' OR '1'='1';
|
||||
|
||||
This query results in a true statement & user gets logged in. This example depicst the bost basic type of SQL injection
|
||||
This query results in a true statement & the user gets logged in. This example depicts the bost basic type of SQL injection
|
||||
```
|
||||
|
||||
|
||||
@@ -130,13 +130,13 @@ In spite of the most aggressive steps to protect computers from attacks, attacke
|
||||
|
||||
### Denial of Service Attacks
|
||||
|
||||
- Denial of service (DoS) attacks result in downtime or inability of a user to access a system. DoS attacks impact the availability tenet of information systems security. A DoS attack is a coordinated attempt to deny service by occupying a computer to perform large amounts of unnecessary tasks. This excessive activity makes the system unavailable to perform legitimate operations
|
||||
- Denial of service (DoS) attacks result in downtime or inability of a user to access a system. DoS attacks impact the availability of tenet of information systems security. A DoS attack is a coordinated attempt to deny service by occupying a computer to perform large amounts of unnecessary tasks. This excessive activity makes the system unavailable to perform legitimate operations
|
||||
- Two common types of DoS attacks are as follows:
|
||||
- Logic attacks—Logic attacks use software flaws to crash or seriously hinder the performance of remote servers. You can prevent many of these attacks by installing the latest patches to keep your software up to date.
|
||||
- Flooding attacks—Flooding attacks overwhelm the victim computer’s CPU, memory, or network resources by sending large numbers of useless requests to the machine.
|
||||
- Most DoS attacks target weaknesses in the overall system architecture rather than a software bug or security flaw
|
||||
- One popular technique for launching a packet flood is a SYN flood.
|
||||
- One of the best defenses against DoS attacks is to use intrusion prevention system (IPS) software or devices to detect and stop the attack.
|
||||
- One of the best defences against DoS attacks is to use intrusion prevention system (IPS) software or devices to detect and stop the attack.
|
||||
|
||||
### Distributed Denial of Service Attacks
|
||||
|
||||
@@ -160,14 +160,14 @@ In spite of the most aggressive steps to protect computers from attacks, attacke
|
||||
|
||||
### Birthday Attack
|
||||
|
||||
- Once an attacker compromises a hashed password file, a birthday attack is performed. A birthday attack is a type of cryptographic attack that is used to make brute-force attack of one-way hashes easier. It is a mathematical exploit that is based on the birthday problem in probability theory.
|
||||
- Once an attacker compromises a hashed password file, a birthday attack is performed. A birthday attack is a type of cryptographic attack that is used to make a brute-force attack of one-way hashes easier. It is a mathematical exploit that is based on the birthday problem in probability theory.
|
||||
- Further Reading:
|
||||
- <https://www.sciencedirect.com/topics/computer-science/birthday-attack>
|
||||
- <https://www.internetsecurity.tips/birthday-attack/>
|
||||
|
||||
### Brute-Force Password Attacks
|
||||
|
||||
- In a brute-force password attack, the attacker tries different passwords on a system until one of them is successful. Usually the attacker employs a software program to try all possible combinations of a likely password, user ID, or security code until it locates a match. This occurs rapidly and in sequence. This type of attack is called a brute-force password attack because the attacker simply hammers away at the code. There is no skill or stealth involved—just brute force that eventually breaks the code.
|
||||
- In a brute-force password attack, the attacker tries different passwords on a system until one of them is successful. Usually, the attacker employs a software program to try all possible combinations of a likely password, user ID, or security code until it locates a match. This occurs rapidly and in sequence. This type of attack is called a brute-force password attack because the attacker simply hammers away at the code. There is no skill or stealth involved—just brute force that eventually breaks the code.
|
||||
- Further Reading:
|
||||
- <https://owasp.org/www-community/attacks/Brute_force_attack>
|
||||
- <https://owasp.org/www-community/controls/Blocking_Brute_Force_Attacks>
|
||||
@@ -187,7 +187,7 @@ https://capec.mitre.org/data/definitions/16.html
|
||||
### Man-in-the-Middle Attacks
|
||||
|
||||
- A man-in-the-middle attack takes advantage of the multihop process used by many types of networks. In this type of attack, an attacker intercepts messages between two parties before transferring them on to their intended destination.
|
||||
- Web spoofing is a type of man-in-the-middle attack in which the user believes a secure session exists with a particular web server. In reality, the secure connection exists only with the attacker, not the web server. The attacker then establishes a secure connection with the web server, acting as an invisible go-between. The attacker passes traffic between the user and the web server. In this way, the attacker can trick the user into supplying passwords, credit card information, and other private data.
|
||||
- Web spoofing is a type of man-in-the-middle attack in which the user believes a secure session exists with a particular web server. In reality, the secure connection exists only with the attacker, not the webserver. The attacker then establishes a secure connection with the webserver, acting as an invisible go-between. The attacker passes traffic between the user and the webserver. In this way, the attacker can trick the user into supplying passwords, credit card information, and other private data.
|
||||
- Further Reading:
|
||||
- <https://owasp.org/www-community/attacks/Man-in-the-middle_attack>
|
||||
|
||||
@@ -199,7 +199,7 @@ https://capec.mitre.org/data/definitions/16.html
|
||||
|
||||
### Eavesdropping
|
||||
|
||||
- Eavesdropping, or sniffing, occurs when a host sets its network interface on promiscuous mode and copies packets that pass by for later analysis. Promiscuous mode enables a network device to intercept and read each network packet(ofcourse given some conditions) given sec, even if the packet’s address doesn’t match the network device. It is possible to attach hardware and software to monitor and analyze all packets on that segment of the transmission media without alerting any other users. Candidates for eavesdropping include satellite, wireless, mobile, and other transmission methods.
|
||||
- Eavesdropping, or sniffing, occurs when a host sets its network interface on promiscuous mode and copies packets that pass by for later analysis. Promiscuous mode enables a network device to intercept and read each network packet(of course given some conditions) given sec, even if the packet’s address doesn’t match the network device. It is possible to attach hardware and software to monitor and analyze all packets on that segment of the transmission media without alerting any other users. Candidates for eavesdropping include satellite, wireless, mobile, and other transmission methods.
|
||||
|
||||
### Social Engineering
|
||||
|
||||
|
||||
Reference in New Issue
Block a user