Nmap won't run any scripts

22,388

In Nmap 6.46BETA6, the smb-check-vulns script was split into 6 different scripts:

You can run any specific checks you like, or all of them with --script smb-vuln-*, but be aware that many of these can cause a blue screen or other crash on the scanned system. Previously, these required you to add --script-args unsafe=1, so we added these scripts to the "dos" category so you can rule them out with --script "smb-vulns-* and not dos"

Share:
22,388

Related videos on Youtube

user2762312
Author by

user2762312

Updated on September 18, 2022

Comments

  • user2762312
    user2762312 almost 2 years

    When I try to run a Nmap script on Kali Linux I get the following:

    root@known:~# nmap --script smb-check-vulns.nse 192.168.1.111
    
    Starting Nmap 7.00 ( https://nmap.org ) at 2015-12-04 03:45 EST
    NSE: failed to initialize the script engine:
    /usr/bin/../share/nmap/nse_main.lua:801: 'smb-check-vulns.nse' did not match a category, filename, or directory
    stack traceback:
        [C]: in function 'error'
        /usr/bin/../share/nmap/nse_main.lua:801: in function 'get_chosen_scripts'
        /usr/bin/../share/nmap/nse_main.lua:1249: in main chunk
        [C]: in ?
    QUITTING!
    

    As far as I can tell this seems like a new error. I am running the latest version of Kali Linux as of December 4, 2015. I've tried a few variations of introducing the script such as:

    root@known:~# nmap --script=smb-check-vulns.nse <ip>
    

    Thanks for the help.

    • Dmitry Grigoryev
      Dmitry Grigoryev over 8 years
      I'd say nmap cannot find your script. Are you sure the name is right and it's in the right directory?
    • spoorlezer
      spoorlezer over 7 years
      +1 ^This was the case for me. The name of the smb script was slightly different than documented on the nmap page for it. No doubt due to updates. Just to be sure, I also updated the scriptdb so I had the latest versions of everything and ran the script again. No issue after.
  • user2762312
    user2762312 over 8 years
    I'm sorry, I wasn't clear enough, absolutely no script works with or without the unsafe arg for nmap. I get the same error as above
  • user2762312
    user2762312 over 8 years
    I just reinstalled nmap and it won't run any scripts still. every other function seems to work, just not the scripts function
  • bonsaiviking
    bonsaiviking over 8 years
    @user2762312 Try nmap --script-updatedb, then make sure /usr/share/nmap/scripts/script.db has about 513 lines beginning "Entry". Did you install from kali repositories both times using apt-get?