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

Screenshot command for Android is not working with a reverse tcp connection #9112

Closed
mahmoudissam opened this issue Oct 23, 2017 · 6 comments
Assignees

Comments

@mahmoudissam
Copy link

Steps to reproduce

Run the command: "screenshot" on a reverse TCP connection, give you the error:
[-] stdapi_ui_desktop_screenshot: Operation failed: 1

Expected behavior

To capture the screen or save it somewhere.

Current behavior

Gets the error: [-] stdapi_ui_desktop_screenshot: Operation failed: 1

System stuff

Tested on : Android 6.0.1 - Linux 3.10.61-8299335 (armv8l) - Samsung J7 dual sim.

Metasploit version

metasploit v4.16.11-dev

I installed Metasploit with:

Kali package via apt

OS

What OS are you running Metasploit on?
Kali Linux 2017.2

@timwr
Copy link
Contributor

timwr commented Oct 23, 2017

Unfortunately this command only works if you injected into an apk and the APK activity is in the foreground. Let me add a more verbose error to avoid confusion.

@mahmoudissam
Copy link
Author

Thanks timwr, but that works fine on galaxy s8

@Rafik-Belkadi
Copy link

Same problem here :/

@busterb
Copy link
Member

busterb commented Feb 19, 2018

If any of you happened to have 'adb logcat' running, you could look at what the error message is and possibly debug it. 'Operation failed: 1' isn't very helpful.

@timwr
Copy link
Contributor

timwr commented Feb 20, 2018

@ordana the meterpreter> screenshot command on Android is sandboxed and can only capture the apps own framebuffer and the default android meterpreter payload has no UI (so there is no buffer to capture).
I'll fix the error message to say something sensible.

@timwr timwr self-assigned this Feb 20, 2018
timwr added a commit to timwr/metasploit-framework that referenced this issue Feb 20, 2018
timwr added a commit to timwr/metasploit-framework that referenced this issue Feb 20, 2018
@morgensterne
Copy link

Same here.

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

No branches or pull requests

6 participants