I have a nessus file that looks like this :
<ReportHost name="192.168.2.65"><HostProperties>
<tag name="traceroute-hop-1">192.168.2.65</tag>
<tag name="HOST_START">Wed Nov 10 12:48:53 2021</tag>
<tag name="HOST_START_TIMESTAMP">1636548533</tag>
<tag name="host-ip">192.168.2.65</tag>
<tag name="HOST_END">Wed Nov 10 12:50:22 2021</tag>
<tag name="HOST_END_TIMESTAMP">1636548622</tag>
<tag name="host-rdns">chuangmi.camera.ipc019.Home</tag>
<tag name="host-fqdn">chuangmi.camera.ipc019.Home</tag>
<tag name="traceroute-hop-0">?</tag>
<tag name="mac-address">5C:E5:0C:6D:82:73</tag>
<tag name="host-fqdns">[{"FQDN":"chuangmi.camera.ipc019.Home","sources":["get_host_fqdn()","determine_fqdn()"]}]</tag>
<tag name="operating-system-method">Unknown</tag>
<tag name="operating-system-conf">-1</tag>
<tag name="os">other</tag>
<tag name="patch-summary-total-cves">1</tag>
<tag name="policy-used">Basic Network Scan</tag>
<tag name="Credentialed_Scan">false</tag>
<tag name="LastUnauthenticatedResults">1636548622</tag>
</HostProperties>
<ReportItem port="0" svc_name="general" protocol="tcp" severity="0" pluginID="12053" pluginName="Host Fully Qualified Domain Name (FQDN) Resolution" pluginFamily="General">
<description>Nessus was able to resolve the fully qualified domain name (FQDN) of the remote host.</description>
<fname>fqdn.nasl</fname>
<plugin_modification_date>2017/04/14</plugin_modification_date>
<plugin_name>Host Fully Qualified Domain Name
and i really need to parse this into logstash. i tried many options from other topics.
this is my config file :
input {
file {
path => "/home/rsc/scansNessus/*"
start_position => "beginning"
sincedb_path => "/dev/null"
type => xml
codec => multiline {
pattern => "<?xml"
negate => "true"
what => "previous"
}
}
}
filter {
xml{
source => "message"
store_xml => false
#target => "ReportItem"
xpath => [ "//NessusClientData_v2/Report/ReportHost/ReportItem/@pluginName","description" ]
}
}
Anyone can help me? i've been struggling with this for 2 weeks now