Author: Teri Radichel © 2025 2nd Sight Lab
Author: Teri Radichel © 2025 2nd Sight Lab
Azure Security
Day 6: Operations & Risk
Author: Teri Radichel © 2025 2nd Sight Lab
Original Copyright Notice
All Rights Reserved.
All course materials (the “Materials”) are protected by copyright under U.S. Copyright laws and are the property of 2nd Sight Lab. They
are provided pursuant to a royalty free, perpetual license to the course attendee (the "Attendee") to whom they were presented by 2nd
Sight Lab and are solely for the training and education of the Attendee. The Materials may not be copied, reproduced, distributed,
offered for sale, published, displayed, performed, modified, used to create derivative works, transmitted to others, or used or exploited
in any way, including, in whole or in part, as training materials by or for any third party.
ANY SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2
Author: Teri Radichel © 2025 2nd Sight Lab
Updated Copyright Notice (2025)
All Rights Reserved.
All course materials (the “Materials”) are protected by copyright under U.S. Copyright laws and are the property of 2nd Sight Lab. They
are provided pursuant to a royalty free, perpetual license to anyone who follows Teri Radichel on social media, is subscribed to
her blog via email, or has purchased or been given a copy of her purchased book.
ANY SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN
NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please read this post before using these materials. Thank you!
Why I am giving away my class materials for free
https://medium.com/cloud-security/why-im-releasing-my-cloud-security-class-materials-for-free-86546c5a025b
2nd Sight Lab is now focused on penetration testing services. Reach out to Teri Radichel on LinkedIn for more information.
https://2ndsightlab.com/cloud-penetration-testing.html
3
Author: Teri Radichel © 2025 2nd Sight Lab 4
Day 6: Risk Management
Azure Resource Graph
Defender for Cloud
Security Assessments
Compliance
Defender for Cloud Apps
Azure Logging
Azure Monitor
Sentinel
Security Operations
Incident Response
Penetration Testing
Risk Management
Author: Teri Radichel © 2025 2nd Sight Lab
Azure Resource Graph
5
Author: Teri Radichel © 2025 2nd Sight Lab 6
Azure Resource Graph
Extends Azure Resource Management
Enables you to query all your Azure resources
Capabilities:
- Complex filtering, grouping, and sorting by resource properties
- Assess the impact of applying policies
- Query changes to resource properties
Queries are based on the Kusto Query Language (KQL)
Author: Teri Radichel © 2025 2nd Sight Lab 7
az graph
Use the az graph
command to query
Azure resources
using Azure
Resource Graph
from the Azure
CLI.
Note that you’ll
need to install the
extension.
Author: Teri Radichel © 2025 2nd Sight Lab 8
Azure CLI Example
Use all the usual tools.
This example shows
queries for resources
using the Azure CLI.
You’ll need to install the
extension first, and
then you can run
queries.
Author: Teri Radichel © 2025 2nd Sight Lab 9
Query Azure Resource Graph with PowerShell
Install the Az.ResourceGraph
module.
Run commands to query for
resources.
Author: Teri Radichel © 2025 2nd Sight Lab 10
Azure Resource Graph Explorer
Author: Teri Radichel © 2025 2nd Sight Lab 11
Other Options
Many options exist for querying Azure resources.
Find resources with specific configurations and
properties.
Helpful for security professionals …and pentester
and attackers … looking for resources with security
misconfigurations and resources.
Author: Teri Radichel © 2025 2nd Sight Lab
Defender for Cloud
12
Author: Teri Radichel © 2025 2nd Sight Lab 13
Microsoft Defender for Cloud
Central point for security
management
- Continuous assessment
- Azure secure score
- Recommendations
- Alerts
Azure’s cloud native CSPM and
Security Monitoring Tool
Author: Teri Radichel © 2025 2nd Sight Lab 14
Getting Started
Search for Defender
On the welcome screen choose
to enable advanced features or
skip.
Scroll down to view cost.
Enabled per tenant and per
subscription.
Author: Teri Radichel © 2025 2nd Sight Lab 15
Overview Page
Default page
Overall security posture
Number of subscriptions, resources, recommendations and alerts.
Note that you can monitor other clouds.
Click on any item to drill down.
Author: Teri Radichel © 2025 2nd Sight Lab 16
Subscription Hierarchy
When you click on
subscriptions
notice that they are
grouped in the
organization
hierarchy.
You could add an
AWS or GCP
environment here.
Author: Teri Radichel © 2025 2nd Sight Lab 17
Workload Protections Dashboard
Click Workload Protections
Here you can view your
Defender for cloud coverage.
See which resources have
Microsoft protections enabled
or not.
Also see related security alerts.
Author: Teri Radichel © 2025 2nd Sight Lab 18
Upgrade DNS Settings
Click Upgrade under any service you want to enable.
Check with subscriptions you want to apply the setting to and click Upgrade.
Author: Teri Radichel © 2025 2nd Sight Lab 19
Updated Coverage
After applying coverage, refresh the page.
In a minute or so, the coverage numbers will update to show your coverage.
Author: Teri Radichel © 2025 2nd Sight Lab 20
Overview Dashboard - Security Posture
Return to the main
dashboard. View top
recommendations on
bottom right.
Click Security posture.
Author: Teri Radichel © 2025 2nd Sight Lab 21
Security Posture Details
A warning appears
when policies are not
assigned
View subscription
secure score
Link to
recommendations
Author: Teri Radichel © 2025 2nd Sight Lab 22
Azure Secure Score
The higher the score, the lower the risk.
The percentage of non-compliant resources.
Note that the secure score is not weighted by a priority you control.
Author: Teri Radichel © 2025 2nd Sight Lab 23
Recommendations
Click the recommendations link on the security posture page.
Author: Teri Radichel © 2025 2nd Sight Lab 24
Get Secure Score with CLI
You can obtain your secure score with the Azure CLI.
You might generate automated reports or trigger actions based on findings.
Author: Teri Radichel © 2025 2nd Sight Lab 25
Power BI Pro Users
Power BI is
Microsoft’s enterprise
solution for business
intelligence
Track secure score
over time if you have
a Power BI Pro
account
Author: Teri Radichel © 2025 2nd Sight Lab 26
View Remediation and Apply
Author: Teri Radichel © 2025 2nd Sight Lab 27
Exempt Resources from Policies
Note that you can exempt
resources from policies.
Ensure you understand
who can create
exemptions and how to
review and track them.
Note the warning about
cost.
Author: Teri Radichel © 2025 2nd Sight Lab 28
View Exemptions
To view exemptions
view the “Not applicable
resources” for a finding.
You’ll see the resources
which are exempted
from the security
control along with a
reason.
Author: Teri Radichel © 2025 2nd Sight Lab 29
View Recommendations for Resources
When viewing a resource click Defender for Cloud in the left menu.
Author: Teri Radichel © 2025 2nd Sight Lab 30
Prioritize with Purview
You can prioritize actions based
on the sensitivity of your data
using integration with Microsoft
Purview.
Purview also has some security
assessment capabilities for
assessing handling of sensitive
data.
Author: Teri Radichel © 2025 2nd Sight Lab 31
Enhanced Security Features
- Microsoft Defender for Endpoint (EDR)
- Vulnerability assessment for VMs,
container registries, and SQL resources
- Multi-cloud security and hybrid security
- Track compliance
- Machine learning recommendations
- JIT access
- Brute force and network attack protection
- Container security
- Threat protection
Author: Teri Radichel © 2025 2nd Sight Lab 32
View Changes to Defender in the Activity Log
Author: Teri Radichel © 2025 2nd Sight Lab 33
Windows Admin Center Integration
If your
organization uses
Windows Admin
Center you can
integrate with
Microsoft
Defender for
Cloud.
Author: Teri Radichel © 2025 2nd Sight Lab 34
Track Policies and Initiatives
Initiatives (discussed in the last class) are groups of security policies.
Track compliance with assigned initiatives in Defender for Cloud:
- Built in Azure Baseline initiative
- Custom initiatives
- Compliance initiatives
Note that Azure users can disable policies to disable recommendations if
they have permissions.
Author: Teri Radichel © 2025 2nd Sight Lab 35
View Policy Definition for a Finding
Author: Teri Radichel © 2025 2nd Sight Lab 36
View Policy Settings
Click on
Environment
settings in
the left menu
to view
initiatives
assigned to
subscriptions
in your
tenant.
Author: Teri Radichel © 2025 2nd Sight Lab 37
Edit Settings
Author: Teri Radichel © 2025 2nd Sight Lab 38
Security Policy Settings
Here you can view
which security
policies and
initiatives are
applied to the
subscription you are
editing. This is
another way to get
to the information
we looked at in the
last class.
Author: Teri Radichel © 2025 2nd Sight Lab 39
Asset Inventory
Click Inventory on the
left to view all your
cloud resources and
related security
recommendations.
Find unregistered
subscriptions as well.
Leverages Azure
Resource Graph.
Author: Teri Radichel © 2025 2nd Sight Lab 40
Click Open query for Azure Resource Graph
Author: Teri Radichel © 2025 2nd Sight Lab 41
Filter on different resources
Use the filter at the top to find resources such as installed applications.
Author: Teri Radichel © 2025 2nd Sight Lab 42
Defender for Servers
To use Defender for Servers you’ll
use Azure Arc
We discussed Azure Arc in the last
class.
Choose from two plans with
different features.
Author: Teri Radichel © 2025 2nd Sight Lab 43
Enable Database Protections
Select the a subscription.
Click Environment Settings in the left meu.
To protect all database types toggle the
Databases plan to On.
Optionally enable protection on certain
database types.
Author: Teri Radichel © 2025 2nd Sight Lab 44
Enable Defender for Other Resources
Use a similar approach to enable Defender for Cloud for the following:
Key Vaults
Storage
Resource Manager
DNS
Alternatively:
Enable all
Author: Teri Radichel © 2025 2nd Sight Lab 45
Defender networking
Query for network resources using the filter at the top of the list of
resources.
Author: Teri Radichel © 2025 2nd Sight Lab 46
Network Map
Click Workload protections. Then click Network map.
Author: Teri Radichel © 2025 2nd Sight Lab 47
Change the Network Map Filters
Get a visual map
of your networks.
By default you’ll
only see public
and networks with
high and medium
recommendations.
Adjust the filters to
see more.
Author: Teri Radichel © 2025 2nd Sight Lab 48
View recommendations
Click the arrow to
the right to view
recommendations.
Inner circle: VNETs
Next: Subnetes
Outer circle: VMs
Lines Connect
Resources
Author: Teri Radichel © 2025 2nd Sight Lab 49
Firewall Manager
Centralized firewall policy
management.
- Virtual WAN Hub
- VNets
- DDOS protection
- WAFs
Apply policies to firewalls
across multiple VNETs
Author: Teri Radichel © 2025 2nd Sight Lab 50
Cross-Tenant Defender for Cloud
Use Azure Lighthouse to enable cross-tenant access to Defender
Author: Teri Radichel © 2025 2nd Sight Lab 51
Automate Onboarding with Powershell
Follow the instruction in the
link in the slide notes to
automate the process of
onboarding subscriptions to
Microsoft Defender for Cloud
using PowerShell.
Author: Teri Radichel © 2025 2nd Sight Lab 52
Other Class Sections Covering Defender
Find more details about Microsoft Defender for Cloud in these sections:
- Security Assessments
- Compliance
- Vulnerability Management
- Security Operations
- Incident Response
Author: Teri Radichel © 2025 2nd Sight Lab
Security Assessments
53
Author: Teri Radichel © 2025 2nd Sight Lab 54
Azure Security Assessments
What to assess:
- Azure Platform Configuration
- Operating Systems
- Containers
- Code, Authentication, Authorization, and Application Logic
- Network Architecture and Implementation
- IAM Design and Permissions for Users, Resources, and Applications
- Deployment and SDLC processes
- Security Operations and Processes
What you assess depends on the organization specific objectives.
Author: Teri Radichel © 2025 2nd Sight Lab 55
CIS Benchmarks
Security Benchmarks for different platforms
Center for Internet Security
- Azure
- Operating Systems
- Docker
- Kubernetes
- Azure Kubernetes Service
Azure Policy and Defender
Author: Teri Radichel © 2025 2nd Sight Lab 56
CIS Benchmarks Checks & Remediation
CIS Benchmarks
documentation explains how to
check each setting and how to
remediate the problem.
Some tools offer auto-
remediation such as VMWare
CloudHealth.
Author: Teri Radichel © 2025 2nd Sight Lab 57
Are the CIS Benchmarks Enough?
Azure Foundation CIS Benchmarks: 117
Azure Services: 201
Author: Teri Radichel © 2025 2nd Sight Lab 58
Azure Security Benchmark
Azure Secure Score is
based on the Azure
Security Benchmark.
Maintained by Microsoft
so likely is updated more
frequently as services
change on the platform.
Assessments can leverage
this benchmark.
Author: Teri Radichel © 2025 2nd Sight Lab 59
Cloud Adoption Framework
The Cloud Adoption Framework
is designed to help customers
moving to the cloud come up
with an appropriate strategy.
The framework also covers
antipatterns, or things you
shouldn’t do when moving to
Azure. An assessment might
evaluate companies against
these issues.
Author: Teri Radichel © 2025 2nd Sight Lab 60
Azure Well-Architected Framework
An assessment may include evaluating an environment against the Well-
Architected Framework.
Author: Teri Radichel © 2025 2nd Sight Lab 61
Azure Best Practices
Azure offers a number of security
patterns for common scenarios.
Author: Teri Radichel © 2025 2nd Sight Lab 62
Cybersecurity Reference Architectures
A security
assessment can
compare a
customer
implementation
against the
Microsoft
Cybersecurity
Reference
Architecture (MCRA)
Author: Teri Radichel © 2025 2nd Sight Lab 63
Azure Security
Best Practices
White Paper
PDF document with best
practices and
implementation.
Author: Teri Radichel © 2025 2nd Sight Lab 64
TOC - Good list for auditing
Author: Teri Radichel © 2025 2nd Sight Lab 65
TOC Cont’d
Author: Teri Radichel © 2025 2nd Sight Lab 66
Azure Security White Papers
Author: Teri Radichel © 2025 2nd Sight Lab 67
Use Microsoft Defender for Assessments
Leverage Microsoft Defender for Assessments
Author: Teri Radichel © 2025 2nd Sight Lab 68
az security assessment
Author: Teri Radichel © 2025 2nd Sight Lab 69
What else might assessments cover?
Sensitive data management
Service specific details
Policy Management and Gaps
Network architecture, traversal, and attack paths
Application security and architecture
Deployment system architecture
IAM and credential architecture
Monitoring and alerts
Backup architecture and testing
Incident Response Processes
DR & BCP
Author: Teri Radichel © 2025 2nd Sight Lab 70
CSA Guidance: CAIQ
The CSA offers an
assessment
questionnaire for cloud
providers (CAIQ).
Can revise to use the
questions internally.
You can also review
Azure’s CAIQ.
Author: Teri Radichel © 2025 2nd Sight Lab 71
Open Source Tools
Some open source
tools can help with
security assessments.
CloudSploit is one that
works with Azure.
Other tools in the
notes.
Author: Teri Radichel © 2025 2nd Sight Lab 72
Commercial Third-Party Tools
Many third-party tools for assessments and CSPM.
Some only check CIS Benchmarks.
Some work better for internal teams than external assessments.
When assessing a customer environment, consider where data gets stored.
If stored in a third-party cloud may need permission first.
Author: Teri Radichel © 2025 2nd Sight Lab 73
Write your Own Queries
The cloud is a huge metadata database as mentioned earlier.
Many options to write your own queries in your language of choice.
Answer questions the other tools don’t answer.
Analyze data in unique ways.
Write your own open source tools!
Offer customers a unique perspective.
Customized reporting aligned with specific organizational objectives.
- Azure Graph
- CLI commands
- Powershell
- Data from Microsoft Defender
Author: Teri Radichel © 2025 2nd Sight Lab
Vulnerability Management
74
Author: Teri Radichel © 2025 2nd Sight Lab 75
Azure Cloud Vulnerabilities
From the Microsoft Vulnerabilities Report
2022 by Beyond Trust:
30 Vulnerabilities in Microsoft Azure in 2021
Sign up for Microsoft Security
Notifications
Monitor the news and security research
sources for vulnerabilities.
Author: Teri Radichel © 2025 2nd Sight Lab 76
Approaches to Vulnerability Management
The latter is clearly better but you’ll still need a combination of both.
Insert vulnerability scanning and checks into your deployment pipeline.
Scan for vulnerabilities that may already exist or come to light later.
“Shift left” to find vulnerabilities during the development process.
Two approaches to vulnerability management
Reactive: Find Vulnerabilities that exist on systems
Proactive: Block vulnerabilities from entering your environment (better).
Author: Teri Radichel © 2025 2nd Sight Lab 77
Checks in the Deployment Pipeline
Containers and code don’t run agents - test externally.
Developers should perform code reviews and do initial testing.
Leverage security-trained QA teams and pentesters for logic vulnerabilities.
Scanners can’t find everything!
SAST Static Application Security Testing. Scan the code.
DAST Dynamic Application Security Testing. Scan running app, no code.
IAST Interacts with the application. Provides line of code causing error.
RASP Integrated into the application to monitor for vulnerabilities.
Author: Teri Radichel © 2025 2nd Sight Lab 78
Container Scanning
Microsoft Defender offers
container scanning integrated
with the Azure Container
Registry. Scans occur:
- On push
- Containers pulled in last
30 days
- On import
- Continuously in some
cases
Author: Teri Radichel © 2025 2nd Sight Lab 79
Kubernetes Scans
Defender for cloud also offers scans
for Azure Kubernetes deployments.
Monitor for errors based on MITRE
ATT&CK for Containers and the
Center for Threat-Informed Defense.
Author: Teri Radichel © 2025 2nd Sight Lab 80
GitHub Advanced Security
GitHub Advanced Security offers:
Code scanning
Secret scanning
Dependency review
Configuration review
Integrates with
Azure DevOps
Author: Teri Radichel © 2025 2nd Sight Lab 81
Vulnerability Prevention Through Policies
In the last class we discussed Azure Policy and Azure Arc.
Leverage services such as those to prevent unwanted configurations and
vulnerable software from entering your Azure environment.
With Azure DevOps leverage YAML templates to prevent unwanted
configurations from entering your environment.
Apply Github Policies to your source code repositories.
Author: Teri Radichel © 2025 2nd Sight Lab 82
Microsoft Defender 365
Microsoft documentation:
Microsoft 365 Defender is a unified pre- and post-breach enterprise defense suite that natively coordinates
detection, prevention, investigation, and response across endpoints, identities, email, and applications to provide
integrated protection against sophisticated attacks.
For now we’ll look at Microsoft Defender Vulnerability Management.
Primarily an on-premises tool but can integrate systems with Azure.
Requires Microsoft Intune or Microsoft Endpoint Configuration Manager.
Author: Teri Radichel © 2025 2nd Sight Lab 83
Microsoft Defender Vulnerability Management
Offers:
- Asset discovery & inventory
- Vulnerability & configuration
assessment
- Risk-based prioritization
- Remediation
Offers APIs for automation and
integration.
Author: Teri Radichel © 2025 2nd Sight Lab 84
Plans & Azure Arc
A number of plans exist for
Defender resources
Integrate these servers with Azure
Arc for free.
Applying policies costs money.
Author: Teri Radichel © 2025 2nd Sight Lab 85
Microsoft Defender for Cloud
Integrated with
Microsoft Defender
Vulnerability
Management.
Leverages the Log
Analytics Agent on
Azure VMs or Arc
Enabled Machines.
Author: Teri Radichel © 2025 2nd Sight Lab 86
View Vulnerabilities in Defender for Cloud
This
screen
shows
integratio
n with
Microsoft
Defender
for
Endpoint.
Author: Teri Radichel © 2025 2nd Sight Lab 87
Remediate Vulnerabilities
To remediate
vulnerabilities, view the
detail pane and then follow
the remediation steps.
If you have automated
deployments with
automated updates, you
can redeploy the system or
code to get get updates.
Author: Teri Radichel © 2025 2nd Sight Lab 88
SQL Vulnerability Assessment
Microsoft offers similar vulnerability assessments for SQL databases.
Author: Teri Radichel © 2025 2nd Sight Lab
Compliance
89
Author: Teri Radichel © 2025 2nd Sight Lab 90
Azure Compliance
Azure offers guidance
for compliance with
many different
standards and
regulations.
Part of the
compliance will
belong to Azure due
to the shared
responsibility model.
Author: Teri Radichel © 2025 2nd Sight Lab 91
Choose Standards on Compliance Dashboard
Choose a standard to
understand how you can
comply with it on Azure.
Find out how Azure
complies with the
standard.
Links to customer
responsibilities and
blueprints.
Author: Teri Radichel © 2025 2nd Sight Lab 92
View Audit Reports for Azure
Log into the Azure Portal.
Click on the link in the slide
notes to get to the Audit
Reports blade.
Choose a compliance standard
and download the associated
audit report.
Author: Teri Radichel © 2025 2nd Sight Lab 93
Azure Security Benchmark Compliance Mappings
Azure has added mappings from the
Azure Security Benchmarks to CIS,
NIST, and PCI-DSS.
Drill into benchmark details to see
the alignment of a particular
benchmark with the related security
control in the other compliance
frameworks or standards.
Author: Teri Radichel © 2025 2nd Sight Lab 94
Azure Blueprints
Microsoft provides some
Azure Blueprints to help
customers comply with
standards.
Azure Blueprints were
covered in the last class.
Author: Teri Radichel © 2025 2nd Sight Lab 95
Compliance Strategies
Customers should strive for security in any environment.
However, to reduce the time and cost associated with audits:
- Leverage organizational hierarchy.
- Put resources requiring compliance in separate tenants, management
groups, or resource groups.
- Consider stricter policies that disallow non-compliant resources to those
groups.
- Restrict network and IAM access to these environments to the minimal
requirements to reduce risk of non-compliance.
- Restrict assets requiring compliance from deployment in other groups.
Author: Teri Radichel © 2025 2nd Sight Lab
Defender for Cloud Apps
96
Author: Teri Radichel © 2025 2nd Sight Lab 97
Defender for Cloud Apps
Microsoft’s version of a CASB
Cloud Access Security Broker
Monitors certain types of logs and API calls
Helps IT teams find Shadow IT
Discover SAAS applications in use
Who’s using them
Create policies
Competes with more popular tools like Netskope and McAfee
Author: Teri Radichel © 2025 2nd Sight Lab
Logging
98
Author: Teri Radichel © 2025 2nd Sight Lab 99
Issues with Logs on Azure
Many logging issues need to be addressed in Azure environments:
- Security teams are not aware the logs exist or do not have access.
- Developers and DevOps teams do not enable logs for all services.
- Logs are not fed into security systems used to track security events.
- Logs on ephemeral resources disappear on termination.
- Short-lived resources don’t configure or enable logs.
- Developers do not log sufficient information in applications.
- Difficult to track transactions and flows in microservices applications.
- Logs are not always real time…or complete…test before you need them.
Author: Teri Radichel © 2025 2nd Sight Lab 100
Types of Logs on Azure
Logs exist at different layers within the cloud platform.
Control / Management Logs: Azure Activity and Audit Logs
Data Plane Logs: Diagnostic Logs related to Azure Resources
Processed Logs: Microsoft Defender for Cloud Logs and Alerts
Remember to capture all log sources you might require.
Author: Teri Radichel © 2025 2nd Sight Lab 101
Activity Logs
Operations
performed on
resources in
your
subscriptions
on cloud
resources
Control Plane
Author: Teri Radichel © 2025 2nd Sight Lab 102
Resource Logs
These are the logs we
configured for specific
resources earlier in class
when we altered the
diagnostic settings.
Data Plane.
Author: Teri Radichel © 2025 2nd Sight Lab 103
Azure AD Audit Logs
Changes to tenant
User, Group, and Application Management
Author: Teri Radichel © 2025 2nd Sight Lab 104
Azure AD Sign-In Logs
Track who has
signed in, failed
and anomalous
sign-in attempts.
Author: Teri Radichel © 2025 2nd Sight Lab 105
VM Insights
Click on a VM. Click Insights on the left.
You will need to associate it with a workspace if the VM is not already.
Click Enable.
Author: Teri Radichel © 2025 2nd Sight Lab 106
View VM Insights Details
After about 10
minutes you’ll be
able to view your
VM insights.
Author: Teri Radichel © 2025 2nd Sight Lab 107
VM Log Agents
Azure Monitor Agent: Sends data to Monitor Metrics and Logs.
Log Analytics Agent: Sends data to Azure Monitor Logs. Same agent for
Systems Center Operations Manager.
Dependency Agent: Processes on machine and dependencies.
Azure Diagnostics Extension: Can send data to Event Hub and Storage
It seems that the Azure Monitor Agent will eventually replace others.
Author: Teri Radichel © 2025 2nd Sight Lab 108
Azure Storage Insights
Enable Storage
insights similar to
the way we just
enabled VM
Insights.
Navigate to your
storage account
and click Insights
in the left menu.
Author: Teri Radichel © 2025 2nd Sight Lab 109
Azure NSG Flow Logs
Enable
Network
Security
Group (NSG)
Flow Logs to
get standard
net flow
network
traffic logs.
Author: Teri Radichel © 2025 2nd Sight Lab 110
Packet Capture
Navigate to
Network Watcher
Click Packet Capture.
Add.
Author: Teri Radichel © 2025 2nd Sight Lab 111
Virtual Network Tap
Stream VM traffic to a network
packet collector or analytics tool
Requires a partner solution for
aggregating the TAP traffic in
the same Azure region and
tenant
Peering must be enabled in
advance
Author: Teri Radichel © 2025 2nd Sight Lab 112
Other Network Watcher Tools
Network Watcher
offers a number of
other tools, some
discussed earlier in
class.
Monitor and
troubleshoot network
connections.
Author: Teri Radichel © 2025 2nd Sight Lab 113
Azure SQL Audit Logs
Azure SQL offers audit logs
including logging actions by
Microsoft support.
You’ll probably want to turn all this
logging on if you have important
data in your database.
Different options exist for sending
logs to different data stores.
Author: Teri Radichel © 2025 2nd Sight Lab 114
Diagnostic Logs for Every Service
Every service has logs.
These are log types available from the Azure App Service.
Author: Teri Radichel © 2025 2nd Sight Lab 115
Azure DNS Metrics and Analytics
Azure does
not provide
detailed DNS
logs but does
provide
metrics
related to
DNS queries.
Author: Teri Radichel © 2025 2nd Sight Lab 116
Azure AD Integration Logs
When integrating with Azure AD or from the cloud to on-premises verify you
get all the logs you need.
While testing a new service in preview on Azure error messages did not
appear in any error logs.
Azure admitted later that there was a bug with the service but make sure
that the services work as expected and all logs are present that may be later
required - including detailed errors with the IP that generated them!
Author: Teri Radichel © 2025 2nd Sight Lab
Azure Monitor
117
Author: Teri Radichel © 2025 2nd Sight Lab 118
Azure Monitor
Performance and
availability of
applications.
Applications may run
on ephemeral
resources.
Storage, visualization,
analysis.
Author: Teri Radichel © 2025 2nd Sight Lab 119
What can you monitor
The Azure monitor reference page
lists all the things you can monitor
with Azure Monitor.
Author: Teri Radichel © 2025 2nd Sight Lab 120
Azure Monitor in Azure Portal
Azure monitor
consolidates
certain types of
logs. We’ve
already looked at
some of the
insights you can
configure which
get sent to Azure
Monitor.
Author: Teri Radichel © 2025 2nd Sight Lab 121
VM Insights
We previously enabled VM Insights on a VM.
Author: Teri Radichel © 2025 2nd Sight Lab 122
Storage Account Insights
Author: Teri Radichel © 2025 2nd Sight Lab 123
Network Insights
Author: Teri Radichel © 2025 2nd Sight Lab 124
Application Insights
Application Performance Monitoring for Web Apps
A number of platforms including: .NET, Node.js, Java, and Python.
On-premises or any cloud
Add an instrumentation package (SDK) to app.
Sends telemetry data to Azure Monitor.
- Azure App Service
- VMs
- Scale Sets
- Functions
- Containers
Author: Teri Radichel © 2025 2nd Sight Lab 125
Network Requirements
Second group of domains only required when making changes.
Author: Teri Radichel © 2025 2nd Sight Lab 126
Azure Monitor Insights Hub
Monitor all the
things…
Author: Teri Radichel © 2025 2nd Sight Lab 127
Azure Monitor Workbooks
Azure Monitor Workbooks
allow you to visualize your
data in different ways.
Workbooks are based on data
collected in Azure Monitor.
Author: Teri Radichel © 2025 2nd Sight Lab 128
Choose a template from the gallery.
Pre-defined
workbook
templates
you can use
as-is or
modify to
meet your
needs.
Author: Teri Radichel © 2025 2nd Sight Lab 129
Edit a template.
Click the edit button to edit
a template.
Refer to the link in the
notes which has details for
editing a template and a
demo video.
Author: Teri Radichel © 2025 2nd Sight Lab
Sentinel
130
Author: Teri Radichel © 2025 2nd Sight Lab 131
Sentinel
Sentinel is a cloud-hosted SIEM and SOAR solution.
SIEM: Security information and event management
SOAR: Security orchestration automation and response
Allows security teams to:
- Collect security information
- Detect threats
- Investigate
- Respond
Author: Teri Radichel © 2025 2nd Sight Lab 132
Navigate to Sentinel. Click to Create.
Author: Teri Radichel © 2025 2nd Sight Lab 133
Add a workspace
Author: Teri Radichel © 2025 2nd Sight Lab 134
Click to Connect to Collect Data
The first step will be to send data to your SIEM.
Click Collect data to send data to Azure Sentinel.
Author: Teri Radichel © 2025 2nd Sight Lab 135
Choose the data you want to connect.
Author: Teri Radichel © 2025 2nd Sight Lab 136
Add a Workbook
Author: Teri Radichel © 2025 2nd Sight Lab 137
View Your Workbook
Now you can
view your
workbook.
You could add
other
workbooks,
customize this
one, or create
your own.
Author: Teri Radichel © 2025 2nd Sight Lab 138
View your workbooks
Author: Teri Radichel © 2025 2nd Sight Lab 139
Threat Hunting
Create queries
to find the
security IOCs
you seek. Run
them and save
them for later.
Microsoft
provides some
default queries.
Author: Teri Radichel © 2025 2nd Sight Lab 140
Analytics
Create custom
queries to find
security events
and incidents.
- Click Analytics
- Click +Create
- Choose
Scheduled query
rule
Author: Teri Radichel © 2025 2nd Sight Lab 141
Enter general information for your rule
Author: Teri Radichel © 2025 2nd Sight Lab 142
Add a rule query
You can click on the options to the right to use a prior query.
Here the query to select our anomalous logins is selected. Test your query.
Author: Teri Radichel © 2025 2nd Sight Lab 143
Enter a schedule
Here we’ve selected to run our
rule every 5 minutes for data in
the past 5 hours.
Note that we’ve also selected to
turn this rule off as soon as a
match is discovered so we don’t
generate a multitude of alerts.
Click Next.
Author: Teri Radichel © 2025 2nd Sight Lab 144
Create an incident
Choose to create an
incident when your rule
has a finding.
Click next.
Choose all of the rest of
the defaults and create
your rule.
Author: Teri Radichel © 2025 2nd Sight Lab 145
View your findings
Now your rule shows up on the Analytics blade.
Author: Teri Radichel © 2025 2nd Sight Lab 146
Built-in Rules
You can also
choose from
pre-existing
rules.
Click on
Rule
templates.
Author: Teri Radichel © 2025 2nd Sight Lab 147
Incidents
Click on Incidents.
After your rule
runs and matches
log data you’ll have
an incident.
Click on it.
View possible
actions.
Author: Teri Radichel © 2025 2nd Sight Lab 148
Entity Behavior
As logs are collected, baseline behavior is parsed from the logs.
The Entity Behavior function of Sentinel then detects anomalous behavior.
Author: Teri Radichel © 2025 2nd Sight Lab 149
Threat Intelligence
Define IOCs.
Connect to
STIX/TAXII or a
threat intelligence
platform to Sentinel.
Use workbooks to
view intelligence
data.
Author: Teri Radichel © 2025 2nd Sight Lab 150
Content Hub
The Microsoft
Sentinel Content Hub
provides a myriad of
information to help
you get started.
Choose from data
connectors, parsers,
workbooks, sample
rules, and more.
Author: Teri Radichel © 2025 2nd Sight Lab 151
Notebooks
Use Jupyter
Notebooks and
machine
learning in your
threat hunting.
Requires
massive
amounts of data
to be useful.
Author: Teri Radichel © 2025 2nd Sight Lab 153
Repositories
Link to your
source code
repositories to
deploy custom
content.
Consider: Where
are your
credentials
stored to make
this work?
Author: Teri Radichel © 2025 2nd Sight Lab 154
Watchlist
Create a watchlist containing assets or identities you want to monitor.
Author: Teri Radichel © 2025 2nd Sight Lab 155
Automation
Automation is the
SOAR portion of
Sentinel. Create
automated
responses and
workflows to
respond to security
incidents and
events.
Author: Teri Radichel © 2025 2nd Sight Lab
Security Operations
156
Author: Teri Radichel © 2025 2nd Sight Lab 157
Security Operations in Azure
SOC processes are
generally the same
as on-premises,
though the tools
change.
One difference is that
it is easier to
automate responses
on a cloud platform
compared to on-
premises.
Author: Teri Radichel © 2025 2nd Sight Lab 158
Cloud Operations Tools
Azure Monitor
Azure Automation
Azure Backup
Azure Site Recovery
Azure AD
Microsoft Defender for Cloud
Azure Activity Log
Azure Diagnostic Logs
Azure Network Watcher
Cloud Service Provider Transparency
Azure offers a number of
tools to help with operations
in general.
Some of these tools are also
helpful and relevant for
security teams.
We have discussed most of
them already.
Author: Teri Radichel © 2025 2nd Sight Lab 159
Understand What You’re Looking For in Logs
Use resources such as
those already mentioned
in class such as the
Verizon Data Breach
Investigation Report to
understand top threats.
This slide shows at MITRE
ATT&CK Cloud Matrix
which tracks cloud
threats.
Author: Teri Radichel © 2025 2nd Sight Lab 160
MITRE ATT&CK in Sentinel
Click MITRE
ATT&CK (Preview)
in Sentinel.
This screen allows
you to visualize
coverage for
detecting MITRE
ATT&CK threats.
Author: Teri Radichel © 2025 2nd Sight Lab 161
Sample analysis of a cloud threat
When the Solar Winds attack
occurred, I noticed immediately that
the C2 channel was hosted on AWS.
This led to a high level analysis of the
breach, what caused it, and what
could have prevented it.
Note that I linked to deeper dive
analysis because sometimes that level
of detail is not necessary to prevent a
breach.
Author: Teri Radichel © 2025 2nd Sight Lab 162
Threat Hunting
Security operations will likely want access to any logs related to security.
Perform threat hunting on logs and alerts to find suspicious activity such as:
- Repetitive failed logins
- Repetitive blocked network connection attempts
- Excessive connections, long connections, repetitive beacon connections
- Monitor for unexpected and unwanted configuration changes.
- Web application attack alerts from WAFs and other monitoring tools.
- Risky activity alerted by cloud native and other security tools.
Define a process for evaluating and reporting security problems.
Author: Teri Radichel © 2025 2nd Sight Lab 163
Example: ID Risky Accounts
Monitor risky actions with
Azure AD identity protection.
Evaluate:
- Risk detections
- Other risks triggered at
the same time
- Sign-in attempt location
- Link to more detail
Author: Teri Radichel © 2025 2nd Sight Lab 164
Ransomware Defense
Microsoft provides
ransomware
guidance and
explains how
Sentinel provides a
complete view of a
kill chain.
See link in notes.
Author: Teri Radichel © 2025 2nd Sight Lab 165
SOC Sentinel Workbooks and Notebooks
Workbook: 14
Processes and
36 Procedures
for
operationalizing
Sentinel and
applying a SOC
methodology
Notebook for
threat hunting.
Author: Teri Radichel © 2025 2nd Sight Lab 166
Email Notifications
Manually or programmatically configure email alerts
Author: Teri Radichel © 2025 2nd Sight Lab 167
Monitor the Azure Status Map & Down Detector
Author: Teri Radichel © 2025 2nd Sight Lab 168
Investigating an anomaly in Sentinel
Data Source Anomalies listed on the Overview screen. Drill down.
Author: Teri Radichel © 2025 2nd Sight Lab 169
Query Logs for Related Events
Query the logs
for related
events.
View the details.
In this case the
logins come from
the managed
identity created
earlier in class.
Author: Teri Radichel © 2025 2nd Sight Lab 170
Azure Log Analytics
Navigate to
Azure AD.
Click Log
Analytics and
run a query.
Find the
corresponding
logs.
Author: Teri Radichel © 2025 2nd Sight Lab 171
Check the Sign-in logs
Query for
managed
identities sign-ins.
Find
corresponding
logins.
Note the resource:
Azure Key Vault.
Author: Teri Radichel © 2025 2nd Sight Lab 172
Navigate to Managed Identities
Click Activity log
Change timeframe
Author: Teri Radichel © 2025 2nd Sight Lab 173
Review activity for this managed identity
All these events were generated by a user, not the managed identity.
Author: Teri Radichel © 2025 2nd Sight Lab 174
Check the Key Vault Activity Log
No activity here
by the managed
identity either,
even though the
resource says Key
Vault.
What next?
Ask support…
Author: Teri Radichel © 2025 2nd Sight Lab
Incident Response
175
Author: Teri Radichel © 2025 2nd Sight Lab 176
Incident Response
Determine that an event is actually a security incident, then respond.
Most of the fundamentals of the process are the same.
What changes about IR on Azure:
- You don’t have access to the full stack for investigations.
- You may be counting on Azure for some aspects of an incident.
- How you capture memory and disks for forensic analysis.
- No ability to perform memory or data capture on terminated resources.
Author: Teri Radichel © 2025 2nd Sight Lab 177
If you are new to IR, Microsoft guidance
Author: Teri Radichel © 2025 2nd Sight Lab 178
SecOps Planning for Incident Response
The first step for incident
response: Planning
For those new to IR
Microsoft documentation
provides guidance to
develop and define an
incident response plan.
Sample consideration to
the right.
Author: Teri Radichel © 2025 2nd Sight Lab 179
Incident Response Activities
Microsoft provides this chart that covers activities with Microsoft 365
Defender. A similar approach would apply with Microsoft Defender for Cloud.
Author: Teri Radichel © 2025 2nd Sight Lab 180
Investigate Incidents in Sentinel
The link in the notes explains how to investigate incidents with Sentinel
Author: Teri Radichel © 2025 2nd Sight Lab 181
Responding to Defender Alerts
Take Action Tab:
Inspect Context
Mitigate the Threat
Prevent Future Attacks
Trigger Automated Response
Suppress Similar Alerts
Author: Teri Radichel © 2025 2nd Sight Lab 182
Sentinel Automation Rules
Automate incident response.
Author: Teri Radichel © 2025 2nd Sight Lab 183
Choose triggers, conditions, and actions
Author: Teri Radichel © 2025 2nd Sight Lab 184
Incident Response Playbooks
Plan ahead for steps to
take when an incident
occurs.
CISA provides a
generalized IR Playbook
which you can find in the
notes.
Use automation
whenever possible.
Author: Teri Radichel © 2025 2nd Sight Lab 185
Sentinel Playbooks
A playbook on Sentinel is a group of automation rules that work together.
Run playbooks automatically or on demand.
Based on workflows built with Azure Logic Apps.
Sentinel playbook templates (in preview) provide sample playbooks.
Find more playbooks in the Azure-Sentinel GitHub Repository.
Author: Teri Radichel © 2025 2nd Sight Lab 186
Simuland
Open-source tool
to help security
researchers stand
up labs and test
the effectiveness
of detections on
Defender and
Sentinel.
Author: Teri Radichel © 2025 2nd Sight Lab 187
Azure Security Benchmark IR Best Practices
Create an IR Guide
Create a scoring and prioritization procedure
Test security response procedures
Provide security incident contact details and configure alert notifications
Incorporate alerts into your incident response plan
Automate the response to security alerts
See the link in the slide notes for documentation on each point.
Author: Teri Radichel © 2025 2nd Sight Lab 188
Build a VM for incident response
Consider building a VM for incident response.
Automate the process for building the VM and updating the tools on it.
Leverage the VM in a dedicated resource group and network.
Better yet, use a separate management group and restrict access.
Microsoft offers step by step guidance in the link in the notes.
Author: Teri Radichel © 2025 2nd Sight Lab 189
Memory Dumps
Similar in some cases, different in others
Some considerations include:
- Once a VM is terminated it’s gone and there’s no way to get it back.
- Snapshots (backups) have different levels of consistency.
- Functions and other short-lived resources may no longer be available.
See resources in notes for memory capture on different types of resources.
Author: Teri Radichel © 2025 2nd Sight Lab 190
Azure support
For some security incidents, you
may need to log a ticket with
Azure Support to obtain
assistance.
The link in the notes covers how
to log a security event support
ticket.
Author: Teri Radichel © 2025 2nd Sight Lab
Penetration Testing
191
Author: Teri Radichel © 2025 2nd Sight Lab 192
Rules of Engagement
Author: Teri Radichel © 2025 2nd Sight Lab 193
Azure Scope
Author: Teri Radichel © 2025 2nd Sight Lab 194
Rules of Engagement
Understand the rules you need to follow for pentesting on Azure
Author: Teri Radichel © 2025 2nd Sight Lab 195
Bug Bounty Reports
Author: Teri Radichel © 2025 2nd Sight Lab 196
Pentesting Differences on Azure
Resources are ephemeral; IPs are not consistent.
Many companies don’t have a specific range of IP addresses.
Even those that do leverage BYOIP may have resources not in that range.
Tests are often not scoped by IP address but one of the following:
- Account
- Tenant
- Management group
- Subscription
- Resource group
- Domain names
Author: Teri Radichel © 2025 2nd Sight Lab 197
Leverage Security Assessment Tools
Leverate all the tools mentioned in the security assessment section.
All these tools can find security misconfigurations.
One of the primary sources of data breaches - exposing data to the Internet.
Types of data and administrative exposure:
- Storage resources exposed publicly
- VM and other backups exposed to the Internet
- Databases exposed to the Internet
- Kubernetes and other dashboards
- Administrative ports exposed to the Internet (brute force, vulns)
Author: Teri Radichel © 2025 2nd Sight Lab 198
Applications are the Doorway to the Cloud
Resources in the cloud are assigned permissions to take actions.
An attacker that accesses a resource may be able to use those permissions.
Many ways to leverage those permissions:
- SSRF
- Access to the host to run commands
- Redirect to metadata to obtain credentials
- Access credentials in memory
- Command injection
- Improper authentication and authorization
Author: Teri Radichel © 2025 2nd Sight Lab
Azure VM metadata
Azure metadata. Run this command:
curl -H Metadata:true "http://169.254.169.254/metadata/instance?api-
version=2017-08-01"
You must supply the correct API version. Run this to get a list of versions
curl -H Metadata:true "http://169.254.169.254/metadata/instance"
Powershell on Windows:
Invoke-RestMethod -Headers @{"Metadata"="true"} -URI
http://169.254.169.254/metadata/instance?api-version=2019-03-11 -Method get
199
Author: Teri Radichel © 2025 2nd Sight Lab 200
Open Redirect to Access Metadata
One of the ways attackers access the metadata service in the cloud is via an
Open Redirect.
Anywhere an application redirects to another URL may be subject to an open
redirect.
For example:
https://website.com?url=https://attackerurl.com
Or
https://website.com?url=http://169.254.169.254/metadata/instance
Author: Teri Radichel © 2025 2nd Sight Lab 201
DNS Rebinding
DNS Rebinding can get
around firewall rules
by leveraging a DNS
server that changes IP
addresses for DNS
names during the
course of an attack.
Attackers can redirect
to the metadata
service.
Author: Teri Radichel © 2025 2nd Sight Lab
Network Interfaces
Virtual Machine hosts can have one or more virtual network interfaces.
Multiple network interfaces could lead to data exfiltration….
202
Author: Teri Radichel © 2025 2nd Sight Lab
Replay Attacks on SAS
Many cloud services offer time-limited access via a URL
Azure Blob Storage does this.
Sometimes the URL method of authenticating access causes problems.
In one pentest, a website used this method for file upload.
The website tried to prevent malicious uploads, but bypass was possible.
Malware could then be uploaded directly to storage.
View a longer explanation in 2020 RSA presentation by Teri Radichel in notes.
203
Author: Teri Radichel © 2025 2nd Sight Lab
Injected code and containers
Try to insert a malicious code or container into the deployment pipeline.
204
Author: Teri Radichel © 2025 2nd Sight Lab
Container Vulnerabilities
Check for container exploits that could be leveraged in an attack.
205
Author: Teri Radichel © 2025 2nd Sight Lab
Kubernetes UI Misconfigurations
Kubernetes
dashboards exposed
or leveraged in an
attack to obtain
access to and
manage Kubernetes
configuration and
resources.
206
Author: Teri Radichel © 2025 2nd Sight Lab
Kubernetes shell
207
Author: Teri Radichel © 2025 2nd Sight Lab
PID1
The first process started by the Linux kernel gets PID 1
Running a container as PID 1 exposes all processes on the host to the container
Allows for container escape.
208
Author: Teri Radichel © 2025 2nd Sight Lab
Docker Socket
Docker socket is a unix socket to which Docker commands are sent.
Again, this opens up a path to run commands remotely.
Tools like Portainer make use of this capability.
209
Author: Teri Radichel © 2025 2nd Sight Lab
var/run/docker.sock
The owner of var/run/docker.sock was root (now you can run rootless)
Mounting var/run/docker.sock inside a container may give root access
Sample Exploit. Privileged option is not necessarily required.
210
Author: Teri Radichel © 2025 2nd Sight Lab
Mapping root folders
211
Author: Teri Radichel © 2025 2nd Sight Lab
Docker Layers and Squashing
Docker builds in layers each time you make a change and create an image.
If you have some sensitive data in prior layers, it can be exposed.
Squashing tries to hide prior layers - lose cache - but no prior secrets, etc.
Experimental - may not work on Windows.
212
Author: Teri Radichel © 2025 2nd Sight Lab 213
Privilege Abuse and Escalation
Understand how attacks
such as the Solar Winds
breach leveraged
administrative credentials
to create additional
permissions.
See if credentials can
create resources with more
permissions than their
own.
Author: Teri Radichel © 2025 2nd Sight Lab 214
Serverless Attacks
- Ability to change code
- SSRF attacks
- Leveraging applications
- IDOR
- Container and function
escape on Azure (past
research was able to exploit
Azure functions
- Successful attacks on
penetration tests (see
notes)
Author: Teri Radichel © 2025 2nd Sight Lab 215
Much more!
This section listed a few top attacks to test in a cloud environment.
There are many more.
Check prior cloud incidents, security breaches, and researcher findings.
Test applications thoroughly with and without credentials.
Check the specific configurations and functionality related to services.
Author: Teri Radichel © 2025 2nd Sight Lab 216
Testing incident Response
Test your incident response process
Determine if your IR teams can spot an attack
Microsoft offers Red Team guidance in the link in the notes
Author: Teri Radichel © 2025 2nd Sight Lab 217
Other Pentesting Tools and Tactics
Many other penetration testing tools for Azure exist.
You can find many of them with a GitHub search…
But before your use them, review the code.
Make sure you know what they do!
In some cases attack lists contain attacks that redirect your attacks to
another person’s attack site!
The links in the notes offer some additional resources.
Author: Teri Radichel © 2025 2nd Sight Lab
Risk Management
218
Author: Teri Radichel © 2025 2nd Sight Lab 219
How can we manage risk in the cloud?
Azure provides many risk management capabilities.
- Inventory by default
- Policy management
- Configuration management
- Security score
- Track security incidents and events
- Automated deployments
- Workbooks, third-party tools, and custom reports
Leverage these tools to monitor and measure risk. Then reduce it.
Author: Teri Radichel © 2025 2nd Sight Lab 220
Policies and Risk
The first step to managing risk is to define what drives risk.
Then create policies to reduce it.
Once you have policies in place, measure what is and is not compliant.
Azure policy allows you to block and alert on non-compliance.
Leverage the non-compliance to policies to report on risk.
Track time to remediate and put a time-limit on exceptions.
Author: Teri Radichel © 2025 2nd Sight Lab 221
Continuous Assessments
Many security assessment checks and scans can be automated.
Run a continuous assessment that reports on risk levels.
Track risk over time to see if it is going up or down.
Use risk tracking to Introduce new policies and controls.
Work to automatically remediate issues where possible.
Leverage penetration tests to validate your scans work!
Author: Teri Radichel © 2025 2nd Sight Lab 222
Consider the validity of your metrics
Number of findings doesn’t work when assets are increasing.
You will never be 100% compliant.
99% compliance is great but not if your most critical asset is exposed.
Consider relevance in relation to recent data breaches and attacks.
Strive to fix things quickly over fixing nothing due to categorization.
Chained vulnerabilities and cumulative risk increases individual risk items.
Author: Teri Radichel © 2025 2nd Sight Lab 223
Continuous Reporting and Improvement
Define key metrics to evaluate that increase risk:
- Configurations that cause data breaches and incidents
- Architecture that increases blast radius
- Visibility gaps that prevent timely discovery of security events
Create a high-level summary of risk findings for executives
Provide detailed backup with actionable fixes
Continuous improvement by fixing findings
Automated policies and remediation for greater efficiency
Track your progress over time - is risk increasing or decreasing?
Author: Teri Radichel © 2025 2nd Sight Lab 224
Summary
Query cloud resources to find non-compliance or unwanted configurations
Vulnerability scanning strategies
Resources for security assessments and penetration tests
Use Microsoft Defender for Cloud - Security Dashboard:
- Track compliance with azure Secure score and initiatives
- Service specific scans and reports
- Integration with Azure Arc, Defender for Cloud Apps (CASB)
Types of Azure logs and Azure Monitor to view and query logs
Incident investigation and response with Azure Sentinel (SIEM and SOAR)
Risk management and metrics through continuous assessment and
reporting

Azure Security - Day6 - Operations And Risk

  • 1.
    Author: Teri Radichel© 2025 2nd Sight Lab Author: Teri Radichel © 2025 2nd Sight Lab Azure Security Day 6: Operations & Risk
  • 2.
    Author: Teri Radichel© 2025 2nd Sight Lab Original Copyright Notice All Rights Reserved. All course materials (the “Materials”) are protected by copyright under U.S. Copyright laws and are the property of 2nd Sight Lab. They are provided pursuant to a royalty free, perpetual license to the course attendee (the "Attendee") to whom they were presented by 2nd Sight Lab and are solely for the training and education of the Attendee. The Materials may not be copied, reproduced, distributed, offered for sale, published, displayed, performed, modified, used to create derivative works, transmitted to others, or used or exploited in any way, including, in whole or in part, as training materials by or for any third party. ANY SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 2
  • 3.
    Author: Teri Radichel© 2025 2nd Sight Lab Updated Copyright Notice (2025) All Rights Reserved. All course materials (the “Materials”) are protected by copyright under U.S. Copyright laws and are the property of 2nd Sight Lab. They are provided pursuant to a royalty free, perpetual license to anyone who follows Teri Radichel on social media, is subscribed to her blog via email, or has purchased or been given a copy of her purchased book. ANY SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. Please read this post before using these materials. Thank you! Why I am giving away my class materials for free https://medium.com/cloud-security/why-im-releasing-my-cloud-security-class-materials-for-free-86546c5a025b 2nd Sight Lab is now focused on penetration testing services. Reach out to Teri Radichel on LinkedIn for more information. https://2ndsightlab.com/cloud-penetration-testing.html 3
  • 4.
    Author: Teri Radichel© 2025 2nd Sight Lab 4 Day 6: Risk Management Azure Resource Graph Defender for Cloud Security Assessments Compliance Defender for Cloud Apps Azure Logging Azure Monitor Sentinel Security Operations Incident Response Penetration Testing Risk Management
  • 5.
    Author: Teri Radichel© 2025 2nd Sight Lab Azure Resource Graph 5
  • 6.
    Author: Teri Radichel© 2025 2nd Sight Lab 6 Azure Resource Graph Extends Azure Resource Management Enables you to query all your Azure resources Capabilities: - Complex filtering, grouping, and sorting by resource properties - Assess the impact of applying policies - Query changes to resource properties Queries are based on the Kusto Query Language (KQL)
  • 7.
    Author: Teri Radichel© 2025 2nd Sight Lab 7 az graph Use the az graph command to query Azure resources using Azure Resource Graph from the Azure CLI. Note that you’ll need to install the extension.
  • 8.
    Author: Teri Radichel© 2025 2nd Sight Lab 8 Azure CLI Example Use all the usual tools. This example shows queries for resources using the Azure CLI. You’ll need to install the extension first, and then you can run queries.
  • 9.
    Author: Teri Radichel© 2025 2nd Sight Lab 9 Query Azure Resource Graph with PowerShell Install the Az.ResourceGraph module. Run commands to query for resources.
  • 10.
    Author: Teri Radichel© 2025 2nd Sight Lab 10 Azure Resource Graph Explorer
  • 11.
    Author: Teri Radichel© 2025 2nd Sight Lab 11 Other Options Many options exist for querying Azure resources. Find resources with specific configurations and properties. Helpful for security professionals …and pentester and attackers … looking for resources with security misconfigurations and resources.
  • 12.
    Author: Teri Radichel© 2025 2nd Sight Lab Defender for Cloud 12
  • 13.
    Author: Teri Radichel© 2025 2nd Sight Lab 13 Microsoft Defender for Cloud Central point for security management - Continuous assessment - Azure secure score - Recommendations - Alerts Azure’s cloud native CSPM and Security Monitoring Tool
  • 14.
    Author: Teri Radichel© 2025 2nd Sight Lab 14 Getting Started Search for Defender On the welcome screen choose to enable advanced features or skip. Scroll down to view cost. Enabled per tenant and per subscription.
  • 15.
    Author: Teri Radichel© 2025 2nd Sight Lab 15 Overview Page Default page Overall security posture Number of subscriptions, resources, recommendations and alerts. Note that you can monitor other clouds. Click on any item to drill down.
  • 16.
    Author: Teri Radichel© 2025 2nd Sight Lab 16 Subscription Hierarchy When you click on subscriptions notice that they are grouped in the organization hierarchy. You could add an AWS or GCP environment here.
  • 17.
    Author: Teri Radichel© 2025 2nd Sight Lab 17 Workload Protections Dashboard Click Workload Protections Here you can view your Defender for cloud coverage. See which resources have Microsoft protections enabled or not. Also see related security alerts.
  • 18.
    Author: Teri Radichel© 2025 2nd Sight Lab 18 Upgrade DNS Settings Click Upgrade under any service you want to enable. Check with subscriptions you want to apply the setting to and click Upgrade.
  • 19.
    Author: Teri Radichel© 2025 2nd Sight Lab 19 Updated Coverage After applying coverage, refresh the page. In a minute or so, the coverage numbers will update to show your coverage.
  • 20.
    Author: Teri Radichel© 2025 2nd Sight Lab 20 Overview Dashboard - Security Posture Return to the main dashboard. View top recommendations on bottom right. Click Security posture.
  • 21.
    Author: Teri Radichel© 2025 2nd Sight Lab 21 Security Posture Details A warning appears when policies are not assigned View subscription secure score Link to recommendations
  • 22.
    Author: Teri Radichel© 2025 2nd Sight Lab 22 Azure Secure Score The higher the score, the lower the risk. The percentage of non-compliant resources. Note that the secure score is not weighted by a priority you control.
  • 23.
    Author: Teri Radichel© 2025 2nd Sight Lab 23 Recommendations Click the recommendations link on the security posture page.
  • 24.
    Author: Teri Radichel© 2025 2nd Sight Lab 24 Get Secure Score with CLI You can obtain your secure score with the Azure CLI. You might generate automated reports or trigger actions based on findings.
  • 25.
    Author: Teri Radichel© 2025 2nd Sight Lab 25 Power BI Pro Users Power BI is Microsoft’s enterprise solution for business intelligence Track secure score over time if you have a Power BI Pro account
  • 26.
    Author: Teri Radichel© 2025 2nd Sight Lab 26 View Remediation and Apply
  • 27.
    Author: Teri Radichel© 2025 2nd Sight Lab 27 Exempt Resources from Policies Note that you can exempt resources from policies. Ensure you understand who can create exemptions and how to review and track them. Note the warning about cost.
  • 28.
    Author: Teri Radichel© 2025 2nd Sight Lab 28 View Exemptions To view exemptions view the “Not applicable resources” for a finding. You’ll see the resources which are exempted from the security control along with a reason.
  • 29.
    Author: Teri Radichel© 2025 2nd Sight Lab 29 View Recommendations for Resources When viewing a resource click Defender for Cloud in the left menu.
  • 30.
    Author: Teri Radichel© 2025 2nd Sight Lab 30 Prioritize with Purview You can prioritize actions based on the sensitivity of your data using integration with Microsoft Purview. Purview also has some security assessment capabilities for assessing handling of sensitive data.
  • 31.
    Author: Teri Radichel© 2025 2nd Sight Lab 31 Enhanced Security Features - Microsoft Defender for Endpoint (EDR) - Vulnerability assessment for VMs, container registries, and SQL resources - Multi-cloud security and hybrid security - Track compliance - Machine learning recommendations - JIT access - Brute force and network attack protection - Container security - Threat protection
  • 32.
    Author: Teri Radichel© 2025 2nd Sight Lab 32 View Changes to Defender in the Activity Log
  • 33.
    Author: Teri Radichel© 2025 2nd Sight Lab 33 Windows Admin Center Integration If your organization uses Windows Admin Center you can integrate with Microsoft Defender for Cloud.
  • 34.
    Author: Teri Radichel© 2025 2nd Sight Lab 34 Track Policies and Initiatives Initiatives (discussed in the last class) are groups of security policies. Track compliance with assigned initiatives in Defender for Cloud: - Built in Azure Baseline initiative - Custom initiatives - Compliance initiatives Note that Azure users can disable policies to disable recommendations if they have permissions.
  • 35.
    Author: Teri Radichel© 2025 2nd Sight Lab 35 View Policy Definition for a Finding
  • 36.
    Author: Teri Radichel© 2025 2nd Sight Lab 36 View Policy Settings Click on Environment settings in the left menu to view initiatives assigned to subscriptions in your tenant.
  • 37.
    Author: Teri Radichel© 2025 2nd Sight Lab 37 Edit Settings
  • 38.
    Author: Teri Radichel© 2025 2nd Sight Lab 38 Security Policy Settings Here you can view which security policies and initiatives are applied to the subscription you are editing. This is another way to get to the information we looked at in the last class.
  • 39.
    Author: Teri Radichel© 2025 2nd Sight Lab 39 Asset Inventory Click Inventory on the left to view all your cloud resources and related security recommendations. Find unregistered subscriptions as well. Leverages Azure Resource Graph.
  • 40.
    Author: Teri Radichel© 2025 2nd Sight Lab 40 Click Open query for Azure Resource Graph
  • 41.
    Author: Teri Radichel© 2025 2nd Sight Lab 41 Filter on different resources Use the filter at the top to find resources such as installed applications.
  • 42.
    Author: Teri Radichel© 2025 2nd Sight Lab 42 Defender for Servers To use Defender for Servers you’ll use Azure Arc We discussed Azure Arc in the last class. Choose from two plans with different features.
  • 43.
    Author: Teri Radichel© 2025 2nd Sight Lab 43 Enable Database Protections Select the a subscription. Click Environment Settings in the left meu. To protect all database types toggle the Databases plan to On. Optionally enable protection on certain database types.
  • 44.
    Author: Teri Radichel© 2025 2nd Sight Lab 44 Enable Defender for Other Resources Use a similar approach to enable Defender for Cloud for the following: Key Vaults Storage Resource Manager DNS Alternatively: Enable all
  • 45.
    Author: Teri Radichel© 2025 2nd Sight Lab 45 Defender networking Query for network resources using the filter at the top of the list of resources.
  • 46.
    Author: Teri Radichel© 2025 2nd Sight Lab 46 Network Map Click Workload protections. Then click Network map.
  • 47.
    Author: Teri Radichel© 2025 2nd Sight Lab 47 Change the Network Map Filters Get a visual map of your networks. By default you’ll only see public and networks with high and medium recommendations. Adjust the filters to see more.
  • 48.
    Author: Teri Radichel© 2025 2nd Sight Lab 48 View recommendations Click the arrow to the right to view recommendations. Inner circle: VNETs Next: Subnetes Outer circle: VMs Lines Connect Resources
  • 49.
    Author: Teri Radichel© 2025 2nd Sight Lab 49 Firewall Manager Centralized firewall policy management. - Virtual WAN Hub - VNets - DDOS protection - WAFs Apply policies to firewalls across multiple VNETs
  • 50.
    Author: Teri Radichel© 2025 2nd Sight Lab 50 Cross-Tenant Defender for Cloud Use Azure Lighthouse to enable cross-tenant access to Defender
  • 51.
    Author: Teri Radichel© 2025 2nd Sight Lab 51 Automate Onboarding with Powershell Follow the instruction in the link in the slide notes to automate the process of onboarding subscriptions to Microsoft Defender for Cloud using PowerShell.
  • 52.
    Author: Teri Radichel© 2025 2nd Sight Lab 52 Other Class Sections Covering Defender Find more details about Microsoft Defender for Cloud in these sections: - Security Assessments - Compliance - Vulnerability Management - Security Operations - Incident Response
  • 53.
    Author: Teri Radichel© 2025 2nd Sight Lab Security Assessments 53
  • 54.
    Author: Teri Radichel© 2025 2nd Sight Lab 54 Azure Security Assessments What to assess: - Azure Platform Configuration - Operating Systems - Containers - Code, Authentication, Authorization, and Application Logic - Network Architecture and Implementation - IAM Design and Permissions for Users, Resources, and Applications - Deployment and SDLC processes - Security Operations and Processes What you assess depends on the organization specific objectives.
  • 55.
    Author: Teri Radichel© 2025 2nd Sight Lab 55 CIS Benchmarks Security Benchmarks for different platforms Center for Internet Security - Azure - Operating Systems - Docker - Kubernetes - Azure Kubernetes Service Azure Policy and Defender
  • 56.
    Author: Teri Radichel© 2025 2nd Sight Lab 56 CIS Benchmarks Checks & Remediation CIS Benchmarks documentation explains how to check each setting and how to remediate the problem. Some tools offer auto- remediation such as VMWare CloudHealth.
  • 57.
    Author: Teri Radichel© 2025 2nd Sight Lab 57 Are the CIS Benchmarks Enough? Azure Foundation CIS Benchmarks: 117 Azure Services: 201
  • 58.
    Author: Teri Radichel© 2025 2nd Sight Lab 58 Azure Security Benchmark Azure Secure Score is based on the Azure Security Benchmark. Maintained by Microsoft so likely is updated more frequently as services change on the platform. Assessments can leverage this benchmark.
  • 59.
    Author: Teri Radichel© 2025 2nd Sight Lab 59 Cloud Adoption Framework The Cloud Adoption Framework is designed to help customers moving to the cloud come up with an appropriate strategy. The framework also covers antipatterns, or things you shouldn’t do when moving to Azure. An assessment might evaluate companies against these issues.
  • 60.
    Author: Teri Radichel© 2025 2nd Sight Lab 60 Azure Well-Architected Framework An assessment may include evaluating an environment against the Well- Architected Framework.
  • 61.
    Author: Teri Radichel© 2025 2nd Sight Lab 61 Azure Best Practices Azure offers a number of security patterns for common scenarios.
  • 62.
    Author: Teri Radichel© 2025 2nd Sight Lab 62 Cybersecurity Reference Architectures A security assessment can compare a customer implementation against the Microsoft Cybersecurity Reference Architecture (MCRA)
  • 63.
    Author: Teri Radichel© 2025 2nd Sight Lab 63 Azure Security Best Practices White Paper PDF document with best practices and implementation.
  • 64.
    Author: Teri Radichel© 2025 2nd Sight Lab 64 TOC - Good list for auditing
  • 65.
    Author: Teri Radichel© 2025 2nd Sight Lab 65 TOC Cont’d
  • 66.
    Author: Teri Radichel© 2025 2nd Sight Lab 66 Azure Security White Papers
  • 67.
    Author: Teri Radichel© 2025 2nd Sight Lab 67 Use Microsoft Defender for Assessments Leverage Microsoft Defender for Assessments
  • 68.
    Author: Teri Radichel© 2025 2nd Sight Lab 68 az security assessment
  • 69.
    Author: Teri Radichel© 2025 2nd Sight Lab 69 What else might assessments cover? Sensitive data management Service specific details Policy Management and Gaps Network architecture, traversal, and attack paths Application security and architecture Deployment system architecture IAM and credential architecture Monitoring and alerts Backup architecture and testing Incident Response Processes DR & BCP
  • 70.
    Author: Teri Radichel© 2025 2nd Sight Lab 70 CSA Guidance: CAIQ The CSA offers an assessment questionnaire for cloud providers (CAIQ). Can revise to use the questions internally. You can also review Azure’s CAIQ.
  • 71.
    Author: Teri Radichel© 2025 2nd Sight Lab 71 Open Source Tools Some open source tools can help with security assessments. CloudSploit is one that works with Azure. Other tools in the notes.
  • 72.
    Author: Teri Radichel© 2025 2nd Sight Lab 72 Commercial Third-Party Tools Many third-party tools for assessments and CSPM. Some only check CIS Benchmarks. Some work better for internal teams than external assessments. When assessing a customer environment, consider where data gets stored. If stored in a third-party cloud may need permission first.
  • 73.
    Author: Teri Radichel© 2025 2nd Sight Lab 73 Write your Own Queries The cloud is a huge metadata database as mentioned earlier. Many options to write your own queries in your language of choice. Answer questions the other tools don’t answer. Analyze data in unique ways. Write your own open source tools! Offer customers a unique perspective. Customized reporting aligned with specific organizational objectives. - Azure Graph - CLI commands - Powershell - Data from Microsoft Defender
  • 74.
    Author: Teri Radichel© 2025 2nd Sight Lab Vulnerability Management 74
  • 75.
    Author: Teri Radichel© 2025 2nd Sight Lab 75 Azure Cloud Vulnerabilities From the Microsoft Vulnerabilities Report 2022 by Beyond Trust: 30 Vulnerabilities in Microsoft Azure in 2021 Sign up for Microsoft Security Notifications Monitor the news and security research sources for vulnerabilities.
  • 76.
    Author: Teri Radichel© 2025 2nd Sight Lab 76 Approaches to Vulnerability Management The latter is clearly better but you’ll still need a combination of both. Insert vulnerability scanning and checks into your deployment pipeline. Scan for vulnerabilities that may already exist or come to light later. “Shift left” to find vulnerabilities during the development process. Two approaches to vulnerability management Reactive: Find Vulnerabilities that exist on systems Proactive: Block vulnerabilities from entering your environment (better).
  • 77.
    Author: Teri Radichel© 2025 2nd Sight Lab 77 Checks in the Deployment Pipeline Containers and code don’t run agents - test externally. Developers should perform code reviews and do initial testing. Leverage security-trained QA teams and pentesters for logic vulnerabilities. Scanners can’t find everything! SAST Static Application Security Testing. Scan the code. DAST Dynamic Application Security Testing. Scan running app, no code. IAST Interacts with the application. Provides line of code causing error. RASP Integrated into the application to monitor for vulnerabilities.
  • 78.
    Author: Teri Radichel© 2025 2nd Sight Lab 78 Container Scanning Microsoft Defender offers container scanning integrated with the Azure Container Registry. Scans occur: - On push - Containers pulled in last 30 days - On import - Continuously in some cases
  • 79.
    Author: Teri Radichel© 2025 2nd Sight Lab 79 Kubernetes Scans Defender for cloud also offers scans for Azure Kubernetes deployments. Monitor for errors based on MITRE ATT&CK for Containers and the Center for Threat-Informed Defense.
  • 80.
    Author: Teri Radichel© 2025 2nd Sight Lab 80 GitHub Advanced Security GitHub Advanced Security offers: Code scanning Secret scanning Dependency review Configuration review Integrates with Azure DevOps
  • 81.
    Author: Teri Radichel© 2025 2nd Sight Lab 81 Vulnerability Prevention Through Policies In the last class we discussed Azure Policy and Azure Arc. Leverage services such as those to prevent unwanted configurations and vulnerable software from entering your Azure environment. With Azure DevOps leverage YAML templates to prevent unwanted configurations from entering your environment. Apply Github Policies to your source code repositories.
  • 82.
    Author: Teri Radichel© 2025 2nd Sight Lab 82 Microsoft Defender 365 Microsoft documentation: Microsoft 365 Defender is a unified pre- and post-breach enterprise defense suite that natively coordinates detection, prevention, investigation, and response across endpoints, identities, email, and applications to provide integrated protection against sophisticated attacks. For now we’ll look at Microsoft Defender Vulnerability Management. Primarily an on-premises tool but can integrate systems with Azure. Requires Microsoft Intune or Microsoft Endpoint Configuration Manager.
  • 83.
    Author: Teri Radichel© 2025 2nd Sight Lab 83 Microsoft Defender Vulnerability Management Offers: - Asset discovery & inventory - Vulnerability & configuration assessment - Risk-based prioritization - Remediation Offers APIs for automation and integration.
  • 84.
    Author: Teri Radichel© 2025 2nd Sight Lab 84 Plans & Azure Arc A number of plans exist for Defender resources Integrate these servers with Azure Arc for free. Applying policies costs money.
  • 85.
    Author: Teri Radichel© 2025 2nd Sight Lab 85 Microsoft Defender for Cloud Integrated with Microsoft Defender Vulnerability Management. Leverages the Log Analytics Agent on Azure VMs or Arc Enabled Machines.
  • 86.
    Author: Teri Radichel© 2025 2nd Sight Lab 86 View Vulnerabilities in Defender for Cloud This screen shows integratio n with Microsoft Defender for Endpoint.
  • 87.
    Author: Teri Radichel© 2025 2nd Sight Lab 87 Remediate Vulnerabilities To remediate vulnerabilities, view the detail pane and then follow the remediation steps. If you have automated deployments with automated updates, you can redeploy the system or code to get get updates.
  • 88.
    Author: Teri Radichel© 2025 2nd Sight Lab 88 SQL Vulnerability Assessment Microsoft offers similar vulnerability assessments for SQL databases.
  • 89.
    Author: Teri Radichel© 2025 2nd Sight Lab Compliance 89
  • 90.
    Author: Teri Radichel© 2025 2nd Sight Lab 90 Azure Compliance Azure offers guidance for compliance with many different standards and regulations. Part of the compliance will belong to Azure due to the shared responsibility model.
  • 91.
    Author: Teri Radichel© 2025 2nd Sight Lab 91 Choose Standards on Compliance Dashboard Choose a standard to understand how you can comply with it on Azure. Find out how Azure complies with the standard. Links to customer responsibilities and blueprints.
  • 92.
    Author: Teri Radichel© 2025 2nd Sight Lab 92 View Audit Reports for Azure Log into the Azure Portal. Click on the link in the slide notes to get to the Audit Reports blade. Choose a compliance standard and download the associated audit report.
  • 93.
    Author: Teri Radichel© 2025 2nd Sight Lab 93 Azure Security Benchmark Compliance Mappings Azure has added mappings from the Azure Security Benchmarks to CIS, NIST, and PCI-DSS. Drill into benchmark details to see the alignment of a particular benchmark with the related security control in the other compliance frameworks or standards.
  • 94.
    Author: Teri Radichel© 2025 2nd Sight Lab 94 Azure Blueprints Microsoft provides some Azure Blueprints to help customers comply with standards. Azure Blueprints were covered in the last class.
  • 95.
    Author: Teri Radichel© 2025 2nd Sight Lab 95 Compliance Strategies Customers should strive for security in any environment. However, to reduce the time and cost associated with audits: - Leverage organizational hierarchy. - Put resources requiring compliance in separate tenants, management groups, or resource groups. - Consider stricter policies that disallow non-compliant resources to those groups. - Restrict network and IAM access to these environments to the minimal requirements to reduce risk of non-compliance. - Restrict assets requiring compliance from deployment in other groups.
  • 96.
    Author: Teri Radichel© 2025 2nd Sight Lab Defender for Cloud Apps 96
  • 97.
    Author: Teri Radichel© 2025 2nd Sight Lab 97 Defender for Cloud Apps Microsoft’s version of a CASB Cloud Access Security Broker Monitors certain types of logs and API calls Helps IT teams find Shadow IT Discover SAAS applications in use Who’s using them Create policies Competes with more popular tools like Netskope and McAfee
  • 98.
    Author: Teri Radichel© 2025 2nd Sight Lab Logging 98
  • 99.
    Author: Teri Radichel© 2025 2nd Sight Lab 99 Issues with Logs on Azure Many logging issues need to be addressed in Azure environments: - Security teams are not aware the logs exist or do not have access. - Developers and DevOps teams do not enable logs for all services. - Logs are not fed into security systems used to track security events. - Logs on ephemeral resources disappear on termination. - Short-lived resources don’t configure or enable logs. - Developers do not log sufficient information in applications. - Difficult to track transactions and flows in microservices applications. - Logs are not always real time…or complete…test before you need them.
  • 100.
    Author: Teri Radichel© 2025 2nd Sight Lab 100 Types of Logs on Azure Logs exist at different layers within the cloud platform. Control / Management Logs: Azure Activity and Audit Logs Data Plane Logs: Diagnostic Logs related to Azure Resources Processed Logs: Microsoft Defender for Cloud Logs and Alerts Remember to capture all log sources you might require.
  • 101.
    Author: Teri Radichel© 2025 2nd Sight Lab 101 Activity Logs Operations performed on resources in your subscriptions on cloud resources Control Plane
  • 102.
    Author: Teri Radichel© 2025 2nd Sight Lab 102 Resource Logs These are the logs we configured for specific resources earlier in class when we altered the diagnostic settings. Data Plane.
  • 103.
    Author: Teri Radichel© 2025 2nd Sight Lab 103 Azure AD Audit Logs Changes to tenant User, Group, and Application Management
  • 104.
    Author: Teri Radichel© 2025 2nd Sight Lab 104 Azure AD Sign-In Logs Track who has signed in, failed and anomalous sign-in attempts.
  • 105.
    Author: Teri Radichel© 2025 2nd Sight Lab 105 VM Insights Click on a VM. Click Insights on the left. You will need to associate it with a workspace if the VM is not already. Click Enable.
  • 106.
    Author: Teri Radichel© 2025 2nd Sight Lab 106 View VM Insights Details After about 10 minutes you’ll be able to view your VM insights.
  • 107.
    Author: Teri Radichel© 2025 2nd Sight Lab 107 VM Log Agents Azure Monitor Agent: Sends data to Monitor Metrics and Logs. Log Analytics Agent: Sends data to Azure Monitor Logs. Same agent for Systems Center Operations Manager. Dependency Agent: Processes on machine and dependencies. Azure Diagnostics Extension: Can send data to Event Hub and Storage It seems that the Azure Monitor Agent will eventually replace others.
  • 108.
    Author: Teri Radichel© 2025 2nd Sight Lab 108 Azure Storage Insights Enable Storage insights similar to the way we just enabled VM Insights. Navigate to your storage account and click Insights in the left menu.
  • 109.
    Author: Teri Radichel© 2025 2nd Sight Lab 109 Azure NSG Flow Logs Enable Network Security Group (NSG) Flow Logs to get standard net flow network traffic logs.
  • 110.
    Author: Teri Radichel© 2025 2nd Sight Lab 110 Packet Capture Navigate to Network Watcher Click Packet Capture. Add.
  • 111.
    Author: Teri Radichel© 2025 2nd Sight Lab 111 Virtual Network Tap Stream VM traffic to a network packet collector or analytics tool Requires a partner solution for aggregating the TAP traffic in the same Azure region and tenant Peering must be enabled in advance
  • 112.
    Author: Teri Radichel© 2025 2nd Sight Lab 112 Other Network Watcher Tools Network Watcher offers a number of other tools, some discussed earlier in class. Monitor and troubleshoot network connections.
  • 113.
    Author: Teri Radichel© 2025 2nd Sight Lab 113 Azure SQL Audit Logs Azure SQL offers audit logs including logging actions by Microsoft support. You’ll probably want to turn all this logging on if you have important data in your database. Different options exist for sending logs to different data stores.
  • 114.
    Author: Teri Radichel© 2025 2nd Sight Lab 114 Diagnostic Logs for Every Service Every service has logs. These are log types available from the Azure App Service.
  • 115.
    Author: Teri Radichel© 2025 2nd Sight Lab 115 Azure DNS Metrics and Analytics Azure does not provide detailed DNS logs but does provide metrics related to DNS queries.
  • 116.
    Author: Teri Radichel© 2025 2nd Sight Lab 116 Azure AD Integration Logs When integrating with Azure AD or from the cloud to on-premises verify you get all the logs you need. While testing a new service in preview on Azure error messages did not appear in any error logs. Azure admitted later that there was a bug with the service but make sure that the services work as expected and all logs are present that may be later required - including detailed errors with the IP that generated them!
  • 117.
    Author: Teri Radichel© 2025 2nd Sight Lab Azure Monitor 117
  • 118.
    Author: Teri Radichel© 2025 2nd Sight Lab 118 Azure Monitor Performance and availability of applications. Applications may run on ephemeral resources. Storage, visualization, analysis.
  • 119.
    Author: Teri Radichel© 2025 2nd Sight Lab 119 What can you monitor The Azure monitor reference page lists all the things you can monitor with Azure Monitor.
  • 120.
    Author: Teri Radichel© 2025 2nd Sight Lab 120 Azure Monitor in Azure Portal Azure monitor consolidates certain types of logs. We’ve already looked at some of the insights you can configure which get sent to Azure Monitor.
  • 121.
    Author: Teri Radichel© 2025 2nd Sight Lab 121 VM Insights We previously enabled VM Insights on a VM.
  • 122.
    Author: Teri Radichel© 2025 2nd Sight Lab 122 Storage Account Insights
  • 123.
    Author: Teri Radichel© 2025 2nd Sight Lab 123 Network Insights
  • 124.
    Author: Teri Radichel© 2025 2nd Sight Lab 124 Application Insights Application Performance Monitoring for Web Apps A number of platforms including: .NET, Node.js, Java, and Python. On-premises or any cloud Add an instrumentation package (SDK) to app. Sends telemetry data to Azure Monitor. - Azure App Service - VMs - Scale Sets - Functions - Containers
  • 125.
    Author: Teri Radichel© 2025 2nd Sight Lab 125 Network Requirements Second group of domains only required when making changes.
  • 126.
    Author: Teri Radichel© 2025 2nd Sight Lab 126 Azure Monitor Insights Hub Monitor all the things…
  • 127.
    Author: Teri Radichel© 2025 2nd Sight Lab 127 Azure Monitor Workbooks Azure Monitor Workbooks allow you to visualize your data in different ways. Workbooks are based on data collected in Azure Monitor.
  • 128.
    Author: Teri Radichel© 2025 2nd Sight Lab 128 Choose a template from the gallery. Pre-defined workbook templates you can use as-is or modify to meet your needs.
  • 129.
    Author: Teri Radichel© 2025 2nd Sight Lab 129 Edit a template. Click the edit button to edit a template. Refer to the link in the notes which has details for editing a template and a demo video.
  • 130.
    Author: Teri Radichel© 2025 2nd Sight Lab Sentinel 130
  • 131.
    Author: Teri Radichel© 2025 2nd Sight Lab 131 Sentinel Sentinel is a cloud-hosted SIEM and SOAR solution. SIEM: Security information and event management SOAR: Security orchestration automation and response Allows security teams to: - Collect security information - Detect threats - Investigate - Respond
  • 132.
    Author: Teri Radichel© 2025 2nd Sight Lab 132 Navigate to Sentinel. Click to Create.
  • 133.
    Author: Teri Radichel© 2025 2nd Sight Lab 133 Add a workspace
  • 134.
    Author: Teri Radichel© 2025 2nd Sight Lab 134 Click to Connect to Collect Data The first step will be to send data to your SIEM. Click Collect data to send data to Azure Sentinel.
  • 135.
    Author: Teri Radichel© 2025 2nd Sight Lab 135 Choose the data you want to connect.
  • 136.
    Author: Teri Radichel© 2025 2nd Sight Lab 136 Add a Workbook
  • 137.
    Author: Teri Radichel© 2025 2nd Sight Lab 137 View Your Workbook Now you can view your workbook. You could add other workbooks, customize this one, or create your own.
  • 138.
    Author: Teri Radichel© 2025 2nd Sight Lab 138 View your workbooks
  • 139.
    Author: Teri Radichel© 2025 2nd Sight Lab 139 Threat Hunting Create queries to find the security IOCs you seek. Run them and save them for later. Microsoft provides some default queries.
  • 140.
    Author: Teri Radichel© 2025 2nd Sight Lab 140 Analytics Create custom queries to find security events and incidents. - Click Analytics - Click +Create - Choose Scheduled query rule
  • 141.
    Author: Teri Radichel© 2025 2nd Sight Lab 141 Enter general information for your rule
  • 142.
    Author: Teri Radichel© 2025 2nd Sight Lab 142 Add a rule query You can click on the options to the right to use a prior query. Here the query to select our anomalous logins is selected. Test your query.
  • 143.
    Author: Teri Radichel© 2025 2nd Sight Lab 143 Enter a schedule Here we’ve selected to run our rule every 5 minutes for data in the past 5 hours. Note that we’ve also selected to turn this rule off as soon as a match is discovered so we don’t generate a multitude of alerts. Click Next.
  • 144.
    Author: Teri Radichel© 2025 2nd Sight Lab 144 Create an incident Choose to create an incident when your rule has a finding. Click next. Choose all of the rest of the defaults and create your rule.
  • 145.
    Author: Teri Radichel© 2025 2nd Sight Lab 145 View your findings Now your rule shows up on the Analytics blade.
  • 146.
    Author: Teri Radichel© 2025 2nd Sight Lab 146 Built-in Rules You can also choose from pre-existing rules. Click on Rule templates.
  • 147.
    Author: Teri Radichel© 2025 2nd Sight Lab 147 Incidents Click on Incidents. After your rule runs and matches log data you’ll have an incident. Click on it. View possible actions.
  • 148.
    Author: Teri Radichel© 2025 2nd Sight Lab 148 Entity Behavior As logs are collected, baseline behavior is parsed from the logs. The Entity Behavior function of Sentinel then detects anomalous behavior.
  • 149.
    Author: Teri Radichel© 2025 2nd Sight Lab 149 Threat Intelligence Define IOCs. Connect to STIX/TAXII or a threat intelligence platform to Sentinel. Use workbooks to view intelligence data.
  • 150.
    Author: Teri Radichel© 2025 2nd Sight Lab 150 Content Hub The Microsoft Sentinel Content Hub provides a myriad of information to help you get started. Choose from data connectors, parsers, workbooks, sample rules, and more.
  • 151.
    Author: Teri Radichel© 2025 2nd Sight Lab 151 Notebooks Use Jupyter Notebooks and machine learning in your threat hunting. Requires massive amounts of data to be useful.
  • 152.
    Author: Teri Radichel© 2025 2nd Sight Lab 153 Repositories Link to your source code repositories to deploy custom content. Consider: Where are your credentials stored to make this work?
  • 153.
    Author: Teri Radichel© 2025 2nd Sight Lab 154 Watchlist Create a watchlist containing assets or identities you want to monitor.
  • 154.
    Author: Teri Radichel© 2025 2nd Sight Lab 155 Automation Automation is the SOAR portion of Sentinel. Create automated responses and workflows to respond to security incidents and events.
  • 155.
    Author: Teri Radichel© 2025 2nd Sight Lab Security Operations 156
  • 156.
    Author: Teri Radichel© 2025 2nd Sight Lab 157 Security Operations in Azure SOC processes are generally the same as on-premises, though the tools change. One difference is that it is easier to automate responses on a cloud platform compared to on- premises.
  • 157.
    Author: Teri Radichel© 2025 2nd Sight Lab 158 Cloud Operations Tools Azure Monitor Azure Automation Azure Backup Azure Site Recovery Azure AD Microsoft Defender for Cloud Azure Activity Log Azure Diagnostic Logs Azure Network Watcher Cloud Service Provider Transparency Azure offers a number of tools to help with operations in general. Some of these tools are also helpful and relevant for security teams. We have discussed most of them already.
  • 158.
    Author: Teri Radichel© 2025 2nd Sight Lab 159 Understand What You’re Looking For in Logs Use resources such as those already mentioned in class such as the Verizon Data Breach Investigation Report to understand top threats. This slide shows at MITRE ATT&CK Cloud Matrix which tracks cloud threats.
  • 159.
    Author: Teri Radichel© 2025 2nd Sight Lab 160 MITRE ATT&CK in Sentinel Click MITRE ATT&CK (Preview) in Sentinel. This screen allows you to visualize coverage for detecting MITRE ATT&CK threats.
  • 160.
    Author: Teri Radichel© 2025 2nd Sight Lab 161 Sample analysis of a cloud threat When the Solar Winds attack occurred, I noticed immediately that the C2 channel was hosted on AWS. This led to a high level analysis of the breach, what caused it, and what could have prevented it. Note that I linked to deeper dive analysis because sometimes that level of detail is not necessary to prevent a breach.
  • 161.
    Author: Teri Radichel© 2025 2nd Sight Lab 162 Threat Hunting Security operations will likely want access to any logs related to security. Perform threat hunting on logs and alerts to find suspicious activity such as: - Repetitive failed logins - Repetitive blocked network connection attempts - Excessive connections, long connections, repetitive beacon connections - Monitor for unexpected and unwanted configuration changes. - Web application attack alerts from WAFs and other monitoring tools. - Risky activity alerted by cloud native and other security tools. Define a process for evaluating and reporting security problems.
  • 162.
    Author: Teri Radichel© 2025 2nd Sight Lab 163 Example: ID Risky Accounts Monitor risky actions with Azure AD identity protection. Evaluate: - Risk detections - Other risks triggered at the same time - Sign-in attempt location - Link to more detail
  • 163.
    Author: Teri Radichel© 2025 2nd Sight Lab 164 Ransomware Defense Microsoft provides ransomware guidance and explains how Sentinel provides a complete view of a kill chain. See link in notes.
  • 164.
    Author: Teri Radichel© 2025 2nd Sight Lab 165 SOC Sentinel Workbooks and Notebooks Workbook: 14 Processes and 36 Procedures for operationalizing Sentinel and applying a SOC methodology Notebook for threat hunting.
  • 165.
    Author: Teri Radichel© 2025 2nd Sight Lab 166 Email Notifications Manually or programmatically configure email alerts
  • 166.
    Author: Teri Radichel© 2025 2nd Sight Lab 167 Monitor the Azure Status Map & Down Detector
  • 167.
    Author: Teri Radichel© 2025 2nd Sight Lab 168 Investigating an anomaly in Sentinel Data Source Anomalies listed on the Overview screen. Drill down.
  • 168.
    Author: Teri Radichel© 2025 2nd Sight Lab 169 Query Logs for Related Events Query the logs for related events. View the details. In this case the logins come from the managed identity created earlier in class.
  • 169.
    Author: Teri Radichel© 2025 2nd Sight Lab 170 Azure Log Analytics Navigate to Azure AD. Click Log Analytics and run a query. Find the corresponding logs.
  • 170.
    Author: Teri Radichel© 2025 2nd Sight Lab 171 Check the Sign-in logs Query for managed identities sign-ins. Find corresponding logins. Note the resource: Azure Key Vault.
  • 171.
    Author: Teri Radichel© 2025 2nd Sight Lab 172 Navigate to Managed Identities Click Activity log Change timeframe
  • 172.
    Author: Teri Radichel© 2025 2nd Sight Lab 173 Review activity for this managed identity All these events were generated by a user, not the managed identity.
  • 173.
    Author: Teri Radichel© 2025 2nd Sight Lab 174 Check the Key Vault Activity Log No activity here by the managed identity either, even though the resource says Key Vault. What next? Ask support…
  • 174.
    Author: Teri Radichel© 2025 2nd Sight Lab Incident Response 175
  • 175.
    Author: Teri Radichel© 2025 2nd Sight Lab 176 Incident Response Determine that an event is actually a security incident, then respond. Most of the fundamentals of the process are the same. What changes about IR on Azure: - You don’t have access to the full stack for investigations. - You may be counting on Azure for some aspects of an incident. - How you capture memory and disks for forensic analysis. - No ability to perform memory or data capture on terminated resources.
  • 176.
    Author: Teri Radichel© 2025 2nd Sight Lab 177 If you are new to IR, Microsoft guidance
  • 177.
    Author: Teri Radichel© 2025 2nd Sight Lab 178 SecOps Planning for Incident Response The first step for incident response: Planning For those new to IR Microsoft documentation provides guidance to develop and define an incident response plan. Sample consideration to the right.
  • 178.
    Author: Teri Radichel© 2025 2nd Sight Lab 179 Incident Response Activities Microsoft provides this chart that covers activities with Microsoft 365 Defender. A similar approach would apply with Microsoft Defender for Cloud.
  • 179.
    Author: Teri Radichel© 2025 2nd Sight Lab 180 Investigate Incidents in Sentinel The link in the notes explains how to investigate incidents with Sentinel
  • 180.
    Author: Teri Radichel© 2025 2nd Sight Lab 181 Responding to Defender Alerts Take Action Tab: Inspect Context Mitigate the Threat Prevent Future Attacks Trigger Automated Response Suppress Similar Alerts
  • 181.
    Author: Teri Radichel© 2025 2nd Sight Lab 182 Sentinel Automation Rules Automate incident response.
  • 182.
    Author: Teri Radichel© 2025 2nd Sight Lab 183 Choose triggers, conditions, and actions
  • 183.
    Author: Teri Radichel© 2025 2nd Sight Lab 184 Incident Response Playbooks Plan ahead for steps to take when an incident occurs. CISA provides a generalized IR Playbook which you can find in the notes. Use automation whenever possible.
  • 184.
    Author: Teri Radichel© 2025 2nd Sight Lab 185 Sentinel Playbooks A playbook on Sentinel is a group of automation rules that work together. Run playbooks automatically or on demand. Based on workflows built with Azure Logic Apps. Sentinel playbook templates (in preview) provide sample playbooks. Find more playbooks in the Azure-Sentinel GitHub Repository.
  • 185.
    Author: Teri Radichel© 2025 2nd Sight Lab 186 Simuland Open-source tool to help security researchers stand up labs and test the effectiveness of detections on Defender and Sentinel.
  • 186.
    Author: Teri Radichel© 2025 2nd Sight Lab 187 Azure Security Benchmark IR Best Practices Create an IR Guide Create a scoring and prioritization procedure Test security response procedures Provide security incident contact details and configure alert notifications Incorporate alerts into your incident response plan Automate the response to security alerts See the link in the slide notes for documentation on each point.
  • 187.
    Author: Teri Radichel© 2025 2nd Sight Lab 188 Build a VM for incident response Consider building a VM for incident response. Automate the process for building the VM and updating the tools on it. Leverage the VM in a dedicated resource group and network. Better yet, use a separate management group and restrict access. Microsoft offers step by step guidance in the link in the notes.
  • 188.
    Author: Teri Radichel© 2025 2nd Sight Lab 189 Memory Dumps Similar in some cases, different in others Some considerations include: - Once a VM is terminated it’s gone and there’s no way to get it back. - Snapshots (backups) have different levels of consistency. - Functions and other short-lived resources may no longer be available. See resources in notes for memory capture on different types of resources.
  • 189.
    Author: Teri Radichel© 2025 2nd Sight Lab 190 Azure support For some security incidents, you may need to log a ticket with Azure Support to obtain assistance. The link in the notes covers how to log a security event support ticket.
  • 190.
    Author: Teri Radichel© 2025 2nd Sight Lab Penetration Testing 191
  • 191.
    Author: Teri Radichel© 2025 2nd Sight Lab 192 Rules of Engagement
  • 192.
    Author: Teri Radichel© 2025 2nd Sight Lab 193 Azure Scope
  • 193.
    Author: Teri Radichel© 2025 2nd Sight Lab 194 Rules of Engagement Understand the rules you need to follow for pentesting on Azure
  • 194.
    Author: Teri Radichel© 2025 2nd Sight Lab 195 Bug Bounty Reports
  • 195.
    Author: Teri Radichel© 2025 2nd Sight Lab 196 Pentesting Differences on Azure Resources are ephemeral; IPs are not consistent. Many companies don’t have a specific range of IP addresses. Even those that do leverage BYOIP may have resources not in that range. Tests are often not scoped by IP address but one of the following: - Account - Tenant - Management group - Subscription - Resource group - Domain names
  • 196.
    Author: Teri Radichel© 2025 2nd Sight Lab 197 Leverage Security Assessment Tools Leverate all the tools mentioned in the security assessment section. All these tools can find security misconfigurations. One of the primary sources of data breaches - exposing data to the Internet. Types of data and administrative exposure: - Storage resources exposed publicly - VM and other backups exposed to the Internet - Databases exposed to the Internet - Kubernetes and other dashboards - Administrative ports exposed to the Internet (brute force, vulns)
  • 197.
    Author: Teri Radichel© 2025 2nd Sight Lab 198 Applications are the Doorway to the Cloud Resources in the cloud are assigned permissions to take actions. An attacker that accesses a resource may be able to use those permissions. Many ways to leverage those permissions: - SSRF - Access to the host to run commands - Redirect to metadata to obtain credentials - Access credentials in memory - Command injection - Improper authentication and authorization
  • 198.
    Author: Teri Radichel© 2025 2nd Sight Lab Azure VM metadata Azure metadata. Run this command: curl -H Metadata:true "http://169.254.169.254/metadata/instance?api- version=2017-08-01" You must supply the correct API version. Run this to get a list of versions curl -H Metadata:true "http://169.254.169.254/metadata/instance" Powershell on Windows: Invoke-RestMethod -Headers @{"Metadata"="true"} -URI http://169.254.169.254/metadata/instance?api-version=2019-03-11 -Method get 199
  • 199.
    Author: Teri Radichel© 2025 2nd Sight Lab 200 Open Redirect to Access Metadata One of the ways attackers access the metadata service in the cloud is via an Open Redirect. Anywhere an application redirects to another URL may be subject to an open redirect. For example: https://website.com?url=https://attackerurl.com Or https://website.com?url=http://169.254.169.254/metadata/instance
  • 200.
    Author: Teri Radichel© 2025 2nd Sight Lab 201 DNS Rebinding DNS Rebinding can get around firewall rules by leveraging a DNS server that changes IP addresses for DNS names during the course of an attack. Attackers can redirect to the metadata service.
  • 201.
    Author: Teri Radichel© 2025 2nd Sight Lab Network Interfaces Virtual Machine hosts can have one or more virtual network interfaces. Multiple network interfaces could lead to data exfiltration…. 202
  • 202.
    Author: Teri Radichel© 2025 2nd Sight Lab Replay Attacks on SAS Many cloud services offer time-limited access via a URL Azure Blob Storage does this. Sometimes the URL method of authenticating access causes problems. In one pentest, a website used this method for file upload. The website tried to prevent malicious uploads, but bypass was possible. Malware could then be uploaded directly to storage. View a longer explanation in 2020 RSA presentation by Teri Radichel in notes. 203
  • 203.
    Author: Teri Radichel© 2025 2nd Sight Lab Injected code and containers Try to insert a malicious code or container into the deployment pipeline. 204
  • 204.
    Author: Teri Radichel© 2025 2nd Sight Lab Container Vulnerabilities Check for container exploits that could be leveraged in an attack. 205
  • 205.
    Author: Teri Radichel© 2025 2nd Sight Lab Kubernetes UI Misconfigurations Kubernetes dashboards exposed or leveraged in an attack to obtain access to and manage Kubernetes configuration and resources. 206
  • 206.
    Author: Teri Radichel© 2025 2nd Sight Lab Kubernetes shell 207
  • 207.
    Author: Teri Radichel© 2025 2nd Sight Lab PID1 The first process started by the Linux kernel gets PID 1 Running a container as PID 1 exposes all processes on the host to the container Allows for container escape. 208
  • 208.
    Author: Teri Radichel© 2025 2nd Sight Lab Docker Socket Docker socket is a unix socket to which Docker commands are sent. Again, this opens up a path to run commands remotely. Tools like Portainer make use of this capability. 209
  • 209.
    Author: Teri Radichel© 2025 2nd Sight Lab var/run/docker.sock The owner of var/run/docker.sock was root (now you can run rootless) Mounting var/run/docker.sock inside a container may give root access Sample Exploit. Privileged option is not necessarily required. 210
  • 210.
    Author: Teri Radichel© 2025 2nd Sight Lab Mapping root folders 211
  • 211.
    Author: Teri Radichel© 2025 2nd Sight Lab Docker Layers and Squashing Docker builds in layers each time you make a change and create an image. If you have some sensitive data in prior layers, it can be exposed. Squashing tries to hide prior layers - lose cache - but no prior secrets, etc. Experimental - may not work on Windows. 212
  • 212.
    Author: Teri Radichel© 2025 2nd Sight Lab 213 Privilege Abuse and Escalation Understand how attacks such as the Solar Winds breach leveraged administrative credentials to create additional permissions. See if credentials can create resources with more permissions than their own.
  • 213.
    Author: Teri Radichel© 2025 2nd Sight Lab 214 Serverless Attacks - Ability to change code - SSRF attacks - Leveraging applications - IDOR - Container and function escape on Azure (past research was able to exploit Azure functions - Successful attacks on penetration tests (see notes)
  • 214.
    Author: Teri Radichel© 2025 2nd Sight Lab 215 Much more! This section listed a few top attacks to test in a cloud environment. There are many more. Check prior cloud incidents, security breaches, and researcher findings. Test applications thoroughly with and without credentials. Check the specific configurations and functionality related to services.
  • 215.
    Author: Teri Radichel© 2025 2nd Sight Lab 216 Testing incident Response Test your incident response process Determine if your IR teams can spot an attack Microsoft offers Red Team guidance in the link in the notes
  • 216.
    Author: Teri Radichel© 2025 2nd Sight Lab 217 Other Pentesting Tools and Tactics Many other penetration testing tools for Azure exist. You can find many of them with a GitHub search… But before your use them, review the code. Make sure you know what they do! In some cases attack lists contain attacks that redirect your attacks to another person’s attack site! The links in the notes offer some additional resources.
  • 217.
    Author: Teri Radichel© 2025 2nd Sight Lab Risk Management 218
  • 218.
    Author: Teri Radichel© 2025 2nd Sight Lab 219 How can we manage risk in the cloud? Azure provides many risk management capabilities. - Inventory by default - Policy management - Configuration management - Security score - Track security incidents and events - Automated deployments - Workbooks, third-party tools, and custom reports Leverage these tools to monitor and measure risk. Then reduce it.
  • 219.
    Author: Teri Radichel© 2025 2nd Sight Lab 220 Policies and Risk The first step to managing risk is to define what drives risk. Then create policies to reduce it. Once you have policies in place, measure what is and is not compliant. Azure policy allows you to block and alert on non-compliance. Leverage the non-compliance to policies to report on risk. Track time to remediate and put a time-limit on exceptions.
  • 220.
    Author: Teri Radichel© 2025 2nd Sight Lab 221 Continuous Assessments Many security assessment checks and scans can be automated. Run a continuous assessment that reports on risk levels. Track risk over time to see if it is going up or down. Use risk tracking to Introduce new policies and controls. Work to automatically remediate issues where possible. Leverage penetration tests to validate your scans work!
  • 221.
    Author: Teri Radichel© 2025 2nd Sight Lab 222 Consider the validity of your metrics Number of findings doesn’t work when assets are increasing. You will never be 100% compliant. 99% compliance is great but not if your most critical asset is exposed. Consider relevance in relation to recent data breaches and attacks. Strive to fix things quickly over fixing nothing due to categorization. Chained vulnerabilities and cumulative risk increases individual risk items.
  • 222.
    Author: Teri Radichel© 2025 2nd Sight Lab 223 Continuous Reporting and Improvement Define key metrics to evaluate that increase risk: - Configurations that cause data breaches and incidents - Architecture that increases blast radius - Visibility gaps that prevent timely discovery of security events Create a high-level summary of risk findings for executives Provide detailed backup with actionable fixes Continuous improvement by fixing findings Automated policies and remediation for greater efficiency Track your progress over time - is risk increasing or decreasing?
  • 223.
    Author: Teri Radichel© 2025 2nd Sight Lab 224 Summary Query cloud resources to find non-compliance or unwanted configurations Vulnerability scanning strategies Resources for security assessments and penetration tests Use Microsoft Defender for Cloud - Security Dashboard: - Track compliance with azure Secure score and initiatives - Service specific scans and reports - Integration with Azure Arc, Defender for Cloud Apps (CASB) Types of Azure logs and Azure Monitor to view and query logs Incident investigation and response with Azure Sentinel (SIEM and SOAR) Risk management and metrics through continuous assessment and reporting

Editor's Notes

  • #2 Content is provided in electronic format. We request that you abide by the terms of the agreement and only use the content in the books and labs for your personal use. If you like the class and want to share with others we love referrals! You can ask people to connect with Teri Radichel on LinkedIn or visit the 2nd Sight Lab website for more information. https://www.2ndsightlab.com https://www.linkedin.com/in/teriradichel https://medium.com/cloud-security
  • #3 Content is provided in electronic format. We request that you abide by the terms of the agreement and only use the content in the books and labs for your personal use. If you like the class and want to share with others we love referrals! You can ask people to connect with Teri Radichel on LinkedIn or visit the 2nd Sight Lab website for more information. https://www.2ndsightlab.com https://www.linkedin.com/in/teriradichel https://medium.com/cloud-security
  • #6 You can use Azure Resource Graph Explorer to execute queries to find resources matching specific properties in your account. https://docs.microsoft.com/en-us/azure/governance/resource-graph/overview Understanding the Resource Graph Query Language: https://docs.microsoft.com/en-us/azure/governance/resource-graph/concepts/query-language
  • #7 You can use Azure Resource Graph with the Azure CLI by installing the az graph extension and running az graph commands. https://docs.microsoft.com/en-us/cli/azure/graph?view=azure-cli-latest
  • #8 Here’s a quickstart to get you started with Azure Resource Graph queries using the Azure CLI. https://docs.microsoft.com/en-us/azure/governance/resource-graph/first-query-azurecli Constructs of the query language: https://docs.microsoft.com/en-us/azure/governance/resource-graph/concepts/query-language
  • #9 You can also use PowerShell to run queries against Azure Resource Graph. Try out the commands in the page linked below to get started. https://docs.microsoft.com/en-us/azure/governance/resource-graph/first-query-powershell
  • #10 You can use Azure Resource Graph Explorer in the Azure portal to execute queries to find resources matching specific properties in your account. This tool will highlight syntax in your queries and help with auto-completion as you type. You can see the list of resources on the left. https://docs.microsoft.com/en-us/azure/governance/resource-graph/overview
  • #11 Many other options exist for querying Azure resources. Use the programming language of your choice to write your own tools. The Azure platform offers the capability to query all of the configuration properties of your Azure resources. This capability makes it easier for security professionals - including penetration testers and attackers - to find resources on the platform with security weaknesses. Other options include PowerShell, Python, .Net, Go, Ruby, REST, Bicep, ARM Templates, Java, JavaScript, and Azure Resource Graph Explorer: https://docs.microsoft.com/en-us/azure/governance/resource-graph/overview
  • #13 Microsoft Defender for Cloud (formerly Microsoft Security Center) is Azures cloud-native central point for managing security within Azure. It also enables some security management on-premises and across clouds. This is your central dashboard for security, risk management, compliance, assessments, governance, and auditing within the Azure portal. Many different services and tools feed into the data displayed on the Microsoft Defender for Cloud Dashboard https://docs.microsoft.com/en-us/azure/defender-for-cloud/defender-for-cloud-introduction
  • #14 The first time you navigate to Azure Defender for cloud you’ll have the option to upgrade for additional security services or to skip and use the basic functionality. You can scroll down to get an idea of the costs. Remember that you can also use the Azure pricing calculator. Defender pricing: https://azure.microsoft.com/en-us/pricing/details/defender-for-cloud/ When you enable Defender for Cloud this way you’ll need to enable it per tenant and per subscription.
  • #15 The top of the overview page has a summary of the subscriptions in your account, resources, recommendations, and security alerts. Note that you can also monitor AWS and GCP. https://docs.microsoft.com/en-us/azure/defender-for-cloud/overview-page
  • #16 Remember that we create an organizational hierarchy in the last class and discussed how you can apply different policies and IAM permissions to different parts of an organization. When you click on subscriptions you can drill down into the organizational hierarchy and view the different findings within that structure. That way you can see how many findings or security issues you have for different parts of your organization. Depending on how you structured your organization, you might consider findings for a particular management group to be more critical that others. For example, if you have a production management group findings in that group might be higher priority than findings in a development or sandbox management group.
  • #17 The Workload protections dashboard shows you how many of your resources have Microsoft protections applied to them. Of course, each of the Microsoft security services you enable costs money. Some companies may be using other options to protect their assets. If you are using Microsoft cloud-native security options then this screen gives you a good overview of everything that is protected and not. You can also see some of the enhanced services at the bottom of the screen and alerts. We’ll cover some of these protections more in depth later on this day of class. https://docs.microsoft.com/en-us/azure/defender-for-cloud/workload-protections-dashboard
  • #18 This slide shows how you can apply Defender security features to a subscription. Click on Upgrade under the security service. Click on the subscriptions to which you want to apply the service. Click Upgrade.
  • #19 Wait a few minutes for the platform to configure the service and collect data. After refreshing the screen you’ll see updates showing how any of your resources in each category are now covered. In this example, we previously had 0 servers covered by Defender Server Security and now our coverage is 1/1. 0 subscriptions were covered by DNS security features and now 1 of 2 are covered.
  • #20 Return to the main dashboard. You can view your overall security posture in the top left box. On the right side of the screen you’ll see top recommendations. Click on the Security posture box to drill down into the details. https://docs.microsoft.com/en-us/microsoft-365/security/defender/microsoft-secure-score-improvement-actions
  • #21 On the details of the security posture screen you can view the security score for each individual subscription. Perhaps you are most concerned about one particular subscription that holds your most critical assets. Next you can click View recommendations for each subscription to see the findings that are driving your security score. https://docs.microsoft.com/en-us/azure/defender-for-cloud/secure-score-security-controls
  • #22 Azure tracks how many resources are non-compliant and assigns a secure score in the form of a percentage. The higher the score, the lower your risk is because you have less non-compliant resources. This is a very simple model for tracking risk and is useful, but note that it presumes you want to use all the Microsoft security services and controls. The items in the secure score are prioritized by a weight that Azure assigns to findings but does not allow you to prioritize based on your assets or organizational policies at the time of this writing. It is a very good starting point for tracking overall risk in an account and definitely better than no tracking at all! You might want to enhance your understanding of your risk with more detailed custom queries based on the specifics of your organization. You can find the details of how Microsoft calculates the secure score in the documentation. It is based on any resource with findings and Microsoft weighting of findings. https://docs.microsoft.com/en-us/azure/defender-for-cloud/secure-score-access-and-track
  • #23 Click the recommendations link on the security posture page to drill down into recommendations. Here you’ll find recommendations for the non-compliant resources to fix the findings. It’s nice that you can drill directly down into the resources causing the problem. That is one of the advantages of a cloud-native security solution. https://docs.microsoft.com/en-us/azure/defender-for-cloud/review-security-recommendations
  • #24 You can run command line commands to get your secure score as well. This might be useful for a security team because you can automate reports and potentially create alerts on a low secure score to go review and fix related problems. https://docs.microsoft.com/en-us/cli/azure/security/secure-scores?view=azure-cli-latest
  • #25 Power BI Pro users can leverage integration with Microsoft Defender to track risk over time within their organization. https://docs.microsoft.com/en-us/microsoft-365/security/defender-endpoint/api-power-bi Threat protection report: https://docs.microsoft.com/en-us/microsoft-365/security/defender-endpoint/threat-protection-reports?view=o365-worldwide
  • #26 For some of the recommendations you may be able to click on the resource and apply the remediation immediately. Just keep in mind that taking this approach will then cause the resource to be out of sync with any automated updates. You’ll need to get the fix incorporated into the code you use to deploy the resource in order to fix the problem at the root if automation is part of your strategy. Otherwise, the problem will re-occur if the resource gets deployed again from source control and the fix has not been applied in code. Additionally, applying changes without testing them on production resources may have unexpected consequences. Typically any changes to production resources should go through a full software development life cycle (SDLC) process. https://docs.microsoft.com/en-us/azure/defender-for-cloud/implement-security-recommendations Comment from one of our reviewers further emphasizes this point: IMHO - the statement about applying changes without the proper testing is a huge risk and not for the faint of heart. This also could be a policy violation about production testing or at a minimum could be a regulatory issue. This type of change should be considered before done in production. Again NOT the Software development person but from the compliance aspect.
  • #27 You can exempt resources from policies for reasons of your choosing. Here, Microsoft wants to know if you are using other products. Interesting that they may also charge for this exemption in the future. It’s a good idea to set an expiration date if this is a truly non-compliant resource that has an exception, rather than a true exemption from the Azure recommendations. Also, if you are counting on this score, make sure you understand who can create exemptions and how to review them. https://docs.microsoft.com/en-us/azure/defender-for-cloud/exempt-resource
  • #28 View exceptions by clicking on the link for “Not applicable resources.” https://docs.microsoft.com/en-us/azure/defender-for-cloud/exempt-resource
  • #29 When you’re viewing a resource, such as virtual machine in this case, you can click on Defender for Cloud in the left menu to review recommendations for that resource. Here you can also view Microsoft’s rating on the recommendations - high, medium, or low. https://docs.microsoft.com/en-us/azure/defender-for-cloud/review-security-recommendations
  • #30 You can prioritize security actions based on data sensitivity in conjunction with Microsoft Purview: https://docs.microsoft.com/en-us/azure/defender-for-cloud/information-protection Assessments with Microsoft Purview. https://docs.microsoft.com/en-us/microsoft-365/compliance/compliance-manager-assessments?view=o365-worldwide
  • #31 Microsoft Defender for Cloud has a number of enhanced security features for an additional cost. The slide outlines the features and prices at the time of this writing in the Central US region. Enhanced security features for Microsoft Defender for Cloud: https://docs.microsoft.com/en-us/azure/defender-for-cloud/enhanced-security-features-overview Pricing: https://azure.microsoft.com/en-us/pricing/details/defender-for-cloud/ You cannot enable the server security features for part of a subscription. For this reason, you might move different servers into different subscriptions. Enable Enhanced Security Features: https://docs.microsoft.com/en-us/azure/defender-for-cloud/enable-enhanced-security
  • #32 If you want to see who has made changes to Defender check the Activity Log. https://docs.microsoft.com/en-us/azure/defender-for-cloud/enhanced-security-features-overview#how-can-i-track-who-in-my-organization-enabled-a-microsoft-defender-plan-in-defender-for-cloud
  • #33 The following link describes how to integrate Microsoft Defender for Cloud with Windows Admin Center. If you already use Windows Admin Centere you can get security findings and your Azure secure score from within that product. https://docs.microsoft.com/en-us/azure/defender-for-cloud/windows-admin-center-integration
  • #34 We discussed Azure Policy and Initiatives in the last class. You can use Microsoft Defender for cloud to track compliance with policies and initiatives applied to resources in your account. https://docs.microsoft.com/en-us/azure/defender-for-cloud/security-policy-concept Disable policies to disable recommendations: https://docs.microsoft.com/en-us/azure/defender-for-cloud/tutorial-security-policy#disable-security-policies-and-disable-recommendations
  • #35 To view the policy related to a finding, navigate to the finding and click on View policy definition at the top of the finding. From there you’ll be able to see the policy definition we discussed in the last class. If you recall we assigned built in initiatives that already existed in azure to our Azure management groups and subscriptions. Those initiatives produced some of the findings we are looking at in this class.
  • #36 To view policy settings click on Environment settings in the left menu. Once you see the hierarchy of management groups and subscriptions you can see the initiatives we assigned in the last class.
  • #37 To edit settings, including disabling policies, click on the three dots next to any item in the hierarchy and click Edit Settings. From here you can see the settings shown earlier to enable various security features in Azure. You can also click on Security settings under Security policy in the left menu to edit the security policy settings.
  • #38 View the security policy settings for the subscription. You can enable or disable initiatives and policies from this screen. You can also create a custom initiative. This is the information we covered in the last class. This is another way to drill down into that information. Refer to the last class for more information on creating and customizing policies and initiatives. Note that a user with the appropriate permission can modify policies, initiatives, and thereby hide recommendations or alter your secure score. Someone who obtains their credentials could do so as well! Disable security policies: https://docs.microsoft.com/en-us/azure/defender-for-cloud/tutorial-security-policy#disable-security-policies-and-disable-recommendations
  • #39 Click Inventory in the left menu. From here you can view security recommendations for assets and drill into them to determine how to remediate the findings. You can also find subscriptions here that are not covered by Microsoft Defender for Cloud and register them. https://docs.microsoft.com/en-us/azure/defender-for-cloud/asset-inventory You can use Azure Resource Graph to obtain information about your resources programmatically using many different languages and tools: https://docs.microsoft.com/en-us/azure/governance/resource-graph/overview
  • #40 Click Open Query to pull up the underlying Azure Resource Graph query used to display the resources on the screen.
  • #41 You can use the filter at the top to filter on different properties and characteristics of your resources. For example, you can search for applications installed on VMs using these instructions: https://docs.microsoft.com/en-us/azure/defender-for-cloud/asset-inventory#access-a-software-inventory
  • #42 Microsoft Defender for Servers offers a number of security features for protecting servers as shown on the slide. Two plans exist with different features and prices. Use Azure Arc as discussed in the last class to enable this service and check for findings in Microsoft Defender for Cloud. https://docs.microsoft.com/en-us/azure/defender-for-cloud/defender-for-servers-introduction
  • #43 Instructions for enabling data protections with Microsoft Defender: https://docs.microsoft.com/en-us/azure/defender-for-cloud/quickstart-enable-database-protections
  • #44 You can enable protections for the following resources as well: Key Vault https://docs.microsoft.com/en-us/azure/defender-for-cloud/defender-for-key-vault-introduction Storage https://docs.microsoft.com/en-us/azure/defender-for-cloud/defender-for-storage-introduction Resource Manager https://docs.microsoft.com/en-us/azure/defender-for-cloud/defender-for-resource-manager-introduction DNS https://docs.microsoft.com/en-us/azure/defender-for-cloud/defender-for-dns-introduction
  • #45 Search for networking resources in Microsoft Defender for Cloud by using the filters at the top of the resource list. https://docs.microsoft.com/en-us/azure/defender-for-cloud/protect-network-resources
  • #46 To view the network map functionality, click on Workload projections. Then click on Network map.
  • #47 Change the network map filters as needed to view your networks. By default you won’t see all networks such as private networks and networks with no recommendations. https://docs.microsoft.com/en-us/azure/defender-for-cloud/protect-network-resources
  • #48 Click the arrow on the top right to view recommendations. The inner circle on the graph represents virtual networks. The next circle represents subnets. Finally, virtual machines are on the outer edge. Click on resources to drill down to findings. Filter on Allowed Traffic to view traffic allowed between resources. Find resources with unexpected connections. Then drill down and fix them. https://docs.microsoft.com/en-us/azure/defender-for-cloud/protect-network-resources
  • #49 Azure Firewall Manager within Microsoft Defender for Cloud allows customers to manage firewall policies, virtual WAN hubs, and DDOS protection from a central location. The same policies can be applied to multiple resources at the same time. https://docs.microsoft.com/en-us/azure/firewall-manager/overview
  • #50 Use Azure Lighthouse to enable cross-tenant access for third-party MSSPs or internal security teams to view resources in multiple tenants in Microsoft Defender for Cloud. We covered this on option for cross-tenant permissions on Day 1. It also works with Azure ARC, Azure Policy, Sentinel, and other Azure products. https://docs.microsoft.com/en-us/azure/defender-for-cloud/cross-tenant-management
  • #51 The following page walks you through onboarding subscriptions to Defender using PowerShell. https://docs.microsoft.com/en-us/azure/defender-for-cloud/powershell-onboarding Write a script to loop through all the subscriptions in your account, then pass in the subscription ID into the commands on this page to automatically enable Defender where it is missing in your account. Alternatively, write a script to create new subscriptions which includes all the commands in the document to ensure new subscriptions are created with the a configuration that includes Defender for Cloud.
  • #52 We’ve covered some of the features of Microsoft Defender for Cloud in this section. We’ll cover others in later sections of today’s class where applicable.
  • #54 Azure security assessments may contain different scopes pertaining to what an organization wants to assess. However, if an organization really wants to understand if their accounts are secure, they will look at more than the cloud configuration alone. An assessment will include things like who controls the global admin account and can delete the entire Azure account. Assessments should cover all the different layers of security controls from the platform itself up to the application layer. Although an assessment may be scoped to consider only critical production assets, all potential connections to those assets need to be considered, such as developers who have access to make changes in production, and any services or connections that span trust boundaries. Sometimes organizations want to assess a particular aspect of their Azure environment. What an assessment or audit covers will need to be aligned with those objectives. Sometimes a client wants to understand their cybersecurity as a whole. Sometimes they want to assess applications and other times only the cloud platform itself. Sometimes they want to understand their ability to respond to a data breach or to fend off top cyber attacks. What you need to assess will be targeted at those particular objectives. Many resources exist for coming up with questions, scans, investigations, analysis, and queries you can use to assess the security in relation to the objectives of an assessment or audit.
  • #55 The CIS Benchmarks are often used to assess security in a cloud environment. The Center for Internet Security offers benchmarks or security best practices for many different systems and platforms including Azure, AWS, and GCP. Not only that, the benchmarks cover operating systems, container runtime environments like Docker, and container orchestration systems like Kubernetes. Many security tools advertise that they provide reports covering the CIS Benchmarks. Microsoft offers coverage for this as well using Azure Policy and Microsoft Defender for Cloud. https://www.cisecurity.org/cis-benchmarks/
  • #56 Many CIS Benchmarks include code to automate the process of checking for compliance with the control. Many tools use these scripts to implement checks within security products you can purchase. Open source tools also implement these checks. You can implement these checks in your own scripts as well.
  • #57 Are the CIS Benchmarks enough? At the time of this writing, there are 201 Azure services and 117 CIS Benchmarks. Most likely there are more than one security best practice for each Azure service. Chances are, organizations will need to do more than simply implement the CIS benchmarks to truly lock down systems. But unfortunately, many organizations don’t even implement the CIS Benchmarks alone, so it’s a really good place to start. Just be aware that when you purchase tools that advertise that they will report compliance with the CIS Benchmarks, that won’t be enough in most cases. Additionally, you can get those checks within Azure and without paying for a separate tool. You can also enforce or alert on compliance with Azure Policy.
  • #58 The Azure Security Benchmark goes farther than the CIS Benchmarks. It is created and maintained by Microsoft and based on a more comprehensive set of documents that provide security guidance. The included documents are shown on the slide: https://docs.microsoft.com/en-us/azure/cloud-adoption-framework/get-started/ https://docs.microsoft.com/en-us/azure/architecture/framework/ https://docs.microsoft.com/en-us/azure/security/fundamentals/best-practices-and-patterns https://docs.microsoft.com/en-us/security/cybersecurity-reference-architecture/mcra
  • #59 The Azure Cloud Adoption Framework aims to help companies migrate to Azure more quickly, while avoiding common pitfalls. One example of an antipattern is to assign too much responsibility to one small team. You can use information from this framework to formulate questions and analysis included in a security audit or assessment. https://docs.microsoft.com/en-us/azure/cloud-adoption-framework/
  • #60 The Azure Well-Architected Framework is another good resource for best practices and recommendations from Microsoft when performing an assessment. A section specific to security exists that may be used to determine if an organization is following best practices. https://docs.microsoft.com/en-us/azure/architecture/framework/
  • #61 The Azure Best Practices and patterns guidance has a lot of different patterns commonly used by organizations to implement security on Azure. You might find a pattern or anti-pattern in use by an organization and related documentation here to evaluate it’s adherence to recommendations and best practices. https://docs.microsoft.com/en-us/azure/security/fundamentals/best-practices-and-patterns
  • #62 Microsoft says the Cybersecurity Reference Architectures covers but is not limited to the following: An overview of Zero Trust Zero trust rapid modernization plan (RaMP) Key security operation initiatives Protecting from human operated ransomware Security privileged access Moving beyond VPN (careful!) https://docs.microsoft.com/en-us/security/cybersecurity-reference-architecture/mcra
  • #63 The best practices white paper has guidance for each security service. https://azure.microsoft.com/en-us/resources/security-best-practices-for-azure-solutions/
  • #64 The table of contents in the Azure Security Best Practices white paper is a good place to consider if you’ve covered all security controls for various services when performing a security assessment. https://azure.microsoft.com/en-us/resources/security-best-practices-for-azure-solutions/
  • #65 The rest of the TOC of the security best practices white paper. https://azure.microsoft.com/en-us/resources/security-best-practices-for-azure-solutions/
  • #66 Azure offers a number of security white papers covering topics related to specific services, architectures, industries, and objectives. These white papers may help when looking assessing an architecture or environment covered by one of these resources. https://azure.microsoft.com/en-us/resources/whitepapers/search/?term=security&type=WhitePaperResource&Page=2
  • #67 We just explored capabilities within Microsoft Defender. Many of those features are helpful in performing assessments. Although you can click through the UI it might be faster and more effective to write custom queries to generate reports based on this data to include in assessments. https://docs.microsoft.com/en-us/azure/defender-for-cloud/resource-graph-samples?tabs=azure-cli
  • #68 Azure offers a command to create and review security assessments: az security assessment When you use Microsoft Defender some assessments will already exist which you can list and report on as required. You can also create your own assessments using the create command - or delete assessments. Ensure you know who can delete assessments you might be counting on to find security problems.
  • #69 We talked about a lot of different aspects of Azure security in class. Some of them are covered by the Azure Benchmark. Others require a more detailed understanding of a particular organization’s hierarchy and sensitive assets. Application security is also very important as noted because applications can be the gateway to a cloud environment. Stolen developer, IT, or DevOps credentials can expose the keys to the kingdom. Assessments may also cover disaster recovery and BCP.
  • #70 The Cloud Security Alliance (CSA) offers a questionnaire for cloud providers to fill out to prove they are secure. Companies can also get a third-party attestation to prove they follow the CSA guidance. You can search for cloud providers in the CSA STAR registry including Azure to see their answers to the questionnaire. This questionnaire can be modified for internal use. Alter the questions as needed to make them more applicable to internal or third-party security assessments for clients. CSA Star CAIQ https://cloudsecurityalliance.org/artifacts/star-level-1-security-questionnaire-caiq-v4/ Microsoft Azure CAIQ: https://cloudsecurityalliance.org/star/registry/microsoft/services/microsoft-azure/
  • #71 Some open source tools for Azure assessments. Some of these are good for pentesters as well. CloudSploit https://github.com/aquasecurity/cloudsploit Azucar https://github.com/nccgroup/azucar BloodHound https://github.com/BloodHoundAD/BloodHound ScoutSuite https://github.com/nccgroup/ScoutSuite StormSpotter https://github.com/Azure/Stormspotter CloudScraper https://github.com/RhinoSecurityLabs/CloudScraper CloudQuery https://www.cloudquery.io/
  • #72 Microsoft is listed as a leader in many security-related Gartner magic quadrants. You can find other competitors and who they rank - but make sure you test the products in your environment before you buy them. Although the tool may work great for some they may not be the best option in your environment. Additionally, other companies assumed that SolarWinds was a secure option within performing their own assessment and that lead to the worst breach of the US government in history. If you operate or are assessing a large organization, do not recommend a product you have not personally performed an assessment on or have reviewed someone else’s in-depth assessment, audit, and/or penetration test of the product! https://www.microsoft.com/security/blog/2019/12/03/microsoft-security-leader-5-gartner-magic-quadrants/
  • #73 Many tools and technologies exist that allow you to query the extensive Azure configuration database. We already looked at Azure Graph, the Azure CLI, Powershell, and lots of different types of logs. You can query almost anything on the Azure platform using the Azure CLI and PowerShell and answer many asset-oriented questions using azure graph. Consider writing your own tools that meet your specific needs.
  • #75 When operating in the cloud part of your security is provided by the Azure platform itself. You’ll need to understand any vulnerabilities on the platform and if they affect you. In some cases, you might need to perform an upgrade. In other cases, you may need to monitor for malicious activity or make configuration changes. Sometimes you are dependant on the cloud provider to fix the problem. The 2022 Microsoft Vulnerabilities Report from Beyond Trust highlights vulnerabilities in the Azure platform itself over the past year. https://www.beyondtrust.com/resources/whitepapers/microsoft-vulnerability-report You can sign up for Azure security notifications here: https://www.microsoft.com/en-us/msrc/technical-security-notifications Following security news and security research sources is also a good way to find out about cloud vulnerabilities. Many news sources report on security news including, but not limited to, the following: https://thehackernews.com/ https://therecord.media/ https://www.bleepingcomputer.com/ Also follow security researchers on Twitter (or now Mastadon). A few potential sources: @TeriRadichel | infosec.exchange/@teriradichel post.news/teriradichel | medium.com/cloud-security :) @BrianKrebs | infosec.exchange/@briankrebs @GossiTheDog | cyberplace.social/@gossithedog
  • #76 Wherever possible you want to block vulnerabilities from entering the environment. Once a vulnerability gets deployed it will take time and effort to find, update, test, and redeploy. Two articles on this topic written after the Equifax breach when people were knocking the company for not updating: Why Patching is Hard: https://www.darkreading.com/vulnerabilities-threats/why-patching-software-is-hard-technical-challenges https://www.darkreading.com/vulnerabilities-threats/why-patching-software-is-hard-organizational-challenges Whenever possible insert checks for vulnerabilities into the deployment process.
  • #77 This slide highlights a number of different types of tools you can use to test your applications before deployments. A number of tools exist for scanning and testing code and applications. The OWASP website has a few that are free and open source: https://owasp.org/www-community/Free_for_Open_Source_Application_Security_Tools
  • #78 If you use Azure Container Registry, Microsoft offers automated container scanning triggered when certain events occur or continuously. https://docs.microsoft.com/en-us/azure/defender-for-cloud/defender-for-containers-introduction If you structure your deployment processes correctly with containers pushed to development repositories and never deployed to production directly then you can catch new vulnerabilities before they get to a production environment. This requires ensuring that the integrity of your containers remains in tact and containers do not change once they leave your development environment. That also depends on correctly pulling secrets out of secrets repositories at time of use instead of modifying secrets stored in code at the time of deployment.
  • #79 Defender for Cloud can also scan Kubernetes deployments for configuration vulnerabilities. https://docs.microsoft.com/en-us/azure/defender-for-cloud/defender-for-containers-introduction The following documentation provides the full list of security alerts: https://docs.microsoft.com/en-us/azure/defender-for-cloud/alerts-reference#alerts-k8scluster
  • #80 GitHub advanced security offers scanning within repositories directly. Scan code for security problems as it gets checked into source control. https://docs.github.com/en/get-started/learning-about-github/about-github-advanced-security Integrate these features with Azure DevOps https://docs.microsoft.com/en-us/devops/devsecops/enable-devsecops-azure-github
  • #81 You can leverage some of the following Azure tools and services to help prevent vulnerabilities from entering your environment in the first place. Azure Policy Deny Effect: https://docs.microsoft.com/en-us/azure/governance/policy/concepts/effects#deny Azure Arc Policy to maintain compliance and prevent vulnerabilities: https://docs.microsoft.com/en-us/azure/architecture/hybrid/azure-arc-hybrid-config https://docs.microsoft.com/en-us/azure/defender-for-cloud/apply-security-baseline Azure offers the following approach for integrating security and vulnerability prevention into your deployment pipeline; https://docs.microsoft.com/en-us/azure/devops/pipelines/security/overview Azure DevOps Security enforced through YAML templates: https://docs.microsoft.com/en-us/azure/devops/pipelines/security/templates?view=azure-devops You can use the concept of security enforced through deployment pipelines and templates with any deployment system if architected correctly, not just Azure DevOps. The author constructed a secure pipeline in Jenkins that gave development teams only partial access to deployment jobs. They could change certain aspects of the deployment but not all. Security checks and templates helped ensure secure deployments while offering developers the ability to configure their applications and deployments to the extent needed within the guardrails provided by the pipeline. GitHub policies can help you protect your code at the source. https://docs.github.com/en/code-security/getting-started/adding-a-security-policy-to-your-repository
  • #82 Microsoft Defender 365 offers a number of features and functions designed to help organizations with security. https://docs.microsoft.com/en-us/microsoft-365/security/defender/microsoft-365-defender As always you’ll need to understand all the services, options, and pricing. For this section we are going to take a look at Microsoft Defender Vulnerability Management. Microsoft Intune is a mobile device management solution: https://docs.microsoft.com/en-us/mem/intune/fundamentals/what-is-intune Microsoft Endpoint Configuration Manager aims to help you track all your endpoint systems. https://docs.microsoft.com/en-us/mem/configmgr/
  • #83 Microsoft Defender Vulnerability Management offers a number of capabilities to help with vulnerability management. You’ll want to not only find the vulnerabilities but also remediate them. https://docs.microsoft.com/en-us/microsoft-365/security/defender-vulnerability-management/defender-vulnerability-management
  • #84 As always, there are multiple plans you’ll need to understand to determine the costs and features provided by each. Also note that if you want to integrate with Azure Arc there’s a $6/Server/Month cost at the time of this writing. https://docs.microsoft.com/en-us/microsoft-365/security/defender-vulnerability-management/defender-vulnerability-management-capabilities?view=o365-worldwide Azure Arc pricing: https://azure.microsoft.com/en-us/pricing/details/azure-arc/
  • #85 Microsoft Defender for Cloud leverages Microsoft Defender on Azure hosted VMs or Azure Arc enabled servers. https://docs.microsoft.com/en-us/azure/defender-for-cloud/deploy-vulnerability-assessment-vm Microsoft Defender for Cloud leverages the Log Analytics Agent. Install this agent on hosts to send vulnerability data and other logs to Azure. https://docs.microsoft.com/en-us/azure/azure-monitor/agents/log-analytics-agent
  • #86 With Microsoft Defender for Cloud you’ll be able to view and manage vulnerabilities within the Microsoft Defender for Cloud Dashboard as explained in the last section. https://techcommunity.microsoft.com/t5/microsoft-defender-for-cloud/microsoft-defender-for-cloud-server-monitoring-dashboard/ba-p/2869658 Integration with Microsoft Defender for Endpoint: https://docs.microsoft.com/en-us/azure/defender-for-cloud/integration-defender-for-endpoint?tabs=windows
  • #87 Once you know where vulnerabilities exist you’ll need to remediate them. This is generally not as simple as applying a patch in production. Generally organizations will want to apply the update in a development environment, test it in a QA environment, and then deploy to production. If an organization has invested in automated deployment processes that include pulling the latest versions of any software used by the system, then the process to fix a vulnerability would consist of redeploying the application. https://docs.microsoft.com/en-us/azure/defender-for-cloud/remediate-vulnerability-findings-vm
  • #88 Just as you can perform vulnerability assessments, apply remediations, and create baselines for servers, you can do the same for SQL databases using Azure SQL vulnerability assessment features. https://docs.microsoft.com/en-us/azure/azure-sql/database/sql-vulnerability-assessment Unlike applications, it is typically not simply to redeploy a database, especially if it contains massive amounts of data. Patches, updates, and configuration changes are often applied directly to the database. Always make a backup before updating databases. Consider transactions in flight and lock down applications appropriately, and audit all changes. If you have a fully replicated database, it may be possible to apply the updates to a replica, test, and then point the DNS to the new database using a blue-green deployment methodology. https://martinfowler.com/bliki/BlueGreenDeployment.html
  • #90 When working towards compliance with a standard or regulation on Azure the first place to start is with the Azure-provided compliance documentation. Azure offers guidance for a wide variety of compliance standards. Due to the shared responsibility model some aspects of compliance will be the responsibility of the cloud platform. This could be a benefit to customers in that it reduces the work to maintain compliance. However, it is important that customers choose features and services on the cloud platform that adhere with the necessary requirements. Often when new services and features come out they are not initially fully compliant and later become compliant with various standards and regulations. https://docs.microsoft.com/en-us/azure/compliance/
  • #91 You can choose standards on the Azure compliance dashboard and learn more about how Azure complies to each standard. In addition, you can find links to customer responsibilities and recommendations. https://docs.microsoft.com/en-us/azure/compliance/offerings/offering-nist-csf
  • #92 View Azure Audit reports on the Audit Reports Blade in the Azure Portal. https://portal.azure.com/#view/Microsoft_Azure_Security/AuditReportsBlade
  • #93 Azure Security Benchmarks are aligned with the following compliance frameworks: PCI-DSS 3.2.1 CIS Controls v8 CIS Controls v7.1 NIST SP800-53 Rev4 If you are trying to comply with any of those standards you can see how the Azure Security Benchmarks align and what type of coverage they offer. https://docs.microsoft.com/en-us/security/benchmark/azure/overview
  • #94 We discussed Azure Blueprints in the last class. You can find sample Azure Blueprints that will help you comply with various standards. Leverage the Blueprints to automate compliance.
  • #95 Compliance is helpful but compliance alone typically does not address all security gaps and concerns. However, it does force some companies to at least implement a minimal baseline of security when it comes to sensitive data and assets. Although companies should strive for security across the organization, the time and cost of audits typically drives the need to scope compliance to a subset of the organization’s assets. In order to scope and maintain compliance in Azure, leverage separate tenants, management groups, or resource groups. Limit access to environments requiring greater compliance. Apply stricter policies to restrict non-compliant resources from being deployed in these groups. Restrict assets requiring compliance from being deployed in cloud environments lacking appropriate compliance controls. Ideally, organizations could just apply compliance requirements across the entire organization. That was the approach chosen by the CTO at Capital One prior to all the clouds offering encryption everywhere. He simply required that the organization enforced employment of only encrypted assets in AWS at the time of in the initial move to the cloud.
  • #97 Defender for Cloud Apps is Microsoft’s Cloud Access Security Broker (CASB) offering. It competes with other tools like Netskope and McAfee which currently have more market share and, according to Gartner, have a more comprehensive solution. These tools monitor cloud traffic within your organization and try to determine which cloud products and services are in use. They help security teams and IT teams discover shadow IT, determine who is using applications, and create policies for use. https://docs.microsoft.com/en-us/defender-cloud-apps/what-is-defender-for-cloud-apps
  • #99  Many issues exist when it comes to logging in the cloud. First and foremost, you don’t control all the logs yourself so you’re a bit at the mercy of Microsoft to provide the appropriate logs in some cases and ensure they offer the necessary data for troubleshooting and security incident investigation. When certain resources terminate such as virtual machines, containers, and functions, any logs stored on them is gone. Any metadata associated with a particular IP address used by that resource that is only available when the resource is running is gone. For this reason, you’ll need to ensure that logs are shipped to a more permanent location. Ensure that logs include any metadata you need to associate the logs to a particular resource or any information that will not be present upon termination of the resource. When applications are written using a microservices architecture, requests are handed off from one service to another. A whole series of actions might consist of request being sent from one service to another. To track down a security problem you may need to tie all these logs together to formulate an attack path when a security incident occurs. Understand how your developers are logging data with microservices architectures and how you can understand a complete transaction involved in an incident across multiple containers or functions. Also ensure you have access to all the necessary logs prior to an incident. Valuable time may be lost while requesting access to logs. Consider shipping all logs to a centralized log data lake or SIEM for analysis. We’ll talk about Azure’s SIEM, Sentinel, in the next section. First, let’s take a look at some of the logs you might want to be aware of and use in the case of a security incident. It’s a good idea to determine what information you need to see in logs and make sure it’s there before you have an incident, not during or after!
  • #100 Different types of logs exist on the Azure platform. The Azure Activity and Audit logs show actions related to the Azure Fabric or underlying platform itself. In addition, you’ll have different logs related to each resource you use on the Azure platform. Azure also offers processed logs which analyze log data and configurations to provide useful insights. https://docs.microsoft.com/en-us/azure/security/fundamentals/log-audit
  • #101 Activity logs show actions taken on the Azure Platform, sometimes call the Azure Fabric. Find out when users have created, updated, and deleted resources in subscriptions. https://docs.microsoft.com/en-us/azure/azure-monitor/essentials/activity-log
  • #102 Resource logs are associated with specific types of resources. For example, you might have a storage account. You’ll need to configure logging for that storage account to see specific information about access to that storage account and data stored in it. https://docs.microsoft.com/en-us/azure/azure-monitor/essentials/resource-logs
  • #103 Azure AD Audit logs provide information about changes to Users, Groups, and Application Management. All these resources are related to granting permissions to your tenant and the resources within it. https://docs.microsoft.com/en-us/azure/active-directory/reports-monitoring/concept-audit-logs
  • #104 Azure AD Sign-In logs help you track who is logging into your Azure account, when, and from what IP address. You can view success or failure. These logs can help you spot risky logins by finding anomalous activity from strange locations and repeated failed login attempts that might indicate a password spraying attack. Find additional options for tracking risky logins using Azure Information Protection in this section of Azure AD. https://docs.microsoft.com/en-us/azure/active-directory/reports-monitoring/concept-sign-ins
  • #105 Enable VM insights on a VM by clicking Insights in the left menu. You will need to associate the VM with a Log Analytics Workspace if it’s not already associated. Click Enable. https://docs.microsoft.com/en-us/azure/azure-monitor/vm/vminsights-overview
  • #106 View the details of Azure VM Insights. Perhaps you need to know more about the networking associated with a particular VM. https://docs.microsoft.com/en-us/azure/azure-monitor/vm/vminsights-overview
  • #107 From Azure documentation on Azure Monitor Agent: “When it fully supports VM insights, Microsoft Defender for Cloud, and Microsoft Sentinel, then it will completely replace the Log Analytics agent and diagnostic extension.” https://docs.microsoft.com/en-us/azure/azure-monitor/agents/azure-monitor-agent-overview?tabs=PowerShellWindows Other agents: https://docs.microsoft.com/en-us/azure/azure-monitor/agents/agents-overview
  • #108 Enable Storage Insights the same way you enabled VM insights. Navigate to your storage account and click Insights in the left menu to enable the additional logging and metrics. https://docs.microsoft.com/en-us/azure/storage/common/storage-insights-overview
  • #109 Azure NSG Flow Logs are based on a standard network flow log layout. Get a high level overview of source and destination hosts, ports, and protocols making connections within your Azure environment - but as with other logs, you need to turn them on! https://docs.microsoft.com/en-us/azure/network-watcher/network-watcher-nsg-flow-logging-overview
  • #110 If you need a full packet capture for troubleshooting or security purposes you can capture packets for an entire machine or filter on specific traffic. Navigate to Network Watcher. Click on Packet capture. Provide the details for your capture and click Save. https://docs.microsoft.com/en-us/azure/network-watcher/network-watcher-packet-capture-manage-portal You can download the packet capture and analyze it in your favorite tool, such as Wireshark. For a basic introduction to network packets and wireshark check out this article: https://medium.com/cloud-security/what-is-packet-sniffing-f03f50aa230
  • #111 You can use an Azure Virtual Network Tap to capture aggregated traffic instead of packet capture for a single virtual machine. In this scenario, you need to use one of the partner solutions on the page in the link here and direct the traffic to them for capture or analysis. For a single tap, all the virtual machines need to exist in the same region and tenant. If you are using network peering it needs to be added prior to the configuration of the Virtual Network Tap. https://docs.microsoft.com/en-us/azure/virtual-network/virtual-network-tap-overview
  • #112 Network Watcher offers a number of other useful tools for monitoring as covered on day 2 for networking. https://docs.microsoft.com/en-us/azure/network-watcher/network-watcher-monitoring-overview
  • #113 Azure SQL offers audit logs which can include actions taken by Microsoft Support. You’ll need to turn that on as well if you want to see it. https://docs.microsoft.com/en-us/azure/azure-sql/database/auditing-overview?view=azuresql
  • #114 We looked at how to enable diagnostic logs for a few services on Azure over the course of this class. Pretty much every service on Azure will have some kind of logs you can enable, track, view or monitor. You’ll need to understand available logs for each service you use. For example, these are some of the logs you can obtain from the Azure App Service. https://docs.microsoft.com/en-us/azure/app-service/troubleshoot-diagnostic-logs In addition to cloud-provided logs you will want to understand what logs each application you create produces and how and where they are stored.
  • #115 Azure does not provide detailed DNS logs showing every query but you can get metrics and alerts. Since DNS is critical for security this may be an issue for some companies who may opt to host their own DNS servers to get more detailed information. https://docs.microsoft.com/en-us/azure/dns/dns-alerts-metrics Azure Analytics provides information about correlated events. This feature is currently in preview. https://docs.microsoft.com/en-us/azure/azure-monitor/insights/dns-analytics
  • #116 When integrating with Azure AD using SAML or any other technology, ensure the logs provide the information you require to assess errors, activity, and configuration. While testing a new service in preview that integrates with external IdPs, 2nd Sight Lab discovered that logs related to certain errors were not present - anywhere. Microsoft admitted after a month that this was a bug and is fixing it. You’ll need to go through and test and troubleshoot each system you implement to ensure that logs are present where required where errors or security issues occur. Since Authentication is a common point of attack and understanding how and when authentication or integration with any type of authentication system is so crucial in any environment, you’ll want to give these types of systems and their logs some extra scrutiny.
  • #118 Azure Monitor allows you to monitor the health of applications and resources within your Azure Account. https://docs.microsoft.com/en-us/azure/azure-monitor/overview In September 2018, Microsoft combined Azure Monitor, Log Analytics, and Application Insights into a single service. Azure Monitor is enabled the moment that you create a new Azure subscription, and Activity log and platform metrics are automatically collected. Must add diagnostic settings for other logs as demonstrated throughout class. You can connect your existing System Center Operations Manager management group to Azure Monitor to collect logs from Azure agents.
  • #119 This documentation outlines what you can monitor with Azure Monitor. Also understand what is not monitored and where gaps may exist. https://docs.microsoft.com/en-us/azure/azure-monitor/monitor-reference
  • #120 We’ve already looked at a few of the “insights” services that send logs to Azure Monitor. Azure Monitor consolidates all these insights into one place so you can monitor many resources in the same place. If you’ve enabled VM insights, storage insights, and the other types of insights for resources on Azure you can find them here on a single dashboard. https://docs.microsoft.com/en-us/azure/azure-monitor/overview
  • #121 This is the same view for VM insights we saw when looking at one VM. In Azure Monitor you can find a list of resources in one place and view insights for them.
  • #122 Here’s another example - Storage Account Insights in Azure Monitor. https://docs.microsoft.com/en-us/azure/storage/common/storage-insights-overview
  • #123 Network Insights in Azure Monitor. https://docs.microsoft.com/en-us/azure/azure-monitor/insights/network-insights-overview
  • #124 Application Insights in Azure Monitor: https://docs.microsoft.com/en-us/azure/azure-monitor/app/app-insights-overview
  • #125 Depending on which resources you are monitoring you may need to configure your firewall to allow access. At the time of this writing, these are the network requirements for Azure Monitor: https://docs.microsoft.com/en-us/azure/azure-monitor/app/ip-addresses
  • #126 The Azure Monitor Insights Hub shows you all the things you can monitor with Azure Monitor.
  • #127 Azure Monitor Workbooks provide a way to visualize your data. You can customize the view to display the data in different ways that make sense to you or highlight the problems you are trying to diagnose. Azure Monitor Workbooks are also used by Sentinel as we’ll see in the next section. The following page provides a video walkthrough to create an Azure Monitor Workbook. https://docs.microsoft.com/en-us/azure/azure-monitor/visualize/workbooks-overview
  • #128 The template gallery has a number of workbook templates you can use as is or modify templates to meet your needs. You can use an existing template as it is or modify it meet your needs.
  • #129 Check out the video on this page to create your own custom template and workbook. Choose from a number of different types of visualizations. https://docs.microsoft.com/en-us/azure/azure-monitor/visualize/workbooks-overview
  • #131 Many companies send all security related logs to a SIEM - a security information and event management system. This allows the security team to correlate logs from multiple sources to determine the source and actions involved in a security event or incident. More modern solutions are making heavy use of cloud infrastructure. This is due to the vast amounts of data that SIEMs typically need to store and the compute power that typically exists in cloud environments. Not only that, cloud providers have a lot of threat intelligence data which they can share with customers to help find and stop attacks. Sentinel is Microsoft’s cloud-native SIEM solution. It also has SOAR (Security orchestration automation and response). The more security teams can automate responses to common problems, the more time they can spend focusing on more interesting and meaningful problems like threat hunting to find attacks hidden in environments and minimizing the damage caused by potential threats and attacks. https://docs.microsoft.com/en-us/azure/sentinel/overview
  • #132 To get started with Sentinel navigate to the service in Azure and click the Create Microsoft Sentinel button. You could also click the + Create button at the top of the screen.
  • #133 On the next screen choose or create a workspace. For the purposes of this demo we have an existing workspace but you might want your security team to have their own workspace and limit permissions to that workspace. Click Add.
  • #134 The next step is to Collect data. To collect data we’re going to Connect various log sources so click the Connect button. As you can see from the screen above other options would be to create security alerts or automate responses to security events.
  • #135 The next screen will be the list of data sources from which you can import log data. Some of the most important logs are going to be your Active Directory and networking logs. Let’s start with Active Directory. You can click on any of the Active Directory logs to connect them to Sentinel.
  • #136 Next add a workbook. These are the same workbooks we covered with Azure Monitor. Click Workbooks on the left. Choose a pre-built template. Choose a region and save your workbook.
  • #137 View your workbook. Here you can see various visualizations of the logs and data sources you’ve added to Microsoft Sentinel.
  • #138 To return to your workbook later click Workbooks in the left menu, click on My workbooks, and click on your workbook to open it.
  • #139 Threat hunting is fun! Figure out what sort of indicators of compromise you are seeking and write queries to find potential attacks and threats in your environment. If you’re not sure where to start, the Microsoft team wrote a number of queries to help you get started. https://docs.microsoft.com/en-us/azure/sentinel/hunting
  • #140 Use Analytics to find security events in your logs using custom rules. You can opt to create a security incident automatically from the result of a rule query. https://docs.microsoft.com/en-us/azure/sentinel/detect-threats-custom
  • #141 Enter a name and description for your rule. Choose the tactics and techniques. Leave the rule enabled. Click Next. On this screen we’re just selecting random data, nothing in particular. You most likely wouldn’t choose all those options for a rule.
  • #142 Add a query. You can click options on the right to select an existing query. On this slide, we selected an existing query that we knew would produce a finding for testing purposes. You can see more details about the query we selected here in the upcoming Security Operations section at the end where we walk through a finding and dig into the details causing it. By selecting a query we know our query will generate results for testing purposes we can use it to trigger and demonstrate an incident. You can, of course, write your own custom queries for the things you find anomalous in your particular environment.
  • #143 Enter a schedule that defines how often your rule will run and what logs it will evaluate. Note that you may have some lag to account for in certain logs, but you also don’t want to evaluate the same logs twice and create duplicate incidents. In this case, we know some findings exist and are just testing so we’ll turn this rule off after one finding. Click Next.
  • #144 Make sure you enable the capability to create an incident from your finding so you can use that on the next screen. Choose all the rest of the defaults to create your rule.
  • #145 View your new rule on the analytics blade.
  • #146 Microsoft offers a number of pre-existing rule templates you can add to your configuration. Click on Rule templates in the analytics list to see them. https://docs.microsoft.com/en-us/azure/sentinel/detect-threats-built-in
  • #147 Click Incidents in the left menu. Here you’ll find an incident generated by your rule that you just created, presuming you used a query that matches existing log data. You can view the details of your incident or click on actions to see what you can do about the incident. Here you have some options: Run a playbook. Create an automation rule. Create a team. We’ll cover these options more in the incident response section. https://docs.microsoft.com/en-us/azure/sentinel/investigate-cases
  • #148 User and Entity Behavior Analytics (UEBA) tries to find potential malicious or accidental behavior that exposes data or causes a data breach by evaluating logs for anomalous entity behavior. For more information on how to enable and use the entity behavior module, follow the instructions on this page: https://docs.microsoft.com/en-us/azure/sentinel/identify-threats-with-entity-behavior-analytics
  • #149 Cyber threat intelligence (CTI) is information that defines potential threats to systems or users, typically via indicators of compromise (IOCs). For example, you might know that a particular piece of malware is coming from a certain IP address. You would enter that IP address as an indicator of compromise to get an alert of a potential attack if that IP address attempts to connect to your systems or vice versa. You can also connect to external intelligence sources that will send you updates when new domains and IP addresses are discovered by a particular security organization or the security community, depending on who manages the feed. https://docs.microsoft.com/en-us/azure/sentinel/understand-threat-intelligence Connect Threat Intelligence to STIX/TAXII: https://docs.microsoft.com/en-us/azure/sentinel/connect-threat-intelligence-taxii Connect a threat intelligence platform to Sentinel: https://docs.microsoft.com/en-us/azure/sentinel/connect-threat-intelligence-tip We’ll cover one other threat intelligence related function of Sentinel - the MITRE ATT&CK Matrix - in the next section.
  • #150 From the Azure Documentation: Content in Microsoft Sentinel includes any of the following types: Data connectors provide log ingestion from different sources into Microsoft Sentinel Parsers provide log formatting/transformation into ASIM formats, supporting usage across various Microsoft Sentinel content types and scenarios Workbooks provide monitoring, visualization, and interactivity with data in Microsoft Sentinel, highlighting meaningful insights for users Analytics rules provide alerts that point to relevant SOC actions via incidents Hunting queries are used by SOC teams to proactively hunt for threats in Microsoft Sentinel Notebooks help SOC teams use advanced hunting features in Jupyter and Azure Notebooks Watchlists support the ingestion of specific data for enhanced threat detection and reduced alert fatigue Playbooks and Azure Logic Apps custom connectors provide features for automated investigations, remediations, and response scenarios in Microsoft Sentinel https://docs.microsoft.com/en-us/azure/sentinel/sentinel-solutions
  • #151 For those who want to leverage machine learning in their threat hunting efforts Microsoft offers Jupyter notebook capabilities. Note that machine learning typically requires massive amounts of data so if you don’t have that your machine learning efforts may be a waste of money. Basic data queries go a long way in most cases. https://docs.microsoft.com/en-us/azure/sentinel/notebooks
  • #152 Did not find documentation for this at the time of this writing. I did find one link in the azure Marketplace written in another language. I don’t recommend clicking on it since items in the Azure Marketplace are not necessarily provided by Azure. This may be deprecated or new feature not yet globally available in the Azure portal. Not sure, but left it here anyway for future reference if it becomes available later.
  • #153 Microsoft allows you to link to your source code repository to deploy custom content. One thing to consider with this option: Where and how are credentials to your source code repository stored to make this work? Perhaps a better option would be your own deployment pipeline if you are not confident about providing credentials to Microsoft Sentinel. 2nd Sight Lab has not fully assessed this solution. https://docs.microsoft.com/en-us/azure/sentinel/ci-cd
  • #154 A watch list allows you to create name value pairs of important or risky assets you want to monitor. https://docs.microsoft.com/en-us/azure/sentinel/watchlists
  • #155 Azure allows you to create automation rules and playbooks to automate responses to events and incidents. This is the concept of SOAR or security orchestration, and response. https://docs.microsoft.com/en-us/azure/sentinel/automation
  • #157 The process for security operations is not that much different in the cloud than on-premises though the logs and tools you use to find threats will differ. Microsoft provides some guidance on the following pages. https://docs.microsoft.com/en-us/azure/architecture/framework/security/monitor-security-operations https://docs.microsoft.com/en-us/security/compass/security-operations
  • #158 Azure offers many tools to help with Azure operations in general and many of these tools will be helpful to security teams as well. These tools provide insights into activities occurring on the cloud platform. They can help assess and monitor application performance. These tools can help an organization prepare for and recover from disasters. They also help with troubleshooting network problems and outages. We’ve already covered most of these tools in class. The last tool on the list, Cloud Service Provider Transparency, is designed to help you understand what Azure staff has done in your account. https://docs.microsoft.com/en-us/azure/security/fundamentals/operational-overview
  • #159 In order to perform log analysis you’ll need to understand what you’re looking for in the logs. To understand what you need to look for take a look at the details of recent data breaches. Review security researcher analysis of malware and indicators of compromise (IOCs) for different types of malware that could infiltrate your cloud environment. Sign up for CISA alerts on malware and attacks. https://www.cisa.gov/uscert/mailing-lists-and-feeds MITRE ATT&CK for Cloud https://attack.mitre.org/matrices/enterprise/cloud/ Remember that most other types of application and some Active Directory and on-premises attacks may still be applicable to cloud applications and environments. The following resources will also be helpful: https://attack.mitre.org/ https://cwe.mitre.org/ https://owasp.org/www-project-top-ten/ https://cve.mitre.org/ https://attack.mitre.org/matrices/enterprise/containers/
  • #160 The MITRE ATT&CK screen in Sentinel helps you visualize your coverage of detections for MITRE ATT&CK threats. Click MITRE ATT&CK in the left. Then change the filter to include anomaly rules and/or hunting queries you’ve written. Then you can see how many potential attacks you would be able to spot with your existing rules. If you see gaps, add additional queries to get more coverage. https://docs.microsoft.com/en-us/azure/sentinel/mitre-coverage
  • #161 If you follow security researchers who analyze malware and attacks you can gain insight into what security measures you can take to prevent similar future breaches. You can also obtain details about what to look for in your logs to determine if you have been exposed to the malware. Although I have a certification in malware reverse engineering I don’t usually go to that level of detail. I’m usually focused on a higher level of analysis these days, but I linked to the more deep dive security reports. Malware analysis can tell you things like what networks to block, what URLs to look for in your logs, malware behavior and other indicators of compromise (IOCs) that can alert you to a potential incident, compromise, or breach. https://medium.com/cloud-security/solarwinds-hack-retrospective-322f03b4eb9b
  • #162 Now that you know what you’re looking for, start searching! Dig through the logs looking for things that might indicate your account has a security problem. This slide lists some sample activity that might warrant further inspection.
  • #163 The example on the slide comes from this Azure documentation on Azure risk detections: https://docs.microsoft.com/en-us/azure/active-directory/identity-protection/howto-identity-protection-investigate-risk Another example would be to dig into and monitor network logs for suspicious activity. This blog series is aimed at home network monitoring but the same concepts apply in cloud environments: https://medium.com/cloud-security/watching-the-network-watchers-158613b24016
  • #164 Microsoft provides guidance on tools you can use to defend against ransomware attacks. For example, Azure Sentinel can help create a complete view of the attack kill chain. https://azure.microsoft.com/en-us/resources/azure-defenses-for-ransomware-attack/
  • #165 Azure offers a Workbook that organizations can use to operationalize and apply a Security Operations Team methodology to Sentinel. https://techcommunity.microsoft.com/t5/microsoft-sentinel-blog/what-s-new-azure-sentinel-soc-process-framework-workbook/ba-p/2339315 A Jupyter Notebook called MSTICPy exists to help with threat hunting. https://techcommunity.microsoft.com/t5/microsoft-sentinel-blog/msticpy-and-jupyter-notebooks-in-azure-sentinel-an-update/ba-p/2279661
  • #166 Operations teams will likely need to be notified when certain types of events occur. You can configure email notifications when security related events occur in Microsoft Defender for Cloud. In fact, you can programmatically trigger emails and SMS notifications based on almost any action in a cloud environment. For example, the author triggers a text message when a user hits a function due to a blind cross site scripting attack. You can create alerts for almost anything in your cloud environment that you want to know about. Configure email notifications on Microsoft Defender for Cloud: https://docs.microsoft.com/en-us/azure/defender-for-cloud/configure-email-notifications Programmatically configure notifications using ARM or Bicep: https://docs.microsoft.com/en-us/azure/defender-for-cloud/quickstart-automation-alert?tabs=CLI
  • #167 In addition to monitoring your own resources, you’ll want to understand when the platform itself is having an issue. Microsoft has had a number of security incidents and outages over the years. https://status.azure.com/en-us/status/history/ https://www.zdnet.com/article/global-azure-outage-knocked-out-virtual-machines-other-vm-dependent-services/ Monitor for Azure outages with Azure’s own status dashboard: https://status.azure.com/en-us/status You can also use external tools such as Down Detector: https://downdetector.com/status/windows-azure/
  • #168 Take a look at the overview page on Sentinel. A data source anomaly shows up on the right. Click on it.
  • #169 Expand one of the events to see the details. Here you can see that the sign-in event is coming from the managed created on an earlier day of class.
  • #170 We can try to find more information about this anomaly in the Azure AD logs. Navigate to Azure AD. Click Log Analytics. Run a query to see if you can find the underlying logs. Investigate whether they provide any additional insight.
  • #171 Navigate to the Sign-in Logs. Search on Managed Identity Sign-ins to verify the logs exist and see any additional details. Here we can find the logs and see that the Resource is Azure Key Vault. We assigned this managed identity permissions to Azure Key Vault so it would make sense that this activity is related to Azure Key Vault. Perhaps this is some type of automated function performed by the Azure platform. We could make this assumption and stop here, but let’s dive deeper to see if we can figure out exactly what automated activity is being initiated by the managed identity.
  • #172 Navigate to Managed Identities. Click on Activity log in the left menu. Set the time frame to include our anomalous events. Click Apply.
  • #173 Review the activity logs for this managed identity. No indication of activity by the managed identity appears in these logs. All the actions in the logs for this time period were generated by an actual user, not the managed identity.
  • #174 Navigate to Azure Key Vault and check the activity logs. Once again no activity exists for the managed identity logging into Azure, only an actual user. What’s going on with this anomalous data? We can’t seem to find any related activity by the managed identity yet it keeps logging in. Perhaps this is expected behavior to check for key rotation or handle logging. In this case, the managed identity will be deleted after this class so not going to take this further. In the case of an organization using the managed identity to encrypt sensitive data using Azure Key Vault they might want to understand this behavior in more detail. A cursory review of the documentation did not explain this behavior so the next step would be a deeper dive Google search for information about that particular event or finding. In the end, you’ll likely have to contact Azure support to explain what is going on in this case if you want to completely understand the source of these logs and why they are reported as an anomaly in Sentinel.
  • #176 Most of the fundamentals of incident response will be the same as on-premises with a few important exceptions. The process for capturing data related to an incident may be altered due the nature of how cloud platform and the resources on it function. Additionally, certain logs may not be available since those parts of the cloud platform are managed by the cloud provider. An organization may have to cooperate with the cloud provider to manage an incident if the attack crosses the boundary of the responsibility model. https://docs.microsoft.com/en-us/security/compass/incident-response-overview
  • #177 Microsoft provides guidance in several documents for those who are new to incident response. https://docs.microsoft.com/en-us/security/compass/incident-response-overview Microsoft also offers a blog series on incident response on the above page; Part 1 – Organization: Mission and Culture Part 2a – People: Teams, Tiers, and Roles Part 2b – People: Careers and Readiness Part 3a – Technology: SOC Tooling Part 3b – Technology: Day in life of an analyst Part 3c – A day in the life part 2 - Microsoft Security Part 3d – Zen and the art of threat hunting
  • #178 Document for planning for an incident. There are many questions you’ll want to answer and plan for in advance of an incident. This slide shows one of the questions covered in this Microsoft document on SecOps Planning for Incident Response. https://docs.microsoft.com/en-us/security/compass/incident-response-planning
  • #179 What are the typical activities performed by a response team? Microsoft provides some guidance on this page related to Microsoft Defender. The same concepts would apply for Microsoft Defender for Cloud. https://docs.microsoft.com/en-us/microsoft-365/security/defender/incidents-overview
  • #180 We could spend a whole class on incident response. The details on the page linked below explain how to drill down into data to map out an incident using Azure Sentinel. This slide shows mapping out an incident path and how Sentinel suggests queries for deeper investigation. A new feature in preview display similar incidents. You can search for, comment on, and close incidents. https://docs.microsoft.com/en-us/azure/sentinel/investigate-cases
  • #181 Microsoft provides guidance for responding to Defender alerts. Advanced detections that trigger security alerts are only available with Microsoft Defender for Cloud's enhanced security features enabled. The Take Action button allows you to respond to the alert in various ways (quote from the Microsoft documentation): Inspect resource context - sends you to the resource's activity logs that support the security alert Mitigate the threat - provides manual remediation steps for this security alert Prevent future attacks - provides security recommendations to help reduce the attack surface, increase security posture, and thus prevent future attacks Trigger automated response - provides the option to trigger a logic app as a response to this security alert Suppress similar alerts - provides the option to suppress future alerts with similar characteristics if the alert isn’t relevant for your organization You can also respond to multiple alerts at once. https://docs.microsoft.com/en-us/azure/defender-for-cloud/managing-and-responding-alerts
  • #182 Create automation rules to automatically respond to events. To create an individual automation rule, navigate to Automation and click + Create. Create a rule name. https://docs.microsoft.com/en-us/azure/sentinel/create-manage-use-automation-rules
  • #183 Choose a trigger that indicates when the automation rule gets activated. Add conditions to when the automation rule applies. Choose an action: Run a playbook (we’ll cover that next). Change the status. For example, the incident may be a false positive that gets automatically closed. Change the severity of the incident. Assign an owner that should handle the response. Add tags or metadata about the incident you can use later such as querying all incidents with the same tag on or handling incidents with the same tag as a group. https://docs.microsoft.com/en-us/azure/sentinel/create-manage-use-automation-rules
  • #184 You’ll want to plan ahead for incidents and create a playbook so people know how to respond, who to contact and what to do. CISA the US Cybersecurity and Infrastructure Security Agency provides a general incident response playbook: https://www.cisa.gov/sites/default/files/publications/Federal_Government_Cybersecurity_Incident_and_Vulnerability_Response_Playbooks_508C.pdf
  • #185 A playbook on Azure Sentinel is a group of automation rules that work together. This functionality allows you to orchestrate and automated your response to incidents. You can automatically run playbooks in response to incidents or run them on-demand. Playbooks are based on Azure Logic Apps so you can completely customize them with the capabilities offered by that Azure service. https://docs.microsoft.com/en-us/azure/sentinel/automate-responses-with-playbooks You can find templates for Azure Sentinel playbooks under the Automation tab in Sentinel or select from Azure Sentinel playbooks on GitHub. https://github.com/Azure/Azure-Sentinel/tree/master/Playbooks
  • #186 Microsoft developed Simuland to help security researches and IR teams improve the effectiveness of detections for security incidents. Researchers can share end-to-end attack paths so others can test their responses to those attacks with this simulation tool. From the documentation this project has the following objectives: Understand the underlying behavior and functionality of adversary tradecraft. Identify mitigations and attacker paths by documenting preconditions for each attacker action. Expedite the design and deployment of threat research lab environments. Stay up to date with the latest techniques and tools used by real threat actors. Identify, document, and share relevant data sources to model and detect adversary actions. Validate and tune detection capabilities. https://www.microsoft.com/security/blog/2021/05/20/simuland-understand-adversary-tradecraft-and-improve-detection-strategies/
  • #187 The Azure Security Benchmark recommends that companies implement the recommendations on the slide. Auditors will want to check that companies have implemented these best practices. https://docs.microsoft.com/en-us/security/benchmark/azure/security-control-incident-response
  • #188 The following blog post outlines a step-by-step process for creating an incident response VM. https://msrc-blog.microsoft.com/2019/08/30/scalable-infrastructure-for-investigations-and-incident-response/
  • #189 Acquire a VHD to investigate a VM https://msrc-blog.microsoft.com/2019/09/03/acquiring-a-vhd-to-investigate/ Chain of Custody https://docs.microsoft.com/en-us/azure/architecture/example-scenario/forensics/ Creating a memory dump from a running virtual machine in Azure: https://heranonazure.wordpress.com/2018/09/26/created-a-dump-for-a-running-vm-in-azure/ Azure App Services https://devblogs.microsoft.com/premier-developer/collect-and-automate-diagnostic-actions-with-azure-app-services/ Azure Forensics and Incident Response https://cloudyforensics.medium.com/azure-forensics-and-incident-response-c13098a14d8d Snapshot consistency https://docs.microsoft.com/en-us/azure/backup/backup-azure-vms-introduction Collect Memory from Azure App Service https://cloudpills.medium.com/collecting-a-memory-dump-from-azure-app-services-4efeb027b702 Collect Memory from an Azure Function on Consumption Plan https://docs.microsoft.com/en-us/answers/questions/401671/how-to-capture-memory-dump-of-consumption-plan-fun.html Collect Memory from a Linux Web Application https://techcommunity.microsoft.com/t5/apps-on-azure-blog/how-to-collect-net-core-dump-on-linux-web-app/ba-p/2260713 Containers on AKS https://pgroene.wordpress.com/2021/02/17/memory-dump-net-core-linux-container-aks/
  • #190 Log a security support ticket with Azure. https://docs.microsoft.com/en-us/azure/security/fundamentals/event-support-ticket
  • #192 The first thing you need to do before penetration testing on Azure is to review the pentesting rules of engagement. Understand what is and is not allowed during an Azure penetration test. You can only test your own resources on Azure, not other customers! You’ll need to know how to restrict your testing tools and methodologies to your own resources. https://www.microsoft.com/en-us/msrc/pentest-rules-of-engagement?rtc=1
  • #193 Understand which services are and are not in scope for a penetration test. https://www.microsoft.com/en-us/msrc/pentest-rules-of-engagement?rtc=1
  • #194 Ensure that you follow all the rules of engagement. https://www.microsoft.com/en-us/msrc/pentest-rules-of-engagement?rtc=1
  • #195 Microsoft does offer a bug bounty and pays for certain security reports. If you find a security problem on Azure follow the instructions below to submit your report. https://www.microsoft.com/en-us/msrc/pentest-rules-of-engagement?rtc=1
  • #196 Traditional penetration testing involves defining a range of IP addresses for testing. Immediately after my first penetration in the cloud 2nd Sight Lab threw that concept out the window because it does not align with how resources are managed in a cloud environment. Customers can provide block box testing to domain names, but more often a cloud penetration test involves read-only access to review configurations for potential data exposure. Some companies provide developer permissions to determine if developers can access production resources. Others provide read-only access to a subset of resources in the cloud in scope for the test.
  • #197 The first step when performing an Azure penetration test is to look for data exposure and open ports. Exposed data has been the source of numerous data breaches. Many tools will perform basic checks for either assessments or penetration tests. Misconfigurations may also provide a point for diving further to exploit resources on a penetration test.
  • #198 Applications are the gateway to data and cloud resources. Application attacks and security problems are still one of the primary sources of data breaches and security incidents in the cloud. All the standard web application attacks penetration testers perform in application security penetration tests should be performed on applications and APIs in a cloud environment. We’ll cover a few that are especially dangerous to cloud-hosted applications, but in general all the same attacks still apply. Although this presentation is geared at and was created for an AWS event, all these same attacks apply in an Azure environment. This presentation is “Reald World Cloud Compromise” or alternatively “How I’m going to Hack Your Cloud.” https://www.slideshare.net/TeriRadichel/real-world-cloud-compromise
  • #199 Azure has the same concept on the same IP address. You can call an API to get metadata about the host. With the Azure REST API you must supply a version. If you fail to supply a version you can get a list of available versions you can use for your query. Azure offers four APIs through the metadata endpoint: attested, identity, instance, scheduledevents See the following for more details on the metadata service and the information it returns: https://docs.microsoft.com/en-us/azure/virtual-machines/linux/instance-metadata-service
  • #200 Failure to properly validate URLs on redirect by a website can lead to what is know as an open redirect. These types of attacks allow an attacker to redirect a cloud hosted web server or application server which has access to the local IP address of the metadata service to return credentials. https://www.slideshare.net/TeriRadichel/real-world-cloud-compromise
  • #201 DNS Rebinding involves bypassing firewall rules by directing a web application to a domain name to initiate a stateful connection and then after the initial connection, changing the DNS name to point to the metadata service IP address. This bypasses initial security checks that would otherwise block the connection. https://www.slideshare.net/TeriRadichel/real-world-cloud-compromise
  • #202 We talked about networking on Day 2 but when it comes to virtual machine configuration, consider who can add and remove ENIs (Elastic Network Interfaces) to a virtual host. Each network interface is assigned to a network. They may be assigned to separate networks. If someone has permissions to attach multiple ENIs to an instance, then they could potentially attach ENIs from two separate networks, and configure the machine to pass data into one ENI from an internal private network, and out to network that has public access to the Internet. Consider who has permissions to create ENIs and what options are allowed on virtual hosts.
  • #203 The following presentation covers serverless attack vectors. One of those is an attack that enabled bypassing website controls to upload malware directly to a cloud storage account. Although this attack is specific to AWS it would also be applicable when using SAS with an Azure Storage Blob. You’ll also find a demo of an automated attack on cloud-hosted APIs that exposed credentials using an XSS attack. https://www.youtube.com/watch?v=Zv2jFISTHuE
  • #204 Here’s an example of infected images in Docker Hub - downloaded 5 million times! This image including cryptomining software on it which potentially generated $90,000 for the creating docker image builder. Are your developers vetting and inspecting software from public repositories - and GitHub - before they deploy it? Do you scan the images and monitor network traffic to see if the container is reaching out to untrusted sources on the network? https://arstechnica.com/information-technology/2018/06/backdoored-images-downloaded-5-million-times-finally-removed-from-docker-hub/
  • #205 Monitor for vulnerabilities in both container and orchestration software. Make sure your everly layer of software involved in running your containerized applications have up to date software. If an attacker is able to leverage a kernel exploit on your container, they can escape and control the host machine that the container is running on, access all the other containers, and possibly other things on your network. Kubernetes vulnerabilities: https://www.cvedetails.com/vulnerability-list/vendor_id-15867/product_id-34016/Kubernetes-Kubernetes.html AWS Security Bulletins https://aws.amazon.com/security/security-bulletins/
  • #206 Kubernetes is often misconfigured. Some of these may also be applicable to AKS. https://blog.aquasec.com/kubernetes-ui-tools-security-threat
  • #207 Are you aware of the things you can do with Kubernetes? This is advertised as feature, but in the wrong hands this is definitely a vulnerability! This feature is like SSM in AWS or any of the software that updates running hosts. It may be fine in a test and development environment, but probably not something you want to have enabled in production. https://kubernetes.io/docs/tasks/debug-application-cluster/get-shell-running-container/
  • #208 The first process started by the Linux kernel gets PID 1. Do not run any container related processes with PID 1 as it exposes all processes on the host to the container. This lead to potential container escape. RunC allowed additional container processes via 'runc exec' to be ptraced by the pid 1 of the container. This allows the main processes of the container, if running as root, to gain access to file-descriptors of these new processes during the initialization and can lead to container escapes or modification of runC state before the process is fully placed inside the container. https://www.cvedetails.com/cve/CVE-2016-9962/
  • #209 When you run commands on a Docker container it sends commands to Docker using a socket. You can use this socket to send commands to Docker and obtain information. Blog post: http://carnal0wnage.attackresearch.com/2019/02/abusing-docker-api-socket.html
  • #210 Mounting var/run/docker.sock inside a container gives access to run commands within the container that would not otherwise be possible. More explanations and information in this blog post. https://stackoverflow.com/questions/35110146/can-anyone-explain-docker-sock/35110344
  • #211 If you map to root within a docker container, then anyone who gets access inside a host can navigate to files in the root directory, obtain the password files on the host, and execute executables that have execute privileges within those root directories. If the attacker has write access they could change host system files and execute malware.
  • #212 Each time you create an image, alter it and create a new image, layers are created in your Docker container. If you stored and later removed a secret from the image, the secret may still be visible in prior layers. More about Docker layers: https://docs.docker.com/v17.09/engine/userguide/storagedriver/imagesandcontainers/
  • #213 The solar winds attack leveraged a mechanism similar to the Golden SAML attack. Understand how these attacks work and may be leveraged to create new applications with broad permissions on Azure. Understand how users can create resources that have permissions greater than their own. https://medium.com/cloud-security/solarwinds-hack-retrospective-322f03b4eb9b
  • #214 Potentially first serverless malware. Review functionality of malware and emulate on a penetration test. https://thehackernews.com/2022/04/first-malware-targeting-aws-lambda.html Black Hat USA 2017 Hacking Serverless Runtimes Profiling AWS Lambda Azure Functions & More. https://www.youtube.com/watch?v=XywaPe5QV_Q My presentation from RSA - Serverless Attack Vectors - includes successful exploits during penetration tests. https://www.youtube.com/watch?v=d8NDmJR0jOU Cryptominers in the Cloud - hosted in serverless storage, for example - now banned on Azure https://www.slideshare.net/TeriRadichel/crypto-miners-in-the-cloud
  • #215 This section does not cover every possible attack, of course. Dive into how the services the organization you’re performing a penetration test for uses and seek weaknesses in relation to how they are used and configured.
  • #216 Can your incident response team spot an attack? Different types of penetration testers focus on different aspects of cloud security. 2nd Sight Lab is generally loud and noisy during a test, performing broad scans and comprehensive, automated checks that leverage fuzzing to find as many vulnerabilities in the shortest time possible. Another approach would be to perform very stealthy attacks to see if a team can spot the attack. Some teams leverage the fact that the cloud environments fail to log certain types of information so the customer wouldn’t see certain actions in the logs. This isn’t really a test of the team it’s a test of the cloud environment and should be reported to the cloud platform to fix the problem. https://download.microsoft.com/download/C/1/9/C1990DBA-502F-4C2A-848D-392B93D9B9C3/Microsoft_Enterprise_Cloud_Red_Teaming.pdf
  • #217 All the standard pentesting tools for networks, operating systems and applications you already use are probably also applicable in Azure. In addition, you can find many tools in blogs, on Twitter and in GitHub. Just be very careful with code and tools you pull off the Internet! Understand what the tools are doing, and whether they are sending data to a third-party website in any way. Sometimes attacker fuzz lists include attacks that send your test results to another website so someone other than you finds out about a successful exploit! https://github.com/Kyuu-Ji/Awesome-Azure-Pentest https://github.com/XMCyber/XMGoat https://github.com/iknowjason/PurpleCloud https://github.com/nccgroup/azucar https://github.com/hausec/PowerZure https://github.com/NetSPI/MicroBurst https://github.com/dirkjanm/ROADtools https://github.com/Azure/Stormspotter https://github.com/dafthack/MSOLSpray https://github.com/BloodHoundAD/BloodHound Check blogs, bug bounty reports, conference presentations, and research reports for other tactics. Examples: https://www.microsoft.com/security/blog/2022/03/22/dev-0537-criminal-actor-targeting-organizations-for-data-exfiltration-and-destruction/ https://blog.netwrix.com/2021/11/30/what-is-dcsync-an-introduction/ Watch all videos by James Kettle, Burp Security Researcher! Practice Burp Tutorials: https://portswigger.net/burp/documentation/desktop/tutorials
  • #219 Throughout this class we have looked at tools that allow you to automatically obtain data and measure risk in your cloud environment. Leverage these tools to capture data and create reports that help you understand your risk in a cloud environment. What metrics do you think indicate a risk in your environment? Risks to consider: Downtime Ransomware Non-compliance with regulations Data breach Additional expense due to unauthorized resources (cryptominers) System failure and inability to restore from backup Insider threat Attack paths (how many network paths are available in an account?)
  • #220 Determine what indicators, metadata, and events you can track to measure your risk. The nice thing about all these potential risks on Azure is that you can programmatically measure many factors that contribute to this risk. You can derive data from the cloud platform and formulate it into meaningful reports at different levels: Board Executives Security teams Application owners Developers and QA IT and Help Desks Operations teams Leverate automated policies that prevent risk from entering your Azure account in the first place whenever possible. Note that overly-draconian measures usually end up in complete failure and scrapping of all related efforts so be judicious with use of this option. Ensure your methods are completely understood and supported by executives and the people who will be affected in advance of enforcement. Ensure that you track exceptions and their associated risk, which increase over time. Track ownership of exceptions and give them a time-limit for remediation or follow-up review. If an exception exists for eternity, is it really an exception? Some companies gamify security findings to encourage teams to fix issues. You could also tie security issues to bonuses but make sure you assign the risk appropriately. The person who has authority to fix the issue should be responsible - not the security team that was forced to approve the risk due to organizational politics or competing business priorities!
  • #221 Leverage automation to perform continuous assessments in your Azure environment. Track risk over time to see if it is going up or down. Leverage risk tracking to find the most egregious and most potentially damaging actions. Find ways to introduce policies and controls that prevent those actions and reduce the risk. Use auto-remediation where possible but be extra careful when remediation credentials have powerful permissions. Don’t assume your risk measures and controls are working. Get validation using an external penetration test or audit. 2nd Sight Lab has performed penetration tests and assessments on organizations using third-party tools to find vulnerabilities - but the tools were rate limited in such a way that applications still had serious security problems the organization did not know about.
  • #222 Metrics for metrics sake are not helpful. Manipulated weighting (something covered in Cybersecurity for Executives in the Age of Cloud) are not actually helpful. Review and revisit your metric methods periodically. Test them to see if they are finding security risks or unmeasured or inappropriately aligned metrics are not quantifying security incidents properly. Some examples: If your metrics are constantly increasing, then measuring the number of findings will usually always increase. Of course, more potential attacks is never a good thing, but you may want to consider a metric based on percentages in a very large environment. You may have 99% compliance but in that 1% you have exposed data for the most critical asset in your organization. This is not the best metric over time. It may be a good starting point but ultimately you want to know which critical assets have vulnerabilities and how long vulnerabilities have existed. Are you focused on the things that lead to data breaches? An asset inventory, which is at the top of the list for the top CIS controls, is a good thing. However, an overlooked item in your asset inventory doesn’t cause a data breach. If you have egregious known vulnerabilities and misconfigurations - fix those immediately! Then work on the issue of missing or unidentified assets. Are you spending all your time worrying about prioritization of risk when you could be fixing things instead? If there’s an easy problem to fix and prevent going forward, then fix it! You can’t fix everything at once and some of the most risky and high-priority items may be the most complicated to fix in some organizations. Don’t assume low priority vulnerabilities don’t matter. Attackers will chain lower priority vulnerabilities to obtain system access. One vulnerability in and of itself does not cause a problem but chained together they allow for a successful attack. Additionally, the more small risk items accumulate the greater the risk. The converse is also true. As you reduce your risk in small ways over time this cumulative risk reduction will be beneficial!
  • #223 Leverage automation to perform continuous assessments in your Azure environment. Track risk over time to see if it is going up or down. Leverage risk tracking to find the most egregious and most potentially damaging actions. Find ways to introduce policies and controls that prevent those actions and reduce the risk. Use auto-remediation where possible but be extra careful when remediation credentials have powerful permissions. Don’t assume your risk measures and controls are working. Get validation using an external penetration test or audit. 2nd Sight Lab has performed penetration tests and assessments on organizations using third-party tools to find vulnerabilities - but the tools were rate limited in such a way that applications still had serious security problems the organization did not know about.