Jump to content
Onus

Questions about wp6.sh

Recommended Posts

I'm not the greatest at this but can someone please tell me why every time I run Autodetect it says No Wifi Pineapple connected? I literally thought I had figured it out while laying in bed then got back up only to come up short again after spending another hour on it.

Run this with the WiFi Pineapple connected and let me know the output:

ifconfig | grep 00:c0:ca

Also if the output is nothing at all, can you also provide the output of "ifconfig -a"

Thanks!

Share this post


Link to post
Share on other sites
#!/bin/bash

# eth1 below should be the wifi pineapple interface

ifconfig eth1 172.16.42.42 netmask 255.255.255.0 up #Bring up wifi pineapple interface
echo '1' > /proc/sys/net/ipv4/ip_forward # Enable IP Forwarding
iptables -X #clear chains and rules
iptables -F

#If you're using NAT on a VM, the value after "-i" should always be the same (update with your NAT interface's gateway address (usually either x.x.x.1 or x.x.x.2 where x.x.x = the first 3 octets of your IP address))
#If you use Bridged on a VM, replace the value after "-i" with your router/gateway's IP

#If you're on a physical machine, the value after "-i" should be your router/gateway's IP

#The value after "-o" should be the wifi pineapple interface (ex. eth1)

iptables -A FORWARD -i 172.16.246.2 -o eth1 -s 172.16.42.0/24 -m state --state NEW -j ACCEPT#setup IP forwarding
iptables -A FORWARD -m state --state ESTABLISHED,RELATED -j ACCEPT
iptables -A POSTROUTING -t nat -j MASQUERADE
route del default #remove default route

#If you're using NAT on a VM, the value following "gw" should always be the same
#If you use Bridged on a VM or are on a physical machine, replace the value after "gw" with the internet gateway/router
#The value after the gateway/router should be the interface with the internet connection (eg. eth0)

route add default gw 172.16.246.2 eth0 #add default gateway

Hammerhead, here is a quick and dirty script with comments to help out that I threw together to get mine working while they work on an official fix. Hopefully it helps someone.

This is basically what the wp6 script is a front-end for and I'm trying to make it as simple as possible while supporting various network configurations. I wish I had a photo of my face of disapproval when Seb showed me the new interface name format implemented in Ubuntu 15.10. *sigh*

Share this post


Link to post
Share on other sites

Darren,

Thanks for the new video and the updated script. I hate to do this to you but for some reason kali linux terminal is not showing up the prompts for manual configuration. Granted, I had to go into the script to set the default gateway. I saved it and restarted the script and said yes to the "saved" settings.

I noticed this because I still get an error when I allow the script to auto-detect settings.

QdB6ikb.png

Notice that while the interfaces and ip addresses are correct I still get errors.

Here is what I get if I try to manually configure the settings.

By8Bn3P.png

gUDkSxg.png

Perhaps my terminal settings are improperly configured.

Thank you very much for the hard work and the prompt responses.

Share this post


Link to post
Share on other sites

Run this with the WiFi Pineapple connected and let me know the output:

ifconfig | grep 00:c0:ca

Also if the output is nothing at all, can you also provide the output of "ifconfig -a"

Thanks!

Thanks for the amazingly quick response. Hope the image helps figure out what I'm not seeing.

post-52664-0-62924000-1453796045_thumb.p

Share this post


Link to post
Share on other sites

I see the problem now. I'll need to make an update to wp6.sh. I didn't realize the version of ifconfig on Kali differed from that of Ubuntu. Odd. This explains the problems for ZaraByte, HammerHead and Mistersippi.

Mistersippi -- your ifconfig output isn't even showing the NANO. What's the output of "lsusb" on that Kali box?

Share this post


Link to post
Share on other sites

This is basically what the wp6 script is a front-end for and I'm trying to make it as simple as possible while supporting various network configurations. I wish I had a photo of my face of disapproval when Seb showed me the new interface name format implemented in Ubuntu 15.10. *sigh*

Yep, I copied and pasted directly from your config, then manually replaced the options. I didn't have an Ubuntu VM, or I would have done more digging. Sounds like a fix should be coming shortly now that you're aware of the issue. Hopefully it doesn't cause you to need multiple versions of the script. I guess worst case the first question could be: Which OS are you running?

Share this post


Link to post
Share on other sites

Just finished a big rewrite of wp6.sh based on the feedback

It's now using iproute2 so there are no more conflicts with different versions of ifconfig (Kali in particular). It also now features a guided mode which plays nicely with network managers that tend to get in the way (I'm looking at you Gnome NetworkManager).

Thank you all for the feedback - especially the screenshots and logs. A full rewrite was a long time coming and I feel really good about this new version. I'm sure you'll like it. If you're not keen on the ascii banners you can turn them off from line 299 -- or if you do feel free to post a new one :)

  • Upvote 2

Share this post


Link to post
Share on other sites

Yay this wp6.sh works fine for me on Kali Linux 2016.1 32 bit now I can finally use my NANO at least on my laptop!

Share this post


Link to post
Share on other sites

Good Job.

I just have a tiny problem when i want to connect:

iptables: Too many links.

But I'm using ufw, and when i disable it, it works fine, ufw puts a lot of stuff in iptables (just sharing the info).

If I may make a suggestion, it would useful to have a [D]isconnect option, in case you want to stop sharing the connexion.

Anyway, thanks a lot Darren.

Share this post


Link to post
Share on other sites

Darren you are the man! I was on and off the forums waiting on the new script. It works like a charm exactly what I needed, looks like you were up pretty late thank you!

Share this post


Link to post
Share on other sites

Well done Darren!

The Script now works without issues. However, I still cannot have more than one wired connection. I'm either connected to my internal Ethernet or I'm connected to WiFi Pineapple usb ethernet. That means I can either connect to the internet, or I can only connect to the pineapple, but not both at the same time.

At this point, I am convinced it is a Kali Linux config issue. If anyone knows how to fix this, I'm all ears.

Thank you for the hard work.

In other news, I just received my Rubber Ducky and I'm excited.

Share this post


Link to post
Share on other sites

Well done Darren!

The Script now works without issues. However, I still cannot have more than one wired connection. I'm either connected to my internal Ethernet or I'm connected to WiFi Pineapple usb ethernet. That means I can either connect to the internet, or I can only connect to the pineapple, but not both at the same time.

At this point, I am convinced it is a Kali Linux config issue. If anyone knows how to fix this, I'm all ears.

Thank you for the hard work.

In other news, I just received my Rubber Ducky and I'm excited.

Which version of Kali Linux are you using im just curious I'd like to see if I can pull up the same problem your having.

Let me get this straight you're using Ethernet connected to I guess your computer and then you're trying to share your computer Ethernet with the Pineapple NANO?

Share this post


Link to post
Share on other sites

I am running the latest Kali linux for AMD 64bit "

Kali Linux 64 bit ISO Torrent 2.6G 2016.1 deaa41c5c8f26b7854cafb34b6f1b567871c4875

Unfortunately I'm on the road right now and don't have access to my Kali machine.

Yes, I have a physical ethernet connection to my kali manchine. It give me access to the internet through my default gateway 192.168.0.1

When I plug in my pineapple and let it run, it shows me through the network management settings that it is connected to my computer but it is not enabled/active.

If I click to activate it it disconnects my Physical ethernet connection and enables my USB ethernet connection. at this point I can ssh into my pineapple.

When I get home I will post screenshots.... hell I'm feeling creative, I may just make a video out of it.

Thanks for the response.

Share this post


Link to post
Share on other sites

I'm curious hopefully this doesn't sound stupid me asking you this maybe I misunderstand what you're saying but it sounds like you wanna use both your ethernet and your wireless at the same time so you wanna I guess have the pineapple connected to one of them and the other one you wanna use for something else if that's the case i'm not sure if that can be done or not at least I wouldn't know about how to go about doing that.

However I did test my nano with this script and ethernet does work fine for my nano and im able to get on the internet using my laptop which has the ethernet the nano is getting the internet from.

However If you're trying to use two interfaces on the same machine at the same time and have them both have 2 different internet connections I dunno how that could work but would be interested in hearing how it can be done if it can be done.

I've personally never seen anyone use wireless and ethernet at the same time.

Edited by ZaraByte

Share this post


Link to post
Share on other sites

I'm getting stuck on "Detecting Wifi Pineapple" after setting up both using the Automatic Setup and the Manual Setup, both of these can locate the Pineapple and the correct IP for internet and the Pineapple.. Using Kali Linux VM, any ideas?

Share this post


Link to post
Share on other sites

I'm curious hopefully this doesn't sound stupid me asking you this maybe I misunderstand what you're saying but it sounds like you wanna use both your ethernet and your wireless at the same time so you wanna I guess have the pineapple connected to one of them and the other one you wanna use for something else if that's the case i'm not sure if that can be done or not at least I wouldn't know about how to go about doing that.

However I did test my nano with this script and ethernet does work fine for my nano and im able to get on the internet using my laptop which has the ethernet the nano is getting the internet from.

However If you're trying to use two interfaces on the same machine at the same time and have them both have 2 different internet connections I dunno how that could work but would be interested in hearing how it can be done if it can be done.

I've personally never seen anyone use wireless and ethernet at the same time.

Perhaps I'm an idiot... Perhaps I'm not.

I'm not trying to have 2 interfaces provide internet access. For example, I'm not trying to have wifi and ethernet both provide Internet connectivity.

Quite simply put, I am trying have eth0 (Physical cat5e with internet connectivity) and eth1 (USB ethernet connection to pineapple access) both come up.

Scenario, I have both of them plugged in, I open my browser and type "google.com" into the address bar. <--- it actually goes to google and works. Then I open terminal and type "ssh root@172.16.42.1" to connect to the Nano. However, it hangs and the connection is never established.

In this scenario I can also navigate to 172.16.42.1 in the web browser and access the web GUI but it does not have internet connection. I know this because I can try to load the bulletin or "check for updates" with a message saying to check internet connection.

So, maybe I'm missing something, or it's just not possible.

Share this post


Link to post
Share on other sites

I'm getting stuck on "Detecting Wifi Pineapple" after setting up both using the Automatic Setup and the Manual Setup, both of these can locate the Pineapple and the correct IP for internet and the Pineapple.. Using Kali Linux VM, any ideas?

Make sure you have bridged mode selected under Settings> Network> Change from NAT to Bridged.

Share this post


Link to post
Share on other sites

I've had a few problems where NetworkManager can interfere with the ICS script too, you might want to try killing that and trying it again.

Share this post


Link to post
Share on other sites

I'm getting stuck on "Detecting Wifi Pineapple" after setting up both using the Automatic Setup and the Manual Setup, both of these can locate the Pineapple and the correct IP for internet and the Pineapple.. Using Kali Linux VM, any ideas?

Is your VM seeing the WiFi Pineapple at all? Do you see the ASIX Fast Ethernet Controller from "lsusb" ?

Share this post


Link to post
Share on other sites

I see the problem now. I'll need to make an update to wp6.sh. I didn't realize the version of ifconfig on Kali differed from that of Ubuntu. Odd. This explains the problems for ZaraByte, HammerHead and Mistersippi.

Mistersippi -- your ifconfig output isn't even showing the NANO. What's the output of "lsusb" on that Kali box?

Any idea as to why when I try to connect nothing is detected? I use the lsusb command and nothing shows which is obviously not correct.

Share this post


Link to post
Share on other sites

Any idea as to why when I try to connect nothing is detected? I use the lsusb command and nothing shows which is obviously not correct.

Nothing shows at all? Not even Linux Foundation 2.0 root hub?

Share this post


Link to post
Share on other sites

Hi,

I am new to Pineapple and Hak5 so "hey".

I hope you can point me in the right direction with a few things.

First of all i am using Kali to drive my Pineapple and have followed the setup video posted and can see the latest bulitens so therfore have an internet connection however something doesnt look right on the terminal screen.

As you can see below this is what I see when i press © to connect with saved settings.

Ping unknown host pops up everywhere???

Specify Default Gateway IP Address: 192.168.1.254
.ping: unknown host
Settings saved.
.ping: unknown host
Saved Settings: Share Internet connection from wlan0
.ping: unknown host e at eth1 through default gateway 192.168.1.254

.ping: unknown host saved settings
[G]uided setup (recommended)
.ping: unknown host
[A]dvanced IP settings
.ping: unknown host

Detecting WiFi Pineapple...ping: unknown host

Can anyone help.??

Also i have been playing with the AP and i can connect and phone/ipad ect says i am connect to the internet however i cannout use the internet and only see a splash page "Wrt nodogsplash" or that the case your device says you are connected but you actually cant use the internet and browse ect.

sorry to be long winded.

steben

  • Upvote 1

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...