Make the syrup: Place the sugar and water in a small saucepan and simmer over medium-low heat until the sugar dissolves.
Add the rosemary and infuse for 2 to 3 hours.
Strain and keep in the refrigerator for up to 3 weeks.
Make the cocktail: Combine the grapefruit juice, rum and rosemary syrup in a cocktail shaker filled with ice and shake. Strain into a glass filled with the crushed ice and garnish with a rosemary sprig.