Multisite override modules
drupal_system_listing() is the function that handles this.

According to its inline documentation:

// Duplicate files found in later search directories take precedence over
// earlier ones, so we want them to overwrite keys in our resulting
// $files array.
// The exception to this is if the later file is from a module or theme not
// compatible with Drupal core. This may occur during upgrades of Drupal
// core when new modules exist in core while older contrib modules with the
// same name exist in a directory such as sites/all/modules/.


And as far as I can tell from the function, it searches directories in the following order:


/profiles
/sites/all
/sites/[domain]


So each directory in the list above would override matches from previous directories.

Having modules in the /sites/default directory is not normal, so I'm not sure what the expected behavior would be. My guess is that it depends alphabetically on your [domain] directory name.