Depends how much energy you want to put into this. Quick/Lazy way would be to grab some cheap tie down straps and wrap the box to something. The more involved way would be to either permanently mount the box in the trunk with screws or bolts or to go even further and bolt/weld an L bracket (as CKY mentioned) to the trunk and then screw the box to it. This adds security as well.
Yeah some people have done this with head units for a while. I was going to do it with mine but I didn’t have the ambition.