forked from Velocidex/velociraptor
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Artifact collector can now produce a HTML report. (Velocidex#463)
* Artifact collector can now produce a HTML report. Reports are produced by evaluating the templates in each collected artifact's report section. We hook the source() plugin to make sure the results are read from the produced zip file. The reports allow one to add notes and interpretation hints to the collected artifacts. Currently this is only supported in the standalone collector, but we should also provide a GUI feature to allow these reports to be added to a notebook. * Fix test * Fix test * fix test * Added test * Fix test. * . * .
- Loading branch information
Showing
27 changed files
with
845 additions
and
388 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,25 @@ | ||
name: Linux.Mounts | ||
description: List mounted filesystems by reading /proc/mounts | ||
|
||
parameters: | ||
- name: ProcMounts | ||
default: /proc/mounts | ||
|
||
precondition: | | ||
SELECT OS From info() where OS = 'linux' | ||
sources: | ||
- precondition: | | ||
SELECT OS From info() where OS = 'linux' | ||
queries: | ||
- | | ||
SELECT Device, Mount, FSType, split(string=Opts, sep=",") As Options | ||
FROM parse_records_with_regex( | ||
file=ProcMounts, | ||
regex='(?m)^(?P<Device>[^ ]+) (?P<Mount>[^ ]+) (?P<FSType>[^ ]+) '+ | ||
'(?P<Opts>[^ ]+)') | ||
- query: | | ||
SELECT Device, Mount, FSType, split(string=Opts, sep=",") As Options | ||
FROM parse_records_with_regex( | ||
file=ProcMounts, | ||
regex='(?m)^(?P<Device>[^ ]+) (?P<Mount>[^ ]+) (?P<FSType>[^ ]+) '+ | ||
'(?P<Opts>[^ ]+)') | ||
reports: | ||
- type: CLIENT | ||
template: | | ||
# Mounted filesystems | ||
{{ Query "SELECT * FROM source()" | Table }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
Queries: | ||
# Make sure we can collect artifacts with uploads | ||
- SELECT * FROM collect(artifacts='Windows.Search.FileFinder', | ||
report="C:/1.html", | ||
format='csv', | ||
args=dict(SearchFilesGlob='c:/Windows/notepad.exe', Upload_File='Y'), | ||
output='c:/1.zip') | ||
|
||
- SELECT FullPath from glob(globs="file:///c:/1.zip#/*", | ||
- SELECT Size > 10, FullPath FROM glob(globs="C:/1.{zip,html}") | ||
|
||
- SELECT FullPath from glob(globs="file:///c:/1.zip#/**", | ||
accessor='zip') WHERE not IsDir |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,25 @@ | ||
SELECT * FROM collect(artifacts='Windows.Search.FileFinder', args=dict(SearchFilesGlob='c:/Windows/notepad.exe', Upload_File='Y'), output='c:/1.zip')[ | ||
SELECT * FROM collect(artifacts='Windows.Search.FileFinder', report="C:/1.html", format='csv', args=dict(SearchFilesGlob='c:/Windows/notepad.exe', Upload_File='Y'), output='c:/1.zip')[ | ||
{ | ||
"Container": "c:/1.zip" | ||
"Container": "c:/1.zip", | ||
"Report": "C:/1.html" | ||
} | ||
]SELECT FullPath from glob(globs="file:///c:/1.zip#/*", accessor='zip') WHERE not IsDir[ | ||
]SELECT Size > 10, FullPath FROM glob(globs="C:/1.{zip,html}")[ | ||
{ | ||
"Size \u003e 10": false, | ||
"FullPath": "C:\\1.html" | ||
}, | ||
{ | ||
"Size \u003e 10": true, | ||
"FullPath": "C:\\1.zip" | ||
} | ||
]SELECT FullPath from glob(globs="file:///c:/1.zip#/**", accessor='zip') WHERE not IsDir[ | ||
{ | ||
"FullPath": "file:///c:/1.zip#Windows.Search.FileFinder.csv" | ||
}, | ||
{ | ||
"FullPath": "file:///c:/1.zip#Windows.Search.FileFinder.json" | ||
}, | ||
{ | ||
"FullPath": "file:///c:/1.zip#auto/C/Windows/notepad.exe" | ||
} | ||
] |
Oops, something went wrong.