Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parse NetBSD lastlogx record files #243

Open
jtmoon79 opened this issue Mar 15, 2024 · 0 comments
Open

parse NetBSD lastlogx record files #243

jtmoon79 opened this issue Mar 15, 2024 · 0 comments
Labels
enhancement New feature or request file parser P2 less important

Comments

@jtmoon79
Copy link
Owner

Parse NetBSD lastlogx record struct files.

Current behavior

/var/log/lastlogx files cannot be processed.

Suggested behavior

Parse lastlogx files.

Other

Attached are lastlogx files (zipped) scraped from NetBSD 9.3 systems.

This struct on x86_32 platform is 428 bytes and defined as:

lastlogx               sizeof 428
lastlogx.ll_tv    @  0 sizeof  12
lastlogx.ll_line  @ 12 sizeof  32
lastlogx.ll_host  @ 44 sizeof 256
lastlogx.ll_ss    @300 sizeof 128

This struct on x86_64 platform is 432 bytes and defined as:

lastlogx               sizeof 432
lastlogx.ll_tv    @  0 sizeof  16
lastlogx.ll_line  @ 16 sizeof  32
lastlogx.ll_host  @ 48 sizeof 256
lastlogx.ll_ss    @304 sizeof 128

However, the lastlogx files attached are 65536 bytes (not divisible by 428 or 432).

Looking at the code in lastlogin.c, the "read" call uses a function pointer so it's difficult to trace by reading published source code. But these files appear to be more complex that a flat record struct file like utmp.

@jtmoon79 jtmoon79 added enhancement New feature or request P2 less important labels Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request file parser P2 less important
Projects
None yet
Development

No branches or pull requests

1 participant