lvferdi
05/20/2022, 3:53 PMplgx-win-extension
. I have been getting what appears to be resource exhaustion. I start the extension and it collects logs for about 1 minute then stops collecting. tailing the extension log I can see it reapplying the event filters and re-reading the config then eventually show the error below. Is there a place I can find more logs on this issue so I can try to fix it.2022-05-20_15.46.12 INFO plgx_agent_windows_tlsconfig.cpp:862: Event filters removed successfully.
2022-05-20_15.46.12 INFO plgx_agent_windows_tlsconfig.cpp:868: Event filters applied successfully.
2022-05-20_15.46.12 INFO plgx_agent_windows_tlsconfig.cpp:1607: Config: key:: [utc] value:: [true]
2022-05-20_15.46.12 INFO plgx_agent_windows_tlsconfig.cpp:1607: Config: key:: [custom_plgx_EnableSSL] value:: [true]
2022-05-20_15.46.12 INFO plgx_agent_windows_tlsconfig.cpp:1607: Config: key:: [custom_plgx_EnableAmsiStreamEventData] value:: [true]
2022-05-20_15.46.12 INFO plgx_agent_windows_tlsconfig.cpp:1607: Config: key:: [custom_plgx_EnablePacketInspection] value:: [true]
2022-05-20_15.46.12 INFO plgx_agent_windows_tlsconfig.cpp:543: Event controls (remove) stage crossed.
2022-05-20_15.46.12 INFO plgx_agent_windows_tlsconfig.cpp:2630: No event control (blocking) filter found in config.
2022-05-20_15.46.12 INFO plgx_agent_windows_tlsconfig.cpp:545: Event controls (apply) stage crossed.
2022-05-20_15.46.14 INFO plgx_win_extension.ext.cpp:237: Reiniting extension due to error.
2022-05-20_15.46.14 INFO plgx_win_extension.ext.cpp:229: Starting extension.
2022-05-20_15.46.19 INFO plgx_win_extension.ext.cpp:237: Reiniting extension due to error.
2022-05-20_15.46.19 INFO plgx_win_extension.ext.cpp:229: Starting extension.
2022-05-20_15.46.24 INFO plgx_win_extension.ext.cpp:237: Reiniting extension due to error.
2022-05-20_15.46.24 INFO plgx_win_extension.ext.cpp:229: Starting extension.
2022-05-20_15.46.29 INFO plgx_win_extension.ext.cpp:237: Reiniting extension due to error.
2022-05-20_15.46.29 INFO plgx_win_extension.ext.cpp:229: Starting extension.
2022-05-20_15.46.34 INFO plgx_win_extension.ext.cpp:237: Reiniting extension due to error.
2022-05-20_15.46.34 INFO plgx_win_extension.ext.cpp:229: Starting extension.
2022-05-20_15.46.39 INFO plgx_win_extension.ext.cpp:237: Reiniting extension due to error.
himanshu
05/20/2022, 6:38 PM"options" :
{
"custom_plgx_LogLevel": "3",
"custom_plgx_LogFileName": "C:\\Program Files\\osquery\\plgx-win-extension.log",
"custom_plgx_EnableLogging": "true"
},
for verbose logging, change custom_plgx_LogLevel to 1 and restart osqueryd and extension.
refer here for sample log settings:
https://github.com/eclecticiq/osq-ext-bin/blob/master/install/osquery.conflvferdi
05/23/2022, 12:08 PMhimanshu
05/23/2022, 5:23 PMlvferdi
05/23/2022, 5:35 PMhimanshu
05/23/2022, 6:32 PMAmazon ec2 windows server 2016 Datacenter
vm size?
need to try on exact configuration as number of cpus may be critical to repro the issue.lvferdi
05/23/2022, 6:35 PMwin_registry_events
query set to exclude REG_CREATE
but I get all the reg_create events for the extension itself, which is a lot (understandably), and I have the extension path in the exclusions filter. This extends past start and is continually reoccuring. I would have expected the race condition to have rectified itself after the first filter then I would only receive events matching the filter from there forward. Yet I still get events for reg_create even with it excluded in the config.himanshu
05/23/2022, 6:57 PMlvferdi
05/23/2022, 7:14 PMOpenPlgx
05/24/2022, 3:22 AMhimanshu
05/24/2022, 6:18 AMosqueryd worker () memory limits exceeded
which would unload the extension.
running osquery with the flag --disable_watchdog=true
should make it work on 2 core system. ideally you dont need to disable osquery watchdog on a higher cpu core system.