基于 SOC 职业分类
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/CyberStrikeus/CyberStrike --skill cis-apache24-6-7命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
macOS post-exploitation for credential harvesting, DTrace monitoring, TCC bypass, and stealth operations via native tools
Windows userland post-exploitation for credential harvesting, monitoring, AMSI/ETW bypass, and stealth operations
Kubernetes post-exploitation for container escape, secret extraction, RBAC abuse, and cluster persistence
| name | cis-apache24-6.7 |
| description | Ensure the OWASP ModSecurity Core Rule Set Is Installed and Enabled |
| category | cis-apache |
| version | 2.3.0 |
| author | cyberstrike-official |
| tags | ["cis","apache","linux","logging","monitoring","maintenance","modsecurity"] |
| cis_id | 6.7 |
| cis_benchmark | CIS Apache HTTP Server 2.4 Benchmark v2.3.0 |
| tech_stack | ["linux","apache"] |
| cwe_ids | [] |
| chains_with | [] |
| prerequisites | [] |
| severity_boost | {} |
Level 2
The OWASP ModSecurity Core Rules Set (CRS) is a set of open source web application defensive rules for the ModSecurity web application firewall (WAF). The OWASP ModSecurity CRS provides baseline protections in the following attack/threat categories:
Note: Like other application security/application firewall systems, ModSecurity requires a significant commitment of staff resources for initial tuning of the rules and handling alerts. In some cases, this may require additional time working with application developers/maintainers to modify applications based on analysis of the results of tuning and monitoring logs. After setup, an ongoing commitment of staff is required for monitoring logs and ongoing tuning, especially after upgrades/patches. Without this commitment to tuning and monitoring, installing ModSecurity may NOT be effective and may provide a false sense of security.
Installing, configuring and enabling of the OWASP ModSecurity Core Rule Set (CRS), provides additional baseline security defense, and provides a good starting point to customize the monitoring and blocking of common web application attacks.
For the OWASP ModSecurity CRS version 2.2.9, perform the following to audit the configuration.
In the 2.2.9 release, the OWASP ModSecurity CRS contains 15 base_rule configuration files, each with rule sets. The CRS also contains 14 optional rule sets, and 17 experimental rule sets. Since it is expected that customization and testing will be necessary to implement the CRS, it is not expected that any site will implement all CRS configuration files / rule sets. Therefore, for the purpose of auditing, the OWASP ModSecurity CRS will be considered implemented if 200 or more of the security rules (SecRule) are active in the CRS configuration files. The default 2.2.9 installation contains 227 security rules. Perform the following to determine if 2.2.9 OWASP ModSecurity CRS is enabled:
Set RULE_DIR environment variable to the directory where the active rules are included from the modsecurity configuration file. An example is shown below.
RULE_DIR=$APACHE_PREFIX/modsecurity.d/activated_rules/
Use the following command to count the security rules in all of the active CRS configuration files.
find $APACHE_PREFIX/modsecurity.d/activated_rules/ -name 'modsecurity_crs_*.conf' | xargs grep '^SecRule ' | wc -l
If the number of active rules is 200 or greater, then OWASP ModSecurity CRS is considered active and the audit passed.
For the OWASP ModSecurity CRS version 3.0, perform the following to audit the configuration.
In the 3.0 release, the OWASP ModSecurity CRS contains 29 rule configuration files, each with rule sets. It is expected that customization and testing will be necessary to implement the CRS; it is not expected that any site will implement all CRS configuration files / rule sets. Therefore, for the purpose of auditing, the OWASP ModSecurity CRS v3.0 will be considered implemented if 325 or more of the security rules (SecRule) are active in the CRS configuration files. The default 3.0 installation contains 462 security rules. In addition to the rules, there are three additional values that have to be set. The Inbound and the Outbound Anomaly Threshold and the Paranoia Mode. The Anomaly Threshold values set a limit so that traffic is not blocked until the threshold is exceeded. Any traffic that triggers enough active rules so that the additive value of each rule exceeds the threshold value will be block. The suitable paranoia level has to be defined according the security level of the service in question. The default value of 1 should be applicable for any online service. The Paranoia Level 2 should be chosen for online services with a need for further hardening, (such as online services with a wide attack surface or online services with known security issues and concerns). Paranoia Level 3 and Level 4 cater services with even higher security requirements but have to be considered experimental.
Perform the following to determine if OWASP ModSecurity CRS 3.0 is enabled, and is configured to meet or exceed the expected values:
Set RULE_DIR environment variable to the directory where the active rules are included from the modsecurity configuration file. An example is shown below.
RULE_DIR=$APACHE_PREFIX/modsecurity.d/owasp-modsecurity-crs-3.0.0/
Use the following command to count the security rules in all of the active CRS configuration files.
find $RULE_DIR -name '*.conf' | xargs grep -v '^#\s*' | grep 'SecRule ' | wc -l
If the number of active rules is 325 or greater then OWASP ModSecurity CRS 3.0 is considered active.
The Inbound Anomaly Threshold must be less than or equal to 5, and can be checked with the following command.
find $RULE_DIR -name '*.conf' | xargs egrep -v '^\s*#' | grep 'setvar:tx.inbound_anomaly_score_threshold'
The Outbound Anomaly Threshold must be less than or equal to 4, and may be audited with the following command.
find $RULE_DIR -name '*.conf' | xargs egrep -v '^\s*#' | grep 'setvar:tx.outbound_anomaly_score_threshold'
The Paranoia Level must be greater than or equal to 1, and may be audited with the following command.
find $RULE_DIR -name '*.conf' | xargs egrep -v '^\s*#' | grep 'setvar:tx.paranoia_level'
Install, configure and test the OWASP ModSecurity Core Rule Set:
Download the OWASP ModSecurity CRS from the project page https://www.owasp.org/index.php/Category:OWASP_ModSecurity_Core_Rule_Set_Project
Unbundled the archive and follow the instructions in the INSTALL file.
Depending on the CRS version used, the crs-setup.conf or the modsecurity_crs_10_setup.conf file will be required, and rules in the base_rules directory are intended as a baseline useful for most applications.
Test the application for correct functionality after installing the CRS. Check web server error logs and the modsec_audit.log file for blocked requests due to false positives.
It is also recommended to test the application response to malicious traffic such as an automated web application scanner to ensure the rules are active. The web server error log and modsec_audit.log files should show logs of the attacks and the servers response codes.
The OWASP ModSecurity CRS is NOT installed or enabled by default.
CRS v3.0 Default Values:
v8:
v7: