How to Find Exposed Databases Using Free OSINT Tools

• BizVuln Expert

Discover how security professionals and MSSPs can leverage free OSINT tools to locate exposed databases before attackers do. This guide covers Shodan, Censys, and manual techniques for identifying unsecured MongoDB, Elasticsearch, and Redis instances across the internet.

How to Find Exposed Databases Using Free OSINT Tools

In the modern threat landscape, exposed databases represent one of the most critical—and preventable—security vulnerabilities. Every week, security researchers and malicious actors alike discover terabytes of sensitive data leaking from misconfigured MongoDB, Elasticsearch, Redis, and PostgreSQL instances. For MSSPs and security consultants, the ability to proactively identify these exposures for clients is not just a value-add; it is a fundamental pillar of a robust security posture. This guide provides a comprehensive, step-by-step methodology for locating exposed databases using free OSINT (Open Source Intelligence) tools, enabling you to conduct reconnaissance, validate client security controls, and demonstrate tangible risk reduction.

Why Exposed Databases Matter to MSSPs

Before diving into the technical workflow, it is essential to understand the business context. A single exposed database can contain personally identifiable information (PII), financial records, authentication tokens, or proprietary intellectual property. For your clients, the consequences range from regulatory fines (GDPR, CCPA, HIPAA) to irreparable reputational damage. For your MSSP, the ability to discover these exposures before a breach occurs positions you as a proactive guardian rather than a reactive incident responder. Free OSINT tools lower the barrier to entry, allowing even small security teams to conduct large-scale reconnaissance without expensive commercial licenses.

Prerequisites and Ethical Considerations

Before you begin scanning, establish a clear ethical and legal framework. Only scan networks and systems for which you have explicit written authorization, typically through a penetration testing agreement or a continuous monitoring contract. Unauthorized scanning, even with free tools, can violate computer fraud laws in many jurisdictions. For MSSP engagements, ensure your Statement of Work (SoW) explicitly covers external reconnaissance and OSINT activities. Additionally, be prepared to handle sensitive data responsibly—if you discover a live, exposed database, follow a coordinated disclosure process with the asset owner.

Tool 1: Shodan – The Search Engine for Internet-Connected Devices

Shodan is arguably the most powerful free OSINT tool for discovering exposed databases. Unlike traditional search engines that index web pages, Shodan indexes banners from services running on open ports. This makes it ideal for identifying database instances that are listening on the public internet.

Basic Shodan Queries for Databases

Shodan uses a filtering syntax that allows you to narrow results by service, port, product, and geographic location. Here are the essential queries for common database types:

Advanced Shodan Filtering

To refine your results for client-specific engagements, layer additional filters:

Pro Tip: Shodan’s free tier limits you to 50 results per query and 1 page of results. For deeper reconnaissance, consider using Shodan’s CLI tool or upgrading to a paid plan. However, even the free tier is sufficient for initial discovery and proof-of-concept demonstrations.

Tool 2: Censys – The Alternative with Rich Metadata

Censys is another excellent free OSINT platform that indexes internet-connected devices. It offers a more structured data model than Shodan, making it easier to query specific service attributes. Censys is particularly strong for discovering databases because it parses TLS certificates, HTTP responses, and service banners into searchable fields.

Essential Censys Queries

Censys uses a Lucene-based query syntax. Here are the equivalents for database discovery:

Using Censys for Client-Specific Reconnaissance

Censys allows you to search by autonomous system number (ASN) or IP range. For example, if your client uses AWS, you can query autonomous_system.organization: "Amazon.com" combined with a database service filter. This helps you identify shadow IT—databases that the client’s IT team may not know are exposed.

Pro Tip: Censys provides a free API with 250 queries per month. Use the API to automate daily or weekly scans for your MSSP clients, generating alerts when new database instances appear in their IP ranges.

Tool 3: Manual Banner Grabbing with Netcat and Nmap

While Shodan and Censys provide a macro-level view, manual banner grabbing is essential for verification and deeper analysis. This approach is particularly useful when you need to confirm that a database is truly unauthenticated and accessible.

Using Netcat for Quick Checks

Netcat (nc) is a simple networking utility available on Linux and macOS. To check a specific IP and port:

echo "" | nc -w 3 203.0.113.50 27017

If the MongoDB instance is unauthenticated, you will receive a response containing the server version and a list of available databases. For Redis:

echo "INFO" | nc -w 3 203.0.113.50 6379

A successful response will return server statistics, including the number of keys and whether authentication is required.

Nmap Scripts for Database Enumeration

Nmap’s scripting engine (NSE) includes dedicated scripts for database discovery and vulnerability assessment. Run these with caution and only on authorized targets:

Pro Tip: Combine Nmap with Shodan results. Export a list of IPs from Shodan, then run targeted Nmap scans to validate the exposure and assess the volume of data at risk.

Tool 4: FOFA – The Chinese OSINT Engine

FOFA (Fingerprinting Organization with Advanced Search) is a lesser-known but highly effective OSINT engine that indexes internet-facing services. It is particularly useful for discovering databases in regions where Shodan and Censys have less coverage, such as parts of Asia and Eastern Europe.

FOFA Queries for Databases

FOFA’s free tier allows up to 10,000 results per query, making it more generous than Shodan for initial reconnaissance. However, the interface is less intuitive for English speakers, so plan to spend time learning the syntax.

Building a Repeatable MSSP Workflow

To operationalize these tools for your MSSP practice, follow this structured workflow:

  1. Define the Scope: Identify the client’s public IP ranges, ASNs, and known cloud providers. Use WHOIS and BGP tools to map their internet footprint.
  2. Run Automated Queries: Use Shodan and Censys APIs to query for all database types within the client’s scope. Schedule these queries weekly.
  3. Validate Findings: For each potential exposure, use Netcat or Nmap to confirm the database is accessible without credentials. Document the response banners.
  4. Assess Data Sensitivity: If the database is truly exposed, attempt to enumerate database names or indices. Do not download or exfiltrate data—simply note the presence of sensitive-sounding names (e.g., "customers", "payments", "users").
  5. Report and Remediate: Provide the client with a prioritized list of exposures, including IP addresses, database types, and evidence of unauthenticated access. Recommend immediate firewall rules, authentication enforcement, and VPN-only access.
  6. Monitor Continuously: Set up recurring scans using cron jobs or a SIEM integration. Alert the client when new database instances appear or when previously secured databases become exposed again.

Common Pitfalls and How to Avoid Them

Even experienced security professionals can make mistakes during OSINT reconnaissance. Here are the most common pitfalls:

Conclusion: From Discovery to Protection

Finding exposed databases using free OSINT tools is a critical skill for any MSSP or security consultant. Shodan, Censys, FOFA, and manual banner grabbing tools provide a powerful arsenal for discovering misconfigured MongoDB, Elasticsearch, Redis, and other database instances before attackers do. By integrating these tools into a repeatable workflow, you can offer your clients continuous monitoring, rapid incident response, and demonstrable risk reduction. Remember, the goal is not just to find exposures—it is to close them. Use these techniques to build trust, demonstrate expertise, and ultimately make the internet a slightly more secure place, one database at a time.

BizVuln helps MSSPs automate this entire workflow. Our platform integrates with Shodan, Censys, and custom Nmap scans to provide a unified dashboard for exposed database discovery, risk scoring, and client reporting. Contact us for a demo.