Miscellaneous Techniques

Passive Traffic Capture

If tcpdump is installed, unprivileged users may be able to capture network traffic, including, in some cases, credentials passed in cleartext.

tcpdump -i 1 -w .d.pcap -s 0 'not tcp port 22' &

Examine data - Tools

net-creds
PCreds
BruteShark
CredSLayer
NetMiner - Free Version

Weak NFS Privileges

NFS (2049, 111)

When an NFS volume is created, various options can be set:

Option
Description

root_squash

If the root user is used to access NFS shares, it will be changed to the nfsnobody user, which is an unprivileged account. Any files created and uploaded by the root user will be owned by the nfsnobody user, which prevents an attacker from uploading binaries with the SUID bit set.

no_root_squash

Remote users connecting to the share as the local root user will be able to create files on the NFS server as the root user. This would allow for the creation of malicious scripts/programs with the SUID bit set.

Create a SETUID binary that executes /bin/sh using our local root user. We can then mount the /tmp directory locally, copy the root-owned binary over to the NFS server, and set the SUID bit

References

Example

Hijacking Tmux Sessions

MySQL running as root

The MySQL service is running as root

Last updated