79% vs 51%: independent neobanks lag on app security. Read the report

Product

Product

Host Scan: Review Web Server and Database Configuration on Your Hosts

Host Scan now reviews the configuration of running Apache, NGINX, Tomcat, and IIS web servers and PostgreSQL, MySQL, MariaDB, Oracle Database, Microsoft SQL Server, and MongoDB databases on Linux and Windows hosts.

Host Scan in Ostorlab now reviews the configuration of running web servers and databases on Linux and Windows hosts alongside operating system updates, end-of-life software, host settings, and indicators of compromise. Using read-only commands and queries over SSH or WinRM — and optional Database test credentials — the scan checks four web servers and six database engines in one agentless pass.

One Host Scan from start to result: choose Network, pick the Host Scan profile, add an SSH login and a PostgreSQL Database credential, start the scan and read the web server and database findings under Vulnerabilities. The demo runs 48 seconds.

Why does host hardening stop short of web servers and databases?

Hardening the operating system of a Linux or Windows server does not harden the web server or database running on top of it. A host can have every OS security update installed, an active host firewall, and remote administration restricted to administrators, yet still run:

  • Apache HTTP Server, NGINX, Apache Tomcat, or Microsoft IIS with directory listings, version banners, detailed error pages, or, on Tomcat, an unauthenticated AJP connector enabled.
  • PostgreSQL, MySQL, MariaDB, Oracle Database, Microsoft SQL Server, or MongoDB with TLS turned off, accounts that allow logins without a password or with a default password, audit logging disabled, or host command execution enabled.

External network scans and OS-only host assessments leave a gap between the network perimeter and the running service:

  • External network scans only see exposed ports: A scanner probing from the network cannot inspect a database listening on 127.0.0.1, read authentication rules in pg_hba_file_rules or mysql.user, check whether audit logging is enabled, or review every site configuration on a web server.
  • OS-only host checks stop at packages and host settings: Checking installed packages and /etc/ssh/sshd_config finds missing patches and OS drift, but does not query the running database catalog or read the active web server configuration.
  • Passing database passwords to host commands exposes secrets: Running database checks by passing a password on a remote command line or to a program on the target host risks exposing that password to process listings or shell logs on the scanned server.

What does Host Scan check on web servers and databases?

Host Scan is Ostorlab's credentialed, agentless scan profile for servers, workstations, and network devices. Alongside missing security updates, end-of-life software, OS and device misconfigurations, and indicators of compromise, Host Scan now reviews the configuration of the web servers and databases running on Linux and Windows hosts.

Only running servers are checked: a server that is installed but stopped is not checked. When a host runs several instances of the same product, each one is checked, and a finding is reported when any of them fails a check.

Kind Product Host
Web server Apache HTTP Server, NGINX, Apache Tomcat Linux
Web server Microsoft IIS Windows
Database PostgreSQL, MySQL, MariaDB, Oracle Database, MongoDB Linux
Database Microsoft SQL Server Linux and Windows

For each server, the scan reports the settings that weaken it across six categories:

  • Information disclosure: version banners, detailed error pages, and directory listings.
  • Encryption: old SSL and TLS versions, and connections accepted without TLS.
  • Authentication and access: accounts without a password or with a default password, logins accepted without authentication, and privileges that are too broad.
  • Risky features: features that are not needed and widen the attack surface, such as debugging options and features that run commands on the host.
  • Logging and auditing: logins and connections that are not recorded.
  • Availability: timeouts that keep slow clients connected for too long.

Each finding names the setting and how to fix it.

How does Host Scan check databases without exposing passwords on the host?

During a Host Scan, the scanner logs in to the host over SSH or WinRM, reads the running web server configurations, connects to each running database using either a Database credential or the operating system login, and reports findings under Insecure configuration and Authenticated scan coverage gap.

flowchart TB A["Host Scan over SSH (Linux) or WinRM (Windows)"] --> B["Discover running web servers and databases"] B --> C["Read effective web server configuration (Apache, NGINX, Tomcat, IIS)"] B --> D["Log in to databases via SSH port forward, WinRM script input, or OS account"] C --> E["Run read-only configuration checks and queries"] D --> E E --> F["Report Insecure configuration and Authenticated scan coverage gap findings"] classDef brand fill:#0b2b36,stroke:#438cb2,color:#ffffff,stroke-width:1px; class A,B,C,D,E,F brand;

Web servers need no extra credential:

  • Linux web servers: The scan reads the configuration that the running server uses — running nginx -T, running apache2ctl or httpd with -t -D DUMP_INCLUDES -D DUMP_RUN_CFG, and reading Tomcat server.xml and web.xml files — which requires root through the privilege escalation of the SSH credential. Apache .htaccess files are not checked.
  • Windows web servers: On Windows, the scan reads the effective IIS configuration of every site and application over WinRM, which requires an account in the local Administrators group.

For databases, the login method depends on whether the scan has a Database credential for that engine:

  • With a Database credential on Linux: The scanner opens a port forward through the SSH connection to the TCP port of the database on the host, and logs in with its own database client. The password travels inside the SSH connection and is never given to a program on the host. The SSH server must allow TCP forwarding (AllowTcpForwarding), and the database must listen on TCP, on the loopback address or on the address the scan connects to. On Linux, the scan still needs root to find the running PostgreSQL, MySQL, MariaDB, Oracle, and MongoDB servers and their ports; SQL Server on Linux does not need root.
  • With a Database credential on Windows: A script run over WinRM logs in to SQL Server on the host with SQL Server authentication. The password is passed to the script as input and never appears on a command line or in a connection string.
  • Clear-text protection: The scan refuses database authentication methods that send passwords in clear text or weakly scrambled (such as the PostgreSQL password method), and logs in to MongoDB with SCRAM-SHA-256 (or SCRAM-SHA-1 before MongoDB 4.0).
  • When a database login fails: A server that refuses the forward, does not listen on TCP, or rejects the login is skipped and listed in Authenticated scan coverage gap with the reason. The scan does not retry a rejected login and does not fall back to the login without a credential. Unlike SSH, Windows, and SNMPv3 credentials — which are switched off if 3 different hosts reject them before any login succeeds — a Database credential is tried once on every host where that database runs.

Without a Database credential, the scan logs in through the operating system or Windows account (on Linux, these logins need root through the SSH credential's privilege escalation):

Database How the scan logs in without a Database credential
PostgreSQL Runs the psql client installed with the server, as the operating system user that runs the server, and logs in through the local socket (peer authentication).
MySQL and MariaDB Runs the mysql or mariadb client as root and logs in as the database root account through the local socket (auth_socket or unix_socket), as on Debian and Ubuntu. A server whose root account needs a password is skipped.
Oracle Database Runs sqlplus / as sysdba as the operating system user that runs the instance.
Microsoft SQL Server on Windows Logs in with Windows authentication, as the account of the Windows credential. That account needs a SQL Server login with the VIEW ANY DEFINITION permission, which members of sysadmin have (since SQL Server 2012, the local Administrators group is not a SQL Server administrator by default).
Microsoft SQL Server on Linux Skipped. SQL Server on Linux has no login for an operating system account.
MongoDB Skipped.

How do I run a Host Scan with database credentials?

You can create Database credentials in advance or while setting up a Host Scan — for example, checking a Linux host at 198.51.100.10 and a Windows host at 198.51.100.11:

  1. Prepare a read-only database account. Create a dedicated database account that can only read what the scan checks:
  2. PostgreSQL: Read access to the server settings and to the pg_hba_file_rules view (such as membership in pg_read_all_settings, SELECT on pg_hba_file_rules, and EXECUTE on pg_hba_file_rules()).
  3. MySQL and MariaDB: SELECT on mysql.user (and on mysql.global_priv for MariaDB) and SHOW DATABASES, created for localhost and 127.0.0.1.
  4. Oracle Database: CREATE SESSION, SELECT_CATALOG_ROLE, AUDIT_VIEWER, and SELECT on CDB_USERS_WITH_DEFPWD (on a container database, a C## common user with CONTAINER_DATA = ALL checks every open container; the instance must be listed in /etc/oratab so the scan can ask its listener for the port with lsnrctl status).
  5. Microsoft SQL Server: The VIEW ANY DEFINITION permission.
  6. MongoDB: A user of the admin database that can run getCmdLineOpts, getParameter, and buildInfo.
  7. Create the Database credential. Open Scanning > Test Credentials, click New Credential, and choose Database. Select the Database engine (PostgreSQL, MySQL / MariaDB, Oracle Database, Microsoft SQL Server, or MongoDB), enter the Username and Password, and save. One MySQL / MariaDB credential serves both MySQL and MariaDB servers. When you edit a saved credential later, leave Password empty to keep the stored value.
  8. Enter target IPs and select Host Scan. Click Scan in the top bar, choose Network, enter the IPv4 or IPv6 addresses or ranges under Target IPs (198.51.100.10 and 198.51.100.11, one per line), and click Continue. Select the Host Scan profile and click Continue. For targets on an internal network, choose your on-premises scanner in the Scanner step.
  9. Select host and database credentials and start. In the Host Credentials step, select your SSH or Windows credential together with at most one Database credential per database engine (PostgreSQL, MySQL / MariaDB, Oracle Database, Microsoft SQL Server, or MongoDB), or click Add test credentials and choose SSH, Windows, SNMPv3, or Database to create one now. A Database credential requires an SSH or Windows credential in the same scan. Configure optional Advanced Settings, Custom Checks, Tags, or an Execution window, check the summary on the right, and click Start scan.

What do the Host Scan configuration results mean?

When the scan finishes, open it from Scans and select Vulnerabilities to read the findings.

Finding Risk rating What it means
Insecure configuration Hardening, Low, Medium, or High A web server, database, operating system, or network device setting weakens the host. Rated High when a database lets clients in without a password or with a default password; each finding names the setting and how to fix it.
Authenticated scan coverage gap Info One or more steps on the host did not complete. Lists each skipped web server, database, or view and the reason (such as missing root or Administrator rights, SMB fallback instead of WinRM, refused TCP forward, or a rejected database login).
Authenticated scan could not log in Info None of the attached host credentials could log in to the host, so the host was not reviewed.
  • Read-only by design: The scan runs only a fixed list of read-only commands and queries (SELECT and SHOW statements on SQL databases, read-only sessions on PostgreSQL and MySQL, and getCmdLineOpts, getParameter, and buildInfo on MongoDB). No value read from the host is put into a query. Passwords and password hashes found in a configuration are never kept as evidence, and from Apache and Tomcat the scan keeps only the checked settings, not whole files.
  • Closing findings: When you fix a setting — or grant the access listed in Authenticated scan coverage gap — and scan the host again, its findings close.

What do I need before I start?

Before running a Host Scan for web server and database configuration checks, check four requirements:

  • Plan coverage: Host Scan is available on paid plans that include network scanning. It uses no AI provider and consumes no scan credits.
  • Host access and privilege escalation: On Linux, attach an SSH credential with sudo (or another escalation method) to root; root is required for web servers and for finding running PostgreSQL, MySQL, MariaDB, Oracle, and MongoDB servers and their ports (SQL Server on Linux does not need root). On Windows, attach a Windows credential in the local Administrators group over WinRM (ports 5986 for HTTPS or 5985 for HTTP); over SMB, IIS and SQL Server are skipped and listed in Authenticated scan coverage gap.
  • Network reachability to SSH or WinRM: The scanner must reach port 22 (TCP) for SSH or ports 5986 and 5985 (TCP) for WinRM. Database logins go through the SSH or WinRM session, so no database port needs to be reachable from the scanner.
  • TCP forwarding for Linux Database credentials: When using a Database credential on Linux, the SSH server must allow TCP forwarding (AllowTcpForwarding), and the database must listen on TCP on the loopback address or on the address the scan connects to.

How do I run my first Host Scan with server checks?

Open Ostorlab to create your SSH, Windows, and Database credentials under Scanning > Test Credentials and start a Host Scan on your Linux and Windows hosts. For the step-by-step guide and per-engine database grants, read Scan Hosts and Network Devices and Manage test credentials in the documentation.

Frequently asked questions

Does Host Scan need a Database credential to check every database?

No. Without a Database credential, Host Scan can still check:

  • PostgreSQL, MySQL, MariaDB, and Oracle Database on Linux when the SSH credential escalates to root, through local socket peer authentication, local socket login when database root uses auth_socket or unix_socket, and sqlplus / as sysdba.
  • Microsoft SQL Server on Windows using Windows authentication, when the Windows account has VIEW ANY DEFINITION.

A Database credential is required for MongoDB, for Microsoft SQL Server on Linux, and for MySQL or MariaDB servers whose root account needs a password.

Does the scanner need direct network access to database ports?

No. Database logins go through the host's SSH or WinRM session, so no database port needs to be reachable from the scanner outside SSH or WinRM. On Linux, when you attach a Database credential, the scanner opens a port forward through the SSH connection to the database's TCP port on the host and logs in with its own client without handing the password to a program on the host.

Does Host Scan check stopped web servers or stopped databases?

No. Host Scan only reviews web servers and databases that are running during the scan. Installed servers that are stopped are not checked, and Apache .htaccess files are not checked.

What happens if a Database credential login is rejected?

If a database server refuses the SSH port forward, does not listen on TCP, or rejects the login, that server is skipped and listed with the reason in the Authenticated scan coverage gap (Info) finding while the other servers and the rest of the host are still reviewed. The scan does not retry a rejected login and does not fall back to the login without a credential.

Free scan

Scan your own app for free

or book a demo

Keep reading

Related articles

Browse the blog