Jump to content

Desktop Hardening


Recommended Posts

Hi All!

I'm finding ways to Hardening windows desktop..

My First approach to restrict screen capturing through Active Directory.

Have tried many ways but was unable to find a solution.

Luckily found AutoIt and created an exe that capture key events and clear the clipboard.

Thanking to AutoIt team...!

But still have a problem due to the platform dependency due to various OS versions.

Have any one gone through similar problem? or any one can help me on this.

Found that VBScript can be run through Active directory but still didn't get a proper notes regarding VB script key press events.

The EXE file and AU3 file I've created is attached below

Code is:

#cs ----------------------------------------------------------------------------

AutoIt Version: 3.3.6.1

Author: Sasanka Fernando

Date: 2011.03.09

Script Function: Testing To restrict screen capture

Template AutoIt script.

#ce ----------------------------------------------------------------------------

#include <Misc.au3> ; to use the extra functionalities

$dll = DllOpen("user32.dll") ;take this dll to use the user level active windows

While 1 ; non end will that keep the endless loop

Sleep ( 100 ) ; sleep 0.1 seconds to delay and stop the CPU cicle for a while

If _IsPressed("02", $dll) Then ; Track the Right mouse button to stop the past option

DisablePrintScreen() ; Calling for Clip Board Clear function

ElseIf _IsPressed("2C", $dll) Then ; Track the PRINT SCREEN key to stop the screen capture facility

DisablePrintScreen()

ElseIf _IsPressed("43", $dll) Then ; Track the C key to stop the copy bye hotkeys

DisablePrintScreen()

ElseIf _IsPressed("56", $dll) Then ; Track the V key to stop the past bye hotkey

DisablePrintScreen()

ElseIf _IsPressed("58", $dll) Then ; Track the X key to stop the cut bye hotkey

DisablePrintScreen()

;Else

EndIf

WEnd

DllClose($dll) ;dll close function but not use in this application due to non end procedure

Func DisablePrintScreen()

;MsgBox(0, "AutoIt Example", "This is strickly prohibited")

ClipPut(" ")

EndFunc

KeyBoardScreenCaptureCopyPastPrevent.au3

Edited by SasankaFernando
Link to comment
Share on other sites

Look in help file under "Send Key list" for more.

HotKeySet('{PRINTSCREEN}', 'Prompt')

Do; Loop
Until GUIGetMsg() = -3

Func Prompt()
    MsgBox(0, "AutoIt Example", "This is strictly prohibited")
EndFunc

edit: oops .. forgot sumthing

Edited by ripdad

"The mediocre teacher tells. The Good teacher explains. The superior teacher demonstrates. The great teacher inspires." -William Arthur Ward

Link to comment
Share on other sites

It does not stop me from copying things to the clipboard.

Most programs dont require a right click or a ctrl-v, as they generally have an 'edit' in the toolbar that allows pasting.

upon hitting Ctrl-V, it pastes the item, then clears the clipboard.

The only scenario it has been effective for is clearing the clipboard on right click.

so why not just restrict access to clipbrd.exe?

Edited by iamtheky

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

thanks for the comments..

ripdad public/style_images/autoit/user_popup.png

I tried with hotkeys but it seems those not working most of the time and even have no way to capture the mouse click event.

Look in help file under "Send Key list" for more.

HotKeySet('{PRINTSCREEN}', 'Prompt')

Do; Loop
Until GUIGetMsg() = -3

Func Prompt()
    MsgBox(0, "AutoIt Example", "This is strictly prohibited")
EndFunc

edit: oops .. forgot sumthing

Link to comment
Share on other sites

thanks for the comment.

iamtheky public/style_images/autoit/user_popup.png

if it's not clearing the copy past, decrease or even remove the sleep function that delays the execution.

and is there a way to restrict access to clipboard?

clipbrd.exe don't exist with Windows Vista and upper right?

so if there is a way PLS give me an example..

It does not stop me from copying things to the clipboard.

Most programs dont require a right click or a ctrl-v, as they generally have an 'edit' in the toolbar that allows pasting.

upon hitting Ctrl-V, it pastes the item, then clears the clipboard.

The only scenario it has been effective for is clearing the clipboard on right click.

so why not just restrict access to clipbrd.exe?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...