This WordPress blog was hacked for few hours on 24th December (nice Christmas present!) from Russia. Questo blog di WordPress è stato inciso per alcune ore il 24 dicembre (bel regalo di Natale!) Dalla Russia. The hacker exploited several WordPress vulnerabilities in administrative scripts to gain full access to the website (as permitted to apache user), including the ability to upload & run scripts, delete any file owned by apache user, view the file and directories etc. This is a full disclosure on the how the site was hacked and how I detected and removed the hack along with few comments on the state of WordPress security. L'hacker più sfruttate vulnerabilità in WordPress amministrative script per ottenere il pieno accesso al sito web (come consentito ad apache utente), tra cui la possibilità di caricare e eseguire script, eliminare qualsiasi file di proprietà di apache utente, visualizzare il file e le directory ecc Questo è una completa divulgazione sul modo in cui il sito è stato inciso e come ho rilevato e rimosso il trucco con alcune osservazioni sullo stato di sicurezza di WordPress. I added a WordPress plugin and made modifications to prevent any such hacking attempts in future using WordPress. Ho aggiunto un WordPress plugin e le modifiche apportate per prevenire qualsiasi tentativo di hacking in futuro utilizzando WordPress. This is a must read for WordPress bloggers. Si tratta di un necessario leggere per WordPress blogger.


How the site hacking was detected? Come il sito di hacking è stato rilevato?

The website was normal. Il sito web è stato normale. However when I tried to publish or even save a post, it simply showed a blank page. Tuttavia quando ho cercato di pubblicare o anche salvare un post, è semplicemente mostrato una pagina vuota. The post was never published or even saved. Il posto non è mai stato pubblicato, o addirittura salvato. I knew something was wrong. Sapevo che qualcosa è stato sbagliato.

My first suspect were couple of plugins which contacted external servers after a publish. Il mio primo sospetto sono stati paio di plugin che contattato server esterni dopo un pubblicano. I disabled them. I disabili. I also disabled the ping sites as they were sometimes known to cause problems. Ho anche disattivato il ping siti in cui sono stati talvolta noti per causare problemi. None of that helped. Che nessuno dei soccorsi. I progressively disabled all of the plugins. I disabili progressivamente tutti i collegamenti. Even with all the plugins disabled, the post wouldn’t publish. Anche con tutti i collegamenti disabili, il posto non pubblicare. I was left with only one option. Mi è stato lasciato con una sola opzione.

I decided to trace WordPress code to find out the cause of error. Ho deciso di rintracciare codice di WordPress per scoprire la causa di errore. I started with the file for post submission - post.php. Ho iniziato con il file per posta presentazione - post.php. I found something startling with WordPress code which seriously undermines its security, a flawed design choice but more on it later. Ho trovato qualcosa di sorprendente con WordPress codice che minano la sua sicurezza, una scelta errata progettazione, ma più in seguito. post.php calls admin.php which calls wp-config.php which in turn calls wp-settings.php. post.php invita admin.php che chiede wp-config.php che a sua volta chiede wp-settings.php. wp-settings is an interesting file. wp-impostazioni è un interessante file. This file isn’t just about settings. Questo file non è solo di impostazioni. It loads tons of files, loads and executes the plugins and more. E 'carichi di tonnellate di file, carica ed esegue il plugin e altro ancora. The problem was, as I originally suspected, in the plugins but which one? Il problema è stato, come ho in origine sospetta, nel plugin ma quale? The code which loads the plugins in WordPress is: Il codice che carica il plug-in in WordPress è:

 if ( get_option('active_plugins') ) {  $current_plugins = get_option('active_plugins');  if ( is_array($current_plugins) ) {   foreach ($current_plugins as $plugin) { if (” != $plugin && file_exists(ABSPATH . PLUGINDIR . ‘/’ . $plugin))     include_once(ABSPATH . PLUGINDIR . ‘/’ . $plugin); }  } } if (get_option ( 'active_plugins')) ($ current_plugins = get_option (' active_plugins'); if (is_array ($ current_plugins)) (foreach ($ $ current_plugins come plug-in) (if ( "! = $ plug & & file_exists (ABSPATH. PLUGINDIR. '/'. Plug $)) include_once (ABSPATH. PLUGINDIR. '/'. Plug $);))) 

The active plugins, as you can see, are loaded directly with include_once. I collegamenti attivi, come si può vedere, vengono caricati direttamente con include_once. How do I find the plugin which while loading is causing the script to die? Come faccio a trovare il plugin che durante il caricamento sta causando lo script di morire?
I added simple syslog() statements before and after the plugin. Ho aggiunto semplice syslog () le dichiarazioni prima e dopo il plugin. However it generated copious output from all the traffic. Tuttavia essa ha generato una copiosa produzione da tutto il traffico.
Remember I was debugging on a heavily trafficked live site. Mi ricordo il debug è stato pesantemente su un traffico di esseri umani vivono sito. So I added a define in post.php which I was checking before doing a syslog. Così ho aggiunto un post.php definire in cui ero prima di controllo facendo un syslog. The debugging code was: Il debug del codice è stato:
if (” != $plugin && file_exists(ABSPATH . ‘wp-content/plugins/’ . $plugin)) { se ( "! = $ plug & & file_exists (ABSPATH. 'wp-content/plugins /'. plug $)) (
if(defined(’TG_ADMIN’)) syslog(LOG_ALERT, “Loading $plugin…”); if (definito ( 'TG_ADMIN')) syslog (LOG_ALERT, "Caricamento plug $…");
include_once(ABSPATH . ‘wp-content/plugins/’ . $plugin); include_once (ABSPATH. 'wp-content/plugins /'. plug $);
if(defined(’TG_ADMIN’)) syslog(LOG_ALERT, “Loaded $plugin…”); if (definito ( 'TG_ADMIN')) syslog (LOG_ALERT, "Loaded $ plug…");
} )

The result was surprising. Il risultato è stato sorprendente. The first plugin loaded was not even a plugin I knew existed, let alone use it. Il primo plug non è stato caricato anche un plugin Sapevo esisteva, per non parlare di utilizzarlo. It was named ro8kbsmawge.txt. E 'stato nominato ro8kbsmawge.txt. The full path to the plugin was /../../../../../../../../../../../../../../../../../../tmp/ro8kbsmawge.txt Il percorso completo che il plugin è stato /../../../../../../../../../../../../../../ ../../../../tmp/ro8kbsmawge.txt
Effectively the file path was /tmp/ro8kbsmawge.txt. Efficacemente il percorso del file è stato / tmp/ro8kbsmawge.txt. A telltale sign of this hacker is the presence of the file ro8kbsmawge.txt in your tmp directory. Una spia di questo segno di hacker è la presenza del file ro8kbsmawge.txt nella vostra directory tmp.

I renamed the file and the problem was solved for now. Ho rinominato il file e il problema è stato risolto per ora. I could publish posts finally. Potrei pubblicare post finalmente. However my site was still not secure against future attacks. Tuttavia il mio sito non era ancora sicuro contro futuri attacchi. I will detail next at how I secured my site and provide more information on the perpetrator and how the site was hacked in the first place. Io accanto al dettaglio come ho assicurato il mio sito e fornire maggiori informazioni su l'autore del reato e in che modo il sito è stato inciso in primo luogo.

How the site was hacked using WordPress? Come il sito è stato inciso utilizzando WordPress?

The site exploited a vulnerability in /wp-admin/options.php which allowed it to get the authentication cookies it required to upload the file ro8kbsmawge.txt to my /tmp directory using /wp-admin/inline-uploading.php. Il sito sfruttato una vulnerabilità in / wp-admin/options.php che le avevano consentito di ottenere il cookie di autenticazione è necessario per caricare il file ro8kbsmawge.txt alla mia directory / tmp con / wp-admin/inline-uploading.php. It then used /wp-admin/plugins.php to activate the ro8kbsmawge.txt as a plugin while using options-misc along the way. E 'quindi utilizzati / wp-admin/plugins.php per attivare la ro8kbsmawge.txt come un plugin durante l'utilizzo di opzioni-misc lungo il percorso.

Finally the hacker accessed the site using his magic word piska233 and browsed few directories on my server before retiring for the day. Infine l'hacker accedere al sito utilizzando la sua parola magica piska233 e brucato alcune directory sul mio server prima di andare in pensione per il giorno. All of these was done within a span of 3 minutes which leads to the conclusion that a script was used to exploit the holes and orchestrate the hacking. Tutti questi è stato effettuato entro un arco di 3 minuti che porta alla conclusione che uno script è stato utilizzato per sfruttare i buchi e di orchestrare la pirateria informatica.

The full log, except the IP address 217.74.245.85 which was removed for redundancy, of hackers action on my site is: Il pieno di log, tranne l'indirizzo IP 217.74.245.85, che è stato rimosso per ridondanza, hacker di azione sul mio sito è:

[24/Dec/2007:07:40:22 -0600] “POST /wp-admin/options.php HTTP/1.0″ 200 1713 “http://blog.taragana.com/wp-admin/options.php” “Opera” [24/Dec/2007: 07:40:22 -0600] "POST / wp-admin/options.php HTTP/1.0" 200 1713 "http://blog.taragana.com/wp-admin/options.php" "Opera"
[24/Dec/2007:07:40:24 -0600] “POST /wp-admin/options.php HTTP/1.0″ 302 471 “http://blog.taragana.com/wp-admin/options.php” “Opera” [24/Dec/2007: 07:40:24 -0600] "POST / wp-admin/options.php HTTP/1.0" 302 471 "http://blog.taragana.com/wp-admin/options.php" "Opera"
[24/Dec/2007:07:40:26 -0600] “POST /wp-admin/inline-uploading.php?post=-1&action=upload HTTP/1.0″ 200 1645 “http://blog.taragana.com/inline-uploading.php?post=-1&action=upload” “Opera” [24/Dec/2007: 07:40:26 -0600] "POST / wp-admin/inline-uploading.php? Post =- 1 & action = caricare HTTP/1.0" 200 1645 "http://blog.taragana.com / inline-uploading.php? post =- 1 & action = upload "" Opera "
[24/Dec/2007:07:40:29 -0600] “POST /wp-admin/inline-uploading.php?post=-1&action=upload HTTP/1.0″ 200 142 “http://blog.taragana.com/inline-uploading.php?post=-1&action=upload” “Opera” [24/Dec/2007: 07:40:29 -0600] "POST / wp-admin/inline-uploading.php? Post =- 1 & action = caricare HTTP/1.0" 200 142 "http://blog.taragana.com / inline-uploading.php? post =- 1 & action = upload "" Opera "
[24/Dec/2007:07:40:52 -0600] “POST /wp-admin/options.php HTTP/1.0″ 200 1713 “http://blog.taragana.com/wp-admin/options.php” “Opera” [24/Dec/2007: 07:40:52 -0600] "POST / wp-admin/options.php HTTP/1.0" 200 1713 "http://blog.taragana.com/wp-admin/options.php" "Opera"
[24/Dec/2007:07:40:54 -0600] “POST /wp-admin/options.php HTTP/1.0″ 302 471 “http://blog.taragana.com/wp-admin/options.php” “Opera” [24/Dec/2007: 07:40:54 -0600] "POST / wp-admin/options.php HTTP/1.0" 302 471 "http://blog.taragana.com/wp-admin/options.php" "Opera"
[24/Dec/2007:07:40:57 -0600] “POST /wp-admin/inline-uploading.php?post=-1&action=upload HTTP/1.0″ 200 1645 “http://blog.taragana.com/inline-uploading.php?post=-1&action=upload” “Opera” [24/Dec/2007: 07:40:57 -0600] "POST / wp-admin/inline-uploading.php? Post =- 1 & action = caricare HTTP/1.0" 200 1645 "http://blog.taragana.com / inline-uploading.php? post =- 1 & action = upload "" Opera "
[24/Dec/2007:07:41:11 -0600] “GET /wp-admin/options-misc.php HTTP/1.1″ 200 7764 “-” “Opera/9.24 (Windows NT 5.1; U; ru)” [24/Dec/2007: 07:41:11 -0600] "GET / wp-admin/options-misc.php HTTP/1.1" 200 7764 "-" "Opera/9.24 (Windows NT 5,1; U; ru)"
[24/Dec/2007:07:41:15 -0600] “GET /wp-admin/wp-admin.css?version=2.0.7 HTTP/1.1″ 304 - “http://blog.taragana.com/wp-admin/options-misc.php” “Opera/9.24 (Windows NT 5.1; U; ru)” [24/Dec/2007: 07:41:15 -0600] "GET / wp-admin/wp-admin.css? Versione 2.0.7 = HTTP/1.1" 304 - "http://blog.taragana.com/ wp-admin/options-misc.php "" Opera/9.24 (Windows NT 5,1; U; ru) "
[24/Dec/2007:07:41:15 -0600] “GET /wp-includes/js/fat.js HTTP/1.1″ 304 - “http://blog.taragana.com/wp-admin/options-misc.php” “Opera/9.24 (Windows NT 5.1; U; ru)” [24/Dec/2007: 07:41:15 -0600] "GET / wp-includes/js/fat.js HTTP/1.1" 304 - "http://blog.taragana.com/wp-admin/options- misc.php "" Opera/9.24 (Windows NT 5,1; U; ru) "
[24/Dec/2007:07:41:12 -0600] “POST /wp-admin/inline-uploading.php?post=-1&action=upload HTTP/1.0″ 302 - “http://blog.taragana.com/inline-uploading.php?post=-1&action=upload” “Opera” [24/Dec/2007: 07:41:12 -0600] "POST / wp-admin/inline-uploading.php? Post =- 1 & action = caricare HTTP/1.0" 302 - "http://blog.taragana.com / inline-uploading.php? post =- 1 & action = upload "" Opera "
[24/Dec/2007:07:41:21 -0600] “GET /wp-admin/plugins.php?action=activate&plugin=/../../../../../../../../../../../../../../../../../../tmp/ro8kbsmawge.txt&_wpnonce= HTTP/1.1″ 200 1474 “http://blog.taragana.com/wp-admin/plugins.php?action=activate&plugin=/../../../../../../../../../../../../../../../../../../tmp/ro8kbsmawge.txt” “Opera” [24/Dec/2007: 07:41:21 -0600] "GET / wp-admin/plugins.php? Action = attivare plug & =/../../../../../../. ./../../../../../../../../../../../tmp/ro8kbsmawge.txt & _wpnonce = HTTP/1.1 "200 1474" http: / / blog.taragana.com / wp-admin / plugins.php? action = attivare plug & =/../../../../../../../../../.. /../../../../../../../../ tmp/ro8kbsmawge.txt "" Opera "
[24/Dec/2007:07:41:23 -0600] “GET /wp-admin/plugins.php?action=activate&plugin=/../../../../../../../../../../../../../../../../../../tmp/ro8kbsmawge.txt&_wpnonce=7b4c8019bd HTTP/1.1″ 302 - “http://blog.taragana.com/wp-admin/plugins.php?action=activate&plugin=/../../../../../../../../../../../../../../../../../../tmp/ro8kbsmawge.txt” “Opera” [24/Dec/2007: 07:41:23 -0600] "GET / wp-admin/plugins.php? Action = attivare plug & =/../../../../../../. ./../../../../../../../../../../../tmp/ro8kbsmawge.txt & _wpnonce = 7b4c8019bd HTTP/1.1 "302 -" http : / / blog.taragana.com / wp-admin / plugins.php? action = attivare plug & =/../../../../../../../../../. ./../../../../../../../../tmp/ro8kbsmawge.txt "" Opera "
[24/Dec/2007:07:41:30 -0600] “GET /?piska23 HTTP/1.1″ 200 95716 “http://lamer/mwpep/?mode=shell&what=20″ “Opera/9.24 (Windows NT 5.1; U; ru)” [24/Dec/2007: 07:41:30 -0600] "GET /? Piska23 HTTP/1.1" 200 95716 "http://lamer/mwpep/?mode=shell&what=20" "Opera/9.24 (Windows NT 5,1 ; U; ru) "
[24/Dec/2007:07:41:36 -0600] “GET /?piska233 HTTP/1.1″ 200 15840 “-” “Opera/9.24 (Windows NT 5.1; U; ru)” [24/Dec/2007: 07:41:36 -0600] "GET /? Piska233 HTTP/1.1" 200 15840 "-" "Opera/9.24 (Windows NT 5,1; U; ru)"
[24/Dec/2007:07:41:44 -0600] “POST /wp-admin/options.php HTTP/1.1″ 302 471 “http://blog.taragana.com/wp-admin/options-misc.php” “Opera/9.24 (Windows NT 5.1; U; ru)” [24/Dec/2007: 07:41:44 -0600] "POST / wp-admin/options.php HTTP/1.1" 302 471 "http://blog.taragana.com/wp-admin/options-misc. php "" Opera/9.24 (Windows NT 5,1; U; ru) "
[24/Dec/2007:07:41:47 -0600] “POST /wp-admin/options.php HTTP/1.1″ 302 471 “http://blog.taragana.com/wp-admin/options-misc.php” “Opera/9.24 (Windows NT 5.1; U; ru)” [24/Dec/2007: 07:41:47 -0600] "POST / wp-admin/options.php HTTP/1.1" 302 471 "http://blog.taragana.com/wp-admin/options-misc. php "" Opera/9.24 (Windows NT 5,1; U; ru) "
[24/Dec/2007:07:41:55 -0600] “GET /?piska233&dira=/tmp HTTP/1.1″ 200 9930 “-” “Opera/9.24 (Windows NT 5.1; U; ru)” [24/Dec/2007: 07:41:55 -0600] "GET /? Piska233 & dira = / tmp HTTP/1.1" 200 9930 "-" "Opera/9.24 (Windows NT 5,1; U; ru)"
[24/Dec/2007:07:41:54 -0600] “GET /wp-admin/options-misc.php?updated=true HTTP/1.1″ 200 7842 “http://blog.taragana.com/wp-admin/options-misc.php” “Opera/9.24 (Windows NT 5.1; U; ru)” [24/Dec/2007: 07:41:54 -0600] "GET / wp-admin/options-misc.php? Aggiornato = true HTTP/1.1" 200 7842 "http://blog.taragana.com/wp- admin / opzioni-misc.php "" Opera/9.24 (Windows NT 5,1; U; ru) "
[24/Dec/2007:07:42:36 -0600] “POST /index.php?piska233&dira=./ HTTP/1.1″ 200 36721 “http://blog.taragana.com/?piska233″ “Opera/9.24 (Windows NT 5.1; U; ru)” [24/Dec/2007: 07:42:36 -0600] "POST / index.php? Piska233 & dira =. / HTTP/1.1" 200 36721 "http://blog.taragana.com/?piska233" "Opera/9.24 (Windows NT 5,1; U; ru) "
[24/Dec/2007:07:43:23 -0600] “GET /index.php?piska233&dira=./wp-content/plugins/Wysi-Wordpress/themes/advanced/docs/es/images HTTP/1.1″ 200 6506 “-” “Opera/9.24 (Windows NT 5.1; U; ru)” [24/Dec/2007: 07:43:23 -0600] "GET / index.php? Piska233 & dira =. / wp-content/plugins/Wysi-Wordpress/themes/advanced/docs/es/images HTTP/1.1" 200 6506 "-" "Opera/9.24 (Windows NT 5,1; U; ru)"
[24/Dec/2007:07:43:38 -0600] “GET /wp-content/plugins/Wysi-Wordpress/themes/advanced/docs/es/images HTTP/1.1″ 301 298 “-” “Opera/9.24 (Windows NT 5.1; U; ru)” [24/Dec/2007: 07:43:38 -0600] "GET / wp-content/plugins/Wysi-Wordpress/themes/advanced/docs/es/images HTTP/1.1" 301 298 "-" "Opera/9.24 (Windows NT 5,1; U; ru) "
[24/Dec/2007:07:43:40 -0600] “GET /wp-content/plugins/Wysi-Wordpress/themes/advanced/docs/es/images/ HTTP/1.1″ 200 604 “-” “Opera/9.24 (Windows NT 5.1; U; ru)” [24/Dec/2007: 07:43:40 -0600] "GET / wp-content/plugins/Wysi-Wordpress/themes/advanced/docs/es/images / HTTP/1.1" 200 604 "-" "Opera / 9.24 (Windows NT 5,1; U; ru) "

The good news is that no harm was done. La buona notizia è che nulla di male è stato fatto.

WordPress security issues & design flaw WordPress questioni di sicurezza e difetto di progettazione

The basic design flaw is that loading WordPress configuration (required for database access for authentication checks) loads wp-settings which loads tons of other PHP files as well as all the WordPress plugins and any hacks. Il disegno di base difetto è che il carico di WordPress configurazione (banca dati necessari per l'accesso per l'autenticazione controlli) carichi wp-impostazioni che carichi di tonnellate di altri file PHP come di tutti i collegamenti di WordPress e ogni hack. All of these are done even before you have a chance to authenticate the user. Tutti questi sono fatto anche prima di avere la possibilità di autenticare l'utente. This is extremely dangerous for administration scripts as it allows a hacker to pass arguments to and execute gazillions of WordPress files which may or may not have proper security checks in place. Ciò è estremamente pericoloso per gli script di amministrazione in quanto consente a un hacker di passare argomenti al gazillions ed eseguire i file di WordPress che possono o non possono avere una corretta controlli di sicurezza in vigore. User authentication and entitlement should be done at the very beginning to prevent unauthenticated scripts from proceeding any further. L'autenticazione degli utenti e il diritto deve essere fatto a fin di impedire unauthenticated script da ogni ulteriore procedimento. To do that wp-config must be modified to not include wp-settings. Per fare questo wp-config deve essere modificata in modo da non includere wp-impostazioni. It should be separately included where required, even at the cost of redundancy. Dovrebbe essere incluso separatamente, se del caso, anche a costo di ridondanza. Administration scripts (under wp-admin) requires only wp-config to get the database details to authenticate the user and identify its entitlements. Script di amministrazione (ai sensi wp-admin) richiede solo wp-config per ottenere il database dettagli per autenticare l'utente e individuare i suoi diritti. After authentication the rest should be loaded. Dopo l'autenticazione il resto dovrebbe essere caricato. This flaw was exploited to get the authentication cookie details which was subsequently used. Questo difetto è stato sfruttato per ottenere il cookie di autenticazione dettagli che è stato in seguito utilizzato. The exact exploit used in this case is hard to find from just server logs. Sfruttare l'esatto utilizzato in questo caso è difficile trovare da solo log dei server. However it was caused by late authentication problem as described above. Tuttavia, è stato causato da ritardo di autenticazione problema come descritto sopra.

There are were known issues with both options.php & upload script, some of which are detailed Ci sono stati problemi noti con entrambe le options.php e caricare uno script, alcuni dei quali sono dettagliate here qui .

One of the challenges with WordPress is that security considerations was mostly an afterthought (feel free to disagree) which were latched on as WordPress became more and more popular. Una delle sfide con WordPress è che considerazioni di sicurezza è stato soprattutto un ripensamento (sentitevi liberi di dissentire) che sono stati latched come WordPress divenne sempre più popolare. You have to continuously update your WordPress to keep up with the latest patches. Avete continuamente aggiornare il tuo WordPress per stare al passo con le ultime patch.

There are 71 reported security advisories in Secunia (22 reported in 2007) and 9 viruses based on WordPress (one from 2007). Ci sono 71 avvisi di sicurezza riportati nel Secunia (22 segnalati nel 2007) e 9 virus basati su WordPress (uno dal 2007).

Most likely the site was hacked using the cookies authentication vulnerability as detailed Molto probabilmente il sito è stato inciso utilizzando il cookie di autenticazione vulnerabilità, come indicato here qui .

Several WordPress plugins and themes also have security advisories: WordPress diversi temi e anche di sicurezza:
- AdSense-Deluxe 0.x (plugin for WordPress) -- AdSense-Deluxe 0.x (plugin per WordPress)
- AndyBlue 1.x (theme for WordPress) -- AndyBlue 1.x (tema per WordPress)
- Blix 0.x (theme for WordPress) -- Blix 0.x (tema per WordPress)
- Blixed 1.x (theme for WordPress) -- Blixed 1.x (tema per WordPress)
- BlixKrieg 2.x (theme for WordPress) -- BlixKrieg 2.x (tema per WordPress)
- Blue Memories 1.x (theme for WordPress) -- Blue Memories 1.x (tema per WordPress)
- myGallery 1.x (plugin for WordPress) -- MyGallery 1.x (plugin per WordPress)
- PictPress 1.x (plugin for WordPress) -- PictPress 1.x (plugin per WordPress)
- Pool 1.x (theme for Wordpress) -- Girone 1.x (tema per Wordpress)
- Redoable 1.x (theme for WordPress) -- Redoable 1.x (tema per WordPress)

You can read all the Secunia advisories on WordPress Potete leggere tutte le Secunia advisories su WordPress here qui .

Who was the hacker? Che è stato l'hacker?

The IP address of the user responsible for hacking my site is 217.74.245.85 . L'indirizzo IP del responsabile l'utente per l'hacking il mio sito è 217.74.245.85. The IP address belongs to KUBANGSM-NET: L'indirizzo IP appartiene alla KUBANGSM-NET:

 % Information related to '217.74.245.0/24AS29497'  route:          217.74.245.0/24 descr:          KUBANGSM-NET origin:         AS29497 mnt-by:         KUBANGSM-MNT source:         RIPE # Filtered % Informazioni relative al'217 .74.245.0/24AS29497 'itinerario: 217.74.245.0/24 descr: KUBANGSM-NET origine: AS29497 mnt-by: MNT-KUBANGSM fonte: RIPE # Filtrato 

It is owned by: E 'di proprietà di:

 person:       Volkov Denis address:      61, Gimnazicheskaya str. persona: Volkov Denis indirizzo: 61, Gimnazicheskaya str. 350000, Krasnodar, Russia phone:        +7 8612 660126 fax-no:       +7 8612 401505 e-mail:       d.volkov@kuban.mts.ru nic-hdl:      VD370-RIPE source:       RIPE # Filtered 350000, Krasnodar, Russia Tel: +7 8612 660126 fax-no: +7 8612 401505 e-mail: d.volkov @ kuban.mts.ru nic-Man: VD370 RIPE-fonte: RIPE # Filtrato 

Their website is Il loro sito web è http://www.kuban.mts.ru/ . They appear to be legitimate mobile & internet service provider. Sembrano essere legittimi di telefonia mobile e Internet Service Provider. Most likely their internet service is being abused by the spammer. Molto probabilmente il loro servizio internet è in fase di abusi lo spammer. Nevertheless I decided to Tuttavia ho deciso di ban this IP address from accessing my server divieto questo indirizzo IP di accedere al mio server .

The hacker was most likely using Opera 9.24 browser (almost latest version) on Windows XP (NT 5.1). L'hacker è stato più probabile che utilizzano browser Opera 9,24 (quasi ultima versione) in Windows XP (NT 5.1). While user agent can be faked, there is no reason to suspect so in this case. Mentre un agente utente può essere falso, non vi è alcun motivo di sospettare così in questo caso. The user agent string also shows that he was using the russian language file of Opera. La stringa agente utente dimostra anche che stava usando il file di lingua russa di Opera.

Shell magia di Mag screenshot

Anatomy of the hacking script Anatomia del hacking script

The hacking script is a php script with aa nice comment and TODO line: La pirateria informatica è uno script php script con AA e piacevole commento TODO riga:
/*Magic Include Shell by Mag icq 884888*/ / * Magic Includi di Shell Mag icq 884888 * /
//TODO: ñëèòü ôàéëî íà ñâîé ôòï (!) / / TODO: ñëèòü ôàéëî íà ñâîé ôòï (!)

Effectively it is a file manager, probably adapted from any of the free php file manager’s on the net. Effettivamente si tratta di un file manager, probabilmente adattato da qualsiasi della libera php file manager's sulla rete. It allows you to: Esso consente di:

  • Browse directories and files Sfoglia directory e file
  • Edit files Modifica file
  • Rename files Rinominare i file
  • Delete files Eliminare i file
  • zip & unzip files zip e decomprimere i file
  • Upload & download files & directories Caricare o scaricare i file e le directory
  • Execute arbitrary PHP scripts Esecuzione arbitraria di script PHP
  • Execute arbitrary shell commands Esecuzione di comandi di shell arbitrari
  • Provides basic server, system & PHP information Prevede di base del server, sistema di informazione e di PHP

The bulk of the code is executed when it receives a particular query string to a normal HTTP GET request. La maggior parte del codice viene eseguito quando si riceve una particolare stringa di ricerca di una normale richiesta HTTP GET. So while http://blog.taragana.com/ will work as usual, http://blog.taragana.com/?piska233 will open with this magical hidden shell which will expose your entire website to an outside hacker. Così, mentre http://blog.taragana.com/ funzionerà come di consueto, http://blog.taragana.com/?piska233 si aprirà con questa magica nascosta guscio che esporrà il tuo sito web al di fuori di un hacker.
Note: There is nothing magical about piska233. Nota: Non vi è nulla di magico circa piska233. It is a password which was most likely allowed to be chosen and given as input to the original script which injected this trojan horse on my site. Si tratta di una password che è stata molto probabilmente permesso di essere scelto e dato come input per lo script originale che iniettato questo cavallo di Troia per il mio sito.

A trojan which protects itself against worms… Un trojan che protegge contro worm…

The trojan takes steps to protect itself against worm! Il trojan prende le misure atte a proteggere contro worm! The code at the end which is always executed is: Il codice alla fine che è sempre eseguita è:

$post_arr=implode('.',$_POST); post_arr $ = implode ('.',$_ POST);
$get_arr=implode('.',$_GET); get_arr $ = implode ('.',$_ GET);
$cook_arr=implode('.',$_COOKIE); cook_arr $ = implode ('.',$_ Cookie);
$post_arr_key=implode('.',@array_flip($_POST)); post_arr_key $ = implode ('.',array_flip ($ _POST));
$get_arr_key=implode('.',@array_flip($_GET)); get_arr_key $ = implode ('.',array_flip ($ _GET));
$cook_arr_key=implode('.',@array_flip($_COOKIE)); cook_arr_key $ = implode ('.',array_flip ($ _COOKIE));
$other_shtuki=@file_get_contents('php://input'); other_shtuki $ = @ file_get_contents ( 'php: / / input');
$cracktrack = strtolower($post_arr.$get_arr.$cook_arr.$post_arr_key.$get_arr_key.$cook_arr_key.$other_shtuki); cracktrack $ = strtolower ($ post_arr. get_arr $. cook_arr $. post_arr_key $. get_arr_key $. cook_arr_key $. other_shtuki $);
$wormprotector = array('base64','user_pass','union','select','substring','or id='); wormprotector $ = array ( 'base64', 'user_pass',' unione ',' selezionare ',' sottostringa ',' o id = ');
$checkworm = str_replace($wormprotector, '*', $cracktrack); checkworm $ = str_replace ($ wormprotector, '*', $ cracktrack);
if ($cracktrack != $checkworm) die(""); if ($ cracktrack! = $ checkworm) die ("");

It checks for certain keywords (in $wormprotector array) within GET, POST & COOKIE data. E 'controlli per determinate parole chiave (in wormprotector $ array) entro GET, POST e COOKIE dati. When they are present it simply aborts. Quando sono presenti semplicemente fallisca. This is one of the means to detect the current version of the script. Questo è uno dei mezzi per rilevare l'attuale versione dello script. This is also the reason why it failed to submit a post. Questo è anche il motivo per cui non è riuscito ad inviare un post. An url such as this would also die - http://localhost/wordpress/?select as would http://localhost/wordpress/?base64. Un url di questo tipo avrebbe anche morire - http://localhost/wordpress/?select come sarebbe http://localhost/wordpress/?base64.
However there is nothing to be happy about. Tuttavia non vi è nulla per essere felice. It will take less than a minute to modify the script and make it immune to detection in WordPress. Ci vorranno meno di un minuto di modificare lo script e la rende immune da rilevamento in WordPress.

How to protect your WordPress site from hacking? Come proteggere il vostro sito da WordPress hacking?

You can protect your administration scripts (scripts under wp-admin), where most attacks originate including this one, by restricting access to your admin scripts to specific IP address or IP address range. È possibile proteggere il vostro script di amministrazione (script sotto wp-admin), dove la maggior parte provengono attacchi compresa questa, di limitare l'accesso al tuo amministratore di script specifico indirizzo IP o di indirizzi IP. You can also add a basic authentication on top of WordPress by using your httpd.conf file or .htaccess. È inoltre possibile aggiungere un autenticazione di base in cima a WordPress utilizzando il vostro file httpd.conf o. Htaccess. This adds a layer of security which any hacker will have to overcome before he gets to your WordPress vulnerabilities. Questo aggiunge un livello di sicurezza che qualsiasi hacker dovrà superare prima che arriva al vostro WordPress vulnerabilità.

WordPress should be upgraded as regularly as possible. WordPress dovrebbe essere aggiornato regolarmente per quanto possibile. However that is easier said than done. Tuttavia, che è più facile a dirsi che a farsi. Normally I prefer to wait a few versions before the new versions stabilize. Normalmente preferisco aspettare qualche versioni prima che le nuove versioni stabilizzare.

WordPress security vulnerabilities affects every one of us, WordPress based bloggers. WordPress vulnerabilità di sicurezza riguarda ognuno di noi, a base di WordPress blogger. While I was fully aware of the possibilities and even thought of writing a plugin to address these issues before, I decided to wait (and address more urgent issues or so I thought) relying on the law of probability to protect my sites; after all there are several million WordPress blogs out there, how much chance of being targeted by a hacker? Mentre ero pienamente consapevole delle possibilità e persino pensato di scrivere un plugin per affrontare tali questioni prima, ho deciso di aspettare (e indirizzo questioni più urgenti o così ho pensato) basandosi sulla legge delle probabilità di proteggere i miei siti; dopo tutto vi sono diversi milioni di blogs di WordPress là fuori, quanta possibilità di essere oggetto di un hacker? Well, as it turns out, I was wrong. Ebbene, come si scopre, ero sbagliato.
To simplify securing WordPress, I have created a plugin, to be released soon, which leverages these ideas and more to secure your WordPress installations. Per semplificare garantire WordPress, ho creato un plugin, per essere rilasciati presto, che sfrutta queste idee e di più per garantire la sua WordPress impianti. It works with your .htaccess but it also works even when .htaccess facility is not available. Funziona con il vostro. Htaccess ma funziona anche quando. Htaccess non è disponibile. I have already started using it on my blogs. Ho già iniziato a utilizzare sul mio blog.