(whoops)
Joel Esler, Sourcefire, Snort, Immunet, ClamAV, Apple, and Network Security. This is my blog.
Friday, November 4
Yield Thought, this guy swapped his MacBook for an iPad+Linode
(whoops)
Wednesday, February 17
Tuning Snort with Host Attribute Tables - CSO Online - Security and Risk
Here is an article I wrote for CSO magazine, thought the readers of my blog might like to check it out as well.
I was asked to write a fairly technical article for CSO magazine about Snort, the problem is, which part of Snort do you write the article for? An article about Snort can be very technical or not so technical. One of the advantages of having Open-Source software.
In any case, enjoy.
Sunday, January 31
Flash, time for you to die
Answer is, we don't. Not anymore. 90% of Flash usage is for audio or video on the Internet and HTML5 can handle <audio> and <video> tags. It can do Canvas. (Oh and a TON more, I'm just illustrating a point.) Some of the major browsers have adapted most of these technologies. Webkit (Invented by Apple, powers Safari, Webkit, and Google Chrome [amongst others], and Presto (The rendering engine that powers Opera) have supported more than the other two majors (Gecko -- The engine that powers Firefox and all of it's kin), and Trident (The engine that powers Internet Explorer). The last being the worst adopter. Surprisingly.
I read somewhere (I can't find it now), about most browser crashes come from plugins. Flash, Java, etc. Why can't we eliminate these plugins and go with the native protocols? That's what HTML5 is attempting to do for the most part, and I, for one, am glad for it.
Apple has always been about killing off technologies and moving onto what is on the horizon (killing off serial, going for USB, killing of Diskettes, going to CD, Killing off CD's (Macbook Air), moving more wireless (Airport), Killing off displayport, hdmi, dvi, vga, going with Mini Displayport). They have never been afraid to just "move on" to the new thing.
I believe they said to Flash, die, HTML5 is here. Then they turned to web developers and said "fix your stuff". How did they do that? Rolled out the iPhone, which has become the largest mobile browsing platform on the planet now. Slowly and surely, what's happening? Websites are changing away from Flash.
Unless, you know, of course, you are a band or a restaurant. (Seriously? What is with bands and restaurants and your use of Flash?)
I don't even need to get into the security issues of Adobe's Flash. Look, there is one small part of Adobe working on Flash. The entire internet is working on HTML5.
Flash (and Silverlight) is dead. Get over it.
--
100% of the statistics in this post are made up. ;)
Wednesday, December 30
SSH keys, my how I hate you sometimes.
I had:
PubkeyAuthentication yes
I had the permissions right on all the files, on both the client and the server, yes, I checked this, and that.
So, here I am racking my brain, "why isn't this working", darn it.. what am I overlooking? So I IM'ed a friend of mine, Richard Harman, who is the master of a bunch of things, one of the things is Linuxy, Unixy stuff -- at this point I'm at my wits end, and trying to figure it out, I am racking my brain.
Richard connects up to my computer, and he has the same problem (can't connect via SSH key), so it's obviously a server problem.
We start daemons in debug mode, looking at RPM packages (this particular server was running Fedora 10), heck, I was even looking at bugs in SELINUX as the culprit. Nothing.
We noticed one line in particular that was bothering us.. every time someone tried to connect to sshd on the SERVER's SSHD debug line, it was trying to access /root/.ssh/authorized_keys. No matter what the user. Obviously, this isn't right. I tested this out by moving my authorized_keys file to root's /.ssh directory and it worked right away.
After poking around a bit, Richard found the problem:
AuthorizedKeysFile ~/.ssh/authorized_keys
Because, when SSHD starts up, the sshd_config file was expanding "~/" to the home directory, and since sshd starts as root.. the ONLY directory it was going to look in was /root/.ssh/authorized_keys
Richard changed this to:
AuthorizedKeysFile .ssh/authorized_keys
It worked and life is fine now. Two characters. TWO. (That I didn't put there, or at least don't remember putting there.)
Thanks Richard.
Thursday, December 24
Bottom Posting
I bottom (or inline post) mostly because I like the email to be a message. You read a message or a letter from top to bottom, from left to right. It wasn't until email clients started top posting (looking at you Outlook/Lotus Notes) that email was written in the top-posting format, forcing you to read an email backwards.
So I looked it up, basically looking at two different information stores.
Wikipedia -- http://en.wikipedia.org/wiki/Posting_style
RFC1855 -- http://www.ietf.org/rfc/rfc1855.txt
These two places will define how to write email and how email should be written, on mailing lists, use groups, or any other email transaction.
The particular part to pay attention to is in RFC1855 --
"- If you are sending a reply to a message or a posting be sure you
summarize the original at the top of the message, or include just
enough text of the original to give a context. This will make
sure readers understand when they start to read your response.
Since NetNews, especially, is proliferated by distributing the
postings from one host to another, it is possible to see a
response to a message before seeing the original. Giving context
helps everyone. But do not include the entire original!"
Summarize the email at the top, and post below it. In other words, bottom-posting is the correct way to write email, as per RFC.
Friday, December 11
New Blog for your enjoyment
Please leave comments below.
New Blog for your enjoyment
Please leave comments below.
Thursday, November 19
Fedora 12 allows installation of software without root privs
[NoUsersInstallAnythingWithoutPassword] Identity=unix-user:someone;unix-user:someone_else Action=org.freedesktop.packagekit.* ResultAny=auth_admin ResultInactive=auth_admin ResultActive=auth_admin
Please leave comments below.
Fedora 12 allows installation of software without root privs
[NoUsersInstallAnythingWithoutPassword]
Identity=unix-user:someone;unix-user:someone_else
Action=org.freedesktop.packagekit.*
ResultAny=auth_admin
ResultInactive=auth_admin
ResultActive=auth_admin
Please leave comments below.
Tuesday, August 18
Rambling on Productivity and Email (Part Two)
Monday, February 23
Moving my network around
Today I moved my network around, so just a quick article about why, or what was the point.
It’s funny the little noises that irritate you. For me, there are a few, high pitches whines, buzzing sounds that are constant, when my wife clicks her nails together, and computer fans.
In my office, I have a PowerMac (Dual Core, with Dual Fans), a Linux box that I do a lot of Snort Testing on, and a 1U server that is older than my daughter.
The 1U was moved to the basement a long time ago, simply because the fans on the thing were so incredibly loud, you couldn’t sit in the same room as the machine. It was crazy. I can’t imagine a server room full of these things. The fan ran constantly too. Not when the processors got hot, but all the time. So very irritating! I moved this server to the basement by drilling a hole in the floor in my office and running a Cat 6 cable down there. Simple enough.
That was about a year ago.
As I’ve stated before on the blog, and on twitter, and go knows where else -- I’ve moved totally to using laptops as my primary machines now. I keep everything “in the cloud” except for things like Pictures, (in iPhoto), Music, (in iTunes), and random misc software.
I use my iDisk for my Document and File Storage, and am starting to use Google Docs for collaboration on documents. I use Evernote for jotting taking notes and keep everything in one place. I use Google mail for my email (eliminating the need for a local client), and I use Google Calendar for my Calendaring. (As opposed to iCal.)
So my needs for everyday computing are rather lightweight. Last week my company replaced my aging PowerBook G4 with a brand new MacBook Pro. I started to do the “laptop dance”, you know the one, where you transfer years and years of data that you have kept for God knows why over to your new computer. After about an hour of doing this, I decided that this was inefficient and stupid and stopped. Moved everything to things like iDisk and Evernote, and eliminated the need to have everything locally. (Technically I do have everything locally, it’s just synced for me.)
I brought my new MBP into the office here at the house and stared at my PowerMac for awhile.
My Powermac has served me well for years. It’s a Dual 2.0 PowerMac G5, liquid cooled, and has 4 Gigs of RAM in it. This thing is still pretty fast, and I bought it in 2004/5 ish timeframe. But what did I use it for?
It’s sitting here connected to my 20in Apple Cinema Display -- which by the way, Apple stopped making recently -- keyboard and mouse connected to it. But how often do I use this thing? How about, almost never! I’d rather use my laptops, because then I can wander all over the house, go to Starbucks, Panera, whatever.
So I thought for a while. I already have a Cat 6 cable running to the basement, what if I relocated all my computers, switches, and everything to the basement, and only keep my wireless access points (with their associated Ethernet cables plugged in) upstairs?
So I moved everything. Powermac, Linux servers, switches, hubs (for testing), downstairs. I even moved my FiOS connection end point downstairs, (which required re-running the cable, etc.).
All I have in my office now is my MBP, with the 20in Monitor attached to it, and I have my personal older model MBP sitting next to it. (It’s my “grab my computer and go to the bathroom for reading material” computer.)
You can hear a pin drop in my office now, and it is much less distracting.
I recommend, if you can relegate your computing devices out of your office, into another room, closet, floor, attic, or whatever, do it. It’s awesome.
Tuesday, June 17
Firefox 3 today
Firefox 3 today
Saturday, June 7
Thursday, May 15
Debian ftw?
Debian ftw?
Tuesday, February 26
Random IDS musings
Basically the basis of the story is that people want to clean out the events from their DB on a periodic basis, 1 month, 2 months, whatever. Basically I look at it like this then, why are there events in your database that are that old?
If you have events in your IDS DB, you should look at them. That's the reason you have an IDS/IPS. To review the events (and in the case of IPS, prevent the attacks) and make sure the evil hax0rs are not getting you. If you have events in your current DB that are a month old, that tells me either one of two things:
A) You don't care about your alerts
B) You have too many alerts, and you don't have a system.
So let me help you get a system.
Make an archive DB (for the people using BASE, then this is pretty simple), now, you have two db's. One current, and one archive.
1) Events come in from Snort via barnyard into your current DB.
2) You review these events. Any events that you skip over, take note of them. Do you need this alert? Is applicable to your network? Do you KNOW if it's applicable to your network?
3) Any events that you take a look at, did it actually affect your network or was it someone banging on the door (script kiddie)? If it was a skript kiddie, what are you going to do about it? Block them at your firewall? Send their ISP a cease and desist letter? If you are going to do nothing then DELETE THE ALERT. Why keep it? You aren't going to do anything about it, so who cares?
4) Now, say when you are reviewing alerts, you come across something you need to investigate. Good. Take note of it and come back later. Leave it in your current db, get through the rest of your alerts.
5) Through your alerts? Good. Come back to the ones you still have in your current db. Do you need to take further action on these guys? Yes? Investigation time? Okay, well then you need to save the alert, so move it to your archive db. When you are done with your investigation in your archive db, then delete the alert.
Basically my point here is, don't keep alerts for no reason. Now, let's go back to #2.
For instance, if you are running web-php rules, but aren't running any webservers that run PHP on them, do you need the rules? Don't subscribe to the philosophy of "if the IDS isn't alerting, then how do I know it's working?". If you want to make sure your IDS is working, then write some kind of script to email you the statistics or something from the Snort process to make sure it's analyzing traffic. If you ALWAYS skip over a particular event, then WHY are you making your IDS run the rule? Shut it off!
Let's take a look at a network. Small one. One bsd box, 2 osx boxes, 2 windows boxes, and 1 linux box. Now, in your network these may be thousands of machines on tons of subnets. The network size doesn't matter, you can take the same philosophy.
Your frag3 and your stream5 preprocessors need to be tuned to the OSes. Done? k.
Now, take your network and look at it. What services are you running, what versions of those services? What OSes? What vulnerabilities are present on your network? Now, figure those things out and turn off the rules in Snort you don't need.
Now, this is where you say to me that this is a pain in the butt, and Snort has tens of thousands of rules, with more coming out each month, blah blah, etc. etc.
Well, that's where Sourcefire comes in. We have things like RNA, we have things like Adaptive IPS/IDS that will do all that FOR YOU, leaving you with the relevant alerts, things you HAVE to look at! But rather than this turning into a sales pitch, I am simply trying to get you to think about how to work with your data. Do you need to keep all that data? or can you fine tune it?
Tuesday, February 19
Snort Drinking Game by Erek Adams
So, in honor of him:
Welcome to the Snort-Users Drinking Game!
version 1.00
By Erek Adams
The most current version of this can be found at
http://www.theadamsfamily.net/~erek/snort/drinking_game.txt . Please send
suggestions/updates to erek@theadamsfamily.net.
-----
WARNING: Excessive use of alcohol can be dangerous to your health. Please
play this game sensibly. If you start to feel ill or sick, stop playing!
Alcohol poisioning is not fun, and you can kill yourself!
Please be sensible! This is for _fun_ only!!
And if you don't like alcohol, please use your beverage of choice!
-----
Instructions: Don't read your snort-users email for a month. Or failing
that, you could use the archives. Start with the first email message for the
month. Read it. If an item from the following lists is in the email, take
the penalty drink. If not, go onto the next message. Repeat until you can't
read anymore, or have a empty bottle. ;-)
Please note: These are culmative! Be careful, as you could have SIX+ drinks
from one email!
Lets Begin!!
Take one drink if.....
The question is answered in the documentation.
The question is answered in the FAQ.
The writer doesn't know how use Google.
The reply is "RTFM"
The reply is "It's in the FAQ"
Writer is using Red Hat's broken pcap.
"Why aren't portscans showing up in ACID?"
"Why is snort not reporting dropped packets the right way on Linux?"
Marty complains about Red Hat's brokeness.
Writer is using "Linux 8" or "Linux 9".
Writer has a .sig over 4 lines.
Writer posts a packet capture with the IP's XXX'ed out, but still leaves
them in the hex decode below.
The drinking game starts it's own thread.
Take two drinks if.....
Writer obviously has _never_ read any docs.
Writer obviously doesn't know how to compile.
"How can I auto update the rules?"
Writer asks "Where is signature XX?" and that's already in the rules.
Writer says "It's broken." and includes _nothing useful_ about the
setup.
Someone reply's to a digest mode email, and includes the whole digest.
A virus scanner kicks email back to the list.
Writers .sig contains a "The contents of this email.." style discalimer.
Post contains a "Stupid Management Tricks" story.
Message says "Please unsubscribe me from this list."
Message is _entirely_ blank.
Confirmation/signup email gets sent to the entire list.
Someone posts a non RFC-1918 IP and remarks that "it's not being used
by anyone."
Someone replys to a message and has more 'header cruft' in thier message
than content--Thank you Lotus Notes....
You post a message to the list and get a "I am out of the office
message...."
If you realize that _YOU_ were the reason another penalty drink was
added to the Drinking Game.
You hit "Reply to All" instead of "Reply" and you start you response
with the words "Hey Sexy!"
Writer says "I've searched Google and can't find the answer." and the
answer is in the first 10 results.
Take three drinks if.....
The message has "Whitehats.com is down" or "Where's another
Whitehats?"
Someone wants the file vision18.conf.gz.
"Can snort email me alerts?"
"Can snort page me with alerts?"
Writer is using an old version (non-current release) of snort.
Writer becomes offended at "Kickass P0rn."
Writer becomes offended at comments in source code.
Writer isn't even sure what snort does.
Writer starts an OS Holy War.
Someone posts in HTML-ized email.
Posters .sig or disclaimer is longer than the reply.
Writer has no clue that http://www.snort.org/ exists.
Someone has to correct your drink totals for a penalty.
Someone posts thier IP asking for a portscan.
Writer obviously thinks that Red Hat == Linux.
Writer places the question and or email in the subject and leaves the
body of the email blank.
You move your mailserver from coast to coast w/o a temp box setup and
your bounces get you unsubscribed from the snort-users list. *sigh*
You post more than one message to the list and get back a "I am out of
the office..." message for _each_ post you made.
You have a broken vacation message that responds to the each post made
to a mailing list.
You realize that you just posted a "Hey Sexy!" response to a worldwide
mailing list.... From your _work_ email address.
And the Big Penalty Drink:
If you realize you are drinking to your own post, DOUBLE the penalty.
IOW, if you posted a HMTL-ized email, take six (yes, 6) drinks.
Snort Drinking Game by Erek Adams
So, in honor of him I've found it and placed it here, plus we've updated it:
http://blog.joelesler.net/the-snort-drinking-game