Post by wantafanta on Apr 12, 2017 14:12:24 GMT
Hi,
Took me about three weeks (on and off) of testing, but if you follow my rough set of instructions below, you'll have a working FruityWifi. I'll clean it up at some point, but maybe this will help a few people.
Hardware
1 x Raspberry Pi 3
1 x microSDHC (8GB minimum)
2 x USB Wirelss Adapter (Ralink RT5370)
1 x USB GPS (U-blox7, VK-172) - must be used on a small USB extension cable!
Software
Raspbian (full or lite)
Base Setup
Installing Modules
In the WebUI, enable all modules, except: 3g_4g, bluepand, nmcli, rpitwit, vfeed
Have both SSH and the WebUI open at the same time
metasploit
postgresql
tmux
autostart
tor
fix white text on input boxes
Notes
Took me about three weeks (on and off) of testing, but if you follow my rough set of instructions below, you'll have a working FruityWifi. I'll clean it up at some point, but maybe this will help a few people.
Hardware
1 x Raspberry Pi 3
1 x microSDHC (8GB minimum)
2 x USB Wirelss Adapter (Ralink RT5370)
1 x USB GPS (U-blox7, VK-172) - must be used on a small USB extension cable!
Software
Raspbian (full or lite)
Base Setup
image with rasbian (full or lite)
copy `ssh` file to boot
configure as usual before continuing (sudo raspi-config, setting hostname, setting no-gui bootup, expanding filesystem etc.)
reboot
echo "disabled=1" | sudo tee /etc/wpa_supplicant/wpa_supplicant.conf > /dev/null
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install git python-dev libjpeg8-dev libxml2-dev libxslt1-dev libffi-dev python-pyaudio openvpn sshuttle autossh ntpdate dsniff ngrep nmap libpq-dev tmux postgresql python-setuptools tor sysv-rc-conf
(full) sudo apt-get remove python-pip
sudo easy_install pip
sudo reboot now
sudo ln -s /usr/lib/x86_64-linux-gnu/libjpeg.so /usr/lib
sudo pip install mitmproxy==0.17 capstone
(full) cd /usr/lib/python2.7/dist-packages
(full) sudo mkdir capstone
(full) cd capstone
(full) sudo cp /usr/local/lib/python2.7/dist-packages/usr/lib/python2.7/dist-packages/capstone/libcapstone.so ./
(full) sudo python -c 'import capstone'
sudo git clone https://github.com/CiuffysHub/MITMf /opt/MITMf
cd /opt/MITMf
sudo chmod +x setup-fixed.sh
sudo ./setup-fixed.sh
cd /opt
sudo rm -r /opt/MITMf/
sudo git clone https://github.com/xtr4nge/FruityWifi /opt/FruityWifi
cd /opt/FruityWifi
sudo ./install-FruityWiFi.sh
sudo nano ./install-modules.py
comment out the below lines
==================================================
# cmd_install = "cd /usr/share/fruitywifi/www/modules/"+info['name']+"/includes/; chmod 755 install.sh; ./install.sh;"
# os.system(cmd_install)
==================================================
sudo ./install-modules.py
Installing Modules
http://<ip>:8000
cd /usr/share/fruitywifi/www/modules/
In the WebUI, enable all modules, except: 3g_4g, bluepand, nmcli, rpitwit, vfeed
Have both SSH and the WebUI open at the same time
ap -> edit, choose fruitydns for dns
sudo nano /usr/share/fruitywifi/www/modules/ap/includes/module_action.php
scatter
remove spaces from $opt, before -b
====================================================
# scatter: spoof-ssid.py
if ($worker == "scatter") {
if ($action == "start") {
$opt = "";
if ($mod_filter_scatter_bssid == "1") {
$opt .= "-b $mod_scatter_bssid";
} else {
$opt .= "-b " . getMAC($io_in_iface);
}
if ($mod_filter_scatter_station == "1") $opt .= " -s $mod_scatter_station";
//$exec = "python ap-scatter.py -i mon0 -b $mod_scatter_bssid > /dev/null &";
$exec = "python ap-scatter.py -i mon0 $opt -e $mod_filter_scatter_ssid > /dev/null &";
exec_fruitywifi($exec);
} else if ($action == "stop") {
killRegex("ap-scatter.py");
killRegex("ap-scatter.py");
}
}
====================================================
polite
remove spaces from $opt
move $opt in code to after mon0
====================================================
# polite: spoof-response.py
if ($worker == "polite") {
if ($action == "start") {
if ($mod_filter_scatter_bssid == "1") {
$opt .= "-b $mod_scatter_bssid";
} else {
$opt .= "-b " . getMAC($io_in_iface);
}
//$exec = "python ap-polite.py -i mon0 -s $mod_filter_polite_station -e $mod_filter_polite_ssid -b $use_bssid > /dev/null &";
$exec = "python ap-polite.py -i mon0 $opt -s $mod_filter_polite_station -e $mod_filter_polite_ssid > /dev/null &";
exec_fruitywifi($exec);
} else if ($action == "stop") {
killRegex("ap-polite.py");
killRegex("ap-polite.py");
}
}
====================================================
install order: sudo ./install.sh in <module>\includes\
beef (edit GemFile after first failed install)
cd beef-master/
sudo nano Gemfile
gem 'therubyracer', '0.12.0'
sudo bundle install
cd ../
sudo chown -R fruitywifi:fruitywifi beef-master
bettercap (run the install.sh once, then do the below)
cd bettercap/
sudo bundle install
cd ..
sudo ./install.sh
bdfproxy
-> mitmf
-> fruityproxy
fruitydns
karma
mana
captive (click in web ui)
mdk3
responder
squid3
sslstrip
sslstrip2
ettercap
whatsapp
kismet
sudo kismet_server
sudo nano /etc/default/gpsd
==
DEVICES="/dev/ttyACM0"
==
replace all instances of /dev/USB0 with /dev/ACM0 in module_action.php and index.php
metasploit (below, inc: postgresql, tmux)
metasploit
sudo git clone https://github.com/rapid7/metasploit-framework /opt/metasploit-framework
cd /opt/metasploit-framework
(full) sudo apt-get remove gcc
(full) sudo apt-get install build-essential g++ gcc
sudo bundle install
sudo bash -c 'for MSF in $(ls msf*); do ln -s /opt/metasploit-framework/$MSF /usr/local/bin/$MSF;done'
sudo nano config/database.yml
=================================================================================
production:
adapter: postgresql
database: msf
username: msf
password: msf
host: 127.0.0.1
port: 5432
pool: 75
timeout: 5
=================================================================================
sudo sh -c "echo export MSF_DATABASE_CONFIG=/opt/metasploit-framework/config/database.yml >> /etc/profile"
postgresql
sudo su postgres
createuser msf -P -S -R -D
password: msf
createdb -O msf msf
exit
tmux
sudo nano /etc/systemd/system/tmux@.service
===================================================================================
[Unit]
Description=tmux default session (detached)
Documentation=man:tmux(1)
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/tmux new-session -d -s %I
ExecStop=/usr/bin/tmux kill-server
KillMode=none
[Install]
WantedBy=multiplexer.target
====================================================================================
sudo nano /usr/share/fruitywifi/www/modules/metasploit/includes/module_action.php
replace start with:
==============
$exec = "systemctl start tmux@METASPLOIT";
exec_fruitywifi($exec);
$exec = "tmux send-keys -t METASPLOIT C-z 'msfconsole -r /usr/share/fruitywifi/www/modules/metasploit/includes/handler.rc' C-m";
exec_fruitywifi($exec);
==============
add to stop:
==============
$exec = "systemctl stop tmux@METASPLOIT";
exec_fruitywifi($exec);
==============
autostart
sudo nano /etc/php5/cli/php.ini
short_open_tag = On
sudo nano /etc/rc.local
sleep 5
tor
sudo sysv-rc-conf
# disable auto start
# there are some files that need to be changed, i'll edit this later
fix white text on input boxes
sudo nano /usr/share/fruitywifi/www/css/bootstrap.css
button,input,optgroup,select,textarea{margin:0;font:inherit;color:black}
Notes
nessus (requires local install of nessus)
vfeed (mongodb too much for rpi)
https://github.com/toolswatch/vFeed/archive/v0.6.8.zip
last one with support for local vfeed.db
doesn't search