What is it? @.@

Here is the place where I record some tactics about wargame, systems, and other security issues.

2012-10-28

Bright Shadows - Programming 2: "Still solveable"

Description:

When you click on this link, you will get a text. XOR the text with "C12W4BERT954" and send the text to the solution page like in programming 1:
"http://www.bright-shadows.net/challenges/programming/xor/solution.php?solution="+XORed text
You have 2 seconds time.
________________   __________
|enter solution | | Check it!|
 ̄ ̄ ̄ ̄ ̄ ̄ ̄ ̄    ̄ ̄ ̄ ̄ ̄
Solution:
  1. Modify the code used in Programming 1.
  2. Below is the steps:
    (a) Visit the page link

    Visit: hxxp://www.bright-shadows.net/challenges/programming/xor/tryout.php

    (b) Open JavaScript Console of Chrome Developer Tools and send the following code.

    var jqlib = document.createElement('script');
    jqlib.src = "http://code.jquery.com/jquery-latest.min.js";
    document.getElementsByTagName('head')[0].appendChild(jqlib);

    $.ajax({
    url: 'http://www.bright-shadows.net/challenges/programming/xor/tryout.php',
    type: 'get',
    dataType: 'text',
    success:function(data){
    var strText=data.substring(16, data.length - 1);
    var strKey="C12W4BERT954";
    var strXOR="";
    for (i=0; i<strText.length; i=i+1)
    {
    strXOR += String.fromCharCode(strText.charCodeAt(i) ^ strKey.charCodeAt(i % strKey.length));
    }
    var newUrl="solution.php?solution="+strXOR;
    window.location.href=newUrl;
    }
    });
  3. The keyword is "heatsink", well done!

No comments:

Post a Comment