Devilzc0de Forum Follow @devilzc0de
  • Home
  • Hacking
  • Networking
  • Programming
  • O.S
  • Server
  • Tweets
  • Search
  • Member List
  • Calendar
Current time: 05-24-2013, 03:56 PM Hello There, Guest! (Login — Register)
Devilzc0de Forum › Information Technology › Programming › Python v
« Previous 1 2 3 4

simple RAT with .py

Home General Computer Multimedia Business Lounge

Post Reply 
Tweet
Threaded Mode | Linear Mode
simple RAT with .py
11-17-2010, 03:08 PM
Post: #1
5ynL0rd Offline
DC Senior
***
Posts: 53
Joined: Oct 2010
Reputation: 14
simple RAT with .py
susah cari tools yg bisa remote ke komp kita yg lagi dirumah & under NAT? pake tools orang? atau buat dgn beberapa line of code saja?
see my simple code:

Code:
#!/usr/bin/python
# simple remote administration tools (support under NAT client)
# you must have free/non-free hosting support FTP
# c0der: 5ynL0rd
# http://voidnetwork.org

#---------------------------server side (listener.py)----------------------------------
import urllib, os, time, sys

def main():
    host = raw_input('FTP host: ')
    urlfile = 'http://'+host+'/c0mm4nd.txt'
    delay = 3
    cek_length = ['']
    while 1:
        conn = urllib.urlopen(urlfile)
        reader = conn.readlines()
        length = len(reader)
        if cek_length[0] != length:
            if cek_length[0] == '':
                pass
            else:
                os.system(reader[-1][:-1])
        else:
            pass
        cek_length[0] = length
        time.sleep(delay)

if __name__ == '__main__':
    try:
        ch = os.fork()
        if ch > 0:
            print 'Daemon PID: %d' %ch
            sys.exit(0)
    except OSError, e:
        sys.exit(1)
    main()

#---------------------------commander side (commander.py)----------------------------------
#!/usr/bin/python
from getpass import getpass
import ftplib, os, sys

def upload(ftp, dir, file):
    ext = os.path.splitext(file)[1]
    if ext in (".txt", ".htm", ".html"):
        ftp.storlines("STOR %s%s"%(dir,file), open(file))
    else:
        ftp.storbinary("STOR %s%s"%(dir,file), open(file, "rb"), 1024)

if __name__ == '__main__':
    hostname = raw_input('FTP hostname: ')
    username = raw_input('username: ')
    passwd = getpass('password: ')
    directory = raw_input('root dir (ex: /htdocs/): ')
    try:
        auth = ftplib.FTP(hostname)
        auth.login(username,passwd)
    except:
        print "failed login!"
        sys.exit(0)
    else:
        print "login session activated"
        while 1:
             archive = open('c0mm4nd.txt','a')
             cmd = raw_input('command : ')
             archive.write(cmd+'\n')
             archive.close()
             upload(auth, directory, 'c0mm4nd.txt')
hanya butuh ftp server gretongan (hosting free yg support ftp), remote yg simpel2 pun bisa diatasi meskipun kondisi komp yg kita remote ketutup NAT / private IP.

mungkin cukup jelas kan alur code nya? :) simple bukan.. silahkan dimodif sesuai kebutuhan.

regards:
5ynL0rd
Visit this user's website Find all posts by this user
Quote this message in a reply
11-17-2010, 03:53 PM
Post: #2
supermenganteng Offline
SPA Holic
********
Jendral Team
Posts: 1,961
Joined: Jun 2010
Reputation: -188
RE: simple RAT with .py
ane ijin coba om lord.... thnxs for share
Find all posts by this user
Quote this message in a reply
11-17-2010, 04:14 PM
Post: #3
chaer.newbie Offline
--------------------------
*****
Dewa
Posts: 5,283
Joined: Dec 2009
Reputation: 184
RE: simple RAT with .py
anjrit

-_- keeren
Find all posts by this user
Quote this message in a reply
11-17-2010, 04:32 PM
Post: #4
5ynL0rd Offline
DC Senior
***
Posts: 53
Joined: Oct 2010
Reputation: 14
RE: simple RAT with .py
jgn lupa listener.py execute lwt sudo ya, command2 linuxnya kan ada beberapa yg harus sudo (yah kurang2nya atur2 lah, yakin pada bisa :))
Visit this user's website Find all posts by this user
Quote this message in a reply
11-18-2010, 10:35 AM
Post: #5
fernando Offline
./Devilz 1st Cadet
Posts: 27
Joined: Jul 2010
Reputation: 0
RE: simple RAT with .py
thank's bro atas code nya...ini sangant membantu gw
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


Topic Tools
Topic Link :
BBCode :
HTML Code :
View a Printable Version Send Thread to a Friend Subscribe to this thread
Submit Google Submit Face book Submit to Digg Submit to Reddit Submit to Furl Submit to Del.icio.us Submit to Jeqq

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  New tool from indonesianbacktrack - simple phpmyadmin dictionary attack mywisdom 3 231 01-10-2013 08:16 PM
Last Post: haXna
  simple python.cgi buat back connect ev1lut10n 6 1,683 10-27-2012 08:58 AM
Last Post: sec0day
  [cherrypy]simple buat web schumbag 14 1,601 07-21-2012 07:01 AM
Last Post: monyett
  Simple Python Keylogger ubuntux 9 1,014 06-24-2012 07:49 AM
Last Post: ubuntux
  Simple Network Intrussion Prevention System (Ping Flooding Case) 5ynL0rd 9 631 04-27-2012 07:52 PM
Last Post: 5ynL0rd
  Simple Network Intrussion Detection System with .py 5ynL0rd 7 1,983 01-20-2011 04:44 PM
Last Post: pyhx0r
  voidbot (IRC bot simple example with python) 5ynL0rd 8 2,457 11-29-2010 11:01 AM
Last Post: mariachi

Users Browsing
1 Guest(s)

  • Contact Us
  • devilzc0de
  • Return to Top
  • Mobile Version
  • RSS Syndication
  • Help
Current time: 05-24-2013, 03:56 PM Powered By MyBB, © 2002-2013 MyBB Group. Theme created by Justin S. | Mixed By Chaer.Newbie | Fixed By Aditya

USING THIS SITE INDICATES THAT YOU HAVE READ AND ACCEPT OUR TERMS. IF YOU DO NOT ACCEPT THESE TERMS, YOU ARE NOT AUTHORIZED TO USE THIS SITE