A SOC for a 20-PC company: what to automate and what to leave to a human
In a company of 20–50 people, security usually belongs to a part-time sysadmin. There's an antivirus, backups, and, with luck, domain controller logs that nobody reads. A classic SOC with analysts on shift is out of reac
In a company of 20–50 people, security usually belongs to a part-time sysadmin. There's an antivirus, backups, and, with luck, domain controller logs that nobody reads. A classic SOC with analysts on shift is out of reach: one tier-1 analyst costs more than the company's entire IT budget.
I'm a solo developer building a monitoring platform for exactly these companies. Along the way I had to answer the question every small SOC faces: which parts of an analyst's job can rules and playbooks take over, and where do you still need a person? Below is where I ended up, with thresholds, feed lists and code. It should be useful even if you're building your own stack on Wazuh and Shuffle.
What a SOC actually does
Strip away the buzzwords and a SOC does seven things:
- Collects events from workstations, servers and network gear.
- Correlates them, turning thousands of events into one readable alert (SIEM).
- Protects endpoints: sees processes, blocks malware, isolates a host (EDR/XDR).
- Watches for leaks: where documents and personal data go (DLP).
- Checks against threat feeds: IPs, domains and hashes (Threat Intelligence).
- Responds: runs the standard steps for an incident (SOAR).
- Reports: what happened and what needs a manager's decision.
The first six are mostly repetitive work. Look up an IP in the feeds, block an address after a brute-force attempt, quarantine a file, tell the manager about a leak. A tier-1 analyst does this dozens of times per shift, following the same script every time. Those scripts are what you automate first.
Correlation: the thresholds I settled on
The most common event in a small network is password guessing. RDP and SSH exposed to the internet get hammered around the clock, and a rule that fires on every failed login will bury the console under hundreds of alerts a day. So there are three rules, each with its own threshold.
// Network brute force (RDP, SSH): 5 failures in 5 minutes from one address
{ name: "Brute Force Detection", type: "threshold", windowMs: 5 * 60_000, threshold: 5 }
// Local brute force (lock screen, login window, sudo)
{ name: "Local Brute Force", type: "threshold", windowMs: 5 * 60_000, threshold: 10 }
// A successful login right after a run of failures: not guessing anymore, a compromised account
{ name: "Successful Password Guess", category: "account_compromise" }
Why the local threshold is higher: someone who mistyped their own password three times on a Monday morning is far more common than an attacker sitting at a stolen laptop. With the network threshold, the rule would page the admin every time someone forgot to switch keyboard layout.
The third rule is the most valuable one. Brute force on its own means almost nothing; any server with an open port sees it. A successful login right after a dozen failures from the same source means the guessing worked. That event becomes an incident immediately, no threshold involved.
The other baseline rules are simpler: malware execution, data exfiltration, a click on a phishing link, lateral movement, a policy hit in the AI gateway. Each produces an alert, and the XDR engine then groups alerts from the same host into one incident when they fall into the same time window. If EDR and DLP both fire on one machine, you get a single incident, "data leak from an infected host", instead of two alarms in two different places.
Playbooks: what runs without a human
Here's the default set. In my view, this is what's safe to do automatically in a company with nobody on shift.
| Playbook | Trigger | Actions |
|---|---|---|
| Malware Auto-Quarantine | EDR found a malicious file | quarantine file, kill process, scan host, notify |
| Brute Force IP Block | more than 5 failed logins in 5 minutes | block address, notify |
| Phishing Email Quarantine | phishing email detected | quarantine email, warn users |
| Lateral Movement Containment | lateral movement chain | isolate host, lock account, open incident |
| DLP Violation — Manager Notify | critical DLP violation | notify the manager |
| Threat Intel IoC Block | match against a threat feed | kill process, block address, notify |
| Compromised Account Response | login after a brute-force series | block address, open incident, notify |
Host isolation appears in only one playbook, lateral movement. That's deliberate. Isolate the accountant's PC on a false positive on the day tax reports are due, and the company will remember it for a long time. With lateral movement, the cost of waiting beats the cost of a mistake: ransomware can walk every network share within an hour.
An isolated host still keeps its link to the console: the agent leaves itself a channel to the management server so isolation can be lifted remotely. Without that, the first isolation of a remote employee's laptop would turn into a drive to their house. On Linux this is a separate iptables chain:
iptables -N PABION_ISOLATE
iptables -I OUTPUT 1 -j PABION_ISOLATE
iptables -A PABION_ISOLATE -o lo -j ACCEPT # local services
iptables -A PABION_ISOLATE -p udp --dport 53 -j ACCEPT # DNS, to resolve the management server
iptables -A PABION_ISOLATE -p tcp --dport 53 -j ACCEPT
iptables -A PABION_ISOLATE -d <server address> -j ACCEPT # channel to the console
iptables -A PABION_ISOLATE -j DROP # everything else
To release the host, delete the chain. A dedicated chain also leaves alone whatever rules the admin already set up on the machine.
The DLP playbook only notifies the manager and blocks nothing. Whether to fire a salesperson who copied the customer database to a USB stick is not a decision for an algorithm.
Threat feeds you can get for free
Commercial feeds cost money, but open ones are enough for a small company. Here's what I currently pull:
- Feodo Tracker (abuse.ch): botnet C2 servers;
- URLhaus (abuse.ch): URLs and domains distributing malware;
- Spamhaus DROP: netblocks fully given over to malicious activity;
- OpenPhish and phishing-filter: phishing URLs and domains;
- IPsum: addresses that appear on at least three blocklists;
- blocklist.de and CINS Army: addresses seen attacking;
- Emerging Threats compromised IPs;
- ThreatView: high-confidence indicators;
- Tor exit node list: for context, not for blocking.
Feeds refresh twice a day. Two lessons learned:
- Don't block everything. From IPsum I take level 3 (the address is on at least three lists). Levels 1–2 include cloud provider addresses that perfectly legitimate services also use.
- Tor is a reason to look closer, not to block. A work machine talking to a Tor exit node is worth logging, but I wouldn't block it automatically.
DLP without drowning in false positives
The most painful part of a small SOC is DLP. A regex for "11 digits in a row" finds Russian SNILS numbers (the social insurance ID), and along with them phone numbers, order numbers and SKUs. The classic case: a "SNILS leak" that turns out to be a phone number in an email signature.
Three things helped.
Checksums. SNILS, INN (taxpayer ID) and card numbers all have check digits. Check them.
export function snilsOk(raw: string): boolean {
const d = raw.replace(/\D/g, "");
if (d.length !== 11 || /^(\d)\1+$/.test(d)) return false;
const body = d.slice(0, 9);
// numbers up to 001-001-998 have no checksum and were never issued to people
if (Number(body) <= 1001998) return false;
let sum = 0;
for (let i = 0; i < 9; i++) sum += Number(body[i]) * (9 - i);
let ctrl = sum < 100 ? sum : sum === 100 || sum === 101 ? 0 : sum % 101;
if (ctrl === 100) ctrl = 0;
return ctrl === Number(d.slice(9));
}
For cards it's the Luhn algorithm; for INN, the official weights for 10- and 12-digit numbers. A random 11-digit number passes the SNILS check roughly once in a hundred, so the checksum alone removes almost all accidental matches.
Context around the match. The number +79203565057 is 11 digits and could, by pure chance, pass the SNILS checksum. But the plus sign in front says it's a phone number. Ten digits in a row might be a passport, or might be an order number. So a passport only counts if words like "passport", "series", "issued by" or "department code" appear within 60 characters.
case "snils":
// "+7…" is a phone number with a country code, not a SNILS
return !/\+\s*$/.test(before) && snilsOk(value);
case "passport":
return digitsOf(value).length === 10
&& /паспорт|passport|серия|выдан|код подразделения/i.test(window);
Validation in two places. The same validator runs on the agent and on the server. The agent drops false positives before sending anything, and the server re-filters events from agents that haven't updated yet. Without the second check, every rule improvement would mean waiting until every machine updates.
A small trap: \b in JavaScript regexes doesn't treat Cyrillic as word characters. So /\bинн\b/ won't find the word "ИНН" in Russian text, and you have to spell out the boundary yourself: (^|[^a-zа-яё])инн([^a-zа-яё]|$). The same applies to any non-Latin script unless you use the u flag with Unicode property escapes.
Where automation stops
Not everything should be handed to rules. Here's where I think a human is required:
- HR and legal decisions. DLP can show that an employee exported the database. What to do about it is for the manager and maybe a lawyer.
- Isolating servers. Auto-isolating a workstation is acceptable. Isolating the ERP server or the domain controller is a decision to stop the whole company.
- Targeted attacks. If a group is going after the company specifically, playbooks for typical scenarios won't stop it. That calls for an incident response team.
- Critical infrastructure and government systems. Regulated operators need certified tools and usually an in-house or commercial SOC. Automation doesn't replace that.
For a company of up to a couple hundred people without those specifics, I think a platform that handles routine incidents on its own and calls a human only when it matters is enough.
If you build it yourself
You can reproduce all of this with open components:
- Collection and correlation: Wazuh, with agents for Windows, macOS and Linux, rules, and threat feed integration.
- Playbooks: Shuffle or n8n on top of the Wazuh and firewall APIs.
- Threat feeds: the open feeds listed above, directly or via MISP.
- DLP: I haven't found a good open-source option. You'll have to write your own agent or talk to a commercial vendor.
The main cost isn't money but the time to tune and maintain rules. Budget weeks at the start, then a few hours every week.
Wrapping up
I put everything above into one platform, Pabion: an agent for Windows, macOS and Linux plus a web console where SIEM, EDR/XDR, DLP, SOAR and threat feeds work together. The first computer is free if you want to try it on your own network: pabit.ru/pabion.
I'd love to hear your thresholds and playbooks in the comments, especially how you deal with DLP false positives.
Originally published by Dev.to Security. Aggregated on AIWithGhost for educational purposes — full credit and traffic to the original publisher.