Covenant icon indicating copy to clipboard operation
Covenant copied to clipboard

Added Reverse Port Forward Functionality

Open thiagomayllart opened this issue 4 years ago • 3 comments

Hello everyone!!

I just added fully working reverse port forward functionality to covenant. It doesn't bind to any port in the machine with the Grunt. The Grunt only connects to the destination and the C2.

The user can connect to the VPS and the selected port. The C2 is responsible to bind to a port and forward the traffic to the Grunt and then, to the destination. The whole procedure is pretty much similar to portfwd from meterpreter.

I tried to add the functionality directly to a task without touching other things... but that was not possible. I had to add a PortForward dummy task only to have the Task option in the Grunts. The handlers are actually in the new GruntHTTPPortForward and, in the CovenantService (responsible for bind to the port and forwarding the traffic).

I also modified the DbInitializer only to add the new Grunt.

In case you guys need more details feel free to ask.

Thank you!!

thiagomayllart avatar Jun 28 '20 09:06 thiagomayllart

this is so awesome, it is a feature i have been wanting to see added. I also would love a socks server added. Thanks for doing this.

caseyvsilver1515 avatar Jul 11 '20 15:07 caseyvsilver1515

Wow, amazingly the meterp/metasploit version of this is actually simpler in terms of code volume. Kudos. Being able to present services remotely is key - DHCP and DNS alone can be priceless, and stateful stuff inside the trusted intranet zone is always fun.

sempervictus avatar Sep 25 '20 21:09 sempervictus

Any update on this ?

dustinwloring1988 avatar Nov 12 '21 15:11 dustinwloring1988