<div dir="ltr">Hello Andreas,<div><br></div><div>I am able to reproduce this issue using pcap offline mode.  I used version 4.1.4 with the command "suricata -vv -c /etc/suricata/suricata.yaml --runmode autofp -k none --pidfile suricata.pid  -l logging/ -r esp_capture_filtered.pcap".  The result was that there were no flow or netflow entries created in eve.json, though both were enabled.  There were 240 alerts triggered for ESP traffic using the rule:</div><div><div>alert ip any any -> any any (msg:"IP Proto 50 (ESP)"; ip_proto:50; classtype:non-standard-protocol; sid:10010002; rev:1;)</div></div><div><br></div><div>I found a capture online from <a href="https://wiki.wireshark.org/SampleCaptures#IPsec_-_ESP_Payload_Decryption_and_Authentication_Checking_Examples">https://wiki.wireshark.org/SampleCaptures#IPsec_-_ESP_Payload_Decryption_and_Authentication_Checking_Examples</a> that worked well for my test.  I modified ipsec_esp_capture_1.tgz to remove the ICMP and ICMPv6 traffic as those were creating flow/netflow log entries.  I am attaching this modified capture for your convenience.</div><div><br></div><div>Thank you,</div><div>Eric</div><div><br></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><span style="color:rgb(0,0,0);font-family:"Helvetica Neue",Helvetica,sans-serif;font-size:small;white-space:nowrap">-- </span></div><div dir="ltr"><span style="color:rgb(0,0,0);font-family:"Helvetica Neue",Helvetica,sans-serif;font-size:small;font-weight:bold;white-space:nowrap">Eric Urban</span><br></div><div dir="ltr"><span style="color:rgb(0,0,0);font-family:'Helvetica Neue',Helvetica,sans-serif;font-size:small;line-height:17.29px;white-space:nowrap">University Information Security | Office of Information Technology | </span><a href="http://it.umn.edu/" style="color:rgb(17,85,204);font-family:'Helvetica Neue',Helvetica,sans-serif;font-size:small;line-height:17.29px;white-space:nowrap" target="_blank">it.umn.edu</a><br style="color:rgb(0,0,0);font-family:'Helvetica Neue',Helvetica,sans-serif;font-size:small;line-height:17.29px;white-space:nowrap"><span style="color:rgb(0,0,0);font-family:'Helvetica Neue',Helvetica,sans-serif;font-size:small;line-height:17.29px;white-space:nowrap">University of Minnesota | </span><a href="http://umn.edu/" style="color:rgb(17,85,204);font-family:'Helvetica Neue',Helvetica,sans-serif;font-size:small;line-height:17.29px;white-space:nowrap" target="_blank">umn.edu</a><br style="color:rgb(0,0,0);font-family:'Helvetica Neue',Helvetica,sans-serif;font-size:small;line-height:17.29px;white-space:nowrap"><a href="mailto:eurban@umn.edu" style="color:rgb(17,85,204);font-family:'Helvetica Neue',Helvetica,sans-serif;font-size:small;line-height:17.29px;white-space:nowrap" target="_blank">eurban@umn.edu</a><font face="verdana, sans-serif" style="color:rgb(136,136,136);font-size:12.8px"><br></font></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 30, 2019 at 4:00 PM Andreas Herz <<a href="mailto:andi@geekosphere.org">andi@geekosphere.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Eric,<br>
<br>
can you reproduce this if you run suricata with -r foo.pcap as well?<br>
Could you also share a pcap?<br>
Might help to debug/narrow the issue down.<br>
<br>
On 24/04/19 at 13:43, Eric Urban wrote:<br>
> I enabled flow and netflow in the eve log and am trying to log ESP traffic.<br>
> However, I am only seeing protocols TCP, UDP, ICMP, IPv6, IPv6-ICMP, and<br>
> SCTP.<br>
> <br>
> I ran a packet capture to confirm that there is ESP traffic hitting the<br>
> interface.  In addition to that, I enabled a rule to capture all ESP<br>
> traffic and this works as expected, meaning alerts are triggered for the<br>
> traffic I expect to see.  I searched the eve log for the IPs captured in<br>
> these alerts to see if perhaps the flow/netflow logging for ESP was falling<br>
> under a different protocol since the alerts for this traffic has<br>
> "proto":"IPv6-Crypt" (due to /etc/protocols have the value of 50 for both<br>
> esp and IPv6-crypt).<br>
> <br>
> Nothing in the code that I can find in output-json-flow.c or<br>
> output-json-netflow.c restricts the logging to only the protocols I<br>
> mentioned above so am wondering if anyone has any suggestions or has had<br>
> other protocols than the ones I listed above show up in flow/netflow events?<br>
> <br>
> <br>
> <br>
> -- <br>
> Eric Urban<br>
> University Information Security | Office of Information Technology |<br>
> <a href="http://it.umn.edu" rel="noreferrer" target="_blank">it.umn.edu</a><br>
> University of Minnesota | <a href="http://umn.edu" rel="noreferrer" target="_blank">umn.edu</a><br>
> <a href="mailto:eurban@umn.edu" target="_blank">eurban@umn.edu</a><br>
<br>
> _______________________________________________<br>
> Suricata IDS Users mailing list: <a href="mailto:oisf-users@openinfosecfoundation.org" target="_blank">oisf-users@openinfosecfoundation.org</a><br>
> Site: <a href="http://suricata-ids.org" rel="noreferrer" target="_blank">http://suricata-ids.org</a> | Support: <a href="http://suricata-ids.org/support/" rel="noreferrer" target="_blank">http://suricata-ids.org/support/</a><br>
> List: <a href="https://lists.openinfosecfoundation.org/mailman/listinfo/oisf-users" rel="noreferrer" target="_blank">https://lists.openinfosecfoundation.org/mailman/listinfo/oisf-users</a><br>
> <br>
> Conference: <a href="https://suricon.net" rel="noreferrer" target="_blank">https://suricon.net</a><br>
> Trainings: <a href="https://suricata-ids.org/training/" rel="noreferrer" target="_blank">https://suricata-ids.org/training/</a><br>
<br>
<br>
-- <br>
Andreas Herz<br>
_______________________________________________<br>
Suricata IDS Users mailing list: <a href="mailto:oisf-users@openinfosecfoundation.org" target="_blank">oisf-users@openinfosecfoundation.org</a><br>
Site: <a href="http://suricata-ids.org" rel="noreferrer" target="_blank">http://suricata-ids.org</a> | Support: <a href="http://suricata-ids.org/support/" rel="noreferrer" target="_blank">http://suricata-ids.org/support/</a><br>
List: <a href="https://lists.openinfosecfoundation.org/mailman/listinfo/oisf-users" rel="noreferrer" target="_blank">https://lists.openinfosecfoundation.org/mailman/listinfo/oisf-users</a><br>
<br>
Conference: <a href="https://suricon.net" rel="noreferrer" target="_blank">https://suricon.net</a><br>
Trainings: <a href="https://suricata-ids.org/training/" rel="noreferrer" target="_blank">https://suricata-ids.org/training/</a></blockquote></div>