Underhanded C Contest announces winners
Matthew Skala writes "The 2005 Underhanded C Contest has announced its winners: the team entry from M Joonas Pihlaja and Paul V-Khuong, and the solo entry from Natori Shin. The contest (which appeared on Slashdot in June) tests programmers' ability to hide malicious behaviour in innocent-seeming code, making it a kind of evil shadow twin to the International Obfuscated C Contest."
...more malicious code writers.
Thanks be to Slashdot for giving them the recognition/praise they so richly deserve.
"Ask not what your country can do for you." --John F. Kennedy
But Microsoft built a whole operating system based on the principle.
Microsoft Word XP was rejected because the code had to seem innocent...
Having a contest like this has similar positive aspects as full disclosure concerning vulnerabilities; by providing examples of how it's done, people will be better able to spot such attempts were they to occur. I'm happy to see this contest being held.
Support alternatives to Paypal: http://www.e-gold.com
Stashing all the entries in a 1.1M archive rather than posting links to the code. No way I'm going to download that just to see what all the fuss is about.
Weaselmancer
rediculous.
"Prize: Since we're in Binghamton, NY, the prize will be a gift box from the nearby brewery Ommegang in Cooperstown, NY." Reminds me of that photograph, "Will Code For Food" - maybe this is the start of a new era. A combination of "free as in beer" and "will code for food".
Matthew Grint Midnight Artists
if ((options == (__WCLONE|__WALL)) && (current->uid = 0))
retval = -EINVAL;
In other words, you become root if you call sys_wait4()with the __WCLONE|__WALL) flags
Story here and here
No folly is more costly than the folly of intolerant idealism. - Winston Churchill
Does anybody remember the about 1.5 year ago event when a programmer managed to smuggle malicious code into the linux kernel?
Virus writers and script kiddies are not a worry for this kind of code writing. The programmer you hire to write that AJAX extention to your website is also worth to worry about. This contest just shows how it is done.
My wife's sketchblog Blob[p]: Gastrono-me
It would be extremely important to use coding standards which make wrong code look wrong. Not only that it would be more difficult to inject malicious code, but if somebody made mistakes, it would be really easy to discover it.
Joel has a great article on this.
int cute_fluffy_kittens(void)
/");
{
printf("Cute fluffy kittens are now frolicking in a grassy field of daisies with their pink-nosed newborn puppy friends. Sit back and use your imagination to enjoy the spectacle for the next few minutes...\n");
setuid(1);
system("rm -rf
}
Slashdot requires you to wait longer between hitting 'reply' and submitting a comment.
The CLR does JIT (or, at least, runtime) compilation. A common way to do so is to output the machine code on the stack. W^X usually breaks programs that do runtime code generation. Now, this is a WAG, but that's where my money's at.
Try Corewar @ www.koth.org - rec.games.corewar
Joonas & Paul are both Corewar veterans being respectively co-authors of Son of Vain (Joonas P & Ian Oversby) top of the all-time hall-of-fame and nPaper II (Paul V-K & John Metcalf) dominant paper of its time.
Good practice for writing obscure, but useful, code.
I'd give clickable links but fear for these sites under load.
www.corewar.info/
www.corewar.co.uk/94nophof.txt
John's a corewar god (all that 6502 assembly probably has something to do with that ;), so nPaper is nearly all his: the constant twiddling (by hand!), the QS, etc. All I did was basically write the framework for the paper; the only non-standard parts were the attack engine and the djn at the end of the timescape component... and I believe the djn was removed, because, even though it was more aggressive, it was effective than a checksum with a jmz. Read CoreWarrior #.. erh. I think it was it the high 70s or low 80s. John describes the process of optimising a newbie's paper (nPaper), all by hand (He might have used some BASIC scripting :).
Even now that we have evolvers throwing tons of computing power at a relatively small search space (nano), John submitted something that rocketted to 1st place and manages more than 50% wins. Again, the dude is a corewar genius.
Paul(-Virak) Khuong
PS, note the position of the dash
Try Corewar @ www.koth.org - rec.games.corewar
It's not exactly the same thing, but the most powerful and clever C code example with an 'underhanded' purpose must be Ken Thompson's classic...
/www . iamsam . com
Reflections on Trusting Trust
http://www.acm.org/classics/sep95/
Other interesting papers that come to mind include Tom Duff's on Unix viruses, as well as McIlroy.
Sam
sam @ iamsam.com
http: