• # I WROTE THIS JUNK (unregistered)

    Set this comment to featured, I guess.

  • Professor Frink (unregistered) in reply to iMalc

    Chief Wiggums' son is Ralph, m-hay. Nelson Muntz is the "ha-ha" kid, no relation between them, but Nelsons' grandfather is a judge, with the robes and gavel, good goyven-glayven!

  • Nelson Muntz (unregistered) in reply to DaveK
    DaveK:
    iMalc:
    tulcod:
    TRWTF is the fact that I saw a .nl domain name at the top of the file, surfed there, got redirected to xs4all.nl, and realized, i have that very same router :(
    In the words of Police Chief Wiggam's son from the Simpsons: Haa Haa!
    In the words of Nelson Muntz, "FAIL!".
    Ha ha!!
  • PO8 (unregistered)

    Specifically, I'm with the folks who are wondering what this script is doing on TDWTF. It's a slightly messy and slightly overcomplicated, but otherwise apparently perfectly workable, init script for a Linux device. I haven't seen one plausible WTF comment about it. Indeed, the things I find the most disturbing---the 1-second sleep, the gratuitous tarball created in the middle, the mass copying of files around the system rather than symlinking---haven't been commented on at all.

    Lots of Simpsons discussion and not-very-insightful comments about rm paths, though.

    Lately CSOD has been a huge disappointment. Quite a few snippets have been posted for which the largest WTF seems to be that the poster and editor didn't understand what the code is doing. Not that we get more than a few CSODs a month now anyhow.

    Hing: Before you post a chunk of code outside your area of expertise as WTF, talk to a clueful developer or two who specializes in that area, and see what they think. If they aren't too bothered by it, you don't get to be.

  • blaufish (unregistered) in reply to Johan
    Johan:
    That's a security feature. ;-) It really is.

    It prevents others from changing the path and linking to another executable.

    Mostly it is linked to "rm" though. ;-) Example:

    Path = "/bin" Command in script is "ls important_file.txt" So, it will execute "/bin/ls important_file.txt"

    If an attacker does "ln -s /bin/rm /tmp/ls" And can change the path in the script to "/tmp" Then the script will actually execute "/bin/rm important_file.txt"

    Offcourse you need to be able the change the path...

    No, that kind of "security" is just a plain bad idea. If attacker can control environent, then IFS, LD_PRELOAD etc etc works very well. Protecting against a specific instance (exploit) of a general attack vector is just sad. Fix the problem, not the symptom.

    Btw: the real reason for doing e.g. /bin/ls is to avoid confusion with a possible user alias ls, or a with possible "extended version" of the command in /local/bin (e.g. GNU ls installed there on a legacy UNIX). (Usually, this is not an issue with system scripts). So sometimes it has its merits, but not really related to security.

  • blaufish (unregistered) in reply to verisimilidude

    It is not related; "Many of these settings, such as max_size, max_delay, and min_delay, relate to controlling the size of the routing cache."

    Anyway, why hasn't anyone put more empasis on ICMP? http://www.networksorcery.com/enp/protocol/icmp/msg3.htm "Another case is when a datagram must be fragmented to be forwarded by a gateway yet the Don't Fragment flag is on. In this case the gateway must discard the datagram and may return a destination unreachable message."

    So basically, when the packets becomes sufficiently large, this router will silently fail to forward it. Now for a treat: if machine X will send a jumbo frame ( http://en.wikipedia.org/wiki/Jumbo_Frame ) or other large frame, and it actually manages to pass through all the way to this dsl router, it will die when reaching an Fast Ethernet with 1500 MTU. Might not be the cause (so many if's and but's: is their part of the internet supporting large frames, etc etc), but darn it would explain the symptoms described.

    Maybe the editor had figured that out as well :-)

  • blaufish (unregistered)

    an lengthy explaination: http://www.netheaven.com/pmtu.html

    i.e. it is retarded to drop outgoing ICMP 3 (unless you like getting your connections to die, die, die)

  • robbin (unregistered) in reply to Brompot

    you call /bin/rm to avoid user's aliases (rm -i)

  • Anon (unregistered)

    and they've used insmod all over the place... should use modprobe.

Leave a comment on “#WHO WROTE THIS JUNK”

Log In or post as a guest

Replying to comment #:

« Return to Article