Back to Blog
Security#security automation#threat detection#Nigeria#SIEM#incident response#DevSecOps#monitoring

From Reactive to Proactive: Security Automation That Pays for Itself

Ekfix Team••Verified Feb 19, 2026

Reactive security means discovering you have been breached after the damage is done. Proactive security means your system surfaces evidence of attempted or active attacks in time to respond. The difference is automation, not headcount.

→ SecurityFrom Reactive to Proactive:Security Automation That Paysfor ItselfEkfix

Disclaimer

This article is for educational purposes only and does not constitute legal, financial, or professional advice. Compliance requirements vary by industry and jurisdiction. Consult a qualified professional for guidance specific to your organisation. Information was accurate at the time of writing — verify current regulations with the relevant authorities.

From Reactive to Proactive: Security Automation That Pays for Itself

Most security incidents are not sudden — they develop over time, leaving evidence at each stage. An attacker who eventually exfiltrates your customer database almost always began by successfully guessing a credential, then explored your network, then escalated privileges, then identified target data, then exfiltrated it. That sequence takes hours, days, or weeks. At each step, evidence exists in logs.

The difference between organisations that detect and contain incidents and those that discover them months later from a third-party notification is whether automated systems are processing that log evidence and surfacing anomalies, or whether the logs are being written to storage that no one is reading.

This article covers the specific automated detection controls that prevent or limit the damage from the most common attack patterns against Nigerian businesses — and what each costs to implement.


Control 1: Failed Authentication Alerting

What it prevents: Credential stuffing and brute-force attacks. An automated attacker attempts thousands of username/password combinations; a small percentage succeed.

Detection logic: More than five failed authentication attempts from the same IP address within a ten-minute window is anomalous. More than twenty failed attempts across different usernames from the same IP within an hour is credential stuffing.

Automated response: On trigger — alert the security team, add the source IP to a temporary blocklist, and (for the highest-sensitivity systems) require the targeted account to complete an additional verification step at next login.

Implementation: Most authentication providers (Auth0, Clerk, Firebase Auth, or custom implementations) support event webhooks on failed authentication. Route these events to your alerting layer. Cloudflare WAF rate limiting rules handle IP-based blocking at the edge without application changes.

Cost: One to two days of engineering time for alerting integration. Cloudflare WAF rate limiting is included in the Cloudflare Pro plan (approximately $20/month).

What you are preventing: A credential stuffing attack that succeeds on 0.1% of attempts against a database of ten thousand credentials compromises ten customer accounts. Those accounts are then used for fraud, account takeover, or held for ransom. Average cost per compromised account in financial services: ₦180,000 (fraud losses plus remediation).


Control 2: Impossible Travel Detection

What it prevents: Account takeover by attackers operating from different geographic locations than the legitimate user.

Detection logic: A user authenticates from Lagos at 09:00. An authentication event for the same account from an IP geolocating to Eastern Europe at 09:45 is physically impossible — the user cannot have travelled between those locations in forty-five minutes.

Automated response: Require MFA reverification on the new session. If MFA is unavailable or fails, suspend the session and alert the security team with both authentication events' details.

Implementation: Store the IP address and geolocation of each authentication event. On new authentication, compute the distance and elapsed time from the previous event. A velocity check — distance / time > threshold — flags impossible travel.

async function checkImpossibleTravel(userId: string, newIp: string): Promise<boolean> {
  const lastAuth = await getLastAuthentication(userId)
  if (!lastAuth) return false
  
  const newLocation = await geolocateIp(newIp)
  const distanceKm = haversineDistance(lastAuth.location, newLocation)
  const elapsedHours = (Date.now() - lastAuth.timestamp) / 3_600_000
  const velocityKmH = distanceKm / elapsedHours
  
  return velocityKmH > 900 // faster than commercial aviation
}

Cost: Half a day of engineering time. IP geolocation API (IPinfo, MaxMind) costs approximately $60–150/year for commercial use.


Control 3: Bulk Data Access Detection

What it prevents: Insider data exfiltration and external attackers who have gained authenticated access and are enumerating your database.

Detection logic: A customer service representative who normally views fifteen customer records per day viewing three hundred records in two hours is anomalous. A background job querying your customer table with no WHERE clause is anomalous. An authenticated API call returning a ten-thousand-record result set to a previously unseen IP is anomalous.

Automated response: Alert immediately. For the highest-sensitivity scenarios (bulk export of PII), automatically log out the session and require manager approval for session restoration.

Implementation: Instrument your API layer to log the count of records returned per request alongside the authenticated user identity. Compute rolling averages per user and flag sessions that exceed three standard deviations from the user's normal activity pattern. For absolute limits, reject API requests that would return more than a configurable threshold of records without an explicitly approved export request.

Cost: One to three days of engineering time to add response cardinality logging and rolling baseline computation.

What you are preventing: A data exfiltration event involving a hundred thousand customer records has an average cost of ₦180M in Nigerian financial services (NDPR notification cost, regulatory response, customer remediation, reputational impact). The engineering cost of this control is two orders of magnitude smaller.


Control 4: Dependency Vulnerability Scanning in CI/CD

What it prevents: Known-vulnerability exploitation. The Log4Shell vulnerability (2021), the Heartbleed vulnerability (2014), and dozens of high-severity package vulnerabilities since then have been exploited in production systems where the vulnerable package was present because no one had updated it.

Detection logic: Every software project has a dependency tree. Security researchers and the National Vulnerability Database continuously publish known vulnerabilities in open-source packages. Automated scanning checks your dependency versions against the published vulnerability database.

Automated response: Block CI/CD deployment when critical or high-severity vulnerabilities are detected in production dependencies. Alert the engineering team with the affected package, the vulnerability description, and the updated version that resolves it.

Implementation: GitHub Dependabot is available for free in all GitHub repositories and provides automated dependency vulnerability alerts and pull requests. For custom CI/CD pipelines, npm audit, pip-audit, and equivalent tools run as pipeline steps. Snyk and Dependabot are the most common commercial scanning services at $100–400/year for small teams.

Cost: Near zero for basic implementation (Dependabot is free). One day to integrate scanning results into deployment gates.

What you are preventing: Web application exploits via known package vulnerabilities. The OWASP Top 10 lists vulnerable and outdated components as a top-ten web application security risk category. A significant fraction of successful web application attacks exploit known vulnerabilities in unpatched dependencies.


Control 5: Infrastructure Change Monitoring

What it prevents: Unauthorised infrastructure changes, insider threat, and detecting when an attacker has escalated to cloud console access.

Detection logic: Infrastructure changes — new IAM role created, security group rule changed, S3 bucket made public, new user with admin permissions — outside of deployment windows or by identities not expected to make such changes are anomalous.

Automated response: Immediate alert to the security team with the identity, the change made, and the time. For specific high-risk changes (IAM admin grant, bucket public access enabled), automatic rollback where feasible.

Implementation: AWS CloudTrail, GCP Audit Logs, and Azure Activity Log capture all control plane operations. Route these event streams to your alerting layer (CloudWatch Events, Pub/Sub, or equivalent) with rule-based filtering for the change types that warrant alerts. For Cloudflare-based infrastructure, Cloudflare's Audit Log API provides equivalent visibility on DNS changes, firewall rule modifications, and worker deployments.

Cost: Cloud audit logging is typically included in the cloud provider's base service. Event routing and alerting costs $10–50/month depending on event volume and alerting service.


Control 6: SSL/TLS Certificate Expiry Monitoring

What it prevents: Service outages from expired certificates. An expired SSL certificate produces browser warnings that immediately damage user trust and, for payment-related properties, cause transaction abandonment.

Detection logic: Monitor certificate expiry dates across all production domains. Alert thirty, fourteen, and three days before expiry.

Automated response: Thirty-day alert to the infrastructure team. Fourteen-day alert escalated to the engineering lead. Three-day alert treated as an incident.

Implementation: Certificate monitoring services (Uptime Robot, Better Uptime, StatusCake) include certificate expiry checking. Cloudflare manages certificate renewal automatically for proxied domains. For certificates managed outside Cloudflare, automated renewal via Let's Encrypt with Certbot eliminates the category entirely.

Cost: Certificate renewal automation: free (Let's Encrypt). Monitoring: $0–20/month depending on service.


Assembling the Monitoring Stack

Each of these controls independently reduces a specific attack success probability. Together, they constitute a proactive monitoring posture that surfaces evidence of attacks in progress rather than recording the damage after the fact.

The recommended assembly for a Nigerian SMB:

  1. Authentication failure alerting: PagerDuty or Slack webhook + Cloudflare WAF rate limiting
  2. Impossible travel: Custom detection in your auth layer + Slack alert
  3. Bulk data access: Application-layer instrumentation + email and Slack alert
  4. Dependency scanning: GitHub Dependabot + deployment gate
  5. Infrastructure change monitoring: Cloud provider audit log + SNS/Pub/Sub → Slack
  6. Certificate monitoring: Uptime Robot or Cloudflare

Total ongoing cost for a company at ₦200M–₦1B revenue: ₦200,000–₦500,000 per year. Total engineering implementation time: five to ten days for initial setup, two to four hours per month for tuning and review.

The cost-benefit calculation does not require a sophisticated model. A single prevented breach — which, at the realistic cost range of ₦15M–₦150M for Nigerian SMBs — pays for years of this monitoring investment. The question is not whether the investment is justified; it is why it has not already been made.

The answer is usually that security monitoring is invisible when it works and only visible when it fails. The businesses that implement this posture are the ones whose leadership has decided to pay for operational security rather than to discover the cost of not having it.


Related Articles