Skip to content

[Auditbeat] Cherry-pick #10865 to 6.7: Handle different bad login types#10908

Merged
cwurm merged 1 commit intoelastic:6.7from
cwurm:backport_10865_6.7
Feb 25, 2019
Merged

[Auditbeat] Cherry-pick #10865 to 6.7: Handle different bad login types#10908
cwurm merged 1 commit intoelastic:6.7from
cwurm:backport_10865_6.7

Conversation

@cwurm
Copy link
Copy Markdown
Contributor

@cwurm cwurm commented Feb 22, 2019

Cherry-pick of PR #10865 to 6.7 branch. Original message:

Depending on the distro and the type of login attempt (e.g. ssh, local login) the ut_type value in /var/log/btmp is different. So far, the login dataset only responded to the rarer login type 7 (USER_PROCESS). The more common one (seems to be exclusively used on Fedora 29, but also used on Ubuntu 18.04 for failed SSH login attempts) is 6 (LOGIN_PROCESS) that we are currently ignoring.

This changes the code to have a separate function to process UTMP records from btmp files that treats both USER_PROCESS and LOGIN_PROCESS the same.

It also adds a unit test for failed logins including a btmp test file from Ubuntu 18.04 with three bad login attempts.

Depending on the distro and the type of login attempt (e.g. ssh, local login) the `ut_type` value in `/var/log/btmp` is different. So far, the login dataset only responded to the rarer login type `7` (`USER_PROCESS`). The more common one (seems to be exclusively used on Fedora 29, but also used on Ubuntu 18.04 for failed SSH login attempts) is `6` (`LOGIN_PROCESS`) that we are currently ignoring.

This changes the code to have a separate function to process UTMP records from btmp files that treats both `USER_PROCESS` and `LOGIN_PROCESS` the same.

It also adds a unit test for failed logins including a btmp test file from Ubuntu 18.04 with three bad login attempts.

(cherry picked from commit 94666a8)
@cwurm cwurm changed the title Cherry-pick #10865 to 6.7: [Auditbeat] Handle different bad login types [Auditbeat] Cherry-pick #10865 to 6.7: Handle different bad login types Feb 22, 2019
@elasticmachine
Copy link
Copy Markdown
Contributor

Pinging @elastic/secops

@cwurm cwurm merged commit 4b21d37 into elastic:6.7 Feb 25, 2019
@cwurm cwurm deleted the backport_10865_6.7 branch February 25, 2019 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants