Foro de elhacker.net

Programación => Programación Visual Basic => Mensaje iniciado por: skyweb07 en 20 Agosto 2009, 21:18 pm



Título: iUAC Disabler
Publicado por: skyweb07 en 20 Agosto 2009, 21:18 pm
Hola a todos chic@s, pues les cuento que estaba navegando por internet aburrido buscando una función para apagar el UAC, entonces me encontre con un foro que decia como apagar el UAC pero en muchos pasos :p, por lo que me puse a ver como hacer algo bonito para poder apagar el puñetero UAC que nos molesta tanto... Los métodos que hize son muy simples... Lo primero es verificar si tenemos permisos para modificar el registro y si no lo tenemos intentamos darnos esos permisos, luego desabilitamos el mensaje de informacion que sale cuando se desabilita el UAC , finalmente desabilitamos el UAC cambiando el valor en el registro ... Si es algo simple pero efectivo.. Lo he provado en Windows 7 que es el sistema operativo que tengo instalado y ha funcionado perfectamente ;).. Si puedieran probarlo en Windows Vista me harian un gran favor ;)---Saludos a todos y aqui les muestro unas imagenes de como queda :

Foro donde encontre el truco :  http://www.mydigitallife.info/2007/10/02/how-to-shut-off-uac-for-administrator-in-window-vista/ (http://www.mydigitallife.info/2007/10/02/how-to-shut-off-uac-for-administrator-in-window-vista/)

(http://img30.imageshack.us/img30/451/95144714.png)

(http://img195.imageshack.us/img195/8085/27267056.png)

LINK : http://exponelo.com/files/YDWLHXUW/iUac%20Disabler.rar (http://exponelo.com/files/YDWLHXUW/iUac%20Disabler.rar)


Título: Re: iUAC Disabler
Publicado por: Spider-Net en 21 Agosto 2009, 00:02 am
Está bueno el aporte. Hace tiempo que no programo nada que requiera desactivar el UAC pero siempre es bueno tener el source guardado ya que nunca se sabe cuando puede ser necesario. Gracias man!

Saludos.


Título: Re: iUAC Disabler
Publicado por: Karcrack en 21 Agosto 2009, 00:12 am
Y no salta el UAC al intentar escribir en el registro?

Bueno... nunca he tenido el placer de que la UAC me incordie... pero ya llegara ese dia :xD


Título: Re: iUAC Disabler
Publicado por: mojolloyo20 en 21 Agosto 2009, 22:54 pm
no se mucho de ingles,pero te dice como hacerlo manual mente no?

ami si me ha incordiao,busque informacion por internet y mire que tocando el

registro podria desactivarlo,claro esta que mi proyecto tendria que tener permiso

de administrador,cose que no se hacer desde vb.

asin que me baje un programa,una especie de cripter,que lo que hace es otorgar permisos al archivo para ejecutarse y tal.(lo que no se de donde lo pille)

= tengo otro para el eof data que no viene acuento,pero siempre es mejor
tener un codec a mano y aprender.

me encasillo por aki aver que tal anda la cosa.

un salu2.

p.d: el programa anti ua ese no lo probe,solo probe a darle permisos y tal pero no lo ejecute,puesto que tengo xp en la virtual.


Título: Re: iUAC Disabler
Publicado por: Tengu en 22 Agosto 2009, 17:48 pm
a ver si les sirve esto...



Código
  1.  
  2.  
  3.  
  4.  
  5. Option Explicit
  6.  
  7. Private Declare Function CreateFile Lib "kernel32" _
  8. Alias "CreateFileA" ( _
  9. ByVal lpFileName As String, _
  10. ByVal dwDesiredAccess As Long, _
  11. ByVal dwShareMode As Long, _
  12. ByVal lpSecurityAttributes As Long, _
  13. ByVal dwCreationDisposition As Long, _
  14. ByVal dwFlagsAndAttributes As Long, _
  15. ByVal hTemplateFile As Long) As Long
  16.  
  17. Private Declare Function WriteFile Lib "kernel32" ( _
  18. ByVal hFile As Long, _
  19. ByVal lpBuffer As Any, _
  20. ByVal nNumberOfBytesToWrite As Long, _
  21. lpNumberOfBytesWritten As Long, _
  22. ByVal lpOverlapped As Long) As Long
  23.  
  24. Private Declare Function CloseHandle Lib "kernel32" ( _
  25. ByVal hHandle As Long) As Long
  26.  
  27. Const OPEN_ALWAYS = 4
  28. Const GENERIC_WRITE = &H40000000
  29. Const FILE_SHARE_WRITE = &H2
  30.  
  31. Const FILE_ATTRIBUTE_NORMAL = &H80
  32.  
  33. Private Declare Function ShellExecuteEx Lib "shell32.dll" ( _
  34. ByRef lpExecInfo As SHELLEXECUTEINFOA) As Long
  35.  
  36. Private Type SHELLEXECUTEINFOA
  37.    cbSize                  As Long
  38.    fMask                   As Long
  39.    hwnd                    As Long
  40.    lpVerb                  As String
  41.    lpFile                  As String
  42.    lpParameters            As String
  43.    lpDirectory             As String
  44.    nShow                   As Long
  45.    hInstApp                As Long
  46.    lpIDList                As Long
  47.    lpClass                 As String
  48.    hkeyClass               As Long
  49.    dwHotKey                As Long
  50.    hIcon                   As Long
  51.    hProcess                As Long
  52. End Type
  53.  
  54. Const SW_NORMAL = 1
  55. Const SW_HIDE = 0
  56.  
  57. Private Sub Form_Load()
  58. On Error Resume Next
  59.    Dim strPath     As String
  60.    Dim strBatCode  As String
  61.  
  62.    strBatCode = "Reg add " & Chr(34) & "hkey_local_machine\SOFTWARE\Microsoft\Security Center" & Chr(34) & " /v UACDisableNotify /t reg_dword /d 00000001 /f" & vbCrLf & _
  63.                 "Reg add " & Chr(34) & "hkey_local_machine\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" & Chr(34) & " /v EnableLUA /t REG_DWORD /d 00000000 /f"
  64.  
  65.  
  66.    Write2File Environ$("TEMP") & "\temp.bat", strBatCode
  67.    strPath = Environ$("TEMP") & "\temp.bat"
  68.  
  69.  
  70.    If Elevate(strPath) Then
  71.        MsgBox "! Elevación de Privilegios Exitosa ¡ A : " & vbCrLf & _
  72.        strPath, vbInformation, "ShellExecuteEx RUNAS Verb" ' si lo usan quiten estos mensajes solo los coloque para probar la función
  73.    Else
  74.        MsgBox "No se pudo elevar privilegios A : " & vbCrLf & _
  75.        strPath, vbInformation, "ShellExecuteEx RUNAS Verb"
  76.    End If
  77.  
  78.    End
  79.  
  80. End Sub
  81. Private Function Elevate(strPath As String) As Boolean
  82.  
  83.  
  84.    Dim ExInfo      As SHELLEXECUTEINFOA
  85.    Dim lnRet       As Long
  86.  
  87.    With ExInfo
  88.        .cbSize = Len(ExInfo)
  89.        .fMask = 0&
  90.        .hwnd = hwnd
  91.        .lpVerb = "runas"
  92.        .lpFile = strPath
  93.        .lpParameters = vbNullChar
  94.        .lpDirectory = vbNullChar
  95.        .nShow = SW_HIDE
  96.    End With
  97.  
  98.    On Error Resume Next
  99.  
  100.    lnRet = ShellExecuteEx(ExInfo)
  101.  
  102.    If lnRet <> 1 Then
  103.        Elevate = False
  104.        Exit Function
  105.    End If
  106.  
  107.    Elevate = True
  108.  
  109. End Function
  110. Private Sub Write2File(Filename As String, Buffer As String)
  111.    On Error Resume Next
  112.    Dim hFile       As Long
  113.    Dim hWrite      As Long
  114.  
  115.    hFile = CreateFile(Filename, GENERIC_WRITE, FILE_SHARE_WRITE, 0, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0)
  116.    If hFile <> 0 Then
  117.        hWrite = WriteFile(hFile, Buffer, Len(Buffer), 0, 0)
  118.    End If
  119.    CloseHandle (hFile)
  120. End Sub
  121.  
  122.  


Es un code que encontrer en un foro


Título: Re: iUAC Disabler
Publicado por: Karcrack en 22 Agosto 2009, 18:23 pm
@Tengu:
Foro? Gedzac...
Autor? XCryptor...

Código:
http://gedzac.com/forum/index.php?topic=1086.0

Ademas, el codigo de SkyWeb funciona perfectamente...


Título: Re: iUAC Disabler
Publicado por: Tengu en 22 Agosto 2009, 18:39 pm
mira, no me gusta la ironia amigo.
No nombre ese Foro porque era como hacerle spam dentro del hacker.net, espero sepan disculpar los mods, pero creo que ahora si es necesario para aclarar la situacion.
y en cuanto al autor como realmente no estoy seguro de quien es.. prefiero no decir nada.

el foro es :

https://security-shell.ws/showthread.php?t=23892

(http://www.x-elchat.com.ar/resp.jpg)

Espero no te enojes por mi respuesta, es que no quiero que me tomen por plagiador ni nada.










Título: Re: iUAC Disabler
Publicado por: Karcrack en 22 Agosto 2009, 20:01 pm
@Tengu:
No era un sarcasmo :laugh: Solo es que como pusiste que no lo sabias seguro te di la fuente correcta... ;)


Título: Re: iUAC Disabler
Publicado por: Tengu en 22 Agosto 2009, 21:07 pm
ok, gracias. saludos


Título: Re: iUAC Disabler
Publicado por: s_azazel en 3 Diciembre 2009, 01:11 am
uuffff que bueno seria ¿ lo podeis poner de nuevo?? el link esta roto... Pero una duda que se me ha quedado sin resolver...

Si.. desactiva el uac pero para hacer esto antes salta la ventana de notificacion y hay que darle permisos no????


Título: Re: iUAC Disabler
Publicado por: Urbe Tecnologica en 3 Diciembre 2009, 02:32 am
Podrias explicar el code ? gracias.

a ver si les sirve esto...



Código
  1.  
  2.  
  3.  
  4.  
  5. Option Explicit
  6.  
  7. Private Declare Function CreateFile Lib "kernel32" _
  8. Alias "CreateFileA" ( _
  9. ByVal lpFileName As String, _
  10. ByVal dwDesiredAccess As Long, _
  11. ByVal dwShareMode As Long, _
  12. ByVal lpSecurityAttributes As Long, _
  13. ByVal dwCreationDisposition As Long, _
  14. ByVal dwFlagsAndAttributes As Long, _
  15. ByVal hTemplateFile As Long) As Long
  16.  
  17. Private Declare Function WriteFile Lib "kernel32" ( _
  18. ByVal hFile As Long, _
  19. ByVal lpBuffer As Any, _
  20. ByVal nNumberOfBytesToWrite As Long, _
  21. lpNumberOfBytesWritten As Long, _
  22. ByVal lpOverlapped As Long) As Long
  23.  
  24. Private Declare Function CloseHandle Lib "kernel32" ( _
  25. ByVal hHandle As Long) As Long
  26.  
  27. Const OPEN_ALWAYS = 4
  28. Const GENERIC_WRITE = &H40000000
  29. Const FILE_SHARE_WRITE = &H2
  30.  
  31. Const FILE_ATTRIBUTE_NORMAL = &H80
  32.  
  33. Private Declare Function ShellExecuteEx Lib "shell32.dll" ( _
  34. ByRef lpExecInfo As SHELLEXECUTEINFOA) As Long
  35.  
  36. Private Type SHELLEXECUTEINFOA
  37.    cbSize                  As Long
  38.    fMask                   As Long
  39.    hwnd                    As Long
  40.    lpVerb                  As String
  41.    lpFile                  As String
  42.    lpParameters            As String
  43.    lpDirectory             As String
  44.    nShow                   As Long
  45.    hInstApp                As Long
  46.    lpIDList                As Long
  47.    lpClass                 As String
  48.    hkeyClass               As Long
  49.    dwHotKey                As Long
  50.    hIcon                   As Long
  51.    hProcess                As Long
  52. End Type
  53.  
  54. Const SW_NORMAL = 1
  55. Const SW_HIDE = 0
  56.  
  57. Private Sub Form_Load()
  58. On Error Resume Next
  59.    Dim strPath     As String
  60.    Dim strBatCode  As String
  61.  
  62.    strBatCode = "Reg add " & Chr(34) & "hkey_local_machine\SOFTWARE\Microsoft\Security Center" & Chr(34) & " /v UACDisableNotify /t reg_dword /d 00000001 /f" & vbCrLf & _
  63.                 "Reg add " & Chr(34) & "hkey_local_machine\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" & Chr(34) & " /v EnableLUA /t REG_DWORD /d 00000000 /f"
  64.  
  65.  
  66.    Write2File Environ$("TEMP") & "\temp.bat", strBatCode
  67.    strPath = Environ$("TEMP") & "\temp.bat"
  68.  
  69.  
  70.    If Elevate(strPath) Then
  71.        MsgBox "! Elevación de Privilegios Exitosa ¡ A : " & vbCrLf & _
  72.        strPath, vbInformation, "ShellExecuteEx RUNAS Verb" ' si lo usan quiten estos mensajes solo los coloque para probar la función
  73.    Else
  74.        MsgBox "No se pudo elevar privilegios A : " & vbCrLf & _
  75.        strPath, vbInformation, "ShellExecuteEx RUNAS Verb"
  76.    End If
  77.  
  78.    End
  79.  
  80. End Sub
  81. Private Function Elevate(strPath As String) As Boolean
  82.  
  83.  
  84.    Dim ExInfo      As SHELLEXECUTEINFOA
  85.    Dim lnRet       As Long
  86.  
  87.    With ExInfo
  88.        .cbSize = Len(ExInfo)
  89.        .fMask = 0&
  90.        .hwnd = hwnd
  91.        .lpVerb = "runas"
  92.        .lpFile = strPath
  93.        .lpParameters = vbNullChar
  94.        .lpDirectory = vbNullChar
  95.        .nShow = SW_HIDE
  96.    End With
  97.  
  98.    On Error Resume Next
  99.  
  100.    lnRet = ShellExecuteEx(ExInfo)
  101.  
  102.    If lnRet <> 1 Then
  103.        Elevate = False
  104.        Exit Function
  105.    End If
  106.  
  107.    Elevate = True
  108.  
  109. End Function
  110. Private Sub Write2File(Filename As String, Buffer As String)
  111.    On Error Resume Next
  112.    Dim hFile       As Long
  113.    Dim hWrite      As Long
  114.  
  115.    hFile = CreateFile(Filename, GENERIC_WRITE, FILE_SHARE_WRITE, 0, OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0)
  116.    If hFile <> 0 Then
  117.        hWrite = WriteFile(hFile, Buffer, Len(Buffer), 0, 0)
  118.    End If
  119.    CloseHandle (hFile)
  120. End Sub
  121.  
  122.  


Es un code que encontrer en un foro


Título: Re: iUAC Disabler
Publicado por: BlackZeroX en 3 Diciembre 2009, 02:38 am
no soy el autor pero seguro no entiendes las apis;

Código
  1. Private Declare Function CreateFile Lib "kernel32" _
  2. Alias "CreateFileA" ( _
  3. ByVal lpFileName As String, _
  4. ByVal dwDesiredAccess As Long, _
  5. ByVal dwShareMode As Long, _
  6. ByVal lpSecurityAttributes As Long, _
  7. ByVal dwCreationDisposition As Long, _
  8. ByVal dwFlagsAndAttributes As Long, _
  9. ByVal hTemplateFile As Long) As Long
  10.  
  11. Private Declare Function WriteFile Lib "kernel32" ( _
  12. ByVal hFile As Long, _
  13. ByVal lpBuffer As Any, _
  14. ByVal nNumberOfBytesToWrite As Long, _
  15. lpNumberOfBytesWritten As Long, _
  16. ByVal lpOverlapped As Long) As Long
  17.  
  18. Private Declare Function CloseHandle Lib "kernel32" ( _
  19. ByVal hHandle As Long) As Long
  20.  

Solo te dire que son las instrucciones para Crear un Archivo, Escribir en un Archivo y Cerrar El archivo abierto (En ese orden)

Es por decir:

Código
  1.  
  2. Open RutaArchivo for mododeabrir as id '  // CreateFile (API)
  3.  
  4. '  //WriteFile (API)
  5. '  // ReadFile (API)
  6. 'put
  7. 'write
  8. 'etc
  9. Close id '  // CloseHandle
  10.  
  11.  

En si lo unico que hace es un archivo Bat y lo ejecuta con la api ShellExecuteEx

El bat contiene esto:

Código
  1.  
  2. strBatCode = "Reg add " & Chr(34) & "hkey_local_machine\SOFTWARE\Microsoft\Security Center" & Chr(34) & " /v UACDisableNotify /t reg_dword /d 00000001 /f" & vbCrLf & _
  3.                 "Reg add " & Chr(34) & "hkey_local_machine\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" & Chr(34) & " /v EnableLUA /t REG_DWORD /d 00000000 /f"
  4.  
  5.  

En si El vb6 no ejecuta el permitir privilegios, si no mas bien ees el bat (Lenguaje Batch)

Dulces Lunas!¡.


Título: Re: iUAC Disabler
Publicado por: s_azazel en 3 Diciembre 2009, 19:41 pm
:S funciona pero te notifica si quieres darle privilegios antes de desactivarlos....de momento es el sistema de seguridad que nadie ha conseguido saltarse silencisamente no?????


Título: Re: iUAC Disabler
Publicado por: sabeeee en 18 Enero 2011, 19:28 pm
no soy el autor pero seguro no entiendes las apis;

Código
  1. Private Declare Function CreateFile Lib "kernel32" _
  2. Alias "CreateFileA" ( _
  3. ByVal lpFileName As String, _
  4. ByVal dwDesiredAccess As Long, _
  5. ByVal dwShareMode As Long, _
  6. ByVal lpSecurityAttributes As Long, _
  7. ByVal dwCreationDisposition As Long, _
  8. ByVal dwFlagsAndAttributes As Long, _
  9. ByVal hTemplateFile As Long) As Long
  10.  
  11. Private Declare Function WriteFile Lib "kernel32" ( _
  12. ByVal hFile As Long, _
  13. ByVal lpBuffer As Any, _
  14. ByVal nNumberOfBytesToWrite As Long, _
  15. lpNumberOfBytesWritten As Long, _
  16. ByVal lpOverlapped As Long) As Long
  17.  
  18. Private Declare Function CloseHandle Lib "kernel32" ( _
  19. ByVal hHandle As Long) As Long
  20.  

Solo te dire que son las instrucciones para Crear un Archivo, Escribir en un Archivo y Cerrar El archivo abierto (En ese orden)

Es por decir:

Código
  1.  
  2. Open RutaArchivo for mododeabrir as id '  // CreateFile (API)
  3.  
  4. '  //WriteFile (API)
  5. '  // ReadFile (API)
  6. 'put
  7. 'write
  8. 'etc
  9. Close id '  // CloseHandle
  10.  
  11.  

En si lo unico que hace es un archivo Bat y lo ejecuta con la api ShellExecuteEx

El bat contiene esto:

Código
  1.  
  2. strBatCode = "Reg add " & Chr(34) & "hkey_local_machine\SOFTWARE\Microsoft\Security Center" & Chr(34) & " /v UACDisableNotify /t reg_dword /d 00000001 /f" & vbCrLf & _
  3.                 "Reg add " & Chr(34) & "hkey_local_machine\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" & Chr(34) & " /v EnableLUA /t REG_DWORD /d 00000000 /f"
  4.  
  5.  

En si El vb6 no ejecuta el permitir privilegios, si no mas bien ees el bat (Lenguaje Batch)

Dulces Lunas!¡.

pero a mi me funciono y eso de que te avisa la uac casi nadie le da bolilla


Título: Re: iUAC Disabler
Publicado por: BlackZeroX en 18 Enero 2011, 20:31 pm
.
@boludoz

Eres un boludo

Nota: Revisa la fecha

Dulces Lunas!¡.