|
|
|
Parsing Nessus CSV Reports with PowerShell |
Si vous voulez bloquer ce service sur vos fils RSS
Si vous voulez nous contacter ou nous proposer un fil RSS
Menu > Articles de la revue de presse : - l'ensemble [ tous | francophone] - par mots clé [ tous] - par site [ tous] - le tagwall [ voir] - Top bi-hebdo de la revue de presse [ Voir]
Parsing Nessus CSV Reports with PowerShell Par BlogLe [2012-06-15] à 22:00:04
Présentation : Recently in the Pauldotcom Podcast Paul was mentioning how he uses Awk, cut and other bash tools to process a Nessus CSV report file and format the host output so he could use it in another tool. I saw his command and thought I would do it in PowerShell for kicks since PowerShell turns each row in to an object I can manipulate. Lets take a look at the Import-Csv cmandlet and what are the members of the object it returns PS C Users carlos Import-Csv C Users carlos Desktop nessus.csv Get-Member TypeName System.Management.Automation.PSCustomObject Name MemberType Definition ---- ---------- ---------- Equals Method bool Equals System.Object obj GetHashCode Method int GetHashCode GetType Method type GetType ToString Method string ToString CVE NoteProperty System.String CVE N A CVSS NoteProperty System.String CVSS Description NoteProperty System.String Description One of several ports that were previously o... Host NoteProperty System.String Host 192.168.1.161 Name NoteProperty System.String Name Open Port Re-check Plugin ID NoteProperty System.String Plugin ID 10919 Plugin Output NoteProperty System.String Plugin Output Port 49156 was detected as being open but... Port NoteProperty System.String Port 0 Protocol NoteProperty System.String Protocol tcp Risk NoteProperty System.String Risk None Solution NoteProperty System.String Solution - increase checks_read_timeout and or reduce m... Synopsis NoteProperty System.String Synopsis Previously open ports are now closed. We can see that the Nessus data for each plugin that ran is represented as NoteProperty for the object as a string. Lets see if I have some vulnerabilities found that it reports as being High for this we will use the Where-Object cmdlet to filter the objects PS C Users carlos Import-Csv C Users carlos Desktop nessus.csv where .risk -eq high Plugin ID 53382 CVE CVE-2010-3190 CVSS 9.3 Risk High Host 192.168.1.161 Protocol tcp Port 445 Name MS11-025 Vulnerability in Microsoft Foundation Class MFC Library Could Allow Remote Code Execution 2500212 Synopsis Arbitrary code can be executed on the remote host through the Microsoft Foundation Class library. Description The remote Windows host contains a version of the Microsoft Foundation Class MFC library affected by an insecure library loading vulnerability. The path used for loading external libraries is not securely restricted. An attacker can exploit this by tricking a user into opening an MFC application in a directory that contains a malicious DLL, resulting in arbitrary code execution. Solution Microsoft has released a set of patches for Visual Studio .NET 2003, 2005, and 2008, as well as Visual C 2005, 2008, and 2010 http technet.microsoft.com en-us security bulletin ms11-025 Plugin Output The following Visual C Redistributable Package has not been patched Product Visual C 2008 SP1 Redistributable Package Installed version 9.0.30729.4148 Fixed version 9.0.30729.6161 Plugin ID 58657 CVE CVE-2012-0163 CVSS 9.3 Risk High Host 192.168.1.161 Protocol tcp Port 445 Name MS12-025 Vulnerability in .NET Framework Could Allow Remote Code Execution 2671605 Synopsis The .NET Framework install on the remote Windows host could allow arbitrary code execution. Description The version of the .NET Framework installed on the remote host reportedly is affected by a code execution vulnerability because of the way .NET Framework validates parameters when passing data to a function. An attacker may be able to leverage these vulnerabilities to execute arbitrary code on the affected system if a user can be tricked into viewing a specially crafted web page using a web browser that can run XAML Browser Applications XBAPs . The vulnerability could also be exploited by uploading a specially crafted ASP.NET page to a server system running IIS and then executing that page. Solution Microsoft has released a set of patches for .NET Framework 1.0, 1.1, 2.0, 3.5.1, and 4 http technet.microsoft.com en-us security bulletin ms12-025 Plugin Output - C Windows Microsoft.NET Framework v2.0.50727 System.drawing.dll has not been patched Remote version 2.0.50727.5420 Should be 2.0.50727.5458 Plugin ID 53382 CVE CVE-2010-3190 CVSS 9.3 Risk High Host 192.168.1.160 Protocol tcp Port 445 Name MS11-025 Vulnerability in Microsoft Foundation Class MFC Library Could Allow Remote Code Execution 2500212 Synopsis Arbitrary code can be executed on the remote host through the Microsoft Foundation Class library. Description The remote Windows host contains a version of the Microsoft Foundation Class MFC library affected by an insecure library loading vulnerability. The path used for loading external libraries is not securely restricted. An attacker can exploit this by tricking a user into opening an MFC application in a directory that contains a malicious DLL, resulting in arbitrary code execution. Solution Microsoft has released a set of patches for Visual Studio .NET 2003, 2005, and 2008, as well as Visual C 2005, 2008, and 2010 http technet.microsoft.com en-us security bulletin ms11-025 Plugin Output The following Visual C Redistributable Package has not been patched Product Visual C 2008 SP1 Redistributable Package Installed version 9.0.30729.4148 Fixed version 9.0.30729.6161 Plugin ID 58657 CVE CVE-2012-0163 CVSS 9.3 Risk High Host 192.168.1.160 Protocol tcp Port 445 Name MS12-025 Vulnerability in .NET Framework Could Allow Remote Code Execution 2671605 Synopsis The .NET Framework install on the remote Windows host could allow arbitrary code execution. Description The version of the .NET Framework installed on the remote host reportedly is affected by a code execution vulnerability because of the way .NET Framework validates parameters when passing data to a function. An attacker may be able to leverage these vulnerabilities to execute arbitrary code on the affected system if a user can be tricked into viewing a specially crafted web page using a web browser that can run XAML Browser Applications XBAPs . The vulnerability could also be exploited by uploading a specially crafted ASP.NET page to a server system running IIS and then executing that page. Solution Microsoft has released a set of patches for .NET Framework 1.0, 1.1, 2.0, 3.5.1, and 4 http technet.microsoft.com en-us security bulletin ms12-025 Plugin Output - C Windows Microsoft.NET Framework v2.0.50727 System.drawing.dll has not been patched Remote version 2.0.50727.5420 Should be 2.0.50727.5458 Great we found several. One advantage is that PowerShell is not case sensitive in it's operators unless you implicitly specify it. Now lets say I want to know what hosts have high vulnerabilities and only want their IP returned, for this we will use the Select-Object cmdlet and only get unique entries PS C Users carlos Import-Csv C Users carlos Desktop nessus.csv where .risk -eq high select host -Unique Host ---- 192.168.1.161 192.168.1.160 If we like doing all of the matching and sorting in a GUI interface we can take a look of the results in a grid view. Lets look at high, medium and low vulnerabilities and we will look at the Plugin ID, CVE, CVSS, Risk, Host, Protocol, Port and Name PS C Users carlos Import-Csv C Users carlos Desktop nessus.csv where high , medium , low -contains .risk select Plugin ID , CVE, CVSS, Risk, Host, Protocol, Port, Name Out-GridView This would bring up the following screen for us to filter and sort the information in a graphical manner image Now what if we want to turn the data in to an HTML Report, well PowerShell also allows us to do it using the ConvertTo-Html cmdlet and turn it in to an HTML report in list format Import-Csv C Users carlos Desktop nessus.csv where high , medium , low -contains .risk select Plugin ID , CVE, CVSS, Risk, Host, Protocol, Port, Name ConvertTo-Html -As List report.html This will create a report that looks like this image One could go even fancier with pre-made CSS and HTML templates, but I will leave that for you to explore.
Les mots clés de la revue de presse pour cet article : parsing nessus powershell Les videos sur SecuObs pour les mots clés : nessus Les mots clés pour les articles publiés sur SecuObs : nessus Les éléments de la revue Twitter pour les mots clé : nessus
Les derniers articles du site "Blog" :
- Malware Trends - Q1 2016 - Simplified DDoS Testing at Scale - BreakingPoint Captures Real-World 2015 Application Trends - ATI Minecraft - Benchmarking Open Source SDN Controllers Are They Ready for Carrier-Grade Services - The End of Days is Here for Network Blind Spots - Ixia ATI Research Center Finds Multiple Security Vulnerabilities in IBM Tivoli Storage Manager FastBack - Introducing PSAttack - Mobile World Congress 2016 Recap - Ixia Smarter Security at RSA 2016
Menu > Articles de la revue de presse : - l'ensemble [ tous | francophone] - par mots clé [ tous] - par site [ tous] - le tagwall [ voir] - Top bi-hebdo de la revue de presse [ Voir]
Si vous voulez bloquer ce service sur vos fils RSS :
- avec iptables "iptables -A INPUT -s 88.190.17.190 --dport 80 -j DROP"
- avec ipfw et wipfw "ipfw add deny from 88.190.17.190 to any 80"
- Nous contacter par mail
| Mini-Tagwall des articles publiés sur SecuObs : | | | | sécurité, exploit, windows, attaque, outil, microsoft, réseau, audit, metasploit, vulnérabilité, système, virus, internet, usbsploit, données, source, linux, protocol, présentation, scanne, réseaux, scanner, bluetooth, conférence, reverse, shell, meterpreter, vista, rootkit, détection, mobile, security, malicieux, engineering, téléphone, paquet, trames, https, noyau, utilisant, intel, wishmaster, google, sysun, libre |
| Mini-Tagwall de l'annuaire video : | | | | curit, security, biomet, metasploit, biometric, cking, password, windows, botnet, defcon, tutorial, crypt, xploit, exploit, lockpicking, linux, attack, wireshark, vmware, rootkit, conference, network, shmoocon, backtrack, virus, conficker, elcom, etter, elcomsoft, server, meterpreter, openvpn, ettercap, openbs, iphone, shell, openbsd, iptables, securitytube, deepsec, source, office, systm, openssh, radio |
| Mini-Tagwall des articles de la revue de presse : | | | | security, microsoft, windows, hacker, attack, network, vulnerability, google, exploit, malware, internet, remote, iphone, server, inject, patch, apple, twitter, mobile, virus, ebook, facebook, vulnérabilité, crypt, source, linux, password, intel, research, virtual, phish, access, tutorial, trojan, social, privacy, firefox, adobe, overflow, office, cisco, conficker, botnet, pirate, sécurité |
| Mini-Tagwall des Tweets de la revue Twitter : | | | | security, linux, botnet, attack, metasploit, cisco, defcon, phish, exploit, google, inject, server, firewall, network, twitter, vmware, windows, microsoft, compliance, vulnerability, python, engineering, source, kernel, crypt, social, overflow, nessus, crack, hacker, virus, iphone, patch, virtual, javascript, malware, conficker, pentest, research, email, password, adobe, apache, proxy, backtrack |
|
|
|
|
|