Jump to content

POrtFoRwarding AlternAtives for a mobile tethering!


NuLLbyT€

Recommended Posts

Hi Guys,

I'm just curios that is there anyway to get a reverse shell or to host things in the network without using a router??

Uhmm well i want to know that whether we can find alternatives for portforwarding?,...like tunneling for example reverse ssh tunneling and vpn gateways...blah blah blah.I want a solution for this stuff. Please guys help me make out!

I'm having a mobile with 4g internet connection.I'm mconnecting my laptop to the internet via usb tethering,also my laptop has wifi interface incase you can suggest alternatives!

I want a way to pentest in the WAN with my mobile usb tethering!

 

 

 

                                                                                                                                                                                               THANKS Hak5! 

Link to comment
Share on other sites

A router is the gateway between two different subnets, if you stay on the same subnet then you don't need a router, if you go off it then you need a router to route the packets between the subnets.

 

I think you are messing up your terminology here but can't really understand what you are trying to do.

Link to comment
Share on other sites

2 minutes ago, digininja said:

A router is the gateway between two different subnets, if you stay on the same subnet then you don't need a router, if you go off it then you need a router to route the packets between the subnets.

 

I think you are messing up your terminology here but can't really understand what you are trying to do.

Actually i am trying messing up with metasploit...I dont have router ! So that i cant a reverse connection from the payload so that i tried different things like setting the payload to talk with a vpn ip and setted up a listener in the tunnel interface.But i can't get a reverse connection!.So please suggest me an idea to make out this!

                                                                                                                                                                                                Thanks

Link to comment
Share on other sites

It doesn't matter how much or little of a noobie you are,  if there is access between the two machines and they are on different subnets then you have a router between them.

 

If you can't do either NAT or PAT on the gateway then you won't be able to do a reverse connection as you won't be able to pass the traffic on.

Link to comment
Share on other sites

1 minute ago, digininja said:

It doesn't matter how much or little of a noobie you are,  if there is access between the two machines and they are on different subnets then you have a router between them.

 

If you can't do either NAT or PAT on the gateway then you won't be able to do a reverse connection as you won't be able to pass the traffic on.

how about connecting the target machiine to a vpn same as of mine?

Link to comment
Share on other sites

Explain the exact scenario. If all you want to do is practice reverse connections then why not set up a VM to do it locally?

 

What are you trying to achieve and what is the set up you have to work with?

Link to comment
Share on other sites

Just now, digininja said:

Explain the exact scenario. If all you want to do is practice reverse connections then why not set up a VM to do it locally?

 

What are you trying to achieve and what is the set up you have to work with?

I am having a mobile tethering to connect to the internet.I don't have a router i'm using my phone's internet connection.As you know that there are no open ports . I can open ports if and only if i have a router.So I thought of alternatives like portforwarding through remote ssh tunneling.But it made no use so i used openvpn to connect to a vpn and created a payload with the public vpn ip and started listener with the ip of tunnel interface!.Still now i can't figure out the problem.I used the vpn because it is accesible by every systems on the internet.Could you suggest me a technique 

Link to comment
Share on other sites

Your modem is a router, it routes packets between the different subnets, if it didn't you would be stuck on your local subnet.

 

Why do I know there are no open ports? I can do port forwarding on my mobile devices.

 

You've still not explained what your target is, is it a machine you own? Is it a friend's machine? Do you have root/admin on it or user? Is it behind a NAT gateway and if so, do you have control of that?

 

What is it you want to achieve? Are you trying to understand reverse connections or is there a specific reason you want a reverse connection out of this one machine?

Link to comment
Share on other sites

As digininja said: your phone/modem is acting as a router to pass traffic to the correct locations.
I have a 4G modem in my home with open ports, and i use both NAT and PAT to set it all up.
If you're unable to open ports, try checking with your ISP if they offer this feature, or if they are actively blocking ports.

I know that i had to change the APN on my modem from the default one, because my ISP was blocking ports on the default one to protect their users.
Ask your ISP if they perhaps use a feature like this, where you enter another APN to allow opening of ports.

Link to comment
Share on other sites

  • 1 month later...

Draw a map of your topology, with each subnet, what gateway is at each network edge, then look at where you need forwarding. Mobile networks aren't going to have a "router" type interface to login to so you can configure ports to forward unless it's a stand along 4G modem or such, and even then, not 100% sure you're provider's setup will give you an option to do the port forwarding to even the phone you're tethering to, so you are at some effect limited by the mobile provider. My 3G modem has some router settings, but as I recall, was no port forwarding settings for NAT. This isn't like tethering with a pineapple and providing local network access to nearby wireless devices which share the same local router.

Also, If the victim device over the WAN is behind NAT somewhere, unless the victim machine makes a connection to you, you won't be able to reach it with anything as you should be dropped by NAT at that networks border(in theory). If the target is directly exposed to the Internet, and vulnerable to some remote exploit, then it's where are you in the transport and listening end which needs to be looked into. Does it pass NAT back on your side and do you have control of it? Is there any done by the provider you have control over? If you do have control over the ports, put your attacking machine in a DMZ, or port forward your receiving port that is listening for the victim connection from the providers side(which I have my doubts you'll have any access to). If you're going over the mobile network, one has to assume your IP is also dynamic and going to change randomly, in which you'll have other challenges to deal with maintaining where DynDNS might normally come in handy, but if tethered directly to the phone, your phone's provider is probably the block you and can't get past with a DynDNS setup, even if you could open every port on the tethered phone.

One thing you can try is test what ports have access by setting up a local web server; simple default apache page from your attacking machine on whatever ports you want to test to listen on for metasploit. If it can't be reached from the web(try on another machine over the internet), keep changing ports till you find one that isn't filtered. Next would be tunneling in and out, which would probably require a bounce point unless you were VPN/Tunneled to the same network and subnet as the victims LAN, which negates need for any forwarding.

Link to comment
Share on other sites

  • 3 months later...
On 12/9/2016 at 6:05 PM, digininja said:

Your modem is a router, it routes packets between the different subnets, if it didn't you would be stuck on your local subnet.

 

Why do I know there are no open ports? I can do port forwarding on my mobile devices.

 

You've still not explained what your target is, is it a machine you own? Is it a friend's machine? Do you have root/admin on it or user? Is it behind a NAT gateway and if so, do you have control of that?

 

What is it you want to achieve? Are you trying to understand reverse connections or is there a specific reason you want a reverse connection out of this one machine?

why does one need to explain why? if someone asked you excuse me in lost can you help me with directions please sir. would you then say well why do you need to find your way out or stupid things like have you googled it. mate stop with your comments if you have no answers ppl like you make forums such a ball ache.

Link to comment
Share on other sites

1 hour ago, PROTOCOLSOCIETY said:

why does one need to explain why? if someone asked you excuse me in lost can you help me with directions please sir. would you then say well why do you need to find your way out or stupid things like have you googled it. mate stop with your comments if you have no answers ppl like you make forums such a ball ache.

im mean you @digininja

Link to comment
Share on other sites

1 hour ago, PROTOCOLSOCIETY said:

why does one need to explain why? if someone asked you excuse me in lost can you help me with directions please sir. would you then say well why do you need to find your way out or stupid things like have you googled it. mate stop with your comments if you have no answers ppl like you make forums such a ball ache.

English doesn't seem to be your native language, but I'd say be polite. He was more than helpful, and you're not contributing to the op's question, but instead instigating for no reason. If you need help with something, don't start off on the wrong foot.

Link to comment
Share on other sites

4 hours ago, PROTOCOLSOCIETY said:

im mean you @digininja

By understanding what a person is trying to do you can give a much better answer than just giving a generic one that may or may not help.

If someone asked me to recommend a good bar in my local city I'd ask what area they were going to be in, what type of bar they liked, what day they were going to be there. Without asking all of those, I'd just recommend my local which is a quiet locals bar that is great if you know everyone but probably a bit quiet if you don't. If they answered all of those and said they wanted a real ale pub in the centre then I'd send them to the Red Lion, if they liked rock music I'd send them to the Dove and Rainbow, if they just wanted to get drunk on the cheap I'd probably go for the Harley.

As the OP didn't seem to understand what a router was and how some basic level networking worked, I felt it was worth putting in the effort to try to learn what they were doing so I could give the best advice. I could have googled the answer and pasted it in but it probably wouldn't have helped and even if it did, the OP would have gone away with a set of instructions rather than an understanding.

Curious to know, why are you dredging up a thread from February?

Link to comment
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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...