Explain one of the challenges that a hacker faces when attempting to cause a segmentation fault by overflowing a buffer. Further, discuss the main ways in which an attacker can avoid detection of No Operations (NOPs) by an intrusion detection system, and examine the primary reasons why avoiding such detection is beneficial for executing the attack.