I'm studying a MetaSploit Exploit vnc_keyboard_exec, and I was wondering where is defined the function cmd_psh_payload
(line 141).
So I greped through msf/core
directory on my Kali machine and found it was in /msf/core/exploit/powershell.rb
So I placed a print_status("aaaa")
just before the call of cmd_psh_payload
in the exploit file and a print_status("bbb")
at the beginning of the function (in powershell.rb) and ran the exploit (in a virtual training lab).... but, only "aaaa" was printed.
I've looked for the definition of this function elsewhere on my machine, but can't find it. So maybe the function is not called, but why would it be ? I'm really stuck here, can't figure out what to do..
Thanks for your support