-
-
Notifications
You must be signed in to change notification settings - Fork 112
[BUG] Unable to get WMI working #331
New issue
Have a question about this 8000 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
Comments
@gooseleggs -Scott |
Scott So today, I enabled Audit logging for all WMI created processes. I ran the Greenbone scanner, and then put the line As per when did we think it broke - not sure. 22.4.47 had the fault. |
OK ... "-2" means the file was not found. The audit logs, (Thank you btw) show the failure trying to execute "impacket-wmiexe" . I'm relatively certain this is the binary needed, but no idea why it would be named differently. Could you try linking it in the container and re-running the scan?
If that works, I just need to figure out "why" its different, and either fix the why or add the linking to the startup. Thanks, |
Interesting...but no success. So I did what you asked. However I thought that it might be because the linking was relative, ie So, don't have an answer yet |
Scott Done a few more hours into this. Gone down the wrong rabbit hole, and back up. Haven't got an answer, but it must be in the building of the image, as WMI is not an external call. So, changes to the base image: First the wrong rabbit hole....
Doing this in the Greenbone container results in:
Looking at the Dockerfile from Greenbone (https://github.com/greenbone/ospd-openvas/blob/main/.docker/prod.Dockerfile), the following lines are used:
Next testing WMI...
Looking at the audit log file, nothing is called, so this When run inside the Greenbone opsd container
|
that triggered a memory.
I'm thinking it took that option seriously and broke the system packages. :) I'm rebuilding again now without the impacket by apt. the tag will be 25.02.goose -Scott |
Scott That image still has the 10.0 version of impacket in it. Manually removing the system version and installing the python version is not resolving it either. I think the openvas-smb needs to be looked at as well as this seems to do the wmi stuff. |
Any update on another build for WMI? I am hoping to get it sorted before another engagement next week :-) |
Sorry ... it's been crazy days around here ... From 25.03.03 pushed just moments ago:
So I'm pretty sure it has the right version it now. Can you test and let me know. -Scott |
Yes - can confirm it is now using v12 impacket. Unfortunately, there is still something note quite right - probably with the compilation of the WMI components in openvas-smb. OK - there is a workaround. If I manually build OpenVAS SMB and install in the container, it seems to work. So, steps from the standard 25.03.03 container:
I then run the test.nasl script that I wrote and all OK. So, it appears that you may need to look at this component of the build. |
:/ Thanks! -Scott |
OK ... the only thing missing was heimdal I've added it to the base image and to the build, which is running now. -Scott |
Curiously .... I was installing the heimdal-dev in the build script. So it would build, but was missing some of the heimdal pieces in the base image. There should a beta tag in docker hub shortly. Thanks, |
Now that I think about it ... that was intentional. At some point in the past, installing the heimdal bits conflicted with some other kerberos bits that had to be installed too. But now the build is completing with no conflicts ... so ... Hopefully this will take care of it. Thanks, |
Thanks Scott Just to be clear, what tag is the new build? |
The tag should be: beta
Let me know if you don’t see it, or if the beta tag is more than a few hours older than this email.
…-Scott
On Mar 16, 2025 at 12:16 +0100, gooseleggs ***@***.***>, wrote:
Thanks Scott
Just to be clear, what tag is the new build?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were assigned.Message ID: ***@***.***>
gooseleggs left a comment (immauss/openvas#331)
Thanks Scott
Just to be clear, what tag is the new build?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were assigned.Message ID: ***@***.***>
|
Don't see it. The one I see is 5 months old |
😒 -Scott |
Thanks Scott. Still no dice. Still working through it. When I compile and install, it works. When I just compile it does not work. When I check the files in the container before and after, they appear the same. Wierd. OK - so doing some md5 sums there is a difference between the container, and the compiled version of the libraries...
Before
After compiled
|
are you using the same compiler version? if anything in the build tools is a little different, then the it could change the hash. And it's just the wmi pieces that are different .... well except that first one (the ".pc"), which I'm fairly certain is part of the source? The package config file.... Can you expand on this statement: Were are you building and how for each scenario? Thanks, |
Scott
So starting the container up and running md5sum as per above. Then running the steps to reinstall the version over top of itself from within the running container using the steps in the previous post. It could be a different compiler. I am using the same pre-reqs that you are. That is the only differences that I can come up with. It is not being overwritten by any of the xz’d directories thereby rolling it back? Otherwise I am at a loss at the moment of what to check next.
|
Using the 25.01.01 container, and trying to perform a WMI scan against a known machine, I get
under the
Authenticated Scan / LSC Info Consolidation (Windows SMB Login)
report for a scan. Jumping into the container and running thewmic
command, or theimpacket-wmic
command works as expected (I can get a response). However, there is nothing in the scanning logs, other than WMI access is denied or not available.For comparison, I spun up the Greenbone community containers (that was a mission!!) and did a comparison scan. That scan was successful, and I received
So, how would I go about trying to troubleshoot this to provide some valid feedback??
The text was updated successfully, but these errors were encountered: