Skip to content

Conversation

cakekoa
Copy link
Contributor

@cakekoa cakekoa commented Feb 21, 2023

What does this PR do?

Fixes part of #2136.

Add the try_all_discovered_http_ports option to Hadoop.

PR Checklist

  • Have you added an explanation of what your changes do and why you'd like to include them?
  • Is the TravisCI build passing?
  • Was the CHANGELOG.md updated to reflect the changes?
  • Was the documentation framework updated to reflect the changes?
  • Have you checked that you haven't introduced any duplicate code?

Testing Checklist

  • Added relevant unit tests?
  • Have you successfully tested your changes locally? Elaborate:

    Tested by running unit tests

  • If applicable, add screenshots or log transcripts of the feature working

return [
port
for port, psd in target_host.ports_status.tcp_ports.items()
if psd.status == PortStatus.OPEN and psd.service == NetworkService.HTTP
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@VakarisZ Can you refresh my memory why this exploiter doesn't support HTTPS?

Comment on lines 19 to 20
GOOD_PORT = NetworkPort(12345)
GOOD_PORT_DATA = PortScanData(
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
GOOD_PORT = NetworkPort(12345)
GOOD_PORT_DATA = PortScanData(
HTTP_PORT = NetworkPort(12345)
HTTP_PORT_DATA = PortScanData(

urls_passed_to_exploit = [
args[0][3] for args in mock_hadoop_exploit_client.exploit.call_args_list
]

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
assert len(urls_passed_to_exploit) == 3

@cakekoa cakekoa force-pushed the 2136-hadoop-option-try-all-http-ports branch from 63ee0a4 to d3cd631 Compare February 21, 2023 16:05
@cakekoa cakekoa requested a review from mssalvatore February 21, 2023 16:13
@mssalvatore mssalvatore merged commit b6008e0 into 2136-refactor-scanning Feb 21, 2023
@mssalvatore mssalvatore deleted the 2136-hadoop-option-try-all-http-ports branch February 21, 2023 16:25
mssalvatore added a commit that referenced this pull request Feb 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants