For the sugar rim wet the rim of a rocks glass, dip it in sugar, add a few ice cubes, set aside.
In a shaker combine tequila, triple sec, orange juice, lime juice, ice. Shake very well.
Strain into glass.
Notes
The drink will come out quite sour, so feel free to try it as-is first and then experiment with simple syrup or less lime juice if you want it less tart.