An SMB relay attack allows us to relay SMB authentication requests to another host, gaining access to an authenticated SMB session if the user has access and network logins are allowed on the target host. If the user has administrator access in the target host, it is possible to execute arbitrary commands.
In this recipe, we will use the MS08-068 Microsoft Windows SMB Relay Code Execution exploit module to perform an SMB relay attack:
- To use this module, we need to set the target SMB server we wish to connect to with
SMBHOST
:
- Now that we have the relay module set up and ready, create an HTML file like the one following, with the IP address of the machine running the relay in the UNC path:
<html> <body> <img src="\\192.168.216.5\image.jpg"> </body> </html>
- As you can see from the screenshot, the HTML was injected...