Async Mode Windows Meterpreter - #807
Draft
dledda-r7 wants to merge 11 commits into
Draft
Conversation
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.
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.
Framework: rapid7/metasploit-framework#21685