detect os version of remote machine - networking

i'm working on some simple network management tool and it has a scanner that should display all active devices on the network and also show their os and its version.
at least i want to get windows and linux versions, but some other (like cisco ios) are also valuable.
i've looked into tcp/ip fingerprinting using ttl and window size, but it seems not very reliable and only detects whether it is windows of linux.
is it even possible?
p.s. i don't want to use some ready solutions like wmi or snmp

Related

Accessing Serial Ports with an Application Runs in Flatpak

I recently updated my IDE to Monodevelop 6 using Flatpak, on Ubuntu 16.04 LTS, from an older version 5.
I have an application that interacts with serial ports which is basically a USB/RS232 adapter connecting a device to my computer.
I have no issue accessing USB port (/dev/ttyUSB0) when I debug the application in Monodevelop5. However, the device directory (/dev/) that I have access to, using Monodevelop6 is completely different than the one I have access to in Linux, and there is no ttyUSB0 in that folder.
I believe this is because Flatpak runs the application in sandbox. So, if that is the reason, how can I access to a serial port then?
Thanks.
Most likely that's because Flatpak is blocking access to the serial device.
Unfortunately at the moment I don't think there is a way to give access specifically to the serial devices, so you'd need to give access to all:
$ flatpak run --device=all com.xamarin.MonoDevelop
What this does is essentially mount the host's /dev inside the sandbox, so the app has full access to it.
It's a pretty big hole in the sandbox, but sometimes it's needed until all the permission handling stuff gets implemented.

read MAC address of machine from Adobe AIR

i want to read MAC address of machine from Adobe AIR. I am using flex 3 and AIR 2.
how can i do this
the main purpose is i want to install that product in only one machine
var ni:NetworkInfo = NetworkInfo.networkInfo;
var interfaceVector:Vector.<NetworkInterface> = ni.findInterfaces();
Taken from the Network Info sample in the desktop version of Tour de Flex.
As far as I can tell, you cannot do it with Flex/AIR alone - you can however use the NativeProcess API to communicate with a Java/C program that can do this for you.
If you want to limit your application to just one machine, why don't you just install it manually without giving away the setup file - is it a remote machine? Even in that case you should be able to do a remote installation, right?
The answer "track the combination of IP address and user ID" won't satisfy my (very similar) needs. If the (laptop) computer is moved across WiFi domains, its IP address will change. If the computer is on a commerical IP provider, the IP address can often change without warning or notice.
My users don't want to deal with such problems. They don't even want to know that these problems exist!
The binding of MAC address and user ID can be done at installation time. It's not perfect, but it's pretty good.
Of course what we need is an implementation of public-private key...
Oz

Is there a packet sniffer for Windows Mobile?

I'm looking for a tool along the lines of Fiddler, or better yet Wireshark, that would run on a Windows Mobile 6.1 device.
I have an app which calls some webservices on one of our servers, and I want to make sure it it going out to the proper address.
Whenever I want to test something like that I connect the device to my PC and use ActiveSync. The mobile device then can send all of it's internet requests through the PC. Wireshark can then be used to sniff the traffic coming in and out of the device. Works good and is a stable approach.
I recently had to search for this myself. There are a few of these out there but most are old and have not been updated recently. If you are looking for one to sniff the WiFi traffic it should be simple and Google should provide something suitable. However the issue I ran into (and could not get around with about 3hrs invested) was trying to sniff the EV-DO/Cell data connection. Seems the cell radio uses a different type of network driver then the WiFi connections on a WinMo device. Not much of an answer, sorry, but I figured I would share my experiences.
There is an experimental version of WinPCap for windows CE.
Maybe it will work for you.

network monitoring on windows mobile 6

I am currently trying to write a network monitoring software for windows mobile 6. I googled a lot and some people say that it is not possible to use a NDIS driver or WinPcap or so for monitoring any network interface. Others say that it is possible. Fact is, that I found no exaples, nor any sourcecode on the net.
Therefore I ask this community: Is it possible to write a packet capturing tool that works on data-link layer for windows mobile in C or C#?
with best regards
Desktop and Server Windows products have a very defined, generic, and pluggable structure into which you can insert hooks into the network layer. (Look up LSP or Layered Service Provider - this is how AntiVirus/Firewall programs plug themselves into monitoring your network traffic). As far as WinPCap, it plugs in one level lower at the NDIS driver level, but regardless, Windows Mobile just is not nearly as flexible when it comes to this. I don't necessarily think it's just Microsoft being short-sighted here, though - it takes much more power to provide a generic and pluggable LSP or NDIS layer that most mobile devices just can't afford.
The most important point here - NDIS Packet Capturing is not supported for Windows Mobile. Closest you can get to a mobile platform with packet capture is Windows Embedded CE.
So, in order to capture network traffic for Windows Mobile you would need to develop your own NDIS driver framework. Not a small task.
Windows Mobile uses Windows CE.
NDIS is very much present on Windows Mobile, so you can write an intermediate driver to capture traffic.
However, it already has netlog which should do the work for you: http://msdn.microsoft.com/en-us/library/ms883126.aspx

control a users USB device via a webpage? Possible?

I'm wondering if there is a way to create an asp.net webpage that will connect a visitors USB device to an application on the windows bases server? This way we avoid having to install a software on the visitors computer to control a USB device update that they purchase form us.
All they have to do is visit our update page, plug their deivce to the USB, and have our site update the usb hardware.
Possible? or am I dreaming? :)
i found software like: USB over IP, and few others. But not show ure its possible to create a C# or vb.net based ASP.net page to control the visitors USB device.
Please advise.
In general, Web pages and scripts that run in browsers are limited in what local system resources they can access. Direct access to hardware like USB devices has obvious security implications.
The only way I can think of to do this might be an ActiveX control (IE only, I think) or some other kind of browser plugin.
One possibility is building a webserver into the USB device. Give the device internet access, and get it to download its own firmware in a process controlled through the webpage that the usb device serves.
Note that I have no idea if this is actually possible, just thought I'd throw in this different way of looking at the problem.
It is possible to create an ActiveX/.NETcontrol/Java Applet that will do it.
Granting the rights to this thing to access local devices will require certain security setup which can be automated, but in any case will require some user consent/interaction
I see here 2 ways:
ActiveX control
The problem is that the user should first download and install the
ActiveX from an Internet web server or from a local file
USB Device driver + DHCP Server + Web server embedded in the
device
Your USB device, once plugged, should present itself as a "Virtual
Ethernet Interface" in order for Windows to add the driver to the
list of the Internet Connections.
The Device should have also a DHCP server in order to give Windows
an IP address. Beware of the fact
The USB Device should also have an HTTP server.
At the end of this process, Windows will have 2 IP addresses.
Now you have to figure out how to have IE point to the index.html
file of the device.
Buy/Find a commercial software
You are not the first guy on this planet that has similar
requirements.
The only way I can possibly imagine doing this is through JAVA
EDIT: Looks like there might be an ActiveX way to do this as well, though ActiveX is Internet Explorer only, which limits it's usability.

Resources