标签: azure-sentinel

如何使用 Kusto 查询语言打印树?

下面是一个快速而乏味的解决方案。

如果您有更好的,请将其包含在您的答案中。

let tree_height = 15;
range i from -1 to tree_height * 2 step 2
| extend side_width = tree_height + 1 - i / 2
| extend side_space = strrep(" ", side_width)
| extend tree_part = case(i > 0, strcat("/", strrep("*", i), @"\"), " ^ ")
| project ta_da = strcat(side_space, tree_part, side_space)
Run Code Online (Sandbox Code Playgroud)
                 ^                 
                /*\                
               /***\               
              /*****\              
             /*******\             
            /*********\            
           /***********\           
          /*************\          
         /***************\         
        /*****************\        
       /*******************\       
      /*********************\      
     /***********************\     
    /*************************\    
   /***************************\   
  /*****************************\  
Run Code Online (Sandbox Code Playgroud)

如果您需要一些灵感:一棵库斯托圣诞树

kql azure-data-explorer azure-sentinel azure-monitor kusto-explorer

10
推荐指数
2
解决办法
905
查看次数

4
推荐指数
1
解决办法
5720
查看次数

Microsoft Graph 安全 API - https://graph.microsoft.com/beta/security/tiIndicators 的问题

我正在尝试使用基于 Azure 哨兵推荐的将 IOC 摄取的威胁情报源集成到哨兵实例的 Microsoft 图形 API 威胁指标 API。我在 linux curl 中执行以下步骤来测试功能:

使用以下命令从 Microsoft 获取 OAuth 令牌:

curl -X POST -d 'grant_type=client_credentials&client_id=[myClientId]&client_secret=[myAppSecret]&scope=openid profile ThreatIndicators.ReadWrite.OwnedBy' https://login.microsoftonline.com/[myTenantId]/oauth2/token
Run Code Online (Sandbox Code Playgroud)

使用收到的不记名令牌调用以下 API: curl -X GET -H "Authorization: Bearer [access token]" https://graph.microsoft.com/beta/security/tiIndicators

我收到以下提到的错误:

{
  "error": {
    "code": "InvalidAuthenticationToken",
    "message": "Access token validation failure. Invalid audience.",
    "innerError": {
      "request-id": "########################",
      "date": "2019-12-19T07:41:51"
    }
  }
Run Code Online (Sandbox Code Playgroud)

有人知道如何使用它吗?主要动机是使用图形 API POST 查询在 Azure Sentinel 中插入威胁指标

azure azure-security azure-sentinel microsoft-graph-api

2
推荐指数
1
解决办法
4545
查看次数

包含来自另一个查询的数据的 Azure Sentinel Kusto 查询表

我正在尝试找到一种方法来使用 Azure Sentinel 根据安全警报将所有 DNS 结果提取到域中。

在安全警报表下,它们提供事件的域名作为 JSON 的一部分,这是用于提取该数据的表。

SecurityAlert
| where parse_json(ExtendedProperties).AnalyticDescription == "Usage of digital currency mining pool"
| extend DomainName_ = tostring(parse_json(ExtendedProperties).DomainName);
Run Code Online (Sandbox Code Playgroud)

我想做的是获取该查询,然后查询 DnsEvents 表以查找与表 Name 上的域名匹配的所有查询。查询的一个例子是

DnsEvents
| where Name contains "xmr-au1.nanopool.org"
Run Code Online (Sandbox Code Playgroud)

如何执行第二个查询但使用第一个查询中的数据进行过滤?

kql azure-sentinel

1
推荐指数
1
解决办法
235
查看次数

将列表中的部分字符串与字段匹配

我正在尝试使用 Azure 中的日志分析/Sentinel 中的 Kusto 检查字段是否包含列表中的值。

该列表包含顶级域,但我只想匹配这些顶级域的子域。列表值 example.com 应与 forum.example.com 或 api.example.com 等值匹配。

我得到了以下代码,但它仅精确匹配。

let domains = dynamic(["example.com", "amazon.com", "microsoft.com", "google.com"]);
DeviceNetworkEvents
| where RemoteUrl in~ (domains)
| project TimeGenerated, DeviceName, InitiatingProcessAccountUpn, RemoteUrl
Run Code Online (Sandbox Code Playgroud)

我尝试使用endswith,但无法使其与列表一起使用。

azure-log-analytics kql azure-sentinel

0
推荐指数
1
解决办法
4367
查看次数