ENGINEERING ★ 11 upvotes 2013

How to find the Rootkit that was used in the Hetzner hack

The Founder's Submission

Direct narrative and submission text authored by @moepstar on Hacker News:

In the meanwhile, it seems that the BKA (German Federal Criminal Police Office) has lifted their ban on speaking about the issue and Martin Hetzner, the founder of hetzner.de, has issued a statement on how to find the rootkit if it has been planted on a server:

- Use gdb to take a RAM-dump of the SSHD process

- Use strings and grep to find one of the following strings:

key=xxx

dhost=xxx

hbt=3600

sp=xxx

sk=xxx

dip=xxx

The following step-by-step instructions should work for Debian-based systems:

aptitude install gdb

gdb --pid=`ps ax|grep "\/usr\/sbin\/sshd"|cut -d" " -f1`

gcore
quit

strings core.XXXXX |grep "key="

If the server's clean, this grep should come up empty.

It seems that as of today it is still unclear how the infection/intrusion has been done in the first place.

Retrospective Overview & Key Insights

Distilled analysis of the business dynamics, operational challenges, and strategic takeaways:

In this technical retrospective (2013), @moepstar shares practical architectural lessons learned from running, scaling, or migrating production software under lean constraints.

Core Principles for Independent Builders:
1
Defaulting to simpler architectures (such as monolithic frameworks, SQLite, or managed VPS) prevents early engineering bankruptcy.
2
Evaluating true compute and egress costs reveals that high cloud bills can often be slashed by 80%+ through judicious re-platforming.
3
Code you write at 2 AM as a solo engineer must be easy to debug six months later without complex microservice dependencies.
Community Debate Themes:

HN engineers debated the tradeoffs between cloud convenience and raw server economics, database indexing strategies, and resisting premature architectural complexity.

Community Discussions & Critical Reviews

High-signal perspectives, counter-arguments, and peer founder insights debated on Hacker News (2 total discussions):

AT @atesti Peer Contributor

I had to use "-f2" instead of "-f1" because "ps ax" showed " 3156 ? Ss 0:00 /usr/sbin/sshd" with a leading space character, probably because by chance my sshd PID was below 10000 and therefore indented

ST @stevekemp Peer Contributor

How about this, which is much simpler:

``` gdb --pid=$(cat /var/run/sshd.pid) ```

HISTORICAL ERA Web 2.0 Genesis (2007–2013)
COMMUNITY SCORE ★ 11 points
TOTAL DISCUSSIONS 2 comments
TOPICS & TECH STACK:
More Retrospectives by @moepstar