-
Notifications
You must be signed in to change notification settings - Fork 3.1k
fix(http): interactsh matching with payloads
#6778
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(http): interactsh matching with payloads
#6778
Conversation
in parallel execution. Templates using `payloads` with Interactsh matchers failed to detect OAST interactions because the parallel HTTP execution path (used when `payloads` are present) did not register Interactsh request events, unlike the seq path. This caused incoming interactions to lack associated request context, preventing matchers from running and resulting in missed detections. Fix #5485 by wiring `(*interactsh.Client).RequestEvent` registration into the parallel worker goroutine, make sure both execution paths handle Interactsh correlation equally. Signed-off-by: Dwi Siswanto <[email protected]>
Signed-off-by: Dwi Siswanto <[email protected]>
WalkthroughAdds a new integration test for interactsh with payloads, per-request interactsh handling in parallel HTTP execution, deduplicates processed interactions with a cache, preserves payloads for interactsh-only matches, and changes matched-write gating to a CAS-based check. Changes
Sequence Diagram(s)sequenceDiagram
participant Generator as RequestGenerator
participant Worker
participant HTTP as HTTP Dispatcher
participant Interactsh
participant Matcher as Template/Matcher
participant Results as ResultProcessor
Generator->>Worker: produce requests (meta/payloads, hasInteractMarkers)
Worker->>HTTP: dispatch request
HTTP->>Worker: worker handles response
alt hasInteractMarkers
Worker->>Interactsh: emit RequestEvent (urls, metadata, payloads)
end
Worker->>Matcher: run template / matchers
Matcher-->>Results: produce interim event (includes interimEvent["payloads"])
Results->>Interactsh: process interactions
Interactsh-->>Results: deliver InternalEvent + OperatorsResults
Results->>Results: if OperatorsResults.PayloadValues empty -> copy from InternalEvent["payloads"]
Results->>Results: CAS InteractshMatched false->true => write final result (or reset on failure)
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@pkg/protocols/common/interactsh/interactsh.go`:
- Around line 172-174: The deduplication key currently built in
shouldProcessInteraction uses fullID + ":" + protocol which causes distinct
events with the same ID/protocol to be dropped; update the key construction in
the shouldProcessInteraction method to append a timestamp discriminator from
interaction.Timestamp (e.g., Unix seconds or milliseconds or formatted string)
so the cache key becomes fullID + ":" + protocol + ":" + interaction.Timestamp
(or its numeric representation), preserving the existing duplicate-suppression
logic while allowing separate interactions with different timestamps to be
processed.
f4b78e7 to
8e3dfc9
Compare
Signed-off-by: Dwi Siswanto <[email protected]>
8e3dfc9 to
cf4974f
Compare
|
Do we have a known issue for interactsh in CI? Some related cases seem to be disabled too (and failed for all plats/archs -- tried too), tho this passes locally for me. Marking this ready for review. |
Proposed changes
fix(http): interactsh matching with
payloadsin parallel execution.
Templates using
payloadswith Interactshmatchers failed to detect OAST interactions
because the parallel HTTP execution path (used
when
payloadsare present) did not registerInteractsh request events, unlike the seq path.
This caused incoming interactions to lack
associated request context, preventing matchers
from running and resulting in missed detections.
Fix #5485 by wiring
(*interactsh.Client).RequestEventregistrationinto the parallel worker goroutine, make sure both
execution paths handle Interactsh correlation
equally.
Proof
server.py:
Checklist
Summary by CodeRabbit
Tests
Bug Fixes
Improvements
✏️ Tip: You can customize this high-level summary in your review settings.