Yes, the disk utility uses a method similar to the one with
dd you describe, or a faster and more secure one more like:
dd if=/dev/urandom of=/dev/sda bs=1M
This introduces a lot more fuzz to the overwriting pattern than zeros only, which should be more difficult to restore but not noticeably slower to perform.
Some people claim, this is not enough and one should overwrite hard disks multiple times and with more elaborate patterns (
scrub(1) can do both of that as per the other answer), but most will say once is enough, if an attacker wants to restore more than a few bits with a significant chance.
/dev/urandom peaks at ~13 MiB/s on at least two systems including mine. Therefore simonp suggested a different approach using
head -c 32 /dev/urandom | openssl enc -rc4 -nosalt -in /dev/zero -pass stdin | dd of=/dev/sda bs=1M