The Marines are part of World Government, and arguably they're its most active branch. Therefore assaulting their headquarters and laying waste to them is already a crime against WG of historic proportion.
I don't know if your subtitles are an official translation. The English translation of chapter 1038 I am familiar with (it would be interesting to know what the original Japanese says) speaks of historic crimes of Whitebeard's crew, which may just refer to the total of their criminal activities.
Of those we aren't shown much (in point of fact, in chapter 965 we see the Moby Dick fleeing from Marine warships because Whitebeard thought that fighting them was pointless), but it stands to reason that while conquering and mantaining their infamous turf, the Whitebeard Pirates would evict WG officers, on occasion. It also stands to reason that plundering WG cargos would be part of their income.
I'll leave aside the issue of whether or not they were helping a world-class terrorist - which Whitebeard techincally was because of his previous affiliation with Rocks - escape capture, because a large portion of Rocks' story has been classified by the WG.