Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide parity with Linux Audit system for logging real user identity in case sudo/sudo su is used (%user.auid property is needed) #318

Closed
alukyan opened this issue Jan 23, 2018 · 16 comments · Fixed by #1369

Comments

@alukyan
Copy link

alukyan commented Jan 23, 2018

When Falco is configured to log EXECVE calls it is not possible to track ID of actual executing user - %user.name returns root and %user.uid return 0.

But Linux auditing system always provides an identity of actual executing user via auid field.

So if user with ID = 1002 runs

$ sudo su
$ touch /bin/myfile12

the Falco log with rule

 - rule: All the commands executed by users
   desc: an attempt to run interactive commands by any user
   condition: spawned_process
   output: "User ran an interactive command (user=%user.name uid=%user.uid command=%proc.cmdline)"
   priority: INFO
   tags: [users]

looks like this

01:54:28.826846427: Informational User ran an interactive command (user=root uid=0 command=touch /bin/myfile12)

while audit record looks like this (note auid=1002 there) which makes it easy to correlate which user run this command as sudo and provide automated response if suspicious activity is spotted

type=SYSCALL msg=audit(1516672468.826:127058): arch=c000003e syscall=59 success=yes exit=0 a0=bea588 a1=be06c8 a2=bde008 a3=598 items=2 ppid=15394 pid=15407 auid=1002 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=pts1 ses=1811 comm="touch" exe="/bin/touch" key=(null)
type=EXECVE msg=audit(1516672468.826:127058): argc=2 a0="touch" a1="/bin/myfile12"
type=PATH msg=audit(1516672468.826:127058): item=0 name="/usr/bin/touch" inode=46 dev=08:01 mode=0100755 ouid=0 ogid=0 rdev=00:00
@alukyan alukyan changed the title Provide parity with Linux Audit system for logging real user identity in case sudo/sudo su is used (auid property) Provide parity with Linux Audit system for logging real user identity in case sudo/sudo su is used (%user.auid property is needed) Jan 23, 2018
@jaguasch
Copy link

related?

added loginuid on execve event by @arossert

draios/sysdig#1008

@mfdii
Copy link
Member

mfdii commented Mar 6, 2018

@mstemm are we pulling in the changes from draios/sysdig#1008 to address this issue?

@mebezac
Copy link

mebezac commented Apr 10, 2018

This would be great to have!

@mstemm
Copy link
Contributor

mstemm commented Aug 29, 2018

draios/sysdig#1189 is an updated version of the changes that will address this feature.

@mstemm
Copy link
Contributor

mstemm commented Sep 5, 2018

The PR is merged. I'm going to keep this falco issue open until I also update the ruleset to take advantage of user.loginuid and user.loginname.

@leodido
Copy link
Member

leodido commented Jun 11, 2019

Hey @mstemm what's the state of this?

@mstemm
Copy link
Contributor

mstemm commented Jun 12, 2019

We haven't updated the rules yet to take advantage of the changes in draios/sysdig#1189, so we should keep it open.

@stale
Copy link

stale bot commented Aug 11, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Aug 11, 2019
@mstemm
Copy link
Contributor

mstemm commented Aug 12, 2019

We should keep this on the roadmap.

@stale stale bot removed the wontfix label Aug 12, 2019
@stale
Copy link

stale bot commented Oct 11, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Oct 11, 2019
@leodido
Copy link
Member

leodido commented Oct 11, 2019 via email

@stale stale bot removed the wontfix label Oct 11, 2019
@stale
Copy link

stale bot commented Dec 10, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Dec 10, 2019
@xaocon
Copy link

xaocon commented Dec 12, 2019

I don't want to tell you guys to work on but I think it's a pretty important issue to be closed automatically so I'm going to bump.

@stale stale bot removed the wontfix label Dec 12, 2019
@stale
Copy link

stale bot commented Feb 10, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the wontfix label Feb 10, 2020
@stale stale bot closed this as completed Feb 17, 2020
@csschwe
Copy link
Contributor

csschwe commented Aug 25, 2020

I think this issue is important.

Looks like the simplest solution would be to find any user=%user.name and replace with user=%user.name user_loginuid=%user.loginuid

I can should be able to provide a pull request if this is ok?

@drewblas
Copy link

Agreed. This is still important and a pretty naive oversight for a security product. Would love to see it fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants