pentesting, updated

Testing for Format String Injection

Check whether user input reaches a format-string function directly, in older C/C++-backed components.

Goal

Confirm user input never becomes the format argument itself in a printf-family call.

How to test

Relevant mainly in native/C-backed components. Submit format specifiers as input and watch for a crash or memory leak in the response:

%x%x%x%x%x%x%x%x
%n%n%n%n
%s%s%s%s

What to look for

A crash, garbage memory content in the response, or an obvious behavior change when format specifiers are submitted.

Notes

Uncommon in modern web stacks (mostly managed languages) — check quickly on native components (embedded devices, legacy CGI) and move on otherwise.

References

§ home
~/knubertus/home/
1,1 Top