The most trivial check is using the TCP packet TTL (Time To Live). Windows and Linux doesn't have the same default value so it's "easy" to recognize which one sent a specific packet.
Just look up for "ttl windows vs linux" to find tons of article about it :)