[Snort-openappid] WhatsApp and OpenAppId

Shayne Civitarese shayne.civitarese at wedgenetworks.com
Tue Nov 14 13:45:20 EST 2017


WhatsApp detection is working for me with the existing rule, but will stop working after snort has been running for a few hours. Restarting snort will allow WhatsApp to be detected again.My process for triggering WhatsApp using my android phone is too do a "Force Stop" and "Clear Cache" for the WhatsApp App in Settings->Apps. This will cause WhatsApp to resend the certificate which contains the Server Name Indication extension of mmg*.whatsapp.net.

When WhatsApp is failing to detect it is in service_ssl.c at line 751, the following if statement which is in the SSL_SATE_HEADER fall through.
if (size < sizeof(ServiceSSLV3Hdr) ||
                        hdr3->type != SSL_HANDSHAKE ||
                        (ver != 0x0300 &&
                         ver != 0x0301 &&
                         ver != 0x0302 &&
                         ver != 0x0303))

At this point ServiceSSLData->host_name is through the ServiceSSLV3ExtensionServerName in line 422 of service_ssl.c, but this gets nulled out during the goto fail.

Here are the settings for my configuration that I feel are relevant.
preprocessor frag3_global: max_frags 65536
preprocessor frag3_engine: policy windows detect_anomalies overlap_limit 10 min_fragment_length 100 timeout 180

# Target-Based stateful inspection/stream reassembly.  For more inforation, see README.stream5
preprocessor stream5_global: track_tcp yes, \
   track_udp yes, \
   track_icmp no, \
   max_tcp 262144, \
   max_udp 131072, \
   max_active_responses 2, \
   min_response_seconds 5
preprocessor stream5_tcp: policy windows, detect_anomalies, require_3whs 180, \
   overlap_limit 10, small_segments 3 bytes 150, timeout 180, \
    ports client 21 22 23 25 42 53 70 79 109 110 111 113 119 135 136 137 139 143 \
        161 445 513 514 587 593 691 1433 1521 1741 2100 3306 6070 6665 6666 6667 6668 6669 \
        7000 8181 32770 32771 32772 32773 32774 32775 32776 32777 32778 32779, \
    ports both 80 81 82 83 84 85 86 87 88 89 90 110 311 383 443 465 563 591 593 631 636 901 989 992 993 994 995 1220 1414 1741 1830 2301 2381 2809 3037 3057 3128 3443 3702 4343 4848 5250 6080 6988 7907 7000 7001 7144 7145 7510 7802 7777 7779 \
        7801 7900 7901 7902 7903 7904 7905 7906 7908 7909 7910 7911 7912 7913 7914 7915 7916 \
        7917 7918 7919 7920 8000 8008 8014 8028 8080 8085 8088 8090 8118 8123 8180 8181 8222 8243 8280 8300 8500 8800 8888 8899 9000 9060 9080 9090 9091 9443 9999 10000 11371 34443 34444 41080 50000 50002 55555
preprocessor stream5_udp: timeout 180

preprocessor appid: \
   app_detector_dir /var/snort/config, \
   app_stats_filename appStats.log, \
   app_stats_period 120

I suspect there is a configuration that I do not have properly tuned that would account for the detection degradation I am experiencing.  I appreciate any help.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.snort.org/pipermail/snort-openappid/attachments/20171114/03ce68d7/attachment.html>


More information about the Snort-openappid mailing list