Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Services.yaml #284

Merged
merged 4 commits into from
Mar 23, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update Services.yaml
  • Loading branch information
DfirJos authored Mar 23, 2020
commit fbaa22a7f18dc546378f26757d1b03e23b60f45e
10 changes: 5 additions & 5 deletions artifacts/definitions/Windows/System/Services.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Windows.System.Services
name: Custom.Windows.System.Services
description: |
List all the installed services.

Expand Down Expand Up @@ -29,13 +29,13 @@ sources:
SELECT ServiceDll FROM read_reg_key(globs=servicesKeyGlob + Name + "\\Parameters")
} AS ServiceDll,
parse_string_with_regex(regex=
['^\\"(?P<AbsolutePath>[^"]+)','(?P<AbsolutePath>^[^"]+)[ ][-~/]+','(?P<AbsolutePath>^[^ ]+$)'],
string=PathName) as Parsed
['^\\"(?P<AbsolutePath>[^"]+)','(?P<AbsolutePath>^[^"]+)[ ][-/]+','(?P<AbsolutePath>^[^ ]+$)'],
string=PathName).AbsolutePath as AbsolutePath
FROM wmi(query="SELECT * From Win32_service", namespace="root/CIMV2")
- |
SELECT *, if(condition=(Calculate_Hash = "Y"),
then=hash(path=Parsed.AbsolutePath,
then=hash(path=AbsolutePath,
accessor=file)) AS Hash,
if(condition=(CertificateInfo = "Y"),
then=authenticode(filename=Parsed.AbsolutePath)) AS Certinfo
then=authenticode(filename=AbsolutePath)) AS Certinfo
FROM service