Quasar icon indicating copy to clipboard operation
Quasar copied to clipboard

add idle time count in seconds or ms

Open ghost opened this issue 7 years ago • 6 comments

add idle time count in seconds and ping ms for each connected client please

ghost avatar Sep 27 '18 21:09 ghost

+1 for idle time Keyloggers IKeyboardMouseEvents contains events for KeyDown and MouseMove, which can be used to determine idle time. (Current timestamp - timestamp of last KeyDown/MouseMove call = idle time.) These events will only be triggered if Settings.ENABLELOGGER is enable. (See https://github.com/quasar/QuasarRAT/blob/master/Quasar.Client/Program.cs#L133) Will work on implementation tmrw but may get denied since it'll require me to start keylogger/keyboard/mouse hooks even if logger is disabled.

ooojustin avatar Oct 13 '18 09:10 ooojustin

No need for using the keyboard & mouse events. There is already a similar function here: https://github.com/quasar/QuasarRAT/blob/1bc20d38c0b2c73ae892cd7b171e19eedbbd7c1c/Quasar.Client/Helper/WindowsAccountHelper.cs#L69-L78

MaxXor avatar Oct 13 '18 11:10 MaxXor

No need for using the keyboard & mouse events. There is already a similar function here: QuasarRAT/Quasar.Client/Helper/WindowsAccountHelper.cs

Lines 69 to 78 in 1bc20d3

static bool IsUserIdle() { long ticks = Stopwatch.GetTimestamp();

 long idleTime = ticks - NativeMethodsHelper.GetLastInputInfoTickCount(); 

 idleTime = ((idleTime > 0) ? (idleTime / 1000) : 0); 

 return (idleTime > 600); // idle for 10 minutes 

}

😮 Didn't see that!

ooojustin avatar Oct 13 '18 19:10 ooojustin

No need for using the keyboard & mouse events. There is already a similar function here: QuasarRAT/Quasar.Client/Helper/WindowsAccountHelper.cs Lines 69 to 78 in 1bc20d3 static bool IsUserIdle() { long ticks = Stopwatch.GetTimestamp();

 long idleTime = ticks - NativeMethodsHelper.GetLastInputInfoTickCount(); 

 idleTime = ((idleTime > 0) ? (idleTime / 1000) : 0); 

 return (idleTime > 600); // idle for 10 minutes 

}

😮 Didn't see that!

No need for using the keyboard & mouse events. There is already a similar function here: QuasarRAT/Quasar.Client/Helper/WindowsAccountHelper.cs

Lines 69 to 78 in 1bc20d3

static bool IsUserIdle() { long ticks = Stopwatch.GetTimestamp();

 long idleTime = ticks - NativeMethodsHelper.GetLastInputInfoTickCount(); 

 idleTime = ((idleTime > 0) ? (idleTime / 1000) : 0); 

 return (idleTime > 600); // idle for 10 minutes 

}

i meant the exact time in ms or sec... not the user is currently idle or not, .... -_-

ghost avatar Oct 13 '18 19:10 ghost

@Neoxyne The variable idleTime inside the function has the value in seconds. The method just needs to get changed a little bit.

MaxXor avatar Oct 13 '18 20:10 MaxXor

I'll make a branch on my fork with this feature.

Edit: I'm not sure why this isn't working 🤔 https://github.com/ooojustin/QuasarRAT/tree/feature-idle-time It's showing oddly large numbers: https://i.imgur.com/byT5Cu8.png Is something wrong here, lol? https://github.com/ooojustin/QuasarRAT/blob/ea188f0c74b977040df1d49a6016296a8682bf2a/Quasar.Client/Helper/WindowsAccountHelper.cs#L70

And why is it idleTime = ((idleTime > 0) ? (idleTime / 1000) : 0); // how long the user has been idle for (seconds) instead of idleTime = ((idleTime > 0) ? (idleTime / TimeSpan.TicksPerSecond) : 0); // how long the user has been idle for (seconds)

ooojustin avatar Oct 13 '18 20:10 ooojustin