Railgun in Metasploit
In this recipe, we learn more about Railgun. Railgun is a meterpreter—only Windows exploitation feature. It allows direct communication to Windows API.
How to do it...
Railgun allows us to perform a lot of tasks that Metasploit cannot, such as pressing keyboard keys and so on. Using this, we can use Windows API calls to perform all the operations we need to for even better post exploitation:
- We have already seen in the previous chapters on getting a meterpreter session. We can jump into Railgun from meterpreter by typing the
irb
command:
- To access Railgun, we use the
session.railgun
command:
Â
We see that a lot of data has been printed. These are basically the available DLL's and functions we can use.
- To have a better view in order to see the DLL names, we type the command:
session.railgun.known_dll_names
The following screenshot shows the output for the preceding command:
- To view a function of a
.dll
, we use the following command:
session.railgun.<dllname>...