I'm reading the question as:
- Prover knows a message (thus its SHA-256 hash, and message length), and position+length of a substring (thus the substring).
- Verifier knows the hash, the substring and its position (thus length), and message length.
Prover should demonstrate knowledge of a message with such SHA-256 hash and length and with such substring at such position, without revealing more information about such message.
This is possible: we define a variant of SHA-256 with fixed message length and fixed substring at fixed position. The problem then reduces to demonstrating knowledge of input of that hash to a verifier knowing the hash, which is covered in this question.
I do not know exactly how much info must be exchanged between prover and verifier.
A concrete implementation is described by Irene Giacomelli, Jesper Madsen, Claudio Orlandi, ZKBoo: Faster Zero-Knowledge for Boolean Circuits, in proceedings of SEC'2016.
34567
, nor if that can be revealed in the proof. But for all combinations of that, as long as the verifier knows and trusts the hash itself, and the message length is small and not confidential, I see no impossibility. Admitedly that's not possible with a black-box ideal hash, but SHA-256 is a public combinatorial function. $\endgroup$