Home/Services/Database Security & Hardening
security service

Database Security & Hardening

Database security hardening for MySQL, PostgreSQL, MongoDB, MS SQL and Oracle: CIS baselines, least privilege and encryption. Get a fixed project quote.

Manual, expert-ledEvidence-based findingsFree remediation retest

Database security hardening is what stands between a stolen application password and every record your business holds. We lock down MySQL, PostgreSQL, MongoDB, Microsoft SQL Server and Oracle to a measured baseline, so a breach of one component does not hand an attacker the whole dataset.

The database is where the value sits. Customer records, credentials, payment tokens, intellectual property. It is also, in most of the environments we assess, the least hardened layer, because it lives behind the application and rarely gets direct attention. That neglect is why so many breaches escalate from a minor foothold to a full data theft: the app account has far more access than it needs, the service listens on a public port, and nothing is logged. Hardening closes those gaps deliberately rather than hoping the application layer never fails.

What database security hardening actually covers

This is a scoped engagement, not a checkbox. We assess your databases against a recognised baseline, fix what matters in priority order, and verify the result. The work is hands-on configuration and design review, not a scanner report handed over without context.

Assessment against CIS Benchmarks for your specific database engine and version
Least-privilege review of every application and admin account
Removal of default, anonymous and unused accounts
Network isolation so no database is reachable from the public internet
TLS for connections and encryption at rest for the data itself
Audit logging that records who touched what, and when
Encrypted, tested backups and a documented recovery path

Why the database is the layer attackers really want

An attacker who phishes an employee or exploits a web flaw has a foothold, not a payday. The payday is the data. Everything they do next is aimed at reaching the database and getting records out. If your database is hardened, that final step is where the attack stalls, which is exactly where you want it to stall.

Over-privileged application accounts

The most common finding we report is an application connecting to its database as a near-admin user. It works, so nobody questions it, but it means a single SQL injection or a leaked connection string gives an attacker the ability to read every table, write to any of them, and often run administrative commands. Right-sizing that account to the exact tables and operations the app needs turns a catastrophic flaw into a contained one.

Databases exposed to the open internet

Internet-wide scans constantly find MySQL on 3306, PostgreSQL on 5432 and MongoDB on 27017 answering to anyone. Unauthenticated or weakly-authenticated MongoDB instances in particular have leaked billions of records over the years. A database should almost never be reachable from the public internet, and closing that exposure is one of the highest-value changes we make. Attackers do not need to find you; automated tooling indexes every open database service on the internet and lists them for anyone to browse, so an exposed instance is discovered in hours, not months. Pulling it behind the application tier removes it from that map entirely.

How we harden your databases

Every engagement follows the same arc, sized to how many databases and engines are in scope. You get a clear picture of where you stand before any change is made, and proof that the changes held afterwards.

Assessment against a baseline

We measure your configuration against the CIS Benchmark for your engine and version, covering authentication, privileges, network settings, logging, encryption and file permissions. The output is a ranked list of gaps with the real-world impact of each, so you can see what is a genuine risk versus what is cosmetic.

Access and privilege redesign

We map who and what connects to each database, then rebuild the grants around least privilege. Application accounts get only the tables and operations they use. Administrative access is separated from day-to-day access, default and anonymous accounts are removed, and strong authentication is enforced. For an Oracle database security review, that includes profile and role work specific to the platform; for MongoDB it means role-based access control done properly rather than an open admin user.

Secrets out of plaintext config

Database passwords sitting in a readable configuration file or committed to a repository undo the rest of the work. We move credentials into a secrets manager or protected store and rotate anything that has been exposed, so a leaked file no longer equals a leaked database.

Network isolation and encryption

We put the database behind the application tier where the internet cannot reach it, restrict access to known hosts, and require TLS for connections so credentials and data are not readable on the wire. Encryption at rest protects the underlying files and backups, which matters both for a stolen disk and for GDPR obligations around data-at-rest.

Audit logging and monitoring

A database that keeps no record of access cannot tell you whether it was breached, or what was taken if it was. We enable audit logging appropriate to the engine, capture privileged actions and failed logins, and route those logs somewhere they cannot be quietly wiped by an intruder covering their tracks.

5
engines covered: MySQL, PostgreSQL, MongoDB, MS SQL, Oracle
CIS
Benchmark baseline, not a vague best-effort tidy-up
Free
verification retest after you apply the fixes
Get a fixed quote

Want this tested on your own systems?

Free 20-minute scoping call, a fixed price with no hourly surprises, and a free retest once you fix what we find.

Get a fixed quote

The database engines we work with

Hardening is engine-specific. A control that matters on Oracle has a different name and mechanism on PostgreSQL, and MongoDB’s document model needs a different approach again.

MySQL and MariaDB

We address the classic weak spots: the validate-password plugin, removal of the anonymous and test accounts left by a default install, secure-file-priv to stop file-based data theft, and grants that are almost always broader than the application needs.

PostgreSQL

Here the focus is the host-based authentication configuration, role and schema privileges, connection encryption, and turning on the logging that ships disabled. Public schema permissions in particular catch a lot of teams out.

MongoDB

The recurring disaster is an instance with authentication effectively off and a public bind address. We enforce authentication, apply role-based access control, bind to internal interfaces only, and enable TLS, which together close the exposure behind the majority of MongoDB data leaks.

Microsoft SQL Server and Oracle

For these enterprise engines we work through the platform’s own security model: server and database roles, transparent data encryption, secure authentication modes, surface-area reduction, and the audit features each provides. An Oracle database security hardening pass covers profiles, privilege analysis and the settings that a CIS Benchmark for Oracle calls out.

What you get

The deliverable is written to be used, not filed. It works for the engineer who has to apply the fixes and for the manager who has to sign off the risk.

A report your team can act on

You receive a findings report that ranks each gap by real impact, explains why it matters in plain terms, and gives the exact configuration change to close it. Where we implement the fixes ourselves, the report records what changed and confirms the state afterwards. There is an executive summary for leadership and the technical detail for whoever owns the database, so nobody has to translate between the two.

A hardening baseline you can keep

Beyond the immediate fixes, you get a documented secure configuration for your engine that new databases can be built against. That turns hardening from a one-time cleanup into a standard your team applies going forward, which is what keeps the next database from starting life with the same weak defaults.

Verification retest

After you apply the remediation, we retest to confirm the gaps are genuinely closed and nothing regressed. This is included, not billed as a second engagement, because a fix you cannot prove is a fix you cannot trust.

How database hardening supports compliance

Regulators and auditors treat the database as the crown jewels, and the controls we implement line up directly with what they ask for.

The frameworks this maps to

Encryption at rest and in transit, access control and logging are core to ISO 27001, and they satisfy PCI DSS 4.0 requirements for any database that stores or processes cardholder data. GDPR expects appropriate technical measures for personal data, which encryption and least-privilege access directly address, and SOC 2 auditors look for exactly this kind of documented control over data stores. The assessment report is written so it can support those reviews rather than sitting on a shelf.

Pricing

Database hardening is a fixed-price project scoped by how many databases and engines are in play and whether you want us to implement the fixes or hand your team a plan. Every engagement includes the assessment, a prioritised remediation plan and a verification retest.

Engagement What’s included Timeline Price
Assessment Single database engine, CIS-based configuration review, prioritised findings with impact, remediation plan for your team 3–5 working days from €1,200
Harden & implement One or two databases, assessment plus hands-on hardening, access redesign, encryption and logging, verification retest 5–9 working days €2,500–€6,000
Multi-engine estate Several databases across mixed engines, full hardening and network isolation, secrets migration, documentation 2–4 weeks €6,000–€15,000
Compliance add-on Mapping and attestation letter for PCI DSS, ISO 27001, SOC 2 or GDPR data-at-rest with any tier from €800
Custom / large estate Enterprise environments, clustered or cloud-managed databases, scoped after a free call on scoping custom

Every engagement is fixed-price, quoted after a free 20-minute scoping call, with no hourly surprises and a verification retest included. Get a fixed quote

FAQ

How much does database security hardening cost?
An assessment of a single engine starts from €1,200, and a full hardening project with hands-on implementation runs higher depending on how many databases and engines are involved. You get a fixed price after a free scoping call, so the database security hardening cost is agreed before any work starts.
Will hardening take my database offline or break the application?
No. We test privilege and configuration changes carefully, apply them in a controlled window, and confirm the application still works at each step. Where a change could affect availability, we agree it with you in advance and can schedule it out of hours.
Which database engines do you cover?
MySQL and MariaDB, PostgreSQL, MongoDB, Microsoft SQL Server and Oracle. The hardening is engine-specific, including an Oracle database security hardening pass that covers profiles, privilege analysis and the platform’s own encryption and audit features.
Do you fix the problems, or just report them?
Either. The Assessment tier hands your team a prioritised remediation plan, while the Harden and implement tiers include us doing the work. Both finish with a verification retest so you have proof the gaps were actually closed.
Does this satisfy PCI DSS or GDPR requirements for our data?
Yes. Encryption at rest and in transit, least-privilege access and audit logging map directly to PCI DSS 4.0 and to the technical measures GDPR expects for personal data. We can add an attestation letter written for your specific framework.
Can you review our cloud-managed databases, like RDS or Azure SQL?
Yes. Managed cloud databases still leave you responsible for access control, network exposure, encryption settings and logging, and those are exactly the areas we review and harden alongside the engine configuration itself.
How does this relate to a penetration test?
A pentest tries to break in and shows you what is exploitable; hardening changes the configuration so there is less to exploit. They complement each other. Many clients harden the database first, then have us confirm the result holds under a targeted test.
Is what you find kept confidential?
Yes. Every engagement runs under an NDA, findings are shared over secure channels, and access to your systems is limited to what the work requires and revoked when it ends.

Related services

Who needs this

Any business whose database holds customer records, payment data or sensitive information and which has never had that layer properly locked down, teams preparing for a PCI DSS, ISO 27001 or SOC 2 audit, and anyone who has learned from a scare that the application password was the only thing standing between an attacker and every record they hold.

why safetybis

Security you can prove

The same standard on every engagement, big or small.

Evidence, not opinions

Every finding ships with a reproduction and proof of concept — no vague "maybe vulnerable".

Humans over scanners

Certified engineers find the logic flaws and chained attacks automated tools walk straight past.

Fixed price, free retest

You know the cost up front, and verifying the fix is part of the deal — not a second invoice.

500+
assessments delivered
<30min
incident first response
12k+
infections removed
98%
fixed within one retest
$ safetybis quote --service "Database Security & Hardening"

Ready to lock this down?

Free scoping call, fixed price, free retest. Tell us what you're running and we'll take it from there — usually within one business day.

get in touch

Tell us what you're running

Scoping is free. We reply within one business day, and under 30 minutes for active incidents.