Hi gang,
I recently setup a coppermine gallery for a group called ScoutLink, which is a international group of scouts who know each others through the internet.
The cpg was taken offline by the admin of the server where we are hosted because apparently there was a perl script run through our cpg setup.
I installed the latest stable and had some plugins there. Captcha - Contact - Fullsize control - Onlinestats - Updatestats. Running the classic theme with the horizontal filmstrip.
Our server admin provided the following log file
apache 9491 1 0 May10 ? 00:00:00 /usr/bin/perl /tmp/dp
11457
irc.dalnet.ru 6667
leeuwarden ~ # lsof -p 9491
COMMAND PID USER FD TYPE DEVICE SIZE NODE
NAME
perl 9491 apache cwd DIR 8,24 4096 5016680
/scoutlink.net/users/www/pictures.scoutlink.net
perl 9491 apache rtd DIR 8,21 4096 2 /
perl 9491 apache txt REG 8,21 1169776 250999
/usr/bin/perl5.8.8
perl 9491 apache mem REG 0,0 0
[heap] (stat: No such file or directory)
perl 9491 apache mem REG 8,21 107378 961231
/lib/ld-2.3.5.so
perl 9491 apache mem REG 8,21 101521 961248
/lib/libpthread-0.10.so
perl 9491 apache mem REG 8,21 84688 961150
/lib/libnsl-2.3.5.so
perl 9491 apache mem REG 8,21 11240 961233
/lib/libdl-2.3.5.so
perl 9491 apache mem REG 8,21 569744 961165
/lib/libm-2.3.5.so
perl 9491 apache mem REG 8,21 23216 961172
/lib/libcrypt-2.3.5.so
perl 9491 apache mem REG 8,21 11144 961291
/lib/libutil-2.3.5.so
perl 9491 apache mem REG 8,21 1253024 961230
/lib/libc-2.3.5.so
perl 9491 apache mem REG 8,21 19512 933207
/usr/lib/perl5/5.8.8/x86_64-linux-thread-multi/auto/IO/IO.so
perl 9491 apache mem REG 8,21 23440 933397
/usr/lib/perl5/5.8.8/x86_64-linux-thread-multi/auto/Socket/Socket.so
perl 9491 apache mem REG 8,21 119488 933379
/usr/lib/perl5/5.8.8/x86_64-linux-thread-multi/auto/POSIX/POSIX.so
perl 9491 apache mem REG 8,21 44336 961279
/lib/libnss_files-2.3.5.so
perl 9491 apache 0r CHR 1,3 1239861
/dev/null
perl 9491 apache 1w FIFO 0,5 1224272810
pipe
perl 9491 apache 2w REG 8,2 35277515 2097155
/var/log/apache/error_log
perl 9491 apache 3u IPv4 1224272819 TCP
*:11457 (LISTEN)
perl 9491 apache 6u unix 0xffff810029240300 1224148386
socket
perl 9491 apache 7u unix 0xffff81000e062300 1224166291
socket
perl 9491 apache 8u unix 0xffff8100071a70c0 1224153462
socket
perl 9491 apache 9u unix 0xffff8100071a7ac0 1224184001
socket
Apparently the "hacker" managed to write a perl script into the tmp dir and start it from there with the shell_exec()) command (we think).
As far as i know there is no cpg plugin which can be used to run a perl script. And we keep a tight security when it comes to passwords for admin accounts and ftp accounts. I really have no clue what went on but until i find out what happened the site stays offline. I personally think it is not cpg to blame but something else, i would appreciate input from people who know their way around cpg and apache webservers.
* update* we also grepped for anything related to shell. We found this
*****@leeuwarden ~/pictures.scoutlink.net_renamed $ grep -Ri shell_exec * | more
plugins/minicms/fckeditor/editor/dialog/fck_spellerpages/spellerpages/server-scripts/spellchecker.php: if( $aspellret = shell_exec( $c
md )) {
*****@leeuwarden ~/pictures.scoutlink.net_renamed $ I assume this can not be used by outsiders who mean to harm our cpg ?
Thanks for the input
Hein