Path: blob/dev/integration_tests/protocols/http/http-paths.yaml
2070 views
id: http-paths12info:3name: Test Http Path Edgecases4author: pd-team5severity: info6description: >7- https://github.com/projectdiscovery/nuclei/pull/32118- https://github.com/projectdiscovery/nuclei/pull/31279reference:10# adding expected results here for context and debugging11- "/1337?with=param"12- "/some%0A/%0D"13- "/%73%6f%6d%65%0A/%0D"14- "/%00test%20"15- "/text4shell/attack?search=$%7bscript:javascript:java.lang.Runtime.getRuntime().exec('nslookup%20{}.getparam')%7d"16- "/test/..;/..;/"17- "/xyz/%25u2s/%25invalid"18- "//CFIDE/wizards/common/utils.cfc"19# duplicating here because same results are expected even if http request is written in different format20- "/1337?with=param"21- "/some%0A/%0D"22- "/%73%6f%6d%65%0A/%0D"23- "/%00test%20"24- "/text4shell/attack?search=$%7bscript:javascript:java.lang.Runtime.getRuntime().exec('nslookup%20{}.getparam')%7d"25- "/test/..;/..;/"26- "/xyz/%25u2s/%25invalid"27- "//CFIDE/wizards/common/utils.cfc"2829# Test all templates with FullURLs30http:31- raw:32# relative path without leading slash with param33# If relative path does not have `/` prefix it is autocorrected34- |+35GET 1337?with=param HTTP/1.136Host: scanme.sh37# url encoded characters in path38- |+39GET /some%0A/%0D HTTP/1.140Host: scanme.sh41# percent encoded characters in path42# In URL encoding only key characters are encoded43# while in percent encoding all characters are url encoded (similar to burp decoder)44- |+45GET /%73%6f%6d%65%0A/%0D HTTP/1.146Host: scanme.sh47# test null and % chars in path48- |+49GET /%00test%20 HTTP/1.150Host: scanme.sh51# test payload integrity in parameter52- |+53GET /text4shell/attack?search=$%7bscript:javascript:java.lang.Runtime.getRuntime().exec('nslookup%20{}.getparam')%7d HTTP/1.154Host: scanme.sh55# test for missing trailing slash56- |+57GET /test/..;/..;/ HTTP/1.158Host: scanme.sh59Origin: {{BaseURL}}60# test relative path with invalid/corrupted characters61# In such case instead of error or panic nuclei escaped unsupported character (i.e /xyz/%25u2s/%25invalid)62# if template requires this condition to not escape unsupported characters. It can only be done in unsafe raw requests63- |+64GET /xyz/%u2s/%invalid HTTP/1.165Host: scanme.sh66# test relative path start with //67- |+68GET //CFIDE/wizards/common/utils.cfc HTTP/1.169Host: scanme.sh7071matchers:72- type: status73status:74- 20075# Same testcases as mentioned above but in path based request format76- method: GET77path:78- "{{BaseURL}}/1337?with=param"79- "{{BaseURL}}/some%0A/%0D"80- "{{BaseURL}}/%73%6f%6d%65%0A/%0D"81- "{{BaseURL}}/%00test%20"82- "{{BaseURL}}/text4shell/attack?search=$%7bscript:javascript:java.lang.Runtime.getRuntime().exec('nslookup%20{}.getparam')%7d"83- "{{BaseURL}}/test/..;/..;/"84- "{{BaseURL}}/xyz/%u2s/%invalid"85- "{{BaseURL}}//CFIDE/wizards/common/utils.cfc"8687matchers:88- type: status89status:90- 200919293