-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
Comprehensively refactor Windows reverse_http stagers #4895
Comments
Thanks for adding on "Implement control over User-Agent and other settings" |
This is still alive, just waiting on a PR from @OJ for 64-bit support before I pick up the ball again. |
Definitely me dragging the chain here but I'm close! |
Recap on status; everything is complete, except for:
|
Damn, I thought we'd handled the user-agent stuff in the stagers already, but clearly we haven't. Crap. I had intended to do this while working on the stagers earlier this year. I'm happy to work on pulling this in, and making sure the wiring of |
@OJ Go for it! The big missing piece is stage2 either doing one of the following based on option:
|
The UA stuff still hasn't made it into HTTPS stagers. |
Some IPS/Proxy blocked content when it cannot detect the type of content in responses, so it will be great to add a specific encoder to send the responses with a "content-type" header (for example |
The reverse_http* stagers for Windows are inconsistent and need to be refactored to keep things sane.
In addition to the existing stagers, we have also have two pending PRs that are related: #4716 (reverse hop) and #4608 (winhttp).
In the current model, there is a startup penalty for using Metasm to generate payloads. Additionally, payloads must always return a static size, or it can break exploit matching. These currently make it optimal to create a new stager per feature and to always use static blobs instead of dynamic generation.
Fixing this requires two small changes to the framework:
Implement payload size caching, speeding up framework loads #4894, which removes the startup penalty of dynamic payload generation, and speeds up loading times.Tell payloads and encoders how much space they have to work with #4876, which allows payloads to support optional features depending on how much space is available. In the exploit use case, only those features that can fit within the available size will be available, but when generating external payloads (such as EXEs), those limits go away and the full feature set should be available.Once these two PRs are landed (both backwards-compatible), the refactoring work can start.Prerequisites:
Implement payload size caching, speeding up framework loads #4894(payload size caching)Tell payloads and encoders how much space they have to work with #4876(size-aware payloads and encoders)WinInet rework (Windows/x86):
Refactor x86 Windows reverse_http and reverse_https stagers #4904(refactored reverse_http(s) stagers)PR Adds proxy (with authentication) support to reverse_http(s) #4934WinHTTP implementations (Windows/x86):
HTTP and HTTPS stagers based on WinHttp #4914SSL certificate verification for reverse_winhttps stager #4930Add 64-bit versions of the x86 stagers:
The text was updated successfully, but these errors were encountered: