The remote VideoIQ Camera is using known default credentials.
# SPDX-FileCopyrightText: 2018 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.114024");
script_version("2023-07-20T05:05:18+0000");
script_tag(name:"cvss_base", value:"9.0");
script_tag(name:"cvss_base_vector", value:"AV:N/AC:L/Au:N/C:C/I:P/A:P");
script_tag(name:"last_modification", value:"2023-07-20 05:05:18 +0000 (Thu, 20 Jul 2023)");
script_tag(name:"creation_date", value:"2018-08-27 14:58:45 +0200 (Mon, 27 Aug 2018)");
script_category(ACT_ATTACK);
script_copyright("Copyright (C) 2018 Greenbone AG");
script_family("Default Accounts");
script_name("VideoIQ Camera Default Credentials (HTTP)");
script_dependencies("gb_videoiq_camera_detect.nasl", "gb_default_credentials_options.nasl");
script_require_ports("Services/www", 80);
script_mandatory_keys("videoiq/camera/detected");
script_exclude_keys("default_credentials/disable_default_account_checks");
script_xref(name:"URL", value:"https://customvideosecurity.com/blog/tag/default-password-axis/");
script_tag(name:"summary", value:"The remote VideoIQ Camera is using known default credentials.");
script_tag(name:"impact", value:"This issue may be exploited by a remote attacker to gain access
to sensitive information or modify system configuration.");
script_tag(name:"insight", value:"The installation of VideoIQ Camera is lacking a proper
password configuration, which makes critical information and actions accessible for people with knowledge
of the default credentials.");
script_tag(name:"vuldetect", value:"Checks if a successful login to VideoIQ Camera is possible.");
script_tag(name:"solution", value:"Change the passwords for user and admin access.");
script_tag(name:"solution_type", value:"Mitigation");
script_tag(name:"qod_type", value:"remote_vul");
exit(0);
}
if(get_kb_item("default_credentials/disable_default_account_checks"))
exit(0);
include("http_func.inc");
include("http_keepalive.inc");
include("host_details.inc");
include("misc_func.inc");
CPE = "cpe:/a:videoiq:videoiq_camera";
if(!port = get_app_port(cpe: CPE))
exit(0);
if(!get_app_location(cpe: CPE, port: port, nofork: TRUE))
exit(0);
username = "supervisor";
password = "supervisor";
#Url for sessionID extraction, which is needed for login
url1 = "/";
res1 = http_get_cache(port: port, item: url1);
sessionID = eregmatch(pattern: "JSESSIONID=([0-9a-zA-Z]+)", string: res1);
if(!sessionID[0]) exit(0);
url2 = "/;" + sessionID[0] + "?wicket:bookmarkablePage=:com.videoiq.fusion.camerawebapi.ui.pages.LoginPage&wicket:interface=:0:loginPanel:loginForm::IFormSubmitListener::";
data = "loginForm1_hf_0=&userName=" + username + "&password=" + password + "&login=";
req = http_post_put_req(port: port,
url: url2,
data: data,
add_headers: make_array("Content-Type", "application/x-www-form-urlencoded",
"Cookie", sessionID[0]));
res2 = http_keepalive_send_recv(port: port, data: req);
#If the login was successful, the server responds pretty much only with the sessionID from before.
res2SessionID = eregmatch(pattern: "JSESSIONID=([0-9a-zA-Z]+)", string: res2);
if(res2SessionID[0] && res2SessionID[0] == sessionID[0]) {
report = 'It was possible to login via the default username "' + username + '" and the default password "' + password + '".';
security_message(port: port, data: report);
exit(0);
}
exit(99);