So before the Hebrew exodus from Egypt, nobody knew murder was wrong because they hadn't been told?
No, evil and good were obvious. The Great Flood was to rid the world of the evil that existed. The Commandments of God just codified it.
There’s a Bible verse in Romans that states “Gentiles, who do not have the law, do by nature things required by the law, they are a law for themselves, even though they do not have the law. They show that the requirements of the law are written on their hearts, their consciences also bearing witness, and their thoughts sometimes accusing them and at other times even defending them.”
So people by instinct tend to know what’s right and wrong. The commandments articulate what our conscious already knows.