Skip to content

Commit 38f81e0

Browse files
committed
Fixing documentation, adds more reliable cmd_exec
1 parent 94bd9ee commit 38f81e0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

documentation/modules/exploit/linux/local/ndsudo_cve_2024_32019.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
## Vulnerable Application
22

3-
The `ndsudo` is a tool shipped with Netdata Agent. The version v1.45.0 and below contain vulnerability, which allows an attacker to gain privilege escalation using `ndsudo` binary. The vulnerability is untrusted search path, when searching for additional binary files, such as `nvme`. An attacker can create malicious binary with same name and add the directory of this binary into `$PATH` variable. The `ndsudo` will trust the first occurence of this binary and execute it.
3+
The `ndsudo` is a tool shipped with Netdata Agent. Versions v1.45.0 and below contain a vulnerability, which allows an attacker to gain privilege escalation using the `ndsudo` binary. The vulnerability is an untrusted search path. When searching for additional binary files, such as `nvme`, an attacker can create a malicious binary with same name and add the directory of this binary into the `$PATH` variable. The `ndsudo` will trust the first occurrence of this binary and execute it.
44

55
Installation steps:
66

@@ -30,7 +30,7 @@ A path where malicious `nvme` binary will be stored. This path will be later pre
3030

3131
### NdsudoPath
3232

33-
A path to `ndsudo` binary.
33+
The path to the `ndsudo` binary.
3434

3535

3636
## Scenarios

modules/exploits/linux/local/ndsudo_cve_2024_32019.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,6 @@ def exploit
7676

7777
vprint_status('Executing..')
7878

79-
cmd_exec("PATH=#{base_dir}:$PATH #{datastore['NdsudoPath']} nvme-list")
79+
cmd_exec("PATH=#{base_dir}:$PATH '#{datastore['NdsudoPath']}' nvme-list")
8080
end
8181
end

0 commit comments

Comments
 (0)