Catching rogue Web servers


Catching rogue Web servers
Tom Lancaster

Microsoft makes it very easy to run a personal Web server. So easy, in fact, that many corporate desktops are running Web servers and their companies don't even know! This presents a clear security risk to the organization and in most cases, shutting down these Web servers should be given a high priority. Unfortunately, that's easier said than done.

Part of the problem is that users can install a lot of different Web servers, not just IIS. For that matter, they can install all kinds of services you don't want, from FTP to game servers. It's impossible to know the name of each Web server so that you can script shutting it down, but you do know one thing... what port it's on.

One way to find devices running servers is to put a command in their login scripts. This command will run the "netstat -a" command and search the output for special characters. If it finds them, it will send a netbios message to a monitoring station you setup.

For instance, to find rogue Web servers, and send a message to a host with the computername spanky, use this command:

netstat -a | find "http" && net send spanky Help! I'm running a rogue Web server!

The double ampersands (&&) are a conditional operator that only executes the following command if the previous one is successful.

Of course, you could also use this same script to find all

Requires Free Membership to View

the desktops listening to popular ports like BackOrafice, or whatever the Outlook e-mail virus of the day is using.

Also note that your alert collection server must be running the messenger service to receive these messages, but your users can send them without running the service.

Thomas Alexander Lancaster IV is a consultant and author with over ten years experience in the networking industry, focused on Internet infrastructure.

This was first published in November 2001

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

Disclaimer: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.