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

 

 


Tema destacado: Usando Git para manipular el directorio de trabajo, el índice y commits (segunda parte)


  Mostrar Temas
Páginas: [1] 2 3
1  Foros Generales / Foro Libre / f en: 19 Agosto 2015, 00:39 am
f
2  Foros Generales / Foro Libre / f en: 30 Octubre 2014, 04:47 am
f
3  Foros Generales / Foro Libre / f en: 18 Septiembre 2014, 21:18 pm
f
4  Foros Generales / Foro Libre / a en: 18 Septiembre 2014, 15:54 pm
a
5  Programación / Programación C/C++ / [Consulta] campo del struct MODULEENTRY32 en: 8 Agosto 2014, 13:06 pm
Tenia algo de tiempo y me puse a repasar algunas cosas

Aca el codigo:

Código
  1. HANDLE snapshot,snapshotModule=NULL;
  2.  
  3. PROCESSENTRY32 processEntry;
  4. MODULEENTRY32 moduleEntry;
  5. if((snapshot=CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0))==NULL){
  6. printf("\n%s","FAIL!!!!SNAPSHOTCREATE");
  7. return 0;
  8.  
  9. }
  10.  
  11. processEntry.dwSize=sizeof(PROCESSENTRY32);
  12. moduleEntry.dwSize=sizeof(MODULEENTRY32);
  13.  
  14. while(Process32Next(snapshot,&processEntry)==TRUE)
  15. {
  16. printf("\nPID:%d\nExe:%s\n",processEntry.th32ProcessID,processEntry.szExeFile);
  17. if(snapshotModule=CreateToolhelp32Snapshot(TH32CS_SNAPMODULE,processEntry.th32ProcessID))
  18. {
  19. while(Module32Next(snapshotModule,&moduleEntry)==TRUE)
  20. printf("%s %s %d\n",moduleEntry.szModule,moduleEntry.szExePath,moduleEntry.th32ProcessID);
  21. }
  22. }
  23.  
  24. return 0;
  25.  
  26.  


->gcc.exe archivo.c -o archivo . OK
->archivo.exe | more

Ok. Fijense que me devuelve siempre el mismo PID en los modulos... Ese es el problema y no entiendo porque.

Saludos.
6  Programación / Ingeniería Inversa / Pregunta Deshabilitar ASLR en: 7 Agosto 2014, 00:00 am
¿Si modifico el OPTIONAL_HEADER , el DLL_CHARACTERISTICS exactamente , quedaria deshabilitado totalmente el ASLR del binario?

PD:Estoy hablando del formato de binario PE.
PD2:Si , ya lo comprobe , queda deshabilitado.
Saludos!

------------------------------------------

Consulta 2

Tengo lo siguiente:

Código
  1. #include <stdio.h>
  2. #include <windows.h>
  3.  
  4. int main(int argc,char**argv)
  5. {
  6. PIMAGE_DOS_HEADER dosHeader;
  7. PIMAGE_NT_HEADERS ntHeader;
  8. HANDLE handleArchivo,mapeadoArchivo=NULL;
  9. LPVOID direccionMapeado=NULL;
  10. char nombreArchivo[MAX_PATH];
  11.  
  12. printf("Ingrese el archivo:");
  13. scanf("%s",nombreArchivo);
  14.  
  15. /*
  16. HANDLE WINAPI CreateFile(
  17.   _In_      LPCTSTR lpFileName,
  18.   _In_      DWORD dwDesiredAccess,
  19.   _In_      DWORD dwShareMode,
  20.   _In_opt_  LPSECURITY_ATTRIBUTES lpSecurityAttributes,
  21.   _In_      DWORD dwCreationDisposition,
  22.   _In_      DWORD dwFlagsAndAttributes,
  23.   _In_opt_  HANDLE hTemplateFile
  24. );
  25. */
  26.  
  27. handleArchivo=CreateFile(nombreArchivo,GENERIC_READ,0,NULL,OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,NULL);
  28. if(handleArchivo==INVALID_HANDLE_VALUE)
  29. {
  30. printf("\n%s\n","Error!");
  31. return 0;
  32. }
  33. /*
  34. HANDLE WINAPI CreateFileMapping(
  35.   _In_      HANDLE hFile,
  36.   _In_opt_  LPSECURITY_ATTRIBUTES lpAttributes,
  37.   _In_      DWORD flProtect,
  38.   _In_      DWORD dwMaximumSizeHigh,
  39.   _In_      DWORD dwMaximumSizeLow,
  40.   _In_opt_  LPCTSTR lpName
  41. );
  42. */
  43.  
  44.  
  45. mapeadoArchivo=CreateFileMapping(handleArchivo,NULL,PAGE_READONLY,0,0,NULL);
  46. if(!mapeadoArchivo)
  47. {
  48. printf("\n%s\n","Error!");
  49. return 0;
  50. }
  51.  
  52. /*
  53. LPVOID WINAPI MapViewOfFile(
  54.   _In_  HANDLE hFileMappingObject,
  55.   _In_  DWORD dwDesiredAccess,
  56.   _In_  DWORD dwFileOffsetHigh,
  57.   _In_  DWORD dwFileOffsetLow,
  58.   _In_  SIZE_T dwNumberOfBytesToMap
  59. );
  60.  
  61. */
  62.  
  63. direccionMapeado=MapViewOfFile(mapeadoArchivo,FILE_MAP_READ,0,0,0);
  64.  
  65. dosHeader=(PIMAGE_DOS_HEADER)direccionMapeado;
  66.  
  67. printf("\n%x MZ , PE Header offset :0x%x\n",dosHeader->e_magic,dosHeader->e_lfanew);
  68.  
  69. ntHeader=(PIMAGE_NT_HEADERS)(direccionMapeado+dosHeader->e_lfanew);
  70.  
  71. printf("PE SIGNATURE:%x Machine:%x",ntHeader->Signature,ntHeader->FileHeader.Machine);
  72. printf("\nDireccion Mapeado:%x   ImageBase:%x",direccionMapeado,ntHeader->OptionalHeader.ImageBase);
  73.  
  74.  
  75. char a[MAX_PATH];
  76. scanf("%s",a);
  77.  
  78. }
  79.  
  80.  

Funciona lo mas bien , no tiene mucha vuelta. Mi pregunta es , ¿porque la direccion de mapeado es diferente al ImageBase?Segun tengo entendido el ImageBase es la direccion que le indicamos al loader donde empezar a mapear.La unico que se me viene es que justo haya estado ocupado ese lugar y el loader haya asignado otra direccion. Aclarenme esto.
Gracias
7  Sistemas Operativos / GNU/Linux / WGET Problema en: 5 Agosto 2014, 23:09 pm
Queria saber si se puede descargar un archivo a un servidor remoto.

Por ejemplo: wget -c http://bajobasura.com/descarga.pdf . Esto me lo descarga a mi maquina. La idea es descargar a una maquina que se encuentra en mi lan.

Saludos.
8  Foros Generales / Foro Libre / Nerdcore en: 5 Agosto 2014, 20:10 pm
Conozcan a este cantante



Even out settle score quick
My disaster recovery requires even more disks
Put your bytes up, prove it or you forfeit
Got my C64 and we blew it into orbit.

M. Bison with eight straight perfects
Overload emotions make hate, break circuits
In case you heard, it's a name fake service
Optimize our runtime to escape verdicts

Got an integer scope flow
That they can't sign
Passing code, didn't sanitize
Command lines; land mine

So before, they'll see me after
I'm Advice dog,
Courage Wolf,
Plus Philosoraptor

Don't prove we're human unless we really hafta
My team built schemes that destroyed recaptcha
Hate what they see, finish this chapter
By the way we're not any geeks, we hack into NASA

Drink all the booze
Hack all the things
Drink all the booze
Hack all the things
Drink all the booze
Hack all the things

Got this Vodka and this Redbull
They still give me wings

So we Drink all the booze
Hack all the things
Drink all the booze
Hack all the things
Drink all the booze
Hack all the things

Zero through Three
We're in every single ring

I'm just waiting until my blackberry dies
Cause I'll replace it with a raspberry pi

Don't compare to this track
It makes everything they said dull
Neutralize any threat
Turn Red skull to dev null

They killed virus writers that we mentioned
But instead they ascended to the VXHeavens
To reincarnate as live wires
Still inside we hide ciphers in signed device drivers

Which school will we hit next?
They didn't learn the format
So we've gotta printf
Next step is a chin check
Freestyles that I spit best
They didn't decrypt yet

I crush internet MC's in rhyme battles
Get your WiFi tackled
Hak5 Pineapple
I don't think you'll like my snapple
Cause I popped it with vodka
And a cyanide capsule

We Drink all the booze
Hack all the things
Drink all the booze
Hack all the things
Drink all the booze
Hack all the things

Got this Vodka and this Redbull
They still give me wings

So we Drink all the booze
Hack all the things
Drink all the booze
Hack all the things
Drink all the booze
Hack all the things

First we Drink all the booze
Then we Hack all the things
Then backdoor the firmware
On anything you bring

Regardless of the hardware, service, or encoding
Connected it to the internet
And someone's gonna own it

This is for the pirates who clap
And love the sound
Attacking from the cloud
Then we're back in underground

There's no masking from us now
We pop Tor nodes around the globe
Track and hunt you down
Hacked on schedule, add it to your calendar
Devices online; here comes another challenger

State infiltrated, so undercover
This is for my comrades who stare at their debuggers
And trace every buffer
Examining the code flow
Haven't been to sleep? Better pop another No-Doz

I think I'll need a planet sized urn
Cause some men just wanna see the world burn
Your turn

Drink all the booze
Hack all the things
Drink all the booze
Hack all the things
Drink all the booze
Hack all the things

Got this Vodka and this Redbull
They still give me wings

So we Drink all the booze
Hack all the things
Drink all the booze
Hack all the things
Drink all the booze
Hack all the things

Zero through Three
We're in every single ring
9  Programación / Programación C/C++ / Problema Funcion Beep de kernel32.dll en: 23 Julio 2014, 02:07 am
Que tal , estaba repasando un poco las funciones de kernel32 y , no se porque , no me funciona Beep.

Código:
#include <stdio.h>
#include <windows.h>

int main(int argc,char **argv)
{
typedef int (*punteroExitProcess)(UINT);
typedef int (*punteroBeep)(DWORD,DWORD);
typedef DWORD (*punteroGetCurrentProcessId)(void);
HMODULE dirKernel32=GetModuleHandle("kernel32.dll");
punteroExitProcess punteroExit=NULL;
punteroBeep punteroBep=NULL;
punteroGetCurrentProcessId GetCurrentProcessId2=NULL;
punteroExit=(punteroExitProcess)GetProcAddress(dirKernel32,"ExitProcess");
punteroBep=(punteroBeep)GetProcAddress(dirKernel32,"Beep");
GetCurrentProcessId2=(punteroGetCurrentProcessId)GetProcAddress(dirKernel32,"GetCurrentProcessId");
printf("Kernel32:%p\nExitProcess:%p\nBeep:%p\nGetCurrentProcessId:%p\n",dirKernel32,punteroExit,punteroBep,GetCurrentProcessId2);
printf("PID=%d\n",GetCurrentProcessId2());
punteroBep(1000,3000);
punteroExit(0);

}

Perdonen los nombres.La idea era obtener la direccion en memoria de kernel32 y jugar un poco con las funciones de este , a travez de punteros a funciones. Claro que hay formas mas faciles , solo era para repasar un poco.
10  Foros Generales / Sugerencias y dudas sobre el Foro / Sugerencia sección Ciencias en: 22 Febrero 2014, 15:47 pm
Bueno como dice el titulo , que tal una sección sobre ciencia? (Matematica , quimica , fisica ,etc).

Creo que la mayoria de aqui , seguramente estudia una carrera relacionada a la informatica y la mayoria de las carreras tienen esto. Ademas podriamos postear algoritmos relacionados a esas areas , nose , creo que estaria bueno.

Entenderia perfectamente que no se abra debido a que es un foro sobre computacion/hacking , pero bueno , mejor intentar que no intentar.



PD:Otra cosa que no vi , es una sección de S.O en general , con esto me refiero al diseño y implementacion de sistemas operativos.
Páginas: [1] 2 3
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines