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

Bug: useproxy is forcing https #738

Open
digininja opened this issue Aug 19, 2021 · 6 comments
Open

Bug: useproxy is forcing https #738

digininja opened this issue Aug 19, 2021 · 6 comments
Labels

Comments

@digininja
Copy link
Contributor

Expected behavior

Requests be made over http when specified

Actual behavior

Requests are made over https to port 80

Steps to reproduce

With this command line the requests are being made through Burp to the target https://cewl.test:80 rather than http://...

./program/nikto.pl -host cewl.test -useproxy localhost:8080

image

Even if I specify the host as http://cewl.test it still goes to https.

Running direct, no proxy, it does as it is supposed to and hits http

The only change I've made to the config file is to add this line:

LW_SSL_ENGINE=SSLeay

Without it, Nikto can't talk to Burp

Nikto version

Pull from 2.5 branch

Further technical info

In case this helps:

./nikto.pl -host http://cewl.test -useproxy localhost:8080 -D D
D:Thu Aug 19 09:13:35 2021 - Loading DB: /home/robin/tools/web/nikto/program/databases/db_parked_strings
D:Thu Aug 19 09:13:35 2021 - Loading DB: /home/robin/tools/web/nikto/program/databases/db_404_strings
D:Thu Aug 19 09:13:35 2021 - Loading DB: /home/robin/tools/web/nikto/program/databases/db_outdated
D:Thu Aug 19 09:13:35 2021 - Loading DB: /home/robin/tools/web/nikto/program/databases/db_variables
D:Thu Aug 19 09:13:35 2021 - Loading DB: /home/robin/tools/web/nikto/program/databases/db_tests
- Nikto v2.5.0
---------------------------------------------------------------------------
D:Thu Aug 19 09:13:35 2021 WARNING: No init found for nikto_core
D:Thu Aug 19 09:13:35 2021 'Request Hash' = {
	'Connection' => 'Keep-Alive',
	'Host' => 'cewl.test',
	'User-Agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.169 Safari/537.36',
	'whisker' => {
		'MAGIC' => 31339,
		'force_bodysnatch' => 0,
		'force_close' => 0,
		'force_open' => 0,
		'host' => 'cewl.test',
		'http_eol' => "\r\n",
		'http_space1' => ' ',
		'http_space2' => ' ',
		'ignore_duplicate_headers' => 0,
		'include_host_in_uri' => 1,
		'invalid_protocol_return_value' => 1,
		'keep-alive' => 1,
		'lowercase_incoming_headers' => 1,
		'max_size' => 750000,
		'method' => 'GET',
		'normalize_incoming_headers' => 1,
		'port' => 80,
		'protocol' => 'HTTP',
		'proxy_host' => 'localhost',
		'proxy_port' => 8080,
		'require_newline_after_headers' => 0,
		'retry' => 0,
		'ssl' => 1,
		'ssl_certfile' => undef,
		'ssl_rsacertfile' => undef,
		'ssl_save_info' => 1,
		'timeout' => 10,
		'trailing_slurp' => 0,
		'uri' => '/',
		'uri_param_sep' => '?',
		'uri_postfix' => '',
		'uri_prefix' => '',
		'version' => '1.1'
	}
};
@digininja digininja added the bug label Aug 19, 2021
@tautology0
Copy link
Collaborator

Just a couple of things

IIRC the is the site up thingy tests ssl first unless it's specified explicitly using one of the above two mechanisms.

@digininja
Copy link
Contributor Author

digininja commented Aug 19, 2021 via email

@digininja
Copy link
Contributor Author

-nossl fixes it.

Defaulting to https is OK, but if it does, it should also default to port 443, not https on port 80.

sullo pushed a commit that referenced this issue Jan 15, 2022
…a -ssl/-nossl as well as the target host string.
@sullo
Copy link
Owner

sullo commented Jan 15, 2022

@tautology0

IIRC the is the site up thingy tests ssl first unless it's specified explicitly using one of the above two mechanisms.

That was true until the last commit; now it checks HTTP first which, I think, shouldn't have any negative repercussions and as a byproduct fixes this issue due to how the fallback logic works.

However, right now it's sending the full URL in the "file" portion of the request when it shouldn't (when using a proxy with an HTTPS site).

@digininja
Copy link
Contributor Author

I've just checked and I would agree with all that. HTTP works fine, HTTPS is making requests in the style:

GET https://digi.ninja:443/KESDM0w5.Htm HTTP/1.1

@sullo
Copy link
Owner

sullo commented Jan 17, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants