Skip to content

feat(modules): add zookeeper and hadoop namenode exposure modules#262

Open
TBX3D wants to merge 1 commit into
vmfunc:mainfrom
TBX3D:feat/hadoop-zookeeper-exposure-modules
Open

feat(modules): add zookeeper and hadoop namenode exposure modules#262
TBX3D wants to merge 1 commit into
vmfunc:mainfrom
TBX3D:feat/hadoop-zookeeper-exposure-modules

Conversation

@TBX3D

@TBX3D TBX3D commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

modules/recon/zookeeper-admin-exposure.yaml flags an exposed apache zookeeper adminserver over /commands/monitor, keyed on the "command":"monitor" response envelope paired with the server_state field, then extracts the version; the adminserver (default port 8080 since 3.5) has no auth on its read commands, leaking the ensemble role, connection counts and data size. modules/recon/hadoop-namenode-exposure.yaml flags an exposed hadoop hdfs namenode jmx interface over /jmx?qry=Hadoop:service=NameNode,name=NameNodeInfo, keyed on that bean name paired with the LiveNodes and DeadNodes attributes, then extracts the software version; the namenode jmx is anonymous unless kerberos spnego is configured, and LiveNodes carries every datanode's internal hostname.

build/vet/lint clean, go test ./internal/modules/ green (the two modules end to end via ExecuteHTTPModule, real-hit and near-miss cases).

add two recon modules detecting anon-by-design big-data control surfaces that leak operational topology:

- zookeeper-admin-exposure (medium): probes /commands/monitor on a zookeeper adminserver and matches the command/monitor envelope plus server_state; the adminserver has no auth on reads, so an open one discloses the version, ensemble role, connection counts and data size, while a firewalled or disabled adminserver is not reachable; extracts the version

- hadoop-namenode-exposure (medium): probes /jmx for the NameNodeInfo bean and matches the bean name plus LiveNodes/DeadNodes; the namenode jmx is unauthenticated unless kerberos spnego is set, so an open one discloses the hdfs version and every datanode internal hostname, while a kerberos-secured namenode returns 401; extracts the software version

trino/presto were dropped: /v1/info is ResourceSecurity(PUBLIC) so it answers on secured clusters too and would be a fingerprint, not an exposure.

both modules carry hard-test coverage with N-1 anchor traps (a non-monitor zookeeper command and a non-NameNodeInfo hadoop bean stay quiet), cross false-positive guards both ways and a secured-instance status case.
@TBX3D TBX3D requested a review from vmfunc as a code owner June 26, 2026 08:27
@github-actions github-actions Bot added size/l <500 lines changed modules changes to scan modules tests test changes labels Jun 26, 2026
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@96092da). Learn more about missing BASE report.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #262   +/-   ##
=======================================
  Coverage        ?   53.23%           
=======================================
  Files           ?       81           
  Lines           ?     6852           
  Branches        ?        0           
=======================================
  Hits            ?     3648           
  Misses          ?     2938           
  Partials        ?      266           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions

Copy link
Copy Markdown

pr summary

3 files changed (+208 -0)

category files
go source 1
tests 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

modules changes to scan modules size/l <500 lines changed tests test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants