Page 1 of 2

Keylogger?

Posted: 21 Jan 2016 04:24
by akhileshg1988
Hey guys!
Lately, I was wondering if it's possible to create a flow that could work as a keylogger?
Any suggestions in this regard are welcome.

Re: Keylogger?

Posted: 21 Jan 2016 20:36
by Martin
Hi,

You could try trigger UI Event with event type Text changed or use trigger Command Output with command getevent (requires root). Search the forum for getevent, there are a few discussions about this that should be helpful to get you started.

Regards,
Martin

Re: Keylogger?

Posted: 28 Jan 2016 05:19
by akhileshg1988
Hi Martin
I've hardly been able to make any progress so far.
I've made a flow as follows:-
Trigger:- UI Event (Event Type:- Text changed ; Package name:- com.android.mms)
Action:- Write To File ({app_name} {before_text} {text})

The aforementioned flow ain't upto the mark.
The way I want to implement a keylogger is that whenever the keyboard pops up, whatever text I type in any text field be logged onto a file.
Your valuable help is solicited.

Thanks
Akhilesh

Re: Keylogger?

Posted: 29 Jan 2016 19:55
by Martin
Hi Akhilesh,

Recording every single key press could be hard or even impossible. Maybe a rooted device could help but I'm not even sure about this.
What does not work about the flow you designed? Does it record too much text or does the flow not execute at all?
A flow with trigger UI Event: Text changed and package set to * with action Notification on Screen: {text} seems to work quite good on my test device. The system coalesces the events for performance reasons so you will not get a notification for every single key press.

Regards,
Martin

Re: Keylogger?

Posted: 06 Sep 2016 11:10
by akhileshg1988
Hey Martin!
Could you please help me use the trigger Command Output with command getevent in order to be able to design a keylogging flow?

Thanks
Akhilesh

Re: Keylogger?

Posted: 06 Sep 2016 11:48
by akhileshg1988
Martin wrote:Hi Akhilesh,

Recording every single key press could be hard or even impossible. Maybe a rooted device could help but I'm not even sure about this.
What does not work about the flow you designed? Does it record too much text or does the flow not execute at all?
A flow with trigger UI Event: Text changed and package set to * with action Notification on Screen: {text} seems to work quite good on my test device. The system coalesces the events for performance reasons so you will not get a notification for every single key press.

Regards,
Martin
Martin, would you please explain what you meant by "package set to *"?
What is this * supposed to do?

Re: Keylogger?

Posted: 06 Sep 2016 18:52
by Martin
Hi,

* is a wildcard or glob pattern character that matches any text respectively all package names so the trigger will be executed for all text changed events no matter what package it's coming from.

It's difficult to work with getevent. Search the forum to get some examples. I would try to use trigger UI Event first.

Regards,
Martin

Re: Keylogger?

Posted: 07 Sep 2016 04:46
by akhileshg1988
Hey Martin, I am quite close to creating a keylogging (text-logging, to be exact) flow. Need your help for fixing certain flaws in my flow.
First of all, please guide me about the function "removevariable(name)". I tried using this function in an action "script" in order to clear the value assigned to a global variable named "global_text" created by me but, to my disappointment, this function doesn't seem to do anything to the variable "global_text" upon execution.
Kindly guide and help.

Thanks
Akhilesh

Re: Keylogger?

Posted: 07 Sep 2016 05:06
by akhileshg1988
Sorry to have bothered you Martin. I searched for the function "removeVariable(name)" in the forum and got the answer.
Will resort to requesting for your valuable help in case I am stuck somewhere.

Thanks
Akhilesh

Re: Keylogger?

Posted: 07 Sep 2016 10:43
by mbirth
By the way, there's Type Machine which logs all input into a SQLite database and associates it with the corresponding app. And you can "replay" the input, i.e. you can see typing mistakes and the correction of them. I learned to love it when I had a new Reddit app that crashed while you were typing a reply.