Attacking AES using Round 1 output
Thanks to @kelalaka for pointing me in the right direction.

Let's say you're interested in finding all input pairs $(b^{i}_1, b^{i}_2)$ to the S-box for the input difference $k$ which generate some Hamming distance $l$. Here's how you do it : 


  
  Generate all input pairs such that $b^{i}_2 = b^{i}_1 \oplus k$
  Find out the corresponding output pairs $(f^{i}_1, f^{i}_2)$ and the Hamming distance between these pairs $l_j$.
  Collect all the input pairs $(b^{i}_1, b^{i}_2)$ for the Hamming distance $l$