The part with the brake lines going to it is the ABS brake modulator, the black unit attatched to it is the ABS motor pack. There is a procedure that requires a scanner to seperate the two, gear tension relief and motor rehome. If you decide to replaced them, check salvage yards. They usually sell them as a set for around 200.00 and you won't have to worry about the tension relief and rehome. Besides, they are VERY expensive new.
You can break the brake lines loose one at a time and the modulator and check for brake pressure from the master to the modulator.