Hey, I've been recently using metasploit I was wondering if anyone has a script for it so it checks a machine for any vulnerablilties? It would be a great help since it would be faster than checking all of them by hand. Thank you for the help in advance![]()
You can also run Nessus on the machine to scan for vulnerabilities and then import this into metasploit using db_autopwn.I was wondering if anyone has a script for it so it checks a machine for any vulnerablilties?
-Monkeys are like nature's humans.
NoteHave you setup the database? Is it running?msf > db_create test
createdb: could not connect to database postgres: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
[-] Error while running command db_create: Broken pipe
I'm a compulsive post editor, you might wanna wait until my post has been online for 5-10 mins before quoting it as it will likely change.
I know I seem harsh in some of my replies. SORRY! But if you're doing something illegal or posting something that seems to be obvious BS I'm going to call you on it.
I tried using metasploit, but I am having a problem with the db_hosts command. Can anyone help me out?
EDIT:Code:msf > db_postgres [-] Unknown command: db_postgres. msf > load db_postgres[*] Successfully loaded plugin: db_postgres msf > db_create CREATE DATABASE ERROR: table "hosts" does not exist NOTICE: CREATE TABLE will create implicit sequence "hosts_id_seq" for serial column "hosts.id" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "hosts_pkey" for table "hosts" NOTICE: CREATE TABLE / UNIQUE will create implicit index "hosts_address_key" for table "hosts" ERROR: table "services" does not exist NOTICE: CREATE TABLE will create implicit sequence "services_id_seq" for serial column "services.id" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "services_pkey" for table "services" ERROR: table "vulns" does not exist NOTICE: CREATE TABLE will create implicit sequence "vulns_id_seq" for serial column "vulns.id" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "vulns_pkey" for table "vulns" ERROR: table "refs" does not exist NOTICE: CREATE TABLE will create implicit sequence "refs_id_seq" for serial column "refs.id" NOTICE: CREATE TABLE / PRIMARY KEY will create implicit index "refs_pkey" for table "refs" ERROR: table "vulns_refs" does not exist[*] Database creation complete (check for errors) [-] Error while running command db_create: This plugin failed to load: Failed to connect to the database Call stack: /pentest/exploits/framework3/plugins/db_postgres.rb:127:in `cmd_db_create' ./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:77 msf > db_hosts [-] Unknown command: db_hosts.
Sorry thorin I deleted my post before you posted. Can someone link me to a tutorial. I found 2 and each show diffrent things. Both of them don't work.
Is there any specific reason that you are using postgres instead of sqlite? As I have understood it is generally considered to be a better option than postgres. Give it a try and see if you have any better luck with that.
-Monkeys are like nature's humans.
you must use "load " to load the sql script.
msf>load db_sqlite3
msf>db_create
msf>db_nmap
msf>db_autopwn