{"id":4305,"date":"2017-09-16T07:43:54","date_gmt":"2017-09-16T07:43:54","guid":{"rendered":"http:\/\/musilda.cz\/?p=4305"},"modified":"2017-09-16T07:43:54","modified_gmt":"2017-09-16T07:43:54","slug":"skandal-ve-wp-repozitari-plugin-vice-nez-200k-instalacemi-obsahoval-zadni-vratka","status":"publish","type":"post","link":"https:\/\/affinite.io\/cs\/skandal-ve-wp-repozitari-plugin-vice-nez-200k-instalacemi-obsahoval-zadni-vratka\/","title":{"rendered":"Skand\u00e1l ve WP repozit\u00e1\u0159i: Plugin s v\u00edce ne\u017e 200k instalacemi obsahoval zadn\u00ed vr\u00e1tka"},"content":{"rendered":"
Pluginy, kter\u00e9 si lze st\u00e1hnout z WP repozit\u00e1\u0159e, by m\u011bly b\u00fdt v po\u0159\u00e1dku. Vzhledem k obrovsk\u00e9mu mno\u017estv\u00ed se v\u0161ak docela logicky \u010das od \u010dasu objev\u00ed n\u011bjak\u00fd ten men\u0161\u00ed probl\u00e9m. V p\u0159\u00edpad\u011b pluginu Display Widgets jde ov\u0161em o docela velk\u00fd probl\u00e9m. Respektive o nic men\u0161\u00edho ne\u017e zadn\u00ed vr\u00e1tka (angl. backdoor).<\/p>\n
Plugin Display Widgets byl se zadn\u00edmi vr\u00e1tky v repozit\u00e1\u0159i pom\u011brn\u011b dlouhou dobu \u2013 dva a p\u016fl m\u011bs\u00edce. K\u00f3d se objevil mezi verzemi 2.6.1 (vyd\u00e1na 30. \u010dervna) a 2.6.3 (vyd\u00e1na 2. z\u00e1\u0159\u00ed). T\u00fdm z WordPress.org ji\u017e plugin z repozit\u00e1\u0159e odstranil, ov\u0161em do t\u00e9 doby si ho nainstalovalo docela dost u\u017eivatel\u016f. P\u0159es 200 tis\u00edc instalac\u00ed opravdu nen\u00ed m\u00e1lo, nicm\u00e9n\u011b nelze zjistit, kolik bylo aktualizov\u00e1no na verze s nebezpe\u010dn\u00fdm k\u00f3dem.<\/p>\n
Pikantn\u00ed je, \u017ee lid\u00e9 z WordPress.org tento plugin v minulosti ji\u017e n\u011bkolikr\u00e1t odstranili \u2013 sv\u011bte div se \u2013 pro podobn\u00e9 probl\u00e9my. N\u00ed\u017ee popsan\u00e9 souvislosti poch\u00e1z\u00ed z nez\u00e1visl\u00fdch vy\u0161et\u0159ov\u00e1n\u00ed Davida Lawa, White Fir Design a Wordfence.<\/p>\n
P\u016fvodn\u00ed plugin Display Widgets naprogramovala Stephanie Wells z Strategy11. D\u00edky tomuto pluginu lze nastavit, kde, kdy a jak se na webu objev\u00ed jednotliv\u00e9 widgety. A proto\u017ee byl navr\u017een dob\u0159e, u\u017eivatel\u00e9 o n\u011bj jevili z\u00e1jem.<\/p>\n
Stephanie se v kv\u011btnu tohoto roku rozhodla pro prodej open source verze, proto\u017ee se zam\u011b\u0159ila na placenou verzi pluginu. Jen m\u011bs\u00edc po prodeji se dostala na sv\u011btlo sv\u011bta prvn\u00ed nov\u00e1 verze \u2013 2.6.0.<\/p>\n
Verze 2.6.0 byla vyd\u00e1na 21. \u010dervna a o den pozd\u011bji si SEO konzultant David Law (mimochodem autor konkuren\u010dn\u00edho pluginu Display Widgets SEO Plus) v\u0161iml, \u017ee plugin poru\u0161uje pravidla WordPress.org t\u00edm, \u017ee stahuje p\u0159es 38 MB k\u00f3du ze serveru t\u0159et\u00ed strany. Podle n\u011bj mohl autor k\u00f3du sb\u00edrat nejr\u016fzn\u011bj\u0161\u00ed data o u\u017eivatel\u00edch.<\/p>\n
Law nebyl jedin\u00fdm u\u017eivatelem, kter\u00fd si probl\u00e9m\u016f v\u0161iml a z WordPress.org proto plugin zmizel hned n\u00e1sleduj\u00edc\u00ed den.<\/p>\n
O t\u00fdden pozd\u011bji se nov\u00fd autor pluginu rozhodl pro vyd\u00e1n\u00ed dal\u0161\u00ed verze \u2013 2.6.1. Oproti p\u0159edchoz\u00ed verzi byl k\u00f3d v souboru geolocation.php, \u010d\u00edm\u017e se vyhnul poru\u0161en\u00ed pravidel WordPress.org. – ji\u017e nedoch\u00e1zelo ke stahov\u00e1n\u00ed ze server\u016f t\u0159et\u00edch stran.<\/p>\n
Law v\u0161ak plugin bedliv\u011b sledoval a op\u011bt se obr\u00e1til na WordPress.org s t\u00edm, \u017ee obsahuje \u0161kodliv\u00fd backdoor k\u00f3d \u2013 tentokr\u00e1t umo\u017e\u0148uj\u00edc\u00ed p\u0159ipojen\u00ed na napojen\u00e9 weby a vytv\u00e1\u0159en\u00ed nov\u00fdch str\u00e1nek a p\u0159\u00edsp\u011bvk\u016f. Krom\u011b toho i sb\u00edr\u00e1n\u00ed dat jako v p\u0159edchoz\u00ed verzi. Den na to byl plugin op\u011bt odstran\u011bn \u2013 celkem podruh\u00e9 b\u011bhem jednoho t\u00fddne.<\/p>\n
Nov\u00fd autor pluginu m\u00e1 hro\u0161\u00ed k\u016f\u017ei, o \u010dem\u017e sv\u011bd\u010d\u00ed dal\u0161\u00ed verze 2.6.2. Op\u011bt zkusil sv\u00e9 \u0161t\u011bst\u00ed a 6. \u010dervna ji p\u0159idal do repozit\u00e1\u0159e. A n\u011bkolik dn\u00ed to vypadalo, \u017ee je v\u0161e v po\u0159\u00e1dku \u2013 plugin ji\u017e nevykazoval zn\u00e1mky ne\u017e\u00e1douc\u00edho chov\u00e1n\u00ed. Jenom\u017ee to netrvalo dlouho, 23. \u010dervence u\u017eivatel Calvin Ngan zaznamenal probl\u00e9my s vytv\u00e1\u0159en\u00edm nedetekovateln\u00fdch str\u00e1nek pln\u00fdch spam link\u016f.<\/p>\n
Tak jako to p\u0159ed n\u00edm ud\u011blal Law, i Ngan vystopoval, \u017ee pot\u00ed\u017ee poch\u00e1z\u00ed ze souboru geolocation.php p\u0159idan\u00e9ho do verze 2.6.1.<\/p>\n
Ve zkratce \u2013 tato verze vytv\u00e1\u0159ela nov\u00e9 str\u00e1nky a p\u0159\u00edsp\u011bvky, kam umis\u0165ovala odkazy na jin\u00e9 weby. Ty se v\u0161ak neukazovaly v backendu v administra\u010dn\u00edm panelu mezi ostatn\u00edmi str\u00e1nkami a p\u0159\u00edsp\u011bvky. Tyto str\u00e1nky byly nav\u00edc skryty p\u0159ed p\u0159ihl\u00e1\u0161en\u00fdmi u\u017eivateli. Administr\u00e1to\u0159i si jich mohli v\u0161imnout jen v p\u0159\u00edpad\u011b, \u017ee by web prohl\u00ed\u017eeli nep\u0159ihl\u00e1\u0161en\u00ed.<\/p>\n
Plugin generoval nov\u00e9 str\u00e1nky pomoc\u00ed obsahu z dom\u00e9n hostovan\u00e9m na serveru 52.173.202.113. Jednalo se o dom\u00e9ny stopspam.io, w-p.io, geoip2.io a maxmind.od. V\u0161echny registrovan\u00e9 b\u011bhem \u010dervna tohoto roku.<\/p>\n
Den po Nganov\u011b reportu byl plugin Display Widgets pot\u0159et\u00ed odstran\u011bn z repozit\u00e1\u0159e. Ale t\u00edm p\u0159\u00edb\u011bh nekon\u010d\u00ed.<\/p>\n
Kdy\u017e je n\u011bkdo zlosyn, jen tak se nevzd\u00e1. Nov\u00fd v\u00fdvoj\u00e1\u0159 pluginu si ze t\u0159ech odstran\u011bn\u00ed nic moc ned\u011blal, proto\u017ee do repozit\u00e1\u0159e nahr\u00e1l i dal\u0161\u00ed verzi 2.6.3. Samoz\u0159ejm\u011b infikovanou \u0161kodliv\u00fdm k\u00f3dem… 8. z\u00e1\u0159\u00ed byla z repozit\u00e1\u0159e odstran\u011bna a vypad\u00e1 to, \u017ee trvale.<\/p>\n
Lid\u00e9 z WordPress.org p\u0159ebrali nad pluginem kontrolu a vydali verzi 2.7.0, kter\u00e1 obsahuje stejn\u00fd k\u00f3d jako verze 2.0.5 \u2013 posledn\u00ed bezpe\u010dn\u00e1 verze z doby, ne\u017e byl plugin prod\u00e1n nov\u00e9mu majiteli. Plugin ji\u017e na WordPress.org nen\u00ed, respektive nen\u00ed dostupn\u00e1 nov\u00e1 instalace. St\u00e1vaj\u00edc\u00ed u\u017eivatel\u00e9 ho v\u0161ak mohou z backendu sv\u00fdch web\u016f aktualizovat.<\/p>\n
T\u00fdm lid\u00ed z Wordfence, v \u010dele s CEO Markem Maunderem, se pustil do stopov\u00e1n\u00ed pachatele, kter\u00fd je za backdoor \u00fatoky zodpov\u011bdn\u00fd. Maunder sledoval stopu nov\u00e9ho majitele a\u017e ke slu\u017eb\u011b zvan\u00e9 WP Devs. Jak je uvedeno na \u00favodn\u00ed stran\u011b firemn\u00edho webu, jedn\u00e1 se o slu\u017ebu specializuj\u00edc\u00ed se na akvizici plugin\u016f, na kter\u00e9 p\u016fvodn\u00ed v\u00fdvoj\u00e1\u0159i nemaj\u00ed \u010das nebo na nich nepracuj\u00ed z jin\u00fdch d\u016fvod\u016f. WP Devs m\u00e1 aktu\u00e1ln\u011b ve spr\u00e1v\u011b 34 dal\u0161\u00edch plugin\u016f.<\/p>\n
Maunder z\u00e1rove\u0148 zjistil, \u017ee za WP Devs stoj\u00ed dv\u011b osoby. Jedna z USA a druh\u00e1 z Ruska.<\/p>\n
A nejen to. Jeden z majitel\u016f WP Devs tvrd\u00ed, \u017ee plugin koupil za 15k USD a pozd\u011bji p\u0159eprodal za 20k USD kalifornsk\u00e9 firm\u011b, kter\u00e1 ho donutila podepsat smlouvu o ml\u010denlivosti. Na kolik se jeho tvrzen\u00ed zakl\u00e1d\u00e1 na pravd\u011b, nen\u00ed v\u016fbec jasn\u00e9. Z\u0159ejm\u011b je to le\u017e jako v\u011b\u017e.<\/p>\n
Podle Maundera je t\u00e9m\u011b\u0159 jist\u00e9, \u017ee a\u0165 u\u017e za z\u00e1ke\u0159n\u00fdm k\u00f3dem stoj\u00ed kdokoliv, nestalo se tak n\u00e1hodou. Hypot\u00e9zu stav\u00ed na skute\u010dnosti, \u017ee verze 2.6.3 (posledn\u00ed \u0161kodliv\u00e1 verze) obsahovala tak\u00e9 bugfix v backdoor k\u00f3du. Znamen\u00e1 to, \u017ee nov\u00fd majitel pluginu p\u0159esn\u011b v\u011bd\u011bl, co d\u011bl\u00e1.<\/p>\n
Maunder z\u00e1rove\u0148 po\u017e\u00e1dal komunitu WordPressu, aby byla v\u016f\u010di pracovn\u00edk\u016fm zodpov\u011bdn\u00fdm za n\u011bkolikan\u00e1sobn\u00e9 um\u00edst\u011bn\u00ed \u0161kodliv\u00e9ho pluginu vl\u00eddn\u00e1 a pochopila, \u017ee v\u011bt\u0161ina z nich d\u011bl\u00e1 svou pr\u00e1ci dobrovoln\u011b. Staraj\u00ed se o ohromn\u00e9 mno\u017estv\u00ed plugin\u016f a obecn\u011b odv\u00e1d\u00ed vynikaj\u00edc\u00ed pr\u00e1ci.<\/p>\n
Jin\u00e9ho n\u00e1zoru jsou David law a White Fir Design. Podle nich by m\u011bl t\u00fdm WordPressu zapracovat na v\u00fdrazn\u00e9m zjednodu\u0161en\u00ed procesu nahl\u00e1\u0161en\u00ed bezpe\u010dnostn\u00edch chyb. Jinak se m\u016f\u017ee st\u00e1t, \u017ee se v budoucnu objev\u00ed jin\u00fd plugin se zadn\u00edmi vr\u00e1tky a bude v repozit\u00e1\u0159i mnohem d\u00e9le.<\/p>\n
D\u00edky usilovn\u00e9 pr\u00e1ci lid\u00ed z Wordfence byl pachatel vystopov\u00e1n. Ve zkratce:<\/p>\n
Maunder kontaktoval p\u016fvodn\u00ed majitelku pluginu Stephanii Wells, kter\u00e1 se velmi ochotn\u011b rozpov\u00eddala o detailech obchodu. Nov\u00fdm majitelem se stal jist\u00fd Mason Soiza, kter\u00fd ji p\u0159es paypal zaplatil 15k USD. Podle v\u0161eho jde o t\u0159iadvacetilet\u00e9ho po\u010d\u00edta\u010dov\u00e9ho program\u00e1tora z Velk\u00e9 Brit\u00e1nie.<\/p>\n
E-mailov\u00e1 adresa, kterou Soiza pou\u017eil p\u0159i transakci, vede na web linkrocket.net. Nyn\u00ed je na n\u011bm pouze logo, nicm\u00e9n\u011b v archivovan\u00e9 verzi z roku 2014 tak\u00e9 t\u0159i e-mailov\u00e9 adresy \u2013 v\u010detn\u011b t\u00e9, kterou Moiza opravdu vyu\u017e\u00edv\u00e1 (mason@linkrocket.com).<\/p>\n
Maunder pou\u017eil vyhled\u00e1va\u010d zvan\u00fd Pipl a na\u0161el spoustu zaj\u00edmav\u00fdch informac\u00ed. Nechyb\u011bla ani LinkedIn fotka, kterou ji\u017e Moiza odstranil.<\/p>\n
T\u00edm v\u0161ak p\u0159\u00edb\u011bh nekon\u010d\u00ed. Jak p\u00e1tr\u00e1n\u00ed pokra\u010dovalo? O tom se do\u010dtete v pokra\u010dov\u00e1n\u00ed \u010dl\u00e1nku, kter\u00e9 publikujeme po v\u00edkendu.<\/p>\n","protected":false},"excerpt":{"rendered":"
Pluginy, kter\u00e9 si lze st\u00e1hnout z WP repozit\u00e1\u0159e, by m\u011bly b\u00fdt v po\u0159\u00e1dku. Vzhledem k obrovsk\u00e9mu mno\u017estv\u00ed se v\u0161ak docela logicky \u010das od \u010dasu objev\u00ed n\u011bjak\u00fd ten men\u0161\u00ed probl\u00e9m. V p\u0159\u00edpad\u011b pluginu Display Widgets jde ov\u0161em o docela velk\u00fd probl\u00e9m. Respektive o nic men\u0161\u00edho ne\u017e zadn\u00ed vr\u00e1tka (angl. backdoor). Plugin Display Widgets byl se zadn\u00edmi<\/p>\n","protected":false},"author":1,"featured_media":4306,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[479],"class_list":["post-4305","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-bezpecnost-wordpressu","tag-wordpress-backdoor"],"_links":{"self":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/4305"}],"collection":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/comments?post=4305"}],"version-history":[{"count":0,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/posts\/4305\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media\/4306"}],"wp:attachment":[{"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/media?parent=4305"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/categories?post=4305"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/affinite.io\/cs\/wp-json\/wp\/v2\/tags?post=4305"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}