Fedora 29 : distcc (2019-dfef0af227) - Nessus

High   Plugin ID: 122567

This page contains detailed information about the Fedora 29 : distcc (2019-dfef0af227) Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 122567
Name: Fedora 29 : distcc (2019-dfef0af227)
Filename: fedora_2019-dfef0af227.nasl
Vulnerability Published: 2004-12-31
This Plugin Published: 2019-03-04
Last Modification Time: 2019-09-23
Plugin Version: 1.4
Plugin Type: local
Plugin Family: Fedora Local Security Checks
Dependencies: ssh_get_info.nasl
Required KB Items [?]: Host/local_checks_enabled, Host/RedHat/release, Host/RedHat/rpm-list

Vulnerability Information


Severity: High
Vulnerability Published: 2004-12-31
Patch Published: 2019-03-02
CVE [?]: CVE-2004-2687
CPE [?]: cpe:/o:fedoraproject:fedora:29, p-cpe:/a:fedoraproject:fedora:distcc

Synopsis

The remote Fedora host is missing a security update.

Description

Restrict default configuration to localhost.

Note that Tenable Network Security has extracted the preceding description block directly from the Fedora update system website. Tenable has attempted to automatically clean and format it as much as possible without introducing additional issues.

Solution

Update the affected distcc 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 Fedora 29 : distcc (2019-dfef0af227) vulnerability:

  1. Metasploit: exploit/unix/misc/distcc_exec
    [DistCC Daemon Command Execution]
  2. Exploit-DB: exploits/multiple/remote/9915.rb
    [EDB-9915: DistCC Daemon - Command Execution (Metasploit)]
  3. GitHub: https://github.com/3hydraking/distccd_rce_CVE-2004-2687
    [CVE-2004-2687]
  4. GitHub: https://github.com/4n0nym0u5dk/distccd_rce_CVE-2004-2687
    [CVE-2004-2687]
  5. GitHub: https://github.com/SecGen/SecGen
    [CVE-2004-2687]
  6. GitHub: https://github.com/giusepperuggiero96/Network-Security-2021
    [CVE-2004-2687]
  7. GitHub: https://github.com/gregtampa/HBCTF-Battlegrounds
    [CVE-2004-2687]
  8. GitHub: https://github.com/gwyomarch/Lame-HTB-Writeup-FR
    [CVE-2004-2687]
  9. GitHub: https://github.com/k4u5h41/distccd_rce_CVE-2004-2687
    [CVE-2004-2687]
  10. GitHub: https://github.com/marcocastro100/Intrusion_Detection_System-Python
    [CVE-2004-2687]
  11. GitHub: https://github.com/k4miyo/CVE-2004-2687
    [CVE-2004-2687: CVE-2004-2687 DistCC Daemon Command Execution]
  12. GitHub: https://github.com/sukraken/distcc_exploit.py
    [CVE-2004-2687: Exploit to CVE-2004-2687 vulnerability]

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:M/Au:N/C:C/I:C/A:C/E:F/RL:OF/RC:C
CVSS Base Score:9.3 (High)
Impact Subscore:10.0
Exploitability Subscore:8.6
CVSS Temporal Score:7.7 (High)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:7.7 (High)

Go back to menu.

Plugin Source


This is the fedora_2019-dfef0af227.nasl nessus plugin source code. This script is Copyright (C) 2019 and is owned by Tenable, Inc. or an Affiliate thereof.

#
# (C) Tenable Network Security, Inc.
#
# The descriptive text and package checks in this plugin were  
# extracted from Fedora Security Advisory FEDORA-2019-dfef0af227.
#

include("compat.inc");

if (description)
{
  script_id(122567);
  script_version("1.4");
  script_cvs_date("Date: 2019/09/23 11:21:11");

  script_cve_id("CVE-2004-2687");
  script_xref(name:"FEDORA", value:"2019-dfef0af227");

  script_name(english:"Fedora 29 : distcc (2019-dfef0af227)");
  script_summary(english:"Checks rpm output for the updated package.");

  script_set_attribute(
    attribute:"synopsis", 
    value:"The remote Fedora host is missing a security update."
  );
  script_set_attribute(
    attribute:"description", 
    value:
"Restrict default configuration to localhost.

Note that Tenable Network Security has extracted the preceding
description block directly from the Fedora update system website.
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://bodhi.fedoraproject.org/updates/FEDORA-2019-dfef0af227"
  );
  script_set_attribute(
    attribute:"solution", 
    value:"Update the affected distcc package."
  );
  script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:C/I:C/A:C");
  script_set_cvss_temporal_vector("CVSS2#E:F/RL:OF/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:'DistCC Daemon Command Execution');
  script_set_attribute(attribute:"exploit_framework_metasploit", value:"true");
  script_cwe_id(16);

  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:fedoraproject:fedora:distcc");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fedoraproject:fedora:29");

  script_set_attribute(attribute:"vuln_publication_date", value:"2004/12/31");
  script_set_attribute(attribute:"patch_publication_date", value:"2019/03/02");
  script_set_attribute(attribute:"plugin_publication_date", value:"2019/03/04");
  script_set_attribute(attribute:"generated_plugin", value:"current");
  script_end_attributes();

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

  script_dependencies("ssh_get_info.nasl");
  script_require_keys("Host/local_checks_enabled", "Host/RedHat/release", "Host/RedHat/rpm-list");

  exit(0);
}


include("audit.inc");
include("global_settings.inc");
include("rpm.inc");


if (!get_kb_item("Host/local_checks_enabled")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);
release = get_kb_item("Host/RedHat/release");
if (isnull(release) || "Fedora" >!< release) audit(AUDIT_OS_NOT, "Fedora");
os_ver = pregmatch(pattern: "Fedora.*release ([0-9]+)", string:release);
if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "Fedora");
os_ver = os_ver[1];
if (! preg(pattern:"^29([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Fedora 29", "Fedora " + os_ver);

if (!get_kb_item("Host/RedHat/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);


cpu = get_kb_item("Host/cpu");
if (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);
if ("x86_64" >!< cpu && cpu !~ "^i[3-6]86$") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Fedora", cpu);


flag = 0;
if (rpm_check(release:"FC29", reference:"distcc-3.2rc1-22.fc29")) flag++;


if (flag)
{
  security_report_v4(
    port       : 0,
    severity   : SECURITY_HOLE,
    extra      : rpm_report_get()
  );
  exit(0);
}
else
{
  tested = pkg_tests_get();
  if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
  else audit(AUDIT_PACKAGE_NOT_INSTALLED, "distcc");
}

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

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

Go back to menu.

How to Run


Here is how to run the Fedora 29 : distcc (2019-dfef0af227) 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 Fedora Local Security Checks plugin family.
  6. On the right side table select Fedora 29 : distcc (2019-dfef0af227) plugin ID 122567.
  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 fedora_2019-dfef0af227.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

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

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

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

Go back to menu.

References


Fedora Security Update: CWE | Common Weakness Enumeration:
  • CWE-16 (Category) Configuration
See also: Similar and related Nessus plugins:
  • 122558 - Fedora 28 : distcc (2019-2c2dfc65d1)
  • 122283 - Fedora 28 : moby-engine (2019-829524f28f)
  • 122284 - Fedora 28 : ghostscript (2019-82acb29c1b)
  • 122287 - Fedora 28 : python-markdown2 (2019-a16e1127d3)
  • 122289 - Fedora 29 : libtiff (2019-c83703be82)
  • 122290 - Fedora 29 : bouncycastle / eclipse-jgit / eclipse-linuxtools / etc (2019-df57551f6d)
  • 122355 - Fedora 28 : webkit2gtk3 (2019-5c54d58073)
  • 122356 - Fedora 28 : 2:runc (2019-963ea958f9)
  • 122358 - Fedora 28 : 2:docker (2019-f455ef79b8)
  • 122371 - Fedora 29 : systemd (2019-8434288a24)
  • 122406 - Fedora 29 : poppler (2019-387e017332)
  • 122408 - Fedora 29 : 2:docker-latest (2019-4dc1e39b34)
  • 122438 - Fedora 29 : 32:bind (2019-5396a60397)
  • 122521 - Fedora 29 : kernel / kernel-headers (2019-7462acf8ba)
  • 122523 - Fedora 28 : flatpak (2019-a5f616808e)
  • 122524 - Fedora 29 : python-django (2019-ec55814c1c)
  • 122558 - Fedora 28 : distcc (2019-2c2dfc65d1)
  • 122562 - Fedora 28 : python-django (2019-9760933547)
  • 122683 - Fedora 28 : php-Smarty (2019-d248c5aa39)
  • 122684 - Fedora 29 : php-Smarty (2019-e595e8a7d7)
  • 122725 - Fedora 28 : systemd (2019-2dab60e288)
  • 122726 - Fedora 29 : kernel / kernel-headers (2019-87e7046631)
  • 122769 - Fedora 28 : kernel / kernel-headers (2019-196ab64d65)
  • 122795 - Fedora 28 : postgresql-jdbc (2019-1b9e80874d)
  • 122798 - Fedora 29 : postgresql-jdbc (2019-7d0d59764e)
  • 122880 - Fedora 29 : kubernetes (2019-3ecff65275)
  • 122978 - Fedora 29 : mod_http2 (2019-0300c36537)
  • 122979 - Fedora 29 : ghostscript (2019-15d57af79a)
  • 122980 - Fedora 28 : python2-django1.11 (2019-5ad2149e99)
  • 122981 - Fedora 29 : cronie (2019-7104a00054)
  • 122982 - Fedora 28 : ghostscript (2019-7b9bb0e426)
  • 122984 - Fedora 29 : PyYAML (2019-bed9afe622)
  • 122986 - Fedora 29 : python2-django1.11 (2019-f528d75a69)
  • 123036 - Fedora 28 : mod_http2 (2019-133a8a7cb5)
  • 123041 - Fedora 28 : PyYAML (2019-779a9db46a)

Version


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

Go back to menu.