Share via

brute for attack detected by defender in pgsql

prasantc 996 Reputation points
2026-04-24T01:48:52.8166667+00:00

Brute force attack showing microsoft ipv6 address as source form azure fd40:891 hitting multiple time to azure psql. How to find this source IPV6 system. Is it from MS services or private endpoint? Is there are way to search for IPV6 source

Azure Database for PostgreSQL

1 answer

Sort by: Most helpful
  1. Q&A Assist
    2026-04-24T01:49:09.68+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    Microsoft Defender for Cloud for Azure Database for PostgreSQL detects and alerts on brute force patterns, including those originating from Microsoft-owned IP ranges.

    When repeated failed logins or credential guessing attempts are detected against Azure Database for PostgreSQL, Defender raises alerts such as:

    • Suspected brute force attack
    • Suspected brute force attack using a valid user
    • Suspected successful brute force attack

    These alerts can appear even if the source IP is a Microsoft/Azure address (including IPv6) because Defender analyzes behavior, not ownership of the IP. A Microsoft or Azure IP can still be the origin of:

    • Legitimate but misconfigured or noisy clients (for example, an app or service repeatedly retrying with bad credentials), or
    • Malicious/unauthorized traffic traversing Azure infrastructure.

    Recommended actions based on the provided context:

    1. Review the Defender alert details
      • In the Azure portal, open Microsoft Defender for Cloud → Security alerts and locate the PostgreSQL brute force alert.
      • Open the specific alert to see details such as database name, server name, application name, event time, and recommended actions.
    2. Verify whether the traffic is expected
      • Check if any Azure services, applications, or automation in the environment use that IPv6 address or subnet to connect to the PostgreSQL server.
      • If the source is a known application, review its connection string and credentials to ensure they are correct and not causing repeated failed logins.
    3. Harden network access
      • Configure network controls so only required clients can reach the PostgreSQL server:
        • Use private endpoints for Azure Database for PostgreSQL so traffic does not traverse the public internet.
        • Disable broad rules such as “Allow access to Azure services” to avoid accepting connections from any Azure subscription.
    4. Enforce secure connections
      • Ensure require_secure_transport is set to on so all connections use SSL/TLS, reducing risk of credential interception.
    5. Enable logging and threat detection best practices
      • Enable diagnostic logging and audit logging (for example, via pgaudit) to capture detailed login attempts and correlate them with Defender alerts.
      • Use Microsoft Defender for Open-Source Relational Databases to continue receiving advanced threat protection and recommendations.
    6. Respond to alerts systematically
      • Use the Defender for Cloud security alerts page to monitor all active threats.
      • Follow the recommended actions in each alert to investigate and mitigate, and, if needed, continue investigations with tools like Microsoft Sentinel.

    If the IPv6 address is not recognized as part of the environment and continues to generate brute force alerts, tighten firewall rules and network access so only explicitly allowed IPs or private endpoints can connect.


    References:

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.