Skip to content

Async Mode Windows Meterpreter - #807

Draft
dledda-r7 wants to merge 11 commits into
rapid7:masterfrom
dledda-r7:feat/async-metsrv
Draft

Async Mode Windows Meterpreter#807
dledda-r7 wants to merge 11 commits into
rapid7:masterfrom
dledda-r7:feat/async-metsrv

Conversation

@dledda-r7

Copy link
Copy Markdown
Contributor

dledda-r7 added 11 commits July 18, 2026 06:42
Add async mode request handler with business-hours awareness,
configurable poll interval with jitter, and interruptible sleep
via wake event.
When async mode is enabled, the dispatch loop sleeps for the
configured poll interval on empty responses and skips sleep
after handling commands to drain queued requests. Outside
business hours, the loop pauses with 60s re-checks.
Parse TLV_TYPE_ASYNC_SMART_SYNC in core_async_mode and use it to shorten
the ERROR_EMPTY sleep to a 1s burst interval (no jitter) while activity
is recent, falling back to poll_interval+jitter once the window elapses.
Adds async_touch_activity() and async_in_smart_sync_window() helpers.
Call async_touch_activity() after a successful packet_transmit_http send
and after receiving a non-empty request in server_dispatch_http so the
smart-sync burst window stays armed across chained request/response
cycles.
In async mode, always run commands inline so the response is POSTed
before the next GET poll. This lets the dispatch loop drain queued
requests in a tight poll-execute-respond cycle, which the smart-sync
burst window relies on for chained multi-request commands.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant