LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Mint
User Name
Password
Linux Mint This forum is for the discussion of Linux Mint.

Notices


Reply
  Search this Thread
Old 11-17-2018, 02:16 AM   #16
johnvi
LQ Newbie
 
Registered: Nov 2018
Posts: 4

Rep: Reputation: Disabled

Quote:
Originally Posted by Fred Caro View Post
I am currently running Mint 18.3 initially installed with KDE, now usually run Xfce and have done so for a while without problems until a recent update. Now the cpu is racing away at an average of about 25%, this is shared over 6 processors. It has nothing running apart from the Xfce gui. Usually this would only average about 0.1 to 2% but it runs at 25% unless I run top which (without me doing anything else) seems to quell the enthusiasm of the offending processes and usage returns to normal, providing I don't shutdown top.

The offending processes have been:
systemd
gvfsd
systemctl

but not all at once, i, e, only one at once. (as reported by top)

Also it will behave itself if I don't login from the splash page but give Ctrl+Alt+F1 login from a terminal and give startx to start Xfce.
This behavior also happens with KDE.

Does anyone know why this is happening?
I was having exactly the same problem on Ubuntu 16.04. I am also suspecting some kind of coin mining virus, could not find out what it was, but solved it by replacing the user account (on another PC with the same problem, I just deleted some settings folders for the current affected user and rebooted).

I posted a question here on "askubuntu" and I got no answer except mine. My old settings files are available to anyone who is capable of locating a virus.

I also think that this thread should be moved from Linux Mint to something more general since it is affecting other distros too.
 
Old 11-17-2018, 10:59 AM   #17
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by johnvi View Post
I am also suspecting some kind of coin mining virus
sorry, but considering it is these three processes:

Quote:
The offending processes have been:
systemd
gvfsd
systemctl
... i really don't see how these could be leveraged for bitcoin mining.
afaik, bitcoining exploits run through your browser & javascript.
otoh, it is of course possible that an ingenious hacker called his bitcoin mining exploit script "systemctl".

as has been said before, without any actual research, troubleshooting, evidence - i would rather not make such unfounded claims.
 
Old 11-17-2018, 06:11 PM   #18
johnvi
LQ Newbie
 
Registered: Nov 2018
Posts: 4

Rep: Reputation: Disabled
A process that holds my CPU at 50+ % for hours and disappears seconds after I ran "top" and stays disappeared until I stop "top"...
A process with a different name every time but exactly the same behavior...
A process normally owned by root and not the user....

Is very very likely to be some malware.
The only reason I suspect coin mining is the high CPU usage.
I would like to do some research but I don't know how to start.
Any help would be appreciated!
 
1 members found this post helpful.
Old 11-18-2018, 02:48 AM   #19
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by johnvi View Post
A process with a different name every time but exactly the same behavior...
A process normally owned by root and not the user....
see, now you start providing that information.
keep going!

one first thing i would try would be to see if this is gui dependent, if it only happens when certain applications are opened, or connected to the internet... it's called troubleshooting.

Last edited by ondoho; 11-18-2018 at 02:49 AM.
 
Old 01-28-2019, 06:55 PM   #20
NeuroDesigns
LQ Newbie
 
Registered: Jan 2019
Posts: 4

Rep: Reputation: Disabled
Hi everybody!,

I was also experiencing the same issues running latest Xubuntu LTE, updated.
I also noted problems with my internet connection (DNS failures, low response).
The offending task could have several names. There was (of course) a main task monitoring the system and reopening the CPU angry one.
Running "top", even if renamed, made the child task kill itself. The only way to see the task running was through task manager.
If you deleted the offending files they would reapear.

So... Grabbed my Holmes hat, my House cane, and this is what I have found.


This autostart file seems to have the code that makes the virus run at startup:
~/.config/autostart/dbus-daemon.desktop

The exec code line:
Code:
Exec=/home/(your username)/.local/share/accounts/services/dbus-daemon

This files seems to have the code to make the virus gain privileges:
~/.profile
~/.bashrc
~/.bash_profile

The code:
Code:
linux_bash="$HOME/(the path seems to be different, according to dissemination)"
if [ -e "$linux_bash" ];then
setsid "$linux_bash" 2>&1 & disown
fi

Since this files had a timestamp of 20:33, I searched for all files modified right after (there were a few more but I already deleted them for test purposes):
dom 20 jan 2019 20:33:19 WET ./.bash_profile
dom 20 jan 2019 20:33:19 WET ./.bashrc
dom 20 jan 2019 20:33:19 WET ./.config/autostart/dbus-daemon.desktop
dom 20 jan 2019 20:33:19 WET ./.profile
dom 20 jan 2019 20:33:19 WET ./.local/share/accounts/services/.dbus-daemon.bin
dom 20 jan 2019 20:33:19 WET ./.local/share/icc/.icc-daemon.bin
dom 20 jan 2019 20:33:19 WET ./.local/share/icc/.icc-daemon.log
dom 20 jan 2019 20:33:24 WET ./.kodi/addons/script.module.python.requests/lib/requests/packages/urllib3/connectionpool.py
dom 20 jan 2019 20:34:06 WET ./.local/share/accounts/services/.dbus-daemon.sys
dom 20 jan 2019 20:34:08 WET ./.local/share/icc/icc-daemon
dom 20 jan 2019 20:34:08 WET ./.local/share/icc/.icc-daemon.sys
dom 20 jan 2019 20:34:44 WET ./.local/share/accounts/services/dbus-daemon


The dissemination seems to create 3 files:
One timestamp
One base64 lookalike
The offending script


What I've done:
1- Delete autostart file
2- Delete offending code from ~/.profile, ~/.bashrc, ~/.bash_profile
3- Empty ~/.cache folder
4- Empty /tmp folder
5- Restart


I don't know what this virus does. I did save the HEX file if someone wants to inspect any further.
As I don't know how my machine got infected, (that Kodi urllib3 file looks suspicious!) I can't guarantee this is a final solution, though all seems OK now...
I will keep my system in check the next few days to see if this was all there was.

I hope this helps someone.
Forgive my poor English...
 
1 members found this post helpful.
Old 01-29-2019, 06:47 AM   #21
NeuroDesigns
LQ Newbie
 
Registered: Jan 2019
Posts: 4

Rep: Reputation: Disabled
Hi everybody!,

I was also experiencing the same issues running latest Xubuntu LTE, updated.
I also noted problems with my internet connection (DNS failures, low response).
The offending task could have several names (systemctl, sleep, ibus-x11, ...). There was (of course) a main task monitoring the system and reopening the CPU angry one.
Running "top", even if renamed, made the child task kill itself. The only way to see the task running was through task manager.
If you deleted the offending files they would reapear.

So... Grabbed my Holmes hat, my House cane, and this is what I have found.


This autostart file seems to have the code that makes the virus run at startup:
Code:
~/.config/autostart/dbus-daemon.desktop
The exec code line:
Code:
Exec=/home/(your username)/.local/share/accounts/services/dbus-daemon

This files seems to have the code to make the virus gain privileges:
~/.profile
~/.bashrc
~/.bash_profile

The code:
Code:
linux_bash="$HOME/(the path seems to be different, according to dissemination)"
if [ -e "$linux_bash" ];then
setsid "$linux_bash" 2>&1 & disown
fi

Since this files had a timestamp of 20:33, I searched for all files modified right after (there were a few more but I already deleted them for test purposes):
dom 20 jan 2019 20:33:19 WET ./.bash_profile
dom 20 jan 2019 20:33:19 WET ./.bashrc
dom 20 jan 2019 20:33:19 WET ./.config/autostart/dbus-daemon.desktop
dom 20 jan 2019 20:33:19 WET ./.profile
dom 20 jan 2019 20:33:19 WET ./.local/share/accounts/services/.dbus-daemon.bin
dom 20 jan 2019 20:33:19 WET ./.local/share/icc/.icc-daemon.bin
dom 20 jan 2019 20:33:19 WET ./.local/share/icc/.icc-daemon.log
dom 20 jan 2019 20:33:24 WET ./.kodi/addons/script.module.python.requests/lib/requests/packages/urllib3/connectionpool.py
dom 20 jan 2019 20:34:06 WET ./.local/share/accounts/services/.dbus-daemon.sys
dom 20 jan 2019 20:34:08 WET ./.local/share/icc/icc-daemon
dom 20 jan 2019 20:34:08 WET ./.local/share/icc/.icc-daemon.sys
dom 20 jan 2019 20:34:44 WET ./.local/share/accounts/services/dbus-daemon


The dissemination seems to create 3 files:
One timestamp
One base64 lookalike
The offending script


What I've done:
1- Delete autostart file;
2- Delete offending code from ~/.profile, ~/.bashrc, ~/.bash_profile
3- Delete all dissemination files
3- Empty ~/.cache folder
4- Empty /tmp folder
5- Restarted


I don't know what this virus does. I did save the HEX file if someone wants to inspect any further.
As I don't know how my machine got infected, (that Kodi urllib3 file looks suspicious!) I can't guarantee this is a final solution, though all seems OK now...
I will keep my system in check the next few days to see if this was all there was.

I hope this helps someone.
Forgive my poor English...

Last edited by NeuroDesigns; 01-29-2019 at 06:54 AM.
 
1 members found this post helpful.
Old 01-29-2019, 08:03 AM   #22
NeuroDesigns
LQ Newbie
 
Registered: Jan 2019
Posts: 4

Rep: Reputation: Disabled
A little more info...
I also have a machine running LibreElec.
Decided to investigate and it is also infected...
 
Old 01-29-2019, 12:40 PM   #23
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
yes, that's the crucial question:
where did you get it from?

if anyone's wondering, i did not investigate any deeper than this, but it does seem to be some sort of malware.

just one point:
Quote:
Originally Posted by NeuroDesigns View Post
This files seems to have the code to make the virus gain privileges:
~/.profile
~/.bashrc
~/.bash_profile

The code:
Code:
linux_bash="$HOME/(the path seems to be different, according to dissemination)"
if [ -e "$linux_bash" ];then
setsid "$linux_bash" 2>&1 & disown
fi
i'm not exactly sure what setsid does, but it does not "gain privileges" for anything.
 
Old 01-29-2019, 01:19 PM   #24
johnvi
LQ Newbie
 
Registered: Nov 2018
Posts: 4

Rep: Reputation: Disabled
The virus is probably some kind of bit coin mining process considering the very high cpu usage.
I had an issue with a mikrotik router I use in my local network and internet. These routers had a vulnerability last spring that was fixed with an update. I did not update my router in time and got a mining virus in all my windows machines but it is said that this vulnerability was also used to infect linux machines as well.

I also find most of the files that you mention above except the .kodi/... one

Last edited by johnvi; 01-29-2019 at 01:31 PM.
 
Old 01-29-2019, 02:46 PM   #25
NeuroDesigns
LQ Newbie
 
Registered: Jan 2019
Posts: 4

Rep: Reputation: Disabled
@ondoho
"does not gain privileges for anything"
Ouchhh!!!
I think you miswrote "good contribution".


I probably shouldn't have wrote "privileges" because it could be wrongly interpreted, in a rooty way, as you did. My bad. Just trying to contribute, especially after almost everybody dismissed this for not having evidences.

SETSID
https://linux.die.net/man/2/setsid

DISOWN
https://www.slashroot.in/disown-comm...-example-usage



As I said, I have no idea how I got this virus. lot of bad practices... "A system is as secure as his user"!
I'm keeping my machine under surveillance and if I find anything that can help somebody I will post here.

Last edited by NeuroDesigns; 01-29-2019 at 03:44 PM.
 
Old 04-18-2020, 05:41 PM   #26
eromana
LQ Newbie
 
Registered: Jul 2018
Posts: 3

Rep: Reputation: Disabled
Related : Recent update causes high cpu usage

After an upgrade, the System Monitor displays high cpu utilization across all threads, of about 30 percent.

From Synaptic reinstalling the metacity package appears to restore my laptop to a low cpu utilization of a few percent.

Since the High CPU thread has more than one root cause, with hesitation I mark solved

I am using Linux Mint 18.3, Kernel 4.15.0-96

But Firefox use Restores the High CPU state ! It looks like the problem is in Firefox

Last edited by eromana; 04-18-2020 at 06:01 PM. Reason: Firefox restores the problem
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Squid 3 near 100% cpu usage and high RAM usage piman Linux - Software 1 11-16-2013 02:20 AM
mysql server not responding with high cpu usage and high load avgs landysaccount Linux - Server 2 09-15-2013 03:46 AM
[SOLVED] High CPU load, but low CPU usage (high idle CPU) baffy Linux - Newbie 5 03-13-2013 09:24 AM
High load and high cpu kernel usage enid Linux - Server 8 09-30-2010 03:33 AM
High CPU usage ?! Why? skate Linux - Software 1 04-11-2007 05:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux Mint

All times are GMT -5. The time now is 08:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration