In stories, especially creepypasta, its sounds more like a magical contract than a piece of paper
Like if a private organisation hired you to kill people, a NDA doesn’t somehow make that legal and you can’t get sued for breaking the contract.
So, what is the legal extent of NDA?


The law overrides contacts, so if it’s something illegal, you can’t sue someone for breaking it if they testify in court with something covered by the NDA. You pretty much got that part.
That being said, the only other thing is that there has to be “consideration” - so you have to get something in exchange for agreeing to keep quiet.
Beyond that, there isn’t much holding back an NDA.