id: pwpolicy_simple_sequence_disable
title: Prohibit Repeating, Ascending, and Descending Character Sequences
discussion: |
  The macOS _MUST_ be configured to prohibit the use of repeating, ascending, and descending character sequences when a password is created.

  This rule enforces password complexity by requiring users to set passwords that are less vulnerable to malicious users.

  NOTE: To comply with Executive Order 14028, “Improving the Nation's Cybersecurity”, OMB M-22-09, “Moving the U.S. Government Toward Zero Trust Cybersecurity Principles”, and NIST SP-800-63b, “Digital Identity Guidelines: Authentication and Lifecycle Management” federal, military, and intelligence communities must adopt the following configuration settings. Password policies must not require the use of complexity policies such as upper characters, lower characters, or special characters. Password policies must also not require the use of regular rotation. Password policies should define a minimum length. Multifactor authentication should be used where ever possible.

  NOTE: pwpolicy_simple_sequence_disable prevents use of passwords which are regularly found in compromised password lists.
check: |
  /usr/bin/pwpolicy -getaccountpolicies 2> /dev/null | /usr/bin/tail +2 | /usr/bin/xmllint --xpath '//dict/key[text()="policyIdentifier"]/following-sibling::*[1]/text()' - | /usr/bin/grep "allowSimple" -c
result:
  integer: 1
fix: |
  This is implemented by a Configuration Profile.
references:
  cce:
    - CCE-94343-1
  cci:
    - N/A
  800-53r5:
    - IA-5(1)
  800-53r4:
    - IA-5
    - IA-5(1)
  srg:
    - N/A
  disa_stig:
    - N/A
  800-171r3:
    - 03.05.07
  cis:
    benchmark:
      - N/A
    controls v8:
      - 5.2
  cmmc:
    - IA.L2-3.5.7
    - IA.L2-3.5.8
    - IA.L2-3.5.9
macOS:
  - '15.0'
tags:
  - 800-171
  - 800-53r4_low
  - 800-53r4_moderate
  - 800-53r4_high
  - 800-53r5_low
  - 800-53r5_moderate
  - 800-53r5_high
  - cisv8
  - cnssi-1253_low
  - cnssi-1253_high
  - cmmc_lvl2
  - cnssi-1253_moderate
mobileconfig: true
mobileconfig_info:
  com.apple.mobiledevice.passwordpolicy:
    allowSimple: false
ddm_info:
  declarationtype: com.apple.configuration.passcode.settings
  ddm_key: RequireComplexPasscode
  ddm_value: true