This is something you learn through experience. At some point you will know when and why programs need to ask for your password and you recognise authentication prompts that are presented by the system rather than the program directly (though this is never absolutely reliable).
To give a few rules of thumb:
- Programs almost never need your account password. By far most of them can just run with the standard permissions that they already have. This applies to many programs that you ‘install’ by dragging them into the /Applications directory. Sometimes, programs need to do something that they cannot do with their standard permissions. They can ask the system to ask you for additional access and this is handled by a password prompt that the system shows you. Here you can enter the password safely, the credentials are not exposed to the program. However, this process can be mimicked by a malicious program to steal your password. Be alerted when a program needs addition privileges and check with the vendor why this is necessary.
- Some programs that you drag into the /Applications directory will prompt you to install additional components when you open them, for which they need administrator access (see image below). Malwarebytes Anti-Malware for Mac is such a program. This is actually something Apple encourages developers to do when they need to work with elevated privileges, for instance, to read and write in certain system locations. Apple encourages developers to bundle privileged ‘helper applications’ to compartmentalise more dangerous operations, so that the main program does not need to run with elevated privileges. The installation of these components is handled by both the program and the system, where the authentication prompt is presented by the system and the program will never see your credentials. Here you have to check with the vendor why a program needs this kind of access.
- Some applications are shipped as installer packages (.pkg files), which often look like yellow boxes. These packages are run by Apple’s Installer program and will take care of the installation for you. Here you can also safely enter your credentials, because the authentication is handled by the Installer program. Just be aware that installer packages can contain custom scripts that can be malicious.
Generally, make sure you install programs from trusted sources only and do a bit of research into the credibility of the vendor before you install a program. Avoid downloading programs from websites such as MacUpdate or Softtonic.
View attachment 677711