exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Realms Wiki Insecure Transport

Realms Wiki Insecure Transport
Posted Mar 26, 2015
Authored by Javantea

Realms Wiki uses insecure transport during install and due to this an attacker in a privileged position could achieve remote code execution.

tags | advisory, remote, code execution
SHA-256 | 4f568ca2e277c33afd5ba0f09e55744f8174cc394efff4f5d14d96ff8cdee252

Realms Wiki Insecure Transport

Change Mirror Download
Remote Code Execution in realms-wiki install.sh
by Javantea
Mar 15, 2015

Product: Realms Wiki
Website: http://realms.io/
Github: https://github.com/scragg0x/realms-wiki
CVSS Score: 7.9 (AV:A/AC:M/Au:N/C:C/I:C/A:C)

On line 20 of realms-wiki install.sh, a GPG key that is requested via HTTP is added to the apt keyring. A remote attacker that has a man-in-the-middle (via ARP spoof, DNS spoof, or HTTP man-in-the-middle) against the person running install.sh can use this to sign arbitrary packages that are installed. This gives the remote attacker root privileges on the affected machine.

install.sh:20:
wget -qO - http://packages.elasticsearch.org/GPG-KEY-elasticsearch | sudo apt-key add -

This line of code was probably copied and pasted from someone else's code. Even if you don't run Realms Wiki, you may have run this code when you installed a different project. As you can see, this key is being used all over the place.
https://github.com/search?q=GPG-KEY-elasticsearch&type=Code&utf8=%E2%9C%93

It seems to affect more than just Ubuntu and Debian systems, some people import the same key into RedHat's keyring. Gentoo and RedHat-derived systems running Realms Wiki appear to be unaffected.

While many vendors consider this attack theoretical, let me ensure you that it is practical and easily accomplished in a datacenter, a broadband network, or a wireless network. Practically any person that runs install.sh as root can be compromised.

The CVSS score for this vulnerability is inflated beyond its actual impact. Even though this is remote code execution, the attacker has to be in place during the installation which limits the window of attack considerably. This doesn't mean that this attack isn't a serious issue.

Disclosure Timeline:
Found: Sun, Mar 15, 2015
Reported to author: Sun, Mar 15, 2015
Full Disclosure: Thu, Mar 25, 2015

I have chosen to release after 10 days because I have heard no response from the author. I do not wish to give attackers any further window to exploit these vulnerabilities. Therefore I am using full-disclosure to warn users that their sites can be CSRFed and if they install it when an attacker has a man-in-the-middle, their entire system can become compromised. I am also posting the CSRF vulnerability along with this (which is higher severity due to the lower difficulty in exploitation).

Thanks to those who have written this wiki. It's well-written and will need some bug fixes. I plan on making many improvements to this wiki in the future.

Regards,
Javantea


Login or Register to add favorites

File Archive:

July 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Jul 1st
    27 Files
  • 2
    Jul 2nd
    10 Files
  • 3
    Jul 3rd
    35 Files
  • 4
    Jul 4th
    27 Files
  • 5
    Jul 5th
    18 Files
  • 6
    Jul 6th
    0 Files
  • 7
    Jul 7th
    0 Files
  • 8
    Jul 8th
    28 Files
  • 9
    Jul 9th
    44 Files
  • 10
    Jul 10th
    24 Files
  • 11
    Jul 11th
    25 Files
  • 12
    Jul 12th
    11 Files
  • 13
    Jul 13th
    0 Files
  • 14
    Jul 14th
    0 Files
  • 15
    Jul 15th
    0 Files
  • 16
    Jul 16th
    0 Files
  • 17
    Jul 17th
    0 Files
  • 18
    Jul 18th
    0 Files
  • 19
    Jul 19th
    0 Files
  • 20
    Jul 20th
    0 Files
  • 21
    Jul 21st
    0 Files
  • 22
    Jul 22nd
    0 Files
  • 23
    Jul 23rd
    0 Files
  • 24
    Jul 24th
    0 Files
  • 25
    Jul 25th
    0 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

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close