Hide a fileDefense EvasionmacOSAdd the hidden flag to a file or directory to prevent it from being visible in Finder and Terminal.chflags hidden ~/evilcopyEvidenceUpstream referenceEnvironmentLocal hostCompatibilityImported from LOOBins; availability and behaviour depend on macOS version, privacy permissions and installed components. Not lab tested here.NativeDefense EvasionDetectionSigma: Hidden Flag Set On File/Directory Via Chflags: github.com/SigmaHQ/sigma/blob/master/rules/macos/process_creation/proc_creation_macos_chflags_hidden_flag.ymlRefsgithub.com/infosecB/LOOBins/blob/399e3c4bdddb55c7dc49beb20bfe43490eac1184/LOOBins/chflags.ymlss64.com/mac/chflags.htmlmacosbin.com/bin/chflagseclecticlight.co/2024/07/03/how-to-hide-files-and-folders/
Remove hidden flagDefense EvasionmacOSRemove the hidden flag to a file or directory to make it visible in Finder and Terminal.chflags nohidden ~/evilcopyEvidenceUpstream referenceEnvironmentLocal hostCompatibilityImported from LOOBins; availability and behaviour depend on macOS version, privacy permissions and installed components. Not lab tested here.NativeDefense EvasionDetectionSigma: Hidden Flag Set On File/Directory Via Chflags: github.com/SigmaHQ/sigma/blob/master/rules/macos/process_creation/proc_creation_macos_chflags_hidden_flag.ymlRefsgithub.com/infosecB/LOOBins/blob/399e3c4bdddb55c7dc49beb20bfe43490eac1184/LOOBins/chflags.ymlss64.com/mac/chflags.htmlmacosbin.com/bin/chflagseclecticlight.co/2024/07/03/how-to-hide-files-and-folders/