Generic Windows plugin.
- class dissect.target.plugins.os.windows.generic.GenericPlugin(target: dissect.target.Target)#
Generic Windows plugin.
Provides some plugins that don’t fit in a separate plugin.
- check_compatible() None #
Perform a compatibility check with the target.
This function should return
Noneif the plugin is compatible with the current target (
self.target). For example, check if a certain file exists. Otherwise it should raise an
UnsupportedPluginError – If the plugin could not be loaded.
Return the Windows NT version.
Return the content of the Windows PATH environment variable.
PATH is an environment variable on an operating system that specifies a set of directories where executable programs are located. Adversaries may add the directories in which they have stored their (malicious) binaries.
Return the domain name.
Corporate Windows systems are usually connected to a domain (active directory).
- activity() datetime.datetime | None #
Return last seen activity based on filesystem timestamps.
- install_date() datetime.datetime | None #
Returns the install date of the system.
The value of the registry key is stored as a Unix epoch timestamp.
Return all available Application Initial (AppInit) DLLs registry key values.
AppInit_DLLs is a mechanism that allows an arbitrary list of DLLs to be loaded into each user mode process on the system. It can be used as a persistence mechanism and/or elevate privileges by executing malicious content triggered by AppInit DLLs loaded into processes. DLLs that are specified in the AppInit_DLLs value in the Registry keys HKEY_LOCAL_MACHINESoftwareMicrosoftWindows NTCurrentVersionWindows or HKEY_LOCAL_MACHINESoftwareWow6432NodeMicrosoftWindows NTCurrentVersionWindows are loaded by user32.dll into every process that loads user32.dll.
Return all available KnownDLLs registry key values.
The KnownDLLs registry key values are used to cache frequently used system DLLs. Initially, it was added to accelerate application loading, but also it can be considered as a security mechanism, as it prevents malware from putting Trojan versions of system DLLs to the application folders (as all main DLLs belong to KnownDLLs, the version from the application folder will be ignored). However, these registry keys can still be leveraged to perform DLL injection.
Return interesting Session Manager (Smss.exe) registry key entries.
Session Manager (Smss.exe) is the first user-mode process started by the kernel and performs several tasks, such as creating environment variables, starts the Windows Logon Manager (winlogon.exe), etc. The BootExecute registry key holds the Windows tasks that cannot be performed when Windows is running, the Execute registry key should never be populated when Windows is installed. Can be leveraged as persistence mechanisms.
Return the NullSessionPipes registry key value.
The NullSessionPipes registry key value specifies server pipes and shared folders that are excluded from the policy that does not allow null session access. A null session implies that access to a network resource, most commonly the IPC$ “Windows Named Pipe” share, was granted without authentication. Also known as anonymous or guest access. These can thus be accessed without authentication and can be leveraged for latteral movement and/or privilege escalation.
Return network registry key entries.
Return all available Command Processor (cmd.exe) AutoRun registry key values.
The Command Processor AutoRun registry key values contain commands that are run each time the Command Processor (cmd.exe) is started. Since these commands are not shown to the user in the Command Processor, it can be exploited by an adversary to hide malicious commands or leverage as a persistence mechanism
Return the AlternateShell registry key value.
The AlternateShell registry key, HKEY_LOCAL_MACHINESystemCurrentControlSetControlSafeboot, specifies the shell that is used when a Windows system is started in “Safe Mode with Command Prompt”. Can be leveraged as a persistence mechanism.
Return the BootShell registry key entry.
Usually contains a path to bootim.exe which is Windows’s recovery menu. This registry key can be used as a persistence mechanism.
Return all pending file rename operations.
The PendingFileRenameOperations registry key value contains information about files that will be renamed on reboot. Can be used to hunt for malicious binaries.
Return all available WinRAR history registry key values.
Return available protocols stored in the Winsock catalog database.
- codepage() str | None #
Returns the current active codepage on the system.