• Blog
  • Resources
  • Training & Events
  • Menu

mac4n6.com

  • Blog
  • Resources
  • Training & Events

Analysis of Apple Unified Logs: Quarantine Edition [Entry 5] – Login Inception!? Yes! – Local Logins!

April 28, 2020 in logs, macos, analysis

Local logins are created when an already logged in user opens a Terminal window. Each terminal window is a separate ‘login’ process. If you have six Terminal windows (or tabs) open, you have six ‘login’ processes.

In the last article, I showed how you can find these processes using other log types. Let’s see what local logins look like in unified logs. Trying to create a query from these, I ran into an issue trying to filter for the ‘login’ process which makes a great learning example.

If I try to use ‘processImagePath’ I get lots of unnecessary entries from ‘loginwindow’ or any other process that might have ‘login’ in the name. This is because the process that we see in the default ‘log’ output is actually part of a path as the field ‘processImagePath’ suggests.

log show --predicate 'processImagePath contains "login"'

We can use a different output style to see these paths. I used JSON for the output in the screenshot below. 

log show --predicate 'process contains "login"' --style json

To filter specifically for the ‘login’ process, I will use ‘process’ instead of ‘processImagePath’ which will just filter on the process name. As an example, I changed ‘contains’ to ‘=’ in the first command line to show it is looking for just the term ‘login’. This shows no results due to using ‘processImagePath’ instead of ‘process’.

log show --predicate 'process = "login"'

Getting back to those ‘login’ processes, I created the query below. While not perfect it does show some interesting items. 

log show --info --predicate '(processImagePath contains "opendirectory" and eventMessage contains "Client:") or process = "login"'

In this test, I just opened a new tab in Terminal and performed a few commands.

The query output shows the ‘login’ process as well as a few ‘open directory’ entries. Not all of these are related to this Terminal action, but these can be visually filtered out by using process IDs (40881, 40882). While this does show a new Terminal window opening via the ‘login’ process we also see the exiting action for ‘zsh’ and ‘login’. 

Unfortunately, I have found that these particular ‘opendirectoryd’ processes will expire in a very short time period (~90 minutes) therefore I might revert back to other logs to extract this information as show in this syslog output.

Can you really have ‘login’ inception? Yes! (I’m using the ‘login’ command here to login to various user accounts in the same shell. 🤪)


Tags: unified logs, login, analysis
Prev / Next

mac4n6.com

A macOS and iOS Forensic Research Blog


mac4n6 Blog RSS

Latest Posts

Blog
New Presentation - Using Apple Intelligence (AI) Data in Investigations
New Presentation - Using Apple Intelligence (AI) Data in Investigations
about 2 months ago
Sikkerhetsfestivalen 2024 - Lillehammer, Norway
about 8 months ago
I'm Back Baby!
I'm Back Baby!
about a year ago
Part 3: Step-by-step Tooling for iOS Research (via @bizzybarney)
Part 3: Step-by-step Tooling for iOS Research (via @bizzybarney)
about 4 years ago
APOLLO v1.4 - Now with 'Gather' Function from iOS/macOS and updates to iOS14 and macOS 11 modules
APOLLO v1.4 - Now with 'Gather' Function from iOS/macOS and updates to iOS14 and macOS 11 modules
about 4 years ago
Analysis of Apple Unified Logs [Entry 12] – Quick & Easy Unified Log Collection from iOS Devices for Testing
Analysis of Apple Unified Logs [Entry 12] – Quick & Easy Unified Log Collection from iOS Devices for Testing
about 4 years ago
Part 2: Step-by-step iPhone Setup for iOS Research (via @bizzybarney)
Part 2: Step-by-step iPhone Setup for iOS Research (via @bizzybarney)
about 4 years ago
Part 1: Step-by-step macOS Setup for iOS Research (via @bizzybarney)
Part 1: Step-by-step macOS Setup for iOS Research (via @bizzybarney)
about 4 years ago
Follow-on to DFIR Summit Talk: Lucky (iOS) 13: Time To Press Your Bets (via @bizzybarney)
Follow-on to DFIR Summit Talk: Lucky (iOS) 13: Time To Press Your Bets (via @bizzybarney)
about 4 years ago
Socially Distant but Still Interacting! New and Improved Updates to macOS/iOS CoreDuet interactionC.db APOLLO Modules
Socially Distant but Still Interacting! New and Improved Updates to macOS/iOS CoreDuet interactionC.db APOLLO Modules
about 4 years ago

Tweets

  • RT @objective_see: Objective by the Sea (#OBTS) v6.0 will be held Oct 9ᵗʰ - 13ᵗʰ 2023🍎🧑🏻‍🏫🧑🏻‍💻🌴☀️ More details (location, CFP, etc.)… https://t.co/OJ7MaNrDPH
    Feb 18, 2023, 4:28 PM
  • RT @Fox0x01: Exciting news! My book is finally 100% finished and in production. The release date is scheduled for May 2023! 🥳 I… https://t.co/9j5owgrmlJ
    Jan 19, 2023, 5:41 PM
  • RT @NibblsNBits: Sharing for visibility. Did you know about the free virtual seats being offered by @hexordia? Intro and refresher m… https://t.co/ZWYzfo0QJD
    Jan 13, 2023, 5:47 PM