Rule ID
SV-289224r1318571_rule
Version
V1R1
CCIs
If Network Time Protocol is not authenticated, an attacker can introduce a rogue NTP server. This rogue server can then be used to send incorrect time information to network devices, which will make log timestamps inaccurate and affect scheduled actions. NTP authentication is used to prevent this tampering by authenticating the time source.
Verify the NetScaler appliance authenticates NTP sources using authentication that is cryptographically based.
CLI Only Method:
1. Log in to the NetScaler CLI.
2. Run the following command to view the configured NTP servers and verify a Key ID is assigned:
show ntp server
3. Run the following command to verify the synchronization status of the appliance:
show ntp status
4. Run the following command to access the underlying FreeBSD shell:
shell
5. Run the following command to verify the existence and permissions of the NTP keys file:
ls -la /nsconfig/ntp.keys
6. Verify the file exists and the permissions are set to 0600 (the output must display "-rw-------").
7. Run the following command to view the contents of the keys file and verify the cryptographic hash (e.g., SHA256) for the assigned Key ID:
cat /nsconfig/ntp.keys
8. Run the following command to verify the NTP peer associations and authentication status:
ntpq -c associations
9. Verify the output indicates "auth ok" for the NTP peer.
10. Enter the exit command to return to the NetScaler CLI prompt:
exit
If any of the following conditions are true, this is a finding:
- No NTP server is configured, or the configured server does not have a Key ID assigned.
- The ntp.keys file does not exist in /nsconfig/ntp.keys.
- The ntp.keys file is not set to permissions 0600 (i.e., does not display as "-rw-------").
- The keys file does not contain a SHA256 entry for the key ID shown in the "show ntp server" output.
- The "ntpq -c associations" command does not show "auth ok" for the NTP peer.
- The appliance is not synchronized to the NTP source after sufficient time has passed.Configure the NetScaler appliance to authenticate NTP sources using cryptographic authentication. Note: The NTP source must be configured with the identical Key ID and secret. In a High Availability (HA) configuration, this procedure is performed on the primary appliance and is synchronized to the secondary appliance. CLI Only Method: 1. Log in to the NetScaler CLI. 2. Run the following command to access the underlying FreeBSD shell: shell 3. Run the following commands to create the persistent keys file and apply the cryptographic key: cat > /nsconfig/ntp.keys << EOF <key_id> SHA256 <strong_secret_key> EOF 4. Run the following command to set the correct restrictive permissions on the keys file: chmod 0600 /nsconfig/ntp.keys 5. Enter the exit command to return to the NetScaler CLI prompt: exit 6. Run the following command to configure the existing NTP server with the assigned Key ID (use the "add ntp server" command if creating a new server): set ntp server <ntp_server_ip> -key <key_id> 7. Run the following command to enable NTP synchronization: enable ntp sync 8. Run the following command to save the configuration: save ns config