用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/CyberStrikeus/CyberStrike --skill cis-ubuntu2004-v300-2-3-2-1命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | cis-ubuntu2004-v300-2-3-2-1 |
| description | Ensure systemd-timesyncd configured with authorized timeserver |
| category | cis-networking |
| version | 3.0.0 |
| author | cyberstrike-official |
| tags | ["cis","ubuntu","linux","ubuntu-20.04","time-sync","systemd-timesyncd"] |
| cis_id | 2.3.2.1 |
| cis_benchmark | CIS Ubuntu Linux 20.04 LTS Benchmark v3.0.0 |
| tech_stack | ["ubuntu","linux"] |
| cwe_ids | [] |
| chains_with | [] |
| prerequisites | [] |
| severity_boost | {} |
NTP=
FallbackNTP=
Time synchronization is important to support time sensitive security mechanisms and to ensure log files have consistent time records across the enterprise to aid in forensic investigations
Run the following command to verify the NTP and/or FallbackNTP option is set to local site approved authoritative time server(s):
#!/usr/bin/env bash
{
l_output="" l_output2="" a_out=() a_out2=() l_ntp_valid="" l_fbkntp_valid="" l_parlist="(NTP|FallbackNTP)" l_systemd_config_file="/etc/systemd/timesyncd.conf"
l_analyze_cmd="$(readlink -f /bin/systemd-analyze)" l_systemd_config_file="/etc/systemd/timesyncd.conf"
while IFS= read -r l_conf_loc; do
l_used_parameter_setting=""
while IFS= read -r l_file_name l_file_parameter; do
l_used_parameter_setting=""
l_used_parameter_setting= | -n 1)$(find /etc/systemd/ /run/systemd/ /usr/local/lib/systemd/ /usr/lib/systemd/ \( - f -o - l \) -name -print0 | xargs -0 -r grep -Pil -- ) - Parameter: \"\" is to: \"// /}\"\n correctly to: \"// /}\"\n the file: \"\" - Parameter: \"\" is not an included file \ *** Note: \"\" May be a file that%s\n(%s* - Parameter: \"\" is not file \"\"%s\n%s\n%s\n
Note: Please ensure the output for NTP and/or FallbackNTP is in accordance with local site policy. The timeservers in the example output are provided as an example of possible timeservers and they may not follow local site policy.
Set NTP and/or FallbackNPT parameters to local site approved authoritative time server(s) in /etc/systemd/timesyncd.conf or a file ending in .conf ending in .conf in the [Time] section:
Example file:
[Time]
NTP=time.nist.gov # Uses the generic name for NIST's time servers
FallbackNTP=nist1-nj2.ustiming.org time-c-g.nist.gov time-d-g.nist.gov time-e-g.nist.gov # Space separated list of NIST time servers
Example script to create systemd drop-in configuration file:
#!/usr/bin/env bash
{
[ ! -d /etc/systemd/timesyncd.conf.d ] && mkdir /etc/systemd/timesyncd.conf.d/
l_tsfile="$(find /etc/systemd/ -type f -name '*.conf' -path '*timesyncd.conf.d/*' | awk -F/ '(NF{print$NF;exit})'")"
if grep -Psq -- '^\h*\[Time\]' /etc/systemd/timesyncd.conf; then
printf '%s\n' 's&\n' "$[a_settings[8]]" >> /etc/systemd/timesyncd.conf.d/60-timesyncd.conf
else
printf '%s\n' "" "[Time]" "${a_settings[@]}" >> /etc/systemd/timesyncd.conf.d/60-timesyncd.conf
fi
}
Note: If this setting appears in a canonically later file, or later in the same file, the setting will be overwritten
Run to following command to update the parameters in the service:
# systemctl reload-or-restart systemd-timesyncd
#NTP=
#FallbackNTP=
| Controls Version | Control | IG 1 | IG 2 | IG 3 |
|---|---|---|---|---|
| v8 | 8.4 Standardize Time Synchronization Standardize time synchronization. Configure at least two synchronized time sources across enterprise assets, where supported. | ● | ● | |
| v7 | 6.1 Utilize Three Synchronized Time Sources Use at least three synchronized time sources from which all servers and network devices retrieve time information on a regular basis so that timestamps in logs are consistent. | ● | ● |
| Techniques / Sub-techniques | Tactics | Mitigations |
|---|---|---|
| T1070, T1070.002, T1562, T1562.001 | TA0002 | M1022 |