Skip to content

Fix honeytrap bugs and pivot to persona/CRS plugin work#44

Open
Divyateja2709 wants to merge 36 commits intoOWASP:masterfrom
Divyateja2709:fixes
Open

Fix honeytrap bugs and pivot to persona/CRS plugin work#44
Divyateja2709 wants to merge 36 commits intoOWASP:masterfrom
Divyateja2709:fixes

Conversation

@Divyateja2709
Copy link
Copy Markdown

Hi @adrianwinckles,
Until now my contributions (PRs 1–6) focused on the CRS auto-update infrastructure — hardening the updater script, fixing the entrypoint, adding tests and CI. After speaking with you on Slack, I understand the priority areas are:

Chameleon personas — mimicking vulnerable app fingerprints, dynamic container swapping via Shodan API
CRS 4.1 plugin architecture — dynamic on-the-fly rule changes with AI-assisted rule writing

My next PRs will focus entirely on these two areas. This PR closes outstanding bugs before that work begins.
Fixes in this PR:

httpd.conf — changed Header always add Set-Cookie to Header always set Set-Cookie to prevent duplicate cookies being sent to clients
docker-compose.yml — made CRS_TARBALL_URL optional (:- default) so the container doesn't fail at startup when CRSUPDATE=false
modsecurity-extension.conf — fixed HONEYTRAP-5 cookie detection chain; moved cookie name into tx.expected_cookie so variable expands reliably inside @rx match across ModSecurity versions; tightened cookie name regex

These fixes make the existing honeytraps deterministic and correct before we build persona switching on top of them.
Next PR will introduce the personas/ directory structure with WordPress and Drupal fingerprints.

Added optional CRS update logic and improved logging for background processes.
Added initial README.md for CRS Auto Update script with planned features and assumptions.
Removed comment about Sidekick code generation.
Added logging and process management for Apache and Filebeat.
Updated the script to enforce SHA256 checksum format and added timeout options for curl and wget commands.
Updated filebeat configuration path to absolute path.
Updated Dockerfile to include TARGETARCH argument and modified file paths.
Added headers to prevent HTTP_PROXY leakage and set authentication headers.
Add a test script to verify the existence of bundled CRS paths and includes in the Docker container.
This script tests the successful update of the CRS within a Docker container, ensuring that the configuration remains valid and usable after the update.
Refactor test script for CRS update to use unique identifiers and validate fixture installation.
This script tests the behavior of the CRS update when the updater is disabled, ensuring that the status reflects 'skipped' and that the bundled CRS files remain intact.
Add a test script to verify fallback behavior during CRS update download failure.
This script tests the fallback behavior of the CRS updater when the SHA256 checksum does not match the expected value. It verifies that the bundled CRS remains unchanged and that the correct status is recorded.
This script tests the behavior of the CRS update process when a lock is held by another instance. It verifies that the update is skipped and the bundled CRS remains intact.
Refactor Docker exec commands for better readability and maintainability. Update status checks to use fixed-string checks for improved reliability.
Refactor CRS update script for better readability and functionality.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant