Slashdot Mirror


2008 Underhanded C Contest Officially Open

Xcott Craver writes "The 2008 Underhanded C Contest has just opened. Every year, contestants are asked to write a simple, innocent, readable C program that appears to perform an innocent task — but implements some non-obvious evil behavior. This year's challenge: redact blocks from an image, but do it so that the excised pixels can somehow be retrieved. We also have listed the winners of last year's contest, which was to write a simple encryption utility that mysteriously and undetectably fails between 1 percent and 0.1 percent of the time. The winning entry is truly impressive." We discussed the first of these contests in 2005.

9 of 160 comments (clear)

  1. Re:Hmm... by dreamchaser · · Score: 4, Informative

    No, the point is to make a utility that appears to innocently redact part of an image, when in fact the information is retrievable. It's meant to be a malicious utility that people would use without knowing that the 'hacker' could recover their full images.

  2. Re:Compression would be nice by 32771 · · Score: 3, Informative

    Just found the following in their faq:

    "For the 2008 contest: what does âoeblocked outâ mean?

    It means those pixels are apparently replaced with non-image. It can mean overlaying a black rectangle, or any colored rectangle, or a pattern, or random noise. As long as it appears to remove those image pixels, thatâ(TM)s fine."

    Very good!

    --
    Je me souviens.
  3. Re:PNG by flnca · · Score: 4, Informative
    Yes, it can be: From TFA:

    Note that if you use our PPM code, or any bog-standard image library , that code isn't counted in the number of lines.
  4. Re:PNG by msparshatt · · Score: 2, Informative
    The main page says

    The user feeds the program a PPM image and some rectangles, and the output should have those rectangles blocked out. So it seems the input file has to be in PPM format, though you can use any image library to access the file.
  5. Re:Bug? by Xcott+Craver · · Score: 4, Informative

    This was indeed a bug; we fixed it after several people pointed out the mistake.

    Interestingly, this demonstrates the effectiveness of "many eyes" in an open source project, even if the contest demonstrates the limitations of informal source inspection.

  6. Re:I submit by Hal_Porter · · Score: 5, Informative

    Have you actually looked at the Windows source code? When that chunk of the Win2K Pro source code hit the net I had to look(I still think it was the best Windows version ever made) and I was torn between being saddened and LMAO. It had tons of comments like "Don't know what this actually does but if removed Office prior to 2K will destroy every doc it touches so DON'T TOUCH" and "THIS IS A HACK which we haven't a clue what does but Windows crashes horribly if removed so LEAVE IT ALONE" I've seen that code and what you wrote is FUD and bullshit

    http://www.kuro5hin.org/story/2004/2/15/71552/7795

    Despite the above, the quality of the code is generally excellent. Modules are small, and procedures generally fit on a single screen. The commenting is very detailed about intentions, but doesn't fall into "add one to i" redundancy.

    There is some variety in the commenting style. Sometimes blocks use a // at every line, sometimes the /* */ style. In some modules functions have a history, some do not. Some functions describe their variables in a comment block, some don't. Microsoft appears not to have fallen into the trap of enforcing over-rigid standards or universal use of over-complicated automatic tools. They seem to trust their developers to comment well, and they do .
    --
    echo -e 'global _start\n _start:\n mov eax, 2\n int 80h\n jmp _start' > a.asm; nasm a.asm -f elf; ld a.o -o a;
  7. Re:COULD SOMEONE EXPLAIN HOW IT WORKS by Xcott+Craver · · Score: 2, Informative

    Hi,

    Ask yourself what SWAP(a[j],a[k]) does when j==k.

  8. Re:Hide the evil code? by Argilo · · Score: 2, Informative

    MD5 is reversible only if you know in advance that the input value was chosen from a relatively small set of possibilities. The recent attacks on MD5 do not reverse it; they just find "collisions", i.e. pairs of inputs that hash to one and the same value.

  9. Re:COULD SOMEONE EXPLAIN HOW IT WORKS by sid0 · · Score: 2, Informative

    When a points to the same location as b, *a XOR *b becomes 0. So *a becomes 0. But a is the same as b, so *b becomes 0 as well. Both *a and *b are destroyed. This will happen when the array indices that are passed into the macro are equal.