# WMI specific artifacts.
---
name: WMIAccountUsersDomain
doc: |
  Fill out user AD domain information based on username.

  We expect this artifact to be collected with WindowsRegistryProfiles
  to supply the rest of the user information. This artifact optimizes retrieval
  of user information by limiting the WMI query to users for which we have
  a username for. Specifically this solves the issue that in a domain setting,
  querying for all users via WMI will give you the list of all local and domain
  accounts which means a large data transfer from an Active Directory server.
  This artifact relies on having the users.username field populated in the knowledge
  base. Unfortunately even limiting by username this query can be slow, and
  this artifact runs it for each user present on the system.
sources:
- type: WMI
  attributes: {query: SELECT * FROM Win32_UserAccount WHERE name='%%users.username%%'}
supported_os: [Windows]
urls: ['http://msdn.microsoft.com/en-us/library/windows/desktop/aa394507(v=vs.85).aspx']
---
name: WMIAntivirusProduct
doc: Enumerate the registered antivirus.
sources:
- type: WMI
  attributes: {query: SELECT * FROM AntivirusProduct, base_object: 'winmgmts:\root\SecurityCenter2'}
supported_os: [Windows]
---
name: WMICCMRUA
doc: Enumerate instances of CCM_RecentlyUsedApps.
sources:
- type: WMI
  attributes: {query: SELECT * FROM CCM_RecentlyUsedApps, base_object: 'winmgmts:\root\ccm\SoftwareMeteringAgent'}
supported_os: [Windows]
urls: ['https://forensics.wiki/windows#ccm-recentlyusedapps']
---
name: WMIComputerSystemProduct
doc: Computer System Product including Identifiying number queried from WMI.
sources:
- type: WMI
  attributes: {query: SELECT * FROM Win32_ComputerSystemProduct}
supported_os: [Windows]
urls: ['http://msdn.microsoft.com/en-us/library/aa394105(v=vs.85).aspx']
---
name: WMIDNSClientCache
doc: DNS client cache via Windows Management Instrumentation (WMI).
sources:
- type: WMI
  attributes: {query: SELECT * from MSFT_DNSClientCache, base_object: 'winmgmts:\root\StandardCimv2'}
supported_os: [Windows]
urls: ['https://docs.microsoft.com/en-us/previous-versions/windows/desktop/dnsclientcimprov/msft-dnsclientcache']
---
name: WMIDrivers
doc: Installed drivers via Windows Management Instrumentation (WMI).
sources:
- type: WMI
  attributes: {query: 'SELECT DisplayName, Description, InstallDate, Name, PathName, Status, State, ServiceType from Win32_SystemDriver'}
supported_os: [Windows]
---
name: WMIEnumerateASEC
doc: Enumerate instances of ActiveScriptEventConsumer.
sources:
- type: WMI
  attributes: {query: SELECT * FROM ActiveScriptEventConsumer, base_object: 'winmgmts:\root\subscription'}
supported_os: [Windows]
---
name: WMIEnumerateCLEC
doc: Enumerate instances of CommandLineEventConsumer.
sources:
- type: WMI
  attributes: {query: SELECT * FROM CommandLineEventConsumer, base_object: 'winmgmts:\root\subscription'}
supported_os: [Windows]
---
name: WMIHotFixes
doc: Installed hotfixes via Windows Management Instrumentation (WMI).
sources:
- type: WMI
  attributes: {query: SELECT * from Win32_QuickFixEngineering}
supported_os: [Windows]
---
name: WMIInstalledSoftware
doc: Installed software via Windows Management Instrumentation (WMI).
sources:
- type: WMI
  attributes: {query: 'SELECT Name, Vendor, Description, InstallDate, InstallDate2, Version from Win32_Product'}
supported_os: [Windows]
---
name: WMILastBootupTime
doc: Last system boot time (UTC) retrieved from WMI.
sources:
- type: WMI
  attributes: {query: SELECT LastBootUpTime FROM Win32_OperatingSystem}
supported_os: [Windows]
urls: ['https://msdn.microsoft.com/en-us/library/windows/desktop/aa394239(v=vs.85).aspx']
---
name: WMILogicalDisks
doc: Disk information via Windows Management Instrumentation (WMI).
sources:
- type: WMI
  attributes: {query: SELECT * FROM Win32_LogicalDisk}
supported_os: [Windows]
urls: ['http://msdn.microsoft.com/en-us/library/aa394173(v=vs.85).aspx']
---
name: WMILoggedOnSessions
doc: Logged on users queried from WMI.
sources:
- type: WMI
  attributes: {query: SELECT * FROM Win32_LogonSession}
supported_os: [Windows]
---
name: WMILoggedOnUsers
doc: Logged on users queried from WMI.
sources:
- type: WMI
  attributes: {query: SELECT * FROM Win32_LoggedonUser}
supported_os: [Windows]
---
name: WMILoginUsers
doc: |
  Login Users via Windows Management Instrumentation (WMI).

  This WMI query may take a long time to complete when run on a domain and
  will create load on a domain controller.
sources:
- type: WMI
  attributes: {query: SELECT * from Win32_GroupUser where Name = "login_users"}
supported_os: [Windows]
---
name: WMINetNeighbors
doc: TCP/IP neighbors via Windows Management Instrumentation (WMI).
sources:
- type: WMI
  attributes: {query: SELECT * from MSFT_NetNeighbor, base_object: 'winmgmts:\root\StandardCimv2'}
supported_os: [Windows]
urls: ['https://docs.microsoft.com/en-us/previous-versions/windows/desktop/nettcpipprov/msft-netneighbor']
---
name: WMINetTCPConnections
doc: TCP connections via Windows Management Instrumentation (WMI).
sources:
- type: WMI
  attributes: {query: SELECT * from MSFT_NetTCPConnection, base_object: 'winmgmts:\root\StandardCimv2'}
supported_os: [Windows]
urls: ['https://docs.microsoft.com/en-us/previous-versions/windows/desktop/nettcpipprov/msft-nettcpconnection']
---
name: WMINetUDPEndpoints
doc: UDP endpoints via Windows Management Instrumentation (WMI).
sources:
- type: WMI
  attributes: {query: SELECT * from MSFT_NetUDPEndpoint, base_object: 'winmgmts:\root\StandardCimv2'}
supported_os: [Windows]
urls: ['https://docs.microsoft.com/en-us/previous-versions/windows/desktop/nettcpipprov/msft-netudpendpoint']
---
name: WMIOperatingSystem
doc: Operating system installed on the computer via Windows Management Instrumentation (WMI).
sources:
- type: WMI
  attributes: {query: SELECT * from Win32_OperatingSystem}
supported_os: [Windows]
urls: ['https://docs.microsoft.com/en-us/windows/desktop/cimwin32prov/win32-operatingsystem']
---
name: WMIPhysicalMemory
doc: Physical memory information via Windows Management Instrumentation (WMI).
sources:
- type: WMI
  attributes: {query: SELECT * from Win32_PhysicalMemory}
supported_os: [Windows]
urls: ["http://msdn.microsoft.com/en-us/library/aa394347%28v=vs.85%29.aspx"]
---
name: WMIProcessList
doc: Process listing via Windows Management Instrumentation (WMI).
sources:
- type: WMI
  attributes: {query: SELECT * from Win32_Process}
supported_os: [Windows]
---
name: WMIProfileUsersHomeDir
doc: |
  Get user homedir from Win32_UserProfile based on a known user's SID.

  This artifact relies on having the SID field users.sid populated in the knowledge
  base. We expect it to be collected with WindowsRegistryProfiles to
  supply the rest of the user information.
sources:
- type: WMI
  attributes: {query: SELECT * FROM Win32_UserProfile WHERE SID='%%users.sid%%'}
supported_os: [Windows]
urls: ['http://msdn.microsoft.com/en-us/library/windows/desktop/ee886409(v=vs.85).aspx']
---
name: WMIScheduledTasks
doc: Scheduled tasks that are registered on the computer via Windows Management Instrumentation (WMI).
sources:
- type: WMI
  attributes: {query: SELECT * from MSFT_ScheduledTask, base_object: 'winmgmts:\root\Microsoft\Windows\TaskScheduler'}
supported_os: [Windows]
urls: ['https://wutils.com/wmi/root/microsoft/windows/taskscheduler/msft_scheduledtask/']
---
name: WMIServices
doc: Services queried from WMI.
sources:
- type: WMI
  attributes: {query: SELECT * FROM Win32_Service}
supported_os: [Windows]
---
name: WMIStartupCommands
doc: Commands that run automatically when a user logs onto the computer system via Windows Management Instrumentation (WMI).
sources:
- type: WMI
  attributes: {query: SELECT * from Win32_StartupCommand}
supported_os: [Windows]
urls: ['https://docs.microsoft.com/en-us/windows/desktop/cimwin32prov/win32-startupcommand']
---
name: WMIUsers
doc: |
  Users via Windows Management Instrumentation (WMI).

  Note that in a domain setup, this will probably return all users in the
  domain which will be expensive and slow. Consider limiting by SID like
  WMIProfileUsersHomeDir.
sources:
- type: WMI
  attributes: {query: SELECT * FROM Win32_UserAccount}
supported_os: [Windows]
urls: ['http://msdn.microsoft.com/en-us/library/windows/desktop/aa394507(v=vs.85).aspx']
---
name: WMIVolumeShadowCopies
doc: A List of Volume Shadow Copies from WMI.
sources:
- type: WMI
  attributes: {query: SELECT * FROM Win32_ShadowCopy}
supported_os: [Windows]
