2

During a meterpreter session, is it possible to deliver a payload that creates a connection request to a local OpenVPN connection? For example:

I have a payload. Whenever that payload runs on the remote system and calls back to me, it's over an OpenVPN connection using the payload that I've generated. The payload has a .ovpn file which runs on payload delivery, and I then have a reverse shell with the OpenVPN connection.

  • Can a payload execute the scripts to set up a VPN connection back to the attacking machine? Sure. Once you get code running, you can do whatever the available resources permit. I'm not sure what you are asking. Are you asking for a script on how to do that? – schroeder Mar 6 at 14:58
  • Sure, that's theoretically possible; you could chunk out that huge custom made payload to make meterpreter have a openvpn-client and connect to your server and so on. But: Why don't you use https as transport instead? It's easy, it's free and it's offering the same level of security for this one connection. – Tobi Nary Mar 6 at 15:06
1

TL;DR - Meterpreter will deliver it, but you have to write it first.

You can deliver a payload that includes a .ovpn file and script to run it. However, you will have to write it yourself. Meterpreter has plenty of great payloads that require little or no changes to (like linux_86/generic_reverse_tcp_shell and several variations, where you only change LHOST and LPORT). However, there is not one to deliver an .ovpn. You can create that payload yourself using a combination of a stager and a payload, or multi-step payload.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.