Firstly I would like to introduce myself; i'm indianam, i'm new to hacking, and i'm looking forwards to learning more about penetration testing and the different aspects of cyber security.
Secondly, I have a question regarding making Metasploit .exe's that automatically perform task. For example if I wanted to make a .exe payload that would install a key logger attached to the winlogon.exe process and store the results in a file or send them back to my machine as to find a user credentials without having to crack it, how could I automate it so that all of this could be performed without having to open a meterpreter session and doing it all manually. I may not be able to know when they would run this .exe file so I can't just sit around at my computer all day with a listener open.
I've read up on making a .rc file but I can't figure out how to make it works without need of manual intervention. I feel like this could be very useful if attacking multiple machines at the same time since I wouldn't be able to manage all the sessions at once. Or if you don't know when they will run the .exe it would serve as an automatic way to collect information and run payloads.
Thanks for all the help,
With the help of the wonderful people here at Null Byte I was able to solve my issue using the AutoRunScript option which allows to automatically run commands post-exploit. I put the link to an article explaining it a bit better at the bottom of the article. Thanks everyone for all the great help, I am very grateful :)