My current firewall: http://pastebin.com/zEYS0XfA
When I disconnect the internet completely there aren't any attempted outgoing connections. When the link is back up, there are numerous inbound attempts to connect to protected services on ports 1433, 3389, 5000, 23, 21, 22, etc. That's not such a big deal as I have seen this type of traffic since I've been using Wireshark. I've concluded that everyone who is an attacker is always going to attack vulnerabilities. With there being so many of them, the traffic will be non-stop. So I've blocked just about every port possible, so much so that my normal traffic suffers from limitations. But there is one persistent attacker which seems to have infiltrated my Linux PC and possibly the Windows PC that it protects.
All traffic from this attacker seems to be obfuscated with some kind of overlaying traffic. tcpdump is almost useless in this scenario as I have no idea what port the traffic is coming in through or if at all. The reason I believe this is because psad (port scan attack detection) detects the attacker and blocks the traffic but the port and source address that gets blocked is completely different than the port and address that's advertised in the system logs. The port and addresses that do get reported are outgoing whois lookups through TCP port 43 and to whois server addresses. I tried capturing traffic to all of the ports above in addition to singling out port 43 but while there is always some traffic on the above ports there is no detectable traffic on port 43 or to any of the whois addresses.
There is no trace of port 43 in netstat. I've tried unhide-tcp, unhide-linux26 proc, unhide-linux26 dev, unhide-linux26 brute and nothing shows up anywhere.
There were a few files with user "10" and group "14".
It's possible those numbers belong, to a user and group I've deleted for their vulnerabilities in the past or, to an attacker. I believe it to belong to an attacker because "all" of the user's owned programs had the SUID or group bits set.
I have removed the SUID's from the executables but the attack is still going on. I could probably just change my IP and it will likely go away if there isn't some hidden backdoor installed. But if I do that I will not be able to troubleshoot the problem and stop it from occurring again.
My next steps are to lock down the PC with Selinux or some other MAC style access control and harden the OS further. Slackware doesn't support Selinux or Apparmor. And the current version of grsecurity seems a bit too out of date. I might just be brave enough to compile the latest stable kernel with grsecurity's latest stable kernel "test patch." If I'm unable to compile and enable any of these security measures in the kernel properly then I may have to leave Slackware for CentOS or some other security enabled distro like Gentoo.
I believe this attack to have been started after having visited and used GRC's Shield's Up.
2 minutes later 5 outbound attempts to port 43 occurred. An hour later, outbound attempts to connect from my PC to various places and various protected ports including port 22, 135, 139, 5060 and a bunch of others occurred. Then port 43 seemed to have been selected as the best vulnerable port because next thousands of attempts occurred outbound to that port.
Update: I've reinstalled Slackware's binaries. After doing so, the user 10 and group 14 with SUID set in certain binaries returned. Apparently, the binaries ship in this vulnerable state. The attack is still currently in progress.
Update: I'm moving to Gentoo. Slackware is great but the security options are lacking.
Edited by gmeruser123, 05 March 2014 - 01:00 AM.