How does garena client sets up a network? [closed] - windows

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
How does Garena works ?? Does it work based on VPN ??? But it doesnot create any virtual network adapter. so how does it creates a network between players ??
One thing is for sure, garena client includes a game launcher. So I suppose when u start any multiplayer game like warcraft via the launcher, it somehow intercepts the packets to and from the warcraft game and send it to the destination via VPN or any other means (Tell me what means are possible for gaming over internet if not VPN)
But how can u do so ?? How can u intercept all packets from a particular application without using any virtual network adapter ? and what protocol could it be using to establish a lag-free gaming experience ??
Assume : windows, warcraft, internet, NAT, Lag free

How does Garena works ??
Last time I used it, GArena gets a list of servers (from a central location), and when you start a game (say CoD4) it lunches the game with the server:port as a parameter and since most of garena users are connecting to the same server, you may thinks that it's garena that is routing the packets to the proper application.
How can u intercept all packets from a particular application without using any virtual network adapter ?
It's called packet sniffing, tools like Wireshark can help you analyse all the packet that are transferred through a network interface without creating a virtual network adapter.

I notice that game must be started from withing Garena client. Maybe they reroute calls to Winsock library once the library is loaded.
I don't know how they did it, but I would do it with layered service provider.

Related

Connect to internet using wlan0 and channel hopping mon0 as Monitor [closed]

Closed. This question is not about programming or software development. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 11 days ago.
Improve this question
I was given a project to count the number of Wifi devices in a room and my research led me to getting an TL-MR3020 and installing OpenWRT on it.
I can set up mon0 in Monitor Mode just fine
airmon-ng start wlan0
Interface Chipset Driver
wlan0 Atheros ath9k - [phy0]
(monitor mode enabled on mon0)
which allows me to use scapy and sniff for Probe Requests on the mon0 interface and stay connected to the internet (in Client/Station/Managed mode) on the wlan0 interface to send the results to my server.
The problem I'm running into is that my sniffing is only occurring on a single channel rather than hopping from channel to channel. I've learned that because the two interfaces share the same radio they must both be on the same channel frequency and that channel is dictated by whatever Access Point wlan0 is connected to.
I can verify that when I disconnect from the AP that channel hopping works just fine
airmon-ng stop wlan0
airodump-ng mon0
What is a good strategy for scanning the entire network spectrum while being able to report my results?
What is a good strategy for scanning the entire network spectrum while being able to report my results?
Use a machine with two Wi-Fi adapters. Keep one of them on the channel for your Wi-Fi network, and use it for communications; do channel scanning with the other one, running it in monitor mode.
Scan the networks and save the results in memory; when you're finished with the scan, switch to the channel for your Wi-Fi network, join the network, and report the results then.

Do I need for forward local ports? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
Do I need to forward these ports? Is there a way to do it on Windows 7? I've tried using a program named smart port forwarding but it crashes when the program is running. Thanks in advance.
You shouldn't need to forward those ports in order to be able to run the applications. Chrome and Steam are connecting through those ports to the internet because they are ones that the operating system says are available for outgoing connections and provided them with that unique port number when each application asked for it.
These applications should all run fine for you, without needing to open any ports. Opening a port is most always to let incoming traffic be accepted, not for outgoing traffic to be stopped. A telltale sign that a port is not open is that no connection can be made. If you tried to connect over the internet (port 80) to most random IP addresses, you won't be able to find anything, because the device at that IP address rejected your attempt to open that port to them. So because you are (I am assuming) able to successfully run both Chrome and Steam and have them be able to connect to the internet, you shouldn't be facing a port forwarding issue. The port numbers are just assigned essentially at random each time that an application needs to open an outgoing socket. (this being a simplification of the whole paradigm, but hopefully enough to be able to answer this question).
Edit: And yes, like #Rumesh-Eranga pointed out as well, port forwarding is done at the router level (on the internet router itself) and not at the computer level. It's a way of saying to the router "alright, any time this network receives a request to open port XYZ, send it to this computer that is connected to our local network."

Windows Routing table of disconnected Interfaces? [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I need to get the routing table for disconnected interfaces on Windows.
To give you a little background why:
Im using OpenVPN. OpenVPN will setup several routes after the TAP adapter is online.
If the OpenVPN crashes or the User just kills OpenVPN, these routes won't be deleted by OpenVPN.
And because the TAP adapter will be disconnected after this, route print wont show any route for the adapter. But the next time the TAP adapter comes up the old routes are active again. For several reasons like multiple tap adapters, IP ranges and so on its hard to build heuristics to detect old routes, so it would be great i there was some way to see and delete routes for a disconnected Interface.
You may try this command:
netsh interface ipv4 show route
There might be some information that you needed.

Capturing and redirecting outgoing traffic from given ip:port to target ip:port [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 9 years ago.
Improve this question
On Windows 7 I have an SSH tunnel running on my local 127.0.0.1:34567 address that I need to access so I can access 12.34.56.78:8080 with the help of SSH proxying for me as I cannot access that IP directly (due to not being on the whitelist).
My basic simple goal therefore is that on Windows whenever I request 12.34.56.78:8080 from anywhere (my browser for instance), I would like the request to instead be diverted to 127.0.0.1:34567 transparently, and I would like a software solution to this instead of a hardware one if possible. I think this is what's usually achieved in Linux by something called iptables, but I'm looking for something I can use on windows.
Does anyone know how this is possible? If I need to use any external Windows program for this, that is fine, but I prefer it to be free.
EDIT: please do not present me with reverse tunnel solutions. My goal is to request the same ip:port that I'm blocked from, but to be able to get to that ip:port successfully through the means of my existing SSH tunnel. Reverse tunnels involve requesting a different ip:port which is not what I'm looking for (I already have a forward tunnel I can use if I wanted to make requests to a different ip:port).
Example scenario: Pretend that you have an C-compiled .exe file whose source code you don't have access to that is hardcoded to request 12.34.56.78:8000 for SOAP webservices. The problem is, your IP is blocked from that ip:port, but you do have access to an SSH server which isn't blocked by 210.212.239.117:8080 and also have an SSH tunnel set up for that SSH server to access that ip:port... but your .exe has the original ip:port hardcoded, so you can't just tell it to request the SSH tunnel ip:port, as it's not possible to change the ip:port to be requested in any way due to it being hardcoded! You would have to have the request to 210.212.239.117:8080 on your computer somehow diverted to your SSH tunnel on the OS level. So how would you get that done?
EDIT 2: I'm not looking for routing tables either (I think). I don't want to modify the route my request goes through to reach target ip:port; I actually want to have the requested ip and port themselves silently changed. I kind of want to achieve something like the hosts file, except instead of resolving hostnames to ips, I want ip:ports to be reresolved to different ip:ports.
Bounty: Sorry, it appears this stackoverflow question of mine counts as Offtopic and isn't eligable for offering a bounty, so sorry to anyone who put in extra work and would have potentially received the bounty!
I haven't found a ready executable, but WFPSampler seems to be promising. It uses the new Windows Filtering Platform API (available since Windows Vista) to manipulate packets.
To use it for redirecting outgoing packets, give a look at Q&A section, there are many examples.
Check out BarbaTunnel: http://barbatunnel.codeplex.com/
TCP-Redirect mode is probably what you're looking for.
You can use a reverse shell. It can mirror a remote port. Use ssh to connect with -R option. For example ssh -R xxxx:localhost:xxxx user:pass#www.server.com. Check this out:http://www.debianadmin.com/howto-use-ssh-local-and-remote-port-forwarding.html.

How can I modify/redirect packets in Windows with rewritten OpenVPN tun/tap dirver [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I want to make an transparent chain-proxy
using a redirect server and chain proxy client written in Qt for Windows.
I've tried ndis+tdi but it's too complicated for me.
I've started to break through the openVPN code.
So the task is to start dummy tap device even if there no need in OpenVPN connection and redirect packets to some addr:port on wich my redirect server will be bound.
Maybe it is better to implement new plugin functions ??...
You can use OpenVPN's TUN/TAP driver ("TAP-Win32") as-is to implement a network device backed by software. I'm not sure what you mean by "rewritten OpenVPN tun/tap driver"; you don't need to modify any existing code - just write your own program which opens TAP-Win32 and reads and writes frames/packets. You don't need any other part of OpenVPN, just TAP-Win32.
However, if you use the TUN/TAP driver, you will have to deal with individual frames/packets. If you will be redirecting just TCP (i.e. you'll redirect connections not packets), it may be useful to have your redirection program only provide a local SOCKS server. With SOCKS you get to work with connections and not packets. If a given network program supports SOCKS, you can simply tell it to use your SOCKS server.
On the other hand, if you want to be able to redirect for all applications, not just those which understand SOCKS (or you don't want to configure each application for SOCKS), you can use a program which will allow you to forward raw TCP connections (on packet level) through your SOCKS server. See my program tun2socks.
Once you have a program operating a TAP-Win32 device, update the routing table to get packets routed into it. You probably want to make it the default route, overriding any previous default routes. But be aware that the routing table applies to the redirection program itself too, so you need to add specific routes for hosts that the redirection program connects to, or they will end up going back into the TAP device. The tun2socks page expains how to do that when using SSH forwarding.
Update: tun2socks deals only with the TUN device and simply forwards all incoming connections. It doesn't decide what you want to forward. Even if it had some policies (like port numbers), it couldn't do anything useful with that info. For example, if it responds with a reject packet, the connection will simply fail - and the OS will not look for an alternative route. (it could forward connections to different SOCKS servers - but I think that would be of no use in your case)
The feature you seem to need is called "policy routing", and it needs to be offered by your operating system. Unfortunately, it appears that Windows does not provide policy routing. If you really need it, you may want to use Linux instead, which provides many more network-related features than Windows (policy routing being one).
Alternatively, instead of using tun2socks, some userspace socksification tool may work for you. These are programs that hook network-related system calls when launching a specific application, in order to make the connections go, for example, through SOCKS. If such an application supports routing rules, it may fit your needs.
An example of such a tool for Windows is ProxyCap (commercial software), which claims support for "flexible routing rules".

Resources