Tema destacado: Recuerda que debes registrarte en el foro para poder participar (preguntar y responder)
Autor
|
Tema: matar procesos en windows (Leído 22,415 veces)
|
shy
Desconectado
Mensajes: 144
¡Amo YaBB SE!
|
bueno .. alguna manera de poder matar un proceso en winwdows .. desde una consola remota ???
ps -fea y kill -9 ?? xDDDDD joer es que no le encuentro la manera de listar los procesos .. y menos de killealrlos .. definitivamente windows no es mi fuerte ...
|
|
|
|
|
En línea
|
|
|
|
|
el-brujo
|
http://www.microsoft.com/windowsxp/home/using/productdoc/en/default.asp?url=/windowsxp/home/using/productdoc/en/taskkill.aspSyntax taskkill [/s computer] [/u domain\user [/p password]]] [/fi FilterName] [/pid ProcessID]|[/im ImageName] [/f] TaskkillEnds one or more tasks or processes. Processes can be killed by process ID or image name.
Syntax taskkill [/s computer] [/u domain\user [/p password]]] [/fi FilterName] [/pid ProcessID]|[/im ImageName] [/f]
Parameters /s computer Specifies the name or IP address of a remote computer (do not use backslashes). The default is the local computer. /u domain\user Runs the command with the account permissions of the user specified by user or domain\user. The default is the permissions of the current logged on user on the computer issuing the command. /p password Specifies the password of the user account that is specified in the /u parameter. /fi FilterName Specifies the types of process(es) to include in or exclude from termination. The following are valid filter names, operators, and values. Name Operators Value Hostname eq, ne Any valid string. Status eq, ne RUNNING|NOT RESPONDING Imagename eq, ne Any valid string. PID eg, ne, gt, lt, ge, le Any valid positive integer. Session eg, ne, gt, lt, ge, le Any valid session number. CPUTime eq, ne, gt, lt, ge, le Valid time in the format of hh:mm:ss. The mm and ss parameters should be between 0 and 59 and hh can be any valid unsigned numeric value. Memusage eg, ne, gt, lt, ge, le Any valid integer. Username eq, ne Any valid user name ([domain\]user). Services eq, ne Any valid string. Windowtitle eq, ne Any valid string.
/pid ProcessID Specifies the process ID of the process to be terminated. /im ImageName Specifies the image name of the process to be terminated. Use the wildcard (*) to specify all image names. /f Specifies that process(es) be forcefully terminated. This parameter is ignored for remote processes; all remote processes are forcefully terminated. /? Displays help at the command prompt. Remarks The wildcard character (*) is accepted only when specified along with the filters. Termination for remote processes will always be done forcefully regardless of whether the /f parameter is specified. Supplying a computer name to the HOSTNAME filter will cause a shutdown and all processes will be stopped. Use tasklist to determine the Process ID (PID) for the process to be terminated. Taskkill is a replacement for the Kill tool. Examples The following examples show how you can use the taskkill command:
taskkill /pid 1230 /pid 1241 /pid 1253 taskkill /f /fi "USERNAME eq NT AUTHORITY\SYSTEM" /im notepad.exe taskkill /s srvmain /f /im notepad.exe taskkill /s srvmain /u maindom\hiropln /p p@ssW23 /fi "IMAGENAME eq note*" /im * taskkill /s srvmain /u maindom\hiropln /fi "USERNAME ne NT*" /im * taskkill /f /fi "PID ge 1000" /im Todos los comandos existentes desde la consola de XPhttp://www.microsoft.com/windowsxp/home/using/productdoc/en/default.asp?url=/windowsxp/home/using/productdoc/en/ntcmds.asp
|
|
|
|
|
En línea
|
"elhacker.net es único, por eso no fabrica para otras marcas" - Prohibido prohibir 
|
|
|
oRTNZ
Desconectado
Mensajes: 808
no no soy malo... soy vicioso :p
|
hola ,alex, no sabia que se podia hacer eso,por lo que mencionas es solo en xp,pues en 2000 ni va,saludos
|
|
|
|
|
En línea
|
(31 del 12 de 2005) un dia que recuerdo siempre! :p (03 del 08 de 2006) otro dia que lo recordare siempre... Si eres Peruano, QUEDATE y si quieres ser de segunda mano del pais que fueras, pues LARGATE Y NO REGRESES...
|
|
|
shy
Desconectado
Mensajes: 144
¡Amo YaBB SE!
|
bueno brohjo -- gracias por la ayuda, ñlo he inbtentado pero nada .... la shell remota la konsegui por el exploit del lsass.exe ... asi que no maneja pass ni nada ... pero gracias seguire biendo que onda
|
|
|
|
|
En línea
|
|
|
|
soft
Desconectado
Mensajes: 297
Nadie nace sabiendo
|
bendito sea pero no hay ??? en español mi ingles no estan bueno para leer cosas tecnicas
|
|
|
|
|
En línea
|
No puedes ver lo que no Existe
|
|
|
|
|
shy
Desconectado
Mensajes: 144
¡Amo YaBB SE!
|
buernon que nada .. resultao mas facil d lo que crei
kon net start ..... se vn los procesos
y kon net stop "nombre" se de tienen
|
|
|
|
|
En línea
|
|
|
|
Cubix
Desconectado
Mensajes: 43
Que hay
|
Pues yo por mas que teckleo ese comando me da error
|
|
|
|
|
En línea
|
|
|
|
shy
Desconectado
Mensajes: 144
¡Amo YaBB SE!
|
te clealo kon las komillas
net stop "NOrton Antivirus" el programa esta detenidose .... programam detenido kon exito ..
|
|
|
|
|
En línea
|
|
|
|
Charlie
Desconectado
Mensajes: 647
Mess with the best--->Die like the rest
|
Siento abrir un post antiguo, pero es q viene como anillo al dedo a mi pregunta Esta todo claro para matar un proceso con el taskkill ok?, el problema es q si quiero compilar codigo en C para q me mate un proceso generico resulta q no me furula bien el taskkill. El codigo es bien sencillote,aqui va: #include <stdio.h> #include <stdlib.h>
int main () { system ("taskkill /F/IM notepad.exe"); return 0; }
|
|
|
|
|
En línea
|
Gigabyte K8NSC-939 AMD64 3500+ @ 2398 MHZ con ZALMAN 7000B CU 1,5 GB RAM (3 x 512) DDR 400 KINGSTON @ 436 MHZ ATI RADEON 9600 PRO 256 MB 2 x Seagate Barracuda 120GB (S-ATA) 1 x Maxtor Diamond 10 250 GB  
|
|
|
|
Rojodos
|
Me parece que en el tema de argumentosal ejecutable, system no funciona nada bien.
En programas en C que he exo yo para windows, para usar argumentos en los programas, acabe usando execve ().
Pruebalo, pero este tema que abres deberia ir en programacion....
Salu2
|
|
|
|
|
En línea
|
|
|
|
Rentero
Ex-Staff
Desconectado
Mensajes: 1.163
La paciencia es la madre de la ciencia.
|
Bueno, aqui dejo un par de programas que me pasó un amigo: kill.c - Este es para matar los procesos teniendo el PID. Yo lo he probado en XP y funciona bien. #include <stdio.h> #include <windows.h> #include <Tlhelp32.h>
int main(int argc,char **argv){ HANDLE res; if (argc < 2 || argc > 2){ printf("Usage: <PID>\n",argv[0]); exit(0); } res = OpenProcess(PROCESS_TERMINATE,0,atoi(argv[1])); if (res !=0){ TerminateProcess(res,0); CloseHandle(res); printf("process #%i Killed\n",atoi(argv[1])); } else printf("The process dont open\n"); } - Compilado con Dev-cpp sin problemas.
pulist.c - Lista los process con sus PIDs correpondientes. Este acabo de probarlo y funciona también a la perfección. #include <stdio.h> #include <string.h> #include <windows.h> #include <Tlhelp32.h>
//typedef struct tagPROCESSENTRY32 //{ // DWORD dwSize; // DWORD cntUsage; // DWORD th32ProcessID; // DWORD th32DefaultHeapID; // DWORD th32ModuleID; // DWORD cntThreads; // DWORD th32ParentProcessID; // LONG pcPriClassBase; // DWORD dwFlags; // TCHAR szExeFile[MAX_PATH]; // DWORD th32MemoryBase; // DWORD th32AccessKey; //} PROCESSENTRY32
int main(){
HANDLE res; PROCESSENTRY32 pro; BOOL x; int r;
res=CreateToolhelp32Snapshot(TH32CS_SNAPALL,0); if(res !=0){ pro.dwSize = sizeof(PROCESSENTRY32);
x= Process32First(res,(LPPROCESSENTRY32)&pro); if (x=0){ printf("[+]Sin process\n"); exit(0); } printf("_Process_ _Pid_\n\n"); do{ r = strlen(pro.szExeFile);
if (r <=12){ memset(pro.szExeFile+r,0x20,12-r); printf("%s",pro.szExeFile); printf(" %i\n",pro.th32ProcessID); }
if (r>12){ memset(pro.szExeFile,0,sizeof(pro.szExeFile)); printf("%s",pro.szExeFile); } x=Process32Next(res,(LPPROCESSENTRY32)&pro);
}while (x!=0); } } - Compilado con Visual C++ 6.0 sin problemas.
[POST EDITADO POR MI...xD]
|
|
|
|
« Última modificación: 23 Agosto 2004, 21:53 por neohex »
|
En línea
|
Firmado.
|
|
|
Cobac
Ex-Staff
Desconectado
Mensajes: 5.466
Still In Development
|
yo he hecho esto y me va  #include <stdio.h> #include <stdlib.h>
int main () { system ("taskkill /F /IM notepad.exe"); return 0; } el problema eran los parámetros, ya que van separados por un espacio  salu2
|
|
|
|
|
En línea
|
PIV 2533 @ 2720Mhz | 512MB DRR333 @ 358 | 160 Gb + 40 Gb Seagate Barracuda
En la Edad Media la Iglesia robaba con los diezmos. En el siglo XXI la SGAE roba con sus cánones.
|
|
|
Charlie
Desconectado
Mensajes: 647
Mess with the best--->Die like the rest
|
compilar te compila...pero matar el proceso no te lo llega a matar cobac...Yo lo he intentado mil veces y no tira maxo....
PD: Rojodos como funciona el execve ()??
Podrias decirme en q libreria se encuentra y ponerme un ejemplo de como se usa??
Asias
|
|
|
|
« Última modificación: 23 Agosto 2004, 23:47 por Charlie »
|
En línea
|
Gigabyte K8NSC-939 AMD64 3500+ @ 2398 MHZ con ZALMAN 7000B CU 1,5 GB RAM (3 x 512) DDR 400 KINGSTON @ 436 MHZ ATI RADEON 9600 PRO 256 MB 2 x Seagate Barracuda 120GB (S-ATA) 1 x Maxtor Diamond 10 250 GB  
|
|
|
Cobac
Ex-Staff
Desconectado
Mensajes: 5.466
Still In Development
|
que windows tienes?
porque ami con el xp si que me lo mata (vamos, tambien he probado con otros programas -no solo intentar matar el notepad- y me los mata)
salu2
|
|
|
|
« Última modificación: 24 Agosto 2004, 00:28 por Cobac »
|
En línea
|
PIV 2533 @ 2720Mhz | 512MB DRR333 @ 358 | 160 Gb + 40 Gb Seagate Barracuda
En la Edad Media la Iglesia robaba con los diezmos. En el siglo XXI la SGAE roba con sus cánones.
|
|
|
|
|