[BUG] Elevated Group Discovery with PowerView: the test sample windows-xml.log is declared as Sysmon but holds Security events

Đang mở Phù hợp với người mới
#4,418 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
78/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
powershell, yaml
Lĩnh vực
security, testing-qa

Hướng nghiên cứu

Bắt đầu từ khối tests trong detections/endpoint/elevated_group_discovery_with_powerview.yml và so sánh mục attack_data thứ hai với descriptor trong datasets/attack_techniques/T1069.002/AD_discovery/AD_discovery.yml, nơi khai báo windows-xml.log là XmlWinEventLog:Security. Chạy các lệnh grep trong issue trên windows-xml.log để xác nhận tệp chỉ chứa sự kiện Security 5145. Việc hoàn thành khi nguồn của mẫu thứ hai khớp với Security, hoặc mẫu bị xóa vì quy tắc tìm sự kiện 4104 còn tệp không có sự kiện nào. Trước khi chỉnh sửa, hãy kiểm tra xem maintainer ưu tiên phương án nào.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

bug
Describe the bug

In the tests block of detections/endpoint/elevated_group_discovery_with_powerview.yml (id 10d62950-0de5-4199-a710-cff9ea79b413, version 11), the second sample is declared as a Sysmon log. The file holds Security events, and the descriptor in attack_data says so.

tests:
    - name: True Positive Test
      attack_data:
        - data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1069.002/AD_discovery/windows-powershell-xml-powerview.log
          source: XmlWinEventLog:Microsoft-Windows-PowerShell/Operational
          sourcetype: XmlWinEventLog
        - data: https://media.githubusercontent.com/media/splunk/attack_data/master/datasets/attack_techniques/T1069.002/AD_discovery/windows-xml.log
          source: XmlWinEventLog:Microsoft-Windows-Sysmon/Operational
          sourcetype: XmlWinEventLog

The file datasets/attack_techniques/T1069.002/AD_discovery/windows-xml.log holds 8 events. All 8 are Security event 5145 (a network share object was checked), on the Security channel. The file has no mention of the Sysmon provider.

$ grep -o '<Channel>[^<]*</Channel>' windows-xml.log | sort | uniq -c
      8 <Channel>Security</Channel>
$ grep -o '<EventID>[0-9]*</EventID>' windows-xml.log | sort | uniq -c
      8 <EventID>5145</EventID>

The descriptor datasets/attack_techniques/T1069.002/AD_discovery/AD_discovery.yml in attack_data declares the same file as XmlWinEventLog:Security:

- name: windows-xml
  path: /datasets/attack_techniques/T1069.002/AD_discovery/windows-xml.log
  sourcetype: XmlWinEventLog
  source: XmlWinEventLog:Security

The rule itself searches PowerShell script block logging (powershell macro, EventCode=4104, data_source: Powershell Script Block Logging 4104). The first sample, windows-powershell-xml-powerview.log, holds 15 events, all 4104 on Microsoft-Windows-PowerShell/Operational. The second sample holds no event 4104.

Expected behavior

The source of each sample should name the log the file holds. For windows-xml.log that is XmlWinEventLog:Security.

Suggested change: change the source of the second sample to XmlWinEventLog:Security. Or remove the second sample, because the rule searches event 4104 and the file holds none.

Screenshots

None.

App Version:
  • ESCU: 6.10.0 (the tests block is the same in release v6.10.0 and on develop)
  • Splunk Security Essentials: Not applicable
Additional context

None.

Ngôn ngữ chính
Python
Star
1.7k
Fork
507
Merge trung bình
2 ngày 17 giờ
Pull request đã merge (30 ngày)
35

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của splunk/security_content

Tất cả issue của splunk/security_content

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.