-m 0 is raw md5, so there is no salt used. Hashcat operates by hashing the words in your dictionaries using the same algorithm and comparing it to the hash. If the hash matches the hash you're trying to crack you were successful.
Since it's a salted hash, you should use 10 or 20 instead of 0, depending on the algorithm used to generate the password.
10 = md5($pass.$salt) 20 = md5($salt.$pass)
You'll also need to supply the salt along with the hash, so 341A451DCF7E552A237D49A63BFBBDF1:1234 as this allows hashcat to include the salt when generating hashes from the dictionary.
So your command should look something like this:
hashcat -a 0 -m 10 341A451DCF7E552A237D49A63BFBBDF1:1234 custom_dict.txt
You can verify that it works by performing the following steps...
- Generate a hash:
echo -n "1234password" | md5sum - d5b1ee4b463dc7db3b0eaaa0ea2cb5b4 -
- Crack the hash
hashcat --force -a 0 -m 20 d5b1ee4b463dc7db3b0eaaa0ea2cb5b4:1234 rockyou.txt ....