An accused hacker will head to Brooklyn federal court in a trial that will offer a rare look into the mechanics of how cybercriminals take control of computers around the world to carry out large-scale attacks.