Uploading dangers

Stumbled over a good link? Post it here... (the board is flushed regularly)
Post Reply
User avatar
ayu
Staff
Staff
Posts: 8109
Joined: 27 Aug 2005, 16:00
18
Contact:

Uploading dangers

Post by ayu »

Since we have been talking about file uploading vulnerabilities pretty recently.
Here is my article about my work around that specific area.

http://blog.alcor.se/index.php/2014/08/ ... g-dangers/" onclick="window.open(this.href);return false;
"The best place to hide a tree, is in a forest"

User avatar
maboroshi
Dr. Mab
Dr. Mab
Posts: 1624
Joined: 28 Aug 2005, 16:00
18

Re: Uploading dangers

Post by maboroshi »

Interesting article. Actually pretty awesome, good work :D

User avatar
ayu
Staff
Staff
Posts: 8109
Joined: 27 Aug 2005, 16:00
18
Contact:

Re: Uploading dangers

Post by ayu »

maboroshi wrote:Interesting article. Actually pretty awesome, good work :D
Thanks :D
"The best place to hide a tree, is in a forest"

scatter
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 366
Joined: 01 Jan 2014, 05:22
10

Re: Uploading dangers

Post by scatter »

Nice one cats :) but we still couldn't solve this one http://code.suck-o.com/42565" onclick="window.open(this.href);return false; , I think this close to perfection

User avatar
ayu
Staff
Staff
Posts: 8109
Joined: 27 Aug 2005, 16:00
18
Contact:

Re: Uploading dangers

Post by ayu »

scatter wrote:Nice one cats :) but we still couldn't solve this one http://code.suck-o.com/42565" onclick="window.open(this.href);return false;" onclick="window.open(this.href);return false; , I think this close to perfection
Good that you reminded me.
Will take it with me to the office today and see if we can figure out how to break it.
"The best place to hide a tree, is in a forest"

scatter
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 366
Joined: 01 Jan 2014, 05:22
10

Re: Uploading dangers

Post by scatter »

thx coz even if it's just from a training material but I spent days trying to figure out a way but yet every time I remember it gives me headache :p

scatter
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 366
Joined: 01 Jan 2014, 05:22
10

Re: Uploading dangers

Post by scatter »

Ha finally bypassed shell.php%00.jpg the only thing it need is null bytes >.<

User avatar
ayu
Staff
Staff
Posts: 8109
Joined: 27 Aug 2005, 16:00
18
Contact:

Re: Uploading dangers

Post by ayu »

scatter wrote:Ha finally bypassed shell.php%00.jpg the only thing it need is null bytes >.<
Hmm that's strange.
That's an old vulnerability and was patched 3 years ago.
What version of PHP are you on?
"The best place to hide a tree, is in a forest"

scatter
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 366
Joined: 01 Jan 2014, 05:22
10

Re: Uploading dangers

Post by scatter »

using PHP 5.4.4

User avatar
ayu
Staff
Staff
Posts: 8109
Joined: 27 Aug 2005, 16:00
18
Contact:

Re: Uploading dangers

Post by ayu »

scatter wrote:using PHP 5.4.4
That's odd and interesting.
I'll take a look at that and see if it indeed still works in some cases.
"The best place to hide a tree, is in a forest"

User avatar
ayu
Staff
Staff
Posts: 8109
Joined: 27 Aug 2005, 16:00
18
Contact:

Re: Uploading dangers

Post by ayu »

Well my version is newer than yours ( PHP/5.5.9-1ubuntu4.3).
But it should have been patched in your version as well, so it's odd.
Either way I can't reproduce it locally.

As expected I only get a file named "test.php%00.jpg" that will be handle as a normal jpg.
"The best place to hide a tree, is in a forest"

Post Reply