Skip to content

Instantly share code, notes, and snippets.

@lukechilds
Last active May 28, 2018 01:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lukechilds/7f7447cc51f88d2ce105aaf5e3c759a3 to your computer and use it in GitHub Desktop.
Save lukechilds/7f7447cc51f88d2ce105aaf5e3c759a3 to your computer and use it in GitHub Desktop.
BarterDEX GUI Insecure Content Vulnerability

BarterDEX GUI Insecure Content Vulnerability

It's important with any app, but especially desktop apps, to load all external content over a secure connection. If you use an insecure connection it's trivial from someone to perform a man in the middle (MITM) attack and inject their own content. In my proof of concept I MITM my own machine locally, but it's important to understand that this attack can be pulled off by anyone inbetween the user and the destination server. For example, anyone on the same WiFi or LAN, an employee at an ISP or data center, or any malicious party inbetween.

The Vulnerability

The BarterDEX GUI loads a webfont stylesheet (http://fonts.googleapis.com/css?family=Open+Sans) over an insecure connection. You can perform a MITM attack and inject arbitrary CSS that will be rendered by the app. Example below:

barterdex-insecure-ssl-small

This isn't an XSS vulnerability because you can't inject JavaScript, only CSS. However it's not just limited to visual defacing like in my PoC, you can get pretty creative with CSS and still pull off some scary attacks such as:

  • Read data from the page
  • Steal CSRF tokens
  • Implement a keylogger
  • Trick users into clicking whatever you want

Sources:

The Solution

The external stylesheet should be loaded over a secure connection.

@lukechilds
Copy link
Author

Fixed in this PR: KomodoPlatform/BarterDEX#241

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment