Lucene search

K
nessusThis script is Copyright (C) 2023-2024 and is owned by Tenable, Inc. or an Affiliate thereof.TENABLE_OT_FANUCROBOTICS_CVE-2021-32998.NASL
HistoryApr 13, 2023 - 12:00 a.m.

FANUC Robot Controllers Out-of-Bounds Write (CVE-2021-32998)

2023-04-1300:00:00
This script is Copyright (C) 2023-2024 and is owned by Tenable, Inc. or an Affiliate thereof.
www.tenable.com
11
fanuc
robot controllers
out-of-bounds write
cve-2021-32998
remote execution
init start
backup restoration
tenable ot

0.001 Low

EPSS

Percentile

38.5%

The FANUC R-30iA and R-30iB series controllers are vulnerable to an out-of-bounds write, which may allow an attacker to remotely execute arbitrary code. INIT START/restore from backup required.

This plugin only works with Tenable.ot.
Please visit https://www.tenable.com/products/tenable-ot for more information.

#%NASL_MIN_LEVEL 80900
##
# (C) Tenable, Inc.
##

include('compat.inc');

if (description)
{
  script_id(501065);
  script_version("1.4");
  script_set_attribute(attribute:"plugin_modification_date", value:"2024/03/04");

  script_cve_id("CVE-2021-32998");

  script_name(english:"FANUC Robot Controllers Out-of-Bounds Write (CVE-2021-32998)");

  script_set_attribute(attribute:"synopsis", value:
"The remote OT asset is affected by a vulnerability.");
  script_set_attribute(attribute:"description", value:
"The FANUC R-30iA and R-30iB series controllers are vulnerable to an
out-of-bounds write, which may allow an attacker to remotely execute
arbitrary code. INIT START/restore from backup required.

This plugin only works with Tenable.ot.
Please visit https://www.tenable.com/products/tenable-ot for more information.");
  script_set_attribute(attribute:"see_also", value:"https://www.cisa.gov/uscert/ics/advisories/icsa-21-243-02");
  script_set_attribute(attribute:"solution", value:
"The following text was originally created by the Cybersecurity and Infrastructure Security Agency (CISA). The original
can be found at CISA.gov.

FANUC is recommending the following, both of which are documented in FANUCҀ™s Internet Setup and Operations Manual:

- FANUC Server Access Control (FSAC): Users can configure access to the FANUC webserver based on IP address.
- Network Protocol Access Level: Users can configure which protocols are usable on the controller by creating a firewall
where users can close unwanted ports based on the chosen access level.

FANUC users can also find any additional information by visiting the FANUC website or contacting FANUC.");
  script_set_cvss_base_vector("CVSS2#AV:N/AC:M/Au:N/C:N/I:C/A:C");
  script_set_cvss_temporal_vector("CVSS2#E:U/RL:OF/RC:C");
  script_set_cvss3_base_vector("CVSS:3.0/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:H/A:H");
  script_set_cvss3_temporal_vector("CVSS:3.0/E:U/RL:O/RC:C");
  script_set_attribute(attribute:"cvss_score_source", value:"CVE-2021-32998");

  script_set_attribute(attribute:"exploitability_ease", value:"No known exploits are available");
  script_cwe_id(787);

  script_set_attribute(attribute:"vuln_publication_date", value:"2022/01/10");
  script_set_attribute(attribute:"patch_publication_date", value:"2022/01/10");
  script_set_attribute(attribute:"plugin_publication_date", value:"2023/04/13");

  script_set_attribute(attribute:"plugin_type", value:"remote");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ia_firmware:7.20");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ia_firmware:7.30");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ia_firmware:7.40");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ia_firmware:7.43");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ia_firmware:7.50");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ia_firmware:7.63");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ia_firmware:7.70");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ia_mate_firmware:7.20");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ia_mate_firmware:7.30");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ia_mate_firmware:7.40");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ia_mate_firmware:7.43");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ia_mate_firmware:7.50");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ia_mate_firmware:7.63");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ia_mate_firmware:7.70");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ib_compact_plus_firmware:9.10");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ib_compact_plus_firmware:9.13");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ib_compact_plus_firmware:9.16");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ib_compact_plus_firmware:9.30");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ib_compact_plus_firmware:9.36");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ib_compact_plus_firmware:9.40");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ib_firmware:8.10");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ib_firmware:8.13");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ib_firmware:8.20");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ib_firmware:8.23");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ib_firmware:8.26");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ib_firmware:8.30");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ib_firmware:8.33");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ib_firmware:8.36");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ib_mate_firmware:8.10");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ib_mate_firmware:8.13");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ib_mate_firmware:8.20");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ib_mate_firmware:8.23");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ib_mate_firmware:8.26");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ib_mate_firmware:8.30");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ib_mate_firmware:8.33");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ib_mate_firmware:8.36");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ib_mate_plus_firmware:9.10");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ib_mate_plus_firmware:9.13");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ib_mate_plus_firmware:9.16");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ib_mate_plus_firmware:9.30");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ib_mate_plus_firmware:9.36");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ib_mate_plus_firmware:9.40");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ib_mini_plus_firmware:9.10");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ib_mini_plus_firmware:9.13");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ib_mini_plus_firmware:9.16");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ib_mini_plus_firmware:9.30");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ib_mini_plus_firmware:9.36");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ib_mini_plus_firmware:9.40");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ib_plus_firmware:9.10");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ib_plus_firmware:9.13");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ib_plus_firmware:9.16");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ib_plus_firmware:9.30");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ib_plus_firmware:9.36");
  script_set_attribute(attribute:"cpe", value:"cpe:/o:fanuc:r-30ib_plus_firmware:9.40");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_family(english:"Tenable.ot");

  script_copyright(english:"This script is Copyright (C) 2023-2024 and is owned by Tenable, Inc. or an Affiliate thereof.");

  script_dependencies("tenable_ot_api_integration.nasl");
  script_require_keys("Tenable.ot/FanucRobotics");

  exit(0);
}


include('tenable_ot_cve_funcs.inc');

get_kb_item_or_exit('Tenable.ot/FanucRobotics');

var asset = tenable_ot::assets::get(vendor:'FanucRobotics');

var vuln_cpes = {
    "cpe:/o:fanuc:r-30ia_firmware:7.20" :
        {"versionEndIncluding" : "7.20", "versionStartIncluding" : "7.20", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ia_firmware:7.30" :
        {"versionEndIncluding" : "7.30", "versionStartIncluding" : "7.30", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ia_firmware:7.40" :
        {"versionEndIncluding" : "7.40", "versionStartIncluding" : "7.40", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ia_firmware:7.43" :
        {"versionEndIncluding" : "7.43", "versionStartIncluding" : "7.43", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ia_firmware:7.50" :
        {"versionEndIncluding" : "7.50", "versionStartIncluding" : "7.50", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ia_firmware:7.63" :
        {"versionEndIncluding" : "7.63", "versionStartIncluding" : "7.63", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ia_firmware:7.70" :
        {"versionEndIncluding" : "7.70", "versionStartIncluding" : "7.70", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ia_mate_firmware:7.20" :
        {"versionEndIncluding" : "7.20", "versionStartIncluding" : "7.20", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ia_mate_firmware:7.30" :
        {"versionEndIncluding" : "7.30", "versionStartIncluding" : "7.30", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ia_mate_firmware:7.40" :
        {"versionEndIncluding" : "7.40", "versionStartIncluding" : "7.40", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ia_mate_firmware:7.43" :
        {"versionEndIncluding" : "7.43", "versionStartIncluding" : "7.43", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ia_mate_firmware:7.50" :
        {"versionEndIncluding" : "7.50", "versionStartIncluding" : "7.50", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ia_mate_firmware:7.63" :
        {"versionEndIncluding" : "7.63", "versionStartIncluding" : "7.63", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ia_mate_firmware:7.70" :
        {"versionEndIncluding" : "7.70", "versionStartIncluding" : "7.70", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ib_mate_firmware:8.10" :
        {"versionEndIncluding" : "8.10", "versionStartIncluding" : "8.10", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ib_mate_firmware:8.13" :
        {"versionEndIncluding" : "8.13", "versionStartIncluding" : "8.13", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ib_mate_firmware:8.20" :
        {"versionEndIncluding" : "8.20", "versionStartIncluding" : "8.20", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ib_mate_firmware:8.23" :
        {"versionEndIncluding" : "8.23", "versionStartIncluding" : "8.23", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ib_mate_firmware:8.26" :
        {"versionEndIncluding" : "8.26", "versionStartIncluding" : "8.26", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ib_mate_firmware:8.30" :
        {"versionEndIncluding" : "8.30", "versionStartIncluding" : "8.30", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ib_mate_firmware:8.33" :
        {"versionEndIncluding" : "8.33", "versionStartIncluding" : "8.33", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ib_mate_firmware:8.36" :
        {"versionEndIncluding" : "8.36", "versionStartIncluding" : "8.36", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ib_firmware:8.10" :
        {"versionEndIncluding" : "8.10", "versionStartIncluding" : "8.10", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ib_firmware:8.13" :
        {"versionEndIncluding" : "8.13", "versionStartIncluding" : "8.13", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ib_firmware:8.20" :
        {"versionEndIncluding" : "8.20", "versionStartIncluding" : "8.20", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ib_firmware:8.23" :
        {"versionEndIncluding" : "8.23", "versionStartIncluding" : "8.23", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ib_firmware:8.26" :
        {"versionEndIncluding" : "8.26", "versionStartIncluding" : "8.26", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ib_firmware:8.30" :
        {"versionEndIncluding" : "8.30", "versionStartIncluding" : "8.30", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ib_firmware:8.33" :
        {"versionEndIncluding" : "8.33", "versionStartIncluding" : "8.33", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ib_firmware:8.36" :
        {"versionEndIncluding" : "8.36", "versionStartIncluding" : "8.36", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ib_mate_plus_firmware:9.10" :
        {"versionEndIncluding" : "9.10", "versionStartIncluding" : "9.10", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ib_mate_plus_firmware:9.13" :
        {"versionEndIncluding" : "9.13", "versionStartIncluding" : "9.13", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ib_mate_plus_firmware:9.16" :
        {"versionEndIncluding" : "9.16", "versionStartIncluding" : "9.16", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ib_mate_plus_firmware:9.30" :
        {"versionEndIncluding" : "9.30", "versionStartIncluding" : "9.30", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ib_mate_plus_firmware:9.36" :
        {"versionEndIncluding" : "9.36", "versionStartIncluding" : "9.36", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ib_mate_plus_firmware:9.40" :
        {"versionEndIncluding" : "9.40", "versionStartIncluding" : "9.40", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ib_compact_plus_firmware:9.10" :
        {"versionEndIncluding" : "9.10", "versionStartIncluding" : "9.10", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ib_compact_plus_firmware:9.13" :
        {"versionEndIncluding" : "9.13", "versionStartIncluding" : "9.13", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ib_compact_plus_firmware:9.16" :
        {"versionEndIncluding" : "9.16", "versionStartIncluding" : "9.16", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ib_compact_plus_firmware:9.30" :
        {"versionEndIncluding" : "9.30", "versionStartIncluding" : "9.30", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ib_compact_plus_firmware:9.36" :
        {"versionEndIncluding" : "9.36", "versionStartIncluding" : "9.36", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ib_compact_plus_firmware:9.40" :
        {"versionEndIncluding" : "9.40", "versionStartIncluding" : "9.40", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ib_mini_plus_firmware:9.10" :
        {"versionEndIncluding" : "9.10", "versionStartIncluding" : "9.10", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ib_mini_plus_firmware:9.13" :
        {"versionEndIncluding" : "9.13", "versionStartIncluding" : "9.13", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ib_mini_plus_firmware:9.16" :
        {"versionEndIncluding" : "9.16", "versionStartIncluding" : "9.16", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ib_mini_plus_firmware:9.30" :
        {"versionEndIncluding" : "9.30", "versionStartIncluding" : "9.30", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ib_mini_plus_firmware:9.36" :
        {"versionEndIncluding" : "9.36", "versionStartIncluding" : "9.36", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ib_mini_plus_firmware:9.40" :
        {"versionEndIncluding" : "9.40", "versionStartIncluding" : "9.40", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ib_plus_firmware:9.10" :
        {"versionEndIncluding" : "9.10", "versionStartIncluding" : "9.10", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ib_plus_firmware:9.13" :
        {"versionEndIncluding" : "9.13", "versionStartIncluding" : "9.13", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ib_plus_firmware:9.16" :
        {"versionEndIncluding" : "9.16", "versionStartIncluding" : "9.16", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ib_plus_firmware:9.30" :
        {"versionEndIncluding" : "9.30", "versionStartIncluding" : "9.30", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ib_plus_firmware:9.36" :
        {"versionEndIncluding" : "9.36", "versionStartIncluding" : "9.36", "family" : "FanucRobotics"},
    "cpe:/o:fanuc:r-30ib_plus_firmware:9.40" :
        {"versionEndIncluding" : "9.40", "versionStartIncluding" : "9.40", "family" : "FanucRobotics"}
};

tenable_ot::cve::compare_and_report(asset:asset, cpes:vuln_cpes, severity:SECURITY_HOLE);
VendorProductVersionCPE
fanucr-30ia_firmware7.20cpe:/o:fanuc:r-30ia_firmware:7.20
fanucr-30ia_firmware7.30cpe:/o:fanuc:r-30ia_firmware:7.30
fanucr-30ia_firmware7.40cpe:/o:fanuc:r-30ia_firmware:7.40
fanucr-30ia_firmware7.43cpe:/o:fanuc:r-30ia_firmware:7.43
fanucr-30ia_firmware7.50cpe:/o:fanuc:r-30ia_firmware:7.50
fanucr-30ia_firmware7.63cpe:/o:fanuc:r-30ia_firmware:7.63
fanucr-30ia_firmware7.70cpe:/o:fanuc:r-30ia_firmware:7.70
fanucr-30ia_mate_firmware7.20cpe:/o:fanuc:r-30ia_mate_firmware:7.20
fanucr-30ia_mate_firmware7.30cpe:/o:fanuc:r-30ia_mate_firmware:7.30
fanucr-30ia_mate_firmware7.40cpe:/o:fanuc:r-30ia_mate_firmware:7.40
Rows per page:
1-10 of 541

0.001 Low

EPSS

Percentile

38.5%

Related for TENABLE_OT_FANUCROBOTICS_CVE-2021-32998.NASL