The only possible way to avoid malicious exit nodes with a 100% certainty is by whitelisting the exit nodes you know for sure are not malicious (i.e. those that are under your control). The way to do that is by adding the following line in the torrc file as described in the manual:
Otherwise, the risks of using a malicious ...
There is procedure in Tor for reporting bad relays:
Send email to address email@example.com and describe the behavior you observed (the suspicious criteria are in the wiki).
There is no automatic way of detecting such nodes, only manually.
As far as I know this is not possible
All tor relay UP addresses are publicly available, including exit ones. Any webmasters that choose to block them can, in fact Tor Project operates a dedicated list for this purpose. Cloudflare also provides an option for sites using their services to block Tor traffic.
Webmasters sometimes block for security purposes (...