If u want to do it right, here it goes:
1. get some nice WP / Joomla themes or plugin that will cause people to install
2. use a function that calls your remote server (use cURL or file_get_contents) and that get's your html code (that contains the hidden links) as server response, then encrypt this function in the themes / plugin files.
3. if u can get your hands on a good cloaking platform, or can get all Google IP ranges (and I mean all, not just famous googlebot, but also their cloud servers, manual reviewers etc), it will be perfect to stay under the radar, cause you can cloak , and show Google the links as live, and not hidden.
4. spread the rumor. go to relevant forums, and offer your trapped themes / plugin for free download.
5. while people install your themes, you can control their websites, and inject hidden links to their website.
6. With Cloaking combination, you can stay under the radar for a long long time.
7. and if one of your website is getting de-indexed, you can easily pass the hidden links juice to a new website.
good luck