#7 - Installing FOCA in Wine On BackTrack or Ubuntu
Previously, we have discussed using FOCA to perform reconnaissance on a target company. FOCA is a windows-based tool. Some people would find this unfortunate. But, since BackTrack (our penetration testing linux distribution of choice) is Ubuntu-based, we smart hackers can install a Windows emulation environment called 'wine' to install Windows-based software. Here's how:
INSTALLING WINE IN UBUNTU / BACKTRACK
Wine is one of the easiest packages to get installed in Ubuntu. Simply open up a terminal and enter the following text to install wine:
sudo apt-get install wine
And, because we'll need 'rar' installed later on to handle an archive we download, enter the following text in the terminal to download and install 'rar'
sudo apt-get install unrar
That's it. You are ready to install some Windows applications.
Once you've confirmed Wine is installed, it's time to move onto downloading FOCA.
You're going to need t trade your email address for a copy of FOCA. Now, now. Don't be frightened. The developers of FOCA simply want to ensure they know who's downloading it. Go this address http://www.informatica64.com/DownloadFOCA/
and enter your email address in the proper text box. You will receive an email detailing how to download FOCA.
DOWNLOADING DLLs THAT MAKE FOCA RUN IN WINE
Unfortunately, FOCA does not run “natively” in Wine, for lack of a better term. FOCA needs some extraneous dll's that are not part of the Wine environment, in order to run.
Lucky for you, the smart hacker, they are freely available on the web. Click on the following link and download the rar archive containing the dlls. RAR is the rough equivalent of ZIP files. Ubuntu should be able to handle them if you install the proper software. Download the DLLs in a rar archive: https://sites.google.com/site/h4ckpl4y3s/DllsFOCA.rar
We'll use this rar archive later, but not until AFTER we install FOCA.
TEACHING OLD WINE NEW TRICKS
There is a script, called "winetricks" that will allow us to install a few extra Windows-based software that will let our Windows programs installed through Wine work better.
You can install "winetricks" by running the following command from the command line:
After you've downloaded "winetricks", you need to make the script executable by running the following command on the command line:
chmod 755 ./winetricks
Once you've made winetricks executable, then you'll need to run it and pass it a handful of packages that we need to install in order for FOCA to run in Wine. Those packages are dotnet20, fontfix and gdiplus. So, what we're going to do is run winetricks and pass it the packages we want to install.
./winetricks dotnet20 fontfix gdiplus
Once it's complete, you'll be returned to the command line.
INSTALLING FOCA IN WINE
Extract the FOCA_Free_2.6.1.zip file to a temporary folder. And then navigate to that folder in terminal, using the 'cd' command to get there.
Then, use the 'msiexec' command to run the Setup.msi file that was extracted.
msiexec /i ./Setup.msi
You will be walked through the installation wizard as seen below.
INSTALLING DLLs TO MAKE FOCA RUN IN WINE
Use Ubuntu's Nautilus file explorer, if you're using Ubuntu (or Konqueror, if you're running BackTrack or the Linux command line), and copy the rar archive containing the dll's we need to make FOCA run in Wine and paste it into the directory where FOCA was installed.
Once you've pasted the DllsFOCA.rar file into the folder, simply right-click and choose the 'Extract Here' menu option. This will create a new folder called XXXX and dump the necessary DLLs into it. Now, just go into that folder, highlight all those DLL files, cut them from that folder and paste them into the “FOCA free” folder. Now, your FOCA install has all the necessary files for FOCA to run.
RUNNING FOCA IN WINE
Browse to: Wine -> Program Files -> Informatica64 -> FOCA free
You should then you should be presented with FOCA's main page. Congratulations!
You're now running FOCA on your Ubuntu / BackTrack box!