Server Security Series : Splunk as syslog

This is the first post in a series of Server Security, about how to harden the server security.
There is a couple of things you should be aware of when dealing with server security, such as
- Antivirus
- Firewall
- User Rights
- Sharing and Permissions
- Services
- Logging
- Updates
And so on. This tutorial will focus on the “logging” part of the security aspect.
Since you should never assume that your system is secure, because nothing is secure. You must assume that the logging on your computer is doing its job.
The three steps to harden the security with logging is,
- Log the data
- Analyze the data
- Fix any issue with the problem(s) that occur.
One logger that I have used for a while is SPLUNK a fantastic indexing system.
I have all my computers, switches, access points and routers to log against my SPLUNK server.
Splunk works by indexing the data that is sent to it. By setting up simple rules and timed searches, you can set it up so it sends you warnings, alerts and other messages depending on what it finds.
Looking at logs has never been more easier.
To download Splunk click here, or just go to http://splunk.com. There you will find general information on how to install it for your system. I always use a LINUX driven operative system when installing Splunk. Just because it works best.
I am not going to write a guide on how to install splunk, or how to send data to it. Because there are thousands of posts on that subject. But if you want me to guide you to one, click here
Search
This assumes you have installed SPLUNK and managed to send some data to it.
Search is a great app to begin with, it does exactly what it says. It searches trough the indexed data.
Something you will notice right away is the simple search bar, with absolutely no technicality at all about it. You simple write what you are looking for, and it shows all the results for that given type.
Then comes the time to use the filtering option. Be sure to filter trough your data so you don’t get to much at the time, because that is just a pain in the byte.
Let us create a scenario, for instance say you are looking to see when a specific user logged on to the network, or if there is a mac-address you don’t know who it belongs to. Say that our “specific” person is named John.
All you need to do is write is his name in the search field.
So all you need to write is,
John
OR
name="John"
OR
login John
Is it not cool? What you can do with so little? Now let us take on an even greater challenge, let us say you have had some couple of problems on your network recently, and you don’t know why. For the sake of this post, let us say you have an intruder on your network.
I have a couple of HP Switches and Linux driven routers with good logging features. Make sure that your network equipment is correctly configured, and that they are logging “EVERYTHING”.
All you need to write in SPLUNK is,
MAC-ADDRESS
OR
PHYSICAL ADDRESS
OR
HW_ADDRESS
With this search you will get every physical address on your network. Be sure to write down your physical address for your network equipment, computers and every other gadget you own that is connected to the internet.
This truly depends on the way your network equipment logs the physical address.
Does this seems a bit to much, just to look up the physical address every time? The answer is yes.
The best thing with splunk is that you can save searches, and schedule searches.
So you simply need to write in the search query once, and exclude all of your own physical addresses, then save it for later. You can read much more about how to use splunk if you go to “Getting Started” when you are logged in to the splunk web.
I also suggest you to look at all the apps that are available for splunk. There is everything from pinpointing the location of a user, to making grocery lists.
Some Tips
- Always be sure to make the syslog server secure. Having it on a virtual machine or a separate machine in the corner of your room is preferred. Or if you are lucky, use on of those lovely servers in your server rack.
- Be sure to stay informed on your equipment, then you know if there is something wrong or if there is some bug fixes you should do. Such as subscribing to RSS feeds about [YOUR EQUIPMENT] and the software you are using.
- Make sure that your computers and network equipment logs everything.
- Read the logs carefully, if you find something that catches your eye. Save it as a search.
Suggestion
I suggest using Splunk and Nagios together. That gives the best experience when dealing with both network and logging.
That is it for this post in the Server Security Series. Next time, I will be showing you how you can use Group Policy to push out network passwords, and how to setup Sharing the right way.
If there is anything I have missed or something you would like to say, please comment below.
Until next time’
Morten Haugstad




