[GH-ISSUE #346] Client with a long up-time doesn't return the correct up-time #161

Closed
opened 2026-02-27 15:49:08 +03:00 by kerem · 4 comments
Owner

Originally created by @yankejustin on GitHub (Aug 22, 2015).
Original GitHub issue: https://github.com/quasar/Quasar/issues/346

Originally assigned to: @MaxXor on GitHub.

Issue Context

I have a machine that I rarely shut down (normally place into a sleep state). The up-time is around 7-9 weeks.

Issue Description

An up-time greater-than ~48-49 days will not correctly be returned to the server; the server will reveal an up-time that is not accurate.

Cause of the issue

Because Environment.TickCount is an int, it is not capable of functioning after ~48-49 days. It is giving me a negative value for the days due to my up-time.

Solution

A functional alternative can be found here. It is a method that is very similar to the methods we use to obtain other information of the client's machine.

Originally created by @yankejustin on GitHub (Aug 22, 2015). Original GitHub issue: https://github.com/quasar/Quasar/issues/346 Originally assigned to: @MaxXor on GitHub. <h1>Issue Context</h1> I have a machine that I rarely shut down (normally place into a sleep state). The up-time is around 7-9 weeks. <h1>Issue Description</h1> An up-time greater-than ~48-49 days will not correctly be returned to the server; the server will reveal an up-time that is not accurate. <h1>Cause of the issue</h1> Because <a href="https://github.com/quasar/QuasarRAT/blob/master/Client/Core/SystemCore.cs#L200"><code>Environment.TickCount</code></a> is an <code>int</code>, it is not capable of functioning after ~48-49 days. It is giving me a negative value for the days due to my up-time. <h1>Solution</h1> A functional alternative can be found <a href="http://stackoverflow.com/questions/4645171/environment-tickcount-is-not-enough">here</a>. It is a method that is very similar to the methods we use to obtain other information of the client's machine.
kerem 2026-02-27 15:49:08 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@yankejustin commented on GitHub (Aug 22, 2015):

While on the topic of system information, I just wanted to point out this: perhaps the client should append each antivirus name that is not null or empty to a StringBuilder (using a newline after each valid name) before returning. Might be good to know if a client has multiple anti-viruses installed.

<!-- gh-comment-id:133754947 --> @yankejustin commented on GitHub (Aug 22, 2015): While on the topic of system information, I just wanted to point out this: perhaps the client should append each <a href="https://github.com/quasar/QuasarRAT/blob/master/Client/Core/SystemCore.cs#L159">antivirus</a> name that is not null or empty to a <code>StringBuilder</code> (using a newline after each valid name) before returning. Might be good to know if a client has multiple anti-viruses installed.
Author
Owner

@MaxXor commented on GitHub (Aug 23, 2015):

I'm aware of this. For me it's not even returning the correct value when I have my Win8.1 in VM running for 1h. This needs to be fixed asap. I gonna do this.

<!-- gh-comment-id:133798427 --> @MaxXor commented on GitHub (Aug 23, 2015): I'm aware of this. For me it's not even returning the correct value when I have my Win8.1 in VM running for 1h. This needs to be fixed asap. I gonna do this.
Author
Owner

@yankejustin commented on GitHub (Aug 23, 2015):

Alrighty. :)

<!-- gh-comment-id:133851121 --> @yankejustin commented on GitHub (Aug 23, 2015): Alrighty. :)
Author
Owner

@MaxXor commented on GitHub (Aug 23, 2015):

Can you tell me if it's working with your long-uptime system? My longest uptime is just 35 days.^^

<!-- gh-comment-id:133910748 --> @MaxXor commented on GitHub (Aug 23, 2015): Can you tell me if it's working with your long-uptime system? My longest uptime is just 35 days.^^
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Quasar#161
No description provided.