News for hackers. Stuff that matters.
Re:macOS High Sierra: Anyone can login as “root” with empty ... by RJIb8RBYxzAMX9u on Tuesday November 28, 2017 @06:23PM (#15802960)
osquery is not a built-in tool. You can get the same info with plutil(1):

  $ sudo plutil -p /private/var/db/dslocal/nodes/Default/users/root.plist
If I understand OP correctly, if passwd is a lone asterisk, then you haven't been exploited.

Edit: trying a little harder to dump accountPolicyData:

  $ sudo defaults read /private/var/db/dslocal/nodes/Default/users/root.plist accountPolicyData | grep -oE '[[:xdigit:]]+' | xxd -r -p
Re:macOS High Sierra: Anyone can login as “root” with empty ... by simias on Wednesday November 29, 2017 @05:37AM (#15805894)
>if passwd is a lone asterisk, then you haven't been exploited.

At the risk of sounding a bit pedantic you can't really assume that, it's possible that somebody used this vulnerability, installed some sort of backdoor and then disabled the account to hide their tracks.

Re:macOS High Sierra: Anyone can login as “root” with empty ... by abritishguy on Tuesday November 28, 2017 @06:25PM (#15802985)
That's correct.
Re:macOS High Sierra: Anyone can login as “root” with empty ... by princekolt on Tuesday November 28, 2017 @06:52PM (#15803195)
Bad news: I tried the exploit in my macOS Sierra installation and it didn't seem to work. However, the passwd entry on the output of your first command IS A LONE ASTERISK.

However I still can't login as root. This leads me to believe this behavior has always been there, and maybe the login methods just didn't allow an empty password.

Re:macOS High Sierra: Anyone can login as “root” with empty ... by ybloviator on Tuesday November 28, 2017 @07:11PM (#15803308)
This is very normal in 'nix' systems. '' indicates a locked account. (I've given up figuring out how to escape an asterisk)

ex:

  daemon:*:1:1::0:0:Owner of many system processes:/root:/usr/sbin/nologin
  operator:*:2:5::0:0:System &:/:/usr/sbin/nologin
  bin:*:3:7::0:0:Binaries Commands and Source:/:/usr/sbin/nologin
  tty:*:4:65533::0:0:Tty Sandbox:/:/usr/sbin/nologin
If the OS is letting you in with a '*'in the encrypted password field, something is very very wrong.
Re:macOS High Sierra: Anyone can login as “root” with empty ... by warent on Wednesday November 29, 2017 @12:43AM (#15804863)
I'm confused, why do you have to escape an asterisk?
Re:macOS High Sierra: Anyone can login as “root” with empty ... by HarfTarf on Wednesday November 29, 2017 @12:52AM (#15804905)
He's stuck inside
Re:macOS High Sierra: Anyone can login as “root” with empty ... by vsl on Wednesday November 29, 2017 @02:08AM (#15805179)
Markdown in HN comments.
Re:macOS High Sierra: Anyone can login as “root” with empty ... by royprins on Wednesday November 29, 2017 @08:08AM (#15806447)
Famous last words of a Roman centurion.
Re:macOS High Sierra: Anyone can login as “root” with empty ... by adrianratnapala on Wednesday November 29, 2017 @08:54PM (#15812793)
Nah, I've never seen them do worse than knock people out. Probably the next thing the centurion said was "Ow, what hit me!".
Re:macOS High Sierra: Anyone can login as “root” with empty ... by kr3wn on Wednesday November 29, 2017 @01:51AM (#15805118)
wildcard.
Re:macOS High Sierra: Anyone can login as “root” with empty ... by dep_b on Wednesday November 29, 2017 @06:59AM (#15806164)
Only High Sierra is affected.
Re:macOS High Sierra: Anyone can login as “root” with empty ... by timsutton on Wednesday November 29, 2017 @12:47AM (#15804878)
`sudo dscl . -read Users/root accountPolicyData`
Re:macOS High Sierra: Anyone can login as “root” with empty ... by edjw on Wednesday November 29, 2017 @03:40AM (#15805503)
When you do this you'll get the creationTime and passwordLastSetTime as seconds since the 'epoch' – January 1, 1970, 00:00:00 (UTC). These are numbers like 1474441704.265237 which aren't very easy for a human to read :-)

To convert this into a human-readable date and time, open a terminal and do this:

  python

  >>> import time

  >>> time.strftime("%a, %d %b %Y %H:%M:%S", time.localtime(1474441704.265237))
You'll get something like 'Wed, 21 Sep 2016 07:08:24'

(I'm sure you can do this in other languages than python...)

Re:macOS High Sierra: Anyone can login as “root” with empty ... by fauigerzigerk on Wednesday November 29, 2017 @03:58AM (#15805570)
If you're already in the terminal you could instead enter

  date -r 1474441704
Re:macOS High Sierra: Anyone can login as “root” with empty ... by edjw on Wednesday November 29, 2017 @04:03AM (#15805579)
This is a much better answer!
Re:macOS High Sierra: Anyone can login as “root” with empty ... by mhandley on Wednesday November 29, 2017 @05:00AM (#15805760)
One of my Macs is showing a root password change date of Nov 10th 2017. I can't explain that, so I'm reinstalling now. It did have sshd enabled and remotely accessible, though I thought root login was prohibited.

If I understood correctly, this particular bug was only exploitable from the GUI and this machine hasn't been away from home, so it's likely this isn't related, but posting here, in case it's part of a bigger picture.

Re:macOS High Sierra: Anyone can login as “root” with empty ... by marcelfahle on Wednesday November 29, 2017 @05:29AM (#15805877)
OK, I guess when doing OP's root trick, the root user gets activated/created, and that's that's when the PW gets set to empty. I guess that's where my passwordLastSetTime comes from.
Re:macOS High Sierra: Anyone can login as “root” with empty ... by haZard_OS on Thursday November 30, 2017 @09:59AM (#15816180)
This works remotely as well (although not through SSH, obviously).
Re:macOS High Sierra: Anyone can login as “root” with empty ... by danielrangel on Wednesday November 29, 2017 @04:11PM (#15810896)
possibly the same timestamp here: 1510300538.767916 'Fri, 10 Nov 2017 04:55:38'
Re:macOS High Sierra: Anyone can login as “root” with empty ... by gurkendoktor on Thursday November 30, 2017 @04:47AM (#15814594)
Oh wow. Is there any other explanation for this other than this having been exploited in the wild for almost three weeks? Or maybe someone just tried to log in over SSH to exploit some other weakness (something like predictable SSH passwords on jailbroken iOS devices), and happened to create the root user on your machine?

Did you also have sshd running, and do you know what kind of network you were using at the time?

Re:macOS High Sierra: Anyone can login as “root” with empty ... by marcelfahle on Wednesday November 29, 2017 @05:24AM (#15805860)
My root pw passwordLastSetTime says this morning.. the fuck??