When something breaks
Was I broken into?
Most checks ask whether a door is locked. This one asks whether someone already came in.
sudo kiyesi breach-check Comparing every system program with the package it came from. Each one is read through, so on a small server this can take a minute…
Kiyesi 0.39.4 · break-in check · nothing leaves this serverweb-2 · Debian 13 · 11 signs checked in 4.9 sDebian 13 gets security fixes until 30 Jun 2030
No signs of a break-in
Checked: system programs against their packages, running programs, whatstarts by itself (cron, systemd, rc.local), accounts, login keys, preloadedlibraries, shell history and the sign-in log.The line under the header says whether the system itself still gets security fixes, and until when, from the end-of-life check: red once they have stopped, because every flaw found after that date stays open and makes a break-in easier.
It needs root, because other users’ schedules, keys and programs can be read only by root; without them, “no signs” would mislead. It is free on every server, with or without an account, and it never sends anything. The same check runs in every scan as Signs of a break-in, so a connected server is checked again and again, and a new sign is an alert.
What it looks for
Section titled “What it looks for”| Sign | What it means | Counts as |
|---|---|---|
| A system program differs from its package | A program in /usr/bin, /usr/sbin, /bin, /sbin or a sign-in module was changed after it was installed: what a backdoor or rootkit leaves. Settings files are left out, since changing those is normal |
Critical |
| A crypto miner is running | By its name, or by a miner’s words in its command line | Critical |
| A program runs from a temporary folder | Started from /tmp, /var/tmp or /dev/shm, where anyone can write and real software is never installed |
Critical |
| Something starts itself from a temporary folder | A cron job, systemd unit or rc.local line that runs a program from one of those folders |
Critical |
| Something downloads code and runs it | An autostart entry that fetches a script and runs it, or hands a shell to another address | Critical |
| A second root account | An account other than root with user id 0 | Critical |
| A library loaded into every program | Anything in /etc/ld.so.preload, the way many rootkits hide |
Critical |
Shell history sent to /dev/null |
A user’s .bash_history points nowhere |
Warning |
| The sign-in log stopped | auth.log or secure empty for a day while the other logs go on |
Warning |
| A new login account | One that was not there at the last scan, pointed out for 7 days | Info (NOTE), no points |
| Login keys changed | A user’s authorized_keys changed in the last 7 days |
Info (NOTE), no points |
Each critical sign takes 15 points off the grade and each warning 5, so a server with a critical sign of a break-in never shows A. An info finding, printed as NOTE, costs nothing: it asks you to confirm the change was your team’s.
When login keys changed
Section titled “When login keys changed”For a key change, the note shows how to tell whose key it is, and who signed in around the time it changed, from the server’s own sign-in log. SSH writes down the key each sign-in used, so a key Kiyesi finds on the server is named by its comment:
1 change to confirm: was it your team?
NOTE root's login keys changed on 24 Oct 2026 Each line in that file opens the server to whoever holds the key. Check the change was someone on your team. Fix: sudo kiyesi keys lists each key's fingerprint and comment. On your own computer, ssh-keygen -lf ~/.ssh/id_ed25519.pub prints yours to compare. Take out a key nobody recognises by deleting its line from that account's authorized_keys file (sudo kiyesi keys lists them); never take out your own last key SSH sign-ins within a day of the change (24 Oct 09:55 UTC): 24 Oct 09:55 root from 192.168.139.3, key SHA256:QMdiYXCz… (ada@laptop)The sign-ins are read and printed on the server; nothing is sent. See who can sign in shows every key across your servers for every key across your servers.
What it reads, and what it sends
Section titled “What it reads, and what it sends”It reads only what the table needs: the system programs and the checksums their packages installed (dpkg’s lists, or rpm -V), each running process’s name, program and command line, the cron tables, systemd’s units and rc.local, /etc/passwd, the dates of authorized_keys files, /etc/ld.so.preload, where .bash_history points, and the size and date of the sign-in and system logs.
A command line is read only to look for a miner’s words. What a scan sends is the sentence: a process’s name and number, a file’s path, an account’s name and a date. Never a command line, a cron line or a file’s contents, which may hold passwords. A one-off kiyesi breach-check sends nothing at all.
Comparing every program with its package can take a few minutes on a large server, so the background agent does it once a day and reuses the answer between scans; a check run by hand always compares afresh.
If it finds a sign
Section titled “If it finds a sign”- Do not wipe the server yet. Take a snapshot at your provider first, so there is evidence of how they got in.
- Change every secret the server held, from another computer. Database passwords, cloud keys, payment and email keys, and the login keys of everyone who used it. Assume each was read.
- Build a fresh server from your code and backups, rather than cleaning this one: a careful attacker leaves more than one way back.
- Close the door they used. Run
sudo kiyesi scanon the new server and fix every critical finding before it takes traffic. - Tell the people who must know, such as your clients or a regulator, if personal or payment data was on the server.
A sign is evidence, not proof: a program can differ after an update stopped halfway, and someone on your team may have added the cron job. Check before you rebuild, and when in doubt, treat it as a break-in.
In a pipeline
Section titled “In a pipeline”kiyesi breach-check exits with code 1 when there is a critical sign, so a script can stop on it. --json prints the result for scripts:
sudo kiyesi breach-check --json