WCU / Cybersecurity
~/CSC 472/Class 04/KP 18
Class 04 · KP 18 / 18

Summary

  • Shellcode is small, position-independent, bad-byte-free machine code delivered as a payload.
  • The execve("/bin/sh") pattern: set RAX/RDI/RSI/RDX, build the path on the stack, syscall.
  • Get it via shellcraft/asm, msfvenom, or by hand.
  • Injection needs a writable and executable region — which NX / W^{}X / DEP remove.
  • Bad-char encoding fixes bytes, not executability; NX pushes real exploits toward ROP (Class 07).