Skip to content
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

nimcontroller_bof: return CheckCode::Unknown if response is empty #14467

Merged
merged 1 commit into from
Dec 6, 2020

Conversation

bcoles
Copy link
Contributor

@bcoles bcoles commented Dec 6, 2020

Patch implemented based on source code review. Untested but apparently this patch works. #14462

Copy link
Contributor

@gwillcox-r7 gwillcox-r7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Was going to ask about potentially changing the line if target['Version'].in? response to if target['Version'].in? response.to_s since this was in the issue you linked to but the .in? method ultimately relies on .include? which both strings and arrays should implement, so I can see why you might of decided to leave this out.

@gwillcox-r7 gwillcox-r7 self-assigned this Dec 6, 2020
@gwillcox-r7
Copy link
Contributor

Okay one thing I did notice was that whilst this code works the output is a little awkward to read. Here is the line I get in the console when this is hit:

[-] 127.0.0.1:48000 - Exploit aborted due to failure: unknown: Cannot reliably check exploitability. No response Enable ForceExploit to override check result.

Going to make a small ninja edit to make the message that is output a little bit easier to understand in the context of all the other code. Otherwise this new code was confirmed to prevent the case where response is not a valid string or array and then the code attempts to call the .in? method on it.

gwillcox-r7 added a commit that referenced this pull request Dec 6, 2020
@gwillcox-r7 gwillcox-r7 merged commit eb7514d into rapid7:master Dec 6, 2020
@gwillcox-r7 gwillcox-r7 added the rn-fix release notes fix label Dec 6, 2020
@gwillcox-r7
Copy link
Contributor

gwillcox-r7 commented Dec 6, 2020

Release Notes

Fixed the exploits/windows/nimsoft/nimcontroller_bof module to implement a missing check for cases where a server may disconnect during the execution of the check method, which may cause the response object to be empty or nil. The new code within the check method will now ensure a CheckCode::Unknown error is appropriately thrown in these instances to let the user know that it was not possible to determine if the target is exploitable or not as the server disconnected during the execution of the check method.

@bcoles bcoles deleted the nimcontroller_bof branch December 6, 2020 07:44
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug module rn-fix release notes fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants