SMBExec – Install and Load error: Make sure the Ruby gems are installed properly, run bundle install

Install SMBExec 
1.) Download SMBExec 2.0 (https://github.com/brav0hax/smbexec)

cd /opt

git clone https://github.com/brav0hax/smbexec.git 

2.) Install the mingw32 packages (http://www.mingw.org/)

apt-get install mingw32

3.) Change to /opt/smbexec

./install.sh

(Choose Option 1 for KALI Linux 2.0)

4.) Get Version 1.0 of NTDSXtract (http://www.ntdsxtract.com/)

wget http://www.ntdsxtract.com/downloads/ntdsxtract/ntdsxtract_v1_0.zip

5.) Remove the installed Version (1.3.3) of NTDSXtract

cd /opt

rm -rf NTDSXract

unzip ntdstract_v1_0.zip

mv “NTDSXtract 1.0” NTDSXtract

———-

When you load if you get the following errors.

root@kali:/opt/smbexec# smbexec

cannot load such file — nmap/xml

Load error: Make sure the Ruby gems are installed properly, run bundle install

Fix

/opt/smbexec# apt-get install ruby-dev

/opt/smbexec# bundle install