mirror of
https://github.com/valitydev/osquery-1.git
synced 2024-11-07 18:08:53 +00:00
471d5faaa0
The vtabel report : - path: full path of the file - unix_user: name of the owner (if not available display the uid) - unix_group: name of the groupe (if not available display the gid) - permissions: report suid or guid * S for suid bin * G for guid bin Example : osquery> select * from suid_bin; +----------------------------------------------------------------------------------------------------+-----------+---------------+-------------+ | path | unix_user | unix_group | permissions | +----------------------------------------------------------------------------------------------------+-----------+---------------+-------------+ | "/bin/ps" | root | wheel | S | | "/bin/rcp" | root | wheel | S | | "/Users/vmauge/suid_test" | vmauge | 999 | SG | | "/usr/bin/at" | root | wheel | S | | "/usr/bin/atq" | root | wheel | S | | "/usr/bin/atrm" | root | wheel | S | | "/usr/bin/batch" | root | wheel | S | | "/usr/bin/crontab" | root | wheel | S | | "/usr/bin/ipcs" | root | wheel | S | | "/usr/bin/lockfile" | root | mail | G | | "/usr/bin/login" | root | wheel | S | | "/usr/bin/newgrp" | root | wheel | S | | "/usr/bin/procmail" | root | mail | G | | "/usr/bin/quota" | root | wheel | S | | "/usr/bin/rlogin" | root | wheel | S | | "/usr/bin/rsh" | root | wheel | S | | "/usr/bin/su" | root | wheel | S | | "/usr/bin/sudo" | root | wheel | S | | "/usr/bin/top" | root | wheel | S | | "/usr/bin/wall" | root | tty | G | | "/usr/bin/write" | root | tty | G | | "/usr/sbin/postdrop" | root | _postdrop | G | | "/usr/sbin/postqueue" | root | _postdrop | G | | "/usr/sbin/rpc.net" | root | wheel | S | | "/usr/sbin/rpcset" | root | wheel | S | | "/usr/sbin/traceroute" | root | wheel | S | | "/usr/sbin/traceroute6" | root | wheel | S | +----------------------------------------------------------------------------------------------------+-----------+---------------+-------------+ This commit fixes issue #253.
64 lines
1.8 KiB
CMake
64 lines
1.8 KiB
CMake
if(APPLE)
|
|
ADD_OSQUERY_OBJCXX_LIBRARY(osquery_tables_objc
|
|
../core/darwin/NSProcessInfo+PECocoaBackports.mm
|
|
../core/darwin/NSProcessInfo+PECocoaBackports.h
|
|
../core/darwin/PECocoaBackportsGlobal.h
|
|
system/darwin/osx_version.mm
|
|
system/darwin/users.mm
|
|
system/darwin/groups.mm
|
|
)
|
|
|
|
ADD_OSQUERY_LIBRARY(osquery_tables_darwin
|
|
events/darwin/passwd_changes.cpp
|
|
networking/darwin/interfaces.cpp
|
|
networking/darwin/listening_ports.cpp
|
|
networking/darwin/routes.cpp
|
|
system/darwin/apps.cpp
|
|
system/darwin/ca_certs.cpp
|
|
system/darwin/firewall.h
|
|
system/darwin/firewall.cpp
|
|
system/darwin/kextstat.cpp
|
|
system/darwin/launchd.cpp
|
|
system/darwin/nvram.cpp
|
|
system/darwin/processes.cpp
|
|
)
|
|
|
|
ADD_OSQUERY_LINK("-framework Foundation")
|
|
ADD_OSQUERY_LINK("-framework IOKit")
|
|
ADD_OSQUERY_LINK("-framework CoreFoundation")
|
|
ADD_OSQUERY_LINK("-framework Security")
|
|
ADD_OSQUERY_LINK("-framework OpenDirectory")
|
|
else()
|
|
ADD_OSQUERY_LIBRARY(osquery_tables_linux
|
|
events/linux/passwd_changes.cpp
|
|
networking/linux/routes.cpp
|
|
system/linux/kernel_modules.cpp
|
|
system/linux/processes.cpp
|
|
system/linux/users.cpp
|
|
system/linux/groups.cpp
|
|
)
|
|
endif()
|
|
|
|
FILE(GLOB table_sources
|
|
"generated/*.cpp"
|
|
"manual/*.cpp"
|
|
)
|
|
|
|
ADD_OSQUERY_LIBRARY(osquery_tables
|
|
networking/utils.cpp
|
|
networking/etc_hosts.cpp
|
|
utility/time.cpp
|
|
system/last.cpp
|
|
system/bash_history.cpp
|
|
system/suid_bin.cpp
|
|
base.h
|
|
)
|
|
|
|
ADD_OSQUERY_TEST(etc_hosts_tests networking/etc_hosts_tests.cpp)
|
|
if(APPLE)
|
|
ADD_OSQUERY_TEST(apps_tests system/darwin/apps_tests.cpp)
|
|
ADD_OSQUERY_TEST(ca_certs_tests system/darwin/ca_certs_tests.cpp)
|
|
ADD_OSQUERY_TEST(firewall_tests system/darwin/firewall_tests.cpp)
|
|
ADD_OSQUERY_TEST(launchd_tests system/darwin/launchd_tests.cpp)
|
|
endif()
|