Repository navigation
Explain decoy hits in plain language on the Detections page - #119
Merged
Merged
Conversation
…/app#443) A new What happened column shows one plain sentence for each tripwire hit, the same words the WordPress digest email uses. The sentence table and golden vectors are generated from WebDecoy/app's pkg/hitexplain; HitExplanation is a PHP port pinned case for case by those vectors. Each tripwire hit now records which trap it was (trap_kind): hidden_link for the honeytoken, fake_plugin for absent-plugin paths, author_lookup and user_list for the enumeration traps, probe_path for the default scanner paths, trap_path otherwise. Rows written before this keep an honest generic sentence.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Companion to WebDecoy/app#1736. Not released: no version bump, no release.sh, no R2 upload.
What changed
sdk/src/HitExplanation.php: PHP port ofpkg/hitexplain.Explain. The sentences are not written here:sdk/src/registry/hit-explanations.generated.phpandhit-explanation-vectors.generated.jsonare generated bygo run ./cmd/export-hit-explanations -php|-goldenin WebDecoy/app.trap_kind:hidden_link(honeytoken),fake_plugin(absent-plugin prefixes, now their own rule),trap_path(xmlrpc.php, custom paths),probe_path(default scanner paths),author_lookup/user_list(enumeration traps). It goes into the local row and the reported violation, so the cloud digest picks the same sentence./__wd/paths, otherwise "a path set up as a trap on your site".Sentences say only what the hit records. They never claim how the visitor found the path or that anything was blocked. Query strings, fragments and control characters never reach a sentence, and the cell is
esc_html'd. Copy is English only: the table is generated, so it is not in the .pot.Tests (
php tests/run.php, 210 passed)From WebDecoy/app,
WEBDECOY_WORDPRESS_PLUGIN=<this checkout> go test ./cmd/export-hit-explanations/proves these generated files match pkg/hitexplain byte for byte.Part of WebDecoy/app#443.