.

Was ist Droopescan und wie verwendet man es effektiv?

Website-Recherche ist eines der Elemente eines Sicherheitsaudits. Diese Aufgabe kann bis zu einem gewissen Grad durch die Auswahl eines der kostenlosen, quelloffenen Programme im Internet automatisiert werden. Eines dieser Werkzeuge ist Droopescan.

Was ist Droopescan?

Droopescan ist ein Skript, das die anfängliche Erkundung der geprüften Website beschleunigen kann, wenn es eines der unten aufgeführten CMSs verwendet. Das Skript ermöglicht es, eigene Plugins zu definieren, die eine noch größere Automatisierung des Anfangsprüfungsprozesses erlauben können. Mehr über das Erstellen eigener Plugins, die die Funktionalität des Skripts erweitern, finden Sie in der README.md auf der zuvor verlinkten Tool-Seite auf Github.

Funktionen des Drupal Scanners

Die Fähigkeiten von Droopescan variieren je nach Content-Management-System.

In Drupal sind dies die Funktionen, die es erlauben, zu identifizieren:

  • installierte Plugins,
  • installierte Themes,
  • Pfadwege, die für einen potenziellen Angreifer von Interesse sind (wie das Login-Panel oder die Änderungsprotokolldatei),
  • verwendete Drupal-Version.

In Joomla und WordPress können Sie die Pfadwege identifizieren, die für einen Angreifer von Interesse sind, sowie die verwendete Version dieser Systeme. In einem anderen CMS, Moodle, kann das Droopescan-Tool die installierten Plugins und Themes sowie die verwendete Version des Content-Management-Systems erkennen.

Im Silverstripe-System identifizieren wir:

  • installierte Plugins,
  • installierte Themes,
  • Pfadwege, die für einen Angreifer von Interesse sind,
  • verwendete Silverstripe-Version.

Methoden zur Installation des Skripts

Die Entwickler haben mehrere Methoden zur Installation des Skripts vorbereitet. Wir können die für uns passende Methode wählen, je nach unseren Vorlieben.

Verwendung von pip

Dies ist die vom Ersteller empfohlene Installationsmethode:

apt-get install python-pip pip install droopescan

Manuelle Installation

Um das Skript manuell zu installieren, führen Sie die folgenden Befehle aus:

git clone https://github.com/droope/droopescan.git cd droopescan pip install -r requirements.txt ./droopescan scan --help

Auf der BlackArch-Distribution

Für die Installation auf der BlackArch-Distribution, empfehlen die Ersteller die Verwendung von pacman:

sudo pacman -S droopescan

Docker

Droopescan kann auch als Docker-Container installiert werden:

git clone https://github.com/droope/droopescan.git cd droopescan docker build -t droope/droopescan . # Hilfe anzeigen docker run --rm droope/droopescan # Beispielscannen einer Drupal-Seite docker run --rm droope/droopescan scan drupal -u https://drupal.example.com

Unboxing

Das Droopescan-Skript ist sehr flexibel und ermöglicht es, den Scan wunschgemäß zu konfigurieren. Dank der Einstellungen können wir die Art des Scanvorgangs ändern, einen der verfügbaren Frameworks auswählen, eine Adresse oder eine Liste von Adressen zum Scannen angeben und vieles mehr. Hier ist eine vollständige Liste der konfigurierbaren Optionen.

Befehle

droopescan scan --help

Öffnet eine Liste der verfügbaren Befehle.

droopescan scan

{drupal|joomla|moodle|silverstripe|wordpress}

Startet die Skripte, die für das Scannen der Website mit dem ausgewählten CMS verantwortlich sind.

droopescan scan --debug

Startet die Debug-Ausgabe.

droopescan scan --quiet

Ermöglicht den stillen Modus, bei dem keine Informationen über den laufenden Scan angezeigt werden.

droopescan scan -u {URL} und droopescan scan --url {URL}

Erlauben die Definition des Ziels des Scans.

droopescan scan -U {URL_DATEI} und droopescan scan --url-file {URL_DATEI}

Erlauben die Definition des Dateipfads, in dem sich die zu scannenden Zielwebsites befinden. Die Dateistruktur sollte wie folgt aussehen:

> cat example.txt http://localhost/drupal/8.9.0/ http://localhost/drupal/8.7.1/ http://localhost/drupal/8.9.13/ http://example.com

droopescan scan -e {a, t, p, v, i} und droopescan scan --enumerate {a, t, p, v, i}

Erlauben die Definition dessen, was das Skript scannen soll:

  • p - Plugins,
  • t - Themes,
  • v - Version,
  • i - nützliche Links,
  • a (Standard) - alles.

droopescan scan --method {not_found, forbidden, ok}

Erlaubt die Spezifizierung, welche Art von Fehler als Indikator gilt und ob ein bestimmter Pfad existiert. Für einige Server ist es 403, für andere 404. Standardmäßig versucht das Skript, dies selbst herauszufinden.

droopescan scan --verb {head, get}

Erlaubt die Spezifizierung des Anfragetyp, den das Skript verwenden wird. Die Standardoption ist head.

droopescan scan --number {NUMBER} droopescan scan -n {NUMBER}

Gibt die Anzahl der Wörter an, die im Plugin- oder Theme-Wörterbuch überprüft werden sollen. Standardmäßig sind es tausend. Um alle verfügbaren zu verwenden, sollten Sie all eingeben.

droopescan scan --plugins-base-url {PLUGINS_BASE_URL}

Erlaubt die Spezifizierung des Pfades, wo Plugins im CMS gespeichert sind. Ohne diesen Parameter prüft das Skript den Standardpfad für ein gegebenes System.

droopescan scan --themes-base-url {THEMES_BASE_URL}

Erlaubt die Spezifizierung des Pfades, wo Themes im CMS gespeichert sind. Ohne diesen Parameter prüft das Skript den Standardpfad für ein gegebenes System.

droopescan scan --timeout {TIMEOUT}

Gibt an, wie lange das Skript auf eine HTTP-Antwort warten soll, in Sekunden.

droopescan scan --no-follow-redirects

Durch Aktivierung dieser Option werden Weiterleitungen nicht verfolgt.

droopescan scan --host {HOST}

Überschreibt den Host-Header der Abfrage mit dem angegebenen Wert.

droopescan scan --user-agent {USER_AGENT}

Überschreibt den User-Agent-Header der Abfrage.

droopescan scan --massscan-override

Durch die Verwendung dieser Option werden die Standardwerte durch diejenigen ersetzt, die für das Massenscannen von Hosts geeignet sind.

droopescan scan --threads {THREADS} und droopescan scan -t {THREADS}

Anzahl der verwendeten Threads für das Scannen. Standardmäßig 4.

droopescan scan --threads-identify {THREADS_IDENTIFY}

Anzahl der verwendeten Threads für die CMS-Identifizierung.

droopescan scan --threads-scan {THREADS_SCAN}

Anzahl der verwendeten Threads für das Massenscannen von Hosts.

droopescan scan --threads-enumerate {THREADS_ENUMERATE}

Anzahl der verwendeten Threads für die Plugin-Identifizierung.

droopescan scan --output {standard, json} und droopescan scan -o {standard, json}

Erlaubt die Spezifizierung des Formats der vom Skript zurückgegebenen Ausgabe.

droopescan scan --hide-progressbar

Durch Aktivieren dieser Option kann die Fortschrittsleiste ausgeschaltet werden.

droopescan scan --debug-requests

Durch Aktivieren dieser Option werden die Inhalte aller vom Skript ausgeführten HTTP-Anfragen zusammen mit der erhaltenen Antwort vom Server in die Konsole eingegeben. Durch Aktivieren dieser Option werden Scan-Threading und Fortschrittsleisten deaktiviert.

droopescan scan --error-log {ERROR_LOG}

Erlaubt die Definition der Datei, in die alle Scanfehler protokolliert werden.

droopescan scan --resume

Führt den Scan an der Stelle fort, an der er zuletzt abgeschlossen wurde. Dies ist eine nützliche Option beim Verwenden des Massenscannens.

Beispiel für die Verwendung von Droopescan

Unsere Testseite verwendet Drupal 8.9.15 und enthält eine Liste vieler beliebter Module. Es verwendet ein benutzerdefiniertes Theme, und die Anmeldung im Admin-Panel erfolgt über den Standardpfad.

Um den Scan zu starten, verwenden wir den Befehl:

droopescan scan drupal -u example.com

Sie können das Ergebnis des Scans unten sehen.

➜  droopescan git:(master) docker run --rm droope/droopescan scan drupal -u example.com
modules [ ==                                                ] 224/4000 (5%)[+]  Erhielt eine HTTP 500-Antwort.
modules [ ====                                               ] 287/4000 (7%)[+]  Erhielt eine HTTP 500-Antwort.
modules [ ====                                               ] 288/4000 (7%)[+]  Erhielt eine HTTP 500-Antwort.
modules [ ========                                           ] 626/4000 (15%)[+]  Erhielt eine HTTP 500-Antwort.
modules [ ==============                                     ] 1053/4000 (26%)[+]  Erhielt eine HTTP 500-Antwort.
modules [ ==============                                     ] 1056/4000 (26%)[+]  Erhielt eine HTTP 500-Antwort.
modules [ ================                                   ] 1272/4000 (31%)[+]  Erhielt eine HTTP 500-Antwort.
modules [ ============================                       ] 2227/4000 (55%)[+]  Erhielt eine HTTP 500-Antwort.
modules [ ================================                   ] 2509/4000 (62%)[+]  Erhielt eine HTTP 500-Antwort.
modules [ ===============================================    ] 3746/4000 (93%)[+]  Erhielt eine HTTP 500-Antwort.
[+] Akzeptierte Weiterleitung zu https://www.example.com/
[+] Gefundene Plugins:
    image_widget_crop https://www.example.com/sites/all/modules/image_widget_crop/
    flexslider_views_slideshow https://www.example.com/sites/all/modules/flexslider_views_slideshow/
    service_links https://www.example.com/sites/all/modules/service_links/
    compact_forms https://www.example.com/sites/all/modules/compact_forms/
    strongarm https://www.example.com/sites/default/modules/strongarm/
    video_embed_field https://www.example.com/sites/default/modules/video_embed_field/
    tablefield https://www.example.com/sites/default/modules/tablefield/
    ctools https://www.example.com/modules/contrib/ctools/
        https://www.example.com/modules/contrib/ctools/README.txt
        https://www.example.com/modules/contrib/ctools/LICENSE.txt
    token https://www.example.com/modules/contrib/token/
        https://www.example.com/modules/contrib/token/README.md
        https://www.example.com/modules/contrib/token/LICENSE.txt
    pathauto https://www.example.com/modules/contrib/pathauto/
        https://www.example.com/modules/contrib/pathauto/README.md
        https://www.example.com/modules/contrib/pathauto/LICENSE.txt
    metatag https://www.example.com/modules/contrib/metatag/
        https://www.example.com/modules/contrib/metatag/CHANGELOG.txt
        https://www.example.com/modules/contrib/metatag/README.txt
        https://www.example.com/modules/contrib/metatag/LICENSE.txt
    field_group https://www.example.com/modules/contrib/field_group/
        https://www.example.com/modules/contrib/field_group/CHANGELOG.txt
        https://www.example.com/modules/contrib/field_group/README.txt
        https://www.example.com/modules/contrib/field_group/LICENSE.txt
    google_analytics https://www.example.com/modules/contrib/google_analytics/
        https://www.example.com/modules/contrib/google_analytics/README.md
        https://www.example.com/modules/contrib/google_analytics/LICENSE.txt
    redirect https://www.example.com/modules/contrib/redirect/
        https://www.example.com/modules/contrib/redirect/README.txt
        https://www.example.com/modules/contrib/redirect/LICENSE.txt
    colorbox https://www.example.com/modules/contrib/colorbox/
        https://www.example.com/modules/contrib/colorbox/README.txt
        https://www.example.com/modules/contrib/colorbox/LICENSE.txt
    features https://www.example.com/modules/contrib/features/
        https://www.example.com/modules/contrib/features/LICENSE.txt
    devel https://www.example.com/modules/contrib/devel/
        https://www.example.com/modules/contrib/devel/README.txt
        https://www.example.com/modules/contrib/devel/LICENSE.txt
    admin_toolbar https://www.example.com/modules/contrib/admin_toolbar/
        https://www.example.com/modules/contrib/admin_toolbar/CHANGELOG.txt
        https://www.example.com/modules/contrib/admin_toolbar/README.txt
        https://www.example.com/modules/contrib/admin_toolbar/LICENSE.txt
    better_exposed_filters https://www.example.com/modules/contrib/better_exposed_filters/
        https://www.example.com/modules/contrib/better_exposed_filters/README.txt
        https://www.example.com/modules/contrib/better_exposed_filters/LICENSE.txt
    paragraphs https://www.example.com/modules/contrib/paragraphs/
        https://www.example.com/modules/contrib/paragraphs/README.txt
        https://www.example.com/modules/contrib/paragraphs/LICENSE.txt
    smtp https://www.example.com/modules/contrib/smtp/
        https://www.example.com/modules/contrib/smtp/README.txt
        https://www.example.com/modules/contrib/smtp/LICENSE.txt
    search_api https://www.example.com/modules/contrib/search_api/
        https://www.example.com/modules/contrib/search_api/CHANGELOG.txt
        https://www.example.com/modules/contrib/search_api/README.md
        https://www.example.com/modules/contrib/search_api/LICENSE.txt
    entity_reference_revisions https://www.example.com/modules/contrib/entity_reference_revisions/
        https://www.example.com/modules/contrib/entity_reference_revisions/LICENSE.txt
    linkit https://www.example.com/modules/contrib/linkit/
        https://www.example.com/modules/contrib/linkit/README.md
        https://www.example.com/modules/contrib/linkit/LICENSE.txt
    eu_cookie_compliance https://www.example.com/modules/contrib/eu_cookie_compliance/
        https://www.example.com/modules/contrib/eu_cookie_compliance/README.md
        https://www.example.com/modules/contrib/eu_cookie_compliance/LICENSE.txt
    scheduler https://www.example.com/modules/contrib/scheduler/
        https://www.example.com/modules/contrib/scheduler/README.md
        https://www.example.com/modules/contrib/scheduler/LICENSE.txt
    simple_sitemap https://www.example.com/modules/contrib/simple_sitemap/
        https://www.example.com/modules/contrib/simple_sitemap/README.md
        https://www.example.com/modules/contrib/simple_sitemap/LICENSE.txt
    google_tag https://www.example.com/modules/contrib/google_tag/
        https://www.example.com/modules/contrib/google_tag/README.md
    addtoany https://www.example.com/modules/contrib/addtoany/
        https://www.example.com/modules/contrib/addtoany/README.txt
        https://www.example.com/modules/contrib/addtoany/LICENSE.txt
    advagg https://www.example.com/modules/contrib/advagg/
        https://www.example.com/modules/contrib/advagg/README.md
        https://www.example.com/modules/contrib/advagg/LICENSE.txt
    config_update https://www.example.com/modules/contrib/config_update/
        https://www.example.com/modules/contrib/config_update/README.txt
        https://www.example.com/modules/contrib/config_update/LICENSE.txt
    robotstxt https://www.example.com/modules/contrib/robotstxt/
        https://www.example.com/modules/contrib/robotstxt/README.txt
        https://www.example.com/modules/contrib/robotstxt/LICENSE.txt
    config_filter https://www.example.com/modules/contrib/config_filter/
        https://www.example.com/modules/contrib/config_filter/README.md
        https://www.example.com/modules/contrib/config_filter/LICENSE.txt
    menu_link_attributes https://www.example.com/modules/contrib/menu_link_attributes/
        https://www.example.com/modules/contrib/menu_link_attributes/README.md
        https://www.example.com/modules/contrib/menu_link_attributes/LICENSE.txt
    migrate_plus https://www.example.com/modules/contrib/migrate_plus/
        https://www.example.com/modules/contrib/migrate_plus/README.txt
        https://www.example.com/modules/contrib/migrate_plus/LICENSE.txt
    checklistapi https://www.example.com/modules/contrib/checklistapi/
        https://www.example.com/modules/contrib/checklistapi/README.md
        https://www.example.com/modules/contrib/checklistapi/LICENSE.txt
    config_split https://www.example.com/modules/contrib/config_split/
        https://www.example.com/modules/contrib/config_split/README.md
        https://www.example.com/modules/contrib/config_split/LICENSE.txt
    migrate_tools https://www.example.com/modules/contrib/migrate_tools/
        https://www.example.com/modules/contrib/migrate_tools/README.txt
        https://www.example.com/modules/contrib/migrate_tools/LICENSE.txt
    config_ignore https://www.example.com/modules/contrib/config_ignore/
    schema_metatag https://www.example.com/modules/contrib/schema_metatag/
        https://www.example.com/modules/contrib/schema_metatag/README.txt
        https://www.example.com/modules/contrib/schema_metatag/LICENSE.txt
    tvi https://www.example.com/modules/contrib/tvi/
        https://www.example.com/modules/contrib/tvi/README.txt
        https://www.example.com/modules/contrib/tvi/LICENSE.txt
    svg_image https://www.example.com/modules/contrib/svg_image/
        https://www.example.com/modules/contrib/svg_image/README.md
        https://www.example.com/modules/contrib/svg_image/LICENSE.txt
    link_attributes https://www.example.com/modules/contrib/link_attributes/
        https://www.example.com/modules/contrib/link_attributes/README.md
        https://www.example.com/modules/contrib/link_attributes/LICENSE.txt
    facets https://www.example.com/modules/contrib/facets/
        https://www.example.com/modules/contrib/facets/README.txt
        https://www.example.com/modules/contrib/facets/LICENSE.txt
    yoast_seo https://www.example.com/modules/contrib/yoast_seo/
        https://www.example.com/modules/contrib/yoast_seo/README.txt
        https://www.example.com/modules/contrib/yoast_seo/LICENSE.txt
    panels_everywhere https://www.example.com/modules/contrib/panels_everywhere/
    stage_file_proxy https://www.example.com/modules/contrib/stage_file_proxy/
        https://www.example.com/modules/contrib/stage_file_proxy/README.md
        https://www.example.com/modules/contrib/stage_file_proxy/LICENSE.txt
    entity_reference_display https://www.example.com/modules/contrib/entity_reference_display/
        https://www.example.com/modules/contrib/entity_reference_display/README.md
        https://www.example.com/modules/contrib/entity_reference_display/LICENSE.txt
    we_megamenu https://www.example.com/modules/contrib/we_megamenu/
        https://www.example.com/modules/contrib/we_megamenu/README.md
        https://www.example.com/modules/contrib/we_megamenu/LICENSE.txt
    ckeditor_codemirror https://www.example.com/modules/ckeditor_codemirror/

[+] Keine Themes gefunden.

[+] Mögliche Version(en):
    8.9.10
    8.9.11
    8.9.12
    8.9.13
    8.9.14
    8.9.15
    8.9.16
    8.9.17
    8.9.6
    8.9.7
    8.9.8
    8.9.9


[+] Mögliche interessante URLs gefunden:
    Standard-Admin - https://www.example.com/user/login
    Standard-Änderungsprotokolldatei - https://www.example.com/CHANGELOG.txt

[+] Scan beendet (0:16:25.708460 verstrichen)

CMS-Scanning - Ergebnisse der Analyse

Das Droopescan-Tool hat dabei geholfen, viele der auf der Website verwendeten Module zu identifizieren und Links zu den Dateien bereitzustellen, die diese Identifizierung ermöglicht haben. Das Skript identifizierte die verwendete Drupal-Version als eine mit einem kleinen Update von 8.9.6 auf 8.9.17 und erkannte den Pfad zum Login-Panel und zur Datei CHANGELOG.txt. Leider war es im Fall der geprüften Website nicht möglich, das verwendete Theme zu identifizieren.

Droopescan - Zusammenfassung

Das Droopescan-Skript beschleunigt die anfängliche Erkundung der geprüften Website. Es ist eine schnelle, stabile, ständig aktualisierte Lösung, die es erlaubt, das Scannen mehrerer Websites gleichzeitig zu organisieren und nur Python erfordert. Das Scanergebnis wird auf benutzerfreundliche Weise präsentiert. Es ist möglich, die Ergebnisse im JSON-Format zu speichern, das dann frei bearbeitet werden kann, um zum Beispiel – unter Verwendung einer speziell dafür entwickelten Anwendung – die Ergebnisse auf noch benutzerfreundlichere Weise anzuzeigen oder die Ergebnisse in den nächsten Audit-Schritten zu verwenden. Wenn Sie am Thema der Anwendungssicherheit interessiert sind, kann Ihnen unser Drupal-Support-Team mit ihrem Fachwissen helfen.

As part of Drupal support, we maintain existing websites and expand them with new functionalities