Skip to content
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

Updating screen_spy.rb to have a PID option for session migration #14994

Conversation

archcloudlabs
Copy link
Contributor

@archcloudlabs archcloudlabs commented Apr 2, 2021

What this Does

Windows post module screen_spy currently auto migrates into explorer.exe before beginning to take screenshots of the victim's host machine. This PR adds the ability to specify a different process to migrate into as well as specify no process (empty string) in which case screenshots are taken in the context of the current process and no migration occurs.

Verification

List the steps needed to make sure this thing works

  • Start msfconsole
  • use post/windows/gather/screen_spy
  • specify session (set session 1)
  • (optional) specify process to migrate into (set PROCESS explorer.exe)
  • run

The image below captures running the post module both with and without a process to migrate into.

image

@archcloudlabs archcloudlabs changed the title updating w/ proc option to migrate into and proc check before auto mi… Updating screen_spy.rb to have a process option for session migration Apr 2, 2021
@gwillcox-r7 gwillcox-r7 self-assigned this Apr 9, 2021
modules/post/windows/gather/screen_spy.rb Outdated Show resolved Hide resolved
modules/post/windows/gather/screen_spy.rb Outdated Show resolved Hide resolved
modules/post/windows/gather/screen_spy.rb Outdated Show resolved Hide resolved
@gwillcox-r7
Copy link
Contributor

Doing some documentation updates for the new changes but we will still need to update the output section to showcase the updated output when this module is run.

@gwillcox-r7 gwillcox-r7 force-pushed the updating-screenspy-specify-migration-proc branch from 2721dcc to 54aa9d4 Compare April 12, 2021 18:42
@gwillcox-r7
Copy link
Contributor

Sorry for the delay we ran into a potential issue on our codebase whilst testing this, give me a few seconds to confirm something and then I'll get this landed.

@archcloudlabs
Copy link
Contributor Author

Sorry for the delay we ran into a potential issue on our codebase whilst testing this, give me a few seconds to confirm something and then I'll get this landed.

No problem! Thanks for pushing this across the finish line. My weekend was busier than expected so I didn't get a chance to get the changes in.

@gwillcox-r7
Copy link
Contributor

Sorry for the delay we ran into a potential issue on our codebase whilst testing this, give me a few seconds to confirm something and then I'll get this landed.

No problem! Thanks for pushing this across the finish line. My weekend was busier than expected so I didn't get a chance to get the changes in.

No problem glad I could help :)

@gwillcox-r7
Copy link
Contributor

Alright appears the issue is likely related to some missing checks on some internal code and not related to this module per say. If we need to update this later on we can but considering this is updates to a module and not a new module in and of itself (aka we aren't introducing new code but rather improving it), I'm in favor of landing these updates and then doing further updates in the unlikely case that this module also needs to be updated.

Will land this now.

@gwillcox-r7 gwillcox-r7 changed the title Updating screen_spy.rb to have a process option for session migration Updating screen_spy.rb to have a PID option for session migration Apr 12, 2021
@gwillcox-r7 gwillcox-r7 merged commit e2532ab into rapid7:master Apr 12, 2021
@gwillcox-r7 gwillcox-r7 added the rn-enhancement release notes enhancement label Apr 12, 2021
@gwillcox-r7
Copy link
Contributor

gwillcox-r7 commented Apr 12, 2021

Release Notes

Updated the post/windows/gather/screen_spy module to allow users to specify the PID of a process they would like to migrate into before taking screenshots, rather than forcing users to migrate into an explorer.exe process. If no PID is specified, then the module will default to taking screenshots from the current process.

@archcloudlabs archcloudlabs deleted the updating-screenspy-specify-migration-proc branch April 12, 2021 22:02
@archcloudlabs archcloudlabs restored the updating-screenspy-specify-migration-proc branch April 12, 2021 22:02
@archcloudlabs archcloudlabs deleted the updating-screenspy-specify-migration-proc branch April 12, 2021 22:02
@archcloudlabs archcloudlabs restored the updating-screenspy-specify-migration-proc branch April 12, 2021 22:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants