inzel Posted January 3, 2020 Share Posted January 3, 2020 Hello, I am looking for a way to use the wlan0 interface as a client to connect to a wifi network. Is there an easy way to do this with a Tetra? Would be great to have that as an option. Quote Link to comment Share on other sites More sharing options...
inzel Posted January 5, 2020 Author Share Posted January 5, 2020 Anyone? Quote Link to comment Share on other sites More sharing options...
Olaf Mufjay Posted January 7, 2020 Share Posted January 7, 2020 You must edit the /etc/config/wireless Quote Link to comment Share on other sites More sharing options...
inzel Posted January 7, 2020 Author Share Posted January 7, 2020 2 hours ago, Olaf Mufjay said: You must edit the /etc/config/wireless Ok great! I didnt see that config file before. Do you have any info on how to configure it for wifi hotspots that are open but you still need some sort of login? Starbucks is a real common one here in the states. If there is a guide somewhere that I am missing please point me in thet direction too. Thanks! Quote Link to comment Share on other sites More sharing options...
Olaf Mufjay Posted January 7, 2020 Share Posted January 7, 2020 I don't understand why you want to run it over the wlan0 interface i would take the wlan1 interface with another wlan2 for the monitor mode here is a link to configure:https://openwrt.org/docs/guide-user/network/wifi/basic Quote Link to comment Share on other sites More sharing options...
inzel Posted January 7, 2020 Author Share Posted January 7, 2020 haha thats the exact document Im looking at right now. Can you give me your idea on what is the best way to connect one wifi card to external wifi and broadcast with the other so I can still be the mitm? Thanks again Olaf. I appreciate the help Quote Link to comment Share on other sites More sharing options...
Olaf Mufjay Posted January 7, 2020 Share Posted January 7, 2020 Use airbase-ng Quote Link to comment Share on other sites More sharing options...
inzel Posted January 7, 2020 Author Share Posted January 7, 2020 3 minutes ago, Olaf Mufjay said: Use airbase-ng Interesting. I havent used airbase-ng as a client before. Seems like I should be able to just connect in ad-hoc mode and that will set me up as a typical client? Quote Link to comment Share on other sites More sharing options...
Olaf Mufjay Posted January 7, 2020 Share Posted January 7, 2020 if you want to connect as a client connect to the network I don't know what you want to do exactly Quote Link to comment Share on other sites More sharing options...
inzel Posted January 7, 2020 Author Share Posted January 7, 2020 15 minutes ago, Olaf Mufjay said: if you want to connect as a client connect to the network I don't know what you want to do exactly Yeah I think I have caused some confusion here. Let me start over: I want to use my Tetra as a mitm by connecting one wifi card to external wifi so that the Tetra can use that to forward clients connections to the internet. Direction: <-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |cafe/home wifi| <----- |wlan0 Tetra| -- |mitm| -- |wlan1 Tetra broadcast for client connections| <----- |Random client connections| <-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- So essentially, a client connects to my Tetra via my broadcasted ssid. The tetra performs mitm and sends the traffic to the cafe/home wifi connection just as if it was plugged in thru ethernet or usb. In order to make this happen I need to connect one wifi card to internet and the other I will broadcast to get incoming connections. I dont know why Im having a hard time explaining this. I hope it makes sense. If not.. I will try again haha Quote Link to comment Share on other sites More sharing options...
Olaf Mufjay Posted January 7, 2020 Share Posted January 7, 2020 I would use airbase-ng with a wifi in monitor mode, copy the network and redirect the clients from the original to your fake network. connect to the original network with another wifi (do not forward it) to establish an internet connection Quote Link to comment Share on other sites More sharing options...
inzel Posted January 7, 2020 Author Share Posted January 7, 2020 Ok let me make sure I understand correctly... Use airbase-ng on iface wlan0mon to create a twin network to get clients then use wlan1 to connect to a real network connected to the internet? Quote Link to comment Share on other sites More sharing options...
Olaf Mufjay Posted January 7, 2020 Share Posted January 7, 2020 If you use wlan0 in monitor mode you dont have a connection to the pineapple. I would use wlan0 to make a connection to the internet (wlan0-2) and wlan1mom to build the twin network. Quote Link to comment Share on other sites More sharing options...
inzel Posted January 7, 2020 Author Share Posted January 7, 2020 Ok cool. What if I didnt want to copy a network and instead just broadcast ‘FreeWifi’ or something for clients to connect to. How would I connect wlan0 to the internet? Quote Link to comment Share on other sites More sharing options...
Olaf Mufjay Posted January 7, 2020 Share Posted January 7, 2020 To make a connection with wlan0 you must edit wireless config. For the free wifi you can use the wlan0-1 in the webinterface or build a AP Quote Link to comment Share on other sites More sharing options...
inzel Posted January 7, 2020 Author Share Posted January 7, 2020 Ok gotcha. I will just have to take my pineapple to a location that has open wifi which logs in thru a browser to connect. i think I should be able to config the wireless file to the ap with no wpa/wpa2/etc. and hopefully my browser will pop up if I need to login with email or whatever like Starbucks does Quote Link to comment Share on other sites More sharing options...
Olaf Mufjay Posted January 7, 2020 Share Posted January 7, 2020 You can use the webinterface connect to a network with wlan1 and you have a example in the wireless config that you can overwrithe 🙂 Quote Link to comment Share on other sites More sharing options...
inzel Posted January 7, 2020 Author Share Posted January 7, 2020 22 minutes ago, Olaf Mufjay said: You can use the webinterface connect to a network with wlan1 and you have a example in the wireless config that you can overwrithe 🙂 Thats exactly what Im thinking :) Quote Link to comment Share on other sites More sharing options...
inzel Posted January 7, 2020 Author Share Posted January 7, 2020 Wow... I sure made things way harder than they needed to be. Ican easily be a mitm if I just connect wlan1 to wifi and still broadcast my own ssid for clients. Dont need to use wlan0 at all. Only downside is I cant use PineAP but thats fine with me for this use case. As a matter of fact I am writing this update by going thru my pineapple 😉 Quote Link to comment Share on other sites More sharing options...
Olaf Mufjay Posted January 7, 2020 Share Posted January 7, 2020 The easyest ways most are the best ways 😉 Quote Link to comment Share on other sites More sharing options...
Olaf Mufjay Posted January 7, 2020 Share Posted January 7, 2020 (edited) I just reset my Tetra and rewrote the wireless configuration and integrated the router into Wlan0-1. I removed the open ssid and use a connection to my router. I hope it is the right way ... If you know a better way just write me :) My wireless configuration: Quote config wifi-device 'radio0' option type 'mac80211' option channel '11' option hwmode '11g' option path 'platform/ar934x_wmac' option htmode 'HT20' option country 'DE' config wifi-iface option device 'radio0' option ifname 'wlan0' option network 'lan' option mode 'ap' option encryption 'psk2+ccmp' option ssid 'WifiPineappleSSID' option key 'WifiPineappleKEY' option disabled '0' option hidden '0' config wifi-iface option device 'radio0' option ifname 'wlan0-1' option mode 'sta' option network 'wwan' option ssid 'RouterSSID' option encryption 'psk2+ccmp' option key 'RouterKey' config wifi-device 'radio1' option type 'mac80211' option channel '11' option hwmode '11g' option path 'pci0000:00/0000:00:00.0' option htmode 'HT20' option country 'DE' config wifi-iface option device 'radio1' option ifname 'wlan1' option network 'lan' option mode 'sta' option ssid 'Pineapple_30C0' option encryption 'none' wlan0 Link encap:Ethernet HWaddr 02:13:37:A6:30:BF UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:2193 errors:0 dropped:0 overruns:0 frame:0 TX packets:2193 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:575788 (562.2 KiB) TX bytes:1063067 (1.0 MiB) wlan0-1 Link encap:Ethernet HWaddr 00:13:37:A6:30:BF inet addr:192.168.2.109 Bcast:192.168.2.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:6655 errors:0 dropped:594 overruns:0 frame:0 TX packets:3900 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:2563626 (2.4 MiB) TX bytes:685461 (669.3 KiB) wlan1 Link encap:Ethernet HWaddr 00:13:37:A6:30:C0 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B) Edited January 8, 2020 by Olaf Mufjay Quote Link to comment Share on other sites More sharing options...
inzel Posted January 8, 2020 Author Share Posted January 8, 2020 Yeah your way should work fine. I got mine working great but did run in to an issue when connecting wlan1 to wifi that requires a web browser login. When a client connects to my ssid and routed to the wlan1 wifi they get redirected to a page that the tetra doesnt have an IP for. This causes it to break. I will be headed back tomorrow to try again and get a pcap to see if I can add a hosts entry to get around that. Quote Link to comment Share on other sites More sharing options...
Olaf Mufjay Posted January 8, 2020 Share Posted January 8, 2020 good luck Quote Link to comment Share on other sites More sharing options...
Irukandji Posted January 8, 2020 Share Posted January 8, 2020 Just get a wifi adaptor that has an simmer chipset as. https://shop.hak5.org/collections/wifi-gear/products/ralink-usb-wifi-rt5370 Plug into the usb A port then go to the network tab. Quote Link to comment Share on other sites More sharing options...
inzel Posted January 8, 2020 Author Share Posted January 8, 2020 Thats a good idea. Thanks @Jtyle6 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.