Azure - Security Services - Page - 3
Security Services
- Azure Network Security Group (NSG)
- Layer 3/4 traffic filtering.
- Azure Application Security Group (ASG)
- Groups VMs for easier NSG rule management.
- Azure Firewall
- Managed stateful firewall with centralized policies.
- Azure Web Application Firewall
- Protects web applications from common attacks such as SQL injection and XSS.
- Azure DDoS Protection
- Protects against distributed denial-of-service attacks.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1. Azure Network Security Group (NSG)
What it does:
-
Filters network traffic at Layer 3 (IP) and Layer 4 (TCP/UDP ports).
-
Controls which traffic is allowed or denied to Azure resources such as virtual machines.
Think of it as:
A security guard checking:
-
Source IP address
-
Destination IP address
-
Port number
-
Protocol (TCP/UDP)
Example:
Allow:
-
HTTP (Port 80)
-
HTTPS (Port 443)
Block:
-
RDP (Port 3389) from the internet
Use case:
Restrict who can access your VM or subnet.
2. Azure Application Security Group (ASG)
What it does:
-
Groups virtual machines based on their role.
-
Makes NSG rules easier to manage.
Without ASG:
You must create NSG rules using individual IP addresses.
With ASG:
Create groups such as:
-
WebServers
-
AppServers
-
DatabaseServers
Then create rules like:
Allow WebServers → AppServers on port 443
instead of specifying every VM's IP address.
Example:
ASGs:
-
Web-ASG
-
App-ASG
-
DB-ASG
NSG Rule:
-
Allow traffic from Web-ASG to App-ASG on HTTPS.
Use case:
Large environments with many VMs.
3. Azure Firewall
What it does:
-
A fully managed, centralized, stateful firewall service.
-
Monitors and controls inbound and outbound traffic across Azure networks.
Stateful means:
If a connection is allowed out, the return traffic is automatically allowed.
Features:
-
Centralized security policies
-
Network filtering
-
Application filtering
-
Threat intelligence integration
-
Logging and monitoring
Example:
Allow employees to access:
-
Microsoft services
-
Approved websites
Block:
-
Unauthorized internet destinations
Use case:
Enterprise-level network security across multiple virtual networks.
4. Azure Web Application Firewall (WAF)
What it does:
-
Protects web applications from common web attacks.
-
Operates at Layer 7 (Application Layer).
Protects against:
-
SQL Injection (SQLi)
-
Cross-Site Scripting (XSS)
-
HTTP protocol attacks
-
Bot attacks
-
Other vulnerabilities identified by the OWASP ruleset
SQL Injection (SQLi)
- Layer 3/4 traffic filtering.
- Groups VMs for easier NSG rule management.
- Managed stateful firewall with centralized policies.
- Protects web applications from common attacks such as SQL injection and XSS.
- Protects against distributed denial-of-service attacks.
1. Azure Network Security Group (NSG)
What it does:
- Filters network traffic at Layer 3 (IP) and Layer 4 (TCP/UDP ports).
- Controls which traffic is allowed or denied to Azure resources such as virtual machines.
Think of it as:
A security guard checking:
- Source IP address
- Destination IP address
- Port number
- Protocol (TCP/UDP)
Example:
Allow:
- HTTP (Port 80)
- HTTPS (Port 443)
Block:
- RDP (Port 3389) from the internet
Use case:
Restrict who can access your VM or subnet.
2. Azure Application Security Group (ASG)
What it does:
- Groups virtual machines based on their role.
- Makes NSG rules easier to manage.
Without ASG:
You must create NSG rules using individual IP addresses.
With ASG:
Create groups such as:
- WebServers
- AppServers
- DatabaseServers
Then create rules like:
Allow WebServers → AppServers on port 443
instead of specifying every VM's IP address.
Example:
ASGs:
- Web-ASG
- App-ASG
- DB-ASG
NSG Rule:
- Allow traffic from Web-ASG to App-ASG on HTTPS.
Use case:
Large environments with many VMs.
3. Azure Firewall
What it does:
- A fully managed, centralized, stateful firewall service.
- Monitors and controls inbound and outbound traffic across Azure networks.
Stateful means:
If a connection is allowed out, the return traffic is automatically allowed.
Features:
- Centralized security policies
- Network filtering
- Application filtering
- Threat intelligence integration
- Logging and monitoring
Example:
Allow employees to access:
- Microsoft services
- Approved websites
Block:
- Unauthorized internet destinations
Use case:
Enterprise-level network security across multiple virtual networks.
4. Azure Web Application Firewall (WAF)
What it does:
- Protects web applications from common web attacks.
- Operates at Layer 7 (Application Layer).
Protects against:
- SQL Injection (SQLi)
- Cross-Site Scripting (XSS)
- HTTP protocol attacks
- Bot attacks
- Other vulnerabilities identified by the OWASP ruleset
SQL Injection (SQLi) is a web application attack where an attacker inserts malicious SQL code into an application's input fields to manipulate the database.
It occurs when an application takes user input and directly includes it in SQL queries without proper validation or parameterization.
SQL Injection (SQLi) is a web application attack where an attacker inserts malicious SQL code into an application's input fields to manipulate the database.
It occurs when an application takes user input and directly includes it in SQL queries without proper validation or parameterization.
How It Works
Imagine a login form:
Username: admin
Password: password123
The application creates a query like:
SELECT * FROM UsersWHERE Username = 'admin'AND Password = 'password123';
If the credentials match, the user is logged in.
Imagine a login form:
Username: admin
Password: password123
The application creates a query like:
The Vulnerability
Suppose the application directly inserts user input into the query.
An attacker enters:
Username: admin
Password: ' OR '1'='1
Since '1'='1' is always true, the database may return records and allow unauthorized access.
Suppose the application directly inserts user input into the query.
An attacker enters:
Username: admin
Password: ' OR '1'='1
Since '1'='1' is always true, the database may return records and allow unauthorized access.
Real-World Impact
A successful SQL injection attack can lead to:
-
Unauthorized login
-
Theft of sensitive data
-
Modification of records
-
Data loss
-
Full database compromise
-
Regulatory and compliance violations
A successful SQL injection attack can lead to:
- Unauthorized login
- Theft of sensitive data
- Modification of records
- Data loss
- Full database compromise
- Regulatory and compliance violations
Cross-Site Scripting (XSS)
Cross-Site Scripting (XSS) is a web security vulnerability that allows an attacker to inject malicious client-side code (usually JavaScript) into a web page viewed by other users.
When the victim loads the page, the malicious script runs in the victim's browser as if it came from the trusted website.
Cross-Site Scripting (XSS) is a web security vulnerability that allows an attacker to inject malicious client-side code (usually JavaScript) into a web page viewed by other users.
When the victim loads the page, the malicious script runs in the victim's browser as if it came from the trusted website.
Simple Example
Imagine a website allows users to post comments.
A normal user posts:
Great article!
An attacker posts:
"<script>alert('XSS Attack')</script>"
If the website displays the comment without sanitizing it, every visitor's browser executes the script.
The result might be a popup, but real attackers usually do much more dangerous things.
Imagine a website allows users to post comments.
A normal user posts:
If the website displays the comment without sanitizing it, every visitor's browser executes the script.
The result might be a popup, but real attackers usually do much more dangerous things.
HTTP Protocol Attacks
HTTP protocol attacks are attacks that exploit weaknesses, misuse, or abnormal behavior in the HTTP/HTTPS protocol used by web applications.
Unlike SQL Injection or XSS, which target application logic, HTTP protocol attacks target how web servers, proxies, load balancers, and applications process HTTP requests and responses.
HTTP protocol attacks are attacks that exploit weaknesses, misuse, or abnormal behavior in the HTTP/HTTPS protocol used by web applications.
Unlike SQL Injection or XSS, which target application logic, HTTP protocol attacks target how web servers, proxies, load balancers, and applications process HTTP requests and responses.
1. HTTP Request Smuggling
This attack exploits differences in how front-end and back-end servers interpret HTTP requests.
Example architecture:
This attack exploits differences in how front-end and back-end servers interpret HTTP requests.
Example architecture:
Common HTTP Protocol Attacks
1. HTTP Request Smuggling
This attack exploits differences in how front-end and back-end servers interpret HTTP requests.
Example architecture:
Client → Load Balancer → Web Server
If the load balancer and web server disagree about where one request ends and the next begins, an attacker can "smuggle" a hidden request through.
Potential impact:
-
Bypass security controls
-
Access other users' data
-
Cache poisoning
-
Session hijacking
This attack exploits differences in how front-end and back-end servers interpret HTTP requests.
Potential impact:
- Bypass security controls
- Access other users' data
- Cache poisoning
- Session hijacking
Bot Attacks
bot attack
malicious or abusive automation
Common Types of Bot Attacks
1. Credential Stuffing
Attackers use usernames and passwords stolen from other websites and automatically try them on your site.
Example:
user1@example.com : password123user2@example.com : welcome123user3@example.com : qwerty
A bot can test thousands of these combinations per minute.
Impact:
-
Account takeover
-
Fraud
-
Unauthorized access
Attackers use usernames and passwords stolen from other websites and automatically try them on your site.
Example:
Impact:
- Account takeover
- Fraud
- Unauthorized access
2. Brute-Force Attacks
Bots repeatedly guess passwords.
Example:
admin123password123welcome123123456
until a correct password is found.
Impact:
-
Compromised accounts
-
Service disruption
Bots repeatedly guess passwords.
Example:
- Compromised accounts
- Service disruption
3. Web Scraping
Bots automatically collect information from websites.
Examples:
-
Product prices
-
Contact information
-
News content
-
Inventory data
Impact:
-
Excessive server load
-
Intellectual property theft
-
Competitive data harvesting
4. Denial-of-Service Bots
Bots automatically collect information from websites.
Examples:
- Product prices
- Contact information
- News content
- Inventory data
Impact:
- Excessive server load
- Intellectual property theft
- Competitive data harvesting
4. Denial-of-Service Bots
Large numbers of bots send requests to overload a website.
Example:
10 bots → 100 requests/sec
1,000 bots → 10,000 requests/sec
100,000 bots → massive traffic flood
Impact:
-
Slow performance
-
Website outages
Large-scale versions are often called Distributed Denial-of-Service (DDoS) attacks.
Large numbers of bots send requests to overload a website.
Example:
10 bots → 100 requests/sec
1,000 bots → 10,000 requests/sec
100,000 bots → massive traffic flood
Impact:
- Slow performance
- Website outages
Large-scale versions are often called Distributed Denial-of-Service (DDoS) attacks.
5. Fake Account Creation
Bots automatically create thousands of accounts.
Impact:
-
Spam
-
Abuse of free trials
-
Resource consumption
-
Distorted analytics
OWASP stands for Open Worldwide Application Security Project.
It is a nonprofit organization focused on improving the security of software and web applications. OWASP provides free security standards, tools, documentation, and best practices that are widely used by developers, security engineers, and organizations worldwide.
Why OWASP is Important
OWASP helps organizations:
-
Identify common application security risks
-
Build secure applications
-
Test applications for vulnerabilities
-
Train developers in secure coding practices
Many security products, including Azure Web Application Firewall, use OWASP rules to detect and block common web attacks.
OWASP Top 10
OWASP helps organizations:
- Identify common application security risks
- Build secure applications
- Test applications for vulnerabilities
- Train developers in secure coding practices
Many security products, including Azure Web Application Firewall, use OWASP rules to detect and block common web attacks.
OWASP Top 10
The most famous OWASP resource is the OWASP Top 10, a regularly updated list of the most critical web application security risks.
Examples include:
Example Attack:
Malicious input:
' OR 1=1 --
A WAF can detect and block this SQL injection attempt before it reaches your application.
Use case:
Websites, APIs, and internet-facing applications.
5. Azure DDoS Protection
What it does:
-
Protects Azure resources from Distributed Denial-of-Service (DDoS) attacks.
What is a DDoS attack?
Attackers use thousands or millions of devices to flood a service with traffic, making it unavailable to legitimate users.
Example:
A website normally receives:
-
10,000 requests per minute
Attack traffic:
-
10 million requests per minute
Azure DDoS Protection detects and mitigates the attack automatically.
Benefits:
-
Continuous monitoring
-
Automatic attack mitigation
-
Real-time analytics
-
Protection for public IP resources
Use case:
Public-facing applications that must remain available during large-scale attacks.
Quick Comparison
The most famous OWASP resource is the OWASP Top 10, a regularly updated list of the most critical web application security risks.
Examples include:
Example Attack:
Malicious input:
' OR 1=1 --
A WAF can detect and block this SQL injection attempt before it reaches your application.
Use case:
Websites, APIs, and internet-facing applications.
5. Azure DDoS Protection
What it does:
- Protects Azure resources from Distributed Denial-of-Service (DDoS) attacks.
What is a DDoS attack?
Attackers use thousands or millions of devices to flood a service with traffic, making it unavailable to legitimate users.
Example:
A website normally receives:
- 10,000 requests per minute
Attack traffic:
- 10 million requests per minute
Azure DDoS Protection detects and mitigates the attack automatically.
Benefits:
- Continuous monitoring
- Automatic attack mitigation
- Real-time analytics
- Protection for public IP resources
Use case:
Public-facing applications that must remain available during large-scale attacks.
Comments
Post a Comment