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

Add mixin to implement an exploit's check method by invoking a scanner #11873

Merged
merged 16 commits into from
May 23, 2019

Conversation

wvu
Copy link
Contributor

@wvu wvu commented May 22, 2019

This PR adds a check method to the ms17_010_eternalblue exploit by calling the smb_ms17_010 scanner and checking its newly added return value. This is now a mixin. This was a big to-do for us in the past.

We may want to make this kind of code more generic between exploits and auxiliary modules.

msf5 exploit(windows/smb/ms17_010_eternalblue) > check

[*] 192.168.56.103:445    - Connected to \\192.168.56.103\IPC$ with TID = 2049
[*] 192.168.56.103:445    - Received STATUS_INSUFF_SERVER_RESOURCES with FID = 0
[+] 192.168.56.103:445    - Host is likely VULNERABLE to MS17-010! - Windows Server 2008 R2 Standard 7601 Service Pack 1 x64 (64-bit)
[+] 192.168.56.103:445 - The target is vulnerable.
msf5 exploit(windows/smb/ms17_010_eternalblue) >

cc @zerosum0x0

#8271, #8381, #11869

@ghost
Copy link

ghost commented May 22, 2019

Nice! I had wanted to do something like this originally but didn't know enough about the framework at the time.

@wvu
Copy link
Contributor Author

wvu commented May 22, 2019

I'm thinking if someone writes an RDP exploit, we can just repurpose the scanner in a similar manner. 😅

@wvu wvu added the blocked Blocked by one or more additional tasks label May 22, 2019
@wvu wvu changed the title Add check method to ms17_010_eternalblue [WIP] Add check method to ms17_010_eternalblue May 22, 2019
@wvu
Copy link
Contributor Author

wvu commented May 22, 2019

@zerosum0x0: This is a mixin now, and I plan to flesh it out even further for generic usage. When the RDP exploit comes in, your scanner can be called directly.

@wvu wvu changed the title [WIP] Add check method to ms17_010_eternalblue [WIP] Add mixin to implement an exploit's check method by invoking a scanner May 22, 2019
@wvu wvu changed the title [WIP] Add mixin to implement an exploit's check method by invoking a scanner Add mixin to implement an exploit's check method by invoking a scanner May 23, 2019
@wvu wvu removed the blocked Blocked by one or more additional tasks label May 23, 2019
@busterb busterb self-assigned this May 23, 2019
@busterb
Copy link
Contributor

busterb commented May 23, 2019

LGTM, thanks.

@busterb busterb merged commit e836bdc into rapid7:master May 23, 2019
@busterb
Copy link
Contributor

busterb commented May 23, 2019

Release Notes

This adds a new mixin that allows modules to call methods in other modules easily, namely allowing check methods to be shared between scanner and exploit modules.

@wvu wvu deleted the feature/eternalblue branch May 23, 2019 19:16
@gdavidson-r7 gdavidson-r7 added the rn-enhancement release notes enhancement label May 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants