Slashdot Mirror


How Do You Handle Portscanning Attacks?

Kainaw asks: "I tried to submit this earlier, but I couldn't because I had no bandwidth available. The reason is simple: I use Comcast for cable Internet. My modem/router is portscanned constantly. Nothing makes it past the router, so everyone tells me that it isn't an issue. Well, it is when I can't access any webpages, get email, or even submit a simple article to Ask Slashdot because my entire bandwidth is eaten up by script kiddies with a new portscanner toy. This is a two-part question: First, can anything be done with a simple at-home modem/Linksys router/two computer setup to stop a portscanning attack? Second, is it possible for the Linksys router to become a 'bot' and actually be the originator of much of the traffic?"

43 of 140 comments (clear)

  1. Contact Comcast by rmjohnso · · Score: 2, Informative

    I would suggest you contact Comcast. They might be able to help you out, especially if you think it's a problem on your end. I've never heard of a Linksys router being made into a bot, though.

    On a side note, I've also go Comcast, and I've never run into anything like this. They do tend to have a lot of problems with their DNS servers, though.

    --
    "Extremism in the pursuit of liberty is no vice. Moderation in the pursuit of justice is no virtue." --Barry Goldwater
    1. Re:Contact Comcast by Kainaw · · Score: 2, Informative

      They do tend to have a lot of problems with their DNS servers, though.

      I called Comcast and found that the DNS sent with DHCP for the cable modems is actually the testing DNS server. I had set the DNS server IP address manually and I've had no DNS problems since. Unfortunatly, I'm at work, so I have no clue what the IP address is.

      --
      The previous comment is purposely vague and generalized, but all of the facts are completely true.
    2. Re:Contact Comcast by robertjw · · Score: 2, Interesting

      Umm... Comcast doesn't, at least not on my subnet.

      I actually had some discussions with the installers and local sales people for Comcast. Their attitude was a don't ask/don't tell policy for running services over their cable modem connections. As long as you aren't soaking up an extreme amount of bandwidth they don't really care if you are running a web server, ftp server, whatever.

      Besides, I could run ssh over any port I want.

    3. Re:Contact Comcast by cpeterso · · Score: 2, Funny


      I'm at work, but even I know the IP address of my Comcast cable modem is 127.0.0.1. Bring the the script kiddieZ!!1!

  2. Not The Portscans by asc4 · · Score: 4, Insightful

    Sounds to me like you have bigger problems than the portscanning. Even hundreds of simultaneous port scans are unlikely to chew through all your bandwidth on a cable line. Sounds to me like your computer(s) may be zombied and *that's* what's eating up your bandwidth.

    1. Re:Not The Portscans by Gary+W.+Longsine · · Score: 2, Interesting

      I did once see a similar device nearly crushed when configured in a particularly unusual way. It was set to redirect traffic directed at any port over to a tarpit sitting behind it. After a few minutes of exposure on the wild internet several portscans and worms happened by. The device response slowed a bit, even though very little bandwidth was being used. These devices don't have much CPU and memory, and they are really not designed to front a tarpit on all ports like that. Poor little thing!

      Of course, this is unlikely to be the source of the problem experienced by Kainaw. An infested PC is much more likely.

      --
      If you mod me down, I shall become more powerful than you could possibly imagine.
  3. Here's a suggestion... by TripMaster+Monkey · · Score: 4, Funny


    Got the IP addys of your tormentors?

    Post them here!

    I'm sure some of us could persuade these kids that port scanning is bad for your health...

    ^_^

    --
    ____

    ~ |rip/\/\aster /\/\onkey

    1. Re:Here's a suggestion... by HTL2001 · · Score: 2, Funny

      slashdot:
      Faster than a gag order, more powerfull than a botnet

      I probably horrably mangled that quote, but whatever

      --
      By reading this, you have given me brief control of your mind.
    2. Re:Here's a suggestion... by lscoughlin · · Score: 2, Funny

      All Right!!!

      I'm going to so end that sucker right now, i've got it all loaded up and i'm about to hit the ent

      --
      Old truckers never die, they just get a new peterbilt
  4. Sounds more like a DoS to me by bersl2 · · Score: 2, Insightful

    Mere portscanning doesn't intentionally clog all bandwidth.

    IANA network security expert, but I'd say put a more capable firewall behind the router (read: a Linux or BSD box) and make it the DMZ.

    At least you don't have some punk trying to find a weak username/password combo through SSH. (Silly script kiddie, you can't login to root through SSH on my box.)

    1. Re:Sounds more like a DoS to me by mutterc · · Score: 2, Interesting
      Be careful with using a Linux box as a firewall - if you don't have experience hardening such systems, you could end up with a much better chance of it becoming a bot that your Linksys box (which is neither i386 nor runs a well-known Linux distro).

      You definitely wouldn't want to do a default install of any distro I know of (except Debian, that doesn't install much of anything except what you ask for).

    2. Re:Sounds more like a DoS to me by dougmc · · Score: 5, Informative
      Mere portscanning doesn't intentionally clog all bandwidth.
      Mod that statement up!

      In my expereience, when somebody's saying that `X is using up all my bandwidth', where `X' is things like virii, `hackers', ARP requests or something else, what that really means is that somebody doesn't really understand what's going on.

      Most cable modems have a lot of downstream bandwith and not so much upstream bandwidth -- but even the upstream bandwidth is far far more than is used by a standard port scan where somebody hits all your ports to see if they're open.

      And even that's unusual -- usually people seem to scan entire networks to see if one port is open, so a single scanner would only send a few packets at your box. It would take several thousand people hitting your box _at once_ like this to make things as bad as you make it sound.

      Your box may actually be under attack (a DoS attack.) I get a lot of trouble like this when people want the nick I use on IRC -- they packet my box incessantly. I've got 5 Mb/s downstream on my cable modem, so as long as my packet filtering isn't responding to each packet, it takes a pretty signifigant attack to kick me off of IRC. But if my system does respond to every packet with packets of approximately the same size, an attack of about 0.3 Mb/s is enough to bring everything down to a crawl. It's all a matter of configuring my filters properly ...

      Ultimately, what you should do is log all the packets being sent at your IP address with a tool like tcpdump, then send those logs to the abuse department of the ISP where they're coming from. If it's a DDoS attack, the odds are that the IPs are spoofed, but if it's really a portscan it's probably not (becuase they need to see the returning packets to see which ports are open.)

      You could also contact Comcat and see if they could filter the traffic out, though I'd reserve that option for an attack that lasts days and doesn't give up, because if they're anything like RR, getting to somebody who can actually do that will be very difficult.

      Another way of dealing with an attack is to turn off your cable modem long enough for your DHCP lease to expire, and then come back and get a new IP address, one that's hopefully not being attacked.

    3. Re:Sounds more like a DoS to me by biglig2 · · Score: 2, Interesting

      Well, try a firewall specific distro then, such as m0n0wall. It's excellent, basically FreeBSD with everything cut out but the firewall. Link is http://m0n0.ch/wall, and I'm sure there are plenty of other hardened distros.

      --
      ~~~~~ BigLig2? You mean there's another one of me?
    4. Re:Sounds more like a DoS to me by TheMysteriousFuture · · Score: 2, Informative

      Better yet, use PFSense which is a fork of m0n0wall, but with a goal of higher level functionality.

      After you use the latest installer, go to http://www.pfsense.com/updates/ and grab the latest version, then update via the 'firmware' tab on the web interface.

      --
      .sig
    5. Re:Sounds more like a DoS to me by dougmc · · Score: 2, Interesting
      It is probably faster to get a new IP on cable by changing your MAC address than waiting for a DHCP lease to expire
      Probably correct, though it's not always easy to do. Switching cards is easy enough, but it requires shutting down and opening up your computer. Some cards and/or OSs let you change the MAC address of a card on the fly, though it seems to be pretty rare.

      Some cable modems will let you `reset' them by various means (holding down the rest button at power up, holding it down for a long time, leaving the modem off for a long time) and in fact may require that before they'll work with another MAC address (because you're limited to one IP address, and it'll think you still have the old one.)

      And then you need to make sure your DHCP client doesn't request the same IP address again -- many do this by default.

      All in all, getting a new IP address from your cable modem network is often a PITA -- but it's nothing compared to the PITA it is to actually get somebody on the phone at their support organziation who understands what a DoS attack is and can actually help you with it.

    6. Re:Sounds more like a DoS to me by KevinKnSC · · Score: 2, Informative

      OP has a linksys router. Showing a new MAC to Comcast involves nothing more than going to the linksys box web admin page and typing in something new.

    7. Re:Sounds more like a DoS to me by Medievalist · · Score: 3, Informative
      Mere portscanning doesn't intentionally clog all bandwidth.
      True. Portscanning per se is harmless (some things that look like portscanning on cursory inspection are not).
      IANA network security expert, but I'd say put a more capable firewall behind the router (read: a Linux or BSD box) and make it the DMZ.
      No, bad advice; if a person would consider a port scan harmful (s)he is not qualified to run a secured general-purpose system (not even OpenBSD) as a firewall. Better to use a cable modem with an integrated firewall (making sure to keep it patched and not use default passwords) or a "dumb" cable modem with a dedicated firewall between it and the hub or switch (same caveats apply).
      At least you don't have some punk trying to find a weak username/password combo through SSH. (Silly script kiddie, you can't login to root through SSH on my box.)
      If he has port 22 live, and he's on broadband, then he certainly is experiencing the attack you are referring to. Everybody is.

    8. Re:Sounds more like a DoS to me by yuri+benjamin · · Score: 2, Interesting

      nothing compared to the PITA it is to actually get somebody on the phone at their support organziation who understands what a DoS attack is

      I work for a cable provider in New Zealand. We have all been shown logs of a typical DoS attack and logs of typical filesharing and how to tell the difference. (We don't ban filesharing, but we do charge for extra traffic after a set amount (1GB, 5GB or 10GB depending on the plan)).

      I'm not sure what our techies do about DoS attacks.

      We don't ban running servers or anything. It's the customer's bandwidth - they've paid for it and they can use it for anything that's legal. I don't understand ISPs banning customers from sshing into their box or putting up a personal web page.

      Heck, we even give them a static IP to make it easier (and can change it if required but it takes a few days to provision).

      --
      You make the mistake of thinking you can educate the fundamental stupidity out of people. You can't.
    9. Re:Sounds more like a DoS to me by moyix · · Score: 2, Funny

      Hmm, I've never needed anything so fancy.

      ifconfig eth0 hw ether b0:0b:b0:0b:b0:0b
      always did the job just fine.
    10. Re:Sounds more like a DoS to me by thegrassyknowl · · Score: 2, Interesting

      found the `Insane' setting -- it's not really about flooding a host, it's about assuming that the latency is almost zero, so a scan will happen quickly.

      That's true to an extent, except that the Insane setting generally does not wait for a reply to packets before sending the next. It lets you flood the host, and if their connection is slower than yours and you run it enough times they end up with quite a backlog of packets they need to download from their ISP.

      My point was that it is possible to DoS someone using just a portscan if your connection is significantly faster than theirs and you feel like running a few thousand portscans on their IP address. Whether it is smart, easy or generally useful remains to be seen, but it is possible.

      Then you're not really port scanning him anymore -- your DoS'ing him

      Well, technically I am still portscanning. The side effect is that I'm DoS'ing him. Alas, he won't know that. All he'll see is a bunch of port scans in his firewall logs.

      but there's little point in doing it more than once per port, unless you think his system will respond randomly or something.

      There is point if all I want to do is cause him grief. It doesn't matter how the remote system responds - whether there's closed or open ports, or even if I get a reply at all. If I was seriously interested in finding open ports I'd use scans that are less likely to be noticed, not just bombard him with zillions of packets.

      --
      I drink to make other people interesting!
  5. Comment removed by account_deleted · · Score: 2, Insightful

    Comment removed based on user account deletion

  6. Answers. by irc.goatse.cx+troll · · Score: 3, Funny

    Basicly, no. End users are the scum of the internet, no ISP really cares what happens to you as long as you pay the bill. If you don't, they don't care because others will.
    Your best bet would be to detect the port scan (eg, >5 sequential connections from the same host, or >15 nonsequential ones) and nullroute it so they get no response at all.
    Of course they can get around that, but if you're avoiding the common drones it doesnt matter.

    Second off, its not an attack, its just trying to get more information on you. Calling it an attack makes it sound bad, which furthers scare away the masses(who then get to vote on this stuff). If your isp didnt limit your upstream so much you wouldn't even notice it. nmap running in standard mode doesnt use nearly as much packets or bandwidth as my isp flooding me with arp who-has packets to see whos on.

    sidenote, be careful with whatever you do. Last time I found out a friend of mine ran a stupid windows firewall that would automaticly firewall anything that portscanned him, I spoofed a scan from his dns, then after I had fun watching him wonder why he couldnt resolve anything, I spoofed one from his gateway.
    Automated dropping is dangerous.

    --
    Pain lasts, kid. Its how you know you're alive. Sometimes I think this growing up thing is just pain management-TheMaxx
  7. Disable ICMP echo reply by crow · · Score: 4, Insightful

    One thing that I did was to disable ICMP echo reply. (I allowed it from IP ranges that I'm likely to be at, but in general, it's turned off.) That means if someone tries to ping me, they don't get a response, so many script kiddies will assume that there is no computer at my IP address and move on.

    I've also set it up to drop incoming TCP requests for dead ports (actually, it blocks the outgoing connection refused packets). So if they scan ports that aren't open, they never get a single packet back.

    Essentially, unless they're connecting to something I intentionally have open, they can't tell that my system exists.

    1. Re:Disable ICMP echo reply by Anonymous Coward · · Score: 2, Informative

      Congratulations! You're violating RFC 1122 - Requirements for Internet Hosts and as such should not expect anything to necessarily work correctly!

      3.2.2.6 Echo Request/Reply: RFC-792
      Every host MUST implement an ICMP Echo server function that receives Echo Requests and sends corresponding Echo Replies.

      Have a wonderful day.

    2. Re:Disable ICMP echo reply by Mercury2k · · Score: 2, Informative

      Actually, if you have done some reading and used tools like nmap, you might be a little shocked to know that this tool can still tell if your online unless you really know what your doing. Turns out that certain "illegal" TCP flags can trigger the OS to reveal information about the ports they are scanning. So even if you think your blocking outgoing info, chance are your only blocking "legit" outgoing stuff, and your still in fact giving out tons of information to people that know TCP well enough to scan you.

    3. Re:Disable ICMP echo reply by Neil+Blender · · Score: 2, Insightful

      Congratulations! You're violating RFC 1122 - Requirements for Internet Hosts and as such should not expect anything to necessarily work correctly!

      3.2.2.6 Echo Request/Reply: RFC-792

      Every host MUST implement an ICMP Echo server function that receives Echo Requests and sends corresponding Echo Replies


      You know what? I don't give a good goddamn about RFC 1122. Our servers get pounded on every port that is open, every day, since forever. Cutting off ping reduces it dramatically. So, by violating that particulary RFC, I do have a more wonderful day.

  8. Linksys ADMIN password by SpaceLifeForm · · Score: 3, Interesting
    You did change it, right?

    And you don't allow access to it from un-trusted machines (i.e., the Internet), right?

    Otherwise, in theory, it could get pwned. It is running Linux and tools such as busybox.

    --
    You are being MICROattacked, from various angles, in a SOFT manner.
  9. Switch to a Linux/UNIX firewall - DROP traffic by Tor · · Score: 2, Informative

    Seen as none of the comments so far has answered your question, let me just offer my 2:

    Rather than using a Broadband NAT router, set up a firewall running Linux, *BSD, or similar. This way, you can send "irrelevant" traffic (e.g. ICMP ping requests, or TCP/UDP packets to ports on which you do not provide services) to the bit bucket ("DROP" in the language of Linux IPTables).

    This slows down port scanning of your machine (e.g. using "nmap") to near a grinding halt, and thereby reduces the bandwith consumed by such port scans to near zero.

    It is not bulletproof - someone could still direct DoS attacks against you - but it would nearly eliminate the traffic caused by causal port scanning of your machine.

    1. Re:Switch to a Linux/UNIX firewall - DROP traffic by maunleon · · Score: 2, Insightful

      What kind of freaky router are you used to, that doesn't drop packets with no destination? You didn't state any reason in your post for switching to an OS-based firewall, that the cheapest router doesn't already provide.

      All NAT routers I've seen need to be specifically set up to forward traffic, unless you set up your computer in a DMZ. If you don't set them up that way, packets will simply be dropped.

      There are other reasons to use a linux firewall, but not the ones you stated. Add to that that you'd require more space, more power, higher cost, and put out more heat.

  10. These are not script-kiddies by mabu · · Score: 4, Insightful

    It's a fallacy that ignorant kids are behind the port scanning.

    It's spammers. It's professional organized crime. I believe the majority of these port scanning and worm/virus propagation is going on by organized groups looking to take over peoples' computers for the purpose of finding new IP space from which they can send unsolicited e-mail. If there are any script kiddies, they are a fraction of a fraction of the percentage of the traffic.

    My systems are constantly under probe attacks and port scans. The majority of these attacks originate from rogue IP space in China, Korea, and other areas that appear to be more liberal in doing business with the spammer organized crime contingent.

    At this point, I don't see technology making much difference. This is a political and enforcement issue.

    My advice is to contact your local District Attorney and demand that they start prosecuting computer tampering cases. We know these people are ultimately in the U.S. and can be caught even if they route from around the globe. We know they're breaking laws and can be prosecuted. We have laws in effect right now - we don't need more laws. We need enforcement and government authorities who WILL ENFORCE THE LAW AND STOP THESE PEOPLE. You can't count on ISPs to help since they profit from bandwidth consumption; you can't count on corporations to help, they are scared of any attempt to curtail cyber marketing of any sort. You must start on a local level and demand that the judicial and enforcement branches go after these criminals.

    1. Re:These are not script-kiddies by jonadab · · Score: 2, Insightful

      > We know these people are ultimately in the U.S.

      The honeynet people seem to think most of them are in eastern Europe. I am also fairly certain that there are a lot of them in China, though this is much harder to confirm. My best evidence is the enormous volume of Chinese-language spam, which I do not suppose would be authored by Americans or Europeans, mostly.

      But anyway, we certainly do not *know* that they are all ultimately in the U.S. There are good solid reasons to believe otherwise. *Some* of them are in the U.S., of course; the U.S. is a big country with a lot of people, so of course it has computer criminals, but there is no reason to believe it has more than its fair share of them.

      --
      Cut that out, or I will ship you to Norilsk in a box.
    2. Re:These are not script-kiddies by jonadab · · Score: 2, Interesting

      > You want evidence? Check your e-mail you stupid moron. Look at the headers
      > of the spam you receive. Notice how a significant chunk of it comes from
      > comcast, verizon, cox cable, TDE, and other broadband IP space.

      I haven't checked this in the last few months, so maybe it's changed, but the last time I did check, virtually 100% of the spam I get came from the APNIC block, and roughly 0% of it came from IP addresses with a corresponding PTR record in DNS for reverse lookup.

      I think it depends somewhat on *which* spammers have your email address in their database. As near as I can tell, there are only a few major spamming organizations in the world (perhaps as many as twenty or so) and very few people are on more than one or two of their lists, because they don't share. (They share *within* each organization, but not between, as near as I can tell. As far as why, I could only speculate, but my first guess would be language barriers, and my second guess would be that they can't track eachother down any more easily than we can track them down, so they don't know eachother at all except within each organization. But these are guesses.)

      There's at least one major spamming organization in Eastern Europe; they use IRC to communicate, and they use worms to harvest zombies, and this latter activity has exposed them to the honeynets. They have a hierarchical organization like in cheesy mafia movies, with small circles of trust, where the one or two "innermost" members of each small group/circle also are part of the next most central circle. They mostly send English-language spam but also other European languages, notably Russian and German. If you get spam in Cyrillic characters, it comes from these guys. They probably get most of their addresses from Outlook Express address books, but possibly also from other sources. My home address has only gotten on their list in the last year or so.

      There's at least one *enormous* spamming organization operating out of Asia (with subnets in China, Korea, and several other Asian countries). They send huge amounts of Chinese-language spam, also lots in English, quite a bit in Korean (with Hangul characters), and some in Spanish and a handful of other languages. There is no evidence that they use IRC. They migrate their SMTP servers (or relays, or something) across entire Class-B subnets, but they don't appear to use zombies, because everything they send comes out of the APNIC block. If you report them to abuse@, you end up in their "special" database, which causes you to receive a lot more spam, some of it with totally blank bodies, just for spite. My home address has been on these guys' list since circa 1999, probably because they harvest addresses from usenet, but they also appear to harvest from mailto: links on the web, among other sources.

      We know from previous high-profile news stories on slashdot that there are spammers operating out of the U.S., some of which are fairly big-time, but they use relays elsewhere, including in Asia. I suspect that these guys are mixed up with some of the shadier adware. They're also much more poorly organized than the Asian group or the eastern European group. Some of them actually *buy* their lists of addresses, from other spammers (one another, mostly), but they also harvest addresses from the web. All or nearly all of the spam they send is English-language. These guys are responsible for most of the spam that advertises pharmaceuticals, but they also advertise other things, including websites, software, and financial services. My work address has been on their list for a couple of years now.

      Then there's the African spam. This is where the 419s come from, but they send other stuff too, mostly in English, but also in French. They are not organized at all and appear to operate in small autonomous groups or as individuals, but they do have contact with one another (probably in a very loose web, perhaps largely by virtue of living mostly in the same few large cities, nota

      --
      Cut that out, or I will ship you to Norilsk in a box.
  11. Tarpit... by wolf31o2 · · Score: 2, Informative

    Seriously, dump that Linksys or other SOHO box and spring for a small *nix-based machine. Personally, I use a slimmed-down Linux box running iptables. I also use the TARPIT target. The TARPIT target is designed to keep the connection open until it times out. This slows port scans and worms to a crawl. While it takes slightly more resources on the firewall machine itself, it doesn't eat up any more bandwidth than the port scan itself would, except that now the bandwidth is spread over a longer period of time. It also helps to block other packet types that can cause issues, such as ICMP echo. It is definitely not a good idea to block all ICMP traffic, though. Also, try setting up QoS or some other form of traffic shaping to give priority to your packets, specifically ACK packets, as this will improve responsiveness and will keep you from being locked out of your connection, even when under a high bandwidth load.

    1. Re:Tarpit... by farble1670 · · Score: 5, Insightful
      so, the fellow posting the question is probably not the unix guru type, or he wouldn't have posted the question. to suggest that someone of low level or even moderate technical level start maintaining a unix box with firewall software is overkill to say the least. consider the power you're sucking for two boxes vs. one. consider the complexity of configuring rules. consider the space required for another box in your house (a lot of us live in apts or condos). consider the cost of aquiring the physical box (okay, pretty cheap, but probably not free).

      as long as you do not need to do anything fancy, the simplified firewalls on consumer-level routers work fine. i have ICMP echo turned off, and a few well-know ports open for apps. no problems.

      if this doesn't fix it for him, clearly this guy has some larger problem than port scanning. let's no mislead him.

  12. drops still give information by JimmytheGeek · · Score: 2, Interesting

    If you have a fw inside a router, the router will send a "destination host unreachable" ICMP message in response to traffic to non-existant hosts.

    A drop will generally indicate:
    1) firewalling
    2) an inverse map - "I didn't get the ICMP 'dest. host unreachable', ergo something is there"

    blocking that outbound ICMP message is possibly a mistake if you have public net resources.

    As others pointed out, a drop vs. the icmp error slows the scan down nicely, though.

    1. Re:drops still give information by JimmytheGeek · · Score: 2, Informative

      Your router may block the unreachables - that's a common lockdown step. But it is also correct behavior for the router on the destination net to send an ARP, determine that nobody is listening at that IP address, and reply to sender with the icmp dest unreachable (ICMP Type 3, Code 1). There's also a net unreachable that I haven't run into, Type 3, code 0.

      http://www.faqs.org/rfcs/rfc792.html
      "Gateways in these networks may send destination unreachable messages to the source host when the
      destination host is unreachable."

      If an ACL blocks the traffic with a reject (vs. drop) then typically it's an ICMP destination host administratively prohibited (Type 3, Code 10)

  13. Re:One question... by Fox_1 · · Score: 4, Funny

    One question... (Score:0) by Anonymous Coward on Wednesday June 15, @01:24PM (#12826733) If your computer is connected to the internet through a Linksys/whatever router, how do you know you're being portscanned? it's like a horror movie : The ISP said that there were no outside connections. The Zombie is in the house with you! Get out, do you hear me? Get out now.

    --
    The rock, the vulture, and the chain
  14. Unlikely by thalakan · · Score: 3, Informative
    It is very unlikely that scans are eating up all of your incoming bandwidth. I just checked, since I was curious:
    # tethereal -w scan.cap host <myserver> &
    # nmap -A -T5 -o scan.cap <myserver>
    # killall tethereal
    # tethereal -z io,stat,5 -r scan.cap > scan.sum
    # cat scan.sum

    IO Statistics
    Interval: 5.000 secs
    Column #0:
    | Column #0
    Time |frames| bytes
    000.000-005.000 1925 107376 <-- peak bandwidth
    005.000-010.000 315 17952
    010.000-015.000 492 28032
    015.000-020.000 669 38118
    020.000-025.000 655 37290
    025.000-030.000 186 12153
    030.000-035.000 72 9665
    035.000-040.000 61 4648

    ...
    # bc
    107376 * 8 <- convert to bits per second
    last/5 <- account for 5 second sampling
    171801
    4000000/last <- how many fit into 4 Mbps?
    23

    So the peak scan bandwidth of a really noisy nmap scan is about 100 kilobits per second, and you would have to have 23 simultaneous scans being performed in the absolute worse case scenario to max out your link. If your router's external interface was actually replying to these scans, you would notice problems at somewhere less than this, say, 20 simultaneous scans. The actual number of scans you could endure before noticing it is much, much higher than this, because I used -T5 to make nmap really noisy (not typical for k1ddi3s scanning), and I took the peak bandwidth instead of the average bandwidth for my calculations.

    But I'm a Comcast customer and I don't see anywhere near that level of scanning. I see a few port scans a day, plus the usual worm remnants. Sometimes someone will get a bug up their ass and scan me repeatedly, but that's still just a few scans in a row. This is much, much lower than the 4 Mbit capacity of the throttled rx queue on my cable modem.

    The other thing that makes scans an unlikely root cause of your connectivity problem is that Comcast's security department would certainly go after anyone who was scanning one of their customers that hard, and possibly install filters to keep from having to pay their transit suppliers for all that bandwidth.

    The most likely explanation is that the problem is a simple misconfiguration, such as a misconfigured DNS setting or a P2P app running on your machine. The P2P apps in particular will cause intermittent problems loading web pages, which sounds like what you're experiencing.

    --
    -- thalakan
  15. Re:Err.... by mabu · · Score: 3, Informative
    If I recall my reading of the so-called CanSpam act, only ISPs can bring suits against spammers.

    You're wrong. And this isn't about spam. It's about computer tampering, which has been a crime since before the Internet. People who break into other peoples' computers and compromise them are breaking laws. (Port scanning may or may not be criminal, but it's the precursor to criminal activity) I'm just pointing out that the most significant group doing this are obviously the spammers. Anyone who is paying attention can see that, and they are clearly breaking the law. If you break in and take over someone else's computer, that's a felony.

    Unfortunately, we probably won't see law enforcement do anything about it until a spammer accidently breaks into the computer that contains the formula for McDonald's special sauce.

    Every state has laws like this:
    Breaking into someone's computer may seem like fun, but the consequences are not: Under the Arizona Computer Crime Act of 2000, computer tampering is a felony. Offenders can face up to 12½ years in prison and fines of up to $150,000.


    Here's a list of computer crime laws by state

    Here's info on Federal computer crime laws

    Also see:

  16. Portscanning is not an attack. by Medievalist · · Score: 2, Insightful
    Allow me to make a couple of points before I answer your specific questions...

    Don't confuse a portscan with a DOS attack. There is a difference, both in method and intent. Portscans are diagnostics or exploratory probes and are necessary for many benign purposes.

    I have been a comcast customer for many years at several locations. Their service is unreliable; the internet is sometimes unreachable and like all the big-name ISPs they let worms that could easily be stopped run rampant in their network. Their DNS infrastructure is also well below par. Since they have a regional monopoly, it is not necessary for them to provide a clean feed, there simply is no competition in their market sector.

    My comcast-connected systems are, like yours, portscanned constantly. So are my systems at work (where I have far less bandwidth in both directions) but I don't ever have connectivity problems on the non-comcast links.

    First, can anything be done with a simple at-home modem/Linksys router/two computer setup to stop a portscanning attack?
    Again, if it's really a portscan, it's not an attack. But let's say it's a DOS over multiple ports so it looks like a portscan... you can reverse-resolve the addresses, figure out Comcast's IP-to-physical location mapping (easier than it sounds) and go burn down those people's houses. Other than that, probably not.
    Second, is it possible for the Linksys router to become a 'bot' and actually be the originator of much of the traffic?
    In theory, yes, absolutely. That's why you keep it up to date on patches and always change the default password. Here in the Real World [tm] you haven't supplied the type of router or patchlevel you are using so I can't go look it up on Google or astalavista. Some cable interface boxes are pretty secure due to hardware limitations, others make very good bots.

    Finally... most people on comcast that have major problems are infected with viruses or worms, usually propagated by email. Those that are not are sometimes suffering from bad grounds - check that your cable system and the electrical outlets that feed your computer and televison systems are all properly grounded.

    HTH, I'm off to dinner.
  17. Use a good packet filter by mnmn · · Score: 2, Informative

    Use it to block all ports and keep connection states.

    See in a portscan, they send a SYN, and you send back an ACK... and back and forth. They try to connect to a port, your tcpip stack replies with a drop connection and the increment the port and repeat. The amount of data going in each direction is roughly equal when the ports are closed.

    The amount of bandwidth you have is not symmetrical. The best ADSL can do is 4/.8 mbps for download/upload, and the best a docsis modem can do is similar. It is more likely that your upload bandwidth is chocked, since 4mbps of download bandwidth is plenty of room. Unless you have a 'lite' internet speed which is rediculously slow.

    So a packet filter simply doesnt take the packet. No replies, either TCP or ICMP. That also means they will give up trying to keep their bandwidth efficient, and start portscanning another IP that actually replies. And since TCPIP is several back and forth packets to connect, you'll save on some download bandwidth, and you'll save ALL of your precious upload bandwidth.

    Its even better if you have NO ports open at all from the outside, like ssh or http or smtp. That way intruders cannot know at all if you exist, and its just a waste to portscan all 4 billion IPs, all their TCP and UDP ports rather than just the IPs which actually reply.

    My favorite packetfilter is OpenBSD for obvious reasons, they clearly had the best packet filter until recently. Now the competition is close, since everyone seems to be copying them. I dont have much experience with iptables and it confuses me, but it has a much greater install base, and commercial companies to back it.

    I've tried the WRT56GX Linksys (latest wireless) router, and havent been impressed with its firewall options. I wonder if I can grab a linksys and replace the firmware with a much simpler OpenBSD embedded system (is there an Openbsd for ARM?). For serious outfits, I'd use OpenBSD on a pentium III-ish with two good nics and low power consumption for stability.

    --
    "Give orange me give eat orange me eat orange give me eat orange give me you." -Nim Chimpsky
  18. If it hasn't already been said... by moorley · · Score: 3, Interesting

    Turn off WIFI and check your bandwidth...

    Chances are someone's pulling your bandwidth via WIFI or its creating some problem.

    I haven't quite nailed it down yet but in the last few months both my personal network and a friend of mine's have been bogged down whenever the WiFi is turned on. I like to think I'm security savvy but I just started digging into it yesterday.

    I'll reconfigure the netgear so it only accepts the MAC addresses I have but it's still quite annoying. I didn't broadcast the SSID and I used WEP/WPA but my surfing lags horribly whenever WiFi is turned on. Even in rural Idaho there be issues.

    who'd thunk it?

    Good luck!

    --
    "Don't fear death... fear not living..." -me :)
  19. Re:Yes Possibly The Portscans by g-san · · Score: 2, Insightful

    Whoa down there buckeroo. Bandwith is not the only resource at stake here. Depending on the vendor of the router upstream, a port scan will consume route cache entries that may make it very hard to open new outbound connections. I know of a major university with the wrong vendor that was routinely getting taken down by a handful people scanning their /16. Yes it was a poor router design in that version, but it was happening. Considering you only get maybe 64k route cache entries that is only 1 or 2 near simultaneous port scans of 1 port across a whole /16 or 1 or 2 scans on all ports on 1 ip address. It *is* possible for port scans to cause problems.