將 Nmap 與 Google SecOps 整合

本文說明如何將 Nmap 與 Google Security Operations 整合。

整合版本:1.0

整合參數

Nmap 整合不需要任何參數。

動作

如要進一步瞭解動作,請參閱「 從工作台回覆待處理動作」和「執行手動動作」。

乒乓

使用「Ping」動作測試與 Nmap 的連線。

這項操作不會在 Google SecOps 實體上執行。

動作輸入內容

動作輸出內容

「Ping」動作會提供下列輸出內容:

動作輸出類型 可用性
案件總覽附件 無法使用
案件總覽連結 無法使用
案件訊息牆表格 無法使用
補充資訊表格 無法使用
JSON 結果 無法使用
輸出訊息 可用
指令碼結果 可用
輸出訊息

「Ping」動作可能會傳回下列輸出訊息:

輸出訊息 訊息說明

Successfully connected to the Nmap server with the provided connection parameters!

動作成功。
Failed to connect to the Nmap server! Error is ERROR_REASON

動作失敗。

檢查伺服器的連線、輸入參數或憑證。

指令碼結果

下表列出使用「Ping」動作時,指令碼結果輸出的值:

指令碼結果名稱
is_success TrueFalse

掃描實體

使用「掃描實體」動作,透過 Nmap 掃描 Google SecOps 實體。

這項動作會在下列 Google SecOps 實體上執行:

  • IP Address
  • Hostname
  • Domain

動作輸入內容

「掃描實體」動作需要下列參數:

參數 說明
IP Address

選填。

要掃描的 IP 位址。

這些 IP 位址會與實體一併處理。

Hostname

選填。

要掃描的主機名稱。

這些主機名稱會與實體一併處理。

Options

必填。

指定 Nmap 掃描參數。

預設值為 -sT -sV -p- -T4 -v

這些選項會啟動 TCP 連線掃描 (-sT)、啟用版本偵測 (-sV)、掃描所有 65,535 個通訊埠 (-p-)、使用積極的計時範本 (-T4),以及增加詳細程度 (-v)。

動作輸出內容

「掃描實體」動作會提供下列輸出內容:

動作輸出類型 可用性
案件總覽附件 無法使用
案件總覽連結 無法使用
案件訊息牆表格 無法使用
補充資訊表格 可用
JSON 結果 可用
輸出訊息 可用
指令碼結果 可用
實體擴充資料表

「掃描實體」動作支援下列實體擴充功能:

補充資料欄位 來源 (JSON 金鑰) 邏輯
NMAP_state status_state (如有)
NMAP_related_addresses_{addrtype} 請為每個 addrtype 提供以逗號分隔的 {addr} 值清單。 (如有)
NMAP_related_hostnames hostnames.name (如有)
NMAP_port_{ports.portid}

{ports.state.state} - {ports.service.product}

這個項目會為偵測到的每個通訊埠動態建立欄位,顯示通訊埠的狀態 (例如開啟或關閉) 和執行的服務。

(如有)
NMAP_os_matches {os.osmatches.name}」的 CSV 檔案 (如有)
NMAP_last_boot {uptime.lastboot} (如有)
JSON 結果

以下範例顯示使用「掃描實體」動作時收到的 JSON 結果輸出內容:

[
  {
      "Entity": "50.116.62.192",
      "EntityResult": {
          "status": {
              "state": "up",
              "reason": "syn-ack",
              "reason_ttl": "0"
          },
          "addresses": [
              {
                  "addr": "50.116.62.192",
                  "addrtype": "ipv4"
              }
          ],
          "hostnames": [
              {
                  "name": "k3s-agent1.hegedus.wtf",
                  "type": "PTR"
              }
          ],
          "ports": {
              "extraports": [
                  {
                      "state": "closed",
                      "count": "996",
                      "reasons": [
                          {
                              "reason": "conn-refused",
                              "count": "996"
                          }
                      ]
                  }
              ],
              "ports": [
                  {
                      "protocol": "tcp",
                      "portid": "80",
                      "status": {state.state},
                      "service_name": {service.name},
                      "state": {
                          "state": "open",
                          "reason": "syn-ack",
                          "reason_ttl": "0"
                      },
                      "service": {
                          "name": "http",
                          "servicefp": "SF-Por\r\\n400\\x20Bad\\x20Request\");",
                          "method": "table",
                          "conf": "3"
                      }
                  },
                  {
                      "protocol": "tcp",
                      "portid": "443",
                      "state": {
                          "state": "open",
                          "reason": "syn-ack",
                          "reason_ttl": "0"
                      },
                      "service": {
                          "name": "https",
                          "servicefp": 
"SF-Port443-TCP:V=6.40%I=7%D=5/23%Time=68305D69%P=x86_64-redhat-linux-gnu%r(HTTPOptions,B0,\"HTTP/1\\.0\\x20404\\x20Not\\x20Found\\r\\nContent-Type:\\x20text/plain;\\x20charset=utf-8\\r\\nX-Content-Type-Options:\\x20nosniff\\r\\nDate:\\x20Fri,\\x2023\\x20May\\x202025\\x2011:35:05\\x20GMT\\r\\nContent-Length:\\x2019\\r\\n\\r\\n404\\x20page\\x20not\\x20found\\n\")%r(SSLSessionReq,7,\"\\x15\\x03\\x01\\0\\x02\\x02F\")%r(SSLv23SessionReq,7,\"\\x15\\x03\\x01\\0\\x02\\x02F\")%r(GenericLines,67,\"HTTP/1\\.1\\x20400\\x20Bad\\x20Request\\r\\nContent-Type:\\x20text/plain;\\x20charset=utf-8\\r\\nConnection:\\x20close\\r\\n\\r\\n400\\x20Bad\\x20Request\")%r(GetRequest,B0,\"HTTP/1\\.0\\x20404\\x20Not\\x20Found\\r\\nContent-Type:\\x20text/plain;\\x20charset=utf-8\\r\\nX-Content-Type-Options:\\x20nosniff\\r\\nDate:\\x20Fri,\\x2023\\x20May\\x202025\\x2011:35:16\\x20GMT\\r\\nContent-Length:\\x2019\\r\\n\\r\\n404\\x20page\\x20not\\x20found\\n\")%r(RTSPRequest,67,\"HTTP/1\\.1\\x20400\\x20Bad\\x20Request\\r\\nContent-Type:\\x20text/plain;\\x20charset=utf-8\\r\\nConnection:\\x20close\\r\\n\\r\\n400\\x20Bad\\x20Request\")%r(RPCCheck,7,\"\\x15\\x03\\x01\\0\\x02\\x02F\")%r(Help,67,\"HTTP/1\\.1\\x20400\\x20Bad\\x20Request\\r\\nContent-Type:\\x20text/plain;\\x20charset=utf-8\\r\\nConnection:\\x20close\\r\\n\\r\\n400\\x20Bad\\x20Request\")%r(Kerberos,67,\"HTTP/1\\.1\\x20400\\x20Bad\\x20Request\\r\\nContent-Type:\\x20text/plain;\\x20charset=utf-8\\r\\nConnection:\\x20close\\r\\n\\r\\n400\\x20Bad\\x20Request\")%r(FourOhFourRequest,B0,\"HTTP/1\\.0\\x20404\\x20Not\\x20Found\\r\\nContent-Type:\\x20text/plain;\\x20charset=utf-8\\r\\nX-Content-Type-Options:\\x20nosniff\\r\\nDate:\\x20Fri,\\x2023\\x20May\\x202025\\x2011:35:32\\x20GMT\\r\\nContent-Length:\\x2019\\r\\n\\r\\n404\\x20page\\x20not\\x20found\\n\")%r(LPDString,67,\"HTTP/1\\.1\\x20400\\x20Bad\\x20Request\\r\\nContent-Type:\\x20text/plain;\\x20charset=utf-8\\r\\nConnection:\\x20close\\r\\n\\r\\n400\\x20Bad\\x20Request\")%r(SIPOptions,67,\"HTTP/1\\.1\\x20400\\x20Bad\\x20Request\\r\\nContent-Type:\\x20text/plain;\\x
20charset=utf-8\\r\\nConnection:\\x20close\\r\\n\\r\\n400\\x20Bad\\x20Request\");",
                          "method": "table",
                          "conf": "3"
                      }
                  },
                  {
                      "protocol": "tcp",
                      "portid": "2222",
                      "state": {
                          "state": "open",
                          "reason": "syn-ack",
                          "reason_ttl": "0"
                      },
                      "service": {
                          "name": "ssh",
                          "product": "OpenSSH",
                          "version": "8.4p1 Debian 5",
                          "extrainfo": "protocol 2.0",
                          "ostype": "Linux",
                          "method": "probed",
                          "conf": "10",
                          "cpes": [
                              "cpe:/a:openbsd:openssh:8.4p1",
                              "cpe:/o:linux:linux_kernel"
                          ]
                      }
                  },
                  {
                      "protocol": "tcp",
                      "portid": "9100",
                      "state": {
                          "state": "open",
                          "reason": "syn-ack",
                          "reason_ttl": "0"
                      },
                      "service": {
                          "name": "jetdirect",
                          "method": "table",
                          "conf": "3"
                      }
                  }
              ]
          }
      }
  }
]
輸出訊息

「掃描實體」動作可傳回下列輸出訊息:

輸出訊息 訊息說明

Successfully scanned the following entities using Nmap: entity.identifier

No information was found for the following entities: entity.identifier

No information was found for the provided entities.

動作成功。
Error executing action "Scan Entities". Reason: ERROR_REASON

動作失敗。

檢查伺服器的連線、輸入參數或憑證。

指令碼結果

下表列出使用「掃描實體」動作時,指令碼結果輸出的值:

指令碼結果名稱
is_success TrueFalse

還有其他問題嗎?向社群成員和 Google SecOps 專業人員尋求答案。