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

 

 


Tema destacado: Estamos en la red social de Mastodon


  Mostrar Mensajes
Páginas: 1 ... 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 [31] 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 ... 72
301  Programación / .NET (C#, VB.NET, ASP) / Re: Librería de Snippets para VB.NET !! (Compartan aquí sus snippets) en: 11 Mayo 2019, 00:51 am
VM Detector class

Una Pequeña class que codee para detectar la ejecución en maquinas virtuales.


 

Link (Actualizado) : AntiVM Class



Como usar ?

Agregar 1 Timer

Código
  1. Public ProtectVM As AntiVM = New AntiVM
  2.  
  3.    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  4.        ProtectVM.VM_Start()
  5.        Anti_VM_Timer.Enabled = True
  6.    End Sub
  7.  
  8.    Private Sub Anti_VM_Timer_Tick(sender As Object, e As EventArgs) Handles Anti_VM_Timer.Tick
  9.        Dim Detection As Boolean = ProtectVM.IsVirtualMachinePresent
  10.        Dim Description As String = ProtectVM.DescriptcionVM
  11.  
  12.        If Detection = True Then
  13.           msgbox("VM detectada : " & Description)
  14.        End If
  15.  
  16.    End Sub
  17.  
302  Programación / .NET (C#, VB.NET, ASP) / Funcion calloc() en vb.net? en: 10 Mayo 2019, 16:08 pm
Hola, bueno como dice el titulo, no encuentro como declarar esa funcion en vb.net. espero que me puedan ayudar gracias de antemano, la necesito para este code :

Código
  1. <DllImport("msvcrt.dll", EntryPoint:="memcpy", CallingConvention:=CallingConvention.Cdecl)> _
  2.    Public Shared Sub CopyMemory(ByVal dest As IntPtr, ByVal src As IntPtr, ByVal count As Integer)
  3.    End Sub
  4.  
  5.  
  6.  
  7.    Private Function GetMutexString() As String
  8.  
  9.        Dim lpMutexStr As String = calloc(64, 1)
  10.        Dim s() As Byte = {&H98, &H9B, &H99, &H9D, &HC3, &H15, &H6F, &H6F, &H2D, &HD3, &HEA, &HAE, &H13, &HFF, &H7A, &HBE, &H63, &H36, &HFC, &H63, &HF3, &H74, &H32, &H74, &H71, &H72, &H4E, &H2, &H81, &H1E, &H19, &H20, &H44, &HDF, &H81, &HD7, &H15, &H92, &H93, &H1A, &HE7}
  11.        Dim Sizes As Integer = Marshal.SizeOf(s(0)) * s.Length
  12.        Dim pnt1 As IntPtr = Marshal.AllocHGlobal(Sizes)
  13.        Dim m As UInteger = 0
  14.        Do While m < Len(s)
  15.            Dim c As Byte = s(m)
  16.            c -= &HE8
  17.            c = ((c >> &H5) Or (c << &H3))
  18.            c = -c
  19.            c += &H51
  20.            c = Not c
  21.            c -= &H93
  22.            c = ((c >> &H3) Or (c << &H5))
  23.            c += &H14
  24.            c = c Xor &H14
  25.            c = ((c >> &H1) Or (c << &H7))
  26.            c = c Xor &HD3
  27.            c += m
  28.            c = Not c
  29.            c = ((c >> &H5) Or (c << &H3))
  30.            c -= &H2B
  31.            s(m) = c
  32.            m += 1
  33.        Loop
  34.  
  35.        CopyMemory(lpMutexStr, pnt1, Len(s))
  36.        Return lpMutexStr
  37.    End Function

Intento pasar este code de Anti-Debug a VB.NET .

Código
  1. #include <stdio.h>
  2. #include <windows.h>
  3. #include <tchar.h>
  4. #include <psapi.h>
  5.  
  6. typedef enum { ThreadHideFromDebugger = 0x11 } THREADINFOCLASS;
  7.  
  8. typedef NTSTATUS(WINAPI *NtQueryInformationThread_t)(HANDLE, THREADINFOCLASS, PVOID, ULONG, PULONG);
  9. typedef NTSTATUS(WINAPI *NtSetInformationThread_t)(HANDLE, THREADINFOCLASS, PVOID, ULONG);
  10.  
  11. VOID ThreadMain(LPVOID p);
  12. LPSTR GetMutexString();
  13.  
  14. VOID WINAPI init_antidbg(PVOID DllHandle, DWORD Reason, PVOID Reserved)
  15. {
  16.    //Deobfuscate our mutex and lock it so our child doesnt execute this TLS callback.
  17.    unsigned char s[] =
  18.    {
  19.  
  20.        0x9d, 0x3, 0x3c, 0xec, 0xf0, 0x8b, 0xb5, 0x5,
  21.        0xe2, 0x2a, 0x87, 0x5, 0x64, 0xe4, 0xf8, 0xe7,
  22.        0x64, 0x29, 0xd2, 0x6, 0xad, 0x29, 0x9a, 0xe0,
  23.        0xea, 0xf9, 0x2, 0x7d, 0x31, 0x72, 0xf7, 0x33,
  24.        0x13, 0x83, 0xb, 0x8f, 0xae, 0x2c, 0xa7, 0x2a,
  25.        0x95
  26.    };
  27.  
  28.    for (unsigned int m = 0; m < sizeof(s); ++m)
  29.    {
  30.        unsigned char c = s[m];
  31.        c = (c >> 0x7) | (c << 0x1);
  32.        c ^= m;
  33.        c = (c >> 0x5) | (c << 0x3);
  34.        c += 0xa9;
  35.        c = ~c;
  36.        c += 0xd6;
  37.        c = -c;
  38.        c += m;
  39.        c = ~c;
  40.        c = (c >> 0x5) | (c << 0x3);
  41.        c -= m;
  42.        c = ~c;
  43.        c += m;
  44.        c ^= m;
  45.        c += m;
  46.        s[m] = c;
  47.    }
  48.  
  49.    HANDLE hMutex = CreateMutexA(NULL, TRUE, s);
  50.  
  51.    // We don't want to empty the working set of our child process, it's not neccessary as it has a debugger attached already.
  52.    if (GetLastError() == ERROR_ALREADY_EXISTS)
  53.    {
  54.        return;
  55.    }
  56.  
  57.    /*
  58.         CODE DESCRIPTION:
  59.         The following code is reponsible for preventing the debugger to attach on parent process at runtime.
  60.     */
  61.    SIZE_T min, max;
  62.    SYSTEM_INFO si = { 0 };
  63.  
  64.    GetSystemInfo(&amp;si);
  65.  
  66.    K32EmptyWorkingSet(GetCurrentProcess());
  67.  
  68.    void *p = NULL;
  69.    while (p = VirtualAllocEx(GetCurrentProcess(), NULL, si.dwPageSize, MEM_COMMIT | MEM_RESERVE, PAGE_NOACCESS))
  70.    {
  71.        if (p == NULL)
  72.            break;
  73.    }
  74.    /*
  75.         DESCRIPTION END
  76.     */
  77.  
  78.  
  79.    /*
  80.         CODE DESCRIPTION:
  81.         The following code is responsible for handling the application launch inside a debbuger and invoking a crash.
  82.     */
  83.    NtQueryInformationThread_t fnNtQueryInformationThread = NULL;
  84.    NtSetInformationThread_t fnNtSetInformationThread = NULL;
  85.  
  86.    DWORD dwThreadId = 0;
  87.    HANDLE hThread = CreateThread(NULL, 0, (LPTHREAD_START_ROUTINE)ThreadMain, NULL, 0, 0, &amp;dwThreadId);
  88.  
  89.    HMODULE hDLL = LoadLibrary("ntdll.dll");
  90.    if (!hDLL) return -1;
  91.  
  92.    fnNtQueryInformationThread = (NtQueryInformationThread_t)GetProcAddress(hDLL, "NtQueryInformationThread");
  93.    fnNtSetInformationThread = (NtSetInformationThread_t)GetProcAddress(hDLL, "NtSetInformationThread");
  94.  
  95.    if (!fnNtQueryInformationThread || !fnNtSetInformationThread)
  96.        return -1;
  97.  
  98.    ULONG lHideThread = 1, lRet = 0;
  99.  
  100.    fnNtSetInformationThread(hThread, ThreadHideFromDebugger, &amp;lHideThread, sizeof(lHideThread));
  101.    fnNtQueryInformationThread(hThread, ThreadHideFromDebugger, &amp;lHideThread, sizeof(lHideThread), &amp;lRet);
  102.    /*
  103.         DESCRIPTION END
  104.     */
  105. }
  106.  
  107.  
  108. // Usually what happens is that person who does the analysis doesn't have a breakpoint set for TLS.
  109. // (It's not set ON by default in x64dbg)
  110. #pragma comment(linker, "/INCLUDE:__tls_used") // We want to include TLS Data Directory structure in our program
  111. #pragma data_seg(push)
  112. #pragma data_seg(".CRT$XLAA")
  113. EXTERN_C PIMAGE_TLS_CALLBACK p_tls_callback1 = init_antidbg; // This will execute before entry point and main function.
  114. #pragma data_seg(pop)
  115.  
  116.  
  117. int main(int argc, char *argv[])
  118. {
  119.    // Beging by deobfuscating our mutex.
  120.    HANDLE hMutex = CreateMutexA(NULL, TRUE, GetMutexString());
  121.  
  122.    if (GetLastError() == ERROR_ALREADY_EXISTS) {
  123.        // We are a spawn, run normally
  124.        printf("[+] Normal execution.\n");
  125.        getchar();
  126.        return 0;
  127.    }
  128.    else {
  129.        // We are the first instance
  130.        TCHAR szFilePath[MAX_PATH] = { 0 };
  131.        GetModuleFileName(NULL, szFilePath, MAX_PATH);
  132.  
  133.        PROCESS_INFORMATION pi = { 0 };
  134.        STARTUPINFO si = { 0 };
  135.        si.cb = sizeof(STARTUPINFO);
  136.  
  137.        // Create child process
  138.        CreateProcess(szFilePath, NULL, NULL, NULL, FALSE, DEBUG_PROCESS | DEBUG_ONLY_THIS_PROCESS | CREATE_NEW_CONSOLE, 0, NULL, &amp;si, &amp;pi);
  139.        if (pi.hProcess != NULL) {
  140.            printf("[+] Spawning child process and attaching as a debugger.\n");
  141.  
  142.            // Debug event
  143.            DEBUG_EVENT de = { 0 };
  144.            while (1)
  145.            {
  146.                WaitForDebugEvent(&amp;de, INFINITE);
  147.                // We only care about when the process terminates
  148.                if (de.dwDebugEventCode == EXIT_PROCESS_DEBUG_EVENT)
  149.                    break;
  150.                // Otherwise ignore all other events
  151.                ContinueDebugEvent(pi.dwProcessId, pi.dwThreadId, DBG_CONTINUE);
  152.            }
  153.        }
  154.  
  155.        CloseHandle(pi.hProcess);
  156.        CloseHandle(hMutex);
  157.    }
  158.  
  159.    return 0;
  160. }
  161.  
  162. LPSTR GetMutexString()
  163. {
  164.    LPSTR lpMutexStr = calloc(64, 1);
  165.    unsigned char s[] =
  166.    {
  167.  
  168.        0x98, 0x9b, 0x99, 0x9d, 0xc3, 0x15, 0x6f, 0x6f,
  169.        0x2d, 0xd3, 0xea, 0xae, 0x13, 0xff, 0x7a, 0xbe,
  170.        0x63, 0x36, 0xfc, 0x63, 0xf3, 0x74, 0x32, 0x74,
  171.        0x71, 0x72, 0x4e, 0x2, 0x81, 0x1e, 0x19, 0x20,
  172.        0x44, 0xdf, 0x81, 0xd7, 0x15, 0x92, 0x93, 0x1a,
  173.        0xe7
  174.    };
  175.  
  176.    for (unsigned int m = 0; m < sizeof(s); ++m)
  177.    {
  178.        unsigned char c = s[m];
  179.        c -= 0xe8;
  180.        c = (c >> 0x5) | (c << 0x3);
  181.        c = -c;
  182.        c += 0x51;
  183.        c = ~c;
  184.        c -= 0x93;
  185.        c = (c >> 0x3) | (c << 0x5);
  186.        c += 0x14;
  187.        c ^= 0x14;
  188.        c = (c >> 0x1) | (c << 0x7);
  189.        c ^= 0xd3;
  190.        c += m;
  191.        c = ~c;
  192.        c = (c >> 0x5) | (c << 0x3);
  193.        c -= 0x2b;
  194.        s[m] = c;
  195.    }
  196.    memcpy(lpMutexStr, s, sizeof(s));
  197.    return lpMutexStr;
  198. }
  199.  
  200. VOID ThreadMain(LPVOID p)
  201. {
  202.    while (1)
  203.    {
  204.        if (IsDebuggerPresent())
  205.        {
  206.            __asm { int 3; }
  207.        }
  208.        Sleep(500);
  209.    }
  210.    return 0;
  211. }
  212. }
303  Programación / Scripting / Re: [BATCH-SCRIPT] Necesitaria Ayuda en script en batch . en: 1 Mayo 2019, 00:18 am
1) un POP-UP en batch? xddd .
2) añadir gift en la consola? una imagen si te lo creo hay una herramienta comandline que te permite hacer eso.

Estoy creando un script

3) Muestra código.

4) Sin mentira, Podrías crear el POP-UP con VB.NET en menos de 3m.
304  Programación / Scripting / Re: ¿Interfaz? en: 19 Abril 2019, 02:47 am
Tengo entendido q para Phython esta Tkinter.

Pag de descarga :

Link
305  Programación / Ingeniería Inversa / [UnpackMe] Pon a prueba tus habilidades! en: 14 Abril 2019, 02:10 am
Antes que nada un amigo mio de discord lo hizo, espero lo que lo puedan resolver. salu2



PLATAFORMA: Windows x86 & x64.
DIFICULTAD: ¿¿??.
LENGUAJE: CSharp.
OBJETIVO: Conseguir la clave y arreglar completamente el ejecutable.
INFORMACIÓN: Se puede abrir en VM y utilizar cualquier tipo de herramienta, no hay reglas.

DESCARGA: UnpackMe - AnonFile
VIRUSTOTAL: 26/72


306  Programación / .NET (C#, VB.NET, ASP) / Re: [SOURCE-CODE] Real D3D Menu in VB.NET en: 12 Abril 2019, 05:10 am
ups, no xd. ahora lo pruebo. tal vez mañana. y edito este pots para decir como me fue.

oie tu programas en c++ no? seria genial que se agregara compatibilidad con directx 10 y 11 a esa api xd . es solo un comentario.

Por cierto gracias por comentar



Edición, Probé el code que me pusiste. pero no funciono.

A continuación lo q hice:


Clase - ACCENTPOLICY.vb

Código
  1. Imports System
  2.  
  3. Public Class ACCENTPOLICY
  4.  
  5.    Public nAccentState As Integer
  6.  
  7.    Public nFlags As Integer
  8.  
  9.    Public nColor As Integer
  10.  
  11.    Public nAnimationId As Integer
  12. End Class
  13.  
  14. Public Class WINCOMPATTRDATA
  15.  
  16.    Public nAttribute As Integer
  17.  
  18.    Public pData As Object
  19.  
  20.    Public ulDataSize As UInteger
  21. End Class
  22.  
  23. Public Class Funcs
  24.  
  25.    Public Delegate Function pSetWindowCompositionAttribute(ByVal UnnamedParameter As System.IntPtr, ByVal UnnamedParameter2 As WINCOMPATTRDATA) As Boolean
  26.  
  27.  
  28.    Friend Declare Function SetWindowCompositionAttribute Lib "user32.dll" (ByVal UnnamedParameter As System.IntPtr, ByVal UnnamedParameter2 As WINCOMPATTRDATA) As Boolean
  29.  
  30.    Public Shared Sub SetWindowTransparent(ByVal hWnd As IntPtr)
  31.        Dim hModule As IntPtr = New IntPtr
  32.        If hModule Then
  33.            Dim SetWindowCompositionAttribute As pSetWindowCompositionAttribute = SetWindowCompositionAttribute
  34.            If (Not (SetWindowCompositionAttribute) Is Nothing) Then
  35.                Dim policy As ACCENTPOLICY = New ACCENTPOLICY
  36.                ' ACCENT_ENABLE_TRANSPARENTGRADIENT=2...
  37.                Dim data As WINCOMPATTRDATA = New WINCOMPATTRDATA
  38.                ' WCA_ACCENT_POLICY=19
  39.                SetWindowCompositionAttribute(hWnd, data)
  40.            End If
  41.  
  42.        End If
  43.  
  44.    End Sub
  45.  
  46. End Class
  47.  
  48.  

Form1.vb


Código
  1. Imports WindowsApplication4.ACCENTPOLICY
  2.  
  3. Public Class Form1
  4.  
  5.  
  6.    Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal Classname As String, ByVal WindowName As String) As IntPtr
  7.    Public Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hWnd As IntPtr, ByRef lpdwProcessId As Integer) As Integer
  8.    Public Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Integer, ByVal bInheritHandle As Integer, ByVal dwProcessId As Integer) As IntPtr
  9.    Public Declare Function CloseHandle Lib "kernel32" (ByVal hObject As IntPtr) As Integer
  10.    Public Const PROCESS_VM_ALL As Integer = &H1F0FFF
  11.    Public hWnd As IntPtr, pHandle As IntPtr, processID As Integer
  12.    Const ProcessName As String = "hl2"
  13.  
  14.  
  15.    Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
  16.  
  17.        If ProcessHack() = 1 Then
  18.            WindowsApplication4.Funcs.SetWindowTransparent(pHandle)
  19.        End If
  20.  
  21.    End Sub
  22.  
  23.    Private Function ProcessHack() As Integer
  24.        Dim proc As Process() = Process.GetProcessesByName(ProcessName)
  25.        Dim windowname As String
  26.        windowname = proc(0).MainWindowTitle
  27.        hWnd = FindWindow(vbNullString, windowname)
  28.        GetWindowThreadProcessId(hWnd, processID)
  29.        pHandle = OpenProcess(PROCESS_VM_ALL, 0, processID)
  30.        If hWnd = 0 Then
  31.            Return 0
  32.        Else
  33.            Return 1
  34.        End If
  35.    End Function
  36.  
  37.  
  38. End Class

Bueno al menos lo intente .-.
307  Programación / .NET (C#, VB.NET, ASP) / [SOURCE-CODE] Real D3D Menu en VB.NET en: 12 Abril 2019, 03:19 am
Bueno después de buscar en vano como superponer forms en juegos de pantallas completa  y no encontrar nada, Me resigne a usar la api q Comparti hace tiempo : VB.NET Overlay in Games Full Screen

Bueno hice un mini menu D3D con ella, Solo funciona con juegos que usan Directx 9.

Obiamente si funciona con los juegos en pantalla completa.

Link : DirectX-Menu-Game


308  Programación / Scripting / Re: .batch para buscar archivo y copiarlo a otra ruta en: 8 Abril 2019, 15:14 pm
Código
  1. if exist %cadena% copy %cadena% "d:\carpeta_destino"
309  Programación / Scripting / Re: Esteganografía EOF [BATCH] en: 8 Abril 2019, 04:18 am
Bueno primero q nada, yo intente algo parecido de varias maneras. pero no evitaras q los bytes se corrompan. a menos q uses herramientas externas. en mi caso opte por la comandline de winrar. con eso lo lograras fácilmente.

hechale un ojo a mi code :

[batch] [aporte] batch archive security v0.3
310  Programación / Scripting / Re: [Duda] BATCH : Cronometro con Historial de Tiempo en: 8 Abril 2019, 04:11 am
Bueno ya te respondieron arriba, el tienes q corregir lo de los segundos, siguen aumentando cuando llegan a 60.

Y Respondiendo a tu pregunta :

Código
  1. @echo off
  2. @mode con cols=30 lines=10
  3. if exist Registro.txt del Registro.txt >nul
  4. cls
  5. color 0a
  6.  
  7. set/a s=1
  8.  
  9. echo.
  10. echo Para Pausar El Cronometro
  11. echo Utiliza (Ctrl+C)
  12. echo.
  13. echo Pulsa cualquier tecla para
  14. echo iniciar
  15. pause>nul
  16.  
  17. :inicio
  18. cls
  19. echo.
  20. echo       °±² Cronometro ²±°
  21. echo.
  22. echo Segundos : %s%
  23. echo Minutos : %m%
  24. echo Horas : %h%
  25. timeout/t 1 /nobreak>nul
  26. set/a s+=1
  27. set/a m=s
  28. set/a m/=60
  29. set/a h=m
  30. set/a h/=60
  31. (
  32.  echo %s%
  33.   )>Registro.txt
  34. goto inicio
Páginas: 1 ... 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 [31] 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 ... 72
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines