Skip to content

Scripts for extracting detailed information from a host.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE
MIT
LICENSE.MIT
Notifications You must be signed in to change notification settings

org-metaeffekt/metaeffekt-extraction-script

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

metaeffekt-extraction-script

Scripts for extracting detailed information from a host.

The script should only be run in non-production environments, as it collects a significant amount of data and is somewhat heavy computationally.

The script aggregates data in /var/opt/metaeffekt/extraction/analysis.

For aggregating lower-profile inventory data, possibly from production environments, look at the {metæffekt} inventory script.

An illustration of how the script may be integrated

This figure illustrates how the script can be applied in a staged environment.

Linux

Running the script

Optional Arguments:

  • -t <machineTag> : Adds a tag to be stored with the analysis.
    This exists so that a custom Identifier can be set. It should consist only of characters as allowed for base64 encoded strings (alphanumeric plus . and /).
  • -e <pattern> : Exclude the path denoted by the pattern.
    The pattern follows the rules that the command find uses for its -path options (which aren't always intuitive).
    For directories without overly odd characters, however, it works something like this:
    -e "/do/not/traverse/this/directory" -e "/other/patterns*/to/exclude"
    Take care to not include trailing slashes in your exclude paths, as find doesn't cope with it very well.
  • -u <user> : user to drop privileges to.
    This is used with some commands that collect data specific to some users. Notably, this is used to rerun docker images and ps commands to explore user environments and output installed containers. Usernames should follow the unwritten laws of reasonable usernames, most notably not starting with a hyphen.
    Doesn't support multiple users yet. Use this to run analysis on yourself or another important user for which you wish to include data. Currently only supports a single

Windows

The scripts-windows folder contains multiple PowerShell scripts that are all required to run the extraction script on Windows. Only the windows-extractor.ps1 script needs to be executed. The other scripts are called by the main script.

Running the script

.\windows-extractor.ps1 -OutDir result

Optional arguments:

  • -FsScanBaseDir : The base directory for the filesystem scan. This is the directory that will be scanned for files and directories. The default value is (Get-WmiObject Win32_OperatingSystem).SystemDrive or if that fails, C:\.
  • FsScanExcludeDirs : A string consisting of directories split by ;;; to exclude from scanning into during the file system scan: "dir1;;;dir2;;;dir3"

Result processing

The results can be converted into an inventory of software components using the extract-windows-inventory goal of the org.metaeffekt.core : ae-inventory-maven-plugin plugin.

License

About

Scripts for extracting detailed information from a host.

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE
MIT
LICENSE.MIT

Stars

Watchers

Forks