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.
This is an update for the cmdstager documentation. It adds examples, clearer descriptions, and goes into more depth in the how-to guide and deletes
certutil
from the list of cmdstager flavors that require SRVHOST and SRVPORT.Yes,
certutil
does allow us to fetch a payload from an http server, that's not how we usecertutils
: https://github.com/rapid7/rex-exploitation/blob/c0b3b64d1a8f5b85a5d1bd0660f2a44590dd5f8f/lib/rex/exploitation/cmdstager/certutil.rb#L38With the
certutil
cmdstager, weecho
the payload into a file as a certificate then usecertutil
to decode it; I don't see anywhere that we use certutil to download a payload. I also added that info to thecertutil
description in the how-to docs because I was pretty sure we downloaded the payload usingcertutil
, too.Honestly, when I did a deeper dive a while back, I was pretty shocked most of the non-fetch based cmdstagers just used
echo
. It's there in the code, but I tried to hammer that point home in the docs.