Skip to content
This repository has been archived by the owner on Nov 9, 2018. It is now read-only.

check_state will not catch changes that don't change the total number of mounted file systems #18

Open
1 of 2 tasks
jaseg opened this issue Oct 8, 2017 · 2 comments
Open
1 of 2 tasks
Assignees
Labels
bug done requires testing A feature that has been completed, but requires more testing before being pushed to the code base enhancement

Comments

@jaseg
Copy link

jaseg commented Oct 8, 2017

canary.operating_system.helpers.check_state will fail to catch any change in mounted file systems that does not change the total number of mounted file systems (as seen by psutil).

  • Feature Request
  • Bug Report

Expected Behavior

Consider a laptop with usb-canary running during screen lock, and the screen being locked while a usb disk containing a single ntfs partition is attached and that partition is mounted. Automount is enabled.

Now consider an attacker unplugs the ntfs usb disk and plugs in another ntfs-formatted, single-partition usb-disk. This other disk is auto-mounted. Note that this is a common scenario when a device has limited USB ports available.

usb-canary should immediately raise hell.

Current Behavior

usb-canary will not notice anything happened provided the change happened quick enough between two checks (likely).

Possible Solution

Properly compare states. Compare more than just device name, mountpoint, filesystem type and options. At least also monitor:

  • Device path (usb port number and path through hubs)
  • Device serial number from USB descriptors
  • Filesystem UUID where available
  • Partition and device UUIDs where available
  • Other device parameters such as size and additional usb descriptor fields

Steps to Reproduce (for bugs)

(no poc provided)

Context

usb-canary at least on first glance looks like a security tool. Thus it should be secure.

Your Environment

This is independent of operating system.

@errbufferoverfl
Copy link
Owner

Hi @jaseg,

Thanks for submitting an issue, this has been put into the roadmap. Again thanks for taking the time to contribute to USB Canary.

@errbufferoverfl
Copy link
Owner

Began looking into this issue late last year, I believe I have a working improved solution, however along with changes to this I am making a number of other changes which may see the major increased.

@errbufferoverfl errbufferoverfl added the done requires testing A feature that has been completed, but requires more testing before being pushed to the code base label May 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug done requires testing A feature that has been completed, but requires more testing before being pushed to the code base enhancement
Projects
Development

No branches or pull requests

2 participants