Skip to content

Use bodyfile info to reduce file system traversals #416

@halpomeranz

Description

@halpomeranz

When UAC hits systems with large disks it can take a significant time to run. Part of the speed issue is that the program traverses most or all of the file system multiple times. We could reduce the number of file system traversals by creating a bodyfile and then deriving many of the other outputs from that information.

For example, all of the following artifacts could be derived from the body file, thereby eliminating multiple extra file system traversals:

live_response/system/socket_files.yaml
system/group_name_unknown_files.yaml
system/hidden_directories.yaml
system/hidden_files.yaml
system/sgid.yaml
system/suid.yaml
system/user_name_unknown_files.yaml         
system/world_writable_directories.yaml      
system/world_writable_files.yaml

There are probably other instances as well.

I could think of multiple possible solutions:

  • Create a post-processing script separate from UAC to produce the artifacts from the bodyfile, and exclude the artifacts from the UAC profile.
  • Create UAC artifacts that parse the bodyfile rather than traversing the file system.
  • Modify the "find" collector to intelligently decide whether the search criteria exist in the body file, and if so get the info from there rather than a file system traversal.

Just another one of my random ideas. Feel free to ignore me. But lately I've been dealing with machines with large file systems.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions