Debian DLA-770-2 : libphp-phpmailer regression update - Nessus

Critical   Plugin ID: 96186

This page contains detailed information about the Debian DLA-770-2 : libphp-phpmailer regression update Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 96186
Name: Debian DLA-770-2 : libphp-phpmailer regression update
Filename: debian_DLA-770.nasl
Vulnerability Published: N/A
This Plugin Published: 2017-01-03
Last Modification Time: 2021-01-11
Plugin Version: 3.11
Plugin Type: local
Plugin Family: Debian Local Security Checks
Dependencies: ssh_get_info.nasl
Required KB Items [?]: Host/Debian/dpkg-l, Host/Debian/release, Host/local_checks_enabled

Vulnerability Information


Severity: Critical
Vulnerability Published: N/A
Patch Published: 2017-01-03
CVE [?]: CVE-2016-10033
CPE [?]: cpe:/o:debian:debian_linux:7.0, p-cpe:/a:debian:debian_linux:libphp-phpmailer

Synopsis

The remote Debian host is missing a security update.

Description

Dawid Golunski discovered that PHPMailer, a popular library to send email from PHP applications, allowed a remote attacker to execute code if they were able to provide a crafted Sender address.

Note that for this issue also CVE-2016-10045 was assigned, which is a regression in the original patch proposed for CVE-2016-10033. Because the origial patch was not applied in Debian, Debian was not vulnerable to CVE-2016-10045.

For Debian 7 'Wheezy', these problems have been fixed in version 5.1-1.2.

We recommend that you upgrade your libphp-phpmailer packages.

NOTE: Tenable Network Security has extracted the preceding description block directly from the DLA security advisory. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.

Solution

Upgrade the affected libphp-phpmailer package.

Public Exploits


Target Network Port(s): N/A
Target Asset(s): N/A
Exploit Available: True (Metasploit Framework, Exploit-DB, GitHub, Core Impact)
Exploit Ease: Exploits are available

Here's the list of publicly known exploits and PoCs for verifying the Debian DLA-770-2 : libphp-phpmailer regression update vulnerability:

  1. Metasploit: exploit/unix/webapp/wp_phpmailer_host_header
    [WordPress PHPMailer Host Header Command Injection]
  2. Metasploit: exploit/multi/http/phpmailer_arg_injection
    [PHPMailer Sendmail Argument Injection]
  3. Exploit-DB: exploits/php/remote/41996.sh
    [EDB-41996: Vanilla Forums < 2.3 - Remote Code Execution]
  4. Exploit-DB: exploits/php/remote/42024.rb
    [EDB-42024: WordPress Plugin PHPMailer 4.6 - Host Header Command Injection (Metasploit)]
  5. Exploit-DB: exploits/php/webapps/40968.sh
    [EDB-40968: PHPMailer < 5.2.18 - Remote Code Execution]
  6. Exploit-DB: exploits/php/webapps/40970.php
    [EDB-40970: PHPMailer < 5.2.18 - Remote Code Execution]
  7. Exploit-DB: exploits/php/webapps/40969.py
    [EDB-40969: PHPMailer < 5.2.20 - Remote Code Execution]
  8. Exploit-DB: exploits/php/webapps/40974.py
    [EDB-40974: PHPMailer < 5.2.18 - Remote Code Execution]
  9. Exploit-DB: exploits/php/webapps/40986.py
    [EDB-40986: PHPMailer < 5.2.20 / SwiftMailer < 5.4.5-DEV / Zend Framework / zend-mail < 2.4.11 - 'AIO' 'PwnScriptum' Remote Code Execution]
  10. Exploit-DB: exploits/multiple/webapps/41688.rb
    [EDB-41688: PHPMailer < 5.2.19 - Sendmail Argument Injection (Metasploit)]
  11. Exploit-DB: exploits/linux/webapps/41962.sh
    [EDB-41962: WordPress Core 4.6 - Remote Code Execution]
  12. Exploit-DB: exploits/php/webapps/42221.py
    [EDB-42221: PHPMailer < 5.2.20 with Exim MTA - Remote Code Execution]
  13. GitHub: https://exploitbox.io/vuln/WordPress-Exploit-4-6-RCE-CODE-EXEC-CVE-2016-10033.html
    [CVE-2016-10033]
  14. GitHub: https://github.com/0x00-0x00/CVE-2016-10033
    [CVE-2016-10033: PHPMailer < 5.2.18 Remote Code Execution Exploit]
  15. GitHub: https://github.com/AIPOCAI/CVE-2016-10033
    [CVE-2016-10033: PoC for exploiting CVE-2016-10033 : The mailSend function in the isMail transport in ...]
  16. GitHub: https://github.com/AIPOCAI/CVE-2016-10045
    [CVE-2016-10033: PoC for exploiting CVE-2016-10045 : The isMail transport in PHPMailer before 5.2.20 ...]
  17. GitHub: https://github.com/Bajunan/CVE-2016-10033
    [CVE-2016-10033: WordPress 4.6 - Remote Code Execution (RCE) PoC Exploit]
  18. GitHub: https://github.com/Brens498/AulaMvc
    [CVE-2016-10033]
  19. GitHub: https://github.com/Dharini432/Leafnow
    [CVE-2016-10033]
  20. GitHub: https://github.com/DynamicDesignz/Alien-Framework
    [CVE-2016-10033]
  21. GitHub: https://github.com/GeneralTesler/CVE-2016-10033
    [CVE-2016-10033: RCE against WordPress 4.6; Python port of ...]
  22. GitHub: https://github.com/Hehhchen/eCommerce
    [CVE-2016-10033]
  23. GitHub: https://github.com/Jack-LaL/idk
    [CVE-2016-10033]
  24. GitHub: https://github.com/JesusAyalaEspinoza/p
    [CVE-2016-10033]
  25. GitHub: https://github.com/KNIGHTTH0R/PHPMail
    [CVE-2016-10033]
  26. GitHub: https://github.com/Kalyan457/Portfolio
    [CVE-2016-10033]
  27. GitHub: https://github.com/Keshav9863/MFA_SIGN_IN_PAGE
    [CVE-2016-10033]
  28. GitHub: https://github.com/MarcioPeters/PHP
    [CVE-2016-10033]
  29. GitHub: https://github.com/MartinDala/Envio-Simples-de-Email-com-PHPMailer-
    [CVE-2016-10033]
  30. GitHub: https://github.com/NCSU-DANCE-Research-Group/CDL
    [CVE-2016-10033]
  31. GitHub: https://github.com/Rachna-2018/email
    [CVE-2016-10033]
  32. GitHub: https://github.com/Ramkiskhan/sample
    [CVE-2016-10033]
  33. GitHub: https://github.com/Razzle23/mail-3
    [CVE-2016-10033]
  34. GitHub: https://github.com/Rivaldo28/ecommerce
    [CVE-2016-10033]
  35. GitHub: https://github.com/RyouYoo/CVE-2016-10033
    [CVE-2016-10033: Remote Code Execution vulnerability in PHPMailer.]
  36. GitHub: https://github.com/Sakanksha07/Journey-With-Food
    [CVE-2016-10033]
  37. GitHub: https://github.com/Sakshibadoni/LetsTravel
    [CVE-2016-10033]
  38. GitHub: https://github.com/SexyBeast233/SecBooks
    [CVE-2016-10033]
  39. GitHub: https://github.com/ThatsSacha/forum
    [CVE-2016-10033]
  40. GitHub: https://github.com/Zenexer/safeshell
    [CVE-2016-10033: Prevent PHP vulnerabilities similar to CVE-2016-10033 and CVE-2016-10045.]
  41. GitHub: https://github.com/afkpaul/smtp
    [CVE-2016-10033]
  42. GitHub: https://github.com/alexandrazlatea/emails
    [CVE-2016-10033]
  43. GitHub: https://github.com/anishbhut/simpletest
    [CVE-2016-10033]
  44. GitHub: https://github.com/anushasinha24/send-mail-using-PHPMailer
    [CVE-2016-10033]
  45. GitHub: https://github.com/athirakottekadnew/testingRepophp
    [CVE-2016-10033]
  46. GitHub: https://github.com/awidardi/opsxcq-cve-2016-10033
    [CVE-2016-10033: To solve CTFS.me problem]
  47. GitHub: https://github.com/bkrishnasowmya/OTMS-project
    [CVE-2016-10033]
  48. GitHub: https://github.com/boy-hack/hack-requests
    [CVE-2016-10033]
  49. GitHub: https://github.com/chipironcin/CVE-2016-10033
    [CVE-2016-10033: Code and vulnerable WordPress container for exploiting CVE-2016-10033]
  50. GitHub: https://github.com/cyberpacifists/redteam
    [CVE-2016-10033]
  51. GitHub: https://github.com/denniskinyuandege/mailer
    [CVE-2016-10033]
  52. GitHub: https://github.com/devhribeiro/cadweb_aritana
    [CVE-2016-10033]
  53. GitHub: https://github.com/dipak1997/Alumni-M
    [CVE-2016-10033]
  54. GitHub: https://github.com/dp7sv/ECOMM
    [CVE-2016-10033]
  55. GitHub: https://github.com/duhengchen1112/demo
    [CVE-2016-10033]
  56. GitHub: https://github.com/elhouti/ensimag-ssi-2019-20
    [CVE-2016-10033]
  57. GitHub: https://github.com/eminemdordie/mailer
    [CVE-2016-10033]
  58. GitHub: https://github.com/faraz07-AI/fullstack-Jcomp
    [CVE-2016-10033]
  59. GitHub: https://github.com/fatihbaba44/PeakGames
    [CVE-2016-10033]
  60. GitHub: https://github.com/fengjixuchui/RedTeamer
    [CVE-2016-10033]
  61. GitHub: https://github.com/geet56/geet22
    [CVE-2016-10033]
  62. GitHub: https://github.com/gnikita01/hackedemistwebsite
    [CVE-2016-10033]
  63. GitHub: https://github.com/gvido-berzins/GitBook
    [CVE-2016-10033]
  64. GitHub: https://github.com/huongbee/mailer0112
    [CVE-2016-10033]
  65. GitHub: https://github.com/huongbee/mailer0505
    [CVE-2016-10033]
  66. GitHub: https://github.com/inusah42/ecomm
    [CVE-2016-10033]
  67. GitHub: https://github.com/izisoft/mailer
    [CVE-2016-10033]
  68. GitHub: https://github.com/izisoft/yii2-mailer
    [CVE-2016-10033]
  69. GitHub: https://github.com/j4k0m/CVE-2016-10033
    [CVE-2016-10033: Remote Code Execution vulnerability in PHPMailer.]
  70. GitHub: https://github.com/jaimedaw86/repositorio-DAW06_PHP
    [CVE-2016-10033]
  71. GitHub: https://github.com/jamesxiaofeng/sendmail
    [CVE-2016-10033]
  72. GitHub: https://github.com/jbperry1998/bd_calendar
    [CVE-2016-10033]
  73. GitHub: https://github.com/laddoms/faces
    [CVE-2016-10033]
  74. GitHub: https://github.com/lanlehoang67/sender
    [CVE-2016-10033]
  75. GitHub: https://github.com/lcscastro/RecursoFunctionEmail
    [CVE-2016-10033]
  76. GitHub: https://github.com/leftarmm/speexx
    [CVE-2016-10033]
  77. GitHub: https://github.com/leocifrao/site-restaurante
    [CVE-2016-10033]
  78. GitHub: https://github.com/liusec/WP-CVE-2016-10033
    [CVE-2016-10033]
  79. GitHub: https://github.com/luxiaojue/phpmail
    [CVE-2016-10033]
  80. GitHub: https://github.com/madbananaman/L-Mailer
    [CVE-2016-10033]
  81. GitHub: https://github.com/mintoua/Fantaziya_WEBSite
    [CVE-2016-10033]
  82. GitHub: https://github.com/mohamed-aymen-ellafi/web
    [CVE-2016-10033]
  83. GitHub: https://github.com/morkamimi/poop
    [CVE-2016-10033]
  84. GitHub: https://github.com/natsootail/alumni
    [CVE-2016-10033]
  85. GitHub: https://github.com/nyamleeze/commit_testing
    [CVE-2016-10033]
  86. GitHub: https://github.com/opsxcq/exploit-CVE-2016-10033
    [CVE-2016-10033: PHPMailer < 5.2.18 Remote Code Execution exploit and vulnerable container]
  87. GitHub: https://github.com/paralelo14/CVE_2016-10033
    [CVE-2016-10033: Exploiting PHPMail with back connection (reverse shell) from the target]
  88. GitHub: https://github.com/pctechsupport123/php
    [CVE-2016-10033]
  89. GitHub: https://github.com/pedro823/cve-2016-10033-45
    [CVE-2016-10033: Exploits CVE-2016-10033 and CVE-2016-10045]
  90. GitHub: https://github.com/prakashshubham13/portfolio
    [CVE-2016-10033]
  91. GitHub: https://github.com/prathamrathore/portfolio.php
    [CVE-2016-10033]
  92. GitHub: https://github.com/qwertyuiop12138/CVE-2016-10033
    [CVE-2016-10033]
  93. GitHub: https://github.com/rasisbade/allphp
    [CVE-2016-10033]
  94. GitHub: https://github.com/rebujacker/CVEPoCs
    [CVE-2016-10033]
  95. GitHub: https://github.com/rohandavid/fitdanish
    [CVE-2016-10033]
  96. GitHub: https://github.com/rrathi0705/email
    [CVE-2016-10033]
  97. GitHub: https://github.com/rudresh98/e_commerce_IFood
    [CVE-2016-10033]
  98. GitHub: https://github.com/sakshibohra05/project
    [CVE-2016-10033]
  99. GitHub: https://github.com/sarvottam1766/Project
    [CVE-2016-10033]
  100. GitHub: https://github.com/sashasimulik/integration-1
    [CVE-2016-10033]
  101. GitHub: https://github.com/supreethsk/rental
    [CVE-2016-10033]
  102. GitHub: https://github.com/tvirus-01/PHP_mail
    [CVE-2016-10033]
  103. GitHub: https://github.com/vaartjesd/test
    [CVE-2016-10033]
  104. GitHub: https://github.com/vatann07/BloodConnect
    [CVE-2016-10033]
  105. GitHub: https://github.com/vedavith/mailer
    [CVE-2016-10033]
  106. GitHub: https://github.com/waqeen/cyber_security21
    [CVE-2016-10033]
  107. GitHub: https://github.com/wesandradealves/sitio_email_api_demo
    [CVE-2016-10033]
  108. GitHub: https://github.com/windypermadi/PHP-Mailer
    [CVE-2016-10033]
  109. GitHub: https://github.com/zhangqiyi55/phpemail
    [CVE-2016-10033]
  110. GitHub: https://github.com/cved-sources/cve-2016-10033
    [CVE-2016-10033: Cve-2016-10033]

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:F/RL:OF/RC:C
CVSS Base Score:7.5 (High)
Impact Subscore:6.4
Exploitability Subscore:10.0
CVSS Temporal Score:6.2 (Medium)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:6.2 (Medium)
CVSS V3 Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H/E:F/RL:O/RC:C
CVSS Base Score:9.8 (Critical)
Impact Subscore:5.9
Exploitability Subscore:3.9
CVSS Temporal Score:9.1 (Critical)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:9.1 (Critical)

Go back to menu.

Plugin Source


This is the debian_DLA-770.nasl nessus plugin source code. This script is Copyright (C) 2017-2021 and is owned by Tenable, Inc. or an Affiliate thereof.

#%NASL_MIN_LEVEL 70300
#
# (C) Tenable Network Security, Inc.
#
# The descriptive text and package checks in this plugin were
# extracted from Debian Security Advisory DLA-770-2. The text
# itself is copyright (C) Software in the Public Interest, Inc.
#

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

if (description)
{
  script_id(96186);
  script_version("3.11");
  script_set_attribute(attribute:"plugin_modification_date", value:"2021/01/11");

  script_cve_id("CVE-2016-10033");

  script_name(english:"Debian DLA-770-2 : libphp-phpmailer regression update");
  script_summary(english:"Checks dpkg output for the updated package.");

  script_set_attribute(
    attribute:"synopsis", 
    value:"The remote Debian host is missing a security update."
  );
  script_set_attribute(
    attribute:"description", 
    value:
"Dawid Golunski discovered that PHPMailer, a popular library to send
email from PHP applications, allowed a remote attacker to execute code
if they were able to provide a crafted Sender address.

Note that for this issue also CVE-2016-10045 was assigned, which is a
regression in the original patch proposed for CVE-2016-10033. Because
the origial patch was not applied in Debian, Debian was not vulnerable
to CVE-2016-10045.

For Debian 7 'Wheezy', these problems have been fixed in version
5.1-1.2.

We recommend that you upgrade your libphp-phpmailer packages.

NOTE: Tenable Network Security has extracted the preceding description
block directly from the DLA security advisory. Tenable has attempted
to automatically clean and format it as much as possible without
introducing additional issues."
  );
  script_set_attribute(
    attribute:"see_also",
    value:"https://lists.debian.org/debian-lts-announce/2017/01/msg00006.html"
  );
  script_set_attribute(
    attribute:"see_also",
    value:"https://packages.debian.org/source/wheezy/libphp-phpmailer"
  );
  script_set_attribute(
    attribute:"solution", 
    value:"Upgrade the affected libphp-phpmailer package."
  );
  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:F/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:F/RL:O/RC:C");
  script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
  script_set_attribute(attribute:"exploit_available", value:"true");
  script_set_attribute(attribute:"exploit_framework_core", value:"true");
  script_set_attribute(attribute:"metasploit_name", value:'WordPress PHPMailer Host Header Command Injection');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");

  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:debian:debian_linux:libphp-phpmailer");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:debian:debian_linux:7.0");

  script_set_attribute(attribute:"patch_publication_date", value:"2017/01/03");
  script_set_attribute(attribute:"plugin_publication_date", value:"2017/01/03");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_copyright(english:"This script is Copyright (C) 2017-2021 and is owned by Tenable, Inc. or an Affiliate thereof.");
  script_family(english:"Debian Local Security Checks");

  script_dependencies("ssh_get_info.nasl");
  script_require_keys("Host/local_checks_enabled", "Host/Debian/release", "Host/Debian/dpkg-l");

  exit(0);
}


include("audit.inc");
include("debian_package.inc");


if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
if (!get_kb_item("Host/Debian/release")) audit(AUDIT_OS_NOT, "Debian");
if (!get_kb_item("Host/Debian/dpkg-l")) audit(AUDIT_PACKAGE_LIST_MISSING);


flag = 0;
if (deb_check(release:"7.0", prefix:"libphp-phpmailer", reference:"5.1-1.2")) flag++;

if (flag)
{
  if (report_verbosity > 0) security_hole(port:0, extra:deb_report_get());
  else security_hole(0);
  exit(0);
}
else audit(AUDIT_HOST_NOT, "affected");

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

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

Go back to menu.

How to Run


Here is how to run the Debian DLA-770-2 : libphp-phpmailer regression update 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 Debian Local Security Checks plugin family.
  6. On the right side table select Debian DLA-770-2 : libphp-phpmailer regression update plugin ID 96186.
  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 debian_DLA-770.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

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

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

/opt/nessus/bin/nasl -T - debian_DLA-770.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 debian_DLA-770.nasl -t <IP/HOST>

Go back to menu.

References


See also: Similar and related Nessus plugins:
  • 96194 - Debian DSA-3750-1 : libphp-phpmailer - security update
  • 100280 - F5 Networks BIG-IP : PHPMailer vulnerability (K73926196)
  • 100182 - F5 Networks BIG-IP : PHPMailer vulnerability (K74977440)
  • 96319 - Fedora 25 : php-PHPMailer (2016-6941d25875)
  • 96574 - Fedora 24 : php-PHPMailer (2017-c3dc97e1e1)
  • 96121 - FreeBSD : phpmailer -- Remote Code Execution (c7656d4c-cb60-11e6-a9a5-b499baebfeaf)
  • 96606 - WordPress < 4.7.1 Multiple Vulnerabilities

Version


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

Go back to menu.