What stops people attacking my new coin? Say I just made a new altcoin.
I mined it for a few days at some reasanoble difficulty - 2000 for example.
I got to the 10 000th block and I am happy with my premine and network.

Then, an attacker downloads my client and without connecting to the network, starts mining with some huge hashing power.
So for 24 hours, he is at block 12 000th with difficulty of 5000.

Then, he connects to my network.
Wouldn't that make all my nodes sync with his network?
This way I would lose my premine, wouldn't I?

Is that the case?
Can I prevent the attack?
Firstly, if he downloads the client wouldn't he have to sync with the existing block and be up to date.
From what I'm able to understand your concern is time warping (it should be but it kinda got solved in july 2010 for bitcoin if your coin is a fork of the bitcoin source). But to simply answer your question his solved blocks would have to get approved and even if they do they will get added to the network and synced to the current ledger. Therefore, only the blocks 10000 to 12000 would be solved by him and no it won't make it sync to his nodes.