It's a great midrash, but it's bad history. Cain and Abel could not have known what they could not have known. Nobody had ever died before, and certainly, nobody had ever committed murder. But hatred they knew. Hatred came into the world already in their parents' youth, when God set an eternal enmity, a constant antagonism between the serpent and the woman, throughout the generations.
Hatred is a very attractive emotion because it is tremendously empowering.
And it was hatred which impelled Cain to attack Abel. Cain was disappointed at the favor shown to his brother by God, a favor he felt he deserved himself. The Torah is vague about the nature of the difference between the two brothers' offerings. Commentators have parsed each phrase of the story, looking for the difference, but I think they miss the point. The kind of hatred borne of jealousy and insecurity which overwhelmed Cain is without rational cause.