RHEL 6 : git (RHSA-2017:2485) - Nessus

High   Plugin ID: 102538

This page contains detailed information about the RHEL 6 : git (RHSA-2017:2485) Nessus plugin including available exploits and PoCs found on GitHub, in Metasploit or Exploit-DB for verifying of this vulnerability.

Plugin Overview


ID: 102538
Name: RHEL 6 : git (RHSA-2017:2485)
Filename: redhat-RHSA-2017-2485.nasl
Vulnerability Published: 2017-10-05
This Plugin Published: 2017-08-17
Last Modification Time: 2019-10-24
Plugin Version: 3.11
Plugin Type: local
Plugin Family: Red Hat Local Security Checks
Dependencies: ssh_get_info.nasl
Required KB Items [?]: Host/cpu, Host/local_checks_enabled, Host/RedHat/release, Host/RedHat/rpm-list

Vulnerability Information


Severity: High
Vulnerability Published: 2017-10-05
Patch Published: 2017-08-16
CVE [?]: CVE-2017-1000117
CPE [?]: cpe:/o:redhat:enterprise_linux:6, p-cpe:/a:redhat:enterprise_linux:emacs-git, p-cpe:/a:redhat:enterprise_linux:emacs-git-el, p-cpe:/a:redhat:enterprise_linux:git, p-cpe:/a:redhat:enterprise_linux:gitk, p-cpe:/a:redhat:enterprise_linux:gitweb, p-cpe:/a:redhat:enterprise_linux:git-all, p-cpe:/a:redhat:enterprise_linux:git-cvs, p-cpe:/a:redhat:enterprise_linux:git-daemon, p-cpe:/a:redhat:enterprise_linux:git-debuginfo, p-cpe:/a:redhat:enterprise_linux:git-email, p-cpe:/a:redhat:enterprise_linux:git-gui, p-cpe:/a:redhat:enterprise_linux:git-svn, p-cpe:/a:redhat:enterprise_linux:perl-Git

Synopsis

The remote Red Hat host is missing one or more security updates.

Description

An update for git is now available for Red Hat Enterprise Linux 6.

Red Hat Product Security has rated this update as having a security impact of Important. A Common Vulnerability Scoring System (CVSS) base score, which gives a detailed severity rating, is available for each vulnerability from the CVE link(s) in the References section.

Git is a distributed revision control system with a decentralized architecture. As opposed to centralized version control systems with a client-server model, Git ensures that each working copy of a Git repository is an exact copy with complete revision history. This not only allows the user to work on and contribute to projects without the need to have permission to push the changes to their official repositories, but also makes it possible for the user to work with no network connection.

Security Fix(es) :

* A shell command injection flaw related to the handling of 'ssh' URLs has been discovered in Git. An attacker could use this flaw to execute shell commands with the privileges of the user running the Git client, for example, when performing a 'clone' action on a malicious repository or a legitimate repository containing a malicious commit. (CVE-2017-1000117)

Solution

Update the affected packages.

Public Exploits


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

Here's the list of publicly known exploits and PoCs for verifying the RHEL 6 : git (RHSA-2017:2485) vulnerability:

  1. Metasploit: exploit/multi/http/git_submodule_command_exec
    [Malicious Git HTTP Server For CVE-2017-1000117]
  2. Exploit-DB: exploits/python/remote/42599.rb
    [EDB-42599: Git < 2.7.5 - Command Injection (Metasploit)]
  3. GitHub: https://github.com/Jerry-zhuang/CVE-2017-1000117
    [CVE-2017-1000117]
  4. GitHub: https://github.com/M1a0rz/test
    [CVE-2017-1000117]
  5. GitHub: https://github.com/Manouchehri/CVE-2017-1000117
    [CVE-2017-1000117]
  6. GitHub: https://github.com/Q2h1Cg/CVE-2017-1000117
    [CVE-2017-1000117]
  7. GitHub: https://github.com/VulApps/CVE-2017-1000117
    [CVE-2017-1000117]
  8. GitHub: https://github.com/bells17/CVE-2017-1000117
    [CVE-2017-1000117: https://github.com/greymd/CVE-2017-1000117 の勉強用]
  9. GitHub: https://github.com/dfgfdug8df7/some
    [CVE-2017-1000117]
  10. GitHub: https://github.com/ieee0824/CVE-2017-1000117
    [CVE-2017-1000117]
  11. GitHub: https://github.com/ikmski/CVE-2017-1000117
    [CVE-2017-1000117]
  12. GitHub: https://github.com/leezp/CVE-2017-1000117
    [CVE-2017-1000117]
  13. GitHub: https://github.com/mtrampic/cvedetails_nifi_web_scrape
    [CVE-2017-1000117]
  14. GitHub: https://github.com/sasairc/CVE-2017-1000117_wasawasa
    [CVE-2017-1000117]
  15. GitHub: https://github.com/shogo82148/Fix-CVE-2017-1000117
    [CVE-2017-1000117]
  16. GitHub: https://github.com/siling2017/CVE-2017-1000117
    [CVE-2017-1000117]
  17. GitHub: https://github.com/simith003/demo
    [CVE-2017-1000117]
  18. GitHub: https://github.com/takehaya/CVE-2017-1000117
    [CVE-2017-1000117]
  19. GitHub: https://github.com/thelastbyte/CVE-2017-1000117
    [CVE-2017-1000117]
  20. GitHub: https://github.com/tigerszk/ssmjp-100th-message
    [CVE-2017-1000117]
  21. GitHub: https://github.com/vulsio/gost
    [CVE-2017-1000117]
  22. GitHub: http://bobao.360.cn/learning/detail/4244.html
    [CVE-2017-1000117]
  23. GitHub: https://github.com/AnonymKing/CVE-2017-1000117
    [CVE-2017-1000117: CVE-2017-1000117漏洞复现(PoC+Exp)]
  24. GitHub: https://github.com/cved-sources/cve-2017-1000117
    [CVE-2017-1000117: Cve-2017-1000117]
  25. GitHub: https://github.com/GrahamMThomas/test-git-vuln_CVE-2017-1000117
    [CVE-2017-1000117: Repo to test the new git vulnerability]
  26. GitHub: https://github.com/greymd/CVE-2017-1000117
    [CVE-2017-1000117: Check Git's vulnerability CVE-2017-1000117]
  27. GitHub: https://github.com/ieee0824/CVE-2017-1000117-sl
    [CVE-2017-1000117: Experiment of CVE-2017-1000117]
  28. GitHub: https://github.com/nkoneko/CVE-2017-1000117
    [CVE-2017-1000117: GitのCommand Injectionの脆弱性を利用してスクリプトを落として実行する例]
  29. GitHub: https://github.com/rootclay/CVE-2017-1000117
    [CVE-2017-1000117]
  30. GitHub: https://github.com/Shadow5523/CVE-2017-1000117-test
    [CVE-2017-1000117: CVE-2017-1000117の検証]
  31. GitHub: https://github.com/timwr/CVE-2017-1000117
    [CVE-2017-1000117: Proof of concept of CVE-2017-1000117]
  32. GitHub: https://github.com/alilangtest/CVE-2017-1000117
    [CVE-2017-1000117: Test]
  33. GitHub: https://github.com/chenzhuo0618/test
    [CVE-2017-1000117: Test for CVE-2017-1000117]

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:P/I:P/A:P/E:F/RL:OF/RC:C
CVSS Base Score:6.8 (Medium)
Impact Subscore:6.4
Exploitability Subscore:8.6
CVSS Temporal Score:5.6 (Medium)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:5.6 (Medium)
CVSS V3 Vector: CVSS:3.0/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H/E:F/RL:O/RC:C
CVSS Base Score:8.8 (High)
Impact Subscore:5.9
Exploitability Subscore:2.8
CVSS Temporal Score:8.2 (High)
CVSS Environmental Score:NA (None)
Modified Impact Subscore:NA
Overall CVSS Score:8.2 (High)

Go back to menu.

Plugin Source


This is the redhat-RHSA-2017-2485.nasl nessus plugin source code. This script is Copyright (C) 2017-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 Red Hat Security Advisory RHSA-2017:2485. The text 
# itself is copyright (C) Red Hat, Inc.
#

include("compat.inc");

if (description)
{
  script_id(102538);
  script_version("3.11");
  script_cvs_date("Date: 2019/10/24 15:35:43");

  script_cve_id("CVE-2017-1000117");
  script_xref(name:"RHSA", value:"2017:2485");

  script_name(english:"RHEL 6 : git (RHSA-2017:2485)");
  script_summary(english:"Checks the rpm output for the updated packages");

  script_set_attribute(
    attribute:"synopsis", 
    value:"The remote Red Hat host is missing one or more security updates."
  );
  script_set_attribute(
    attribute:"description", 
    value:
"An update for git is now available for Red Hat Enterprise Linux 6.

Red Hat Product Security has rated this update as having a security
impact of Important. A Common Vulnerability Scoring System (CVSS) base
score, which gives a detailed severity rating, is available for each
vulnerability from the CVE link(s) in the References section.

Git is a distributed revision control system with a decentralized
architecture. As opposed to centralized version control systems with a
client-server model, Git ensures that each working copy of a Git
repository is an exact copy with complete revision history. This not
only allows the user to work on and contribute to projects without the
need to have permission to push the changes to their official
repositories, but also makes it possible for the user to work with no
network connection.

Security Fix(es) :

* A shell command injection flaw related to the handling of 'ssh' URLs
has been discovered in Git. An attacker could use this flaw to execute
shell commands with the privileges of the user running the Git client,
for example, when performing a 'clone' action on a malicious
repository or a legitimate repository containing a malicious commit.
(CVE-2017-1000117)"
  );
  script_set_attribute(
    attribute:"see_also",
    value:"https://access.redhat.com/errata/RHSA-2017:2485"
  );
  script_set_attribute(
    attribute:"see_also",
    value:"https://access.redhat.com/security/cve/cve-2017-1000117"
  );
  script_set_attribute(attribute:"solution", value:"Update the affected packages.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:M/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:R/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:"metasploit_name", value:'Malicious Git HTTP Server For CVE-2017-1000117');
  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:redhat:enterprise_linux:emacs-git");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:emacs-git-el");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:git");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:git-all");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:git-cvs");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:git-daemon");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:git-debuginfo");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:git-email");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:git-gui");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:git-svn");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:gitk");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:gitweb");
  script_set_attribute(attribute:"cpe", value:"p-cpe:/a:redhat:enterprise_linux:perl-Git");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:redhat:enterprise_linux:6");

  script_set_attribute(attribute:"vuln_publication_date", value:"2017/10/05");
  script_set_attribute(attribute:"patch_publication_date", value:"2017/08/16");
  script_set_attribute(attribute:"plugin_publication_date", value:"2017/08/17");
  script_set_attribute(attribute:"generated_plugin", value:"current");
  script_end_attributes();

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

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

  exit(0);
}


include("audit.inc");
include("global_settings.inc");
include("misc_func.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) || "Red Hat" >!< release) audit(AUDIT_OS_NOT, "Red Hat");
os_ver = pregmatch(pattern: "Red Hat Enterprise Linux.*release ([0-9]+(\.[0-9]+)?)", string:release);
if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "Red Hat");
os_ver = os_ver[1];
if (! preg(pattern:"^6([^0-9]|$)", string:os_ver)) audit(AUDIT_OS_NOT, "Red Hat 6.x", "Red Hat " + 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$" && "s390" >!< cpu) audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, "Red Hat", cpu);

yum_updateinfo = get_kb_item("Host/RedHat/yum-updateinfo");
if (!empty_or_null(yum_updateinfo)) 
{
  rhsa = "RHSA-2017:2485";
  yum_report = redhat_generate_yum_updateinfo_report(rhsa:rhsa);
  if (!empty_or_null(yum_report))
  {
    security_report_v4(
      port       : 0,
      severity   : SECURITY_WARNING,
      extra      : yum_report 
    );
    exit(0);
  }
  else
  {
    audit_message = "affected by Red Hat security advisory " + rhsa;
    audit(AUDIT_OS_NOT, audit_message);
  }
}
else
{
  flag = 0;
  if (rpm_check(release:"RHEL6", reference:"emacs-git-1.7.1-9.el6_9")) flag++;
  if (rpm_check(release:"RHEL6", reference:"emacs-git-el-1.7.1-9.el6_9")) flag++;
  if (rpm_check(release:"RHEL6", cpu:"i686", reference:"git-1.7.1-9.el6_9")) flag++;
  if (rpm_check(release:"RHEL6", cpu:"s390x", reference:"git-1.7.1-9.el6_9")) flag++;
  if (rpm_check(release:"RHEL6", cpu:"x86_64", reference:"git-1.7.1-9.el6_9")) flag++;
  if (rpm_check(release:"RHEL6", reference:"git-all-1.7.1-9.el6_9")) flag++;
  if (rpm_check(release:"RHEL6", reference:"git-cvs-1.7.1-9.el6_9")) flag++;
  if (rpm_check(release:"RHEL6", cpu:"i686", reference:"git-daemon-1.7.1-9.el6_9")) flag++;
  if (rpm_check(release:"RHEL6", cpu:"s390x", reference:"git-daemon-1.7.1-9.el6_9")) flag++;
  if (rpm_check(release:"RHEL6", cpu:"x86_64", reference:"git-daemon-1.7.1-9.el6_9")) flag++;
  if (rpm_check(release:"RHEL6", cpu:"i686", reference:"git-debuginfo-1.7.1-9.el6_9")) flag++;
  if (rpm_check(release:"RHEL6", cpu:"s390x", reference:"git-debuginfo-1.7.1-9.el6_9")) flag++;
  if (rpm_check(release:"RHEL6", cpu:"x86_64", reference:"git-debuginfo-1.7.1-9.el6_9")) flag++;
  if (rpm_check(release:"RHEL6", reference:"git-email-1.7.1-9.el6_9")) flag++;
  if (rpm_check(release:"RHEL6", reference:"git-gui-1.7.1-9.el6_9")) flag++;
  if (rpm_check(release:"RHEL6", reference:"git-svn-1.7.1-9.el6_9")) flag++;
  if (rpm_check(release:"RHEL6", reference:"gitk-1.7.1-9.el6_9")) flag++;
  if (rpm_check(release:"RHEL6", reference:"gitweb-1.7.1-9.el6_9")) flag++;
  if (rpm_check(release:"RHEL6", reference:"perl-Git-1.7.1-9.el6_9")) flag++;

  if (flag)
  {
    security_report_v4(
      port       : 0,
      severity   : SECURITY_WARNING,
      extra      : rpm_report_get() + redhat_report_package_caveat()
    );
    exit(0);
  }
  else
  {
    tested = pkg_tests_get();
    if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
    else audit(AUDIT_PACKAGE_NOT_INSTALLED, "emacs-git / emacs-git-el / git / git-all / git-cvs / git-daemon / etc");
  }
}

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

  • Linux / Unix:
    /opt/nessus/lib/nessus/plugins/redhat-RHSA-2017-2485.nasl
  • Windows:
    C:\ProgramData\Tenable\Nessus\nessus\plugins\redhat-RHSA-2017-2485.nasl
  • Mac OS X:
    /Library/Nessus/run/lib/nessus/plugins/redhat-RHSA-2017-2485.nasl

Go back to menu.

How to Run


Here is how to run the RHEL 6 : git (RHSA-2017:2485) 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 Red Hat Local Security Checks plugin family.
  6. On the right side table select RHEL 6 : git (RHSA-2017:2485) plugin ID 102538.
  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 redhat-RHSA-2017-2485.nasl -t <IP/HOST>

Run the plugin with audit trail message on the console:

/opt/nessus/bin/nasl -a redhat-RHSA-2017-2485.nasl -t <IP/HOST>

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

/opt/nessus/bin/nasl -T - redhat-RHSA-2017-2485.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 redhat-RHSA-2017-2485.nasl -t <IP/HOST>

Go back to menu.

References


RHSA | Red Hat Security Advisory: See also: Similar and related Nessus plugins:
  • 102870 - Amazon Linux AMI : git (ALAS-2017-882)
  • 102769 - CentOS 7 : git (CESA-2017:2484)
  • 102549 - CentOS 6 : git (CESA-2017:2485)
  • 102788 - Debian DLA-1068-1 : git security update
  • 102374 - Debian DSA-3934-1 : git - security update
  • 103025 - EulerOS 2.0 SP1 : git (EulerOS-SA-2017-1187)
  • 103026 - EulerOS 2.0 SP2 : git (EulerOS-SA-2017-1188)
  • 124888 - EulerOS Virtualization for ARM 64 3.0.1.0 : git (EulerOS-SA-2019-1385)
  • 124923 - EulerOS Virtualization 3.0.1.0 : git (EulerOS-SA-2019-1420)
  • 102458 - Fedora 25 : git (2017-8ba7572cfd)
  • 102461 - Fedora 26 : git (2017-b1b3ae6666)
  • 103278 - GLSA-201709-10 : Git: Command injection
  • 102494 - Git for Windows 2.7.x < 2.7.6 / 2.8.x < 2.8.6 / 2.9.x < 2.9.5 / 2.10.x < 2.10.4 / 2.11.x < 2.11.13 / 2.12.x < 2.12.4 / 2.13.x < 2.13.5 / 2.14.x < 2.14.1 Malicious SSH URL Command Execution
  • 103359 - Apple Xcode < 9.0 Multiple RCE (macOS)
  • 127364 - NewStart CGSL MAIN 4.05 : git Vulnerability (NS-SA-2019-0120)
  • 102558 - openSUSE Security Update : git (openSUSE-2017-939)
  • 102943 - openSUSE Security Update : git (openSUSE-2017-988)
  • 102534 - Oracle Linux 7 : git (ELSA-2017-2484)
  • 102569 - Oracle Linux 6 : git (ELSA-2017-2485)
  • 102537 - RHEL 7 : git (RHSA-2017:2484)
  • 103349 - RHEL 7 : Mobile Application Platform (RHSA-2017:2674)
  • 102576 - Scientific Linux Security Update : git on SL6.x i386/x86_64 (20170817)
  • 102674 - Scientific Linux Security Update : git on SL7.x x86_64 (20170817)
  • 102432 - Slackware 13.0 / 13.1 / 13.37 / 14.0 / 14.1 / 14.2 / current : git (SSA:2017-223-01)
  • 102914 - SUSE SLES12 Security Update : git (SUSE-SU-2017:2320-1)
  • 135580 - SUSE SLES12 Security Update : git (SUSE-SU-2020:0992-1)
  • 102423 - Ubuntu 14.04 LTS / 16.04 LTS / 17.04 : git vulnerability (USN-3387-1)
  • 119223 - Virtuozzo 6 : emacs-git / emacs-git-el / git / git-all / git-cvs / etc (VZLSA-2017-2485)

Version


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

Go back to menu.