String exploits

From Wikipedia, the free encyclopedia

Several implementation / design flaws are associated with string programming, some of those are associated with security exploits.


Contents

[edit] Concatenation problems

It is possible to cause String1 + User_Input_String + String2 to behave in unepected ways by by crafting unanticipated User_Input_String, such as having string2 ignored in processing.

[edit] String termination

In many environments, it is possible to truncate the string with clever input.

  • PHP: %00 (NUL) can terminate strings, when used for API calls that uses it to terminate strings.
  • Oracle: CHR(0) (NUL) can terminate strings when used for e.g. EXECUTE IMMEDIATE.

[edit] Comment out characters

In many environments, it is possible to "ask" the system to ignore the rest of the string, using "comment" characters.

  • Many languages: /* means ignore everything until a */ combination.
  • SQL: -- means ignore rest of line
  • Unix shells: # means ignore rest of line

[edit] See also (other string problems)