KasperskyLab / TinyCheck

TinyCheck allows you to easily capture network communications from a smartphone or any device which can be associated to a Wi-Fi access point in order to quickly analyze them. This can be used to check if any suspect or malicious communication is outgoing from a smartphone, by using heuristics or specific Indicators of Compromise (IoCs). In order to make it working, you need a computer with a Debian-like operating system and two Wi-Fi interfaces. The best choice is to use a Raspberry Pi (2+) a Wi-Fi dongle and a small touch screen. This tiny configuration (for less than $50) allows you to tap any Wi-Fi device, anywhere.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Do you have a plan for time-variant events?

bl4ckh0l3z opened this issue · comments

Going straight to the point: is there any chance to raise alerts by feeding on snort rules like this?

alert TCP $EXTERNAL_NET any -> $HOME_NET any (msg:"This is just an example of time-variant rule"; flags:S; threshold: type threshold, track by_dst, count 1000 ,
seconds 60; sid: 5000002;)

Count is accrued over a specific period of time, but at the moment time-variant analysis is totally ignored by tinycheck...and, as far as I know, snort rules are evaluated in a shoot via suricata...isn’t true?

Thanks.

Hello bl4ckh0l3z,

Yeah, strange that it is completely ignored. I'm gonna work on that to see what's wrong because can be usefull to detect some tunnels to legit services (telegram, dropbox etc etc.) and yes, the rules are evaluated via by using suricata!

Unfortunately, it's the expected behaviour when suricata/snort are used to analyze a pcap file capture ex-post.

A workaround could be tcpreplay capture.pcap on the loopback, by taking into account the appropriate pps rate, and start snort/suricata listening on the loopback interface.

Event occurrences will be accrued correctly and alert will be triggered accordingly.

This approach is neither elegant, nor expensive to implement...most of the effort is duplicate suricataengine.py to snortengine.py and install snort too.

Btw, I'm pretty sure you will spot a more appropriate solution...

Ps. Extra-bonus: if you try to import a snort rule like

[...] pcre: "/^\x17\x03.../" [...]

every occurrence of "\x" will be changed to "/x" from the BE and this error propagates to the SQLite-db...resulting in no match for the rule. Cheers