However, the hacker simply resets the system date using Apple's "systemsetup" command, and now has access to the "sudo" command. At this point, a hacker sits down at your system and tries a "sudo" command, only to find it has been over 10 minutes and a password is now required. One scenario exploiting this would be if you log into your system and use sudo for some purpose, and then leave your computer while you are still logged in. However, this bug allows someone with access to the system to set the system date, and bypass the need for a password. So you may want to ask for ways to prevent Homebrew from even trying to use sudo (don't know whether this is possible. Generally, when you use sudo, the system will save your password for subsequent uses of the command, and expire this password after 10 minutes of no sudo use. Ignoring for a momentan that using echo PASSWORD sudo -S is a bad practice (at least from a security point of view) your problem seems to come from the fact that sudo gets called without -S within the Homebrew install script. ![]() By changing the date you can bypass this requirement. After 10 minutes this should expire and require you enter your password again. Running "sudo su" to switch users and exist as the root user (shown here), requires you authenticate (see the "password" prompt). re-write it in golang and use setuid bit. If you dont you will be back here asking how to edit the file, when sudo is not working. Be careful to read the bit on visudo (and how not to get your self locked out). While at first glance it appears this issue allows anyone access to the system, it only affects systems in specific ways - it only works if the current user is an administrator, is currently logged in, and has authenticated the sudo command in the current log-in session. read man sudoers, and register the script with sudo as not needing a password to run by you. A better solution if you want to run something with sudo without putting in your password is to allow your user to do exactly that one command without password. This problem appears to revolve around the way the system stores prior credentials for the sudo command. If you set the Mac's clock back to January 1, 1970, (the epoch, or logical "beginning of time" for Unix systems), apparently you can use the sudo command to gain root access and use it without authenticating. ![]() Having a one-letter password is highly unsecure, it is far to easily breakable. Ars Technica has found that a flaw in OS X allows the use of the sudo command without the need for a password. 1 sudo is for executing a command with administrator privilege, so it obviously uses your administrator password which, as Monomeeth said, cannot be blank. Normally the sudo command is off-limits to everyone except administrators, and even with administrative access it requires you supply your password to run. The sudo command is therefore quite powerful, as it can be used to bypass access permissions and give full access to information in one's account, or allow for modification of system files.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |