-
Notifications
You must be signed in to change notification settings - Fork 13.8k
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
Update local exploit suggester to handle nil targets #15465
Update local exploit suggester to handle nil targets #15465
Conversation
@@ -119,33 +121,38 @@ def run | |||
@local_exploits.each do |m| | |||
begin | |||
checkcode = m.check | |||
rescue Rex::Post::Meterpreter::RequestError => e |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of interest, what's the rationale behind special casing this exception in particular? 👀
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it was there previously, but was it investigated in more detail whether it's needed still? 🕵️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I'm not confuddled, it's that this error indicates the session is borked and that you can't run any more checks, where as any other error indicates it was just the check that had an issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's raised in other circumstances too:
meterpreter > run post/windows/manage/migrate
[*] Running module against HOME-F006222D6C
[*] Current server process: webappmon.exe (7064)
[*] Spawning notepad.exe process to migrate to
[-] Post failed: Rex::Post::Meterpreter::RequestError stdapi_sys_process_execute: Operation failed: Access is denied.
[-] Call stack:
[-] /projects/exploiting/trunk/lib/rex/post/meterpreter/extensions/stdapi/sys/process.rb:163:in `execute'
[-] (eval):80:in `create_temp_proc'
[-] (eval):49:in `run'
=end
36f2415
to
1288e85
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just waiting on jenkins 🐌
@msjenkins-r7 retest this please |
Release NotesUpdates the local exploit suggester to gracefully handle modules raising unintended exceptions and nil target information |
This PR fixes an issue with local_exploit_suggester, where it would crash if i encountered a module with a nil target property.
Before
When a module returns a nil target:
![image](https://user-images.githubusercontent.com/85949464/126800529-4f8b8aeb-35ac-4d6c-91c1-99ddf4b1a64d.png)
After
Verification
List the steps needed to make sure this thing works
msfconsole