documentation_complete: true

title: 'Use Only Strong MACs'

description: |-
    Limit the MACs to strong hash algorithms.
    The following line in <tt>/etc/ssh/sshd_config</tt> demonstrates use
    of those MACs:
    <pre>MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,hmac-ripemd160</pre>

rationale: |-
    MD5 and 96-bit MAC algorithms are considered weak and have been shown to increase
    exploitability in SSH downgrade attacks. Weak algorithms continue to have a great deal of
    attention as a weak spot that can be exploited with expanded computing power. An
    attacker that breaks the algorithm could take advantage of a MiTM position to decrypt the
    SSH tunnel and capture credentials and information

severity: medium

ocil_clause: 'MACs option is commented out or not using strong hash algorithms'

ocil: |-
    Only strong MACs should be used. To verify that only strong
    MACs are in use, run the following command:
    <pre>$ sudo grep -i macs /etc/ssh/sshd_config</pre>
    The output should contain only those MACs which are strong, namely,
    hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,hmac-ripemd160 hash functions.
