Post

Replies

Boosts

Views

Activity

Reply to EndpointSecurity ES_EVENT_TYPE_AUTH_IOKIT_OPEN and IO device data
kappe_m, I had the same question back in the summer and got this work-around from an Apple rep: There is a workaround before the fix is implemented: To implement device access control for mass-storage devices based on e.g. USB serial numbers, ES clients can, before responding to mount events, query the IOKit registry for the service object corresponding to the disk device that is about to be mounted (IOBSDNameMatching). From there they can walk the registry tree to find the responsible USB device and query its properties (IORegistryEntryGetParentEntry, IORegistryEntryCreateCFProperties, IORegistryEntryGetChildIterator etc). Based on that information, they can make a policy decision and allow or deny the ES mount event. This is for USB mass storage events, not any USB device connection. Using the suggestions offered, I was able to get some proof-of-concept code working. Hope this helps.
Jan ’21
Reply to Endpoint security es_copy_message deprecated
From the header file /**Retains an esmessaget, returning a non-const pointer to the given esmessaget for compatibility with * existing code.* @warning It is invalid to attempt to write to the returned esmessaget, despite being non-const, and * doing so will result in a crash.* @deprecated Use esretainmessage to retain a message. *@param msg The message to be retained * @return non-const pointer to the retained esmessaget.* @brief The caller must release the memory with es_free_message/OSEXPORT APIDEPRECATED("Use esretainmessage to retain a message.", macos(10.15, 11.0)) APIUNAVAILABLE(ios, tvos, watchos) esmessaget * Nullable escopymessage(const esmessaget * _Nonnull msg);
Oct ’20
Reply to NSEndpointSecurityEarlyBoot, When Does It Load Extensions
It's the way that the process are launched that is confusing. Here is the explanation from Apple PIDs are assigned at fork time, not exec time. When the ES kext knows there are early boot clients, it holds up the kernel thread performing the execve. So all binaries that would get exec'd (e.g. via Loginwindow, launchd loads, etc.), will all get a new pid - they just won't have code execute if they're non-platform binaries until the ES client connects and makes its first set of subscriptions (and, if they subscribed to AUTH EXEC, the client has the opportunity to DENY the exec from continuing). None of this has anything to do with lower numbered PIDs. I did prove that this was the case by looking at log lines from my extension and my launchd process. The extension logged first, even though its PID was larger.
Sep ’20
Reply to Startup order of daemon and Endpoint Security Client
Sorry for the late reply, been super busy. Yes, I was seeing the same thing, launchd agent failing to connect at startup, until I did the early boot. Then I saw PIDs that didn't make sense, but looking at timestamps of messages I added, I saw that the system extension loaded and ran before the launchd process. This was the comment I got back from Apple when I asked back in April: PIDs are assigned at fork time, not exec time. When the ES kext knows there are early boot clients, it holds up the kernel thread performing the execve. So all binaries that would get exec'd (e.g. via Loginwindow, launchd loads, etc.), will all get a new pid - they just won't have code execute if they're non-platform binaries until the ES client connects and makes its first set of subscriptions (and, if they subscribed to AUTH EXEC, the client has the opportunity to DENY the exec from continuing). None of this has anything to do with lower numbered PIDs.
Sep ’20
Reply to Removed Kexts Still Loading in Big Sur 20A5343i
This is from the release notes (not sure which release) and I don't know if it's still true: Moving a kernel extension bundle out of /Library/Extensions might not completely uninstall it. (64331929 Workaround: Remove the extension from /Library/Extensions. Boot to macOS Recovery. Run Terminal. Enter the command kmutil invoke-panic-medic. Restart your Mac. Follow the prompt to open System Preferences and navigate to Security & Privacy. Follow the prompt to restart.
Aug ’20
Reply to Deactivating a Network Extension
I don't know if this is the same situation I had early on, but when I was in the compile/link/install/run/uninstall/repeat loop, if I didn't reboot after the uninstall, that removal would queue up. After half a dozen or so loops, I'd have a list of extensions ready to uninstall on reboot. I'd reboot and one would be gone, reboot again and another would be gone. I'd have to keep rebooting to get rid of them one by one. Like I said, this was a while ago and I've gotten into a habit of either restarting the VM or restoring the snapshot. Not sure if this is what you're seeing or not.
Aug ’20
Reply to Endpoint Security AUTH event for file deletion?
I think that is a ES_EVENT_TYPE_AUTH_RENAME event. I don't have anything setup right now to verify this, but if you think about how you'd do it from a command line, you'd use a mv command to either rename the file or move it to another location, i.e., the trashE.g., my code has this in the rename event handler if (msg->event.rename.destination_type == ES_DESTINATION_TYPE_NEW_PATH)We're checking to see if there's a new path. Just look to see if someone is moving the file you care about somewhere else.
Jun ’20
Reply to Zombie System Extensions
I don't know if that's the only answer, but it's what I've found by reading the forums and experimentation. If you, or anyone, finds some definitive documention, please post a link here. I'd love to read it and let our support team know when we release our product into the wild.
May ’20