You can prevent DDOS by using VPN / make sure the can't get your IP (cuz its quite hard to resolve IPs thru steam unless you have some info such as skype posted there).
The logic someone DDOSes me, so will I is stupid honestly + its a crime pretty sure so don't do dumb shit like that..
So basically: don't share personal info on steam, don't open unknown links/images (really easy to get IP that way)