Apache attack on compromised server, iframe injected by string replace

Posted by Quang-Tuan Luong on Stack Overflow See other posts from Stack Overflow or by Quang-Tuan Luong
Published on 2012-03-30T23:16:20Z Indexed on 2012/03/30 23:30 UTC
Read the original article Hit count: 260

Filed under:
|
|
|

My server has been compromised recently. This morning, I have discovered that the intruder is injecting an iframe into each of my HTML pages. After testing, I have found out that the way he does that is by getting Apache (?) to replace every instance of

<body> 

by

<iframe link to malware></iframe></body>

For example if I browse a file residing on the server consisting of:

</body>
</body>

Then my browser sees a file consisting of:

<iframe link to malware></iframe></body>
<iframe link to malware></iframe></body>

I have immediately stopped Apache to protect my visitors, but so far I have not been able to find what the intruder has changed on the server to perform the attack. I presume he has modified an Apache config file, but I have no idea which one. In particular, I have looked for recently modified files by time-stamp, but did not find anything noteworthy.

Thanks for any help.

Tuan.

PS: I am in the process of rebuilding a new server from scratch, but in the while, I would like to keep the old one running, since this is a business site.

© Stack Overflow or respective owner

Related posts about apache

Related posts about security