[Bro-Dev] [JIRA] (BIT-1521) known services should probably ignore gridftp-data
Justin Azoff (JIRA)
jira at bro-tracker.atlassian.net
Wed Feb 17 12:20:00 PST 2016
[ https://bro-tracker.atlassian.net/browse/BIT-1521?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=24202#comment-24202 ]
Justin Azoff commented on BIT-1521:
-----------------------------------
Ok, I implemented that. I'm working on generating some pcaps for these test cases. One thing I think i ran into is I think this check (that was in the older version too) is not quite right:
{code}
# Handle the connection ending in case no protocol was ever detected.
event connection_state_remove(c: connection) &priority=-5
{
if (c$resp$state == TCP_ESTABLISHED )
event known_services_done(c);
}
{code}
It seems (in my testing) that TCP_CLOSED occurs much more often. I think this check intends to filter connections that completed a handshake, but is not really doing so. I honestly have no idea why a connection would be TCP_ESTABLISHED inside connection_state_removed.
This is a similar issue as in BIT-1535.. how to determine if a connection succeeded.
Vlad also mentioned that starting a timer for each protocol confirmation might not be the best idea. We could rely 100% on connection_state_removed if we did not mind delaying a known_service log entry until the connection closed. I think if I can fix that if statement, the timers could be removed and the entire thing could be greatly simplified.
Vlad also brought up something I was thinking about as well that c$service should probably be an ordered vector.. since now that I fixed the multiple-service-logging issue you see things like
{code}
FTP,SSL,gridftp
gridftp,FTP,SSL
SSL,gridftp,FTP
or
SSL,SMTP
{code}
but i believe chronologically they should all be
{code}
FTP,SSL,gridftp
SMTP,SSL
{code}
> known services should probably ignore gridftp-data
> --------------------------------------------------
>
> Key: BIT-1521
> URL: https://bro-tracker.atlassian.net/browse/BIT-1521
> Project: Bro Issue Tracker
> Issue Type: Improvement
> Components: Bro
> Affects Versions: 2.4
> Reporter: Justin Azoff
> Assignee: Justin Azoff
> Priority: Low
> Fix For: 2.5
>
>
> known services script does
> {code}
> if ( ! addr_matches_host(id$resp_h, service_tracking) ||
> "ftp-data" in c$service || # don't include ftp data sessions
> ("DNS" in c$service && c$resp$size == 0) ) # for dns, require that the server talks.
> return;
> {code}
> but should probably also ignore gridftp-data. Probably a good idea to add a set of services that behave like ftp for it to check.
--
This message was sent by Atlassian JIRA
(v7.2.0-OD-01-031#72000)
More information about the bro-dev
mailing list