One way to do it would be to output your comp to frames, then do an automated batch in photoshop that applies the “dust and scratches” effect. You can make it save to a different folder, then reimport the footage as a frame sequence and reoutput to whatever format you desire.
good luck!
-c