用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/CyberStrikeus/CyberStrike --skill cis-apache24-5-7命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | cis-apache24-5.7 |
| description | Ensure HTTP Request Methods Are Restricted |
| category | cis-apache |
| version | 2.3.0 |
| author | cyberstrike-official |
| tags | ["cis","apache","linux","features","content","options"] |
| cis_id | 5.7 |
| cis_benchmark | CIS Apache HTTP Server 2.4 Benchmark v2.3.0 |
| tech_stack | ["linux","apache"] |
| cwe_ids | [] |
| chains_with | [] |
| prerequisites | [] |
| severity_boost | {} |
Use the Apache <LimitExcept> directive to restrict unnecessary HTTP request methods of the web server to only accept and process the GET, HEAD, POST and OPTIONS HTTP request methods.
The HTTP 1.1 protocol supports several request methods which are rarely used and potentially high risk. For example, methods such as PUT and DELETE are rarely used and should be disabled in keeping with the primary security principal of minimize features and options. Also since the usage of these methods is typically to modify resources on the web server, they should be explicitly disallowed. For normal web server operation, you will typically need to allow only the GET, HEAD and POST request methods. This will allow for downloading of web pages and submitting information to web forms. The OPTIONS request method will also be allowed as it used to request which HTTP request methods are allowed. Unfortunately, the Apache <LimitExcept> directive does not deny the TRACE request method. The TRACE request method will be disallowed in another benchmark recommendation with the TraceEnable directive.
Perform the following to determine if the recommended state is implemented:
Locate the Apache configuration files and included configuration files.
Search for all directives other than the OS root directory.
Ensure that either one of the following three methods are configured:
Using the deprecated Order/Deny/Allow method:
Order deny, allow.The section should resemble this example:
<Directory /var/www/html>
# other directives
<LimitExcept GET POST OPTIONS>
Order deny, allow
</LimitExcept>
</Directory>
Using the Require method:
Require all denied.The section should resemble this example:
<Directory /var/www/html>
# other directives
<LimitExcept GET POST OPTIONS>
Require all denied
</LimitExcept>
</Directory>
Using the experimental allow methods_module
methods_module has been loaded by Apache.The section should resemble this example:
<Directory /var/www/html>
# other directives
AllowMethods GET POST OPTIONS
</Directory>
Perform the following to implement the recommended state:
<Directory "/usr/local/apache2/htdocs">. . .</Directory># Limit HTTP methods to standard methods. Note: Does not limit TRACE<LimitExcept GET POST OPTIONS> Require all denied</LimitExcept><Directory "/usr/local/apache2/cgi-bin">. . .# Limit HTTP methods<LimitExcept GET POST OPTIONS> Require all denied</LimitExcept></Directory>or use the experimental AllowMethods module
<Directory "/usr/local/apache2/htdocs">. . .</Directory>LoadModule allowmethods_module modules/mod_allowmethods.so
<Directory /var/www> #other directives AllowMethods GET POST OPTIONS
LoadModule allowmethods_module modules/mod_allowmethods.so
<Directory /var/www> #other directives AllowMethods GET POST OPTIONS
The LimitExcept implementation may not work well for proxy configurations or systems with many locations or directories.
A global rewrite condition can be implemented either by explicitly forbidding REQUEST_METHODs or by rejecting everything but the allowed REQUEST_METHODs
RewriteEngine On RewriteCond %{REQUEST_METHOD} ^(PUT|DELETE|TRACE|OPTIONS|CONNECT)$ [NC] RewriteRule .* - [F]
RewriteCond %{REQUEST_METHOD} ^((?!(GET|POST|OPTIONS)).)$ [NC] RewriteRule . - [F]
No Limits on HTTP methods.
| Controls Version | Control | IG 1 | IG 2 | IG 3 |
|---|---|---|---|---|
| v8 | 12.6 Use of Secure Network Management and Communication Protocols Use secure network management and communication protocols (e.g., 802.1X, Wi-Fi Protected Access 2 (WPA2) Enterprise or greater). | ● | ● | |
| v7 | 9.2 Ensure Only Approved Ports, Protocols and Services Are Running Ensure that only network ports, protocols, and services listening on a system with validated business needs, are running on each system. | ● | ● |