No, they did not
House-elves so do not share their family's last name. As @anemone posted in their comment, that would be downright shameful on the family. House-elves are considered a family's belongings, as any interaction between the Malfoy's and Dobby can prove this.
However, there is an explanation for this. There is no need at all for house-elves to be documented, and therefore they do not have last names.
Some might argue the House Elf Legion Office dealt with fired house-elves and whatnot, but this clearly is not the case. When Dobby and Winky were freed, there was no department or office that they went to, at least not explicitly mentioned.
"When Dobby goes to Winky, and he finds out she has been freed to, sir! So we goes door to door looking for work, and many slammed doors in our faces, saying 'House Elf-looking for pay," they says, "that isnt the point of a House Elf."
They would have visited said department, if there really was one. It sounds as if the Ministry is trying to seem on top of any possible issues to satisfy the public.
Does that mean they don't actually have families?
Dobby seems to be a relatively young house elf (they have life expectancies of several human generations) and each Elf's parent seems to have passed by the time their offspring comes of age. (See Dobby and Winky)
Also, how JKR has lead us to believe the reproduction process of house-elves is a house elf from one esteemed family and one house elf from another prominent family, (ex. Malfoy and Black) and the offspring lives with the mother, who raises it. When the offspring comes of age, the mother appears to either die of old age or be "taken out back" by the owners.
See quote:
This is the heads of beheaded house-elves, when they got to old to carry a tea trey.
That already isn't a proper family, so its safe to say that few (free elves) to none had proper families, if you consider a proper family to be a Nuclear family. (Nuclear families were the 'norm' in this time period.)
Elves did not have proper families, and also had little documentations, if at all. Therefore, there wasn't a reason to give a house elf a last name.