rackAID Logo
Client Login:
Password:

Resources Resources » rackaid blog »  Server Dysfunction  »  Hackers and Cron
Search:

Resources

rackAID Blog: Server Dysfunction

Hackers and Cron

November 30, 2007 2:14 PM

Got some hacker program that keeps relaunching itself? Cannot find the source? Well, you may want to check cron. Recently, we've seen several attacks where hackers have setup cron jobs to relaunch their toolkits.

Over the past month, we've investigated about a half dozen incidents where a hacker-related process, typically an IRC bot, was running on a server. If we killed the process, it would re-spawn within minutes.


In some cases, we had already removed the PHP scripts that led to the initial exploit, so seeing the process relaunch was suspect. They had to be relaunching the process somehow. Even Apache offline, the process would re-launch. This made me suspect a cron job or similar trick.

In several cases, we've found cronjobs setup under the apache user. The attackers had used PHP shell kit to setup a cron job under the apache user. As a result, they could continually re-launch their IRC bots anytime the server admin killed them off.

After patching up the system, we wanted to prevent this trick from being used in the future. This is where cron access control comes in handy.

On Red Hat systems, you can limit who uses cron with /etc/cron.allow and /etc/cron.deny options. By adding the apache user to /etc/cron.deny, you can block hackers from setting up a cron job as apache.

For more details on cron access control, see the Red Hat documentation.

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

To reduce spam, we use a Captcha system. Please enter the letters in the image into the box to post your comments.


Type the characters you see in the picture above.

Add to Technorati Favorites

©2000-2007 rackAID LLC