Skip to content

restore atime/mtime after writing to file #99

Description

@nil0x42

ti handle this, we could keep a gloal array of stat(2) structs as long as a file is opened,
then restore file atime/mtime on each write(2) or close(2) (write seems better).

of course, this feature must be enabled only for attacker (IS_ATTACKER)

NOTE: we must take into account the fact that the file could be opened concurently by some processes, loosing stat() information. For example, process P1 opens file F for write, then P2 opens F the same way. If P2 writes or closes the file BEFORE P1, it could be a problem that MUST be handled properly.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions