Export data
PiRogue deletes the data every 5 days for security reasons but to do a further analysis it is necessary to extract the alerts and flows as a result of the analysis, to export the data we need to do the following steps.
Once connected to the PiRogue, run the command
to export all Suricata alerts in a CSV file.
Run the command
to export all network flows in a CSV file.
You can then use scp to save these 2 files on your computer. Once you have retrieved your CSV files, you can open them with Excel, LibreOffice or any other software supporting CSV format.
The influxdb queries listed above are pretty simple but you can adapt them to your specific need, check out the influxdb documentation.
You can refine your request by filtering the following fields of the flows database:
time
: timestamp in nanoseconds on first flow bidirectional packetapplication_category_name
: nDPI detected application category nameapplication_name
: nDPI detected application namebidirectional_bytes
: flow bidirectional bytes accumulatorbidirectional_duration_ms
: flow bidirectional duration in millisecondscity
: city determined by geoip based on the remote IP addresscommunity_id
: community IDcommunity_id_b64
: community ID encoded in base64country
: country name determined by geoip based on the remote IP addresscountry_iso
: country ISO code determined by geoip based on the remote IP addressdst2src_bytes
: flow destination to source bytes accumulatordst_ip
: destination IP address string representationdst_mac
: destination MAC address string representationdst_port
: transport layer destination portlatitude
: latitude determined by geoip based on the remote IP addresslongitude
: longitude determined by geoip based on the remote IP addressrequested_server_name
: requested server name (SSL/TLS, DNS, HTTP)src2dst_bytes
: flow source to destination bytes accumulatorsrc_ip
: source IP address string representationsrc_mac
: source MAC address string representationsrc_port
: transport layer source port
You can refine your request by filtering the following fields of the Suricata alerts database:
time
: timestamp in nanoseconds on detectionalert_category
: category of the triggered rulealert_severity
: alert severityalert_signature
: signature of the triggered rulealert_signature_id
: unique identifier of the triggered ruleapp_proto
: network protocol (dns, http…)community_id
: community IDcommunity_id_b64
: community ID encoded in base64dest_ip
: destination IP address string representationdest_port
: transport layer destination portin_iface
: network interface nameproto
: transport protocol (UDP, TCP)src_ip
: source IP address string representationsrc_port
: transport layer source port
This documentation is based on the translation of a tutorial originally written by niculcha.