It's against the terms of service to modify hardware, which includes taking an old style 360 hard drive apart to put it into a 360 S. MS know that only 250GB and 320GB hard drives have been released for the 360 S, so in theory they would know that anyone using a hard drive of any other size must have modified the hardware by taking it apart and so they could ban people, but I haven't seen a single report of that happening. I don't think it's in their best interests to ban people over that either, just like they haven't banned people for using unofficial hard drives when they could detect those too, but I can't say with 100% certainty that they'll never do it.
Also, I think if they cared, they would just block you from doing it, rather than banning your account or console, like they blocked unofficial memory units (before they updated the dashboard to allow you to use any USB stick). Again, that's just speculation though.