Hacked!

1. Has someone got in and managed to delete all record of their activity apart from the reboot in dmesg?
If I'm going after your particular server I'd clean up if I get root.
Bots usually don't care.

As it was mentioned here there's no evidence in provided information you have been hacked. The user 'user' is rebooting the server.
Could've script kiddie got in ? Yeah, but not by attack you showed in the logs so far.

Now .. if you want to play games :)
Code:
mv /sbin/reboot /sbin/reboot.orig
touch /sbin/reboot
chown root:wheel /sbin/reboot && chmod 755 /sbin/reboot
Now edit the /sbin/reboot and put:
Code:
#!/bin/sh

LOG=/root/susreboot.log

(
echo "$(date): I was called to reboot by ${PPID}!"
ps auxd
w
) >> ${LOG}

sync
/sbin/reboot.orig $*
And when somebody does call it you'll have your info prior to reboot in /root/susreboot.log log.
 
... That'll take a few hours, I expect, especially since in the liveusb I don't seem to have pipes available so I'm having to use scroll lock and up arrows rather than less.
do yourself a favor and use mtree by issuing mtree -c -F mtree -k type,link,sha256 -p /boot > /tmp/boot.mtree.output and then compare it with
mtree -f /tmp/boot.mtree.output -p /boot on the other machine
 
out.png
 
Add a crowdsec agent to your pf as well to set rate limits to port scanners. Run the crowdsec lapi on the webserver. It can be fully automated.

/grandpa
 
Back
Top