IP spoofing and automatic blocking



Author: TonyLawrence
Date: Sun Mar 20 22:04:07 2005
Subject: IP spoofing and automatic blocking

A recent newsgroup thread started out with someone asking what he could do about brute force ssh login attempts. The thread attracted attracted a lot of good suggestions, but one statement bothered me. Someone had suggested automatically blocking the ip's of people with too many failed logins. I think that makes perfect sense, but someone else said

"Blocking IPs because of failed logins is a nice way introducing
DOS attacks against yourself. What if someone spoofs the IP? "

Well? What if they do? The fear here is that innocent ip's would be locked out, perhaps even many thousands of them, or given enough time even the entire internet..

But there's something wrong here right off the bat. Let's remember something often forgotten about a spoofed ip: the sender never sees anything of your responses.

So.. for this to make sense our hacker has to first come in with a real ip address and fail to login the magic number of times. He then notices that he's been blocked, and revengefully decides to spoof ip's.

What happens next? Well, he may get nowhere because many routers aren't going to accept ip's coming from interfaces they aren't supposed to be on. So, for example, if he arrived at my router trying to pretend to have an address internal to my lan, the router just discards him. But if he can do this with public ip's, yes, he can send spoofed packets. But he can't easily fail a login with a spoofed IP, so he's probably never going to get blocked out. The reason he can't easily do this is because he's never going to see responses - his IP is spoofed, remember? So he has to blindly send logins and passwords, and since many ssh daemons have time restraints in place for multiple logins (see MaxStartups at Security Paranoia - restricting ssh access ), he has to know or guess what those are too!

As most of this type of attack is automated or by completely autonomous worms, I think we can pretty much discount the revenge factor. It's extremely unlikely.

More likely is someone deciding to DOS you deliberately. Perhaps they want to use your IP as part of screwing with someone else (see Spoofing ), or maybe they have some personal reason to ruin your day. If they are aware that you automatically add failed logins, then yes, they could theoretically cause you to block some innocent IP's. That's why you should reset any automatically blocked ip's after some period of time.

But if someone is out to get you with a DOS attack, they have plenty of other ways to proceed. This would just be one possibility, and if that's their intent, your server is probably tied up six ways from Sunday anyway and nobody is going to be able to get to you.

Blocking ip's from failed logins makes sense - that's why sshd can do it. You do have to understand that it is imperfect and make it temporary (as sshd will with MaxStartups). But I do not agree that this invites DOS attacks. I could be wrong, of course, so if you feel otherwise, I'd be interested to hear your reasons.





Enter your email address for automatic notification of new posts here
(be sure to whitelist 'feedburner.com' if you use spam filtering)

Or use any RSS reader

Delivered by FeedBurner


Views for this page
Today This Week This Month This Year  Overall
4491311,869 9,069

Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.

Publishing your articles here

pavatar.jpg
More:
       - Security
       - Networking
       - SSH




Unix/Linux Consultants

Your ad here - $48.00 yearly!

http://www.cleverminds.net Need expert advice? Want a second opinion? CleverMinds is a one-stop-shop for a wide range of technology solutions. We support Unix, Linux, SCO as well as CMS, ecom, blogs, podcasts, search engines consulting and more. Contact us at web2.0@cleverminds.net 0r (617) 894-1282


http://bcstechnology.net Full service Linux & UNIX systems integrator; Windows to UNIX/Linux Client-Server Specialist; Secure E-Mail & Website Hosting; Thoroughbred Software Developer; Custom Industrial Automation; Hardware & Electronics Experts; In Business Since 1985.


http://echo3.net/ Unix/Linux Custom Applications, Web Hosting, C/C++ Programming Courses



Twitter
  • Nov 21 07:55
    @loudmouthman: correct, but how do you prove ANYTHING like that is accurate? You can't. A text file is no better or worse than anything.
  • Nov 21 07:40
    @loudmouthman: well, a digital signature could prove it hadn't been altered. Text is no more insecure than anything else in that sense.









Change Congress


Related Posts