Re: Track keyboard and mouse usage



So, how would I access /dev/input/ devices?
Can I just 'cat' them or read in those files?


Diez B. Roggisch wrote:
skip@xxxxxxxxx schrieb:
Diez> You could use the /dev/input/event* devices.

On the only Linux system I have available (Mojam's CentOS-based web server),
/dev/input/* are readable only by root. That doesn't seem like it would be
very useful to tools like watch unless they were to run suid to root
(creating other problems).

You don't need to give it root access. A simple rule for the udev that
looks like this:

KERNEL=="event[0-9]*", NAME="input/%k", MODE="0444"


will make the devices world readable. While I haven't thought about any
security implications that might have (and am not especially
knowledgeable in such things to be honest), I'm convinced it is way less
likely to introduce any exploitable holes than suid root would.

Diez

.



Relevant Pages

  • Re: Track keyboard and mouse usage
    ... Diez B. Roggisch wrote: ... On the only Linux system I have available, ... You don't need to give it root access. ... likely to introduce any exploitable holes than suid root would. ...
    (comp.lang.python)
  • Re: Root in FC-10
    ... Running as root all the tine ... >defeats most of the security of a Linux system. ... Virtually any exploitable point allows an escalation by way of further ... Becuase it is not just a "sandbox", ...
    (Fedora)
  • Re: fedora-list Digest, Vol 1, Issue 1394
    ... I have used wvdial - unwittingly though - through WEBMIN. ... then an suid root script to call wvdial is ... >> has to supply root password to connectto ISP. ...
    (Fedora)
  • Re: Changing roots password
    ... Hash: SHA1 ... > I just noticed on a new Linux system that we got at work that if you ... > as root when necessary or locking their workstations, ... Lew Pitcher, IT Consultant, Enterprise Data Systems ...
    (comp.unix.admin)
  • Re: Root in FC-10
    ... >defeats most of the security of a Linux system. ... However, this should not imply that just because there exists a possibility of escalation, we should not have multiple levels of security. ... exploit can be escalated to provide root level privileges, is it reasonable and logical to claim that not using root, is "safer" than using root. ...
    (Fedora)