BSM Audit Records
"Small, Jim" <[email protected]>
| Newsgroups | gmane.comp.security.sun |
|---|---|
| Message-ID | <8AA870658244D4119AF600508BDF0A3616DC8A2D@usahm014.exmi01.exch.eds.com> |
I'm in the process of writing a script to parse the records generated by BSM/auditd. Currently I'm working on parsing the login/logout records. Here is an example of a typical record (raw form) for login/logout events (lo flag): header,81,2,login - telnet,,Mon 19 May 2003 03:18:26 PM EDT, + 56 msec subject,root,root,other,root,other,1381,1381,165 196631 host1.sub1.dom1.com text,successful login return,success,0 I want to parse all this into readable form in both a long and short form. I looked through audit.log(4) to try and make sense out of all the fields. Here's my first stab: Parsed Long form: Type: login - telnet (header, 81, 2, ) on Mon 19 May 2003 03:18:26 PM EDT ( + 56 msec) Audit ID: root (subject), Effective User/Group: root/other, Real User/Group: root/other Process ID/Session ID: 1381/1381, Terminal ID (Port ID, Machine Address): 165 196631 host1.sub1.dom1.com Description: successful login (text) Event Status: success (return), Return Value: 0 Parsed Short form: +login - telnet for root from 165 196631 w1ei001a.miabh.us.eds.com on Mon 19 May 2003 03:18:26 PM EDT Even after looking through audit.log(4) though, I still have some questions. First: In the record, in the subject token, under Terminal ID, there is a port ID and a machine address: subject,root,root,other,root,other,1381,1381,***-->>>165 196631 host1.sub1.dom1.com<<<--*** The machine address is obvious. However, what exactly do the two numbers before the address mean? The first number can be more than 256 so it's more than one byte, and the second number can be more than 65,535 so it's more than two bytes. How do you parse these two numbers to get a port ID? Also, in a record, in the header token, what does the 81 and 2 mean? I believe according to the man page they are the event type and the event modifier, but what exactly does this mean? Is there anywhere I can get more detail on the format of the audit records? Also, if anyone has suggestions on my long and short formats, please let me know! Thanks, <> Jim