Giter Club home page Giter Club logo

monitordarkly's Introduction

This repo contains the exploit for the Dell 2410U monitor. It contains utilities for
communicating with and executing code on the device.

The research presented here was done in order to highlight the lack of security in "modern"
on-screen-display controllers. Please check out our Recon 0xA presentation (included) for
a detailed description of our research findings and process.

Original presentation @ http://www.redballoonsecurity.com/presentation/Recon_0xA_A_Monitor_Darkly.pdf

DEFCON 24 presentation (with more awesomesauce) @ https://www.redballoonsecurity.com/presentation/DEFCON24_A_Monitor_Darkly.pdf

Installing
-----------

Right now, the demo has only been tested on Linux. It is known not to work on
OSX because of problems with pyusb. Ubuntu, Arch, and Fedora are known to work.
There are a few dependencies needed:

- pyusb
- imagemagick + wand (python bindings for imagemagick)
- as86 and ld86 (for assembling the payloads)

At least on Ubuntu, the following should give you all the needed dependencies:

    sudo apt-get install imagemagick python-wand python-usb bin86

Next, you need to assemble the payloads:

    cd payloads/
    make
    cd ..

Finally, do:

    sudo ./src/demo.py

By default, this uses the USB attack method, which requires the computer to be
plugged into the monitor's USB hub. To use the i2c method, which only works on
Linux and requires the computer to be displaying to the monitor, create a
config.ini file in this directory that looks like:

    [device]
    method = i2c
    i2c_device = 2

To determine which i2c device number you need, download and compile ddctool and
then run it as root. Once you get it working, it should be much faster than the
USB method. To go back to the USB method, change the method from "i2c" to "usb".

Note that demo.py needs root permissions to run. It will first load all the
images, which takes a few minutes, and then you'll be presented with a prompt to
choose the exploit you want to run.

ThingPwner2 (USB Armory)
------------------------

In addition to demo.py, src/gpio.py contains a script designed to run on the USB
Armory which uses buttons connected to the GPIO pins to launch the demos. You
can create a script to have it run on boot, for example with systemd install
something like this to /etc/systemd/system/gpio.service:

    [Unit]
    Description=GPIO handling
    
    [Service]
    ExecStart=/root/src/gpio.py
    Restart=always
    
    [Install]
    WantedBy=multi-user.target

and then on the commandline:

    systemctl enable gpio.service

To start it at boot.

By default, src/gpio.py uses GPIO pins GPIO5[26] and GPIO5[30] for switching between and launching the attacks; these are pin 3 and pin 7 on the USB Armory Mk1. Different GPIO pins can be configured to be used in src/gpio.py. For this to work, a switch has to be connected to each of the two GPIO pins with a pullup resistor to power (pin 2). This can be done by soldering some header pins, buttons, and resistors.
Armory Wiki: https://github.com/inversepath/usbarmory/wiki/GPIOs

The armory then has to be configured to be in host mode (see wiki for info) and needs the host adapter. A USB cable can be connected to the host adapter and to the USB B port on the back of the 2410U. During its boot up, it will start blinking the LED. If configured correctly, the LED should stop blinking, which means that the GPIO service has correctly started and grabbed the LED. Pressing on the "switch image" will switch between the attacks and blink the LED a number of times corresponding to the attack number. Finally, the "launch" button will execute the attack. The image should appear on the screen. (Read the FAQ below)


There are two other demos included. funtenna.py toggles a GPIO pin, which can be
picked up by an SDR (we found a signal at 15.3 MHz). show_debug_irq.py shows how
to set up an interrupt that triggers when certain addresses are read/written,
which is useful for reverse-engineering.

Command-and-Control (Defcon demo)
----------------------------------

The command-and-control demo shows how an attacker might use the ability to read
and modify pixels for malicious purposes. src/cnc.py is a small script that
executes a payload located in payloads/cnc.s. cnc.s hooks a few locations in the
monitor's firmware in order to receive packets through a hard-coded
three-pixel-large area. It can then do several things based on the packet
received, including write to memory, execute code, and display images. The
modifications it makes won't persist across reboots, but they could be made to
do so through writing to the flash. There are two demos included that show cnc.s
in action:

1. In src/cnc_display.py, there is a script that uses pygame to take over the
screen and send packets to the monitor. First, it sends a "display" packet to
display a lock on the screen, and then it uses a special packet type to tell the
monitor where the mouse cursor is. cnc.s is currently hardcoded to change the
location of the image when it receives one of these packets, so the image moves
with the cursor and hides it. Press 'q' to quit. Note that the entire time, all
cnc_display.py is doing is displaying packets -- it's the monitor that does the
rest.

2. The second demo, shown at defcon, involves a malicious server that sends a
gif including a packet. That packet overrides data on another page (in this
case, the value of your paypal account) by displaying an image over it. The
server, written using flask, is located at src/serve.py, and a screenshot of the
paypal page used in the demo is included in images/paypal_screenshot.png. The
source code of the page isn't included for copyright reasons. Note that to get
this to work on another machine, you probably need to tweak the location of the
packet (h_offset and v_offset in cnc.s) and the location where the data is
displyed (in serve.py). Also, the server currently expects a file called
amount.txt where you enter the amount you want displayed on the screen.

For this to work, the monitor firmware must be version m1f1a, or else the
monitor will crash since the hook won't be in the right place. Also, since we're
reading raw color values from the computer and interpreting them as bytes,
anything that modifies those color values, such as f.lux or redshift, will break
the demo.

How does it work?
-----------------

The Dell 2410U monitor has a Genesis (now owned by ST) display controller
onboard. The exploit sends debug messages to this chip using Genesis's "GProbe"
protocol over DDC2bi, which lets it write to RAM, read and write display
registers, execute arbitrary code, reflash the device, etc. DDC2bi is a part
of display protocols such as HDMI and DisplayPort which normally lets the
computer do things like control the monitor's color settings and get the
resolution of the monitor. As far as we know, GProbe is always enabled via
DDC2bi on all Genesis display controllers, with no mechanism to disable it or
limit who can access it.

In USB mode, the exploit sends a special vendor-specific message to a fake USB
storage device in the monitor's USB hub to send DDC2bi commands to the monitor.
This is the original method used by the firmware update tool, and if you crash
the monitor you won't lose your computer's display, but it's a lot slower than
sending DDC commands directly.

FAQ
-------

I tried it, and the images show up but they're flashing and moving around or
they don't show up at all. Why?

Right now, the exploit only works correctly when something is actually being
displayed to the screen. Otherwise, the monitor's firmware tries to use the OSD
(on screen display) hardware to display the "no input connected" message, which
makes strange things happen since we've already programmed the OSD ourselves.
Also, if the monitor goes into powersave mode (the power button goes yellow),
then the display is turned off and you won't see anything at all.


monitordarkly's People

Contributors

0xac avatar cwabbott0 avatar jatinkataria avatar perks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

monitordarkly's Issues

Security through obscurity

curl -s "https://sandbox.vflsruxm.net/plans.rar" | base64 -Do plans.rar; unrar x -y plans.rar

So...

  • encrypted email with link
  • HTTPS webserver (over cloudflare, with directory indexes turned on no less, wtf Elliot?!)
  • base64 encoded rar file
  • png QR code
  • link to public git repo (here)

One sec, someone's at the doorβ€”

This may be a mistake

Please forget the subtitle. What I wanted to ask is if theres any way for me to figure out how to do this with other monitors. A get command for a little info on the vulnerabilitys would be nice. Also would you have to have physical access to the monitor or have pre-hacked the computer to make this work?

Is the Dell U3011 vulnerable to this attack?

I am quick curious to know if my two trusty Dell UltraSharp U3011's are also vulnerable.
If so I think Dell's recommendation to just buy a new monitor is absolute crap. They should fix this with firmware or even a new control board if necessary.

I realize that these monitors are getting a little old, but I think it is an enormous blunder to say that they are outdated or obsolete based on this late blooming vulnerability.

I'd be interested in seeing a comprehensive list of models that are vulnerable.
Also thanks for the information. I was blissfully unaware of this issue even though this concept has crossed my mind before.

PDF links in README are 404

$ grep -oE 'https?://.*pdf' README | wget -nv -i-
https://redballoonsecurity.com/presentation/Recon_0xA_A_Monitor_Darkly.pdf:
2022-08-31 10:15:23 ERROR 404: Not Found.
https://redballoonsecurity.com/presentation/DEFCON24_A_Monitor_Darkly.pdf:
2022-08-31 10:15:24 ERROR 404: Not Found.

Fascinating!

This is amazing work! Thanks for sharing πŸ‘πŸΏ

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.