phpBB viewtopic.php highlight Parameter SQL Injection (ESMARKCONANT) - Nessus

Critical   Plugin ID: 15780

This page contains detailed information about the phpBB viewtopic.php highlight Parameter SQL Injection (ESMARKCONANT) Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 15780
Name: phpBB viewtopic.php highlight Parameter SQL Injection (ESMARKCONANT)
Filename: phpbb_login_form_sql.nasl
Vulnerability Published: 2004-11-12
This Plugin Published: 2004-11-22
Last Modification Time: 2022-04-11
Plugin Version: 1.23
Plugin Type: remote
Plugin Family: CGI abuses
Dependencies: phpbb_detect.nasl
Required KB Items [?]: www/phpBB

Vulnerability Information


Severity: Critical
Vulnerability Published: 2004-11-12
Patch Published: N/A
CVE [?]: CVE-2004-1315
CPE [?]: cpe:/a:phpbb_group:phpbb
In the News: True

Synopsis

A remote web application is vulnerable to SQL injection.

Description

The remote host is running phpBB. There is a flaw in the remote software that could allow anyone to inject arbitrary SQL commands in the login form. An attacker could exploit this flaw to bypass the authentication of the remote host or execute arbitrary SQL statements against the remote database.

ESMARKCONANT is one of multiple Equation Group vulnerabilities and exploits disclosed on 2017/04/14 by a group known as the Shadow Brokers.

Solution

Upgrade to the latest version of this software.

Public Exploits


Target Network Port(s): 80
Target Asset(s): Services/www
Exploit Available: True (Metasploit Framework, Exploit-DB, GitHub)
Exploit Ease: No exploit is required

Here's the list of publicly known exploits and PoCs for verifying the phpBB viewtopic.php highlight Parameter SQL Injection (ESMARKCONANT) vulnerability:

  1. Metasploit: exploit/unix/webapp/phpbb_highlight
    [phpBB viewtopic.php Arbitrary Code Execution]
  2. Exploit-DB: exploits/php/webapps/647.pl
    [EDB-647: phpBB 2.0.10 - Remote Command Execution]
  3. Exploit-DB: exploits/php/webapps/12510.php
    [EDB-12510: PHP-Nuke 7.0/8.1/8.1.35 - Wormable Remote Code Execution]
  4. Exploit-DB: exploits/php/webapps/16890.rb
    [EDB-16890: phpBB - 'viewtopic.php' Arbitrary Code Execution (Metasploit)]
  5. GitHub: https://github.com/Drift-Security/Shadow_Brokers-Vs-NSA
    [CVE-2004-1315]
  6. GitHub: https://github.com/R3K1NG/ShadowBrokersFiles
    [CVE-2004-1315]
  7. GitHub: https://github.com/antiscammerarmy/ShadowBrokersFiles
    [CVE-2004-1315]
  8. GitHub: https://github.com/cipherreborn/SB--.-HACK-the-EQGRP-1
    [CVE-2004-1315]
  9. GitHub: https://github.com/happysmack/x0rzEQGRP
    [CVE-2004-1315]
  10. GitHub: https://github.com/kongjiexi/leaked2
    [CVE-2004-1315]
  11. GitHub: https://github.com/maxcvnd/bdhglopoj
    [CVE-2004-1315]
  12. GitHub: https://github.com/r3p3r/x0rz-EQGRP
    [CVE-2004-1315]
  13. GitHub: https://github.com/shakenetwork/shadowbrokerstuff
    [CVE-2004-1315]
  14. GitHub: https://github.com/thePevertedSpartan/EQ1
    [CVE-2004-1315]
  15. GitHub: https://github.com/thetrentusdev/shadowbrokerstuff
    [CVE-2004-1315]
  16. GitHub: https://github.com/thetrentus/ShadowBrokersStuff
    [CVE-2004-1315]
  17. GitHub: https://github.com/wuvuw/EQGR
    [CVE-2004-1315]
  18. GitHub: https://github.com/x0rz/EQGRP
    [CVE-2004-1315]

Before running any exploit against any system, make sure you are authorized by the owner of the target system(s) to perform such activity. In any other case, this would be considered as an illegal activity.

WARNING: Beware of using unverified exploits from sources such as GitHub or Exploit-DB. These exploits and PoCs could contain malware. For more information, see how to use exploits safely.

Risk Information


CVSS V2 Vector [?]: AV:N/AC:L/Au:N/C:P/I:P/A:P/E:H/RL:OF/RC:C
CVSS Base Score:7.5 (High)
Impact Subscore:6.4
Exploitability Subscore:10.0
CVSS Temporal Score:6.5 (Medium)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:6.5 (Medium)
CVSS V3 Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:H/RL:O/RC:C
CVSS Base Score:9.8 (Critical)
Impact Subscore:5.9
Exploitability Subscore:3.9
CVSS Temporal Score:9.4 (Critical)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:9.4 (Critical)

Go back to menu.

Plugin Source


This is the phpbb_login_form_sql.nasl nessus plugin source code. This script is Copyright (C) 2004-2022 Tenable Network Security, Inc.

#%NASL_MIN_LEVEL 70300
#
# (C) Tenable Network Security, Inc.
#

include('deprecated_nasl_level.inc');
include('compat.inc');

if (description)
{
  script_id(15780);
  script_version("1.23");
  script_set_attribute(attribute:"plugin_modification_date", value:"2022/04/11");

  script_cve_id("CVE-2004-1315");
  script_bugtraq_id(11716);
  script_xref(name:"CERT", value:"497400");
  script_xref(name:"EDB-ID", value:"647");

  script_name(english:"phpBB viewtopic.php highlight Parameter SQL Injection (ESMARKCONANT)");

  script_set_attribute(attribute:"synopsis", value:
"A remote web application is vulnerable to SQL injection.");
  script_set_attribute(attribute:"description", value:
"The remote host is running phpBB. There is a flaw in the remote
software that could allow anyone to inject arbitrary SQL commands in
the login form. An attacker could exploit this flaw to bypass the
authentication of the remote host or execute arbitrary SQL statements
against the remote database.

ESMARKCONANT is one of multiple Equation Group vulnerabilities and
exploits disclosed on 2017/04/14 by a group known as the Shadow
Brokers.");
  script_set_attribute(attribute:"solution", value:
"Upgrade to the latest version of this software.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P");
  script_set_cvss_temporal_vector("CVSS2#E:H/RL:OF/RC:C");
  script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H");
  script_set_cvss3_temporal_vector("CVSS:3.0/E:H/RL:O/RC:C");

  script_set_attribute(attribute:"exploitability_ease", value:"No exploit is required");
  script_set_attribute(attribute:"exploit_available", value:"false");
  script_set_attribute(attribute:"metasploit_name", value:'phpBB viewtopic.php Arbitrary Code Execution');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
  script_set_attribute(attribute:"in_the_news", value:"true");

  script_set_attribute(attribute:"vuln_publication_date", value:"2004/11/12");
  script_set_attribute(attribute:"plugin_publication_date", value:"2004/11/22");

  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:phpbb_group:phpbb");
  script_set_attribute(attribute:"thorough_tests", value:"true");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_family(english:"CGI abuses");

  script_copyright(english:"This script is Copyright (C) 2004-2022 Tenable Network Security, Inc.");

  script_dependencies("phpbb_detect.nasl");
  script_require_keys("www/phpBB");
  script_require_ports("Services/www", 80);

  exit(0);
}

# Check starts here
include("global_settings.inc");
include("misc_func.inc");
include("http.inc");

port = get_http_port(default:80);

kb = get_kb_item("www/" + port + "/phpBB");
if ( ! kb ) exit(0);

matches = eregmatch(pattern:"(.*) under (.*)", string:kb);
version = matches[1];

if ( ereg(pattern:"^([01]\.|2\.0\.([0-9]|10)([^0-9]|$))", string:version ) )
{
	security_hole(port);
  set_kb_item(name: 'www/'+port+'/SQLInjection', value: TRUE);
}

The latest version of this script can be found in these locations depending on your platform:

  • Linux / Unix:
    /opt/nessus/lib/nessus/plugins/phpbb_login_form_sql.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\phpbb_login_form_sql.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/phpbb_login_form_sql.nasl

Go back to menu.

How to Run


Here is how to run the phpBB viewtopic.php highlight Parameter SQL Injection (ESMARKCONANT) as a standalone plugin via the Nessus web user interface (https://localhost:8834/):

  1. Click to start a New Scan.
  2. Select Advanced Scan.
  3. Navigate to the Plugins tab.
  4. On the top right corner click to Disable All plugins.
  5. On the left side table select CGI abuses plugin family.
  6. On the right side table select phpBB viewtopic.php highlight Parameter SQL Injection (ESMARKCONANT) plugin ID 15780.
  7. Specify the target on the Settings tab and click to Save the scan.
  8. Run the scan.

Here are a few examples of how to run the plugin in the command line. Note that the examples below demonstrate the usage on the Linux / Unix platform.

Basic usage:

/opt/nessus/bin/nasl phpbb_login_form_sql.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a phpbb_login_form_sql.nasl -t <IP/HOST>

Run the plugin with trace script execution written to the console (useful for debugging):

/opt/nessus/bin/nasl -T - phpbb_login_form_sql.nasl -t <IP/HOST>

Run the plugin with using a state file for the target and updating it (useful for running multiple plugins on the target):

/opt/nessus/bin/nasl -K /tmp/state phpbb_login_form_sql.nasl -t <IP/HOST>

Go back to menu.

References


BID | SecurityFocus Bugtraq ID: CERT | Computer Emergency Response Team: See also: Similar and related Nessus plugins:
  • 19146 - FreeBSD : phpbb -- arbitrary command execution and other vulnerabilities (e3cf89f0-53da-11d9-92b7-ceadd4ac2edd)
  • 15826 - GLSA-200411-32 : phpBB: Remote command execution
  • 16200 - phpBB < 2.0.11 Multiple Vulnerabilities (ESMARKCONANT)
  • 17225 - phpBB <= 2.0.12 Multiple Vulnerabilities
  • 18589 - phpBB < 2.0.16 viewtopic.php Highlighting Feature Arbitrary PHP Code Execution
  • 21323 - phpBB Multiple Module phpbb_root_path Parameter Remote File Inclusion
  • 22021 - Mambo phpBB Component download.php phpbb_root_path Parameter Remote File Inclusion
  • 21302 - phpBB Advanced GuestBook addentry.php phpbb_root_path Parameter Remote File Inclusion
  • 18928 - FreeBSD : phpbb -- remote PHP code execution vulnerability (4afacca1-eb9d-11d9-a8bd-000cf18bbe54)
  • 18607 - GLSA-200507-03 : phpBB: Arbitrary command execution
  • 25421 - PNphpBB2 index.php c Parameter SQL Injection

Version


This page has been produced using Nessus Professional 10.1.2 (#68) LINUX, Plugin set 202205072148.
Plugin file phpbb_login_form_sql.nasl version 1.23. For more plugins, visit the Nessus Plugin Library.

Go back to menu.