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

snoopy for chroot #267

Open
hatamiarash7 opened this issue Feb 12, 2024 · 3 comments
Open

snoopy for chroot #267

hatamiarash7 opened this issue Feb 12, 2024 · 3 comments

Comments

@hatamiarash7
Copy link

How can I use Snoopy for restricted SSH access like the chroot? Can you help me? The normal installation on the host does not collect logs for this type of user.

I have these groups:

  • admin users ( snoopy worked )
  • normal users ( snoopy worked )
  • restricted users / chroot ( snoopy not worked )
@bostjan
Copy link
Member

bostjan commented Feb 12, 2024

Processes within chroot are limited to seeing whatever is inside that chroot. This means that if there aren't /etc/ld.so.preload and .../libsnoopy.so (and snoopy.ini) files in their correct locations inside chroot, preloading Snoopy inside chroot will not work.

@hatamiarash7
Copy link
Author

I tried all these and it didn't work. The following files are currently available:

  • /<CHROOT DIR>/etc/ld.so.preload
  • /<CHROOT DIR>/etc/snoopi.ini
  • /<CHROOT DIR>/var/log/auth.log
  • /<CHROOT DIR>/lib/x86_64-linux-gnu/libsnoopy.so

@bostjan
Copy link
Member

bostjan commented Sep 8, 2024

(Pardon for a slight delay in my responses.)

At this point, it would be best to use the strace tool and compare a working Snoopy trace (outside chroot) with a non-working one (inside chroot). That way, you'll see where the actual issue lies (i.e. does the dynamic loader read the correct ld.so.preload file, is libsnoopy.so loading actually attempted etc.

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

No branches or pull requests

2 participants