The "bad sectors" are hardware issues, not software ones. Almost any imaging software will ignore those sectors because they are flagged by the OS as being unreadable. The more important question is: if you have bad sectors, why do they exist, and how much longer do you have until total drive failure?
I've used DriveImageXML to create backup images of my drives in the past, but never for direct restoring like you are describing - just mirroring your old drive to new hardware. You'll need to use some kind of tool that clones the drive while it is not in use. If you use a Linux LiveCD, GParted can clone the partition between drives. The aformentioned dd_rescue is also a decent choice.
Before you undertake this, however, I would make sure your backups are in good order. Ultimately, the image may fail, and if it does, having good backups is the difference between having to reinstall your OS (but otherwise being okay) and having to recover the entirety of your life's data.