Total loss: a hacked server on the operating table

Summary

At the Chemnitz Linux Days 2013, Peer Heinlein of Heinlein Support presented the step-by-step investigation of a real hacked root server. The case was a textbook example of backdoors, rootkits and what attackers do with them. The talk explained how to recognise break-ins, how rootkits work and which signs of manipulation should not be overlooked.

What is a rootkit?

A rootkit is malware that hides on the system after a break-in and secures permanent access for the attacker. It can replace system programs such as ps, ls or netstat so that they no longer show the attacker’s processes and files. Modern variants even embed themselves in the kernel.

This makes investigation difficult: on a compromised system, no tool can be trusted any more. Traces are more likely to be found through deviations, such as unexpected network connections, changed checksums of system files or gaps in logs.

What you can learn from it

The most important lesson from such cases is uncomfortable: a hacked server cannot be reliably cleaned. It has to be reinstalled, and all credentials that were stored or used there have to be replaced. The investigation serves to find the way in so that it is closed on the new system.

Ideas

  • Rootkits hide attackers’ processes, files and connections.
  • Traces of a break-in often show up as deviations from the normal state.
  • A real incident is particularly well suited as a teaching example.

Insights

  • On a compromised system, no tool can be trusted any more.
  • A hacked server has to be reinstalled; cleaning it is not enough.

Facts

  • The speaker was Peer Heinlein, managing director of Heinlein Support GmbH.
  • A real incident on a root server was investigated.
  • Linux server administration was expected as prior knowledge.

References

Remarks

  • Audio recordings of the talk are available on the Chemnitz Linux Days programme page.

Recommendations

  • If you suspect a break-in, first create an image of the system and examine it from a clean computer.
  • After a break-in, replace all passwords and keys that were stored or used on the system.

Open the programme item

Search the Web Archive

Found a mistake or have something to add? Get in touch.