ID OPENVAS:102048 Type openvas Reporter Copyright (C) 2010 LSS Modified 2017-03-01T00:00:00
Description
Extracts date of the last update for Panda Antivirus software, from the
Titanium.ini file and stores it to KB.
###################################################################
# OpenVAS Vulnerability Test
#
# Panda Antivirus Update Detect
#
# LSS-NVT-2010-037
#
# Developed by LSS Security Team <http://security.lss.hr>
#
# Copyright (C) 2010 LSS <http://www.lss.hr>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2
# (or any later version), as published by the Free Software Foundation.
#
# 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, see
# <http://www.gnu.org/licenses/>.
###################################################################
tag_summary = "Extracts date of the last update for Panda Antivirus software, from the
Titanium.ini file and stores it to KB.";
if(description)
{
script_id(102048);
script_tag(name:"cvss_base_vector", value:"AV:N/AC:L/Au:N/C:N/I:N/A:N");
script_version("$Revision: 5453 $");
script_tag(name:"last_modification", value:"$Date: 2017-03-01 10:55:35 +0100 (Wed, 01 Mar 2017) $");
script_tag(name:"creation_date", value:"2010-07-08 10:59:30 +0200 (Thu, 08 Jul 2010)");
script_tag(name:"cvss_base", value:"0.0");
script_name("Panda Antivirus Update Detect");
script_category(ACT_GATHER_INFO);
script_tag(name:"qod_type", value:"registry");
script_copyright("Copyright (C) 2010 LSS");
script_family("Service detection");
script_dependencies("secpod_reg_enum.nasl", "gb_panda_prdts_detect.nasl");
script_require_keys("SMB/name", "SMB/login", "SMB/password", "SMB/registry_access");
script_mandatory_keys("SMB/WindowsVersion");
script_require_ports(139, 445);
script_tag(name : "summary" , value : tag_summary);
exit(0);
}
#
# This script is tested on Panda Antivirus 2005 through 2007
# For other versions of Panda software might not work due to non-existent titanium.ini file
#
include("smb_nt.inc");
include("secpod_smb_func.inc");
port = get_kb_item("SMB/transport");
if (!port) port = 445;
#Detect if there is any Panda software installed
if(!registry_key_exists(key:"SOFTWARE\Panda Software")){
exit(0);
}
#reading install directories from the registry
key = "SOFTWARE\Panda Software\";
foreach item (registry_enum_keys(key:key))
{
## Check for the Internet Security
if("Panda Internet Security" >< item)
paths[0] = registry_get_sz(key:key + item, item:"DIR");
## Check for the Global Protection
if("Panda Global Protection" >< item)
paths[1] = registry_get_sz(key:key + item, item:"DIR");
## Check for the Antivirus
if("Panda Antivirus" >< item)
paths[2] = registry_get_sz(key:key + item, item:"DIR");
}
for(i = 0; i < 3; i++){
if(paths[i]){
share = ereg_replace(pattern:"([A-Z]):.*", replace:"\1$", string:paths[i]);
file = ereg_replace(pattern:"[A-Z]:(.*)", replace:"\1", string:paths[i]) + "\Titanium.ini";
last_update = read_file(share:share, file:file, offset:0, count:1000);
last_update = egrep(pattern:"^PavSigDate=(.*)$", string:last_update);
last_update = ereg_replace(pattern:"^PavSigDate=(.*)$", replace:"\1", string:last_update);
last_update = last_update - string("\r\n"); #removing the endline chars
if(!last_update)
{
log_message(data:"Could not find last date of signature base update in file Titanium.ini");
exit(-1);
}
#setting KB items
if(i == 0)
set_kb_item(name:"Panda/InternetSecurity/LastUpdate", value:last_update);
if(i == 1)
set_kb_item(name:"Panda/GlobalProtect/LastUpdate", value:last_update);
if(i == 2)
set_kb_item(name:"Panda/AntiVirus/LastUpdate", value:last_update);
}
}
{"id": "OPENVAS:102048", "type": "openvas", "bulletinFamily": "scanner", "title": "Panda Antivirus Update Detect", "description": "Extracts date of the last update for Panda Antivirus software, from the \n Titanium.ini file and stores it to KB.", "published": "2010-07-08T00:00:00", "modified": "2017-03-01T00:00:00", "cvss": {"score": 0.0, "vector": "NONE"}, "href": "http://plugins.openvas.org/nasl.php?oid=102048", "reporter": "Copyright (C) 2010 LSS", "references": [], "cvelist": [], "lastseen": "2017-07-02T21:09:10", "viewCount": 2, "enchantments": {"score": {"value": 0.3, "vector": "NONE", "modified": "2017-07-02T21:09:10", "rev": 2}, "dependencies": {"references": [], "modified": "2017-07-02T21:09:10", "rev": 2}, "vulnersScore": 0.3}, "pluginID": "102048", "sourceData": "###################################################################\n# OpenVAS Vulnerability Test\n#\n# Panda Antivirus Update Detect\n#\n# LSS-NVT-2010-037\n#\n# Developed by LSS Security Team <http://security.lss.hr>\n#\n# Copyright (C) 2010 LSS <http://www.lss.hr>\n#\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License version 2\n# (or any later version), as published by the Free Software Foundation.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n# GNU General Public License for more details.\n#\n# You should have received a copy of the GNU General Public\n# License along with this program. If not, see\n# <http://www.gnu.org/licenses/>.\n###################################################################\n\ntag_summary = \"Extracts date of the last update for Panda Antivirus software, from the \n Titanium.ini file and stores it to KB.\";\n\nif(description)\n{\n script_id(102048);\n script_tag(name:\"cvss_base_vector\", value:\"AV:N/AC:L/Au:N/C:N/I:N/A:N\");\n script_version(\"$Revision: 5453 $\");\n script_tag(name:\"last_modification\", value:\"$Date: 2017-03-01 10:55:35 +0100 (Wed, 01 Mar 2017) $\");\n script_tag(name:\"creation_date\", value:\"2010-07-08 10:59:30 +0200 (Thu, 08 Jul 2010)\");\n script_tag(name:\"cvss_base\", value:\"0.0\");\n script_name(\"Panda Antivirus Update Detect\");\n script_category(ACT_GATHER_INFO);\n script_tag(name:\"qod_type\", value:\"registry\");\n script_copyright(\"Copyright (C) 2010 LSS\");\n script_family(\"Service detection\");\n script_dependencies(\"secpod_reg_enum.nasl\", \"gb_panda_prdts_detect.nasl\");\n script_require_keys(\"SMB/name\", \"SMB/login\", \"SMB/password\", \"SMB/registry_access\");\n script_mandatory_keys(\"SMB/WindowsVersion\");\n\n script_require_ports(139, 445);\n script_tag(name : \"summary\" , value : tag_summary);\n exit(0);\n}\n\n\n#\n# This script is tested on Panda Antivirus 2005 through 2007\n# For other versions of Panda software might not work due to non-existent titanium.ini file \n#\n\ninclude(\"smb_nt.inc\");\ninclude(\"secpod_smb_func.inc\");\n\n\nport = get_kb_item(\"SMB/transport\");\nif (!port) port = 445;\n\n#Detect if there is any Panda software installed\nif(!registry_key_exists(key:\"SOFTWARE\\Panda Software\")){\n exit(0);\n}\n\n#reading install directories from the registry\nkey = \"SOFTWARE\\Panda Software\\\";\nforeach item (registry_enum_keys(key:key))\n{\n ## Check for the Internet Security\n if(\"Panda Internet Security\" >< item)\n paths[0] = registry_get_sz(key:key + item, item:\"DIR\");\n\n ## Check for the Global Protection\n if(\"Panda Global Protection\" >< item)\n paths[1] = registry_get_sz(key:key + item, item:\"DIR\");\n\n ## Check for the Antivirus\n if(\"Panda Antivirus\" >< item)\n paths[2] = registry_get_sz(key:key + item, item:\"DIR\"); \n}\n \nfor(i = 0; i < 3; i++){\n \n if(paths[i]){\n share = ereg_replace(pattern:\"([A-Z]):.*\", replace:\"\\1$\", string:paths[i]);\n file = ereg_replace(pattern:\"[A-Z]:(.*)\", replace:\"\\1\", string:paths[i]) + \"\\Titanium.ini\";\n last_update = read_file(share:share, file:file, offset:0, count:1000);\n last_update = egrep(pattern:\"^PavSigDate=(.*)$\", string:last_update);\n last_update = ereg_replace(pattern:\"^PavSigDate=(.*)$\", replace:\"\\1\", string:last_update);\n last_update = last_update - string(\"\\r\\n\"); #removing the endline chars\n\n if(!last_update)\n {\n log_message(data:\"Could not find last date of signature base update in file Titanium.ini\");\n exit(-1);\n }\n\n #setting KB items\n if(i == 0)\n set_kb_item(name:\"Panda/InternetSecurity/LastUpdate\", value:last_update);\n if(i == 1)\n set_kb_item(name:\"Panda/GlobalProtect/LastUpdate\", value:last_update);\n if(i == 2)\n set_kb_item(name:\"Panda/AntiVirus/LastUpdate\", value:last_update);\n }\n}\n", "naslFamily": "Service detection"}