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.
Allow NTFS cluster cache size to be specified in VQL. (Velocidex#1042)
Setting VQL scope variable NTFS_CACHE_SIZE will allow the NTFS cluster cache to be this large. This reduces disk IO in favor of higher memory usage. The default cache size is 100 clusters which results in a lot of cache misses on the typical MFT (but only consumes 800kb). Also automatically consume BOM for parse_csv() - the BOM is an aBOMination and often set by Windows software (see https://pkg.go.dev/github.com/spkg/bom)
- Loading branch information
Showing
15 changed files
with
100 additions
and
11 deletions.
There are no files selected for viewing
33 changes: 33 additions & 0 deletions
33
artifacts/definitions/Windows/Detection/EnvironmentVariables.yaml
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
name: Windows.Detection.EnvironmentVariables | ||
description: | | ||
Find processes with the specified environment variables. | ||
parameters: | ||
- name: ProcessNameRegex | ||
default: . | ||
- name: EnvironmentVariableRegex | ||
default: COMSPEC | ||
- name: FilterValueRegex | ||
default: . | ||
- name: WhitelistValueRegex | ||
description: Ignore these values | ||
default: ^C:\\Windows\\.+cmd.exe$ | ||
|
||
sources: | ||
- precondition: | ||
SELECT OS From info() where OS = 'windows' | ||
|
||
query: | | ||
SELECT * FROM foreach( | ||
row={ | ||
SELECT * FROM Artifact.Windows.Forensics.ProcessInfo( | ||
ProcessNameRegex=ProcessNameRegex) | ||
}, | ||
query={ | ||
SELECT Name, ImagePathName, CommandLine, | ||
_key AS Var, _value AS Value | ||
FROM items(item=Env) | ||
}) | ||
WHERE Var =~ EnvironmentVariableRegex | ||
AND Value =~ FilterValueRegex | ||
AND NOT Value =~ WhitelistValueRegex |
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
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
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