How can I extract contacts from an iTunes backup of an iPhone?
Well, you can use this simple script I made half a year ago, but decided to publish when saw your question.

It renames all files to their normal names.
After that you can find AddressBook in HomeDomain/Library/AddressBook/AddressBook.sqlitedb

It's not CSV, but quick look through it show that you should take a "person" from ABPerson table (ROWID, First and Last are the most interesting).
After that you look up persons in ABMultiValue table: ROWID acquired in previous step links to record_id, value has the actual value, and label seems to be really weird for me. I'd recommend you to take all values looking as numbers.

Hope you have some programming skills or know someone who can help you.
If not, I could look into making some kind of helper script for it, but can't promise anything.
Those shitty paid apps always made me angry, and I can't understand why is there no FOSS apps for recovering data from iTunes backups. Meh.