rechtstexte für onlineshop
Neuigkeiten
  • Die modified eCommerce Shopsoftware ist kostenlos, aber nicht umsonst.
    Spenden
  • Damit wir die modified eCommerce Shopsoftware auch zukünftig kostenlos anbieten können:
    Spenden
  • Thema: SQL Fehlermeldung und Hackerangriff

    tuvalu

    • Neu im Forum
    • Beiträge: 28
    SQL Fehlermeldung und Hackerangriff
    am: 25. April 2016, 12:00:39
    Gestern spuckte mein Shop ein Dutzend Fehlermeldungen per Email aus, wie z.B. den hier:

    Code: SQL  [Auswählen]
    1064 - You have an error IN your SQL syntax; CHECK the manual that corresponds
    TO your
    MySQL server version FOR the RIGHT syntax TO USE near ')  )  or  (
    pd.products_keywords
    LIKE ('
    %3722=3722%') OR pd.products_description' at line 20
     
    SELECT DISTINCT
                        p.products_manufacturers_model,
                        p.products_id,
                        p.products_ean,
                        p.products_quantity,
                        p.products_shippingtime,
                        p.products_model,
                        p.products_image,
                        p.products_price,
                        p.products_weight,
                        p.products_tax_class_id,
                        p.products_fsk18,
                        p.products_vpe,
                        p.products_vpe_status,
                        p.products_vpe_value,
                        pd.products_name,
                        pd.products_short_description,
                        pd.products_description FROM products AS p LEFT JOIN
    products_description AS pd ON (p.products_id = pd.products_id)  LEFT OUTER
    JOIN
    products_attributes AS pa ON (p.products_id = pa.products_id) LEFT OUTER JOIN
    products_options_values AS pov ON (pa.options_values_id =
    pov.products_options_values_id)
    LEFT OUTER JOIN specials AS s ON (p.products_id = s.products_id) AND s.status =
    '1'
      WHERE p.products_status = 1
      AND pd.language_id = '2' AND (  ( pd.products_keywords LIKE ('%bomz%') OR
    pd.products_description LIKE ('%bomz%') OR pd.products_short_description LIKE
    ('%bomz%')
    OR pd.products_meta_keywords LIKE ('%bomz%') OR pd.products_name LIKE ('%bomz%')
    OR
    p.products_model LIKE ('%bomz%') OR p.products_ean LIKE ('%bomz%') OR
    p.products_manufacturers_model LIKE ('%bomz%') OR pd.products_meta_keywords
    LIKE
    ('%bomz%') OR pa.attributes_model LIKE ('%bomz%') OR pa.attributes_ean LIKE
    ('%bomz%') OR
    (pov.products_options_values_name LIKE ('%bomz%') AND pov.language_id = '2') AND
    pd.products_autor LIKE ('%bomz%') OR pd.products_keywords LIKE ('%bomz%') OR
    pd.products_meta_keywords LIKE ('%bomz%')   )  AND  ( pd.products_keywords
    LIKE
    ('%-7916%\'%') OR pd.products_description LIKE ('%-7916%\'%') OR
    pd.products_short_description LIKE ('%-7916%\'%') OR pd.products_meta_keywords
    LIKE
    ('%-7916%\'%') OR pd.products_name LIKE ('%-7916%\'%') OR p.products_model
    LIKE
    ('%-7916%\'%') OR p.products_ean LIKE ('%-7916%\'%') OR
    p.products_manufacturers_model
    LIKE ('%-7916%\'%') OR pd.products_meta_keywords LIKE ('%-7916%\'%') OR
    pa.attributes_model LIKE ('%-7916%\'%') OR pa.attributes_ean LIKE ('%-7916%\'%')
    OR
    (pov.products_options_values_name LIKE ('%-7916%\'%') AND pov.language_id = '2')
    AND
    pd.products_autor LIKE ('%-7916%\'%') OR pd.products_keywords LIKE
    ('%-7916%\'%') OR
    pd.products_meta_keywords LIKE ('%-7916%\'%')   )  )  )  )  OR  (
    pd.products_keywords
    LIKE ('%3722=3722%') OR pd.products_description LIKE ('%3722=3722%') OR
    pd.products_short_description LIKE ('%3722=3722%') OR pd.products_meta_keywords
    LIKE
    ('%3722=3722%') OR pd.products_name LIKE ('%3722=3722%') OR p.products_model
    LIKE
    ('%3722=3722%') OR p.products_ean LIKE ('%3722=3722%') OR
    p.products_manufacturers_model
    LIKE ('%3722=3722%') OR pd.products_meta_keywords LIKE ('%3722=3722%') OR
    pa.attributes_model LIKE ('%3722=3722%') OR pa.attributes_ean LIKE
    ('%3722=3722%') OR
    (pov.products_options_values_name LIKE ('%3722=3722%') AND pov.language_id =
    '2') AND
    pd.products_autor LIKE ('%3722=3722%') OR pd.products_keywords LIKE
    ('%3722=3722%') OR
    pd.products_meta_keywords LIKE ('%3722=3722%')   )  AND  (  (  (  (
    pd.products_keywords
    LIKE ('%\'%\'=\'%') OR pd.products_description LIKE ('%\'%\'=\'%') OR
    pd.products_short_description LIKE ('%\'%\'=\'%') OR pd.products_meta_keywords
    LIKE
    ('%\'%\'=\'%') OR pd.products_name LIKE ('%\'%\'=\'%') OR p.products_model
    LIKE
    ('%\'%\'=\'%') OR p.products_ean LIKE ('%\'%\'=\'%') OR
    p.products_manufacturers_model
    LIKE ('%\'%\'=\'%') OR pd.products_meta_keywords LIKE ('%\'%\'=\'%') OR
    pa.attributes_model LIKE ('%\'%\'=\'%') OR pa.attributes_ean LIKE ('%\'%\'=\'%')
    OR
    (pov.products_options_values_name LIKE ('%\'%\'=\'%') AND pov.language_id = '2')
    AND
    pd.products_autor LIKE ('%\'%\'=\'%') OR pd.products_keywords LIKE
    ('%\'%\'=\'%') OR
    pd.products_meta_keywords LIKE ('%\'%\'=\'%')   )  ) GROUP BY p.products_id
    ORDER BY
    p.products_id  
     
    Request URL:
    www.twilightbooks.de/advanced_search_result.php?MODsid=i9p57l1gqut3enji4uavd4lle
    7&keywords_autor=-7916%25%27%29%29%29%20OR%203722%3D3722%20AND%20%28%28%28%27%25
    %27%3D%27&keywords_titel=&keywords=bOmz

     
    [XT SQL Error]

    Offenbar hat jemand mit einem SQL-Tool den Shop abgeklopft. Stört mich ja nicht, nur die Fehlermeldungen dürften ja nicht da sein. Bei einigen Eingaben hat der Shop auch brav 0 oder alle Produkte als Treffer ausgegeben und keinen Fehler. Die Suche ist modifiziert, hat zwei weitere Suchfelder bekommen und funktioniert ansonsten problemlos.

    Muß ich mir da jetzt Sorgen machen?

    Shop: 1.06 SP3, PHP 5.6, modifizierte advanced_search_result.php

    Linkback: https://www.modified-shop.org/forum/index.php?topic=34879.0

    hpzeller

    • Experte
    • Beiträge: 4.129
    • Geschlecht:
    Re: SQL Fehlermeldung und Hackerangriff
    Antwort #1 am: 25. April 2016, 12:14:58
    [...]
    Offenbar hat jemand mit einem SQL-Tool den Shop abgeklopft. Stört mich ja nicht, nur die Fehlermeldungen dürften ja nicht da sein.
    [...]

    Wichtig ist das ein Hacker keine SQL-Injection durchführen kann und dies scheint ihm ja offensichtlich nicht gelungen zu sein, das bei solchen Aktionen SQL-Fehler auftreten ist nicht immer auszuschliessen, insbesondere dann, wenn die Kommunikation von PHP mit der Datenbank via der Erweiterung "msql" stattfindet, wie das bei der Shopversion 1.06 der Fall ist, wo keine "Prepared Statements" möglich sind.

    PS:
    Einem Kunde bzw. einem Hacker wird nur mitgeteilt, dass ein SQL-Fehler aufgetreten ist, aber den Inhalt der Fehlermeldung sieht er nicht, den siehst nur du in der Email, oder wenn du die Ursache für die Fehlermeldung im Browser nachstellst und dabei als Admin im Shop angemeldet bist. Es ist somit einem Hacker nicht möglich aufgrund des Inhalts einer Fehlermeldung Rückschlüsse aus seinem Angriff zu ziehen.

    Gruss
    Hanspeter

    tuvalu

    • Neu im Forum
    • Beiträge: 28
    Re: SQL Fehlermeldung und Hackerangriff
    Antwort #2 am: 25. April 2016, 17:09:12
    :thx:

    Michael
    60 Antworten
    22785 Aufrufe
    01. August 2014, 20:47:44 von supernova
    37 Antworten
    17021 Aufrufe
    18. April 2018, 12:37:14 von p3e
    16 Antworten
    10855 Aufrufe
    03. Januar 2010, 18:12:49 von BalmyBeads
    9 Antworten
    4964 Aufrufe
    04. Februar 2013, 22:17:04 von cYbercOsmOnauT
               
    anything