I can't get the deployment customization example on "SSH:Login" to work.
I have performed the following:
1. Checked my installation is working.
2. Checked my email (mailto) is working.
3. Checked my networks.cfg includes my test SSH server and excludes my client.
4. Checked for previous posts on the issue.
Here is the code that is to be written into local.bro (only change was
the IP Addresses):
<snip>
const watched_servers: set[addr] = {
192.168.1.100,
192.168.1.101,
192.168.1.102,
} &redef;
hook Notice::policy(n: Notice::Info)
{
if ( n$note == SSH::SUCCESSFUL_LOGIN && n$id$resp_h in watched_servers )
add n$actions[Notice::ACTION_EMAIL];
}
</snip>
That documentation is not correct anymore, sorry about that. Will see about getting it fixed, but I put an example at [1] that should work to accomplish the same thing. The “SSH:: heuristic_successful_login” event is somewhat delayed, so just be aware of that if you’re looking for immediate feedback to check whether it’s working. And another gotcha is that the event only triggers after a certain amount of data is transmitted so just logging in/out real quick may not be detected. (I’m realizing this example is no longer that straightforward and probably doesn’t belong in the quick-start guide anymore).
It looks like unless it's redefined, these should show up in notice.log...but I'm a noob, so someone smarter then me on this list should be able to verify that.
The “undetermined” is saying it doesn’t even have a guess as to whether the ssh log in failed or was successful so either type of analysis you’ve tried so far won’t notice anything interesting happening because they’re only concerned about ssh logins with a status of “success” or “failure". I suggest trying to read scripts/base/protocols/ssh/main.bro and understand the criteria it uses to flip the login status to either “failure” or “success”, then try to look at conn.log to see which criteria aren’t being met.
This is where I twist Vlad's arm hard to finish his work on his rewritten SSH analyzer so that we can get rid of my crummy success determiner for SSH connections. His new one appears to do a greatly improved job at determining success and failure for logins.