According to Catholicism, when is vandalism not sinful? I understand that destroying property as an unintended side effect of doing some greater good (like saving lives) is not a sin. However, is destroying property not as a side effect to the immediate threat ever allowed? Examples:


Hacking and destroying of neo-nazi or pornographic website,
Tearing down a poster that calls for some atrocities or displays pornography.


This question is asked based on the perspective of Catholicism.  If a more extreme example will aid in explaining the issue from the Catholic perspective, then please substitute in a different example for either of the two I listed.

Added:
I'm also interested in the relation to the law, because in many cases, this behavior could be unlawful, and from my understanding, in most cases breaking a law is a sin (as all authority comes from the God). Yet in those cases, law may protect something evil.
1. A good answer would be an explanation of what makes destroying of the property a sin...

The seventh commendement (You shall not steal) implies the right for every body to private ownship. The Compendium of the Social Doctrine of the Church says : 


  
  Private property and other forms of private ownership of goods assure a person a highly necessary sphere for the exercise of his personal and family autonomy and ought to be considered as an extension of human freedom ... stimulating exercise of responsibility, it constitutes one of the conditions for civil liberty
  


2. ... and how this logic can be applied to the given examples

A poster may no longer be considered as a personal belonging. Tearing it down could be see as an expression of your opinion, your freedom. The Compendium of the Social Doctrine of the Church gives several definitions of freedom. One of them is:


  
  freedom must also be expressed as the capacity to refuse what is morally negative, in whatever guise it may be presented, ...
  


But just before this definition, it states about the exercice of freedom. 


  
  This must take place within a “strong juridical framework”, within the limits imposed by the common good and public order, and, in every case, in a manner characterized by responsibility.
  


Please note that displaying a poster that calls for some atrocities or displays pornography may be punished by law.

The scene of Jesus with the vendors in the Temple (cf. John 2:14-16) shows that there is not a general rule about the immorality of destroying others's belongings when their use/presence offends. However, whoever destroys the property of others while civil law doesn't condone it may be punished if discovered.

3. What is the source of "good" - is something good because God says so? Or maybe God says what is good ?

This is a huge question that cannot be answered within a few lines. You can have further information by looking for ressources related to the sources of morality.

4. I'm also interested in the relation to the law ...

Law may vary from one contry to another.

5. From my understanding, in most cases breaking a law is a sin (as all authority comes from the God)

Check out this quote of the Catechism of the Catholic Church: 


  
  The citizen is obliged in conscience not to follow the directives of civil authorities when they are contrary to the demands of the moral order, to the fundamental rights of persons or the teachings of the Gospel. Refusing obedience to civil authorities, when their demands are contrary to those of an upright conscience, finds its justification in the distinction between serving God and serving the political community. "Render therefore to Caesar the things that are Caesar's, and to God the things that are God's." (Mt 22:21) "We must obey God rather than men" (Acts 5:29)
  
  .When citizens are under the oppression of a public authority which oversteps its competence, they should still not refuse to give or to do what is objectively demanded of them by the common good; but it is legitimate for them to defend their own rights and those of their fellow citizens against the abuse of this authority within the limits of the natural law and the Law of the Gospel.