4:7

הֲלוֹא אִם־תֵּיטִיב שְׂאֵת וְאִם לֹא תֵיטִיב לַפֶּתַח חַטָּאת רֹבֵץ וְאֵלֶיךָ תְּשׁוּקָתוֹ וְאַתָּה תִּמְשָׁל־בּוֹ׃

Surely, if you do good, you will be lifted up. And if you do not do good, sin crouches at the door. Its desire is for you, but you can rule over it."

Bereshit 4:7

הֲלוֹא אִם־תֵּיטִיב שְׂאֵת

Bereshit / Genesis 4:7

הֲלוֹא אִם־תֵּיטִיב שְׂאֵת וְאִם לֹא תֵיטִיב לַפֶּתַח חַטָּאת רֹבֵץ וְאֵלֶיךָ תְּשׁוּקָתוֹ וְאַתָּה תִּמְשָׁל־בּוֹ׃

Surely, if you do good, you will be lifted up. And if you do not do good, sin crouches at the door. Its desire is for you, but you can rule over it."

Pshat פְּשָׁט

Sin lies at the door

Rashi reads "sin lies at the door" as "at the door of your grave your sin is kept", and "its desire is towards you" as the evil inclination (יֵצֶר הָרָע), which always longs to make you stumble. "And you shall rule over it": if you wish, you will overcome it. Sforno adds the words of the sages: a person's evil inclination gets the better of him every day, and were the Holy One, blessed is He, not helping him, he could not manage it. But a person can rule over it by the power of the image of the Almighty in him.

How Rashi and Sforno explain it

Remez רֶמֶז

Two desires

Kitzur Ba'al HaTurim notes: the word "its desire" (תְּשׁוּקָתוֹ) occurs twice in Scripture, here and in the Song of Songs, "his desire is towards me". From this come the words of the sages about two desires: the desire of the wicked for sin and the desire of the Holy One, blessed is He, for Israel. Kli Yakar recalls that the sages compared the evil inclination to a fly: a fly cannot bite through whole skin, but lands where there is already a wound and widens it. So the evil inclination is powerless against one who opened it no door, and strong where there is even a small breach.

How Kitzur Ba'al HaTurim and Kli Yakar explain it

Drash דְּרָשׁ

The guest who became the master

The midrash reads the words of the verse one after another. "If you do good, uplift": uplift as in Aharon's blessing, and if not, a curse. "Sin lies": it says "lies" in the masculine, not the feminine. At first sin is weak like a woman, then it grows strong like a man. Rabbi Akiva: at first like a spider's thread, in the end like a ship's rope. Rabbi Yitzchak: at first it is a guest, then the master of the house. Rabbi Abba: the evil inclination is like a robber at a crossroads, whom Avraham (Abraham) was the first to beat. And if the evil inclination has come to make you laugh, push it away with words of Torah: "for I have written for you in the Torah: its desire is towards you, and you shall rule over it".

How Bereshit Rabbah explain it

Sod סוֹד

Return is in your hand

Ramban explains: the evil inclination will long to cleave to you all your days, but you will rule over it if you wish to mend your ways and cast it off. With this the Almighty taught Kayin (Cain) return (תְּשׁוּבָה): it is given into a person's hand, one can return at any time one wishes, and he will be forgiven. The Zohar reads "the door" (פֶּתַח) as the door above, from which the judgements for the evil deeds of the world go out, "open for me the gates of righteousness", and "sin lies" at that door is the angel of death, who waits to exact payment from you.

How Ramban and Zohar explain it