Shellcode - Shellcode Encoding

Shellcode Encoding

Because most processes filter or restrict the data that can be injected, shellcode often needs to be written to allow for these restrictions. This includes making the code small, null-free or alphanumeric. Various solutions have been found to get around such restrictions, including:

  • Design and implementation optimizations to decrease the size of the shellcode.
  • Implementation modifications to get around limitations in the range of bytes used in the shellcode.
  • Self-modifying code that modifies a number of the bytes of its own code before executing them to re-create bytes that are normally impossible to inject into the process.

Since intrusion detection can detect signatures of simple shellcodes being sent over the network, it is often encoded, made self-decrypting or polymorphic to avoid detection.

Read more about this topic:  Shellcode