itun
itun

Reputation: 3521

Network control on Windows

How do I control the network interface on Windows? Actually, the idea is quiet simple.

  1. Establish connect to a certain adapter on a computer.

  2. Direct whole traffic of the adapter to this program.

  3. Give the rights to this program what must be transfer to the adapter and what should not.

I think the program has to implement any windows network adapter interface and be registered as an adapter driver. Thus, when it wants to transfer data to real adapter, the program has to call adapter driver methods. In their turn, the methods implement the same windows network interface (or that is called in other way don't really know, I hope you get the sense), don't they?

As a result, we have a kind of inheritance here. Before use our new driver: windows application and windows itself

________________________ windows network interface

DRIVER of Adapter1

________________________ end of OS boundaries

Adapter 1

Use our new driver: windows application and windows itself

________________________ windows network interface

our DRIVER

________________________ windows network interface

DRIVER of Adapter1

________________________ end of OS boundaries

Adapter 1

I believe that kind of interface exists and I hope it is realized very easy.

Upvotes: 1

Views: 390

Answers (1)

EdH
EdH

Reputation: 3303

You will likely need to hook Windows API calls to really do this. It is possible... Start by Googling hook API and Winternals - and see if you can find their sample code.

Before Winternals was bought by Microsoft they published their code. http://technet.microsoft.com/en-us/sysinternals/bb545021

The idea is this:

  • You write a user-mode program which controls your hooking device driver.
  • Your hooking device driver determines if network traffic on given API calls is ok.
  • Driver allows normal API calls to succeed if they are.

Upvotes: 1

Related Questions