-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Improve NagiosXI authenticated exploit modules to increase resilience and for use with Autocheck disabled #17606
New issue
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
Comments
I want to work on this issue please assign me this issue. |
@Sidharthareddy99 Your assigned now, let me know if you need additional info on anything. |
Yup feel free to ask questions if you need @Sidharthareddy99 , it's very top of mind at the moment 😅 |
Unassigning for now, if a PR is put up though I can reassign. We mostly use assignment internally to track who is working on what. Anyone is free to put up a PR to fix an issue at any time, at which point we can look into assigning people at that point |
Can I get to work on this? I'd like to contribute. |
Sure @XEHIL, feel free to take it on 👍 Do you need help forking the repo? I see you haven't done so yet. |
@gwillcox-r7 thank you. I was waiting for the issue to be assigned. |
#17820 resolves most of these issues however the final two points still stand. Reopening this issue as they will need to be addressed before we can consider this truly fixed. |
Hi @gwillcox-r7 I am a student at UT Austin in the Ethical Hacking class who would like to contribute on this issue as a final project for the class. I see the final two points stand, but upon reading this comment, it seems there is deeper structural changes and checks to pass if the order of the return values of |
So as for the issue I think the main problem is seen at metasploit-framework/lib/msf/core/exploit/remote/http/nagios_xi/login.rb Lines 251 to 257 in f6c8181
Ideally we should be using hashes here as well instead of arrays to prevent issues related to positional issues. However we decide to do this though, all calling code will need to be updated to account for the changes that we make. As for where the return codes from Looking for this shows one reference at https://sourcegraph.com/github.com/rapid7/metasploit-framework/-/blob/lib/msf/core/exploit/remote/http/nagios_xi/login.rb?L180 which is in the Let me know if that is clear or not, I know code navigation took some time for me to wrap my head around so I'm happy to help with any questions you might have 👍 |
Grant, I've got a solution that standardizes the authentications in the NagiosXI Scanner and one of the older exploits to not directly call Firstly, I changed the order of the return from I then changed around some comments to be more accurate. Take a look at my PR when you can! I have the code there so you can take an initial look at it but I neeed to test these modules out myself now. |
@k0pak4 this issue seems to have been resolved - can you comment |
@nrathaus it looks like the last two requirements are not resolved as far as I can tell? The PR addressing the last one was closed with an attic tag, and from what I see the response codes still are sent in the same format? Unless I'm missing something I don't think the last requirement is addressed |
Previous versions of NagiosXI are listed here: https://assets.nagios.com/downloads/nagiosxi/versions.php |
@nrathaus yes the previous versions are also listed in the original description, but I don't think this is fully addressed |
Summary
During the course of #17494 there were several concerns with how the NagiosXI login mixin was being used in the check method, which prevents the module from working when Autocheck is disabled. Additionally, other improvements were made including cleaner regexes in version detection, nil checks on objects that were assumed to be not nil, and other improvements. After examining the other NagiosXI modules the following modules should be modified to also take advantage of these improvements:
Improvements
Generally, these modules can also be cleaned up and shortened similarly to how the config wizards RCE module was through PR.
Motivation
Currently, these modules will fail with AutoCheck disabled, so we want to improve that first and foremost. Additionally, the version checking and error codes will provide more support when running the modules against old versions of NagiosXI.
Vulnerable Software
In general, older versions of NagiosXI can be found:
documentation\modules\exploit\linux\http\nagios_xi_configwizards_authenticated_rce.md has detailed installation instructions if help is needed on install
The text was updated successfully, but these errors were encountered: