Slashdot Mirror


The First Annual Underhanded C Contest

Xcott Craver writes "We have just announced a new annual contest, the Underhanded C Contest, to write clear, readable, innocent-looking C code that implements malicious behavior. The object is to hide evil functionality that survives visual inspection of the source. The prize is beer."

30 of 341 comments (clear)

  1. Comment removed by account_deleted · · Score: 5, Funny

    Comment removed based on user account deletion

  2. This will work by The+Original+Yama · · Score: 4, Funny

    People will do anything for beer! Who needs speech when you're gulping down a cold lager?

    1. Re:This will work by isny · · Score: 4, Funny

      Based on past experience, free beer is usually the first step toward free speech.

    2. Re:This will work by hostyle · · Score: 2, Funny

      Moderation nazi!

      --
      Caesar si viveret, ad remum dareris.
  3. in other words... by beta-guy · · Score: 4, Funny

    kill the brain cells that made innocent looking malicous code :P

    1. Re:in other words... by crisco · · Score: 2, Funny

      Ah, but any other self respecting, non beer drinking programmer will recognize its value as currency among lesser mortals. Even simply passing the prize along to lesser mortals can induce acts of goodwill.

      --

      Bleh!

  4. Re:What are the legal ramifications of this? by Anonymous Coward · · Score: 3, Funny

    Pussy.

  5. Beer? Phui! by devross · · Score: 2, Funny

    The object is to hide evil functionality that survives visual inspection of the source.

    The prize is world domination!

    --


    If these walls could talk they'd probly still ignore me. --MF DOOM
  6. I think I might win by numbware · · Score: 4, Funny

    #include
    main()
    {
    printf("Hello World");
    }

    Seemingly harmless, right? Wrong. It's still in devlopment, but think about it. You should have to greet the world before you destroy it. :)

    --
    I'm going to go create my own technology news site, with blackjack and hookers. You know what? Forget the news site.
  7. like this? by LiquidCoooled · · Score: 5, Funny

    #include stuff.h
    void main()
    {
    /* nothing / */ /* to see / * here */
    /* whats * / challenging / * about */
    /* this */ /* there / is no */ evil /*
    screensaver(); * function */ /* here
    anyone that thinks there is * / needs */
    /* their / * / eyes testing */ ();
    }

    585

    --
    liqbase :: faster than paper
    1. Re:like this? by Dun+Malg · · Score: 4, Funny

      Nice idea, but it doesn't look innoucuous. It looks like a trick. I think the contest is for code the equivalent of a razor blade in a nice looking apple, rather than a razor blade hidden in a pile of clearly marked rat poison.

      --
      If a job's not worth doing, it's not worth doing right.
  8. Here you go by titzandkunt · · Score: 5, Funny


    Just tuck it away in a commonly used header file, use touch to restore the last date/time of modification, and you're all set.

    #define void int

    Hours & hours of irritation & confusion!

    T&K.

    --
    Political language ... is designed to make lies sound truthful and murder respectable...
    1. Re:Here you go by Anonymous Coward · · Score: 2, Funny

      I actually did something like that once, for reasons that had nothing to do with obsfucation.

      You see, I had to write some kind of simulation program that required a huge array of numbers. I wasn't sure whether to use "long int", to avoid overflow, or "short int", to avoid wasting memory. So I thought, "OK, I'll use a typedef, and so if I pick the wrong type, I can easily change it later."

      But I was afraid that, out of habit, I would accidentally use "int" instead of my typedef. So I "temporarily" added "#define int ERROR" to my code.

      Unfortunately, by the time I got around to compiling "int main()", I had completely forgotten about that #define, and couldn't figure out where the compile error was coming from.

  9. Re:What are the legal ramifications of this? by bighoov · · Score: 5, Funny

    Can you even breathe in that tinfoil cocoon?

  10. Re:SxE anyone??? by Hatta · · Score: 2, Funny

    The prize is beer.

    What if someone in the straight edge crowed wins?


    They can give the beer to me.

    --
    Give me Classic Slashdot or give me death!
  11. Here's my entry: by stinky+wizzleteats · · Score: 2, Funny

    title Windows
    root (hd0,0)
    chainloader +1

    Now where's my beer?

  12. Diebold Hiring the winner! by tvlinux · · Score: 4, Funny

    Help Wanted:
    Diebold needs new programmers. If you have what it takes to hide "winning" code in our election machines. Apply to Diebold Careers

  13. Re:Diebold by ceejayoz · · Score: 2, Funny

    Pfft.

    It's supposed to survive inspection, remember. giveElectionToTheRepublican() is underhanded, but it probably won't survive inspection. ;-)

  14. Cheating? by Maxwell'sSilverLART · · Score: 2, Funny

    Am I required to submit original source code, written by me, or can I merely submit the leaked Windows source, and thus be assured of victory?

    --
    Moderate drunk! It's more fun that way!
  15. Would the Windows source code count? by Sniper_Peabody · · Score: 2, Funny

    It looks innocent but is about as evil as it gets.

  16. Subtlety by Dirtside · · Score: 5, Funny
    The prize is beer.
    ...but the beer is poisoned!
    --
    "Destroy science and religion. Science would re-emerge exactly the same; but not religion." - Penn Jillette, paraphrased
  17. Some dude from Microsoft is gonna win... by swillden · · Score: 4, Funny

    He'll submit the source code to IE.

    --
    Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
  18. here's my entry by thdexter · · Score: 3, Funny
    #include <notavirus.h>
    #include <seriouslyitisnt.h>
    So long as they don't check notavirus.h I think I'm in the clear for visual inspection.
    --
    I'm on a road shaped like a figure eight; I'm going nowhere but I'm guaranteed to be late.
  19. how's this? by spongman · · Score: 5, Funny

    int main () { WinExec ("iexplore.exe"); }

    1. Re:how's this? by Anonymous Coward · · Score: 2, Funny

      It's Internet Explorer. He's assuming the computer will be compromised before it would reach the return statement.

  20. So The Hard Part Is To by Master+of+Transhuman · · Score: 4, Funny

    "write clear, readable, innocent-looking C code", right?

    Wow, nobody's going to win this one.

    --
    Richard Steven Hack - This sig is TOO GODDAMN SHORT TO DO ANYTHING USEFUL WITH! MORONS!
  21. Re:If crashing is "malicious behavior" by proverbialcow · · Score: 2, Funny

    doesn't that make basically all c code underhanded?

    Nope. Only the code that includes

    #include <windows.h>

    *ducks*

    --
    The only surefire protection against Microsoft infections is abstinence. - The Onion
  22. Obligatory simpsons paraphrase by Sentry21 · · Score: 4, Funny

    Programmer: 'Take this source code, but beware! It carries a terrible curse!'
    Judge: 'That's bad.'
    Programmer: 'But it's optimized for PowerPC!'
    Judge: 'That's good!'
    Programmer: 'PowerPC is also cursed.'
    Judge: 'That's bad.'
    Programmer: 'But you get your choice of operating systems!'
    Judge: 'That's good!'
    Programmer: 'The operating systems run on Intel.' *pause* 'That's bad.'
    Judge: 'Can I go now?'

  23. I think this is more appropriate by btarval · · Score: 2, Funny
    Almost. All it takes is a one-line change to make this malicious program into what should be the motto of this contest:

    main() { printf("Goodbye World!\n"); }

    --
    The best way to predict the future is to create it. - Peter Drucker.
  24. Re:It's a bad idea by dcam · · Score: 3, Funny

    You accidently create a dozen instances of yourself and shoot them all in the foot. Providing emergency medical assistance is impossible since you can't tell which are bitwise copies and which are just pointing at others and saying "That's me, over there."

    Source

    --
    meh