We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
+------------+-------+----------+ | version | build | platform | +------------+-------+----------+ | 10.0.17763 | 17763 | windows | +------------+-------+----------+
but this is not limited to specific windows versions
+---------+ | version | +---------+ | 5.0.1 | +---------+
Run osquery.exe --allow_unsafe --extension=testExtension.exe
The extension should have been launched and registered with osquery so that the tables were available to query.
The extension was not launched. This appears to be because of a recent change - 9266838#diff-976be69b93d9364552ca301a07c92b98a8a9486767f3f546812772a1e81aadbd. On Windows the checkStatus call that is used to determine if the process has ever run or is currently running calls GetExitCodeProcess which when called with invalid handle (the default of the id_ for the process not launched yet) returns STILL_ALIVE (https://github.com/osquery/osquery/blob/master/osquery/process/windows/process.cpp#L100) This causes ext_valid to be true and the extension never launched.
This can be shown with:
int main() { DWORD exit; auto res = GetExitCodeProcess(INVALID_HANDLE_VALUE, &exit); if (res == 0) { std::cout << "FAIL " << GetLastError(); } else { std::cout << "EXIT - " << exit; } }
which prints 'EXIT - 259' which is STILL_ALIVE (https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-getexitcodeprocess)
The text was updated successfully, but these errors were encountered:
Detect when a windows extension has not started
8d72dd9
fixes osquery#7324
Successfully merging a pull request may close this issue.
Bug report
What operating system and version are you using?
but this is not limited to specific windows versions
What version of osquery are you using?
What steps did you take to reproduce the issue?
Run osquery.exe --allow_unsafe --extension=testExtension.exe
What did you expect to see?
The extension should have been launched and registered with osquery so that the tables were available to query.
What did you see instead?
The extension was not launched.
This appears to be because of a recent change - 9266838#diff-976be69b93d9364552ca301a07c92b98a8a9486767f3f546812772a1e81aadbd.
On Windows the checkStatus call that is used to determine if the process has ever run or is currently running calls GetExitCodeProcess which when called with invalid handle (the default of the id_ for the process not launched yet) returns STILL_ALIVE (https://github.com/osquery/osquery/blob/master/osquery/process/windows/process.cpp#L100) This causes ext_valid to be true and the extension never launched.
This can be shown with:
which prints 'EXIT - 259' which is STILL_ALIVE (https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-getexitcodeprocess)
The text was updated successfully, but these errors were encountered: