Hello,
I am working on app which must prevent attaching any USB devices to Mac due to security.
Unfortunately I have not found any direct way to implement such blocking:
Looks like IOKit does not allow to block USB (at least in user space)
ES_EVENT_TYPE_AUTH_IOKIT_OPEN (Endpoint Security) does not prevent using USB device if I send response ES_AUTH_RESULT_DENY for "AppleUSBHostDeviceUserClient"
I have found several similar problems on forum but no any solution:
https://developer.apple.com/forums/thread/671193
(https://developer.apple.com/forums/thread/756573
https://developer.apple.com/forums/thread/741051
What is the easiest way to implement such blocking?
Thank you in advance!
                    
                  
                Endpoint Security
RSS for tagDevelop system extensions that enhance user security using Endpoint Security.
Posts under Endpoint Security tag
            
              
                56 Posts
              
            
            
              
                
              
            
          
          
  
    
    Selecting any option will automatically load the page
  
  
  
  
    
  
  
              Post
Replies
Boosts
Views
Activity
                    
                      I download  SampleEndpointApp, and config  signing&capabilities->team as my developer Id. Xcode created a profile of bundle identifier automatically. However the project build still failed for sign.
What's the reason for that? How can I resolve it?
                    
                  
                
                    
                      I'm working on a system extension leveraging endpoint security entitlement. However, while in development, is there a way to continue working and testing locally without having the endpoint security entitlement approved or needing the extension signed.
I got these errors running a build:
Provisioning profile "Mac Team Provisioning Profile: "com.xxxxx.extension" doesn't include the com.apple.developer.endpoint-security.client entitlement.
                    
                  
                
                    
                      Will the ES_EVENT_TYPE_NOTIFY_OPEN event be called back when the user has already returned es_respond_flags_result(client, msg, 0, false) in ES_EVENT_TYPE_AUTH_OPEN?
I believe the ES_EVENT_TYPE_NOTIFY_OPEN event should not be triggered if the user has already denied the open operation in the ES_EVENT_TYPE_AUTH_OPEN response handler. However, during my testing, ES_EVENT_TYPE_NOTIFY_OPEN was still being called even after I blocked the open process. Is this behavior correct?
                    
                  
                
                    
                      We have a launch daemon which can check for team identifier and some other signing information of any application on machine and match it with provided information to confirm the validity of the application/binary. We use SecStaticCodeCreateWithPath to read the signing information of the app/binary which works in most cases.
However, for some third party daemon processes, the static code creation fails with error "Operation not permitted". We are having difficult time identifying why static code creation would fail specially when our process is running with root privileges.
Can you please help us understand in what scenario can this API fail with this error? Can there be any process or rule which can deny creating static code of a process like endpoint security extensions/daemon?
We are using default flags in SecStaticCodeCreateWithPath.
                    
                  
                
                    
                      I wrote a simple program to hide the build-in camera by entitlement restriction as DTS suggested in the post: https://developer.apple.com/forums//thread/784511?answerId=839753022#839753022
But the program failed as the error message: Fail to open service: 0xe00002e6: Caller is not entitled to connect to EndpointSecurity.
How can I apply for the entitlement to run the program? Is there any other solution to resolve hide build-in camera?
                    
                  
                
                    
                      I have written the Transparent App Proxy and can capture the network flow and send it to my local server. I want to avoid any processing on the traffic outgoing from my server and establish a connection with a remote server, but instead of connecting to the remote server, it again gets captured and sent back to my local server.
I am not getting any clue on how to ignore these flows originating from my server.
Any pointers, API, or mechanisms that will help me?
                    
                  
                
              
                
              
              
                
                Topic:
                  
	
		App & System Services
  	
                
                
                SubTopic:
                  
                    
	
		Networking
		
  	
                  
                
              
              
                Tags:
              
              
  
  
    
      
      
      
        
          
            Network Extension
          
        
        
      
      
    
      
      
      
        
          
            System Extensions
          
        
        
      
      
    
      
      
      
        
          
            Endpoint Security
          
        
        
      
      
    
  
  
              
                
                
              
            
          
                    
                      I am encountering an issue with my application, BloxOneEndpoint.pkg, which includes two services:
rc_service_infoblox – Runs as the root user.
Controller Application – Runs as a normal user.
Although a thread within rc_service_infoblox is running fine and performing its expected tasks, I notice that the service appears as "Not Responding" in Activity Monitor. Despite normal functionality, this status is concerning, as it may indicate some issue to customer.
I would appreciate any insights into why this might be happening and how to resolve it. Is there a specific API or mechanism I should use to ensure the service remains in a "Running" state in Activity Monitor?
Thank you for your guidance.
                    
                  
                
              
                
              
              
                
                Topic:
                  
	
		App & System Services
  	
                
                
                SubTopic:
                  
                    
	
		Processes & Concurrency
		
  	
                  
                
              
              
                Tags:
              
              
  
  
    
      
      
      
        
          
            Endpoint Security
          
        
        
      
      
    
      
      
      
        
          
            Service Management
          
        
        
      
      
    
  
  
              
                
                
              
            
          
                    
                      Hello!
I'm writing a System Extension that is an Endpoint Security client. And I want to Deny/Allow executing some XPC Service processes (using the ES_EVENT_TYPE_AUTH_EXEC event) depending on characteristics of a process that starts the XPC Service.
For this purpose, I need an API that could allow me to obtain an execution context of the XPC Service process. I can obtain this information using the "sudo launchctl procinfo <pid>" command (e.g. I can use the "domain = pid/3428" part of the output for this purpose). Also, I know that when the xpcproxy process is started, it gets as the arguments a service name and a pid of the process that requests the service so I can grasp the execution context from xpcproxy launching. But are these ways to obtain this info legitimate?
                    
                  
                
                    
                      This is my .entitlements file:
Code signing:
codesign --sign -vvv --timestamp --options=runtime --force --entitlements ./UES.entitlements  -s "Developer ID Application: XXX. (XXXXXXX)" ./UES.app
I work fine in the macOS 13.x system, but the "killed" error occurs in macOS11.x. The system log is displayed as follows:
(If codesign remove the --entitlements ./UES.entitlements, it will operate normally)
2025-04-21 13:58:27.039638+0800 0xd5941    Default     0x0                  149    0    amfid: /Applications/UES.app/Contents/MacOS/UES signature not valid: -67050
2025-04-21 13:58:27.039762+0800 0xd5bbf    Default     0x0                  0      0    kernel: mac_vnode_check_signature: /Applications/UES.app/Contents/MacOS/UES: code signature validation failed fatally: When validating /Applications/UES.app/Contents/MacOS/UES:
2025-04-21 13:58:27.039815+0800 0xd5bbf    Default     0x0                  0      0    kernel: proc 29354: load code signature error 4 for file "UES"
2025-04-21 13:58:27.040720+0800 0xd5bc0    Default     0x0                  0      0    kernel: (AppleSystemPolicy) ASP: Security policy would not allow process: 29354, /Applications/UES.app/Contents/MacOS/UES
2025-04-21 13:58:27.045974+0800 0xd58be    Error       0x0                  66405  0    CoreServicesUIAgent: [com.apple.launchservices:uiagent] handle LS launch error: {\n    Action = oapp;\n    AppMimimumSystemVersion = "10.13";\n    AppPath = "/Applications/UES.app";\n    ErrorCode = "-10826";\n}
2025-04-21 13:58:39.121619+0800 0xd5941    Default     0x0                  149    0    amfid: /Applications/UES.app/Contents/MacOS/UES signature not valid: -67050
2025-04-21 13:58:39.121832+0800 0xd5e0f    Default     0x0                  0      0    kernel: mac_vnode_check_signature: /Applications/UES.app/Contents/MacOS/UES: code signature validation failed fatally: When validating /Applications/UES.app/Contents/MacOS/UES:
2025-04-21 13:58:39.121861+0800 0xd5e0f    Default     0x0                  0      0    kernel: proc 29415: load code signature error 4 for file "UES"
2025-04-21 13:58:39.122571+0800 0xd5e10    Default     0x0                  0      0    kernel: (AppleSystemPolicy) ASP: Security policy would not allow process: 29415, /Applications/UES.app/Contents/MacOS/UES
2025-04-21 13:58:46.297915+0800 0xd5941    Default     0x0                  149    0    amfid: /Applications/UES.app/Contents/MacOS/UES signature not valid: -67050
2025-04-21 13:58:46.298031+0800 0xd5f85    Default     0x0                  0      0    kernel: mac_vnode_check_signature: /Applications/UES.app/Contents/MacOS/UES: code signature validation failed fatally: When validating /Applications/UES.app/Contents/MacOS/UES:
2025-04-21 13:58:46.298072+0800 0xd5f85    Default     0x0                  0      0    kernel: proc 29485: load code signature error 4 for file "UES"
2025-04-21 13:58:46.300248+0800 0xd5f86    Default     0x0                  0      0    kernel: (AppleSystemPolicy) ASP: Security policy would not allow process: 29485, /Applications/UES.app/Contents/MacOS/UES
What causes the pattern to be narrow?
                    
                  
                
                    
                      I have an XPC server running on macOS and want to perform comprehensive performance and load testing to evaluate its efficiency, responsiveness, and scalability. Specifically, I need to measure factors such as request latency, throughput, and how well it handles concurrent connections under different load conditions.
What are the best tools, frameworks, or methodologies for testing an XPC service? Additionally, are there any best practices for simulating real-world usage scenarios and identifying potential bottlenecks?
                    
                  
                
              
                
              
              
                
                Topic:
                  
	
		App & System Services
  	
                
                
                SubTopic:
                  
                    
	
		Processes & Concurrency
		
  	
                  
                
              
              
                Tags:
              
              
  
  
    
      
      
      
        
          
            XPC
          
        
        
      
      
    
      
      
      
        
          
            Endpoint Security
          
        
        
      
      
    
      
      
      
        
          
            Instruments
          
        
        
      
      
    
      
      
      
        
          
            Performance
          
        
        
      
      
    
  
  
              
                
                
              
            
          
                    
                      I have an Electron Application which is hosting Endpoint Security System Extension.
Usually I'm uninstalling it by deleting host application from /Applications/ folder.
However, after updating multiple of my machines to Sonoma 15.3.2, this uninstallation flow doesn't work anymore.
When I delete host app, it shows promt (approximately) "This application is hosting SysEx which will be removed..."
After that, application is moved to .trash, however System Extension remains active and visible in System Settings. Host application name is changed to file name (Some Application -> Some Applciation.app) and this entry has no icon for Host App.
I would appreciate any assistance on how to fix that or maybe create a bug report.
                    
                  
                
                    
                      I have a launch daemon that's using the Endpoint Security framework which also is causing high memory usage (in Activity Monitor memory column shows for example 2GB and Real Memory 11MB) when building a big project in Xcode. Is it some kind of memory caching by the system? leaks -forkCorpse seems to not show any leaks.
How can I attach with heap or Instruments without the process being killed with "ENDPOINTSECURITY, Code 2 EndpointSecurity client terminated because it failed to respond to a message before its deadline"?
                    
                  
                
                    
                      I am using es_new_client and es_subscribe in SystemExtension and EndpointSecurity.
I tested it on M3, and it is working. It also works on M1 versions 12, 13, and 14. Additionally, ES_EVENT_TYPE_NOTIFY_KEXTUNLOAD is functioning correctly.
However, there is a bug on M1 Big Sur where es_new_client's es_handler_block_t cannot receive ES_EVENT_TYPE_NOTIFY_KEXTLOAD.
The tested command is:
sudo kextload /System/Library/Extensions/msdosfs.kext
sudo kextload /System/Library/Extensions/*.kext
Is this intended behavior or a bug? Are there any plans to fix it?
                    
                  
                
                    
                      We have an application that integrates with the sharingd driver to monitor data transfers via AirDrop. Additionally, we utilize the Endpoint Security API to track file access and application activities.
Prior to the Sequoia update, our solution was effectively detecting and blocking sensitive files sent via AirDrop. However, following the update, our drivers are no longer detecting these file transfers.
Could you confirm if there have been any changes to the Endpoint Security API, sharingd, or any other relevant system components that might be affecting this behavior? Any insights or documentation on recent modifications would be greatly appreciated.
Thanks.
                    
                  
                
                    
                      When I'm using Endpoint Security to monitor the file creation behavior of Keynote, I've noticed that when I choose to export a Keynote file as an HTML file, ES only triggers the ES_EVENT_TYPE_NOTIFY_CREATE notification for the index.html file, and the ES_EVENT_TYPE_AUTH_CREATE is not triggered. I've double - checked my code many times, and I'm pretty sure there's no error in it. Does ES only call the notification event without calling the authorization event under certain circumstances? Or is this a bug in ES?
                    
                  
                
                    
                      I am having difficulty getting my container app with an embedded endpoint security extension to work on a virtual Mac.
My virtual Mac has system integrity protection turned off. I have used spctl and System Settings to allow applications from anywhere.
I am using the development entitlement profile to sign my container app.
When I run my app, it crashes with Termination Reason: COODESIGNING 1 Taskgated Invalid Signature. I assume this has to do with the app being signed with my developer profile that contains a list of Macs that can run the software.
How can test my endpoint security extension on a virtual Mac?
                    
                  
                
                    
                      My question is: Do I need two App IDs? One for my launch daemon in order to sign it properly, allowing it to use the Endpoint Security framework. One for the container app.
My understanding is that my existing launch daemon can perform the endpoint security requirements I need. So far, I have had just one App ID for my container app that lives in /Applications.
I have applied for the endpoint security restricted entitlement and have this for development now.
Do endpoint security items have go in Library/SystemExtension? Can my launch daemon live in Library/LaunchDaemons and still use the Endpoint Security framework?
                    
                  
                
              
                
              
              
                
                Topic:
                  
	
		App & System Services
  	
                
                
                SubTopic:
                  
                    
	
		Core OS
		
  	
                  
                
              
              
                Tags:
              
              
  
  
    
      
      
      
        
          
            Endpoint Security
          
        
        
      
      
    
      
      
      
        
          
            Code Signing
          
        
        
      
      
    
      
      
      
        
          
            Service Management
          
        
        
      
      
    
  
  
              
                
                
              
            
          
                    
                      Hello,
es_event_mount_t includes statfs structure. This structure has the field 'f_type' which defines type of filesystem. However, man page says nothing about possible values of this field.
What is the best way to define file system type?
Can I use 'f_type' or 'f_fstypename'? If so, are there any constants in header files which can be used?
Thank you for your help!
                    
                  
                
                    
                      Hey, our app is host for system extension and since macOS 15.3 there is an error when user tries delete an app pop with missing permission appears
Is it intentional? Is it a bug? if not how in correct way should we handle removing of SE when app is being to removed?
                    
                  
                
              
                
              
              
                
                Topic:
                  
	
		App & System Services
  	
                
                
                SubTopic:
                  
                    
	
		Networking
		
  	
                  
                
              
              
                Tags:
              
              
  
  
    
      
      
      
        
          
            Network Extension
          
        
        
      
      
    
      
      
      
        
          
            System Extensions
          
        
        
      
      
    
      
      
      
        
          
            Endpoint Security