Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Am I doing something wrong? /Vhost scanning #781

Open
bug-bounty-001 opened this issue May 2, 2024 · 4 comments
Open

Question: Am I doing something wrong? /Vhost scanning #781

bug-bounty-001 opened this issue May 2, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@bug-bounty-001
Copy link

Description:
I tried to fuzz host header and send it to same IP address.
I ran 2 different commands to demonstrate, I didn't get expected behaviour from second one. Only difference is http/https.

First one: (this works as expected)
ffuf -w subdomains-top1million-20000.txt -u https://142.250.187.142 -H "HOST: FUZZ.google.com" -H "Custom: just testing my tools" -x http://localhost:8080 -t 1 -rate 1

Screenshots from Burp Suite 1:
image
image

Second one:
ffuf -w subdomains-top1million-20000.txt -u http://142.250.187.142 -H "HOST: FUZZ.google.com" -H "Custom: just testing my tools" -x http://localhost:8080 -t 1 -rate 1

Screenshots from Burp Suite 2:
image
image

Problem:
Apparently I can't change host header in http request.

I am probably missing some configuration or flag, can you assist me?
Thank you.

@bsysop
Copy link
Collaborator

bsysop commented May 2, 2024

Hi @bug-bounty-001,
Nice catch, this indeed looks like an issue, but it could be an issue in Burp or the proxying from Ffuf.

Note: Fuzzing with your same arguments (have changed the WL and proxy port)

Screenshot 2024-05-02 at 20 48 00

Checking Burp, this is sending requests to different IPs

Screenshot 2024-05-02 at 20 48 20

But when fuzzing to the HTTPs, the IPs are the same as the target.

Screenshot 2024-05-02 at 20 52 44

This will need a deeper analysis, I hope it doesn't affect your tests.

@bsysop bsysop added the bug Something isn't working label May 2, 2024
@bug-bounty-001
Copy link
Author

Hi @bsysop,
Thank you for quick response.
I checked it with wireshark (maybe I should have done that before :D) it looks fine, as you said issue probably related to proxy or Burp.
ffuf -w subdomains-top1million-20000.txt -u https://142.250.187.142 -H "HOST: FUZZ.google.com" -t 1 -rate 1

image
image

ffuf -w subdomains-top1million-20000.txt -u http://142.250.187.142 -H "HOST: FUZZ.google.com" -t 1 -rate 1

image
image
image
image

ffuf -w subdomains-top1million-20000.txt -u http://142.250.187.142:4444 -H "HOST: FUZZ.google.com" -t 1 -rate 1

image

//It doesn't affect my tests, I was planning to use it on ctf. Thank you for contributing to this great tool.

@bsysop
Copy link
Collaborator

bsysop commented May 3, 2024

Lol, nice work!

@bsysop bsysop assigned bsysop and joohoi and unassigned bsysop May 17, 2024
@joohoi
Copy link
Member

joohoi commented May 20, 2024

This is actually a feature from HTTP spec, I have stumbled into this before and I figured out it was stemming from the Go standard library request.go, around line 600 in current version.

However upon double checking the related RFCs it was pretty clearly written there.

When a proxy receives a request with an absolute-form of
request-target, the proxy MUST ignore the received Host header field
(if any) and instead replace it with the host information of the
request-target. A proxy that forwards such a request MUST generate a
new Host field-value based on the received request-target rather than
forward the received Host field-value.

Now while I might end up working around this in the future, I probably won't, as it's a lot of work for a single niche use case - fuzzing Host - header while using a HTTP proxy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants