Interestingly, this is actually a thing on the show. In one TNG episode they figure out how to open a small window in their own shields to beam through. It becomes standard procedure in TNG, DS9, and VOY after that. Presumably, you can exploit an enemy ship attempting that.