Jul 6, 2016 - Check how vulnerable your network is; Appying the hack. The APC is generally provided after factory reset and serves as a router itself. I logged off my user. This is the DNS Server used by my broadband provider. So, I used netcat to run a echo check over an VPN server running over UDP(port 53). Oct 3, 2017 - Dynamic DNS that resolves to public IP of server (explained in this article). To port-forward port 53 (the port DNS uses) on your home-router to.
Welcome back, my novice hackers! There are SOOOO many ways to hack a system or network, which means in order to be successful.
Many novice hackers focus way too much energy on (which should be a last resort unless you have specialized tools or a 10,000 machine botnet) or exploiting a in an operating system (increasingly rare). With all the protocols that computer systems use (DNS, SMTP, SMB, SNMP, LDAP, DHCP, etc), there is bound to be a vulnerability in one that we can exploit to get what we're after. DNS Spoofing: Redirecting Users to Your Website In this hack, we will be exploiting the (DNS). As you know, DNS is used for domain name resolution or converting a domain name such as to an IP address, 8.26.65.101. If we can mess with this protocol, we could very well send some one looking for a domain name such as to our malicious website and harvest their credentials. Dug Song of the University of Michigan developed a suite of hacking tools that are excellent for this purpose. We have already used one of his tools, arpspoof, for doing a.
In this attack, we will be using his dnsspoof tool, which will enable us to spoof DNS services on a local area network. Remember, even though this hack requires that you be on the same LAN, you could get access to the LAN through a remote vulnerability or a weak password on just ONE machine on the network. In institutions with thousands of computers on their network, that means you must find a single machine that is exploitable to be able implement this attack for the entire network. Step 1: Fire Up Kali Let's get started by firing up and going to Applications - Kali Linux - Sniffing - Network Sniffers, and finally, dnsspoof, as seen in the screenshot below. Step 4: Flush the DNS Cache First, we need to flush the DNS cache of the Windows 7 system. In this way, the Windows client won't use the cached DNS on the system and will instead use our 'updated' DNS service. In reality, this step is not necessary, but for our demonstration it speeds things up.
First, close the browser and type:. ipconfig /flushdns Now we need to set our network card on our Kali server to promiscuous mode (she, your network card, will accept anyone's packets). ifconfig eth0 promisc Now we need to kill the connection between the Windows 7 system and www.bankofamerica.com.
This forces the Windows 7 machine user to re-authenticate. tcpkill -9 host www.bankamerica.com After killing www.bankofamerica.com, stop the tcpkill with a ctrl c. Step 5: Create Hosts File In my, I showed you how the hosts file in Linux acts like a static DNS.
Here we will be using the hosts file to redirect that Windows 7 system's search for Bank of America to our website. Let's go to the /usr/local directory. cd /usr/local From there, let's open the hosts file in any text editor.
Kali doesn't have kwrite that we had been using in BackTrack, but it does have a graphical VIM, or gvim, so let's use that. gvim hosts Now that we have the hosts file open, we need to add the following line to it. Remember, the hosts file is simply mapping an IP address to a domain name, so we put our IP address in and map it to www.bankofamerica.com. 192.168.1.101 It's important here to use the TAB key between the IP address and the domain. Spaces will be interpreted by the system to be part of the domain name. Step 6: Create a New BOA Webpage Before we go any further, we now need to turn off promiscuous mode on our network card (she decided to commit to you and only you).
ifconfig eth0 -promisc Now we need to create a website that the user will be directed to when they type in the URL of their browser. Let's create a simple webpage. If you want more info on how to create a simple webpage and host it in Linux, check out my.
Now open the index.html. gvim /var/www/index.html.
You Asked 2 Questions: 1.How to host site on kali? Ans: You can host a site on kali using Apache.
Place the files of the site in your apache directory which is '/var/www/' and start the apache server by clicking on Kali Linux - System Services - HTTP, and select, apache2 start 2.How to make it public site? Ans: To make your site a public site so people who are out of your LAN can see it you need to forward your Port 80, and goto whatismyip.com to find out your ip. Give your ip to the person whom you want to see the site.
When he will open the Ip in his browser he will be redirected to your hosted site. D4rkF34r Reply. Great tutorial thanks OTW. How can we use this for the same LAN? By example I want to redirect all users on the same lan to my local ip, instead of the virtual machine. I am using kali and virtualbox for tests.
It works on my wlan0 interface which is bridged with virtualbox. But another PC on my LAN isn't being redirected to my ip. And what about websites with the https protocol like facebook.
If i write any http website like wonderhowto.com it works. But as soon as I want to assign my local ip to it doesn't work. Is this because facebook redirects the website to an https server or? Thanks in advance Reply. Yeah then it works but only on the virtual pc's inside the netbook.
As I said: other pc's from the same network ( LAN ) aren't being redirected to the kali PC. I do the following on the kali pc: ifconfig wlan0 promisc tcpkill -i wlan0 -9 host ifconfig wlan0 -promisc my hosts file looks like this: /usr/local/hosts: 192.168.1.8 With a tab between the ip and domain there is a index.html inside /var/www/ and apache is started (when i go to on the netbook it shows up). After it I run: dnsspoof -i wlan0 -f hosts but no luck:( Reply. After some research I've found a possible cause for the error; dnsspoof: libnetgetipaddr4: ioctl: Cannot assign requested address Someone on a forum said that if the wireless adapter wasn't in NAT mode it could cause this error in a VM, also IP forwarding could cause this error to occur. I'm not working in a Virtual environment and haven't tested this 'theory' yet, but since I've found this I hope it can help some of the other users here that are using a VM and have the time to test it. Ps: Keep me posted if this worked for you! I just recently found this blog and I like eet, it reminds me of 'A day with Tape' blog from when backtrack was still the shit.
I succesfully cracked wpa2/psk password but now I am trying to get the router user/pass, which apperantly isnt the default configuration. So I guess I must fire up my php skills and make a simple fwrite login / password box, fire up apache, and with a little juicer web design and bullshit social engineering I could get force them to type the user / pass out of sheer frustration. ThankYou lol Reply.
I tried everything I could think of before posting this. If this is the wrong location for this kind of issue please let me know. I have a rooted phone (Samsung Galaxy Avant) running the stock Android 4.4.2 that came with the phone and I use WiFi Tether Router to provide my other devices with an internet connection. Everything works perfectly and I get very fast LTE service both on my desktop and laptop (using a user agent switcher on my browser). However, I need to do some custom DNS routing and I am running into some issues.
What I want: 1.) When a browser on a device that is tethered to my phone through WiFi Tether Router requests a website then the DNS should run through the default DNS I specify (either Google's 8.8.8.8/8.8.4.4 or OpenDNS or my mobile provider's DNS servers) and load the website from the public internet. 2.) When a browser on a tethered device requests my-example-domain.com or my-other-domain.com I want the DNS to resolve to an IP of my choosing. In this case (for now, but I want to be able to change it), I want it to resolve to the IP address of my phone that is providing the tethering.
The local IP address of the phone is is 192.168.11.254, which is the Default Gateway address when running Wifi Tether Router. I have a web server running on the phone on port 8080 and I want it to receive the requests for my two domain names I want nearly all traffic from tethered devices to resolve through public DNS servers, but for those two specific domains I want the DNS to be handled by the DNS server running on the phone.
I want those specific requests to resolve to the same phone that is providing the tethering and to have the web server running on the phone serve the files. I have most of this working correctly except for one issue. Here are the details. I am using three devices:. Galaxy Avant to provide tethering 'phone'. Windows Laptop 'laptop'.
Windows Desktop 'desktop' Scenario 1 - Using Google DNS on phone: In WiFi Tether Router under DHCP Settings I have. HTML Code: Default Gateway: 192.168.11.254 IP Address: 192.168.11.1XXThe laptop has a dynamic IP and DNS assigned by the DHCP in Wifi Tether Router on the phone. The desktop has a static IP of 192.168.11.102 with its DNS pointing to the phone at 192.168.11.254 for DNS 1 and 192.168.11.0 for DNS 2 (I know the second one is invalid, but Windows requires two) Under this scenario both the laptop and the desktop can access live websites through their browsers. I'm assuming that the DNS is running through Google's 8.8.8.8 since that is the primary DNS for Wifi Tether Router and both computers are getting their DNS from the phone. Scenario 2 - DNS running on Windows Desktop: In WiFi Tether Router under DHCP Settings I have. HTML Code: Default Gateway: 192.168.11.254 IP Address: 192.168.11.1XXSince the DNS 1 and DNS 2 settings for WiFi Tether Router now point to 192.168.11.102 (desktop) instead of 8.8.8.8/8.8.4.4 (Google) the DNS is now handled by the desktop. The desktop is running Simple DNS Plus which is configured to point my-example-domain.com and my-other-domain.com to the IP address of the phone at 192.168.11.254.
There is a web server running on the phone. Both computers can still access live websites through their browsers and both computers can access the web server running on the phone by visiting my-example-domain.com:8080 or my-other-domain.com:8080 The only records I have defined in Simple DNS Plus on the desktop are for my two domains, so I'm assuming that the rest of the DNS requests are getting passed back to the phone to be handled by the phone's default DNS servers since WiFi Tether Router no longer knows about Google's DNS (because it is now pointing at the desktop to resolve DNS instead). The DNS settings for the wifi network adapter on the desktop are pointing at the phone's 192.168.11.254 address still (which seems like it should create some sort of loop since the phone and desktop both point at each other, but it doesn't? Maybe someone can clear this part up for me), so even though my-example-domain.com and my-other-domain.com are being redirected by the DNS server on the desktop to the IP of the phone where the web server is listening, every other DNS request must be going back to the phone and resolving there since the phone is the desktop's only source of internet and the live websites actually resolve. The desktop must be either sending the request back to the phone to resolve or using the phone's data, but either way the desktop is forwarding the domains that it is supposed and leaving the rest up to the DNS on the phone somehow.
I'd like to have a better idea of how this actually works. HTML Code: IP Address: 192.168.11.0 (0 is disabled and can't be changed) DNS 1: 192.168.11.254 (phone) DNS 2: 127.0.0.1 (phone)There is no option for port for the DNS so it's checking port 53 on my phone, but the DNS server wasn't allowed to start on 53 so it's listening on 40747 instead.
This means I need to forward port 53 to port 40747 so that the DNS requests sent to DNS Server on port 53 by WiFi Tether Router will be answered. I installed the 'Port Forward Ultimate' app from Ice Cold Apps on the phone. There is only one setting, a checkbox which says 'Force using internal iptables (advanced)'. I left it unchecked initially, but found that the port forwarding server will not start unless that box is checked (and it doesn't matter what ports I'm trying to forward, without that box checked it simply will not start). I created the following rule in the port forwarding app. HTML Code: Source port: 53 Destination port: 40747 I left the 'Forward to external host' box unchecked and the accompanying 'Forward to host/IP' box empty. I started Port Forward Ultimate, DNS Server, and WiFi Tether Router.
Both the desktop and the laptop connect to WiFi Tether Router, but neither of them can access live websites and neither of them resolve my-example-domain.com or my-other-domain.com I first thought that maybe the port forwarder couldn't bind to 53, so to test I changed my port forwarding settings to. HTML Code: Source port: 53 Destination port: 8080 (the port the web server is running on the phone)When I visit 192.168.11.254:53 in Internet Explorer 9 from the desktop or laptop it works just fine (Chrome and Firefox won't let you browse websites on port 53, they show show a security error, but IE works). I see the website from the web server that is running on port 8080 on the phone, so port 53 is bound and forwarding to 8080, but when I try to forward 53 to 40747 (the port of the DNS server on the phone) it doesn't work. I've tried the DNS server on various ports (40747, 1029, etc). I made sure the port forwarder set to forward 53 to the port of the DNS server.
I also made sure WiFi Tether Router set to use the phone ( 192.168.11.254) as the DNS, but live websites won't load and the the rules I have in the DNS server app on the phone do not cause my-example-domain.com or my-other-domain.com to resolve to either the phone itself on 192.168.11.254 or to the desktop web server running at 192.168.11.102 (I've tried setting it to forward to both). I can forward port 53 directly to the web server on the phone or to the web server on the desktop (by checking 'forward to external host' and providing the IP of the desktop), but when I set 53 to forward to the DNS server on the phone then the DNS server never does its job, as if it isn't even receiving requests. When I run nmap on the phone at 192.168.11.254 with DNS and port forwarding enabled on the phone I get. HTML Code: PORT STATE SERVICE VERSION 1029/tcp filtered ms-lsaWiFI Tether has no problem handing off the DNS to the Simple DNS Plus running on the desktop, but when it tries to hand the DNS off to DNS Server running on the phone it doesn't resolve. Perhaps there is some kind of conflict I don't understand, like maybe when the DNS setting in WiFi Tether Router tries to connect to 192.168.11.254 on port 53 and is supposed to get forwarded. I do know that at all times I can access 192.168.11.254:8080 from the desktop as long as the web server is running and I am tethered to my phone.
Lastly, there is a checkbox in the DHCP settings for WiFi Tether Router which says 'DNS Redirect' that when checked displays two IP address boxes for DNS 1 and DNS 2 under a header that says 'Redirect DNS To'. I'm not sure what this is, but it could be important.
The only other two options under DHCP are 'Use Internal DHCP' and 'Use Alternative DHCP Config'. All I want is for most requests from tethered devices to go through standard DNS while the domain names I add host records for in the DNS Server on my phone will resolve to the IP addresses I specify, whether those IP addresses are external or the IP of the phone itself where the web server is running. I have most of this working, including being able to hand off the DNS from WiFi Tether Router to one of my computers to do the routing, but I want to have it all self-contained on my phone as a standalone setup.
The web server is working, the tethering is working, the tethering handing off the DNS is working, the DNS on the desktop correctly routes the domains to the phone and the rest of the requests to live DNS, and the port forwarding appears to be working when forwarding 53 to my web server, so I'm just kind of stuck. I've been working on this for 12 hours and I've hit a wall.
It could have something to do with needing to forward both UDP and TCP in the port forwarding, although there's no direct option for that except a box to create custom scripts that modify iptables, which I've tried but had no luck with. Or maybe Wifi Tether Router binds port 53 and is conflicting with the port forwarding / DNS server. I'm open to any ideas as to why running WiFi Tether Router through the DNS on my phone with port forwarding doesn't work, but running WiFi Tether Router through DNS on my desktop does (especially since the DNS on the desktop correctly points my two domain names back to the phone for the web server to answer and also resolves live websites, both tasks that are receiving and sending requests through the phone); your input will be greatly valued.
The goal of this entire effort has been to create portable and private prototypes of browser-based applications that I've developed for still-to-go-live domain names and be able to run them entirely from my phone on any device that I tether (without modifying the hosts file on the tethered device) so that I can do on-the-fly demos even in areas with spotty data service. In addition, I can load up my SD card with media assets and personal content such as images, audio, and video and have everything available instantly in the web applications when I demo. I can also ensure that the only way to see particular applications I'm developing or access demo data is if you are directly tethered to my device. I can run full database software, application servers, and everything else directly from my phone and make changes to the apps instantly. All I need now is this one little DNS fix and I'm set.