用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/CyberStrikeus/CyberStrike --skill cis-apache24-7-9命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | cis-apache24-7.9 |
| description | Ensure All Web Content is Accessed via HTTPS (Manual) |
| category | cis-apache |
| version | 2.3.0 |
| author | cyberstrike-official |
| tags | ["cis","apache","linux","ssl","tls","https","redirect"] |
| cis_id | 7.9 |
| cis_benchmark | CIS Apache HTTP Server 2.4 Benchmark v2.3.0 |
| tech_stack | ["linux","apache"] |
| cwe_ids | [] |
| chains_with | [] |
| prerequisites | [] |
| severity_boost | {} |
All of the website content should be served via HTTPS rather than HTTP. A redirect from the HTTP website to the HTTPS content is often useful and is recommended, but all significant content should be accessed via HTTPS so that it is authenticated and encrypted.
The usage of clear text HTTP prevents the client browser from authenticating the connection and ensuring the integrity of the website information. Without the HTTPS authentication, a client may be subjected to a variety of man-in-the-middle and spoofing attacks which would cause them to receive modified web content which could harm the organization's reputation. Through DNS attacks or malicious redirects, the client could arrive at a malicious website instead of the intended website. The malicious website could deliver malware, request credentials, or deliver false information.
Perform the following to determine if the recommended state is implemented:
CONF_DIRS needs to be set to the list of directories that contain all of the Apache configuration files.
## Replace the following directory list with the appropriate list.CONF_DIRS="/etc/httpd/conf /etc/httpd/conf.d /etc/httpd/conf.d2 . . ."CONFS=$(find $CONF_DIRS -type f -name '*.conf' )## Search for Listen directives that are not port :443 or httpsIPS=$(egrep -ih '^\s*Listen ' $CONFS | egrep -iv '(:443\b)|https' | cut -d' ' -f2)$CONFS. The resulting list will include all virtual hosts not running on port :443. Although some listed virtual hosts may be TLS enabled, but on a non-standard port. Such websites will return an error rather than HTML content, as shown in the final steps.
## Get host names and ports of all of the virtual hostsVHOSTS=$(egrep -iho '^\s*<VirtualHost .*>' $CONFS | egrep -io '\s+[A-Z:.0-9]+>' | \tr -d ' >' | \)http:// protocol and then a slash as well.
URL=$'for h in $LIPADDR $VHOSTS ; do echo "http://$h/"; done)'## For each of the URL's test with curl, and truncate the output to 300 charactersfor u in $URLS ; do echo -e "\n\n\n=== $u ==="; curl -fSs $u | head -c 300 ; doneAny URLs which return significant HTML document content, rather than a redirect or an error are not compliant. Two compliant examples are shown; the first one has a redirect.
=== http://www.cisecurity.org/ ===
<!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>
<head>
<title>301 Moved Permanently</title>
</head>
<body>
<h1>Moved Permanently</h1>
<p>The document has moved <a href="https://www.cisecurity.org/">here</a>.</p>
</body>
</html>
This compliant example below returns an error, due to using HTTP on a HTTPS website.
=== http://www.example.com:4430/ ===
curl: (22) The requested URL returned error: 400 Bad Request
Perform the following to implement the recommended state:
Move the web content to a TLS enabled website, and add an HTTP Redirect directive to the Apache configuration file to redirect to the TLS enabled website similar to the example shown.
Redirect permanent / https://www.cisecurity.org/
The following are the default values:
TLS is not enabled by default.
v8:
v7: