Link - kod wstrzykiwany przez Chrome do sktyptu

estrefa

Avatar: estrefa

2012-02-14 21:00

Witam
Czy spotkaliście się z sytuacją, że na waszej stronie pojawiają się nagle linki do innych stron bez waszej akceptacji. Podczas eksperymentów z Q.C nagle zauważyłem link do strony - nieważne - jakaś reklama - po powtórnym wejściu juz tego linku nie było.
Po przeanalizowaniu historii, link wstrzykiwał skrypt:
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// TODO(arv): Namespace
/**
* The local strings get injected into the page using a variable named
* {@code templateData}. This class provides a simpler interface to access those
* strings.
*
* @param {Object} opt_templateData Optional object containing translated
* strings. If this is not supplied during construction, it can be
* assigned to the templateData property after construction. If all else
* fails, the value of window.templateDate will be used.
* @constructor
*/
function LocalStrings(opt_templateData) {
this.templateData = opt_templateData;
}

// Start of anonymous namespace.
(function() {

/**
* Returns a formatted string where $1 to $9 are replaced by the second to the
* tenth argument.
* @param {string} s The format string.
* @param {...string} The extra values to include in the formatted output.
* @return {string} The string after format substitution.
*/
function replaceArgs(s, args) {
return s.replace(/\$[$1-9]/g, function(m) {
return (m == '$$') ? '$' : args[m[1]];
});
}

/**
* Returns a string after removing Windows-style accelerators.
* @param {string} s The input string that may contain accelerators.
* @return {string} The resulting string with accelerators removed.
*/
function trimAccelerators(s) {
return s.replace(/&{1,2}/g, function(m) {
return (m == '&&') ? '&' : '';
});
}

LocalStrings.prototype = {
/**
* The template data object.
* @type {Object}
*/
templateData: null,

/**
* Gets a localized string by its id.
* @param {string} s The ID of the string we want.
* @return {string} The localized string.
*/
getString: function(id) {
// TODO(arv): We should not rely on a global variable here.
return (this.templateData || window.templateData)[id] || '';
},

/**
* Returns a formatted localized string where $1 to $9 are replaced by the
* second to the tenth argument.
* @param {string} id The ID of the string we want.
* @param {...string} The extra values to include in the formatted output.
* @return {string} The formatted string.
*/
getStringF: function(id, var_args) {
return replaceArgs(this.getString(id), arguments);
},
};

// End of anonymous namespace.
})();

Czy wiecie o co tu chodzi ?
Ja jestem tylko amatorem.
Pozdrawiam

» Quick.Cart v3.x

openzibi

Avatar: openzibi

2012-02-14 21:26

estrefa
1. Podaj link do strony
2. ZMIEŃ hasło do FTP
3. AKTUALIZUJ program FTP do najnowszej wersji
4. Podejrzyj żródło np. strony głownej i sprawdz czy nie masz jkaiegoś iframe z dziwnym kodem

Oczywiście zakładam że masz na swoim komputerze firewall i program antywirusowy.
Nie da Ci to NIGDY gwarancji 100% ale ograniczy ryzyko zagrozeń.


-------------------------------------------------------
hosting-domeny-strony - http://www.rhh.pl

estrefa

Avatar: estrefa

2012-02-14 21:45

Jestem świadomy w/w zagrożeń. Mam firewalla i program antywirusowy, nic nie instaluje z netu i naprawdę uważam.
Co do linku do strony to była strona testowa.. nic specjalnego - trzy dni w necie.

Nie miałem iframe z kodem.

Jestem naprawdę zaskoczony - nigdy wcześniej nie miałem nic takiego.
Gdyby nie historia przeglądania to nie dał bym wiary, że można mieć nieproszone linki na swojej stronie.

Pytanie - dziura w skrypcie, dziura w moim systemie, czy Google znalazło nowy sposób na reklamę ...

treewood (OpenSolution)

Avatar: treewood

2012-02-14 22:08

http://code.google.com/p/googlereaderplus/source/browse/trunk/GoogleReaderPlus/test/resources/js/local_strings.js?r=1025 - na to wychodzi, ze masz jakis google reader w chrome ...

estrefa

Avatar: estrefa

2012-02-14 22:13

O kurcze - a co to jest i jak to usunąć ???

Do góry
o nas | kontakt