I know this is an old post but maybe it will help someone else out if they come across this.
I changed my struts a couple days ago and I had the exact same problem. I had no idea what the rubber was. But after messing around, I believe that is the top part of the Shock Absorber Boot that just broke off. You can remove it and the new boot fits right into it.
NissanPartsDeal.com
54057-0W000