Utilizzo di Applescript per ingannare key logger con sequenze di tasti

1

Non so molto su come Mac elabora i tasti, ma se avessi scritto un semplice AppleScript che apriva un documento TextEdit e avessi iniziato a digitare un enorme blocco di testo, questo avrebbe mascherato efficacemente la mia digitazione se fosse stato eseguito in background?

Oppure Mac elabora prima l'input della tastiera AppleScript e poi quello che sto digitando secondo?

    
posta Kevin Crompwell 20.01.2015 - 06:38
fonte

3 risposte

0

Utilizzo di un'app di prova KeyDownEvent.

Le sequenze di tasti vengono registrate da un evento di tasto della melaScript.

Ma non penso che sarai in grado di usarlo come maschera.

Le sequenze di tasti di Applescript inseriranno sempre i caratteri nell'app attiva. Pertanto, digitando nell'area si sta tentando manualmente di digitare.

Quindi, se avessi un blocco di testo come:

"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaabbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"

Anche questo si registra come questo nel logger. Quindi, come puoi vedere, non ti nascondi molto.

Le sequenze di tasti in Applescript sono veloci e inviate in blocco.

Un'altra cosa da notare è che la mia app di test ha dovuto essere autorizzata a controllare il mio computer prima che fosse Apple a registrare gli eventi.

UPDATE *

Puoi fare come suggerito da @Tetsujin e aspettare che Applescript inizi a digitare nella prima app e poi passi a un'altra app per il tipo manuale.

Dovresti utilizzare due blocchi tell in Applescript.

 tell application "System Events"
        delay 5
     tell application process "TextEdit" -- the app typing target
            keystroke "aaaa...."
     end tell
    end tell

Ma come ho detto, i tasti vengono inviati in quello che in effetti è un blocco.

Quindi, indipendentemente da dove viene digitato, il registratore lo riprenderà come sopra.

risposta data 20.01.2015 - 13:42
fonte
1

Beh, potrebbe funzionare, ma idk se farebbe ciò che vuoi ottenere.

Questo script

tell application "TextEdit"
    activate
    make new document
    delay 1
    repeat 100 times
        tell application "System Events"
            keystroke "the quick brown fox jumps over the lazy dog"
            keystroke return
        end tell
    end repeat
end tell

inizierà a digitare il documento che si trova in primo piano quando inizia dopo il ritardo di 1 secondi affinché TextEdit venga visualizzato in primo piano.
Una volta digitata, puoi passare a un'altra app & continua quello che stavi facendo - ma non puoi usare TextEdit in quanto non consente a nessun altro documento di venire in primo piano fino a quando non è terminato.

Se passi a un'altra app prima che inizi a digitare, verrà invece inserita quella.

Se ciò potrebbe ingannare un keylogger, non ne ho idea - ma questo solleva la domanda ...
cosa ti fa pensare di avere un key logger & perché non liberarsene invece?

Se si tratta di una sorta di controllo "aziendale" sui dipendenti, considera quanto tempo ci vorrà prima che lo notino e amp; mi chiedevo perché ritenevi necessario cercare di aggirare - qualcosa presumibilmente coperto da un contratto di lavoro.

    
risposta data 20.01.2015 - 09:05
fonte
0

Quindi ho imparato che:

- Apple elabora i tasti nei blocchi

- Queste sequenze di tasti sono specifiche dell'applicazione

Il seguente script è stato il mio tentativo (ho abbreviato il "tasto" su tre righe per sintassi, se qualcuno vuole vedere il codice completo e non modificato, fammi sapere):

tell application "TextEdit"
activate
make new document
delay 0.1

repeat 2 times
    tell application "System Events" to keystroke "
(((((((((((((((((((((((((((((((((((((((((((((((((((ˇ¬ˇƒˇƒˇ⁄≤Ä9_X 
퀩‹∑A'ñ˜rZ∏(–9flo-ˇ˙ Êªhô˘Ûfi—>ngsú∏∂}πõ§œø g8µ(lì°}‡∫êä…>≠Çä⁄ÀÍÉ{µ»éÀX[ö
˛Ä¢˙Gö˙<É@g0í5—<Ì”§KùëLøYbb÷¶<√zEeö§Ô ¶‡6†≥ߢª¨zK‰Á+Ü[˙4[—ŒΩÚsu≈0˝9…"

end repeat

end tell
    
risposta data 20.01.2015 - 14:26
fonte

Leggi altre domande sui tag