Skip to content

Added Moodle & CAS personas, improved CMS fingerprints, extended Shodan context, and fixed CI issues.#63

Open
Divyateja2709 wants to merge 102 commits intoOWASP:masterfrom
Divyateja2709:improvements
Open

Added Moodle & CAS personas, improved CMS fingerprints, extended Shodan context, and fixed CI issues.#63
Divyateja2709 wants to merge 102 commits intoOWASP:masterfrom
Divyateja2709:improvements

Conversation

@Divyateja2709
Copy link
Copy Markdown

hi @adrianwinckles

This PR improves the honeypot by adding a couple of new personas, making existing ones easier for scanners to fingerprint, and slightly improving how we use Shodan data for persona selection. Everything is still kept lightweight using nginx (no full CMS/LMS setups).

What’s changed
New personas
Added a Moodle persona to simulate a typical university LMS setup. It includes common routes like /login/index.php, /admin/, etc., along with basic headers and metadata to make it look realistic.
Added a CAS / SAML-style persona to mimic campus SSO systems (/cas/login, /idp/... paths).

Both follow the same pattern as existing personas (nginx + static content).

Better fingerprinting for existing personas
WordPress now exposes /readme.html with a version string (5.8.1 style).
Drupal now exposes /CHANGELOG.txt with a Drupal 7-style version line.

These are common probe points used by scanners, so this helps the honeypot look more believable.

Shodan improvements
Extended the context used for persona selection to include:
cloud.provider
cloud.region

So now persona switching can also consider hosting environment, not just geo/org/ASN.

Wiring updates
Added the new personas to:
docker-compose.yml
swap_persona.sh
default rotation in shodan_watcher.py
Metadata
Added persona_manifest.json to document:
which persona maps to which sector
what fingerprints it exposes
example CVEs (for reference)
Tests / CI
Added tests for Moodle and CAS personas
Fixed CI failures caused by pipefail + grep pipelines (exit code 141 issue)

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.
…docker-compose.yml to remove profiles for both, and add script execution in modsec_entry.sh for persona swapping.
- Add nginx-based Moodle 3.9.3 persona (login, admin, lib paths) for sector lure
- Wire persona-moodle into docker-compose and swap_persona rotation
- Extend Shodan context_key with cloud provider/region when present
- Add /readme.html (WordPress) and /CHANGELOG.txt (Drupal) version surfaces
- Add CI test for Moodle persona

Made-with: Cursor
- Introduced specific location blocks in nginx configurations to handle requests for version.php and drupal.js files, enhancing detection of CMS versions.
- Updated persona_manifest with new fingerprint summaries reflecting these changes.
- Enhanced test scripts to verify the presence of version information for each CMS.

This improves the accuracy of the honeypot's fingerprinting capabilities.
- Improved nginx configurations for handling version.php and drupal.js requests, refining CMS version detection.
- Updated persona_manifest with new fingerprint summaries to reflect recent changes.
- Enhanced test scripts to ensure accurate verification of version information across WordPress, Drupal, and Moodle.

These updates bolster the honeypot's fingerprinting accuracy.
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