用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/CyberStrikeus/CyberStrike --skill cis-ubuntu1804-v220-2-2-16命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | cis-ubuntu1804-v220-2-2-16 |
| description | Ensure mail transfer agent is configured for local-only mode |
| category | cis-networking |
| version | 2.2.0 |
| author | cyberstrike-official |
| tags | ["cis","ubuntu","linux","ubuntu-18.04","services","mta"] |
| cis_id | 2.2.16 |
| cis_benchmark | CIS Ubuntu Linux 18.04 LTS Benchmark v2.2.0 |
| tech_stack | ["ubuntu","linux"] |
| cwe_ids | [] |
| chains_with | [] |
| prerequisites | [] |
| severity_boost | {} |
Mail Transfer Agents (MTA), such as sendmail and Postfix, are used to listen for incoming mail and transfer the messages to the appropriate user or mail server. If the system is not intended to be a mail server, it is recommended that the MTA be configured to only process local mail.
The software for all Mail Transfer Agents is complex and most have a long history of security issues. While it is important to ensure that the system can process local mail messages, it is not necessary to have the MTA's daemon listening on a port unless the server is intended to be a mail server that receives and processes mail from other systems.
Run the following script to verify that the MTA is not listening on any non-loopback address (127.0.0.1 or ::1):
#!/usr/bin/env bash
{
l_output=""
l_output2=""
a_port_list=("25" "465" "587")
# Check if inet_interfaces is not set to all
if [ "$(postconf -n inet_interfaces)" != "inet_interfaces = all" ]; then
for l_port_number in "${a_port_list[@]}"; do
if ss -plntu | grep -P -- ':'"$l_port_number"'\b' | grep -Pvq -- '\h+(127\.0\.0\.1|(?:::1\]?)):'"$l_port_number"'\b'; then
l_output2="$l_output2\n - Port \"$l_port_number\" is listening on a non-loopback network interface"
else
l_output=
l_output2=
a_port_list
[ -z ];
-e
-e
[ -n ] && -e
}
PASS - No ports listening on non-loopback network interfaces.
Edit /etc/postfix/main.cf and add the following line to the RECEIVING MAIL section. If the line already exists, change it to look like the line below:
inet_interfaces = loopback-only
Run the following command to restart postfix:
# systemctl restart postfix
Note: