UPDATE given your comment:
I know that it would be computationally unfeasible. I just wanted to know if it would be theoretically possible (it seems not according to tylerl)
Yes, given infinite time and infinite energy, a neural net could crack SHA256. BUT (and I think this is the point @tylerl is making) because hash functions have no discernible patterns, a neural net would not be able to do any better than the naive brute-force of building a lookup table by computing the hash of every possible string. Such a lookup table would have more entries (~ 2256) than there are atoms on the planet earth (~2166) - so at least with our current level of technology it's "impossible" to hold such a table in memory or store it on any disk. Similarly, for your neural net to perform noticeably better than a dice-roll, the number of neurons you would need would probably also exceed the number of atoms on the planet.
So yes, it is computationally infeasible, but still theoretically possible. In fact it's true of cryptography in general that it's always possible to brute-force something in theory, but we say "good enough" when we can prove that doing so will require more time than the lifetime of the universe and more energy than contained in the sun.
I think the counter-argument is in response to:
We could through all the permutations and train the network since we know the inputs and expected outputs.
1) Is this fundamentally different than a lookup table?
2) SHA256 has an output space of 2256, and an input space that's essentially infinite. For reference, the time since the big bang is estimated to be 5 billion years, which is about 1.577 x 1027 nanoseconds, which is about 290 ns. So assuming each training iteration takes 1 ns, you would need 2166 ages of the universe to train your neural net.
The point here is that SHA256 has 2256 possible outputs, and 2256 is a really really really big number.