Skip to content

Inject shellcode changes#3

Merged
phra merged 3 commits intophra:patch-2from
bwatters-r7:inject_shellcode_changes
Dec 4, 2019
Merged

Inject shellcode changes#3
phra merged 3 commits intophra:patch-2from
bwatters-r7:inject_shellcode_changes

Conversation

@bwatters-r7
Copy link

Here's a thought on getting the shellcode_inject and payload_inject closer together.

  1. Offloaded some shared functionality and some functionality we might want elsewhere to the process mixin.
  2. Stole some of the checks you did in the shellcode_inject and used them in payload_inject
  3. Added some arch checks, I think...
  4. Changed autounhook, channelized, and interactive to false

Copy link
Owner

@phra phra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, i left some comments in the review.

OptBool.new('INTERACTIVE', [true, 'Interact with the process', false]),
OptBool.new('HIDDEN', [true, 'Spawn an hidden process', true]),
OptBool.new('AUTOUNHOOK', [true, 'Auto remove EDRs hooks', true]),
OptBool.new('AUTOUNHOOK', [true, 'Auto remove EDRs hooks', false]),
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI the unhook dll is currently not working.. see rapid7/metasploit-payloads#366 for a potential fix.

do you maybe know the reason of that particular if?

data = proc.channel.read
print_line(data) if data
elsif datastore['CHANNELIZED'] && datastore['PID'] != 0
print_warning("It's not possible to retrieve output when injecting existing processes.")
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@phra phra merged commit e11f64f into phra:patch-2 Dec 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants