Sample
Sample
Sentinel
Planning and implementing
Microsoft’s cloud-native SIEM
solution
Yuri Diogenes
Nicholas DiCola
Jonathan Trull
Microsoft Azure Sentinel
Planning and implementing Microsoft’s cloud-native SIEM solution CREDITS
INDEXER
ISBN-13: 978-0-13-648545-2 Valerie Perry
ISBN-10: 0-13-648545-6
PROOFREADER
Library of Congress Control Number: 2019957613 Vanessa Ta
TECHNICAL EDITOR
ScoutAutomatedPrintCode Maarten Goet
ASSISTANT SPONSORING
TRADEMARKS EDITOR
Microsoft and the trademarks listed at http://www.microsoft.com on the Charvi Arora
“Trademarks” webpage are trademarks of the Microsoft group of companies. EDITORIAL ASSISTANT
All other marks are property of their respective owners. Cindy Teeters
WARNING AND DISCLAIMER COVER DESIGNER
Every effort has been made to make this book as complete and as accurate as Twist Creative, Seattle
possible, but no warranty or fitness is implied. The information provided is on COMPOSITOR
an "as is" basis. The author(s), the publisher, and Microsoft Corporation shall Happenstance Type-O-Rama
have neither liability nor responsibility to any person or entity with respect to
any loss or damages arising from the information contained in this book.
iii
Contents at a Glance
Foreword xii
Introduction xv
v
Contents
Foreword xiii
Introduction xv
Chapter 3 Analytics 33
Why use analytics for security?. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
Understanding analytic rules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Configuring analytic rules 38
Types of analytic rules 44
Creating analytic rules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
Validating analytic rules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
vii
Chapter 4 Incident management 51
Introduction to incident management. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Security incident in Azure Sentinel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52
Managing an incident 54
Investigating an incident. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
Investigation graph 57
Index 179
Contents ix
About the Authors
Yuri Diogenes, MsC
Master of science in cybersecurity intelligence and forensics investigation (UTICA
College), Yuri is Senior Program Manager in Microsoft Cxe Security Team, where he
primarily helps customers onboard and deploy Azure Security Center and Azure
Sentinel. Yuri has been working for Microsoft since 2006 in different positions,
including five years as senior support escalation engineer in CSS Forefront Edge
Team, and from 2011 to 2017 in the content development team, where he also
helped create the Azure Security Center content experience since its launch in 2016.
Yuri has published a total of 22 books, mostly around information security and
Microsoft technologies. Yuri also holds an MBA and many IT/Security industry cer-
tifications, such as CISSP, E|CND, E|CEH, E|CSA, E|CHFI, CompTIA Security+, CySA+,
Cloud Essentials Certified, Mobility+, Network+, CASP, CyberSec First Responder,
MCSE, and MCTS. You can follow Yuri on Twitter at @yuridiogenes.
Nicholas DiCola
Nicholas is a Principal Group PM Manager at Microsoft on the Security Customer
Experience Engineering (CxE) team, where he leads the Azure Security Get-To
Production team that helps customers with deployments of Azure Security prod-
ucts. He has a Master of Business Administration with a concentration in Informa-
tion Systems and various industry certifications such as CISSP and CEH. You can
follow Nicholas on Twitter at @mastersecjedi.
Jonathan Trull
Jonathan is Microsoft's Chief Security Strategist. He provides strategic direction on
the development of Microsoft products and services and leads a team of security,
compliance, and identity advisors who help customers secure their digital transfor-
mation initiatives. Jonathan is a seasoned security executive who formally served
as the CISO for the State of Colorado and several commercial organizations. He is
active in the security community and is helping lead the Cloud Security Alliance's
cloud controls matrix working group and is a coach for Carnegie Mellon Universi-
ty's CISO Executive Program. You can follow Jonathan on Twitter at @jonathantrull
or via LinkedIn at https://www.linkedin.com/in/jonathantrull/.
xi
Foreword
Security is—at its’ core—a big data problem. Businesses and government entities
are producing terabytes of security relevant log data every day and the volumes
continue to increase. This data growth is driven by the digitization of business pro-
cesses and an explosion in the number of intelligent devices being used to power
our physical world. Security teams are charged with making sense of this data and
spotting the signs of an active attack so that they can respond appropriately.
Azure Sentinel was purpose-built to help address the challenges faced by our
customer’s security operations teams. It was engineered as a cloud service to auto-
matically scale to the data volumes thrown at it. This allows security teams to focus
their time on identifying threats as opposed to administering infrastructure. Azure
Sentinel also includes capabilities to automate responses to alerts by triggering
playbooks. Playbooks can also collect and add context to existing alerts to speed
decision making by SOC analysts.
Yuri, Nicholas, and Jonathan have been working with Azure Sentinel from the
beginning of the design and engineering process and have successfully deployed
Azure Sentinel for customers large and small. They lay out the foundational aspects
of architecting and implementing Azure Sentinel, including connecting data
sources; writing custom alerts, workbooks, and playbooks; and using the prod-
uct to proactively hunt for threats. The authors not only cover the full breadth of
product capabilities in the book, but they also offer their practical advice to ensure
successful deployment.
Microsoft is fulfilling a mission to develop a robust portfolio of security, compli-
ance, and identity products to meet the needs of our enterprise customers. The
security, compliance, and identity solutions are fully integrated and leverage
Microsoft’s vast threat-intelligence sources to maximize their effectiveness. Azure
Sentinel will be a cornerstone of the Microsoft portfolio for years to come and has
already been quickly adopted across the globe by customers of all sizes.
Microsoft Azure Sentinel is the authoritative source for implementing Micro-
soft’s hottest new security solution. It was a pleasure to review for Yuri, Nicholas,
and Jonathan. Pick up your copy today!
Ann Johnson
Corporate Vice President
Cybersecurity Solutions Group
xiii
Introduction
Welcome to Azure Sentinel. This book was developed together with the Azure
Sentinel product group to provide in-depth information about Microsoft's new
cloud-based security information and event management (SIEM) system, Azure
Sentinel, and to demonstrate best practices based on real-life experience with the
product in different environments.
The purpose of this book is to introduce the wide array of capabilities avail-
able in Azure Sentinel. After being introduced to the main use case scenarios to
use Azure Sentinel, you will dig in to see how to deploy and operationalize Azure
Sentinel for data collection, analytics, incident management, threat detection, and
response.
MicrosoftPressStore.com/AzureSentinel/errata
If you discover an error that is not already listed, please submit it to us at the
same page.
For additional book support and information, please visit
http://www.MicrosoftPressStore.com/Support.
Please note that product support for Microsoft software and hardware is not
offered through the previous addresses. For help with Microsoft software or hard-
ware, go to http://support.microsoft.com.
Stay in touch
Let’s keep the conversation going! We’re on Twitter: http://twitter.com/MicrosoftPress.
xvi Introduction
Chapter 2
Introduction to
Azure Sentinel
G iven the threat landscape presented in Chapter 1, there is a clear need for a system
that can collect data from different sources, perform data correlation, and present
this data in a single dashboard.
Azure Sentinel delivers intelligent security analytics and threat intelligence across the
enterprise, providing a single solution for alert detection, threat visibility, proactive hunt-
ing, and threat response. Azure Sentinel natively incorporates proven foundation services
from Azure, such as Log Analytics and Logic Apps. Also, Azure Sentinel enriches your
investigation and detection with Artificial Intelligence (AI) in conjunction with Microsoft's
threat intelligence stream.
In this chapter, you will learn more about the architecture, design considerations, and
initial configuration of Azure Sentinel.
Architecture
Because Azure Sentinel is part of Azure, the first prerequisite to deployment is to have
an active Azure subscription. As with any other security information and event manage-
ment (SIEM), Azure Sentinel needs to store the data that it will collect from the different
data sources that you configure. Azure Sentinel will store this data in your preferred Log
Analytics workspace. You can create a new workspace or use an existing one. However, it
is recommended that you have a dedicated workspace for Azure Sentinel because alert
rules and investigations do not work across workspaces. Keep in mind that you need at
least contributor permission for the subscription in which the workspace resides.
TIP All the data you stream to Azure Sentinel is stored in the geographic location
of the workspace you selected.
To help you to better understand Azure Sentinel’s architecture, you need to first
understand the different components of the solution. Figure 2-1 shows a diagram of the
major Azure Sentinel components.
13
Threat Management Configuration
Microsoft and
Dashboards Data Connectors
third-party
Cases Playbooks
Adoption considerations
Although Azure Sentinel is a cloud-based SIEM, there are some initial design considerations
that you must be aware of. When planning Azure Sentinel adoption, use the following list of
questions as the foundation for your initial assessment. This will help you to identify the areas
from which you need to obtain more details before deploying Azure Sentinel:
1. Who has permission to deploy Azure Sentinel in my tenant?
■■ Azure Sentinel uses a Role-Based Access Control model and enables you to set granu-
lar levels of permissions for different needs. There are three built-in roles available for
Azure Sentinel, they are:
■■ Azure Sentinel reader: enable the user to view incidents and data but cannot
make changes.
■■ Azure Sentinel responder: enable the user to read and perform some actions on
incidents, such as assign to another user or change the incident’s severity.
■■ Azure Sentinel contributor: enable the user to read, perform some actions on
incidents and create or delete analytic rules.
To deploy Azure Sentinel on your tenant you need contributor permissions to the sub-
scription in which the Azure Sentinel workspace resides.
Note: All Azure Sentinel built-in roles grant read access to the data in your Azure
Sentinel workspace.
2. What permissions do the team members require to do their jobs using Azure
Sentinel?
■■ It is important to plan who will have access to the Azure Sentinel Dashboard. Depend-
ing on how the organization is structured, you may have different teams handling dif-
ferent areas of Azure Sentinel. For example, the SecOps team might be actively looking
at new alerts, while the Threat Hunting Team might be performing proactive hunting.
Again, leverage the RBAC model to assign granular permissions to different groups.
■■ Consider the different scenarios, such as creating cases, closing cases, creating new
analytics, using hunting queries, and writing playbooks.
NOTE To learn more about workspace design consideration and Role-Base Access
Control (RBAC) for workspaces, visit http://aka.ms/asbook/workspaces and http://aka.ms
/asbook/workspacesbp.
8. When Azure Sentinel launches for the first time, there is no workspace associated to it;
the initial blade will look similar to Figure 2-3.
9. At this point, you can either click the Add button or click the Connect Workspace but-
ton. Both options will lead you to the Choose a workspace to add to azure sentinel
page, as shown in Figure 2-4.
11. In the Log Analytics Workspace field, type a name for the workspace.
12. In the Subscription field, select the subscription that you want to use.
13. From the Resource group drop-down menu, select the resource group you want to use.
14. From the Location drop-down menu, select the location where the workspace will reside.
15. For the Pricing tier, select Per GB.
16. After completing those fields, click the OK button.
17. On the Choose a workspace to add to Azure Sentinel page, select the workspace that
you just created and click the Add Azure Sentinel button; the initial Azure Sentinel
dashboard appears, as shown in Figure 2-6.
Now that you have your workspace configured, you are ready to start ingesting data from
different sources. We’ll cover that in the next section.
Data ingestion
Azure Sentinel enables you to use data connectors to configure connections with different
Microsoft services, partner solutions, and other resources. There are several out-of-the-box
data connectors available in Azure Sentinel, and there are different ways to ingest data when a
connector is not available. Figure 2-7 shows a diagram of the available options.
Others Others
TLS (443)
On-premises or other cloud provider
TIP To learn how to use the HTTP Data Collector API to send log data to a workspace
from a REST API client, visit http://aka.ms/asbook/datacollectorapi.
For example, with just a few clicks, you can connect Sentinel to Office 365,
Azure AD, or Azure WAF and start receiving events immediately and get popu-
lated dashboards in minutes. Now that you are connected, there is no need to
worry about connectivity health. No collector machine can fail or be choked
with an event spike.
You may think that this is true only for collecting from Microsoft sources; how-
ever, Azure Sentinel AWS CloudTrail connector, which is based on serverless
cloud-to-cloud connection, provides the same benefits. Connect in a few clicks
and never worry about a failing VM or event spike.
3. Click in the workspace that was created in the “Enabling Azure Sentinel” section, earlier
in this chapter.
4. When the Azure Sentinel dashboard opens, click Data Connectors under Configura-
tion in the left navigation pane.
5. From the list of connectors, click AzureActivity; the AzureActivity page will appear, as
shown in Figure 2-9.
FIGURE 2-10 Instructions tab with more details about prerequisites and configuration
7. Click the Configure Azure Activity logs option, and the Azure Activity Log page
appears. Click the subscription to which you want to connect and click the Connect
button.
8. Wait until you see a notification indicating the subscription was successfully connected
and click the Refresh button. Ensure that the status has changed to Connected and
close each blade until you see the main Data Connectors page.
9. Click Overview under General in the left navigation pane.
10. On the Overview page, you will see that there is no activity yet; this is expected because
you just initiated the ingestion of Azure Activity Logs. Now you will generate some
activity, and at the end of this chapter, you will check how the data flowed to Azure
Sentinel. Create a new Virtual Machine with the following specifications:
■■ Operating System: Windows Server 2016.
■■ Resource Group: Use the same resource group that you created for the workspace
in the “Enabling Azure Sentinel” section, earlier in this chapter.
■■ Remote Desktop Connection: Enabled.
3. Click in the workspace that was created in the “Enabling Azure Sentinel” section, earlier
in this chapter.
4. When the Azure Sentinel dashboard opens, click Data Connectors under Configura-
tion in the left navigation pane.
5. Click Azure Security Center, and a new pane appears on the right side, as shown in
Figure 2-12.
7. Under the Configuration section, next to the subscription that has the Azure Security
Center standard tier enabled, click Connect.
8. The Connection Status will temporarily appear as Connecting, and once it is finished, it
will appear as Connected.
9. After confirming that it is connected, close the Azure Security Center page, and on the
Data Connectors page, click Refresh; you will see that the Azure Security Center con-
nector status appears as Connected, as shown in Figure 2-14.
10. Click the Overview option in the left pane to return to the main dashboard.
TIP If you want to generate some alerts in Azure Security Center, you can use the set of
instructions available in the Security Center playbooks at http://aka.ms/ascplaybooks.
3. Click the workspace that was created in the “Enabling Azure Sentinel” section, earlier in
this chapter.
4. When the Azure Sentinel dashboard opens, click Data Connectors under Configura-
tion in the left navigation pane.
5. Click Azure Active Directory, and a new pane appears on the right side, as shown in
Figure 2-16.
7. In the Configuration section, you have the option to connect to Azure AD sign-in logs
and audit logs. Ideally, you should connect with both because it provides a broader vis-
ibility of your identity related activities. For this example, click both Connect buttons.
8. Once you finish connecting, both buttons will change to Disconnect.
9. Close this page and click the Overview option in the left pane to return to the main
dashboard.
3. Click the workspace that was created in the “Enabling Azure Sentinel” section, earlier in
this chapter.
4. When the Azure Sentinel dashboard opens, click Data Connectors under Configura-
tion in the left navigation pane.
5. Click Azure Active Directory Identity Protection, and a new pane appears on the
right side, as shown in Figure 2-19.
3. Click in the workspace that was created in the “Enabling Azure Sentinel” section, earlier
in this chapter, and the Azure Sentinel main dashboard appears.
4. Under General, click Logs.
5. On the Logs page, type AzureActivity and click the Run button. You should see all activi-
ties that were performed and collected in the last 24 hours (which is the default time-
frame). The result should look similar to Figure 2-22.
To narrow the search to look only for activities that are related to VM creation (which was
the task you did in the beginning of this chapter), type the query below and click Run.
AzureActivity
| where OperationName contains "Create or Update Virtual Machine"
The results should be similar to Figure 2-24, unless you have done other activities where the
operation name refers to the VM creation or an update to the VM.
To validate the other data sources that were ingested in this chapter, you can use the follow-
ing sample queries:
■■ Azure Active Directory
■■ Query: SigninLogs
■■ Use this query to visualize all Azure AD sign-in logs.
■■ Query: AuditLogs
■■ Use this query to visualize all Azure AD audit logs.
SYMBOLS analysts
“single pane of glass,” 7
+ (Add) operator, KQL, 169 SOC (security operations center), 5
/ (Divide) operator, KQL, 169 analytic rules
-- (Equals) operator, KQL, 169–170 configuring, 38–44
> (Greater) operator, KQL, 169 creating, 45–49
>- (Greater or Equal) operator, KQL, 169–170 types, 44–45
< (Less) operator, KQL, 169 validating, 49–50
<- (Less or Equal) operator, KQL, 169 analytics
% (Modulo) operator, KQL, 169 component, 15
* (Multiply) operator, KQL, 169 justification for usage, 33–34
!- (Not equals) operator, KQL, 169 Analytics dashboard, accessing, 34–37
!in (Not equals to any of the elements) any() function, KQL, 172
operator, KQL, 169 Apache Struts, vulnerability in, 2
− (Subtract) operator, KQL, 169 architecture, Azure Sentinel, 13–15
arg_max() function, KQL, 172
arg_min() function, KQL, 172
A “assume breach” mindset, 2–3
AAD user, Logic Apps, 115 attack timeline with alerts, 61
access control, 15 attrib tool, use with WannaCry, 34
Activity Workbook, 133–137 Audit Logs hunting queries, 70
Add (+) operator, KQL, 169 automation
adversaries, knowledge of, 8 post-incident, 125–130
aggregation reference, KQL (Kusto Query real-time, 110–125
Language), 172 avg() function, KQL, 172
alerts AWS (Amazon Web Services), connecting
and bookmarks, 97 with, 151–157
listing in dashboard, 56–61 AWS CloudTrail hunting queries, 70
179
Azure Active Directory Identity Protection
cases, 14
Community, 15, 45
components, 14
C
connecting to, 88–94 cases, 14
core capabilities, 12 CDF collector, installing, 146–147
dashboards, 14 CDOC (Cyber Defense Operations Center), 6
data collection, 12 CEF (Common Event Format), 20, 160
data connectors, 14 CISOs (Chief Information Security Officers), 1, 7
data ingestion, 19–29 cloud-native SIEM, 11–12, 21
documentation, 11 clustering, finding outliers with, 103–104
enabling, 16–19 coin-mining malware, 4
GitHub repository, 56, 107 Collection, ATT&CK Matrix, 66
hunting, 14 columns, adding and removing in
incidents page, 53 KQL, 172–173
investigation of threats, 12 Command And Control, ATT&CK Matrix, 66
Log Analytics workspace, 15–16 comments, using with incidents, 56
notebooks, 14 Community page, 15, 45
overview, 1 community-based hunting queries, 77–78
Playbooks, 14 comparison operators, KQL (Kusto Query
querying data, 87–94 Language), 169
rapid response, 12 connecting
security incidents, 52–55 with AWS (Amazon Web Services), 151–157
Technical Community blogs, 107 to Azure Sentinel, 88–94
threat detection, 12 with Fortinet, 145–151
with Palo Alto, 158–162
evaluate operator
event timelines, Notebooks, 99–100. See also hunting queries. See also threat hunting
Timeline availability, 70–73
evidence, 14 and bookmarks, 73–78
Excel, exporting data to, 143 community-based, 77–78
Execution, ATT&CK Matrix, 65
Exfiltration, ATT&CK Matrix, 66
Exploration Notebooks, 94 I
exploration queries, 61. See also queries identity protection, 27–29
exporting data to Microsoft Excel, 143 Impact, ATT&CK Matrix, 66
extend, KQL (Kusto Query Language), 173 in (Equals to one of the elements) operator,
KQL, 169
!in (Not equals to any of the elements)
F operator, KQL, 169
finding outliers with clustering, incident management. See also security
Notebooks, 103–104 incidents
forensics analysts, 5 Azure Sentinel, 52–55
Fortinet, connecting with, 145–151 investigation, 56–61
fullouter join, KQL, 175 overview, 51–52
fusion center model, cyberdefense ingesting data, 19–32
operations, 6 Initial Access, ATT&CK Matrix, 65
inner join, KQL, 175
innerunique join, KQL, 175
G int type, KQL, 166
J join, 174–175
joining tables, 173–175
join, KQL (Kusto Query Language), 174–175 learning resources, 177
Jupyter Notebooks. See also Notebooks let statements, 176–177
audiences, 83 limiting data, 168
complexity guidelines, 80–81 numerical operators, 169
data persistence, repeatability, PowerShell, 164–166
backtracking, 81 project and project-away
data processing, 82 statements, 172–173
environments, 83–84 sorting data, 168
interactive display environment, 81–82 SQL, 164
ipywidgets, 98 string operators, 169–170
joining to external data, 82 structure, 163–166
machine learning, 82 summarizing data, 170–172
magic command, 89–90 take operator, 168
overview, 79–84 union, 174
scripting and programming, 81 workspace data, 39–40
use cases, 83 KQL queries
visualization, 82 Palo Alto Networks firewalls, 161–162
Jupyter server options, Azure substituting Python variables in, 93–94
Notebooks, 86–87 Kqlmagic. See also queries
JupyterHub, 87 and QueryProvider, 96
using to query data, 87–94
K
Kassis, Mike, 163 L
Koren, Koby, 110 Lateral Movement, ATT&CK Matrix, 66
KQL (Kusto Query Language) leftanti join, KQL, 175
accessing ingested data, 29–32 leftouter join, KQL, 175
adding and removing columns, 172–173 leftsemi join, KQL, 175
aggregation reference, 172 Less (<) operator, KQL, 169
comparison operators, 169 Less or Equal (<-) operator, KQL, 169
data types, 166–167 let statements, KQL, 176–177
evaluate operator, 175–176 linking/displaying related data sets,
extend, 173 Notebooks, 105
filtering data, 169–170 Log Analytics workspace, 15–16, 157
getting data, 167–168 log data ingestion time, 49
log data
log data, sending to workspaces, 20. See also msticpy query library, Notebooks, 95–97
Azure Activity Log Multiple Data Sources hunting queries, 71
Logic Apps, 109, 111–115, 121 Multiply (*) operator, KQL, 169
logon information, querying, 98–99
long type, KQL, 166
N
NIST (National Institute of Standards and
M Technology), 51
magic command, Jupyter, 89–90 Not equals (!-) operator, KQL, 169
make_bag() function, KQL, 172 Not equals to any of the elements (!in)
make_list() function, KQL, 172 operator, KQL, 169
make_set() function, KQL, 172 Notebooks. See also Jupyter Notebooks
malicious URL STIX object, 9–10 alerts and bookmarks, 97
malware benefits, 107
coin-mining, 4 decoding obfuscated data, 103
Petya and NotPetya, 1–2 diagram, 14
max() function, KQL, 172 event timelines, 99–100
Maxmind GeoLite, 106 finding outliers with clustering, 103–104
M.E.Doc tax accounting software, 2 geomapping IP addresses, 106
Microsoft Excel, exporting data to, 143 hunting and investigation, 94–106
Microsoft IoCs and threat intelligence, 101–102
black box rules, 44 linking/displaying related data sets, 105
Defender Advanced Threat Protection, 3–4 MSTIC (Microsoft Threat Intelligence
Detection and Response Team (DART), 3–5 Center), 95
GitHub repository, 70, 85–86 msticpy query library, 95–97
Security Intelligence Report, 3–5 msticpy query library, 95–97
services, 20 querying process/logon
solutions, 44–45 information, 98–99
vendors/partners’ connectors, 20 suspicious signs in data, 101–103
min() function, KQL, 172 types, 94
Mitre, definition of SOC, 5 NotPetya malware, 1–2
MITRE ATT&CK knowledge base, 34, 65–66 NSG (Network Security Group), 145
ML (machine learning) technique, 103 numerical operators, KQL (Kusto Query
Modulo (%) operator, KQL, 169 Language), 169
MSTIC (Microsoft Threat Intelligence Center),
Notebooks, 95
Rule Templates tab
O protection, automating, 12
Python, 82–83, 92–94
obfuscated data, decoding, 103
Office 365 action, adding for Playbook, 116
Office 365 Activity hunting queries, 71 Q
Office 365, email messages scanned by, 4
queries. See also bookmarks; exploration
Operation WilySupply, 3
queries; KQL (Kusto Query Language);
operational CTI, 8
Kqlmagic
order operator, KQL (Kusto Query
and bookmarks, 67
Language), 168
process and logon information, 98–99
validating data sources, 31–32
P Query Language Reference, 40
querying process/logon information,
Palo Alto Networks firewalls, connecting Notebooks, 98–99
with, 158–162 QueryProvider library, msticpy, 95–96
pandas dataframes, 92, 105
percentiles() function, KQL, 172
permissions, considering, 15 R
Persistence, ATT&CK Matrix, 66
ransomware
Petya ransomware, 1
Petya, 1
phishing, 4
WannaCry, 33–34
pie charts, adding to Workbooks, 139
RBAC (Role-Based Access Control), 15–16
Playbooks
real type, KQL, 166
diagram, 14
real-time automation, 110–125
post-incident automation, 125–128
reference operational model, SOC (Security
real-time automation, 110–125
Operations Center), 9
SOAR (Security Orchestration, Automation
Remediation, incident management, 51–52
and Response), 109–110
remediation analysts, 5
post-incident automation, 125–130
reports. See Workbooks
Power BI, visualizations, 141–142
resources, freeing up, 21
PowerShell and KQL, 164–166
REST API client, 20
Privilege Escalation, ATT&CK Matrix, 66
rightanti join, KQL, 175
process information, querying, 98–99
rightouter join, KQL, 175
procedures. See Playbooks
rightsemi join, KQL, 175
project and project-away statements, KQL
Rule Templates tab, 36
(Kusto Query Language), 172–173
Sample Notebooks
U W
Ukraine, infections in, 1–2 W3C IIS Log hunting queries, 73
union, KQL (Kusto Query Language), 174 WannaCry ransomware, 33–34
URL. See malicious URL STIX object “web shells,” dropping, 3
where operator, KQL (Kusto Query
Language), 169–170
V Wire Data hunting queries, 73
variance() function, KQL, 172 Workbooks
visualizations, Power BI, 141–142 action menu, 136
VM (virtual machine) customizing, 138–140
isolating, 52 editing, 138
Palo Alto Networks firewalls, 159 pie charts, 139
for testing real-time automation, 122–125 templates, 132, 134–135
vulnerabilities, targeting, 2 time charts, 140
using, 131, 133–137
workspace design consideration, 16–18