Amcrest Technologies IP Camera Default Credentials (HTTP)
🗓️ 15 Mar 2019 00:00:00Reported by Copyright (C) 2019 Greenbone Networks GmbHType
openvas🔗 plugins.openvas.org👁 77 Views
| Reporter | Title | Published | Views | Family All 10 |
|---|---|---|---|---|
| CVE-2017-8226 | 4 Jul 201900:30 | – | circl | |
| Amcrest IPM-721S License Issue Vulnerability | 16 Jul 201900:00 | – | cnvd | |
| CVE-2017-8226 | 3 Jul 201919:25 | – | cve | |
| CVE-2017-8226 | 3 Jul 201919:25 | – | cvelist | |
| EUVD-2017-17188 | 7 Oct 202500:30 | – | euvd | |
| CVE-2017-8226 | 3 Jul 201920:15 | – | nvd | |
| Amcrest Technologies IP Cameras Multiple Vulnerabilities (Jun 2019) | 11 Jun 201900:00 | – | openvas | |
| CVE-2017-8226 | 3 Jul 201920:15 | – | osv | |
| Hardcoded credentials | 3 Jul 201920:15 | – | prion | |
| VulnCheck KEV: CVE-2017-8226 | 28 Nov 202300:00 | – | vulncheck_kev |
# Copyright (C) 2019 Greenbone Networks GmbH
# 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-or-later
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
if(description)
{
script_oid("1.3.6.1.4.1.25623.1.0.114085");
script_version("2023-03-02T10:19:53+0000");
script_cve_id("CVE-2017-8226");
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:"last_modification", value:"2023-03-02 10:19:53 +0000 (Thu, 02 Mar 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:"2019-07-11 01:49:00 +0000 (Thu, 11 Jul 2019)");
script_tag(name:"creation_date", value:"2019-03-15 15:02:42 +0100 (Fri, 15 Mar 2019)");
script_category(ACT_ATTACK);
script_copyright("Copyright (C) 2019 Greenbone Networks GmbH");
script_family("Default Accounts");
script_name("Amcrest Technologies IP Camera Default Credentials (HTTP)");
script_dependencies("gb_amcrest_ip_camera_http_detect.nasl", "gb_default_credentials_options.nasl");
script_require_ports("Services/www", 8080);
script_mandatory_keys("amcrest/ip_camera/http/detected");
script_exclude_keys("default_credentials/disable_default_account_checks");
script_xref(name:"URL", value:"https://support.amcrest.com/hc/en-us/articles/360002043651-How-To-Access-Your-Web-UI");
script_tag(name:"summary", value:"The remote installation of Amcrest's IP camera software 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 Amcrest's IP camera software 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 Amcrest's IP camera software
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:amcrest:ip_camera";
if(!port = get_app_port(cpe: CPE, service: "www"))
exit(0);
if(!get_app_location(cpe: CPE, port: port, nofork: TRUE))
exit(0);
#Credentials are in reversed order to allow for multiple passwords linked to the same user.
#The "anonymity" user was hardcoded into (or enabled on?) some hosts, found while testing.
creds = make_array("admin", "admin",
"anonymity", "anonymity");
url = "/RPC2_Login";
foreach cred(keys(creds)) {
username = creds[cred];
password = cred;
#Remember to always increment the id before a new request linked to a session.
id = 1;
#1. Request parameters from the server
data = '{"method":"global.login","params":{"userName":"' + username +
'","password":"","clientType":"Web3.0","loginType":"Direct"},"id":' + id + '}';
req = http_post_put_req(port: port, url: url, data: data);
res = http_keepalive_send_recv(port: port, data: req);
#2. Extract relevant information
#Example:
#{"error":{"code":268632079,"message":"Component error: login challenge!"},"id":1,"params":
#{"authorization":"3339eaa9152eebff56a720c2f4dd0a62203a51dc","encryption":"Default",
#"mac":"3CEF8C6101C0","random":"3734299","realm":"Login to AMC000N49SSV0M2U46"},"result":false,"session":1005027323}
info = eregmatch(pattern: '"encryption"\\s*:\\s*"([^"]+)"(,"mac":"[^"]*")?,\\s*"random"\\s*:\\s*"([^"]+)",\\s*"realm"\\s*:\\s*"([^"]+)"\\s*},\\s*"result"\\s*:\\s*[^,]*,\\s*"session"\\s*:\\s*([^}]+)\\s*}', string: res, icase: TRUE);
if(isnull(info[1]) || isnull(info[3]) || isnull(info[4]) || isnull(info[5]))
continue;
encryption = info[1];
random = info[3];
realm = info[4];
sessionID = int(info[5]);
#3. Classify this host based on the encryption type and calculate the hash accordingly
if(encryption == "Basic") {
pass = base64(str: username + ":" + password);
} else if(encryption == "Default") {
#This is their own form of "digest authentication"
ha1 = toupper(hexstr(MD5(string(username, ":", realm, ":", password))));
pass = toupper(hexstr(MD5(string(username, ":", random, ":", ha1))));
} else {
pass = password;
}
#4. Send the login form to the server
#Example:
#{"method":"global.login","params":{"userName":"admin","password":"D5CB53031D09A26D4175621AED5B7ED5",
#"clientType":"Web3.0","loginType":"Direct","authorityType":"Default"},"id":2,"session":1005027323}
data = '{"method":"global.login","params":{"userName":"' + username + '","password":"' + pass +
'","clientType":"Web3.0","loginType":"Direct","authorityType":"' + encryption + '"},"id":' + ++id + ',"session":' + sessionID + '}';
req = http_post_put_req(port: port, url: url, data: data);
res = http_keepalive_send_recv(port: port, data: req);
#Example of a successful login response(from one host where it was possible):
#{ "id" : 10000, "params" : null, "result" : true, "session" : 462002603 }
if(res =~ '"result"\\s*:\\s*true') {
VULN = TRUE;
if(!password)
password = "<no/empty password>";
report += '\n' + username + ':' + password;
}
}
if(VULN) {
report = 'It was possible to login with the following default credentials (username:password):\n' + report;
security_message(port: port, data: report);
exit(0);
}
exit(99);
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
02 Mar 2023 00:00Current
9.6High risk
Vulners AI Score9.6
CVSS 27.5
CVSS 39.8
EPSS0.03799