Skip to main content

Weak Passwords - AD Test

Summary

This task utilizes the agnostic script Test-WeakCredentials to test the hashed credentials in Active Directory against a known compromised or weak password list.

Sample Run

Sample Run 1

Sample Run 2

Dependencies

User Parameters

NameExampleAccepted ValuesRequiredDefaultTypeDescription
PWDictSizeSmall'Tiny', 'Small', 'Medium', 'Large'FalseMediumStringThis parameter specifies the password dictionary you wish to query. It is a validated set of 'Tiny', 'Small', 'Medium', 'Large'.
ForceAll'All', 'Text', 'Zipped'FalseStringThis parameter accepts any combination of its validated set. It is a validated set of 'All', 'Text', 'Zipped'.

Task Creation

Create a new Script Editor style script in the system to implement this task.

Create Script

Script Editor

Name: Weak Passwords - AD Test
Description: This task utilizes the agnostic script Test-WeakCredentials to test the hashed credentials in AD against a known compromised or weak password list.
Category: Custom

Category

Parameters

Add a new parameter by clicking the Add Parameter button present at the top-right corner of the screen.

Add Parameter

This screen will appear.

Parameter Screen

  • Set PWDictSize in the Parameter Name field.
  • Select String from the Parameter Type dropdown menu.
  • Toggle Default Value
  • Set Default Value as Medium
  • Click the Save button
  • Save Button
  • It will ask for confirmation to proceed. Click the Confirm button to create the parameter. Confirm

Add another parameter by clicking the Add Parameter button present at the top-right corner of the screen.

Add Another Parameter

  • Set Cleanup in the Parameter Name field.
  • Select String from the Parameter Type dropdown menu.
  • Click the Save button
  • Click the Confirm button to create the parameter. Confirm Another Parameter

Parameters will look like the following:

Parameters

Task

Navigate to the Script Editor section and start by adding a row. You can do this by clicking the Add Row button at the bottom of the script page.

Add Row

A blank function will appear.

Blank Function

Row 1 Function: PowerShell Script

Search and select the PowerShell Script function.

PowerShell Script

The following function will pop up on the screen:

Function Popup

Paste in the following PowerShell script and set the expected time of script execution to 600 seconds. Click the Save button.

PowerShell Script 1

alt text

Row 2: Function: Script Log

alt text
In the script log message, simply type %output% so that the script will send the results of the PowerShell script above to the output on the Automation tab for the target device.
alt text

Row 3: Function: PowerShell Script

Search and select the PowerShell Script function.

PowerShell Script Again

The following function will pop up on the screen:

Function Popup Again

Paste in the following PowerShell script and set the expected time of script execution to 600 seconds. Click the Save button.

PowerShell Script 2

Row 3

Row 4 Logic: If /Then/Else

Row 4 Logic

There will be two sections: If part and Else part.

Row 4 Else

Row 4a Condition: Output Contains

In the IF part, enter password found in the right box of the "Output Contains" part.

Row 4a Condition

Row 4b Function: Set Custom Field

Add a new row by clicking on the Add row button. Set Custom Field 'Weak Password Count' to 'NA'.

Row 4b

Row 4c Function: Set Custom Field

Add a new row by clicking on the Add row button in the ELSE part. Set Custom Field Weak Password Count to %output%.

Row 4c

Row 5: Function: PowerShell Script

Search and select the PowerShell Script function.

Row 5

The following function will pop up on the screen:

Row 5 Popup

Paste in the following PowerShell script and set the expected time of script execution to 600 seconds. Click the Save button.

PowerShell Script 3

Row 5 Result

Row 6 Logic: If /Then/Else

Row 6 Logic

There will be two sections: If part and Else part.

Row 6 Else

Row 6a Condition: Output Contains

In the IF part, enter password found in the right box of the "Output Contains" part.

Row 6a Condition

Row 6b Function: Set Custom Field

Add a new row by clicking on the Add row button. Set Custom Field Duplicate Password Count to NA.

Row 6b

Row 6c Function: Set Custom Field

Add a new row by clicking on the Add row button in the ELSE part. Set Custom Field Duplicate Password Count to %output%.

Row 6c

Completed Task

Completed Task

Implementation

This task has to be scheduled on the CW RMM - Machine Group - Domain Controllers group for auto deployment. The script can also be run manually if required.

Go to Automations > Tasks.
Search for Weak Passwords - AD Test.
Then click on Schedule and provide the parameters details as necessary for the script completion.

Implementation

Output

  • Script Log

Changelog

2025-04-10

  • Initial version of the document