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

AI PRP: Request Slurm Exposed UI & API #423

Open
maoning opened this issue Mar 18, 2024 · 13 comments · May be fixed by #496
Open

AI PRP: Request Slurm Exposed UI & API #423

maoning opened this issue Mar 18, 2024 · 13 comments · May be fixed by #496
Assignees
Labels
ai-bounty-prp Identify an AI bounty plugin Contributor main The main issue a contributor is working on (top of the contribution queue). PRP:Accepted

Comments

@maoning
Copy link
Collaborator

maoning commented Mar 18, 2024

https://github.com/projectdiscovery/nuclei-templates/blob/f08351ccb2366033c49f23e2c07550d0e464618f/http/misconfiguration/slurm-hpc-dashboard.yaml#L4

Please verify the exposed UI via callback or other actions rather than simple regex matches.

Please read the rules of engagement first at #409.

@maoning maoning added help wanted Extra attention is needed ai-bounty-prp Identify an AI bounty plugin labels Mar 18, 2024
@lanced00m
Copy link
Contributor

@maoning Can I write a tsunami plugin for this?

@maoning
Copy link
Collaborator Author

maoning commented Apr 2, 2024

@lanced00m please reminds me once you finish the plugin implementation for #412 .

@lanced00m
Copy link
Contributor

@maoning I already wrote the plugin for #412 can I work on this now?

@lanced00m
Copy link
Contributor

@maoning

My first PR is merged could you assign this PR to me?

@maoning maoning added PRP:Accepted and removed help wanted Extra attention is needed labels May 13, 2024
@maoning
Copy link
Collaborator Author

maoning commented May 13, 2024

Here are the tasks for this requests before starting the implementation:

  • Conduct vulnerability research with a brief description of how the plugin would work
  • Submit the vulnerable configuration of the target application to google/security-testbeds.
  • Please submit our participation form

@lanced00m
Copy link
Contributor

after a lot of research on Slurm architecture, I'm sharing what I know about this framework:
Slurm has a REST API and it must contain an authentication method.
slurmctld and slurmdbd can be exposed but these two only accept data with TCP connections, after reading TCP connections from Wireshark I'm sure that the slurmctld ( the command that we can run our bash scripts or jobs) first should connect to slurmdbd and get authentication key from a host and then use that to it connects to a different host which this makes the exploitation even harder :)
I have other submissions, I will be happy if you let me work on those as it is not feasible for me to continue working on this plugin.

@maoning
Copy link
Collaborator Author

maoning commented May 20, 2024

Thank you @lanced00m for the detailed investigation. Do you know if getting the authentication key indicates immediate compromise? If so, we can trigger the detection that way (without reaching to a different host for command execution).

@lanced00m
Copy link
Contributor

OK, I will work on this, it can take time in terms of reading the wireshark logs :))

@lanced00m
Copy link
Contributor

a secret key exists on each host that the slurm client CLI should run, so we should have this secret key which means we should have access to a slurmd cluster and it is not possible.

But... I found out that the REST API authentication can be ignored by Authentication proxies according to their official example and documents!

here is the reference: https://slurm.schedmd.com/rest.html#auth_proxy
Also according to the last paragraph of the reference, there is a slurm ecosystem based on docker slurm. I can use something similar to it to proxy the authentication and disable the authentication with the help of the proxy.
if you allow me I can start writing the plugin this week.

there is a way to disable the REST API authentication but I couldn't do it because the documentation doesn't mention this explicitly and a lot of bugs :)) happened when I changed the configuration. I should not spend my time on this part anymore because an authentication proxy can exist and we can have an easy-to-use setup to have an unauthenticated slurm REST API access.

@lanced00m
Copy link
Contributor

lanced00m commented May 27, 2024

I just made a PR for testbeds: google/security-testbeds#59

@lanced00m
Copy link
Contributor

@maoning, it has been over two weeks since I last wrote a plugin. Could you please accept this as soon as possible?

@maoning
Copy link
Collaborator Author

maoning commented Jun 4, 2024

@lanced00m Thanks for the detailed vuln research, you can go ahead with the plugin implementation for exposed Slurm API.

@lanced00m lanced00m linked a pull request Jun 6, 2024 that will close this issue
@lanced00m
Copy link
Contributor

the PR: #496

@tooryx tooryx added the Contributor main The main issue a contributor is working on (top of the contribution queue). label Jul 19, 2024
@tooryx tooryx linked a pull request Jul 26, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ai-bounty-prp Identify an AI bounty plugin Contributor main The main issue a contributor is working on (top of the contribution queue). PRP:Accepted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants