Jump to content

NullNull

Active Members
  • Posts

    210
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by NullNull

  1. HAHAHAHAHAHAHAHAHA :lol: :lol: :lol:
  2. Raspberry Pi 2 (Middle) Alfa NHA (Access Point, Left) Alfa 036H (Deauth, Right) Anker 3 10.000 mah Pelican Case 1040 Running Kali 1.1.0 amd64 (with autostart: hostapd, dnsmasq, nginx, php-fpm, vncserver, mdk3)
  3. Yeap, Nodogsplash can't handle php :(. So here is what i did! (using a mk4 after a clean flash) 1) save the default iptables configuration (iptables-save > default_iptables.conf) 2) edit nodogsplash.conf to include only the gateway and users-to-router rules (allowing also 1471) 3) run nodogsplash and save it's iptables configuration (iptables-save > portal_iptables.conf) 4) stop nodogsplash 5) edit your dnsmasq for the 1.1.1.1 and run it. 6) change your web server port to 2050 and restart it. 7) aply the portal iptables (iptables-restore portal_iptables.conf) 8)You should be good to go ;) I have made a script (because i love scipts ;) ) that does all this. I will post when i get back to my pineapple ;)
  4. After some more testing i see that the captive portal notification will pop up on Android tablets (Nexus 9 on 5.0, Samsung Tab 4 on 4.4.2) and not on Android mobiles (Galaxy S4 on 4.4.2). Although when surfing the web all traffic gets redirected. (even clients3.google.com/generate_204). Only way to pop the browser on my galaxy S4 is "address=/#/1.1.1.1" along with nodogsplash. I will try to replicate the iptables nodogsplash creates. Sounds easy.. Sorry but i dont have any others devices for testing :P NOTE: I deleted the previous post until i find something more stable!!!
  5. i'm glad you figured it out ;) next days i will have some free time, i will test it and post the results :)
  6. Are you referring to Android/iOS captive portal detection?So let my get that straight :P 1) You are running dnsmasq with lets say "address=/#/8.8.8.8" 2) Then dnsspoof with "*" redirecting everything to 172.16.42.1 3) Then nodogsplash. 4) And finaly the iptables from the second post redirecting all port 80 and 53 traffic to 172.16.42.1 Am i correct?
  7. yes. this will not redirect https or hsts but i think neither will nodogsplash...
  8. yes and it is working every time ... As you can see here: https://forums.hak5.org/index.php?/topic/34663-nodogsplash/#entry257631 i did not said i managed nodogsplash to work with out internet connection. Actualy i said that none of the captive protal "managers" i used, worked with out internet connection. The above commands have nothing to do with nodogsplash. I dont even have it installed right now. I just placed a simple html file in the www folder and configured dnsmasq. Try searching the web for "dnsmasq captive portal" , "dnsmasq walled garden" "dnsmasq splash screen"
  9. Sorry for that.. You get the same 502 error on all your browsers and clients?
  10. can you post the "cat /etc/dhcp" output? EDIT: just saw your dnsmasq.conf, no opendns server there. :/
  11. No need to run nodogspalsh with all that. reboot your pineapple and try it again. Also before testing it clear you browsers cache.
  12. hey johnsteiner, if you want just to serve a splash page ssh into your pineapple and try this: /etc/init.d/dnsmasq stop cp /var/etc/dnsmasq.conf /tmp/dnsmasq.conf sed -i '/address=/a address=/#/172.16.42.1' /tmp/dnsmasq.conf /usr/sbin/dnsmasq -C /tmp/dnsmasq.conf iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination 172.16.42.1 iptables -t nat -A PREROUTING -p tcp --dport 53 -j DNAT --to-destination 172.16.42.1 iptables -t nat -A PREROUTING -p udp --dport 53 -j DNAT --to-destination 172.16.42.1 This will make dnsmasq to resolve all domains to your pineapple's IP (172.16.42.1) if not cached from your browser and redirect all port 80 and port 53 traffic to it.To undo /etc/init.d/dnsmasq restart rm /tmp/dnsmasq.conf iptables -t nat -D PREROUTING -p tcp --dport 80 -j DNAT --to-destination 172.16.42.1 iptables -t nat -D PREROUTING -p tcp --dport 53 -j DNAT --to-destination 172.16.42.1 iptables -t nat -D PREROUTING -p udp --dport 53 -j DNAT --to-destination 172.16.42.1 Note that every time you restart dnsmasq (/etc/init.d/dnsmasq restart) the dnsmasq.conf file at /var/etc/ gets re-written.
  13. Thank you newbi. Trying to fix it with nodogsplash or any other captive portal manager didn't work for me. After a lot of search think dnsmasq and iptables is the way to do it. address=/#/172.16.42.1 at the dnsmasq.conf and iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination 172.16.42.1 iptables -t nat -A PREROUTING -p tcp --dport 53 -j DNAT --to-destination 172.16.42.1 iptables -t nat -A PREROUTING -p udp --dport 53 -j DNAT --to-destination 172.16.42.1 this might work but i need to test it.
  14. Sorry but i think it can be posted here too Because thats me Thank you, i saw that post but chillispot seems way to complicate to setup for something so simple..
  15. Hello everyone, I have create a very simple html which is the only page i want my clients to see. Like a captive portal but not intrested in giving them internet connection. I am having problems with nodogsplash which does not redirect any traffic when my pineapple is not connected to the internet. I know i can use "Evil Portal" but i am trying to make this manual. I also noticed that nodogsplash is at 0.9_beta9.9.9 but opkg brings 0.9_beta9.9.6 (not only pineapple, openwrt too) Does the pineapple have to be connected to the internet for nodogsplash to work? Is there a way to replicate the iptables rules nodogsplash creates? Is there any good alternative "captive portal manager" you can suggest? My nodogsplash.conf My /etc/config/dhcp Running: nodogsplash -d 7 -f and it stays like this even when clients connect. As an alternative i tried dnsspoof and iptables (one at a time and both together) My spooofhost.conf dnsspoof -i br-lan -f spoofhost.conf iptables -t nat -A PREROUTING -p udp --dport 53 -j DNAT --to-destination 172.16.42.1 and iptables -t nat -A PREROUTING -p tcp --dport 80 -j DNAT --to-destination 172.16.42.1 In this case it redirects traffic to 172.16.42.1 but if pineapple is not connected to the internet Android and iPhone Devices cannot betect the "captive portal" and pop the pseudo browser.
  16. Thank you for your interest guys! V 1.1 is out at the main post.
  17. Hello everyone. For the past few months i am using my pineapple as a kind of access point repeater with the help of "Wifi Manager" infusion (thanks Whistle Master!!! ). Wlan1 is connected to my home network on client mode and wlan0 is running an open, internet sharing, wireless netowork (from boot). The connection between my home network and my pineapple is really bad so every now and then the connection drops. I wrote this script to check for internet and network connection and if its down try to get it back on. Maybe some of you will find it useful. EDIT: I have done some changes after seeing you guys liked it so here is 1.1 Version Change Log: Fixed some output issues Checks and brings up the device if down Makes more checks regarding the usb inteface issues (i am having) Countdown for the next check Much better chances of grabing an ip if connection is lost Unfortunately i dont have the time to bring this into an CLI infusion or the time to support one. Also i own a mark IV pineapple running 2.8.1 which i dont want to update to 3.0.0 ( sorry seb :P ) so developing a CLI infusion wont be easy. If anyone wants to bring it in an infusion is welcome! :) #!/bin/bash #check.sh v-1.1 #By KiatoGS sleep_time="30" #Seconds between every check device="wlan1" #The device you are using for client mode gateway="192.168.1.1" #Your " home's " network gateway for network connection check clear echo echo echo -e " +---------------------------------------+" echo -e " This script will run a loop every \e[1;32m$sleep_time\e[0m " echo -e " seconds to check your client mode" echo -e " connection on \e[1;32m$device\e[0m pinging" echo -e " \e[1;32m$gateway\e[0m and \e[1;32m8.8.8.8\e[0m" echo -e " +---------------------------------------+" echo echo while : do sleeptime=$sleep_time echo -n "[-] Checking for Internet connection..." ping -q -w 6 -c 1 8.8.8.8 > /dev/null 2>&1 if [[ $? -eq 0 ]]; then echo -e "\t [\e[1;32mOK\e[0m]" else echo -e "\t [\e[1;31mFAILED\e[0m]" echo -n "[-] Checking for Network connection..." ping -q -w 6 -c 1 $gateway > /dev/null 2>&1 if [[ $? -eq 0 ]]; then echo -e "\t [\e[1;32mOK\e[0m]" echo -e "[-] Check your \" home's \" internet connection \e[1;31m!\e[0m" #Nothing we can do :/ else echo -e "\t [\e[1;31mFAILED\e[0m]" echo -n "[-] Checking for $device device status..." #When i am using a usb wireless card for client mode there are times #that the usb card just disappears from my pineapple. Only a reboot #brings it back on. if [[ -z $(ifconfig | grep "$device") ]] || [[ -z $(iwconfig 2>&1 | grep "$device") ]] ; then echo -e "\t [\e[1;31mDOWN\e[0m]" echo -ne "[-] Bringing it back \"up\"..." ifconfig $device up > /dev/null 2>&1 if [[ -z $(ifconfig | grep "$device") ]] ; then echo -e "\t \t [\e[1;31mFAILED\e[0m]" else echo -e "\t \t [\e[1;32mOK\e[0m]" fi if [[ -z $(iwconfig 2>&1 | grep "$device") ]] ; then echo -e "[-] Sorry but $device is not responding... \t [\e[1;31mREBOOTING\e[0m]" sleep 5 reboot exit fi else echo -e "\t [\e[1;32mUP\e[0m]" fi echo -n "[-] Realising ip if any..." kill `ps -ax | grep udhcp | grep "$device" | awk {'print $1'}` 2> /dev/null echo -e "\t \t [\e[1;32mOK\e[0m]" echo -n "[-] Scanning APs..." iwlist "$device" scan > /dev/null 2>&1 #At all my tests i had better results executing iwlist twice. sleep 1 #Try to comment out the second one and tell my your opinion. iwlist "$device" scan > /dev/null 2>&1 #The loop must run an extra time (so basicaly iwlist is running again) echo -e "\t \t \t [\e[1;32mOK\e[0m]" #in order udhcpc to get an ip. I cannot understand why :/ echo -n "[-] Requesting ip..." udhcpc -R -n -i "$device" > /dev/null 2>&1 if [[ -n $(ifconfig "$device" | grep "inet addr:") ]] && [[ -n $(route | grep "$device") ]] ; then sleep 1 echo -e "\t \t \t [\e[1;32mOK\e[0m]" else echo -e "\t \t \t [\e[1;31mFAILED\e[0m]" fi sleeptime="1" fi fi if [[ $sleeptime != "1" ]] ; then #Just a small countdown while [ $sleeptime -ge 1 ] do echo -ne "[-] Checking again in: \t \t \t [$sleeptime] \r" sleep 1 sleeptime=$[$sleeptime-1] done fi done
  18. the present wifi manager for mark4 does.
  19. I guess that something didn't...
  20. undo by iptables -t nat -D PREROUTING -p tcp -dport 80 -j DNAT to-destination 172.16.42.1
  21. ssh into your pineapple and type: iptables -t nat -A PREROUTING -p tcp -dport 80 -j DNAT to-destination 172.16.42.1 This will redirect all trafic (from port 80) to 172.16.42.1
  22. have you ever worked with one of these? what about the noise?
×
×
  • Create New...