![]() |
|
[TuT] - File Upload to Persistent XSS - [TuT] - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Hacks, Exploits, and Various Discussions (https://hackforums.net/forumdisplay.php?fid=45) +--- Forum: Grayhat • Purple Team • Hybrid Security (https://hackforums.net/forumdisplay.php?fid=449) +---- Forum: Website Hacking (https://hackforums.net/forumdisplay.php?fid=43) +---- Thread: [TuT] - File Upload to Persistent XSS - [TuT] (/showthread.php?tid=2078731) Pages: Pages
1
2
|
[TuT] - File Upload to Persistent XSS - [TuT] - zer0pwn - Jan 3, 2012 [TuT] - File Upload to Persistent XSS - [TuT] Hi guys, I made a tutorial sort of like this this morning. Except it's with HTML Forms to persistent XSS. In this tutorial, I'll be explaining how you can get persistent XSS from a simple file upload. You can do it with any file extension too (prefferably an image file (.png, .jpg)). This is sort of the same method as in my other tutorial, we will need Tamper Data again.
So first of all, let's find a vulnerable page. I'm not sure if this method is public or not (I'm sure it is, because it's not a bad idea, except I haven't seen it around). I actually tested this method on an XSS challenge made by a friend of mine (ring0_). Once you've found a vulnerable site (It'll be hard to tell if it's vulnerable or not though.) open select your file. I will choose a file "TrollFaic.png". I actually have that file on my PC, and I do use it for this LOL. Now, open tamper data, and start tampering. Once you find the right request to edit, edit it. Change the file name to "<img src=javascript:alert("XSS");>.png". If a broken image pops up instead of an alert, use this vector: "<img src="XSS" onerror=alert("XSS");>.png". That should do it. As long as the file stays there, it should keep shooting up alert boxes. If you have any questions, requests, or comments, just PM me and I'll get back to you as soon as I can! Thanks for reading this tutorial! * - FastFive - Jan 3, 2012 good tutorial... going to try this soon. * - 1n54n3 - Jan 3, 2012 Good tutorial mate. Trying to do this one too. * - Ichi - Jan 3, 2012 Once again, great tut bro. Keep em coming * - rAtoN - Jan 3, 2012 Can you put images and a example of a shell lol * - .Satan - Jan 3, 2012 Do you have a website to use as an example? * - zer0pwn - Jan 3, 2012 http://onlinescan.avast.com/ Try that for now :D * - .Satan - Jan 3, 2012 Couldnt find the thing to edit within the time before the scanner said file to big :( also http://vscan.novirusthanks.org/analysis/68582323963312c8d7fd766d026e603f/aW1nLXNyYy1qYWxlcnQteHNzLXBuZw==/ didnt work, would hex bypassing work? * - zer0pwn - Jan 3, 2012 It might, I'll try it. That's a good idea :) * - bluebknight - Jan 5, 2012 You can also upload the file first and then use the rename function to rename to something like the OP posted. My mediafire XSS worked like that. * - Girby2K11 - Jan 5, 2012 Nice tutorial, clearly explained. Well done. * - IHateMyOldUsername - Jan 5, 2012 Thanks for posting this it helped alot! * - BeggFoMercy - Jan 5, 2012 Really great and hard work mate keep it up <3 * - rand0 - Jan 5, 2012 Heheh :) This makes a lot of sense, working off of the old IMG xss vector. Nicely done. I never thought of this. * - Ashutosh.panda - Jul 6, 2012 can you plz detailly expalin how to open a image file and edit it to test xss |