you can generate all masks for 8 chars upper/num and filter out the ones which do not have 4 upper/num chars.
echo uuuudddd | ./permute.bin | sort -u | sed 's/\(.\)/?\1/g' > masks.hcmask
note: permute.bin from hashcat-utils
echo uuuudddd | ./permute.bin | sort -u | sed 's/\(.\)/?\1/g' > masks.hcmask
note: permute.bin from hashcat-utils