You can use [`user_permission_get_modules()`][1] function, which returns an array of all defined permissions and their modules.

>Determine the modules that permissions belong to.
>
> ###Return value
>
> An associative array in the format $permission => $module.

 [1]: https://api.drupal.org/api/drupal/modules!user!user.module/function/user_permission_get_modules/7