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

Add Windows Support For Chrome Cookies #1

Conversation

jrobles-r7
Copy link

@jrobles-r7 jrobles-r7 commented Dec 18, 2018

Add support for retrieving chrome cookies using the post/multi/gather/chrome_cookies module.

I only tested the changes on Windows. Linux and OSX will need to be retested.

Notes for Windows Support

  • --headless did not output the cookies so it is not used. unfortunately this means that a chrome window will pop-up. EDIT: --window-position=0,0 without --headless hid the chrome window during testing
  • --enable-logging was used to have chrome generate chrome_debug.log in the user data directory
  • cmd_exec_get_pid was used for launching chrome, which is only available for meterpreter

Verification

  • ./msfconsole -q
  • Get a meterpreter session on a Windows host
  • use post/multi/gather/chrome_cookies
  • set session <id>
  • exploit
  • Get cookies

@defaultnamehere
Copy link
Owner

Hey, thanks for adding in Windows support @jrobles-r7!
I think we can use --enable-logging cross-platform to get around the cmd_exec stdout thing, good find!
I'll see if I can get it working with --headless, since I think the Chrome window popping up is a bit of a dealbreaker.

@jrobles-r7
Copy link
Author

jrobles-r7 commented Dec 19, 2018

Using --window-position=0,0 without --headless did not show a chrome window (chrome did not appear in the taskbar either). I tested with Chrome v71.0.3578.98 running on Windows 10.

I added the command for killing the chrome process as well.

@jrobles-r7
Copy link
Author

@defaultnamehere any updates on this?

We could add in Windows support later on and focus on OSX and Linux right now. There are a few review comments in your PR on rapid7/metasploit-framework that haven't been addressed.

@defaultnamehere
Copy link
Owner

Hey, I'm happy to merge this in and merge the post module into rapid7/metasploit-framework with Windows support.

Updates on the other PR coming Eventually.

@defaultnamehere defaultnamehere merged commit 33bc2be into defaultnamehere:gather-chrome-cookies-post-module Dec 21, 2018
@jrobles-r7 jrobles-r7 deleted the enhance/windows-chrome-cookies branch December 21, 2018 11:50
@jrobles-r7
Copy link
Author

Thanks! I may add some additional changes to the PR you have open but I'm working on something else at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants