Dekka Sentry
An always-on watch over a project's services that tells you when something looks wrong, before you would have noticed.
Dekka Sentry watches a project's apps, services and virtual servers all the time and tells you when something looks wrong, such as a secret file served to a visitor, someone guessing passwords, an access key printed in your logs or a coin miner on a server. Most teams learn they are under attack long after it began, and Sentry is there so that you hear while it is happening.
It reports what it finds and changes nothing. It never stops a service and never turns on lockdown mode, because that decision is yours.
What it does
| Sentry watches | It tells you when |
|---|---|
| Every request to your apps | A file that should never be public, such as .env, is served to a visitor, one source fails to sign in again and again or gets in after failing, or one source works through paths or records one after another. |
| Every line your services print | A secret such as an access key appears in the logs, or server errors surge with no deploy to explain them. |
| Traffic, data sent out and CPU | Any of them is far from what is normal for that service at that hour. |
| Your AI gateway keys | A key is used far more than is normal for it. |
| Your virtual servers | A server sends far more to the internet than it usually does. With the agent installed, also a coin miner, a web server or database that starts a shell, a program run from a temporary folder, a new scheduled job or key for root, a new listening port, or root signing in a new way. |
What it finds is listed on the project's Sentry page as a short note in plain words, like this one.
A file that should never be public was served
web served /.env to a visitor. Treat every secret in that file as known to them, change those secrets now, and stop the file being served.
Beside the note are the service, how often it was seen and when, and the address of the source so that you can block it. A serious finding also emails everyone in the organisation at once.
What raises a finding
Once you turn it on for a project, Sentry reads every request sent to the project's services and every line they print, as they run, for as long as they run. It looks for these:
- A file that should never be public, such as
.envor.git/config, being served to a visitor. This is serious, and it emails everyone at once. - Many failed sign-ins from one source in a few minutes, which is what guessing passwords looks like, and a sign-in that works after ten or more failures from the same source, which is what a guessed password looks like.
- One source asking for dozens of paths that don't exist, or reading dozens of records of one kind one after another.
- One source sending request after request that carries an attack string, such as a path that climbs out of its folder or a piece of SQL, and one source that keeps probing a service for hours, changing what it tries. Sentry is told which kinds of attack string a request carried and never the strings, since the query string of a request is not kept.
- A script your app serves changing size with nothing deployed, which is what a card skimmer added to a real script looks like. An app's code only changes when you deploy, so Sentry learns what each script weighs after a deploy and tells you when one changes in between.
- A server-side script, such as a
.phpfile or a file in a hidden folder, answering where none answered before, which is what an uploaded web shell looks like. - A surge of server errors that no deploy explains.
- A secret, such as an access key, printed in a service's own logs.
After a week of a service's traffic, Sentry also knows what is normal for it at each hour of the day, and tells you about what isn't:
- Far more traffic than usual that lasts a quarter of an hour.
- A jump in how much a service sends out.
- CPU held high for half an hour with no traffic to explain it.
- A virtual server sending far more to the internet than it usually does.
- An AI gateway key making far more requests than is usual for it, which is what a stolen key looks like. Sentry reads how many requests a key made and what they cost, and never a prompt or an answer.
These compare with a service's own past, so a busy day can set them off, and none of them is serious by itself.
What normal means
Normal is never fixed, because a service that is a week old is not the service it will be in a year.
- It keeps learning. What is normal for a service at an hour is mostly its last two weeks at that hour, so a service that grows is followed.
- It learns your week. Once it has four weeks, each hour of each weekday has a normal of its own, so a market day that is busy every week stops being told.
- A level that holds becomes normal. Traffic far above normal is told when it starts. If it is still there a day later it is what the service now does, and Sentry takes it up as the new normal. A launch is told once.
- A short burst doesn't. An hour's flood is left out of what is learned, so the same flood tomorrow is as far from normal as it was today.
- A server's past fades. A program or a port the agent hasn't seen for 45 days is forgotten, so something that ran once while you were setting the server up is new again if it comes back. A scheduled job or a key that is taken away and put back is told again.
Turning Sentry on while a project is still being built is fine. What it learns in those first days is replaced as the project changes.
Signs that point the same way
One finding is often nothing: a source that failed to sign in, a new program on a server. Sentry also reads a project's open findings together. Each sits at a stage of a break-in, which are looking for a way in, getting in, running things, staying, and taking data. When findings at two or more stages are open at once and recent, Sentry raises one serious finding that names them, so that two warnings an hour apart on different services are read as one event. A finding counts for half as much twelve hours after it was last seen, so yesterday's doesn't carry today's.
Scanners ask every public site for the same handful of paths all day. Sentry counts those requests and shows you the number, and it doesn't raise them as findings, so the findings you do get are worth reading.
It reads no personal details
Everything Sentry reads passes through Veil first, so phone numbers, email addresses, Ghana Card numbers and credentials are replaced before any rule sees them. If Veil can't be reached, Sentry reads nothing and waits, and its page says so. The few lines a finding keeps as evidence are also checked for people's names before they are stored.
There is one exception, and it is for you. When a source trips a rule, the finding shows that source's address so that you can block it. Addresses are kept for a day, and no other visitor's address is ever shown.
Dekka's own team sees that a finding was raised, on which project and service, and which rule raised it. They see none of what Sentry read: no path, no source address and no line of your logs. When a finding looks urgent they can email your owners and admins to ask you to look, and that email is sent to you, with what Sentry found, without anyone at Dekka reading it.
Turn it on
Open Sentry in the project's sidebar and choose Turn on Dekka Sentry. It needs an owner or an admin, and it comes with the Starter and Growth plans.
curl -X PUT https://api.dekka.cloud/v1/projects/$PROJECT_ID/sentry \
-H "Authorization: Bearer $DEKKA_API_KEY" \
-H "Content-Type: application/json" \
-d '{"enabled": true}'An API key can turn Sentry on. Turning it off, closing a finding or marking one as expected needs a person signed in to the dashboard, so a key an intruder has taken can't silence it.
Inside a virtual server
Sentry sees a virtual server's traffic from outside and nothing of what runs inside it. To have that watched too, install the Sentry agent. On a new server, tick Install the Dekka Sentry agent when you create it, and the agent is installed when the server first starts and again whenever it is rebuilt. On a server you already have, choose Install the agent beside it on the project's Sentry page, and run the command it gives you on the server. The code in the command works once, for an hour.
Once a minute the agent reports the programs that ran and which program started each, the ports that are listening, where programs connected out to, who signed in over SSH, and what is set to start by itself. The server's kernel tells the agent each time a program starts, so a command that lived for a millisecond is still reported. From that, Sentry tells you about:
- A coin miner, which is serious at once.
- A web server, a cache or a database that starts a shell or fetches a file, and an app that starts a shell it never started before.
- A service account running
whoami,idor the like, which is the first thing an attacker runs to see whether a command got through. - A service account starting many programs it never started before inside a minute, which is what an attack run by a program looks like.
- A web server, a cache or a database connecting out to the internet, or a service account fetching from it, with the address it reached.
- A program running from a temporary folder, or one whose file has been deleted.
- A new or changed scheduled job, start-up script or service that starts with the server, a new key that can sign in as root, a new account, and a program newly given the setuid bit.
- A program or a listening port the agent has not seen before, which is a warning when the program also holds the CPU.
It also tells you when root signs in with a password or with a key not used before, when failed SSH sign-ins flood in, and when the agent itself goes quiet while the server runs, since stopping it is an intruder's first move.
The agent sends a program's path and never its arguments, because arguments carry secrets. Of scheduled jobs, start-up scripts, services and accounts it sends names and a hash of the contents, never the contents, and of root's keys it sends fingerprints. It takes no commands from Dekka and opens no port. It runs as root with two privileges kept. One lets it see other users' programs, which is close to root's own view of what is running. The other lets the kernel tell it each time a program starts, and the agent uses it for nothing else. It cannot write to the disk. The install script is short and worth reading before you run it, and sudo dekka-sentry show prints exactly what the agent would send, without sending it.
To take it off, run sudo dekka-sentry uninstall on the server and choose Remove on the Sentry page.
How you're told
A serious finding emails every member of the organisation at once, at most once an hour for a project. Everything else waits in the dashboard, where the Sentry button in the top bar shows how many findings are open, and goes out in one summary email a day.
To send serious findings to your own systems, add sentry.finding to the events of a project webhook. The event names the rule and the service and carries none of what Sentry read.
What to do with a finding
Each finding says what was seen, on which service, how often and when. From there you can:
- Turn on lockdown mode, offered on a serious finding, if you think someone is inside. It closes the project to everything outside while you fix it.
- Block this source, offered on a finding that names one, refuses every request from that address to the project's web services. See Block a source.
- Close the finding once you've dealt with it. If the same thing happens again, it's a new finding.
- Choose This is expected for something you caused yourself, such as a load test. Sentry then stays quiet about that source or path for thirty days, and speaks again after that.
A finding nothing has added to for a day closes by itself.