Metasploit: Mysql-Fehler
Ich habe heute ein wenig mit Metasploit und dem auto_pwm Modul herumgespielt. Das hat auch schon einmal ganz gut funktioniert, allerdings ging es nach einem Update von Metasploit nicht mehr. Auch nach der Verbindung mittels dbconnect brach er beim Befehl db_hosts ab.
msf > db_hosts
[-] Error while running command db_hosts: Mysql::Error: Lost connection to MySQL server during query: SELECT * FROM hosts
Call stack:
/var/lib/gems/1.8/gems/activerecord-1.14.2/lib/active_record/ connection_adapters/abstract_adapter.rb:120:in `log’
/var/lib/gems/1.8/gems/activerecord-1.14.2/lib/active_record/ connection_adapters/mysql_adapter.rb:185:in `execute’
/var/lib/gems/1.8/gems/activerecord-1.14.2/lib/active_record/ connection_adapters/mysql_adapter.rb:337:in `select’
/var/lib/gems/1.8/gems/activerecord-1.14.2/lib/active_record/ connection_adapters/mysql_adapter.rb:176:in `select_all’
/var/lib/gems/1.8/gems/activerecord-1.14.2/lib/active_record/ base.rb:390:in `find_by_sql’
/var/lib/gems/1.8/gems/activerecord-1.14.2/lib/active_record/ base.rb:924:in `find_every’
/var/lib/gems/1.8/gems/activerecord-1.14.2/lib/active_record/ base.rb:381:in `find’
./lib/msf/core/db_objects.rb:35:in `find’
/usr/lib/ruby/1.8/thread.rb:135:in `synchronize’
./lib/msf/core/db_objects.rb:34:in `find’
./lib/msf/core/db.rb:160:in `hosts’
./lib/msf/core/db.rb:151:in `each_host’
./lib/msf/ui/console/command_dispatcher/db.rb:47:in `cmd_db_hosts’
./lib/rex/ui/text/dispatcher_shell.rb:234:in `send’
./lib/rex/ui/text/dispatcher_shell.rb:234:in `run_command’
./lib/rex/ui/text/dispatcher_shell.rb:196:in `run_single’
./lib/rex/ui/text/dispatcher_shell.rb:191:in `each’
./lib/rex/ui/text/dispatcher_shell.rb:191:in `run_single’
./lib/rex/ui/text/shell.rb:125:in `run’
./msfconsole:78
Abhilfe schaffte diese Anleitung. Damit werden die fehlenden Bibliotheken nachinstalliert, die seit neuem benötigt werden. Anschließend noch ein gem install rails
und gut ist es. Jetzt sollte das Spielzeug wieder gehen.