Git Product home page Git Product logo

qubes-screenshooter's Introduction

qubes-screenshooter

LeakProof screenshot tool for Qubes OS

Features

  • Remove EXIF info from image (OPSEC)
  • Automatically strip window borders, to prevent leaking VM name and border color (OPSEC)
  • Detect active window VM, and save screenshot on this VM
  • Save image into ~/QubesIncomming/dom0/ on target VM
  • Copy image into target VM clipboard, so a simple Ctrl+V in rich text editors is enough

Usage

Print shortcut:

Take screenshot of active window

  1. Take screenshot of current active window (foreground)
  2. Remove EXIF info from image (OPSEC)
  3. Strip window border, to prevent leaking VM name and border color (OPSEC)
  4. Save it into active window's VM (e.g: if window is from vault VM, screenshot is automatically saved in this VM

Ctrl+Print shortcut:

Take screenshot of selected region

  1. Select a region to be captured by clicking a point of the screen
  2. Remove EXIF info from image (OPSEC)
  3. Prompt user a list of running VMs
  4. Save image into chosen VM

Installation:

In a terminal on <src-vm> (any Qube with internet access):

# download qubes-screenshooter as zip
wget github.com/nil0x42/qubes-screenshooter/archive/master.zip -O /tmp/qubes-screenshooter.zip

In a terminal on dom0:

# open root shell, to be able to write to /opt (otherwise, you can copy to another location)
sudo -s
# copy zip file from <src-vm> to dom0's /opt directory
qvm-run --pass-io <src-vm> 'cat /tmp/qubes-screenshooter.zip' > qubes-screenshooter.zip
unzip qubes-screenshooter.zip
mv "qubes-screenshooter-master/" /opt

Open Keyboard Settings (on Qubes OS GUI):

  • Click on Main Menu (top-left Qubes OS icon)
    • Select System Tools
      • Select Keyboard
        • Open Application Shortcuts tab
  • Add the following shortcuts:
    • Print
      • xfce4-screenshooter -m -w -o /opt/qubes-screenshooter/send-screenshot-to-active-vm
    • Ctrl+Print
      • xfce4-screenshooter -r -o /opt/qubes-screenshooter/send-screenshot-to-chosen-vm

Dependencies & Third-party tools

qubes-screenshooter must run on dom0 to be able to take screenshots, because GUI runs on dom0.

qubes-screenshooter is basically a set of 2 perl scripts, making use of many pre-installed tools:

  • xfce4-screenshooter is the default xfce screenshot tool. It is the actual tool used to take screenshots, before giving ownership to qubes-screenshooter.
  • ImageMagick (provides mogrify), allows stripping EXIF info & window borders from image before sending screenshot.
  • zenity is used to display VM choice GTK+ dialog
  • notify-send is used to display notification of sent screenshot

**IMPORTANT:

The copy image to cpipboard feature depends on xclip being installed on target VMs. So you should install it on all VMs if you want it working**

qubes-screenshooter's People

Contributors

nil0x42 avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

qubes-screenshooter's Issues

Fix copying to clipboard

Thanks for the cool project and very clear documentation.

While trying to get it working, I noticed that it took screenshots and moved them into the target VM perfectly, but didn't copy them to the clipboard. I tried debugging the qvm-run command manually, but eventually found the issue on this line

my $remotepath = "$ENV{HOME}/QubesIncoming/dom0/${filename}";

This should use ~ instead of $ENV{HOME}, as $ENV{HOME} evaluates to /home/[the dom0 username], but this doesn't necessarily exist in the target vm.

Example command that runs under qvm-run (typically with username "user"):

  • xclip -sel c -t image/png /home/qubes-user/QubesIncoming/dom0/screenshot.png, vs
  • xclip -sel c -t image/png ~/QubesIncoming/dom0/screenshot.png

With this change, it works. Hopefully this information can help others.

Command I used for testing

  • xclip -sel c -o | file -

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.