Stop user from interfering with AutoIt script

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements

Welcome Idira to LIVEcommunity!

Our community just got stronger! Explore new identity security resources, connect with experts, and discover more ways to learn and collaborate.

Meet Idira

Stop user from interfering with AutoIt script

L1 Bithead

Hi all,

I created an AutoIt script, and the steps are working as required. However, if the user tries to interfere with it, they are successful. For example, if the user keeps a key pressed down during the entire process, they key is also sent to the username and password fields when they come into focus during the "Send()" instruction.

 

How can we block such interference?

 

The documentation says that interference is blocked by default until the SendPID() instruction is carried out, but my Send() commands are before the PSMGenericClient_SendPID() command and user can still interfere.

 

I'm trying to understand what the "Lock Application Window" section does, but the documentation does not exactly explain it in human terms. Apart from this, is seems like it is only relevant if the CC is NOT a remote app (eg. https://community.cyberark.com/s/question/0D52J00009Y1j2zSAB). I tested with both DisableRemoteApp and without, to no avail.

 

I also tried explicitly adding BlockUserInput=Yes under "Target Settings > Client Specific" to no avail.

 

Might someone from the community have a clue?

 

(PSM v12.6.7.5, if it makes a significant difference).

1 accepted solution

Accepted Solutions

Ah, bit of a gotcha - PSM cannot run a connector as administrator, as per https://community.cyberark.com/s/question/0D52J00006tr1l1SAA/psm-custom-cc-with-autoit-how-to-handle-consoles-which-need-elevated-permissions

View solution in original post

5 REPLIES 5

L7 Applicator

Hi @Steven Sultana​ 

 

AutoIt provides the BlockInput() function to block user input (mouse and keyboard) during critical parts of the script. You can enable this before your Send() commands and disable it afterward.

 

You can find more information about this function on AutoIT site.

 

Hope it helps !

 

Thank you for the suggestion. Unfortunately, with BlockInput(1) I'm still able to interfere. I'm running the script from the PSM server itself: "autoit.exe script.au3 components_dir /test" (with the proper full paths where necessary). I did this to ensure that whatever I messed with in the CC does not end up causing issues due to conflicts etc.

L7 Applicator

Hi @Steven Sultana​ 

 

If you are using modal message box in the AutoIt script, please try excluding it.

The message box can cause the script to pause and potentially allowing user input to interfere. 

 

https://www.autoitscript.com/wiki/Modal_MsgBox_Styles

L1 Bithead

My apologies, I did not report my findings!

It seems like "RequireAdmin" keyword is needed at the top of the script for BlockInput() to work as required.

Ah, bit of a gotcha - PSM cannot run a connector as administrator, as per https://community.cyberark.com/s/question/0D52J00006tr1l1SAA/psm-custom-cc-with-autoit-how-to-handle-consoles-which-need-elevated-permissions

  • 1 accepted solution
  • 631 Views
  • 5 replies
  • 0 Likes
Like what you see?

Show your appreciation!

Click Like if a post is helpful to you or if you just want to show your support.

Click Accept as Solution to acknowledge that the answer to your question has been provided.

The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!

These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!

The LIVEcommunity thanks you for your participation!