Collect accepted network connection events on macOS
feature copied from osquery issue #8379
What new feature do you want?
Collect accepted network connection events on macOS in the socket_events table. Currently actions collected are bind, listen, and close, but there is not visibility into when a bound socket accepts a new connection. The process_open_sockets table can show this information for long lived connections, but it won't capture short lived connections to a local server that disappear before a scheduled query runs.
How is this new feature useful?
This feature would give visibility into connections to locally running servers, for example if a remote IP connects to a locally running development server or to track which local applications communicate with a device authorization application like Okta Verify.
How can this be implemented?
Configure this code to listen for AUE_ACCEPT events and update this function to process them correctly.
Thanks @ambrusps!