Code Monkey home page Code Monkey logo

dockerfile-msf's People

Contributors

phocean avatar r0mdau avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dockerfile-msf's Issues

Failed to connect to the database

[root@server]~❯❯❯ docker run -it -p 29000-30000:29000-30000 --net=host -v ${HOME}/.msf4:/root/.msf4 -v /tmp/msf:/tmp/data  --name msf phocean/msf           [7/92]
 * Starting PostgreSQL 9.5 database server                                                                                                             [ OK ]
root@server:/# msfconsole

# cowsay++
 ____________
< metasploit >
 ------------
       \   ,__,
        \  (oo)____
           (__)    )\
              ||--|| *


       =[ metasploit v4.16.22-dev-                        ]
+ -- --=[ 1706 exploits - 970 auxiliary - 299 post        ]
+ -- --=[ 503 payloads - 40 encoders - 10 nops            ]
+ -- --=[ Free Metasploit Pro trial: http://r-7.co/trymsp ]

msf > db_status
[*] postgresql selected, no connection
msf > db_connect -y
[-] Error while running command db_connect: Failed to connect to the database: FATAL:  role "root" does not exist


Call stack:
/opt/metasploit-framework/embedded/framework/lib/msf/ui/console/command_dispatcher/db.rb:1827:in `db_connect_postgresql'
/opt/metasploit-framework/embedded/framework/lib/msf/ui/console/command_dispatcher/db.rb:1705:in `cmd_db_connect'
/opt/metasploit-framework/embedded/framework/lib/rex/ui/text/dispatcher_shell.rb:548:in `run_command'
/opt/metasploit-framework/embedded/framework/lib/rex/ui/text/dispatcher_shell.rb:510:in `block in run_single'
/opt/metasploit-framework/embedded/framework/lib/rex/ui/text/dispatcher_shell.rb:504:in `each'
/opt/metasploit-framework/embedded/framework/lib/rex/ui/text/dispatcher_shell.rb:504:in `run_single'
/opt/metasploit-framework/embedded/framework/lib/rex/ui/text/shell.rb:206:in `run'
/opt/metasploit-framework/embedded/framework/lib/metasploit/framework/command/console.rb:48:in `start'
/opt/metasploit-framework/embedded/framework/lib/metasploit/framework/command/base.rb:82:in `start'
/opt/metasploit-framework/bin/../embedded/framework/msfconsole:48:in `<main>'

Dockerhub image fails start postgres

When it's successful...

If I clone the repo, and build the image directly, and then run it, it works.

docker build -t msf .
docker run --rm -it msf

Success

When it's not successful...

However, if I pull the image from Dockerhub, that throws an error around starting Postgres:

docker pull phocean/msf
docker run --rm -it phocean/msf

Fail

Maybe it's me?

There's a very good chance I'm just missing something fundamental here, but I had the same thing happen on my Mac which is why I switched to a debian-based VM to try it and got the same result.

/usr/bin/env: ‘python3’: No such file or directory

root@msf:/opt/metasploit-framework# ./msfconsole 
[!] The following modules could not be loaded!..-
[!]     /opt/metasploit-framework/modules/auxiliary/gather/office365userenum.py
[!]     /opt/metasploit-framework/modules/auxiliary/scanner/http/rdp_web_login.py
[!] Please see /root/.msf4/logs/framework.log for details.

the log

[03/29/2021 11:11:51] [i(0)] core: Database doesn't exist "msfdb", attempting to create it.
[03/29/2021 11:11:55] [d(0)] core: Created user based module store
[03/29/2021 11:11:58] [e(0)] core: Dependency for windows/encrypted_shell_reverse_tcp is not supported
[03/29/2021 11:11:58] [e(0)] core: Dependency for windows/x64/encrypted_shell_reverse_tcp is not supported
[03/29/2021 11:11:58] [e(0)] core: Dependency for windows/x64/encrypted_reverse_tcp is not supported
[03/29/2021 11:11:58] [e(0)] core: Dependency for windows/encrypted_reverse_tcp is not supported
[03/29/2021 11:11:58] [e(0)] core: /opt/metasploit-framework/modules/auxiliary/gather/office365userenum.py failed to load - LoadError  Try running file manually to check for errors or dependency issues.
[03/29/2021 11:11:58] [e(0)] core: Unexpected output running /opt/metasploit-framework/modules/auxiliary/scanner/http/rdp_web_login.py:
/usr/bin/env: ‘python3’: No such file or directory

[03/29/2021 11:11:58] [e(0)] core: /opt/metasploit-framework/modules/auxiliary/scanner/http/rdp_web_login.py failed to load - LoadError  Try running file manually to check for errors or dependency issues.

maybe need to install python3?

can't run

hi, trying to follow directions i get this

docker run --rm -i -t -p 9990-9999:9990-9999 -v /home/<USER>/.msf4:/root/.msf4 -v /tmp/msf:/tmp/data --name msf phocean/msf

bash: USER: No such file or directory

How to add ifconfig and update NMAP

Hi,
Can you pleased add all the net-tools to the image including ifconfig ,ping etc.
I tried the apt install net-tools command but it didn't work.
Also please update nmap to 7.80.

Unable to start the container, postgres ipv6 issue

I can't get the container to start. I've used docker before on this machine (Ubuntu 18.04) for some things. I type:

sudo service postgresql stop  # I tried this after seeing the error message but it doesn't help
docker run --rm -i -t -p 9990-9999:9990-9999 -v $HOME/.msf4:/root/.msf4 -v /tmp/msf:/tmp/data --name msf phocean/msf

I get:

Error: /usr/lib/postgresql/10/bin/pg_ctl /usr/lib/postgresql/10/bin/pg_ctl start -D /var/lib/postgresql/10/main -l /var/log/postgresql/postgresql-10-main.log -s -o  -c config_file="/etc/postgresql/10/main/postgresql.conf"  exited with status 1: 
2020-11-04 07:35:25.261 UTC [29] LOG:  listening on IPv4 address "127.0.0.1", port 5432
2020-11-04 07:35:25.261 UTC [29] LOG:  could not bind IPv6 address "::1": Cannot assign requested address
2020-11-04 07:35:25.261 UTC [29] HINT:  Is another postmaster already running on port 5432? If not, wait a few seconds and retry.
2020-11-04 07:35:25.355 UTC [29] LOG:  listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2020-11-04 07:35:25.560 UTC [30] LOG:  database system was interrupted; last known up at 2020-09-26 21:23:58 UTC
pg_ctl: server did not start in time
                                                                         [fail]

any ideas?

nfc tool

Hi,

First of all, great job ! thanks for that.
My "issue" is more a question. Do you thing to put the nfc tool on it one day ?

Msfvenom "Error: Invalid option"

Hello,

I followed your instruction to build the container, and then i started the container with Metaspoit included.

When I wanted to create a meterpreter binary for Windows (i followed your article published in MISC HS 14) with the command below :
=> "msfvenom -p windows/meterpreter/reverse_tcp LPRT=9999 LHOST=192.168.0.145 -a x86 -f exe > /tmp/data/meterevil.exe"

it always says : "Error: Invalid option" But the binary is "built" Anyway.

If i install Metasploit in a Vbox VM and use the exactly same command, there is no error and the binary is built.

Do you have any idea why this error appears with the container ?
Did i make a mistake ?

Thanks you for your helps,

Best Regards

Fred

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.