Adobe Flash Player for Mac Installed

2011-05-16T00:00:00
ID MACOSX_FLASH_PLAYER_INSTALLED.NASL
Type nessus
Reporter Tenable
Modified 2018-05-16T00:00:00

Description

Adobe Flash Player for Mac is installed on the remote Mac OS X host.

                                        
                                            #TRUSTED 3a96551a8d3094918bfad88cf7d321ad14d3494b2137407ec77bd944f5908a5cba1a6d117f6dd0e9678061911f55e9dc6a13d731d4f5c0c0718c93584d7ac8c7b7654ce542d783befd19d43ff854c57e3a9da9ff93acb720489e11e0b722a6630c4725b8d297cfa88f1ecb4adfd32597fced86dd4ac11c3900a911a4fc99ca21dda22d46bb86ca6fbbdcdfd2d913af9630bf7bbd674b33472e80342a12ae7156f7cb482eaa2299aa28feddf4f47d94c036860423dae91caa2e563c310b0484c1dcfbf5c6c4850cedb08ea1c8d2f985f4d921244708c0ade80824d8b5578832f06751c90945670a04e471dd342e59fa44aa50fee9c2d7c90c78ec854112d9499825e4675b1ea1aeb450f1ad227b72fcea0dbe8aeab13c572838f056085bb094a90e37705da2df41920f192f8f2f12c015af7c11825a873d2ae1227384f7543999519b705dbaeb993813a3afdb4c94ada66528dbc1a182827a67f8eac0a59094b142f4cd6de8aaf4638f5dd2e16086565531200fe4a6b8281903158f96eb788346c56684e9275a86dcdd250e690529bed93222db77989d16d655ba6cd6e45593304e7d8a79e0f73b04a5535a5f4e87fe6fc2206af68806e15bfcd8a992cc37ccb4a6c2460a7f7bb1fcb2ea540f748b59378ac587c9f1570fe914008a85f3dd0decf4e02572f4eb8b6bcffc6986e90ca5da6e3a4723e18c93fba5bcb35f1d0c32d3
#
# (C) Tenable Network Security, Inc.
#

include("compat.inc");

if (description)
{
  script_id(53914);
  script_version("1.6");
  script_set_attribute(attribute:"plugin_modification_date", value:"2018/05/16");

  script_name(english:"Adobe Flash Player for Mac Installed");
  script_summary(english:"Gets Flash Player version from Info.plist");

  script_set_attribute(attribute:"synopsis", value:
"The remote Mac OS X host contains a browser enhancement for displaying
multimedia content.");
  script_set_attribute(attribute:"description", value:"Adobe Flash Player for Mac is installed on the remote Mac OS X host.");
  script_set_attribute(attribute:"see_also", value:"http://www.adobe.com/products/flashplayer/");
  script_set_attribute(attribute:"solution", value:"n/a");
  script_set_attribute(attribute:"risk_factor", value:"None");

  script_set_attribute(attribute:"plugin_publication_date", value:"2011/05/16");

  script_set_attribute(attribute:"plugin_type", value:"local");
  script_set_attribute(attribute:"cpe", value:"cpe:/a:adobe:flash_player");
  script_end_attributes();

  script_category(ACT_GATHER_INFO);
  script_family(english:"MacOS X Local Security Checks");

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

  script_dependencies("ssh_get_info.nasl");
  script_require_keys("Host/MacOSX/packages");

  exit(0);
}


include("global_settings.inc");
include("misc_func.inc");
include("ssh_func.inc");
include("macosx_func.inc");
include("audit.inc");
include("install_func.inc");

app = "Flash Player";

if(sshlib::get_support_level() >= sshlib::SSH_LIB_SUPPORTS_COMMANDS)
  enable_ssh_wrappers();
else disable_ssh_wrappers();

packages = get_kb_item("Host/MacOSX/packages");
if (!packages) exit(0, "The 'Host/MacOSX/packages' KB item is missing.");

path = "/Library/Internet Plug-Ins/Flash Player.plugin";
plist = path + "/Contents/Info.plist";
cmd = string(
  "cat '", plist, "' | ",
  "grep -A 1 CFBundleShortVersionString | ",
  "tail -n 1 | ",
  'sed \'s/.*string>\\(.*\\)<\\/string>.*/\\1/g\''
);
version = exec_cmd(cmd:cmd);
if (isnull(version)) exit(0, "Flash Player is not installed.");
if (version !~ "^[0-9]") exit(1, "Failed to get the version - '" + version + "'.");

set_kb_item(name:"MacOSX/Flash_Player/Path", value:path);
set_kb_item(name:"MacOSX/Flash_Player/Version", value:version);

register_install(
  app_name:app,
  path:path,
  version:version,
  cpe:"cpe:/a:adobe:flash_player");

report = '\n  Path    : ' + path +
         '\n  Version : ' + version +
         '\n';

report_installs(app_name:app, extra:report);