httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan_Mit...@YMP.GOV
Subject Re: [users@httpd] Someone hacked my apache2 server
Date Mon, 05 Apr 2010 15:14:13 GMT

Some other things to check/do if you don't already know this...

Be sure that the httpd process runs as a completely unprivileged user with 
nothing but read access to ANYTHING.
Be sure that the content of your site is not owned by the same user as the 
httpd user.  Read only access should be through group, other or acl.
Be sure that the apache config files, libraries, binaries, etc. are owned 
by as different user then the httpd process user.  Read and Execute access 
should be through group, other or acl.

Same goes for MySQL and any other processes running on the machines.  The 
running processes should NOT have write access to their own config files.

Try to think about the problem form the running processes perspective, if 
I was the httpd/mysql/etc. process, what can I hurt?  Get that to a 

If there is a buffer overflow problem somewhere, you might not be able to 
prevent the in memory running process from being hacked, but as long as 
they can't hack the files on the server(s), a quick stop/start or reboot 
should fix the problem.

Good Luck!


Please respond to

cc:      (bcc: Dan Mitton/YD/RWDOE)
Subject:        Re: [users@httpd] Someone hacked my apache2 server
LSN: Not Relevant
User Filed as: Not a Record

Oh, ok. I got it. I have already disabled it (actually, immediately after 
the attack).
Thanks for the advice. I appreciate!

On Sun, Apr 4, 2010 at 5:52 PM, Daniel Reinhardt <> 

From: "Oleg Goryunov" <>
Sent: 04 April, 2010 13:39

To: <>
Subject: Re: [users@httpd] Someone hacked my apache2 server

Yes, there is a MySQL server. And actually, I noticed that - while the
server was returning the mentioned hacked page, mysql process was on top 
the list of the "top" command. Though, it took only 1.5% of the CPU.
But, mysql is restricted to accept connections from outside world. It only
listens on local socket.
What kind of vulnarability does mysql have? Do you know where I can read
about it?

On Sun, Apr 4, 2010 at 4:55 PM, Daniel Reinhardt <

From: "Oleg Goryunov" <>
Sent: 03 April, 2010 21:03
To: <>
Subject: [users@httpd] Someone hacked my apache2 server

 Hello all,
It looks like someone hacked my apache2 server and I am trying to
how this could have happened.
This is what happened:
All of a sudden the server - in response to a web-browser request for a
- started to give a full screen of unknown characters (looked like a long
text with encoding mismatch).
The output was immediate and the same for all the web-sites located on the
Looking at the page source of the output I see the following:

<iframe src= width=1
height=1></iframe> Л ?????? э[сn█8 ■▌?√ \-░{ ╘Ц '█&q ┤I
щ]╙ф╥l{√ла$┌fCС*I┘ёс цЮхЮьf(╩Ц 9N▓-о╗pА─ 9?f8Ь  З╩Ё√У?ул▀.^СЙM
╣°?хЫ╫╟$шДсЗ┴q Ю\ЭР Ю^Э╜!?nП\i*

╖\I*┬Ё╒█А  k│?0Ь═f▌┘ал?8╝║ o лПГ?╫ОнМь&6 ОЖО▀M*д9lAщяээ
0┘ G й=  г╔╤ !├И F&ЪН РТ═║TP═НаСщ╞*
MЮeJ█n  ║Б)│ФрР √Ь?щa +iЩ┤ ;╧X@?╙a`┘Н
qр Й'T f s;ъ<псHЪ▓├@лHYS ╦e┬nЮТС B═Z \│∙Lщд:фУRйаO╔▀▄g╦
JЪ█Й╥ ╥ I╩%7░К █o

I╛' b'М$sах1A}RAШ s╔ ХI9АдT╥1KёлЩ ╦╥ Nc&ЩЧт Я~w xЭgLТw*╫1#╟
∙lБ\B:e y
├т ; Ч╫▐,B ! ╘2 .═" ╤) ╓]°  ═─a`@Y6╬-┴?Аа └
ж└1╝щ m ╙BIЮ└Щ╟':еEk@МОБg╩ N├b■с' жJYеДщ~2р4aA?h┤Ш║EjАm
│.&cчВЩ cАqЧ
bSyь┬SPХ─=├д R├ пD▌ ЖЕ o

#Х╠Б═╔ы?$ ╘@|H)ЧA╜)7LЯ1Щг9@/╙╨ d8R:%4F}А,L6Ь МnвТ├ S $.мO(0┌Аph╞╤
\?╤l? 4#·У'C.3┤ аMU"╞?#КБ8╒9Х╚╦>ПхFGъ& T╪j┐с  ·~
FZ∙d?0KJ.ю bE╔йь╜┼g ь8.╟нтг┴г╥ ┤щ9MxТ0Y?Y?▐т4е" К93Ю╫ез%gмdЗ
Н3%┴ГCTE кЖx─t╫o H щ█Ж!- Ф^  A┘#А╕ tI9kЗ▒UN║m~╩З;? Аv \╚
╢√╔ВK бЖ!┌╣?8Ёз║WYХбS  ┼Ё█я ▀pеqз ?tьГPлЫ?0ъО∙ha :"V
сг╞i ╖Z@
Y?■ЕY,Р`- FE4Юa. ё Жv0и  ? ^?dTуц┬A╬>t╨╡┘  ЩМ╩г╙?│W }ё+▓
fUXЗ?s  -wвR
F░∙Н╕5▐d ░Ч╛▒

~ ёY вТ аY tlkачоЭ`√-▄ ┼mсЁ╠ .█   ╣н┌Г■{ х?ъ
uю4d═┤J?╕.т╒щ+rqy~?ыё╒▌║▄m  ╣Ь* 35ez╩a▒крпх{ь#eч:х>_┴Гъx
╝вУжEФ,".`н╞г\║нмa E'Y?оЫ╚▐
.Zх А:эl.Л▐{│┘юн`уRЭ ─Ь °K╩t╠йш$hH │╖║  -д╚Ъ,i╔ТvЭ ?╡"H
L╖W0Нsc┴ u R%ъ4╪Yf├5╬╟ЮТ,(+y?:?Г ь%│░щ]wR%1ё┬Е.r╞ ы╖  YR∙<}
█ ю О╕д╥-q
╖_╩╬{2Yхц╕╔ ┴┤щрБA+Q╖▄▓Ч°▐{З╗чП

wШA┼╣╓ю4R?s╠Fз╠╣{╙ k╔йч░8╛▄ ■╢ЫБ├#ЕнБя?~ o╗╣ЫФа
^╫@O}у:╨f -AпеЪ ЦМ Ю┘k╚ п?▄{щ·╜/╖U?Ыq$aйк╔x?ъь|═ 5  1▄
И Я?цц|  ─w▄oя
╙v*ч?8x~vётэow+v╨\ П ╥dJ!  │·╠_,Ъ╫Шъа ╚KрФ Г ь*ъY╤╢
r┼м1С4Н8<╗kaЁ█C??ЧП═╫гGцы╤▌∙·"O Ч╤ │? R_√YР.& | 
ПжtXОH°┤╤?ЖНАD▄┘Й ю╕r

KV$Ч ╙ШлWН'8z▒Р█ Жk╛YEx├хupDBRгИ4гIм?42p$╢У ЭГ ??f╦ > Ж ?>
в╫i?ЙйМaщ ~ЖV ТMЁ0╩╟╥┘ **?A╞ У░ #mgDS.ц√ vо 2бзX"Ь╥ГаN +б?>∙бч~
Oь>Сp╚етА8<мГьУ■ ╗ Мяnё|<╨д_У█w?╧ь:Y ∙l-Л иSF╡Ш

би╝9сй+╬B  A& ╔-ЧnдUX▒uu вF В )Odф
с b6Щ ХkByКПV!╔Ф'╠!D░UСLA ─Х/%А?ч(d╠║Лx6щ;ЭЧкHй s╣OznЖ├HУЁш
SАД( │БD.GF <>Ц╟╫мм&╗Z3NvJ╣p шh╖w┬] ╦

С▌┴?┐ iяяАm 4─7шbеzq║hКФЕ┤╜N&└-

*X;TуМСDэ{.╣X╟жКY╓р nbgl╦═E│$S У═Зр q K#К3Fб:╚·1  З ёqо]П█rА
Ы╔Е;Лz╦0╕╩5С╤Д╤R╜ Ыr

┐Яyy4│ ┬>╚ЁН)╟{ЕЩ(х4╘╨   х ■ У |?Y8°y╖z?─@$D s?▒йb▒ж1Гпс│╦АPq_∙Ун8q
╒╢B║  ╡ь< ╪э*ЫГБe ЕkT|└э -??┴Z ╝╫╠▄= 4═Q├╛@Ё╘ └Ю"ЛН┼LxЦA╪е╞н
ёJф╢Ъ?╓ ▒╥с╛°мщ?ц╥╗>nG~CH(d"╒ГcЛРе??a  ▓▐  69╖   АoX;wц
ыlэ╡s   YИLШ@
╗ √C Zь р"°?БPcЧa)gУeхд4NH┐  /═!cСДеР┤ й╔гФCъ .9+?Ы┐╪ ф5X
6<ч▒┼?Ъ$╨т╥▒ИС?╥ ?u╞aМt?Х^ЁW?K?╖2 ймУр╓4Р E

The address indicated in the begining of the page code leads to some
So, somehow it happened that the output of the apache server was
by this page, which redirected visitors to some chinese server.

But the most strange thing was that the problem dissapeared itself! So, it
last for 10 minutes then disappeared! And the again started and again
dissapeared. Finally, I turned down apache untill I understand what is

Any idea how could that happen?  How to reproduce this? How to prevent?
Where to look for logs? I have check both ssh logs and apache logs, there
nothing that could seem unusual there...

Any help is appreciated.


Are you running any sort of MySQL Database on this machine, and if so is 
patched and fully updated along with any php scripts.  What you are 
us is indicative of a SQL Injection Attack.

Shocked no one has mentioned especially with the rampant incline of the
Russian Business Network to spread its malware through the use of SQL
Injection on any vulnerable website.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
 "   from the digest:
For additional commands, e-mail:


Its not a vulnerability with MySQL it is a vulnerable PHP Script such as 
an outdated PHPMyAdmin or PHPMyAdmin itself.  I hardly run it on my 
servers.  I would promptly disable it.


The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
 "   from the digest:
For additional commands, e-mail:

View raw message