Built off the open source project Osquery
Description: List ports that are listening on all interfaces, along with the process to which they are attached.
What The Data Shows: Useful for auditing attack surface, IT Hygiene, or vulnerable software.
SQL:
SELECT lp.address, lp.pid, lp.port, lp.protocol, p.name, p.path, p.cmdline
FROM listening_ports lp
JOIN processes p ON lp.pid = p.pid
WHERE lp.address = "0.0.0.0";
Copyright © 2005-2023 Broadcom. All Rights Reserved. The term “Broadcom” refers to Broadcom Inc. and/or its subsidiaries.