Using WMI Scripts With BitDefender Client Security
Using WMI Scripts With BitDefender Client Security
Whitepaper
Table of Contents
1. 2. 3. 4. 5. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Key Benefits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Available WMI Script Templates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Operation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 5.1. Gathering Information about Client Workstations . . . . . . . . . . . . . . . . . . . 9 5.2. Application Control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 5.3. Increasing Your Network Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Appendix. Description of WMI Script Templates . . . . . . . . . . . . . . . . . . . . . . . 14
1. Introduction
BitDefender Client Security is a robust and easy-to-use business security and management solution, which delivers superior proactive protection from viruses, spyware, rootkits, spam, phishing and other malware. BitDefender Client Security comprises several features for automated network management to provide maximum value to its customers. One such feature is support for Windows Management Instrumentation (WMI) scripting. WMI is the Microsoft implementation of Web-Based Enterprise Management (WBEM), an initiative to establish standards for accessing and sharing management information in an enterprise network. WMI is WBEM-compliant and provides integrated support for Common Information Model (CIM), the data model describing the objects that exist in a management environment. Basically, WMI allows managing Windows workstations using scripts. WMI scripts can be run only on workstations with WMI services installed. WMI is preinstalled in Windows Vista, Windows Server 2008, Windows Server 2003, Windows XP, Windows Me, and Windows 2000.
More Information
For more details on WMI, please refer to the Windows Management Instrumentation topic on the Microsoft Developer Network (MSDN) website.
Usually, the implementation and deployment of any fully customized automated solution is an extremely challenging and complex process. To avoid the time-consuming task of researching and developing WMI scripts, BitDefender Client Security offers you 40 predefined templates for scripting purposes. BitDefender Client Security enables running WMI scripts on groups of network workstations and provides scheduling capabilities to reduce the administration effort and centralize results. Thus, IT administrators can perform network audit (gathering of hardware and system information from workstations) and administrative actions remotely. Different from other business security solutions that may include third-party software to provide WMI scripting support, BitDefender Client Security directly integrates WMI scripts into its management component, BitDefender Management Server. This results in a lower Total Cost of Ownership and a comprehensive and easy-to-use management solution.
2. Key Benefits
Several important benefits arise from using the WMI scripts implemented in BitDefender Management Server:
Category
Administrative Actions (12 script templates)
Operating System Get system info Get Last SP Installed Enumerate All Startup Programs Enumerate Startup Programs (MSI) List Installed Software (All) List Installed Software (MSI) List Hotfix Current Processes List Services List WMI Settings List startup info List startup menu
Category
Disk and File Systems Information (5 script templates)
List current users List local users List Domain and Workgroup info List logon session info
List CPU Info List MB (motherboard) Settings List Video Info List monitor settings List network adapter values List power management info
You can find a detailed description of each WMI script template in the appendix.
4. Operation
IT administrators create WMI scripts using the dedicated snap-in from the BitDefender Management Console.
WMI Scripts Snap-In The WMI scripts can be run on any WMI-enabled workstation managed by BitDefender Management Server. These are the stages of the script creation and execution process: 1. In the management console, the IT administrator creates a WMI script using the WMI script template appropriate to the task to be performed. In most cases, the script is created immediately, without having to configure any settings. 2. The IT administrator assigns the WMI script to run on specific client workstations or groups of client workstations. The script can be scheduled to run one time only or on a regular basis. 3. During the agent-server communication session, BitDefender Management Server sends the script request to the BitDefender Management Agent installed on the assigned client workstations. 4. BitDefender Management Agent runs the script immediately or as scheduled.
5. After the script is executed, BitDefender Management Agent sends the results to BitDefender Management Server. 6. The IT administrator can check the results in the management console. The diagram below illustrates how WMI scripts operate in BitDefender Client Security.
Operation Diagram
5. Examples
Here are three examples of tasks that can be accomplished using the WMI scripts provided by BitDefender Client Security: Gathering Information about Client Workstations Application Control Making Your Network More Secure
10
Note
Only MSI-installed applications can be removed.
In order to remove an application, the IT administrator must go to the Installed programs tab.
Installed Programs
11
Two tables are displayed here: The left-side table displays all applications installed on the client workstations the script has run on. The right-side table displays all client workstations on which a selected application is installed. It takes a few easy steps to remove an undesired application: 1. Select the application from the list. 2. To remove the application from all the workstations it is installed on, select the check box in the Client name column header. To remove it from specific workstations, only select the corresponding check boxes. 3. Select a restart option. A computer restart may be required to completely remove the selected application. 4. Click Uninstall and then OK to remove the application from the selected computers. A Run program WMI script is automatically created and assigned to the selected computers so that the application is removed. Application removal will require no user intervention. Once the script is executed, the IT administrator can check the results in the Current WMI Scripts pane by double-clicking the script.
Run Program
12
Note
Autorun enables automatic detection and reading of new media connected to the computer. Such media includes USB flash drives, network shares, CDs, DVDs and other. This Windows feature can be used to automatically execute malicious code as soon as an infected medium is connected to the computer.
To help IT administrators counter these network vulnerabilities, BitDefender Client Security provides the following WMI scripts: Enable/Disable Autorun for All Drives - to remotely control autorun for all drives on managed computers.
Enable/Disable USB Mass Storage - to remotely allow or block the use of USB storage devices on managed computers.
IT administrators can run these WMI scripts on all managed computers to completely disable autorun and USB storage devices in the network. Afterwards, these WMI scripts can be run as needed to temporarily enable autorun and USB storage devices on specific managed computers or groups.
13
14
Get system info Provides useful information about client workstations. This includes: operating system information system name, model and manufacturer total RAM memory processor BIOS version Install Windows Updates Helps you identify the Windows updates available for client workstations and install all or specific Windows updates on client workstations. Kill Process Ends a specific process running on client workstations. The Current Processes script can be used to obtain the list of running processes. List CPU Info Provides various information about the processor of client workstations. This includes: processor name and ID description manufacturer clock speed List current users Lists the users currently logged on to client workstations. List Domain and Workgroup info Provides information on the domain or workgroup client workstations are part of. List Hotfix Provides information about the Microsoft and Windows hotfixes installed on client workstations. List Installed Software (All) Provides the list of all software and Microsoft and Windows updates installed on client workstations. An uninstall command line is provided for each application or update installed with the Windows installer. You can remove an application using this command line with a Run Program script. List Installed Software (MSI) Provides the list of software installed on client workstations with the Windows installer. An uninstall command line is provided for each application. You can remove an application using this command line with a Run Program script. List local users Provides information about the local Windows user accounts configured on client workstations.
15
List Logical Disk Info Provides information about the logical disks (floppy drive, hard-disk drives, CD-ROM drive etc) on client workstations. This includes: name (label) description free disk space size List logon session info Provides information regarding the logon session on client workstations. List MB Settings Provides information about the motherboard of client workstations. This includes: name manufacturer serial number List monitor settings Provides information about the monitor of client workstations. This includes: monitor type manufacturer physical dimensions List network adapter values Provides detailed information about the network adapters installed in client workstations. This includes: adapter type manufacturer MAC and network address List power management info Provides power management information about client workstations. List Services Provides various information regarding the services running on client workstations. This includes: service name and display name state (stopped / running) start mode (automatic / manual / disabled) description List startup info Provides information on the startup of client workstations. List startup menu Lists the program shortcuts from the Start menu of client workstations. The entries are grouped by user.
16
List Video Info Provides various information regarding the video display of client workstations. This includes: video adapter name and type graphics memory resolution driver name and version minimum and maximum refresh rates List WMI Settings Provides information about the WMI settings of client workstations. Log off user Logs off the current user logged on to client workstations. Operating System Provides useful information about the operating system running on client workstations. This includes: operating system and version registered user serial number installation time Remote Desktop Connection Changes the Windows settings on client workstations in order to allow or block incoming remote connections through Remote Desktop Connection. Remove Software Removes a specific application installed on client workstations. The script can be used to remove any application that appears in the Add or Remove Programs applet in the Control Panel. Run program Runs a specific application on client workstations. The application can be located on the target workstation or on the local machine (where the BitDefender Management Console is installed). Send message Sends a message to the user logged on client workstations. For Windows 2000 workstations, the script uses the net send command and requires the Messenger service to be started (default setting). For other Windows workstations, the script uses the msg command and requires the Terminal Services service to be started (default setting). Windows Automatic Updating Configures Windows Automatic Updates on client workstations. Windows Automatic Updates helps users keep their operating system up-to-date.
17