Reader small image

You're reading from  Cybersecurity Attacks ‚Äì Red Team Strategies

Product typeBook
Published inMar 2020
PublisherPackt
ISBN-139781838828868
Edition1st Edition
Tools
Right arrow
Author (1)
Johann Rehberger
Johann Rehberger
author image
Johann Rehberger

Johann Rehberger has over fifteen years of experience in threat analysis, threat modeling, risk management, penetration testing, and red teaming. As part of his many years at Microsoft, Johann established a penetration test team in Azure Data and led the program as Principal Security Engineering Manager. Recently, he built out a red team at Uber and currently works as an independent security and software engineer. Johann is well versed in analysis, design, implementation, and testing of software systems. Additionally, he enjoys providing training and was an instructor for ethical hacking at the University of Washington. Johann contributed to the MITRE ATT&CK framework and holds a master's in computer security from the University of Liverpool.
Read more about Johann Rehberger

Right arrow

Alerting for suspicious file access on macOS

On macOS, there are a couple of ways to monitor file access. There is OpenBSM. The Basic Security Module (BSM) was originally created by Sun Microsystems and can be used for auditing. There are also tracing utilities such as fs_usage. In this section, we will explore multiple ways to monitor access to decoy files.

To get started, go ahead and create two decoy files with interesting names that might trick an adversary who is poking around your machines:

$ echo "S3cr3tP@$$W0Rd!" > /Users/john/password.txt
$ echo "S3cr3tP@$$W0Rd!" > /tmp/password.txt

The preceding commands will create two decoy files. We will set up monitoring for read access to these files later and trigger notifications when the file is being accessed. Now, let's explore how we can monitor access to these files. To get started, let's explore the fs_usage tool.

Leveraging fs_usage for quick and simple file access monitoring...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Cybersecurity Attacks – Red Team Strategies
Published in: Mar 2020Publisher: PacktISBN-13: 9781838828868

Author (1)

author image
Johann Rehberger

Johann Rehberger has over fifteen years of experience in threat analysis, threat modeling, risk management, penetration testing, and red teaming. As part of his many years at Microsoft, Johann established a penetration test team in Azure Data and led the program as Principal Security Engineering Manager. Recently, he built out a red team at Uber and currently works as an independent security and software engineer. Johann is well versed in analysis, design, implementation, and testing of software systems. Additionally, he enjoys providing training and was an instructor for ethical hacking at the University of Washington. Johann contributed to the MITRE ATT&CK framework and holds a master's in computer security from the University of Liverpool.
Read more about Johann Rehberger