Lucene search
+L

Dovecot Detection (POP3/IMAP)

🗓️ 26 Aug 2015 00:00:00Reported by Copyright (C) 2015 SCHUTZWERK GmbHType 
openvas
 openvas
🔗 plugins.openvas.org👁 39 Views

This script checks for the presence of Dovecot in POP3/IMAP servers by analyzing the server banners

Code
# SPDX-FileCopyrightText: 2015 SCHUTZWERK GmbH
# Some text descriptions might be excerpted from (a) referenced
# source(s), and are Copyright (C) by the respective right holder(s).
#
# SPDX-License-Identifier: GPL-2.0-or-later

if(description)
{
  script_oid("1.3.6.1.4.1.25623.1.0.111031");
  script_version("2026-04-01T06:13:17+0000");
  script_tag(name:"last_modification", value:"2026-04-01 06:13:17 +0000 (Wed, 01 Apr 2026)");
  script_tag(name:"creation_date", value:"2015-08-26 12:00:00 +0200 (Wed, 26 Aug 2015)");
  script_tag(name:"cvss_base", value:"0.0");
  script_tag(name:"cvss_base_vector", value:"AV:N/AC:L/Au:N/C:N/I:N/A:N");

  script_tag(name:"qod_type", value:"remote_banner");

  script_name("Dovecot Detection (POP3/IMAP)");

  script_copyright("Copyright (C) 2015 SCHUTZWERK GmbH");
  script_category(ACT_GATHER_INFO);
  script_family("Product detection");
  script_dependencies("imap4_banner.nasl", "popserver_detect.nasl");
  script_require_ports("Services/imap", 143, 993, "Services/pop3", 110, 995);
  script_mandatory_keys("imap_or_pop3/dovecot/detected");

  script_tag(name:"summary", value:"POP3 and IMAP based detection of Dovecot.");

  exit(0);
}

include("host_details.inc");
include("pop3_func.inc");
include("imap_func.inc");
include("port_service_func.inc");

# e.g. for IMAP:
# * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE STARTTLS LOGINDISABLED] Dovecot ready.
# * OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE LITERAL+ STARTTLS LOGINDISABLED] Dovecot (Debian) ready.
#
# * ID ("name" "Dovecot")
#
# or POP3:
# +OK Dovecot ready.
# +OK Dovecot (Debian) ready.
pattern = "Dovecot ([a-zA-Z()]+ )?ready";

ports = imap_get_ports();
foreach port( ports ) {

  banner = imap_get_banner( port:port );
  id_banner = get_kb_item( "imap/fingerprints/" + port + "/id_banner" );

  if( egrep( pattern:pattern, string:banner, icase:TRUE ) ||
      "Dovecot" >< id_banner ) {

    version = "unknown";

    set_kb_item( name:"dovecot/detected", value:TRUE );
    set_kb_item( name:"dovecot/imap/detected", value:TRUE );
    set_kb_item( name:"dovecot/imap/port", value:port );

    # Format used in gb_dovecot_consolidation.nasl is:
    # Detection-Name#--#service#--#port#--#location#--#version#--#concluded
    set_kb_item( name:"dovecot/detection-info", value:"IMAP Banner#--#imap#--#" + port + "#--#" + port + "/tcp#--#" + version + "#--#" + chomp( banner ) );
  }
}

port   = pop3_get_port( default:110 );
banner = pop3_get_banner( port:port );

if( egrep( pattern:pattern, string:banner, icase:TRUE ) ) {

  version = "unknown";

  set_kb_item( name:"dovecot/detected", value:TRUE );
  set_kb_item( name:"dovecot/pop3/detected", value:TRUE );
  set_kb_item( name:"dovecot/pop3/port", value:port );

  # Format used in gb_dovecot_consolidation.nasl is:
  # Detection-Name#--#service#--#port#--#location#--#version#--#concluded
  set_kb_item( name:"dovecot/detection-info", value:"POP3 Banner#--#pop3#--#" + port + "#--#" + port + "/tcp#--#" + version + "#--#" + chomp( banner ) );
}

exit( 0 );

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

01 Apr 2026 00:00Current
5.8Medium risk
Vulners AI Score5.8
39