3.3 kacs.audit.handle.used

  • Event type: kacs.audit.handle.used
  • Defined in: kacs.evman
  • Tier: essential
  • Gating: the operation's required access overlaps the alarm mask cached on the handle
  • Cardinality: once per operation on the handle

The record of what was done with a handle after it was opened. Where kacs.audit.access.checked records the decision to open something, this records each subsequent use of it.

The mask is configured by SYSTEM_ALARM* ACEs at the access check that opened the handle, and the record is produced afterwards by whatever enforcement point handles the operation. FACS, for file handles, is the only such point today.

The subject is re-read on every operation. A handle outlives the token that opened it, so a process that starts or stops impersonating keeps its handles and every later operation is recorded under the token current at that moment. An investigation assuming the open-time identity will attribute later operations to the wrong principal.

Three masks appear together and are easy to confuse. Read as a sentence: the operation needed access.requested, of which access.matched triggered the audit, against a handle opened with access.granted, and it succeeded or did not.

3.3.1 Fields #

FieldTypePresenceMeaning
subject.token.sidbin.sidvia subjectThe user SID of the effective token the operation ran under.
subject.token.groupsbin.sid[]via subjectThe group SIDs carried by the effective token.
subject.token.group-attributesuint.flags[]via subjectPer-group attribute bitmasks, positionally parallel to subject.token.groups.
subject.token.integrityuint.integrityvia subjectThe integrity RID of the effective token.
subject.token.iduint.luidvia subjectThe token's own LUID, identifying this specific token rather than the logon session it belongs to.
subject.token.auth-iduint.luidvia subjectThe LUID of the logon session the effective token belongs to.
subject.token.typestr.enumvia subjectWhether the effective token is a primary token or an impersonation token.
subject.token.impersonationuint.enumvia subjectThe impersonation level of the effective token.
subject.token.uiduintvia subjectThe Linux UID this token projects onto, for correlating a Peios event with Linux-side audit data.
emitter.process.piduintvia subjectThe process ID the record was written from.
emitter.process.namestrvia subjectThe kernel's name for the emitting process, typically the executable's basename.
emitter.process.executablestr.pathvia subjectThe path the emitting process was executed from, resolved at exec with symbolic links already followed.
subject.pip.typeuint.enumvia subjectThe Protected Isolated Process type in force for the access check.
subject.pip.trustuintvia subjectThe PIP trust level in force for the access check.
object.kindstr.enumrequiredAlways file today, because FACS is the only enforcement point.
object.file.pathstr.pathrequiredThe absolute path of the file the operation acted on, resolved at the enforcement point.
operation.namestr.enumrequiredWhich operation was attempted.

Values here (open set): file.access · file.mmap · file.mprotect · file.permission · file.write · file.ioctl · file.lock · file.fcntl · file.truncate · file.fallocate.
access.requesteduint.maskrequiredWhat this operation needs — a read needs FILE_READ_DATA, an mmap with PROT_EXEC needs FILE_EXECUTE.
access.matcheduint.maskrequiredThe subset of the requested access that overlapped an audit mask and therefore caused the record to exist.
access.granteduint.maskrequiredWhat the handle was opened with, not what this operation was granted. An operation can only succeed if access.requested is a subset of it.
access.audit-maskuint.maskrequiredThe full continuous-audit mask cached on a handle, of which access.matched is the part this operation touched.
outcome.successboolrequiredWhether the operation itself was allowed.
outcome.reasonstr.enumwhen outcome.success == falseFrom KACS_FSR_*, excluding DECISION (which names the ordinary path rather than a reason) and AUDIT_EMIT_FAIL (which cannot appear, being the failure of this record's own emission).

Values here (open set): signed-exec · grant-deny · append-deny · unmanaged-sysfs.

Every record also carries the header fields of the envelope, which no payload repeats.

Generated from kacs.evman by pkm/tools/gen-events-book.py. Edit the fragment, not this page.

Edit this page