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

 

 


Tema destacado: Únete al Grupo Steam elhacker.NET


  Mostrar Mensajes
Páginas: 1 ... 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 [48] 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 ... 75
471  Programación / Programación Visual Basic / Re: Expulsar Dispositivo de almacenamiento USB por código en: 3 Julio 2008, 00:31 am
No es la misma pregunta.

Mira este codigo, te va a reaponder varias de tus dudas.

http://www.planetsourcecode.com/vb/scripts/ShowCode.asp?txtCodeId=67914&lngWId=1

Nota: No funciona 100% de las veces, te recomendaria qu elo usaes de guia y mejor buscate alguno en C que funcione bien, por que la verdad los que vi de VB no son del todo confiables
472  Programación / Programación Visual Basic / Re: [Source] IsVirtualPCPresent() - Sistema AntiVirtualPC en: 2 Julio 2008, 09:30 am
Me tome la libertad de modificar el code para detectar tambien Sun VirtualBox, lo testie en ubuntu corriendo un XP SP2

Código
  1. Function IsVirtualPCPresent() As Boolean
  2.    Dim DetectVirtualPC As String
  3.  
  4.    Set WMI = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2")
  5.    Set HDS = WMI.ExecQuery("Select * from Win32_DiskDrive")
  6.  
  7.    DetectVirtualPC = ""
  8.    For Each objHDS In HDS
  9.        DetectVirtualPC = DetectVirtualPC & objHDS.Caption & objHDS.Model & objHDS.PNPDeviceID
  10.    Next
  11.  
  12.    DetectVirtualPC = UCase(DetectVirtualPC)
  13.  
  14.    Select Case True
  15.        Case DetectVirtualPC Like "*VIRTUAL*"
  16.            IsVirtualPCPresent = True
  17.        Case DetectVirtualPC Like "*VBOX*"
  18.            IsVirtualPCPresent = True
  19.    End Select
  20.  
  21. End Function
  22.  
473  Programación / Programación Visual Basic / Re: Comparar Huellas Dactilares En VB en: 1 Julio 2008, 14:24 pm
Te recomendaria que en primer lugar leas como se analizan las huellas manualmente y despues intentes volcar esa logica a tu programa.
474  Programación / Programación Visual Basic / Re: [Source] IsSandboxiePresent() - Sistema AntiSanboxie en: 1 Julio 2008, 13:49 pm
Me puse a cureosear un poco despues de ver este post y vi otra manera de ver si nuestra aplicacion esta corriendo en una sandbox, no se que tan buena sera pero al parecer funciona correctamente con Sandboxie.

La mecanica es simple, todas las claves, archivos, semaforos, etc. son redireccionados por el sandbox, asi que simplemente escaneando las claves abiertas por nuetra aplicacion podemos ver que estan redireccionadas a la hive creada por el sandbox.

Lo dejo como curiosidad

Código
  1. '---------------------------------------------------------------------------------------
  2. ' Module      : mIsAppSandboxed
  3. ' DateTime    : 01/07/2008 08:32
  4. ' Author      : Cobein
  5. ' Mail        : cobein27@hotmail.com
  6. ' WebPage     : http://cobein27.googlepages.com/vb6
  7. ' Purpose     : Determine if the app is running into a sandbox
  8. ' Usage       : At your own risk
  9. ' Requirements: None
  10. ' Distribution: You can freely use this code in your own
  11. '               applications, but you may not reproduce
  12. '               or publish this code on any web site,
  13. '               online service, or distribute as source
  14. '               on any media without express permission.
  15. '
  16. ' Reference   :
  17. '
  18. ' History     : 01/07/2008 First Cut....................................................
  19. '---------------------------------------------------------------------------------------
  20. Option Explicit
  21.  
  22. Private Const STATUS_INFO_LENGTH_MISMATCH   As Long = &HC0000004
  23. Private Const HEAP_ZERO_MEMORY              As Long = &H8
  24.  
  25. Private Type SYSTEM_HANDLE
  26.    UniqueProcessId                         As Integer
  27.    CreatorBackTraceIndex                   As Integer
  28.    ObjectTypeIndex                         As Byte
  29.    HandleAttributes                        As Byte
  30.    HandleValue                             As Integer
  31.    pObject                                 As Long
  32.    GrantedAccess                           As Long
  33. End Type
  34.  
  35. Private Type SYSTEM_HANDLE_INFORMATION
  36.    uCount                                  As Long
  37.    aSH()                                   As SYSTEM_HANDLE
  38. End Type
  39.  
  40. Private Declare Function NtQuerySystemInformation Lib "NTDLL.DLL" (ByVal SystemInformationClass As Long, ByVal pSystemInformation As Long, ByVal SystemInformationLength As Long, ReturnLength As Long) As Long
  41. Private Declare Function NtQueryObject Lib "NTDLL.DLL" (ByVal ObjectHandle As Long, ByVal ObjectInformationClass As Long, ByVal ObjectInformation As Long, ByVal ObjectInformationLength As Long, ReturnLength As Long) As Long
  42. Private Declare Function GetCurrentProcessId Lib "kernel32" () As Long
  43. Private Declare Function lstrcpyW Lib "kernel32" (ByVal lpString1 As String, ByVal lpString2 As Long) As Long
  44. Private Declare Function lstrlen Lib "kernel32" Alias "lstrlenA" (ByVal lpString As String) As Long
  45. Private Declare Function GetProcessHeap Lib "kernel32" () As Long
  46. Private Declare Function HeapAlloc Lib "kernel32" (ByVal hHeap As Long, ByVal dwFlags As Long, ByVal dwBytes As Long) As Long
  47. Private Declare Function HeapFree Lib "kernel32" (ByVal hHeap As Long, ByVal dwFlags As Long, lpMem As Any) As Long
  48. Private Declare Sub CopyMemory Lib "kernel32.dll" Alias "RtlMoveMemory" (ByRef Destination As Any, ByRef Source As Any, ByVal Length As Long)
  49.  
  50. Public Sub Main()
  51.    MsgBox IsAppSandboxed
  52. End Sub
  53.  
  54. Public Function IsAppSandboxed() As Boolean
  55.    Dim lSize               As Long
  56.    Dim bvBuff()            As Byte
  57.    Dim tSHI                As SYSTEM_HANDLE_INFORMATION
  58.    Dim i                   As Long
  59.    Dim lPID                As Long
  60.  
  61.    lSize = 1024: ReDim bvBuff(lSize) 'this is because ReturnLength returns 0 :S
  62.    Do While NtQuerySystemInformation(16, VarPtr(bvBuff(0)), ByVal lSize, 0&) = _
  63.       STATUS_INFO_LENGTH_MISMATCH
  64.        lSize = lSize * 2
  65.        ReDim bvBuff(lSize)
  66.    Loop
  67.  
  68.    Call CopyMemory(tSHI.uCount, bvBuff(0), &H4)
  69.    ReDim tSHI.aSH(tSHI.uCount - 1)
  70.    Call CopyMemory(tSHI.aSH(0), bvBuff(4), (tSHI.uCount - 1) * 16)
  71.  
  72.    lPID = GetCurrentProcessId
  73.  
  74.    For i = 0 To tSHI.uCount - 1
  75.        If tSHI.aSH(i).UniqueProcessId = lPID Then 'Filter by local handles
  76.            If tSHI.aSH(i).ObjectTypeIndex = 20 Then 'Filter by Key
  77.                If InStr(1, GetLocalObjectName(tSHI.aSH(i).HandleValue), "SANDBOX_") Then
  78.                    IsAppSandboxed = True
  79.                    Exit for '<----EDIT
  80.                End If
  81.            End If
  82.        End If
  83.    Next
  84. End Function
  85.  
  86. Public Function GetLocalObjectName(ByVal lHandle As Long) As String
  87.    Dim lMem    As Long
  88.    Dim sPath   As String
  89.    Dim lSize  As Long
  90.  
  91.    lMem = HeapAlloc(GetProcessHeap, HEAP_ZERO_MEMORY, &H1000)
  92.    Call NtQueryObject(lHandle, 1, lMem, &H1000, lSize)
  93.    Call HeapFree(GetProcessHeap, 0, lMem)
  94.    If Not lSize > 8 Then Exit Function
  95.    sPath = Space(lSize)
  96.    Call lstrcpyW(sPath, lMem + &H8)
  97.    sPath = StrConv(sPath, vbFromUnicode)
  98.    GetLocalObjectName = Left$(sPath, lstrlen(sPath))
  99. End Function
  100.  
  101.  
475  Programación / Programación Visual Basic / Re: Controlar el uso de memorias USB en: 1 Julio 2008, 02:33 am
Podes descargar un ejemplo funcional de aca

USB detection.zip on UpSourceCode.com.ar


Edit reemplaza las comas por &
476  Programación / Programación Visual Basic / Re: [Source] IsVirtualPCPresent() - Sistema AntiVirtualPC en: 1 Julio 2008, 00:47 am
Un comentario acerca del code, seria coveniente agregar control de errores porque en algunos sistemas al tratar de acceder a WMI nos da error. Por lo me nos en vista con una cuenta restringida.
477  Programación / Programación Visual Basic / Re: [Source] IsVirtualPCPresent() - Sistema AntiVirtualPC en: 30 Junio 2008, 22:30 pm
Muy interesante, me preguntaba si no hay una manera un poco mas "general" de detectar este tipo de soft?
478  Programación / Programación Visual Basic / Re: Inyeccion DLL en: 29 Junio 2008, 20:36 pm
Probe hacer lo que decis E0N de cargar la libreria de VB pero ... no me funciono, si a alguien le funciona bienvenido es un ejemplo.
479  Programación / Programación Visual Basic / Re: Inyeccion DLL en: 29 Junio 2008, 06:58 am
La verdad que no tengo nada, pero te puedo decir algunas

Las apis en el caso de que las uses las tenes que meter en un type library

Las funciones de VB mas que nada las de manejo de cadenas NO FUNCIONAN

Tene en cuenta que no podes usar nada que dependa de las librerias de VB porque sino al inyectar la libreria va a hacer referencia a la libreria de VB la cual posiblemente no este cargada en la memoria del proceso inyectado

podes usar apis y cosas como if select case y alguna que otra cosa mas pero es bastante limitado, tenes que manejarte mas que nada con APIs.

Si buscas en este foro vas a ver ejemplos que deje.
480  Programación / Programación Visual Basic / Re: Inyeccion DLL en: 29 Junio 2008, 00:24 am
Si se pueden hacer dll en VB para inyectar, no es una tara simple pero siendo cuidadoso se pueden hacer. Necesitas un control de compilador y seguir algunas reglas al programar nada mas.
Páginas: 1 ... 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 [48] 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 ... 75
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines