Recently in Security Category

Monitoring security

| | No TrackBacks
Security camera

Is the security for real?

Do you keep the security level high enough?

The question seems simple. But if the answer is positive, the next answer will be "What is high enough?"

The security camera on the photo is a mock-up. An imitation, used to deter possible criminals. It doesn't watch anything, even if it's installed. Are your security systems for real, is the monitoring you perform for real? The answer is not obvious, even if you have installed a network monitoring software piece and know exactly, what to monitor.

Nowadays, it's not enough to monitor the servers alone, whatever services on them you watch. The fact the service is available and replies with expected data doesn't mean it's in good state.

For example, if the pieces of software installed is of old version and can be compromised, the security is weak. So monitoring vital system themselves is not enough.

Hidden flaws of security

The problem of using insecure software isn't limited with insecure, out-of-date functions. At times less secure configuration can be a possible reason of system malfunction of failure. How to determine there are flaws in configuration?

The two aspects of problem have no fully automated solution. Several pieces of software do have a mailing list or other means to notify of out-of-date components or security threats. Most, however, do not. The only means to be in course of events is to follow all the news on security-related forums and software sites and react immediately to every new threat published.

Talking of studying log files, it's relatively easy to detect how much time a given string is found in a given log file (say, ssh log file registers all login attempts, so if anything strange happens, it's better to be notified as soon as possible).

Also, a good advice is to install intrusion detection piece of software such as Snort, update its rules on a regular basis and use its notification features to measure the security risk level and/or signal alerts.

Monitoring software may be the dashboard of all your security setup; it's relatively easy to report all the important news to the single command centre and raise a relevant alert condition when necessary.

Security isn't a one-time set of action. It's philosophy, discipline and everyday, routing work on researching the security world and being alerted prior to the possible flaws are exploited.

Keep it simple, sage

| | No TrackBacks
jigsaw-keyhole.png

Reinventing the wheel

Simpler solutions aren't always obvious. When looking for a way to monitor a parameter, one is always tempted to re-invent the wheel, e.g. to create a custom script every time the exiting monitor types are not supported.

Definitely, it's not the best idea. First of all, it takers time. Second, it might be an inefficient solution. Third, it might be non-portable: if you wish to cerate the same monitor type for another host, you might have to create a similar script from scratch.

When it comes to monitoring the simplest parameters of the server, such as CPU load, memory usage and so on, there is no need to create a complex scheme of running remote scripts/applications and reporting data back to the monitor.

The magic abbreviation is SNMP, Simple Network Management Protocols. Let's explain, briefly, how it can be used to monitor a number of system-level parameters of a server. A Linux-powered server is assumed, although in this given case most of other operating system can be monitored through the same facility.

SNMP

SNMP daemon isn't running by default; refer to longer how-tos such as Monitoring server performance for more details on installing the daemon.

Take care when setting up the daemon: it can support a number of protocols; if you don't wish to handle security-relate issues when using version 3of SNMP, you may use v1 or v2c, but keep in mind their security level is but basic, and if you don't restrict, by other means, who is granted access to the daemon (restrict to localhost, if monitoring from the same server), you are virtually giving all the important data to whoever wish to gain unauthorized access to the server.

Try to restrict access to read-only, there is hardly need to grant write access to monitoring software.

It's easy to find the OIDs (object identifiers) of the data you wish to monitor; i.e., to allow viewing general system information such as RAM usage, grant access to .1.3.6.1.4.1 hierarchy.

Most of the data you could use are numeric; thus, the SNMP-based monitors available at IP Host Network Monitor software can be used to create very precise monitors able to reflect the level of resource usage without creating sever-based scripts and communicating with them.

Write access

Note that certain variables (OIDs) can be writable, thus allowing to control, to some extent, the device your monitoring software is  connected to via SNMP.

Note only that SNMP is supported by many devices, such as routers, and it can be used, say, to programmatically restrict or even close access to them/set usage limits base upon parameters being monitored. Say, you can restrict or limit transfer speed for ethernet cards if a data transferred cross a limit. However, it is strongly advised that the network monitoring software does never modify any device's settings it monitors.

Data cobweb: let computers talk to computers

| | No TrackBacks
Matrix screen

Inhuman interface

Monitoring software often deals with human-readable data. Whether you are monitoring a Web site availability, or a search results output, you have to parse data and analyse it. Although it may seem to fit all the needs, it isn't so.

To begin with, Web sites most often are indeed created for human beings. I.e., content is generated to suit human visitors, to make them comfortable, to represent data in a manner most useful for human readers.

Also, these pages may be quite complex and their creation involves a number of services, such as database engines. In case a monitor watches regular Web pages, the site engine performs quite a lot of useless actions. To satisfy a monitor, simpler and much less resourceful approach could be used.

Raw and pure data

I suppose you understood the idea: let's generate simpler, shorter Web page prepared for monitoring software, for computer processing. First, we won't use that many resources; second, we can arrange data in a manner that makes their analysis much more efficient.

The implementation may differ. Myself, I use a single string that contains a number of characters, every one for a service I plan to watch. Processing them becomes a simple task; and if the such a 'state summary' isn't generated for every request, it can be further time and resources saving.

Now imaging monitoring other services. Opening ports for them, or creating tunnels, secured connections able to traverse firewalls and/or other restrictions can be very unsafe and boring. Instead, we can use the same approach: generate state reports as simple files that can be accessed via other protocol, such as HTTP, and contain enough data to notify the monitoring piece of software of all important state changes.

An additional security can be achieved, if the data sent are encrypted, and/or if a special data representation is used, obscuring the actual data received. If this encrypted report page is cached and only generated

You will make all the data read-only, thus preventing any possible unauthorized data access, or allowing the monitoring software to read intrinsics of your site.

You will only have to parse "usual", human-readable pages in case you monitor somewhere else' sites.

Common traits in network monitoring and DoS

| | No TrackBacks
The Siege of Antioch

Pros and cons of monitoring

The disadvantage of not monitoring network resources is obvious: in case of any connectivity or functionality problem, you are not warned, thus a number of unpleasant consequences may follow.

All right, so we accept we need monitoring. The next question is, whether this can harm your resources (site, for example) in any way? The not so obvious answer is yes, it can.

Let's imagine we have a site and let's analyze who accesses it and how the site can react to this.

Bots, your zealous readers

Who's reading your site, mostly? Unless yours is a popular blog with thousands of readers, the answer is: bots. Search spiders, RSS bots, whatever else. Human readers can at times be in severe minority.

Spiders can be a nuisance, especially new ones, mostly misbehaving. They do not always obey robots.txt rules, thus can exhaust your bandwidth or overload server, and cause many other malfunctions. However, these often supply their identifier ('User-Agent' header) and can be told from all the other readers, especially if IP addresses of crawlers are known.

Faceless monitoring

Here we come to a very interesting conclusion: if a monitoring process doesn't behave like a browser, or at least like a well-known bot, if it sends no HTTP headers and connects to a server periodically and at known time intervals, it can be viewed as harmful.

Anonymous spiders, those harvesting email addresses and other information, are seldom written in a well-behaving manner. They do not respect robots.txt (of course),they have a habit of overwhelming server with requests.

In other words, if your monitoring process doesn't introduce itself with User-Agent, does access the site too often and doesn't throttle data transfer speed, it can be viewed as data harvester or even an attacker. A common DoS is exhausting bandwidth, when a number of processes request large pages many a time in quick sequence.

So, if you plan to use monitoring HTTP/HTTPS resources, make sure that
— your monitoring software supplies HTTP headers, providing unique id
— your monitoring software does throttle the connection speed and does not exhaust too much of channel speed
— your monitoring software adds small random intervals toits polling schedule

Security overdose: fact or fiction?

| | No TrackBacks
Barbed wire

Are you secure?

To most people, security, when talking about Internet, is a list of what to install, what routine tasks to do, and what not to do under any circumstances.

There are interesting publications on that, for example Overdosing on computer passwords and security. Among other things, it is said value of the time users spend managing passwords, SSL certificates warnings (Secure Sockets Layer which encrypts data between web server and your browser) and phishing site identification is far greater than the damage done by computer criminals.

Allow me to disagree.

First, how could one compare the damage amount? Will you persuade a person having lost all the money from their bank account due to a phishing attack, that the damage inflicted is far less than the damage from hours uselessly (so it seems) spent on studying the principles of security?

Second, what is offered instead? What kind of security precautions can be neglected without exposing oneself to cyber-threats?

Security is a discipline of mind. A manner of thinking, not a list of cumbersome, irritating indecipherable actions. Security precautions should be made by experts; for an ordinary user, security means following several simple rules. The rules that assume they are applied to every given case in due manner.

Security is for minds

Security is for minds, not for hands, devices and other things not supposed to think.

We are taught security, in one sense or another, all our life. Many would agree that one shouldn't eat without washing one's hands first. What is the big difference between that rule and the piece of advice to never click on a link in an email message, if you aren't sure who's it from?

Security is the matter of trust. Every time you venture into an area of cyberspace, you trust the owners of that place. If you enter your name and password on a bank site to access your account, you trust that bank. Just as you trust a person if you allow them to enter your house.

Strong passwords can't be secure, if they are written on a piece of paper stuck to a monitor. Strong passwords aren't secure, if a bank can send them to you on request. Access to your private data can't be secure if it can be granted without you involved in the process.

Security is a discipline of mind. There are axioms of security, better not to be neglected. Just as washing one's hands shouldn't be neglected, in general.

Above the axioms, there are several simple rules of trust that one can use to tell dangerous areas of Cyberspace from relatively safe ones.

Security isn't obsession. It is but a set of cyber-reflexes trained to warn you of possible danger. Nothing else — use your mind to decide in every given case, what and how to do.

As for me, I believe in security. It exists, as long as I know what to do to avoid loss of control, leaking out my private data and other unpleasant things happening out there.

Do you? Do you believe in security?

Who enters your domain?

| | No TrackBacks
Top-level domain names

The realm of domains

Choosing domain name is an art, talent and magic, all in one. A good domain name may bring much profits by itself, it gets more and more expensive as time goes by — just like a good wine.

Domain names industry is one of most dynamic, even though the number of «good» names, those not yet taken, is very small.

However, owning domain means handling possible security issues associated with them.

Own email, own domain

Among other identification means, email is often used to gain control over domain name. It is used to identify the domain owner and perform, beyond sending important news and updates, a number of domain administration actions.

It is definitely a bad idea to use an email address hosted by a free email service as the domain's administrative contact(s). Free email providers may be lost, they may discard certain email messages. In case you lose control over a free email address (and that may happen easily), you might as well lose your domain name. Or, at least, you'll have hard time proving you are the legitimate owner of one.

It is definitely a bad idea to use the contact email address for purposes different from receiving technical/informative requests and newsletters related to domain name(s). Remember: he who owns the email address, owns the domain.

In cases when two or more email addresses may be specified as contact email in domain's WHOIS data, try to use several email addresses hosted at reliable, preferably commercial email services.

Welcome, Mr. X

Privacy was always an issue. WHOIS data of the majority of TLDs is open to everyone, thus your data provided for WHOIS will be seen by everyone.

There are several security concerns. First, your data may be used to register other domain names; if the latter are used for unlawful purposes, you could be in trouble.

Second, spammers' harvesters will gain your data and your contact means will inevitably become the aim of unsolicited messages.

Third, if you make use of any privacy-protection service (a number of registrars offers such a paid service), you could acquire a dubious reputation of a person hiding their whereabouts. It is not a secret that spammers are using those privacy protection schemes for their benefit.

Domain names: a short survival guide

After spending much time studying the domain names district of our reality, I have worked out several pieces of advice that could be of help to those looking for protection against cyber-threats.

Don't 'just look at' free domain name, only search for it if you are ready to buy it. Otherwise, you could witness an unpleasant situation: the domain you've found becomes taken very quickly. The rule is simple: first come, first take. Cybersquatters are monitoring such searches and can act quickly, if the domain looks attractive.

Be in control of all the contact data you provide. Make sure you can restore control over email address you have; if there's a least doubt the email will remain yours, replace it as soon as possible. The same applies to all the other contact means.

Never provide false personal info for WHOIS database. ICANN obliges most registrars to perform checks and if any contact data of your domain is found to be false, you can lose the domain (or all the domains you owned).

. If your email hosting for the domain fails for any reason, you lose the control over domain.

What other security precautions worth mentioning I haven't offered?

Keeping mailbox tidy: a pile vs. folders

| | No TrackBacks
A pile of letters

A discipline of correspondence

A habit to keep everything tidy isn't inborn. It is being taught, and lessons aren't always pleasant.

Email is an important means of communication and a great tool of organizing all the workflow. If you wish to know how much a person is accustomed to a good discipline of mind, just look at how the person's mail is being kept.

An immense, almost never cleaned up inbox file is what is most commonly seen. A pile of letters, both important and volatile, personal and business ones. Unless forced to move all the message to relevant folders, such people would never do that themselves.

Big mailboxes aren't good; apart from the fact they contain mostly garbage, as time goes by, they slow down system and start to become a security issue as well.

Inboxes are temporary storage place, this should be taught to every person using business email boxes. Let's see how our network monitoring software might help to introduce this concept into the mind of every employee.

To see, but not to read

If a Un*x type of server is used to run a mail server, the overall security may not be compromised. To monitor individual mailboxes, we should use an approach when

  • the process checking inbox sizes may not read the inbox files themselves
  • checking doesn't assume granting any additional privileges
  • users must be warned individually when/if the inbox size are too big

This task is simple.

First, let's create a domain user (since we are using NT domain), or use an existing domain user having been created for technical purposes.

Second, create a network share on the mail server, visible only to the mentioned user, and operating in read-only mode. The share must provide a read-only access to the inbox directory.

Third, create a host in IPHost Network Monitor you are using to monitor your intranet and add individual monitors for every mailbox we plan to watch. A monitor is of «file» type and refers to the inbox file name.

The last and most important part: create a custom alert and use the monitor name (matching the user part of an email box) to send an alert to when the condition (file is bigger than a given value) is met.

Now you can not only watch the mailboxes won't grow too big, but alert the users themselves.

Can you offer a simpler solution?

Planning security: breaches in the wall

| | No TrackBacks
A breach in a wall

The weakest link

People are the weakest link in any security concept.

This is why security should be viewed as an ideology, not just several actions performed once.

A common mistake is to make the outer bounds of security as solid as possible, leaving internal areas virtually insecure. In other words, the intranet might be as shielded against any possible intrusion from outer Internet as possible, but intranet itself might be very vulnerable.

If there are Windows workstations, they should be all shielded as well. Antivirus software, personal firewall, antimalware — mandatory bricks the security wall consists of. All the security updates must be applied as soon as possible; unless there's a real need, software must only be installed by system administrator.

In short, the optimal approach is this: plan the security concept, as if every computer included in your intranet is accessible from Internet by anyone, and no guarantee may be provided its users(s) are all careful and literary to avoid all the possible dangers.

A Trojan horse «caught» by a user on its intranet computer might nullify whatever security measures have been taken so far. And this is just one of examples of how vulnerable becomes a network if even a single computer lacks appropriate security measures applied.

An ideal security concept

The most important, most fundamental principles I build my security concepts upon are given below, just to give an impression.

Nothing is safe enough. Not a single computer, network device, whatever else participating in intranet. No device may be considered safe. Apply the same security hardening steps for every piece of your intranet.

No default values. Nothing may be left as programmed by default, if it should be used for real. No factory-generated passwords, no default names (identifiers), if they may be changed.

All the passwords must be young: this is what all the users hate: inventing new passwords regularly. To teach people simple ways of creating strong passwords isn't an easy task, yet any weak password may jeopardize the entire security.

Make backups often. Backup everything. Every piece of data, related to setting any service, piece of hardware etc. Backup often, keep copies in several places. Remember that people belong to one of two classes: those who haven't lost any data of importance yet, and those who make backups on regular basis. Log files should also be remembered, since they can serve as proof of whatever happened, fi you need to investigate anything later.

Any change is suspicious. Literally: any. Change of password, performed from unusual place. Change of IP addresses the user(s) used to log in from. Change in Internet resources visiting pattern. And so on. Acquire a habit to study every change that looks even a bit unusual.

No precaution might be superfluous. Again, literally: no precaution actions may be considered superfluous, extra, unnecessary,weak..

What important parts of the concept I might omit?

Windows security: no right, no fright

| | No TrackBacks
A crown

Defaults aren't best

According to a report by BeyondTrust, 90 percent of Windows vulnerabilities can be mitigated by configuring users to operate without administrator rights. In other words, the less powerful is the user, the less unpleasant consequences follow.

System administrators do not grant privileges easily: the more is the number of privileges, the more powerful is the account, the more destruction it might cause. Many an action, relatively safe when no privileges are available, become very dangerous otherwise. However, all the personal PC users are tempted to grant their main users all the rights. Yes, it is simpler: no need to logout and log in as an administrator, if it is necessary to install or upgrade software and so on.

In total, 64 percent of all Microsoft vulnerabilities reported last year are mitigated by removing administrator rights. The default state of an operating system when user has too much access has become very dangerous.

No power or superpower

The security model of Un*x means you have either all the rights possible (if you use a root, superuser account), or, roughly speaking, you have no rights at all (if you use a regular user).

The very idea of using privileged user all the time must be discarded and strongly advised against.

It is well known that there are two types of people: those who have never lost important data, and those making regular backups.

Of course it's joke, yet it bears an important truth: the less time you spend restoring lost or corrupted data, the more time you have for more important tasks.

So, the conclusion is:

  • avoid assigning users any privilege unless it's absolutely inevitable
  • use privileged users to perform local administrative tasks only

Have you experienced any problems working under a privileged user account?

Intentional insecurity, or They deliberately open links in spam

| | No TrackBacks
Spam message

The «human factor» of security

Human beings are the weakest link in any security system.

You can explain why spam messages should never be opened, if it's evident from their look why they're spam and nothing else.

You can provide details on how spammers perform monitoring of their victims' email boxes reliability (by providing specially crafted links to external images, for example).

You can prove that spam is only existing because people open spam messages and perform whatever actions are expected (click on fraudulent links, buy the promoted goods and so on).

You can provide whatever else you can say about spam, its danger and consequences of not destroying it on sight — and fail to prevent people from opening spam messages deliberately. That's the most strange thing about human beings' nature. Curiosity, carelessness, whatever else, it makes sending spam messages a profitable business.

Ars Technica posted an interesting article about users clicking links in spam messages. Looks like the relatively young users, considering themselves experts in network security, are those encouraging further spam sending.

The ABC of email security

The main principles of email-related security are well-known, yet they are at times neglected. Let me cite some of them.

All the fields in an email message can be forged. It means you can't rely upon any field, you can't be sure the message is genuine unless using additional means to verify that.

Some of the means, such as SPF check, using real-time block lists (such as those mentioned at Spamhaus) can filter off most of spam messages, recognize them on entrance.

One should never click on links in email messages, unless absolutely sure the message is 100% genuine and secure. In fact, it's safer never to open whatever links are in email messages, even if they are legitimate. Even if link doesn't make use of your OS, or software (such as the browser) possible vulnerability, it can help the sender to track your email address and make sure it does accept email messages. Expect spam flow to grow after that.

In case you are urged to perform any action, check first that the message came from whoever claims to be its sender. If it is claimed the message comes from your bank, call your bank's office, make sure the email is legitimate and true. And so on.

Spam messages never address you by name. Why? because they don't have it. because they don't care. Remember: the sound of one's name is one of the best sounds. Every legitimate email sender, if addressing you personally, will always address you by name. It doesn't mean that every message where you are addressed by name is always legitimate, but if you are not addressed by name in seemingly personal message, be wary about its contents.

Teaching network security

Nowadays the network security is taught the hard way: people suffer from consequences of their lack of knowledge about security, and only after that the victims do start to take security seriously. At times, at least.

The only rule could defeat spam and whatever dangers it spreads: do never trust whatever you see in spam message, do never open them at all.

Have you ever opened a spam message? Why have you done that, if the answer is positive?

Reblog this post [with Zemanta]

About this Archive

This page is an archive of recent entries in the Security category.

Network services is the previous category.

System administration is the next category.

Find recent content on the main index or look in the archives to find all content.