Saturday, January 29, 2011

Automatic Exploit using Metasploit

Today topic of discussion is NIPrint exploitation using Metasploit.
Metasploit make the exploitation work easy for attackers by doing the exploit itself and initiating some terminal for the attacker to manipulate the target system.
Make sure, every time you run the Metasploit; don’t forget to update it first. Start the Metasploit Console session. It will load exploits, nops, auxiliary modes, payloads and encoders displayed on the screen along with prompt to execute commands.
For exploit related to specific application, you can find it using ‘search’ command. In this case, for NIPrint use command ‘search –t exploit ‘NIPrint’ ‘. This command lists the exploits which contains NIPrint in their name along with some description provided.
You can use the exploit using ‘use’ command followed by the complete path of exploit. For example: ‘use windows/lpd/niprint’. This loads the exploit for current operation. Use ‘info’ command to get detailed description about the exploit.
We can add payload to the exploit using ‘set’ command. If you don’t have an idea about which payload to use, you can take help using ‘show payloads’ command. You can choose from the list which payload you want to use with current exploit. The command for setting messagebox payload is: ‘set payload windows/messagebox’. Complete path of the payload should be defined to load it.
Further, you can check, see and set some of the attributes using setcommand. All attributes will get listed with default values and after providing values for necessary attributes, you can run the exploit using ‘exploit’ command. An exploit triggers and you will see the results depending upon the payload.
In messagebox, a window will appear on the target machine displaying default message with alert.
In last, if eventually you misconfigured a value, which can be removed using ‘unset’ command followed by the attribute name.

No comments:

Post a Comment