Smart way to compare drupal instance files with official release to search for modified files
The Hacked! module is exactly what you're after:


  This module scans the currently installed Drupal, contributed modules
  and themes, re-downloads them and determines if they have been
  changed. Changes are marked clearly and if the diff module is
  installed then Hacked! will allow you to see the exact lines that have
  changed.