Ubuntu 16.04, root command sh took 400% cpus usage even after fresh reboot












1















I recently found out my Ubuntu has a process (shows in images) always took about 400% cpu usage for nothing. It is always there even I rebooted my PC and nothing has been done yet. I tried to kill it, but it regenerates in few seconds.



Screenshot from top – the first row, PID 4313, root, command sh:



screenshot from top



I have searched for the similar problem but none of them is caused by this "root sh command". Anyone know why is it here and I can't get rid of it?



Any ideas will be a great help. Thanks!



Update:
Thanks @dessert. I think use screenshot in this case makes more sense. And I don't know how to paste the text from htop actually..



screenshot from htop
I'm actually new to everything here. htop looks a very handy tool to investigate the processes. It is ntpd that root is running. I found a similar issue from here for macOS by changing the Date & Time to automatic. But it doesn't work in my case. I feel it must be something simple to fix. But I just don't know how....



Update:



Solved the problem. I think it is some kind of bitcoin mining attack.

While the 'ntpd' was eating the cpu usage, I realized I didn't even have the ntpd installed...



which ntpd #returns nothing.


When I took a look at the strace -p, it gave me this:



screenshot of strace -p



There were 8 subprocesses. I don't know much about ntpd, but this looks unusual and suspicious..



Then I used following command to locate the executing files:



cd /proc/14503
sudo ls -l exe


enter image description here



Go to /cpu/bin folder, and I found the files faking 'ntpd' process. There was a cron.d file I think was used to regenerating process.



Delete the whole 'bin' folder, kill the process. The cpu usage was ceased and didn't come back again.



sudo rm -rv bin
sudo kill 14503


I didn't reboot my OS to verify whether it will be regenerated. But I will at least change my root passwd right away.. I don't know whether this means someone has my root passwd already. If yes, how and why could him have the pw?










share|improve this question




















  • 4





    Please don't post images of text. Instead, paste the text directly into your question and use the formatting tools.

    – dessert
    Aug 29 '18 at 5:23











  • Try to view process tree with dependencies using htop and add its screenshot to the question. This sh process was called by some parent, but we can not determine it from your current screenshots.

    – N0rbert
    Aug 29 '18 at 9:17
















1















I recently found out my Ubuntu has a process (shows in images) always took about 400% cpu usage for nothing. It is always there even I rebooted my PC and nothing has been done yet. I tried to kill it, but it regenerates in few seconds.



Screenshot from top – the first row, PID 4313, root, command sh:



screenshot from top



I have searched for the similar problem but none of them is caused by this "root sh command". Anyone know why is it here and I can't get rid of it?



Any ideas will be a great help. Thanks!



Update:
Thanks @dessert. I think use screenshot in this case makes more sense. And I don't know how to paste the text from htop actually..



screenshot from htop
I'm actually new to everything here. htop looks a very handy tool to investigate the processes. It is ntpd that root is running. I found a similar issue from here for macOS by changing the Date & Time to automatic. But it doesn't work in my case. I feel it must be something simple to fix. But I just don't know how....



Update:



Solved the problem. I think it is some kind of bitcoin mining attack.

While the 'ntpd' was eating the cpu usage, I realized I didn't even have the ntpd installed...



which ntpd #returns nothing.


When I took a look at the strace -p, it gave me this:



screenshot of strace -p



There were 8 subprocesses. I don't know much about ntpd, but this looks unusual and suspicious..



Then I used following command to locate the executing files:



cd /proc/14503
sudo ls -l exe


enter image description here



Go to /cpu/bin folder, and I found the files faking 'ntpd' process. There was a cron.d file I think was used to regenerating process.



Delete the whole 'bin' folder, kill the process. The cpu usage was ceased and didn't come back again.



sudo rm -rv bin
sudo kill 14503


I didn't reboot my OS to verify whether it will be regenerated. But I will at least change my root passwd right away.. I don't know whether this means someone has my root passwd already. If yes, how and why could him have the pw?










share|improve this question




















  • 4





    Please don't post images of text. Instead, paste the text directly into your question and use the formatting tools.

    – dessert
    Aug 29 '18 at 5:23











  • Try to view process tree with dependencies using htop and add its screenshot to the question. This sh process was called by some parent, but we can not determine it from your current screenshots.

    – N0rbert
    Aug 29 '18 at 9:17














1












1








1








I recently found out my Ubuntu has a process (shows in images) always took about 400% cpu usage for nothing. It is always there even I rebooted my PC and nothing has been done yet. I tried to kill it, but it regenerates in few seconds.



Screenshot from top – the first row, PID 4313, root, command sh:



screenshot from top



I have searched for the similar problem but none of them is caused by this "root sh command". Anyone know why is it here and I can't get rid of it?



Any ideas will be a great help. Thanks!



Update:
Thanks @dessert. I think use screenshot in this case makes more sense. And I don't know how to paste the text from htop actually..



screenshot from htop
I'm actually new to everything here. htop looks a very handy tool to investigate the processes. It is ntpd that root is running. I found a similar issue from here for macOS by changing the Date & Time to automatic. But it doesn't work in my case. I feel it must be something simple to fix. But I just don't know how....



Update:



Solved the problem. I think it is some kind of bitcoin mining attack.

While the 'ntpd' was eating the cpu usage, I realized I didn't even have the ntpd installed...



which ntpd #returns nothing.


When I took a look at the strace -p, it gave me this:



screenshot of strace -p



There were 8 subprocesses. I don't know much about ntpd, but this looks unusual and suspicious..



Then I used following command to locate the executing files:



cd /proc/14503
sudo ls -l exe


enter image description here



Go to /cpu/bin folder, and I found the files faking 'ntpd' process. There was a cron.d file I think was used to regenerating process.



Delete the whole 'bin' folder, kill the process. The cpu usage was ceased and didn't come back again.



sudo rm -rv bin
sudo kill 14503


I didn't reboot my OS to verify whether it will be regenerated. But I will at least change my root passwd right away.. I don't know whether this means someone has my root passwd already. If yes, how and why could him have the pw?










share|improve this question
















I recently found out my Ubuntu has a process (shows in images) always took about 400% cpu usage for nothing. It is always there even I rebooted my PC and nothing has been done yet. I tried to kill it, but it regenerates in few seconds.



Screenshot from top – the first row, PID 4313, root, command sh:



screenshot from top



I have searched for the similar problem but none of them is caused by this "root sh command". Anyone know why is it here and I can't get rid of it?



Any ideas will be a great help. Thanks!



Update:
Thanks @dessert. I think use screenshot in this case makes more sense. And I don't know how to paste the text from htop actually..



screenshot from htop
I'm actually new to everything here. htop looks a very handy tool to investigate the processes. It is ntpd that root is running. I found a similar issue from here for macOS by changing the Date & Time to automatic. But it doesn't work in my case. I feel it must be something simple to fix. But I just don't know how....



Update:



Solved the problem. I think it is some kind of bitcoin mining attack.

While the 'ntpd' was eating the cpu usage, I realized I didn't even have the ntpd installed...



which ntpd #returns nothing.


When I took a look at the strace -p, it gave me this:



screenshot of strace -p



There were 8 subprocesses. I don't know much about ntpd, but this looks unusual and suspicious..



Then I used following command to locate the executing files:



cd /proc/14503
sudo ls -l exe


enter image description here



Go to /cpu/bin folder, and I found the files faking 'ntpd' process. There was a cron.d file I think was used to regenerating process.



Delete the whole 'bin' folder, kill the process. The cpu usage was ceased and didn't come back again.



sudo rm -rv bin
sudo kill 14503


I didn't reboot my OS to verify whether it will be regenerated. But I will at least change my root passwd right away.. I don't know whether this means someone has my root passwd already. If yes, how and why could him have the pw?







16.04 command-line cpu






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Sep 5 '18 at 0:05







Mengchen Lin

















asked Aug 29 '18 at 0:41









Mengchen LinMengchen Lin

62




62








  • 4





    Please don't post images of text. Instead, paste the text directly into your question and use the formatting tools.

    – dessert
    Aug 29 '18 at 5:23











  • Try to view process tree with dependencies using htop and add its screenshot to the question. This sh process was called by some parent, but we can not determine it from your current screenshots.

    – N0rbert
    Aug 29 '18 at 9:17














  • 4





    Please don't post images of text. Instead, paste the text directly into your question and use the formatting tools.

    – dessert
    Aug 29 '18 at 5:23











  • Try to view process tree with dependencies using htop and add its screenshot to the question. This sh process was called by some parent, but we can not determine it from your current screenshots.

    – N0rbert
    Aug 29 '18 at 9:17








4




4





Please don't post images of text. Instead, paste the text directly into your question and use the formatting tools.

– dessert
Aug 29 '18 at 5:23





Please don't post images of text. Instead, paste the text directly into your question and use the formatting tools.

– dessert
Aug 29 '18 at 5:23













Try to view process tree with dependencies using htop and add its screenshot to the question. This sh process was called by some parent, but we can not determine it from your current screenshots.

– N0rbert
Aug 29 '18 at 9:17





Try to view process tree with dependencies using htop and add its screenshot to the question. This sh process was called by some parent, but we can not determine it from your current screenshots.

– N0rbert
Aug 29 '18 at 9:17










0






active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1069955%2fubuntu-16-04-root-command-sh-took-400-cpus-usage-even-after-fresh-reboot%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1069955%2fubuntu-16-04-root-command-sh-took-400-cpus-usage-even-after-fresh-reboot%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

mysqli_query(): Empty query in /home/lucindabrummitt/public_html/blog/wp-includes/wp-db.php on line 1924

How to change which sound is reproduced for terminal bell?

Can I use Tabulator js library in my java Spring + Thymeleaf project?