CorpusCallosum
CorpusCallosum

Reputation: 189

C# changes my http request pattern

I am having some trouble with sending http request on C# (.net 4)

for example, assume that i am trying to send a request includes "/../../../../../etc/passwd"

when i examined the request by using proxy, I realized that my request had been changed to GET /etc/passwd. "/../" part of my request disappeared. I thought that is because of framework control.

How can I send my raw request without any control done by .net framework ?

Do you have any idea ?

Upvotes: 0

Views: 175

Answers (1)

Simon Bartlett
Simon Bartlett

Reputation: 2030

"/../../../../../etc/passwd" gets turned into "/etc/passwd"

because you have started the URL with the "/" character which indicates the URL is starting from the root of the server; and you obviously can not go up any more levels from the root - as you're at the highest level already.

If there is more to the URL, then please post that up too.

Upvotes: 2

Related Questions