How can/should I kill masscan processHow to kill both process and subprocess?How can I kill the top CPU/IO...

I got kicked out from graduate school in the past. How do I include this on my CV?

Why did MS-DOS applications built using Turbo Pascal fail to start with a division by zero error on faster systems?

Are modern clipless shoes and pedals that much better than toe clips and straps?

Why is less being run unnecessarily by git?

Slitherlink Fillomino hybrid

If all stars rotate, why was there a theory developed, that requires non-rotating stars?

How would one country purchase another?

Fancy String Replace

Why were movies shot on film shot at 24 frames per second?

Checking a beta regression model via glmmTMB with DHARMa package

Which note goes on which side of the stem?

Are there account age or level requirements for obtaining special research?

Start from ones

Numbers Decrease while Letters Increase

Using `With[...]` with a list specification as a variable

Why were the crew so desperate to catch Truman and return him to Seahaven?

Singleton Design Pattern implementation in a not traditional way

Average period of peer review process

Was there ever a treaty between 2 entities with significantly different translations to the detriment of one party?

Dealing with an extrovert co-worker

Is there any practical application for performing a double Fourier transform? ...or an inverse Fourier transform on a time-domain input?

antonym of "billable"

Is "The life is beautiful" incorrect or just very non-idiomatic?

Which household object drew this pattern?



How can/should I kill masscan process


How to kill both process and subprocess?How can I kill the top CPU/IO process quickly?How can I create a hard to kill processHow to kill stubborn processHow can I kill my backticked yes process?Kill a process cleanlyKill process when PID is constantly changingHow can I kill minerd malware on an AWS EC2 instance? (compromised server)






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







1















I host a small Ubuntu server with DigitalOcean and recently realized a guest user was compromised. I have been trying to cleanup up my server to stop future attacks and have come across a process that consistently takes up ~25% of my CPU. The process is running masscan and I am under the impression that this process is a result my recent attack.



I have been trying to kill the existing process but a new masscan process continues to spawn in its place. I am first wondering if I am right to assume that this masscan process is likely coming from a malicious place and I am then wondering how to go about killing the process for good.



Here is the full command being run:



./masscan -p 1835 --banner --rate 50000 --exclude 255.255.255.255 --exclude 10.0.0.0/8 --exclude 192.168.0.0/16 --exclude 127.0.0.0/8 --range 1.0.0.0-223.255.255.255









share|improve this question









New contributor



AC-5 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

















  • 5





    You may want to delete that instance and rebuild it. See How do I deal with a compromised server?

    – Kusalananda
    2 days ago






  • 1





    @Kusalananda I was trying to avoid that but you may be right

    – AC-5
    2 days ago











  • wiping and rebuilding is the right (and only) answer to a compromised system....but in the short term, you can probably use pstree to find the process which is respawning masscan. also look in the crontab for root and/or the uid running masscan.

    – cas
    2 days ago













  • @cas that's lousy advice. any process can fork+exit to get rid of its parent or execute a binary as child of another process by attaching to it with ptrace().

    – Uncle Billy
    2 days ago











  • @UncleBilly I think you mean "accurate" rather than "lousy". The OP was concerned about masscan respawning after being killed. That requires some other process to notice that masscan has been killed and respawn it. Or just run a wrapper script from cron, to start masscan if needed. This other process can't just fork and exit, it has to stick around to restart masscan if/when required. There are, of course, other methods but detecting and fixing them aren't worth the bother in the short time frame before Doing The Right Thing by wiping and reinstalling.

    – cas
    2 days ago




















1















I host a small Ubuntu server with DigitalOcean and recently realized a guest user was compromised. I have been trying to cleanup up my server to stop future attacks and have come across a process that consistently takes up ~25% of my CPU. The process is running masscan and I am under the impression that this process is a result my recent attack.



I have been trying to kill the existing process but a new masscan process continues to spawn in its place. I am first wondering if I am right to assume that this masscan process is likely coming from a malicious place and I am then wondering how to go about killing the process for good.



Here is the full command being run:



./masscan -p 1835 --banner --rate 50000 --exclude 255.255.255.255 --exclude 10.0.0.0/8 --exclude 192.168.0.0/16 --exclude 127.0.0.0/8 --range 1.0.0.0-223.255.255.255









share|improve this question









New contributor



AC-5 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

















  • 5





    You may want to delete that instance and rebuild it. See How do I deal with a compromised server?

    – Kusalananda
    2 days ago






  • 1





    @Kusalananda I was trying to avoid that but you may be right

    – AC-5
    2 days ago











  • wiping and rebuilding is the right (and only) answer to a compromised system....but in the short term, you can probably use pstree to find the process which is respawning masscan. also look in the crontab for root and/or the uid running masscan.

    – cas
    2 days ago













  • @cas that's lousy advice. any process can fork+exit to get rid of its parent or execute a binary as child of another process by attaching to it with ptrace().

    – Uncle Billy
    2 days ago











  • @UncleBilly I think you mean "accurate" rather than "lousy". The OP was concerned about masscan respawning after being killed. That requires some other process to notice that masscan has been killed and respawn it. Or just run a wrapper script from cron, to start masscan if needed. This other process can't just fork and exit, it has to stick around to restart masscan if/when required. There are, of course, other methods but detecting and fixing them aren't worth the bother in the short time frame before Doing The Right Thing by wiping and reinstalling.

    – cas
    2 days ago
















1












1








1








I host a small Ubuntu server with DigitalOcean and recently realized a guest user was compromised. I have been trying to cleanup up my server to stop future attacks and have come across a process that consistently takes up ~25% of my CPU. The process is running masscan and I am under the impression that this process is a result my recent attack.



I have been trying to kill the existing process but a new masscan process continues to spawn in its place. I am first wondering if I am right to assume that this masscan process is likely coming from a malicious place and I am then wondering how to go about killing the process for good.



Here is the full command being run:



./masscan -p 1835 --banner --rate 50000 --exclude 255.255.255.255 --exclude 10.0.0.0/8 --exclude 192.168.0.0/16 --exclude 127.0.0.0/8 --range 1.0.0.0-223.255.255.255









share|improve this question









New contributor



AC-5 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











I host a small Ubuntu server with DigitalOcean and recently realized a guest user was compromised. I have been trying to cleanup up my server to stop future attacks and have come across a process that consistently takes up ~25% of my CPU. The process is running masscan and I am under the impression that this process is a result my recent attack.



I have been trying to kill the existing process but a new masscan process continues to spawn in its place. I am first wondering if I am right to assume that this masscan process is likely coming from a malicious place and I am then wondering how to go about killing the process for good.



Here is the full command being run:



./masscan -p 1835 --banner --rate 50000 --exclude 255.255.255.255 --exclude 10.0.0.0/8 --exclude 192.168.0.0/16 --exclude 127.0.0.0/8 --range 1.0.0.0-223.255.255.255






ubuntu process kill malware






share|improve this question









New contributor



AC-5 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.










share|improve this question









New contributor



AC-5 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








share|improve this question




share|improve this question








edited 2 days ago









Kusalananda

160k18 gold badges318 silver badges504 bronze badges




160k18 gold badges318 silver badges504 bronze badges






New contributor



AC-5 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








asked 2 days ago









AC-5AC-5

61 bronze badge




61 bronze badge




New contributor



AC-5 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




New contributor




AC-5 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.













  • 5





    You may want to delete that instance and rebuild it. See How do I deal with a compromised server?

    – Kusalananda
    2 days ago






  • 1





    @Kusalananda I was trying to avoid that but you may be right

    – AC-5
    2 days ago











  • wiping and rebuilding is the right (and only) answer to a compromised system....but in the short term, you can probably use pstree to find the process which is respawning masscan. also look in the crontab for root and/or the uid running masscan.

    – cas
    2 days ago













  • @cas that's lousy advice. any process can fork+exit to get rid of its parent or execute a binary as child of another process by attaching to it with ptrace().

    – Uncle Billy
    2 days ago











  • @UncleBilly I think you mean "accurate" rather than "lousy". The OP was concerned about masscan respawning after being killed. That requires some other process to notice that masscan has been killed and respawn it. Or just run a wrapper script from cron, to start masscan if needed. This other process can't just fork and exit, it has to stick around to restart masscan if/when required. There are, of course, other methods but detecting and fixing them aren't worth the bother in the short time frame before Doing The Right Thing by wiping and reinstalling.

    – cas
    2 days ago
















  • 5





    You may want to delete that instance and rebuild it. See How do I deal with a compromised server?

    – Kusalananda
    2 days ago






  • 1





    @Kusalananda I was trying to avoid that but you may be right

    – AC-5
    2 days ago











  • wiping and rebuilding is the right (and only) answer to a compromised system....but in the short term, you can probably use pstree to find the process which is respawning masscan. also look in the crontab for root and/or the uid running masscan.

    – cas
    2 days ago













  • @cas that's lousy advice. any process can fork+exit to get rid of its parent or execute a binary as child of another process by attaching to it with ptrace().

    – Uncle Billy
    2 days ago











  • @UncleBilly I think you mean "accurate" rather than "lousy". The OP was concerned about masscan respawning after being killed. That requires some other process to notice that masscan has been killed and respawn it. Or just run a wrapper script from cron, to start masscan if needed. This other process can't just fork and exit, it has to stick around to restart masscan if/when required. There are, of course, other methods but detecting and fixing them aren't worth the bother in the short time frame before Doing The Right Thing by wiping and reinstalling.

    – cas
    2 days ago










5




5





You may want to delete that instance and rebuild it. See How do I deal with a compromised server?

– Kusalananda
2 days ago





You may want to delete that instance and rebuild it. See How do I deal with a compromised server?

– Kusalananda
2 days ago




1




1





@Kusalananda I was trying to avoid that but you may be right

– AC-5
2 days ago





@Kusalananda I was trying to avoid that but you may be right

– AC-5
2 days ago













wiping and rebuilding is the right (and only) answer to a compromised system....but in the short term, you can probably use pstree to find the process which is respawning masscan. also look in the crontab for root and/or the uid running masscan.

– cas
2 days ago







wiping and rebuilding is the right (and only) answer to a compromised system....but in the short term, you can probably use pstree to find the process which is respawning masscan. also look in the crontab for root and/or the uid running masscan.

– cas
2 days ago















@cas that's lousy advice. any process can fork+exit to get rid of its parent or execute a binary as child of another process by attaching to it with ptrace().

– Uncle Billy
2 days ago





@cas that's lousy advice. any process can fork+exit to get rid of its parent or execute a binary as child of another process by attaching to it with ptrace().

– Uncle Billy
2 days ago













@UncleBilly I think you mean "accurate" rather than "lousy". The OP was concerned about masscan respawning after being killed. That requires some other process to notice that masscan has been killed and respawn it. Or just run a wrapper script from cron, to start masscan if needed. This other process can't just fork and exit, it has to stick around to restart masscan if/when required. There are, of course, other methods but detecting and fixing them aren't worth the bother in the short time frame before Doing The Right Thing by wiping and reinstalling.

– cas
2 days ago







@UncleBilly I think you mean "accurate" rather than "lousy". The OP was concerned about masscan respawning after being killed. That requires some other process to notice that masscan has been killed and respawn it. Or just run a wrapper script from cron, to start masscan if needed. This other process can't just fork and exit, it has to stick around to restart masscan if/when required. There are, of course, other methods but detecting and fixing them aren't worth the bother in the short time frame before Doing The Right Thing by wiping and reinstalling.

– cas
2 days ago












0






active

oldest

votes














Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
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: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
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
});


}
});






AC-5 is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f536558%2fhow-can-should-i-kill-masscan-process%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








AC-5 is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















AC-5 is a new contributor. Be nice, and check out our Code of Conduct.













AC-5 is a new contributor. Be nice, and check out our Code of Conduct.












AC-5 is a new contributor. Be nice, and check out our Code of Conduct.
















Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • 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%2funix.stackexchange.com%2fquestions%2f536558%2fhow-can-should-i-kill-masscan-process%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

Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

Nicolae Petrescu-Găină Cuprins Biografie | Opera | In memoriam | Varia | Controverse, incertitudini...