https://moz.com/blog/stop-ghost-spam-in-google-analytics-with-one-filter
To create this filter, you will need to find the report of hostnames. Here’s how:
Go to the Reporting tab in GA
Click on Audience in the lefthand panel
Expand Technology and select Network
At the top of the report, click on Hostname