Introduction Since most of the pieces in the malwares or pentesting frameworks has the ability to tak screenshots against targets system. This can help us to capture images ,video frames or other sensitive data we might not be able to see with the packet captures or keyloggers. Lets walkthrough the code and learn how we can build screenshot capturing script from scratch using python You can also checkout other hacking scripts in this page
hacking scripts Code is explained for how we can capture the screenshot ,and merge it in the command and control trojan ##Required Libraries First we acquire a handle to the entire desktop which include the entire viewable area across multiple monitors grab handle to the main desktop window we then determine the size of the size of the screen so that we know the dimensions required for the screenshots determine the size of all monitors in pixels create a device context we create a device context using GetWindowDC function call and pass in handle to our desktop create a memory based device context now we create a memory-based device context where we will store our image capture until we store the bbitmap bytes to a file. create a bitmap object we then create bitmap object that is set to the device context of our desktop The select object call then sets the memory-based device context to point at the bitmap thet we're capturing copy the screen into our memory device context we use BitBlt function to take a bit-for-bit copy of the dekstop image and store it in the memory based contest. Save the bitmap to a file ,the final step is to dump the shot and then free our objects check the whole code in this repo :
Screenshot_with_python
Checkout some more hacking scripts