However, if you worry about SHA-256, then check the current chainwork. And note that instead of trying to compute any preimage (2^256 hashes with brute force) or collision (2^128 hashes with birthday attack), it is much more profitable to produce a higher chainwork, and just overwrite the whole chain. Also, using some additional power for mining, will not remain unnoticed. There are many possible attacks, where you can harm Bitcoin, while not breaking any rules at all. For example, it is possible to raise the difficulty into some insane levels, and then just stop mining. Then, no rules will be broken, but the chain will be effectively halted, if for example the difficulty would be one million times bigger than it should be.
So, if you want to get your answer, you should clarify, which particular attack you have in your mind. Because different attacks will cause different effects, and you can test each case individually, by using some simplified version of SHA-256, with a particular weakness that you want to test, and then check only that to see, how your nodes will react. Because all you need, is just cloning Bitcoin Core, and replacing SHA-256 implementation with something else, and then running some regtest nodes, unaware of the attack, and some attacker node, that can produce hashes faster in a particular way.