security.frabs.net
All Guides

Signs of Compromise · about 10 minutes

Remove Scheduled Jobs That Download Code

What This Means

A scheduled job downloads something from the internet and runs it straight away.

Why It Matters

It's the commonest way attackers keep coming back: even after you clean up, the job reinstalls their tools.

  1. 1

    Find the job

    Check root's jobs, every user's and the system ones.

    crontab -l; grep -rl 'curl\|wget' /etc/cron* /var/spool/cron 2>/dev/null
    Terminal: Find the job, on Ubuntu 24.04
  2. 2

    Remove the line

    crontab -e opens the list in an editor; delete the line and save. Or remove it in one go:

    crontab -l | grep -v 'x.sh' | crontab -
    Terminal: Remove the line, on Ubuntu 24.04
  3. 3

    Confirm it's gone

    crontab -l
    Terminal: Confirm it's gone, on Ubuntu 24.04
  4. 4

    Find what it installed

    The download ran at least once. Treat the server as broken into: follow Remove a Crypto-Miner and run this report again.

Check It’s Fixed

Run the security report again. This check should now pass.

More Signs of Compromise Guides

Remove a Crypto-MinerCheck Connections to Mining PoolsCheck Programs in Temporary Folders