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:

March 2024

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