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 Capability? #3

Closed
ChrisTruncer opened this issue Oct 16, 2014 · 13 comments
Closed

Screenshot Capability? #3

ChrisTruncer opened this issue Oct 16, 2014 · 13 comments

Comments

@ChrisTruncer
Copy link
Contributor

So, I have a use case that I would love to use rdpy for (assuming you were cool with it). I write a tool which is designed to take screenshots of web apps (along with other information), and aggregate all of that into a report. This really helps make the information gathering phase of pen tests go easier as we can automate this process.

I'd LOVE to be able to add in the ability to screenshot workstations/servers over RDP. This would also be great information to have for pen tests. I've never really developed with pyqt, so I figured I'd ask you first. Is there any easy way that you could add in the ability to take screenshots of the open window of rdpy? The most likely scenario how I would use this is to either take a screenshot of the login page itself (when not providing a username or password), or to take a screenshot after successfully having logged into the remote system. Is there any way you would be interested in adding a switch, or something that I could invoke which would screenshot the current rdpy screen? I'd really love that ability :)

Thanks again!

@citronneur
Copy link
Owner

I don't understand what you want exactly.
If you want a button or a keyboard shortcut to make screenshot from rdpy-rdpclient, it is very easy. I can do it very quickly.

How do you want to use rdpy? As widget in your pyqt app, as twisted library or as binary?

@ChrisTruncer
Copy link
Contributor Author

Hey there,

I purely want it to be able to take a screenshot of the screen presented when connecting via RDP to a machine. You could have it setup where if --screenshot is presented, it connects in, takes a screenshot of the login prompt, and then disconnects.

Here's an example - http://www.tenable.com/blog/nessus-52-released

Nessus just connects in, and takes a pic of the login screen, then disconnects. Is there anyway you could add in the ability to do the same?

@citronneur
Copy link
Owner

Hi,

I add a new script in bin folder : rdpy-rdpscreenshot.
It seems to do what you want.
rdpy-rdpscreenshot -w width_of_screen -l height_of_screen -o output_path ip[:port].

It save screenshot on server close (very quickly in rdp case). If you want to add a timeout, say me.

If you want to do the same things for VNC, I can.

Say me if i can close issue.

Thanks.

@ChrisTruncer
Copy link
Contributor Author

Hi there,

Thanks for working on this. It looks like it is really close to working, however, the script is taking a picture of a black screen. Attached is what I see.

black screenshot

I tried connecting in manually, and I can confirm that it does work, but when using rdpy-rdpscreenshot it only takes a picture of the black screen.

@citronneur
Copy link
Owner

have you tried with rdpy-rdpclient?
What is your RDP server (windows 7 8 server?).

I change a little code please update the master!!!

@ChrisTruncer
Copy link
Contributor Author

I just tried with rdpy-rdpclient (see the screenshot).

screen shot 2014-10-25 at 7 18 06 pm
WINDOWS 8

I can connect with rdpy-rdpclient, and it can connect, but when I use rdp-rdpyscreenshot it just saves the black screen. This is when I am trying to connect to Windows 8.

screen shot 2014-10-25 at 7 22 18 pm
WINDOWS 8

However, rdpy-rdpscreenshot does work with Windows 7.

screen shot 2014-10-25 at 7 23 36 pm
WINDOWS 7

When I use rdpy-rdpscreenshot with Windows 7, it is successful. When I use rdpy-rdpscreenshot with Windows 8, it only saves a black screenshot.

Thanks again for helping to add this functionality in, I will definitely use it :).

@citronneur
Copy link
Owner

OK. The problem is that windows 8 send a black screen just before close event. I had a timeout (from -t parameter) of inactive updating. I think it's solve the problem. The timeout is set to 2sec in default mode.

Update the master branch.

I solve the linux keyboard issue too!

@ChrisTruncer
Copy link
Contributor Author

This is perfect! It works now. I tested on both Windows 7 and Windows 8 and both work perfectly.

Thanks for adding this feature in, it's exactly what I was hoping to find and it works great.

I'll close this issue now.

@ChrisTruncer
Copy link
Contributor Author

Hi again,

I just tested the rdpscreenshot script on a Windows 8.1 enterprise machine and it is only capturing a black screen (like above). I'll try windows 7 and Windows server, but wanted to report this issue.

I've installed both from pip and from cloning this repo, and the black screen is present from both locations.

@ChrisTruncer ChrisTruncer reopened this Nov 27, 2014
@ChrisTruncer
Copy link
Contributor Author

OK, I did a bit more testing. Everything works perfect on Windows 7, and Windows Server 2012. But for some reason it is giving black screens for Windows 8.1.

Windows 7 (Works) - http://pastebin.com/wDCtJsgq
Windows Server 2012 (Works) - http://pastebin.com/UU7bwbYk
Windows 8.1 (Not Working) - http://pastebin.com/1XMW5Lnr

Hope that can help.

@citronneur
Copy link
Owner

Hi,

I push a commit on dev branch, please try it i think your problem is fixed.

Sylvain

@ChrisTruncer
Copy link
Contributor Author

It looks like I am still having the issue with Windows 8.1. Here is the pastebin - http://pastebin.com/EEpEiCMX

Windows 7 and Windows 2012 still work perfect.

@ChrisTruncer
Copy link
Contributor Author

Actually, I'm wrong, I didn't rebuild everything. I just tested Windows 7, Windows 8.1, and Windows Server 2k12. Everything works perfect.

Thanks for helping with this again!

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

No branches or pull requests

2 participants