HavocFramework / Havoc

The Havoc Framework.
GNU General Public License v3.0
6.37k stars 903 forks source link

[Teamserver-Client--Bug]: Teamserver ignores "X-Forwarded-For" header #351

Closed GreyHatCyberSecurity closed 1 year ago

GreyHatCyberSecurity commented 1 year ago

Contact Details

greyhatfeedback@protonmail.com

What happened?

When using redirectors with Havoc C2, it became necessary to see the IP address of the connection initializer rather than the IP address of the redirector the beacon came from.

The redirectors were configured to pass all the headers along with the HTTP packet

In the havoc profile settings, the TrustXForwardedFor variable was set to true.

image

Teamserver ignores the X-Forwarded-For header and displays the redirector IP address, although when a packet is normally sent to my C2 server, the X-Forwarded-For header is present

When I send curl myredirector:80 and turn on C2 listening, a packet like this arrives, which has all the necessary headers. But Havoc ignores them. image

To redirect the packet I use nginx as a proxy

Did You Do a Pull First?

Latest (You performed a pull first)

Did You Try With the Dev Branch?

Yes (You tried using the dev branch but the problem persist)

Relevant log output

No response

Did You Read Over Your Issue First?

S4ntiagoP commented 1 year ago

fixed on dev, if still an issue, please reopen. thank you for reporting!