This will be a general review of permutation testing in general, with a brief example of the Mantel test:
https://en.wikipedia.org/wiki/Mantel_test
and a further worked example of a permutation-based approach to comparing connectivity matrices using resting state functional connectivity data.