How are programs in windows (7) allowed to open sockets / connect to the internet without UAC?

0

I tried searching online but I feel I'm not searching with the correct keywords.

I'm teaching myself network programming just to understand how everything fits together better.

I've made a simple program that will open a raw socket, and respond to HTTP requests on port 80. But when I run this program, I need to elevate with UAC or Windows Firewall before the program runs.

How do browsers and other similar programs that make (presumably extensive) use of sockets work without these popups?

druckermanly

Posted 2014-10-23T21:46:55.677

Reputation: 105

Answers

0

Browsers and other similar programs don't use raw sockets.

David Schwartz

Posted 2014-10-23T21:46:55.677

Reputation: 58 310

Ah, so what should I search for to learn of the alternatives? Searching "alternative to raw socket on windows" yielded nothing relevant. – druckermanly – 2014-10-23T22:02:23.563

I'm not quite sure how you got to where you are. Why are you even thinking about raw sockets? That's a pretty advanced thing to even be thinking about. – David Schwartz – 2014-10-23T22:03:11.620

I'm just playing around, really. Nothing more complex than that. Wrote my own tiny, inefficient, and buggy implementation of wget just to learn a little and parse websites for relevant data. – druckermanly – 2014-10-23T22:07:27.053

Seems my internet just died, I'll accept this answer from my phone as I fear otherwise I'll forget to. But I still don't really know how to use sockets "properly," other than messing around with raw sockets. Oh well! – druckermanly – 2014-10-23T22:23:07.837

Read any good introduction to WinSock programming. MSDN has one.

– David Schwartz – 2014-10-23T22:36:36.777

I don't agree with David Schwartz his answer for example ping tool (windows) uses icmp raw socket to send a icmp type 8 echo request packet.. – r-d-r-b-3 – 2017-07-27T14:58:37.227

Where do you think I said or implied otherwise? – David Schwartz – 2017-07-27T19:24:23.540