# TTY Auditing User Keystrokes

**URL:** <https://discuss.elastic.co/t/tty-auditing-user-keystrokes/194000>\
**Category:** Beats\
**Tags:** auditbeat\
**Created:** [August 6, 2019, 11:57am UTC](https://discuss.elastic.co/t/tty-auditing-user-keystrokes/194000 "2019-08-06T11:57:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![SCL\_ADMIN](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/scl_admin/32/49037_2.png) [@SCL\_ADMIN](https://discuss.elastic.co/u/SCL_ADMIN)\
**Post date:** [August 6, 2019, 11:57am UTC](https://discuss.elastic.co/t/tty-auditing-user-keystrokes/194000/1 "2019-08-06T11:57:24Z")

</div>

Hello I've managed to get Auditbeats working a remote server and I have enabled user keystrokes

> **[Auditing User Keystokes in Linux to Maintain Security and Compliance](https://www.theurbanpenguin.com/auditing-user-keystrokes-in-linux/)**
>
> Having looked at the Linux Audit system we now turn to auditing user keystokes. Suspicious user activity can be focused upon giving you evidence yuou need

But I'm a bit lost in finding the entries showing the keystrokes when using the server as a user.

Do i need to need to point the audit logs or enable a setting in the module?

---

<div class="post-metadata">

**Author:** ![grants](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/grants/32/117040_2.png) [@grants](https://discuss.elastic.co/u/grants)\
**Post date:** [August 6, 2019, 3:39pm UTC](https://discuss.elastic.co/t/tty-auditing-user-keystrokes/194000/2 "2019-08-06T15:39:56Z")

</div>

I'd encourage you to look at the execve as an audit\_rule in the auditd section. TTY auditing keystrokes is great but it can capture secrets and also has gaps with a bash aliases. execve logs show what actually executes which is pure gold.

---

<div class="post-metadata">

**Author:** ![SCL\_ADMIN](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/scl_admin/32/49037_2.png) [@SCL\_ADMIN](https://discuss.elastic.co/u/SCL_ADMIN)\
**Post date:** [August 7, 2019, 4:20pm UTC](https://discuss.elastic.co/t/tty-auditing-user-keystrokes/194000/3 "2019-08-07T16:20:58Z")

</div>

do you have an example of using execve as an audit\_rule?

Many Thanks

---

<div class="post-metadata">

**Author:** ![andrewkroh](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/andrewkroh/32/3784_2.png) [@andrewkroh](https://discuss.elastic.co/u/andrewkroh)\
**Post date:** [August 8, 2019, 12:25am UTC](https://discuss.elastic.co/t/tty-auditing-user-keystrokes/194000/4 "2019-08-08T00:25:00Z")

</div>

Auditbeat includes an example rule that monitors `execve`. You should see that in `/etc/auditbeat/audit.rules.d/sample-rules.conf.disabled`. Any files in that directory ending in `.conf` should get loaded automatically with the default config. That file is in Github.

> <https://github.com/elastic/beats/blob/efd0ebb449dc5ca837ffae93d6fd59a01ee22a12/auditbeat/module/auditd/_meta/audit.rules.d/sample-rules-linux-64bit.conf#L7-L8>

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 29, 2019, 12:25am UTC](https://discuss.elastic.co/t/tty-auditing-user-keystrokes/194000/5 "2019-08-29T00:25:02Z")

</div>

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.
