In diesem letzten Schritt starten Sie die Metasploit-Konsole zum ersten Mal, was den Prozess der Ersteinrichtung auslöst. Dieser beinhaltet die Einrichtung der Datenbank, die Metasploit zur Speicherung von Informationen über Ihre Projekte verwendet, einschließlich Host-Daten, Schwachstellen und gesammelten Beweismitteln.
Um die Konsole zu starten, geben Sie einfach msfconsole in Ihr Terminal ein und drücken Sie die Eingabetaste.
msfconsole
Wenn Sie Metasploit zum ersten Mal ausführen, wird der Assistent für die Ersteinrichtung angezeigt:
** Welcome to Metasploit Framework Initial Setup **
Please answer a few questions to get started.
Would you like to use and setup a new database (recommended)?
Geben Sie yes ein und drücken Sie die Eingabetaste, um mit der Datenbankeinrichtung fortzufahren.
Would you like to use and setup a new database (recommended)? yes
Running the 'init' command for the database:
Creating database at /home/labex/.msf4/db
Creating db socket file at /tmp
Starting database at /home/labex/.msf4/db...waiting for server to start.... done
server started
success
Creating database users
Writing client authentication configuration file /home/labex/.msf4/db/pg_hba.conf
Stopping database at /home/labex/.msf4/db
Starting database at /home/labex/.msf4/db...waiting for server to start.... done
server started
success
Creating initial database schema
Database initialization successful
Database initialization successful
** Metasploit Framework Initial Setup Complete **
Nach Abschluss der Einrichtung sehen Sie das vertraute Metasploit-Banner und die Eingabeaufforderung:
Metasploit tip: Display the Framework log using the log command, learn
more with help log
Call trans opt: received. 2-19-98 13:24:18 REC:Loc
Trace program: running
wake up, Neo...
the matrix has you
follow the white rabbit.
knock, knock, Neo.
(`. ,-,
` `. ,;' /
`. ,'/ .'
`. X /.'
.-;--''--.._` ` (
.' / `
, ` ' Q '
, , `._ \
,.| ' `-.;_'
: . ` ; ` ` --,.._;
' ` , ) .'
`._ , ' /_
; ,''-,;' ``-
``-..__``--`
https://metasploit.com
=[ metasploit v6.4.x-dev- ]
+ -- --=[ 2,564 exploits - 1,315 auxiliary - 1,680 payloads ]
+ -- --=[ 431 post - 49 encoders - 13 nops - 9 evasion ]
Metasploit Documentation: https://docs.metasploit.com/
The Metasploit Framework is a Rapid7 Open Source Project
msf >
Um zu bestätigen, dass die Datenbank korrekt verbunden ist, führen Sie den Befehl db_status innerhalb der Metasploit-Konsole aus.
db_status
Die erwartete Ausgabe lautet:
[*] Connected to msf. Connection type: postgresql.
Dies bestätigt, dass Ihre Metasploit-Instanz erfolgreich mit der PostgreSQL-Datenbank verbunden ist. Um die Metasploit-Konsole zu verlassen, geben Sie einfach exit ein.
exit