Meterpreter API
During a penetration test, you might be unable to find an existing script that matches what you need in order to perform a required task. If you understand the basic concepts of programming, it should be relatively easy for you to pick up the Ruby syntax and use it to write additional scripts.
Let’s start off with a basic print statement that uses the interactive Ruby shell, also known as irb
. From the Meterpreter console, issue the irb
command and begin typing commands:
meterpreter > irb
[*] Starting IRB shell
[*] The 'client' variable holds the meterpreter client
>>
After you are inside the interactive shell, you can use it to test the different API calls from Meterpreter.
Printing Output
Let’s start with the print_line()
call, which ...
Get Metasploit now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.