Jump to content

Nytro

Administrators
  • Posts

    18753
  • Joined

  • Last visited

  • Days Won

    726

Everything posted by Nytro

  1. Din topul de pe imdb: 1. Toy Story 3 2. Grown Ups 3. Knight and Day 4. The Karate Kid 8. Prince of Persia: The Sands of Time 10. Jonah Hex
  2. Cheats with ELF: Code Injecting into ELF Headers |=-----------------------------------------------------------------------=| |=---------------------------[ HELLCODE RESEARCH ]-----------------------=| |=-----------------------------------------------------------------------=| |=--------=[ Cheats with ELF: Code Injecting into ELF Headers ]=--------=| |=-----------------------------------------------------------------------=| |=-----------------------=[ murderkey@hellcode.net ]=--------------------=| |=-----------------------------------------------------------------------=| --[ Index 0x0 - Introduction 0x1 - Requirements 0x2 - Basic ELF Structure 0x3 - Last Wordz 0x4 - Greetz --[ 0x0 - Introduction Hi Reader, In this paper, I will explain uncommon/unknown techniques to affect ELF headers directly or helping of compiler and assembly linkers. I've discovered this technique while thinking about injecting code to elf32 headers and i became succesful in my research 3 years ago..you can use this technique for different ideas, anyway i've tested it for IDS by-passing and as an anti-anti-debug technique. --[ 0x1 - Requirements You should know the topics which are below to understand this paper, because probably, you can't understand this paper if you don't have high-level knowledge about topics. -> Unix Assembly (AT&T) -> C/C++ -> ELF Structure -> Time and Brain if you know --[ 0x2 - Basic ELF Structure An elf32 file structure always include header, data and instruction segments.In this part, we will create executable files, play/change their sizes and createfiles with minimum sizes. Lets start to show that on "merv.asm" (Seni seviyorum Merve ; ------------merv.asm----------------- BITS 32 section .data merv db " murderkey ownz jo !" GLOBAL MAIN SECTION .text main: ;write() mov eax, 4 mov ebx, 1 mov ecx, merv mov edx, 28 int 0x80 ; exit() mov eax, 1 mov ebx, 0 int 0x80 -------------merv.asm----------------- As you see above, that is a simple assembly code. It prints " murderkey ownz jo !" to screen and ending via "exit call".Compiling it with "nasm" and giving link with "ld". h4x0r elf32 # nasm -felf merv.asm -o merv.o h4x0r elf32 # ld merv.o -o merv ld: warning: cannot find entry symbol _start; defaulting to 00000000080480a0 yeah, the warning is so important here! dont forget that! the program gave us "_start sectioun is not defined for elf32 in .text segment" error.even so , we are running the binary. h4x0r elf32 # ./merv murderkey ownz jo ! h4x0r elf32 # Good! there is not any problem for now so lets look at the size of program. h4x0r elf32 # wc -c merv 892 merv It is 892, we will match this value with the next code that we will write. --------------merv2.asm------------------- BITS 32 section .data merv db " murderkey ownz jo !" SECTION .text GLOBAL _start _start mov eax, 4 mov ebx, 1 mov ecx, merv mov edx, 28 int 0x80 mov eax, 1 mov ebx, 0 int 0x80 ----------------merv2.asm------------------------ Now, compiling, linking and running the program again. h4x0r elf32 # nasm -felf merv2.asm h4x0r elf32 # ld merv2.o -o merv2 h4x0r elf32 # ./merv2 murderkey ownz jo ! and lets look at the size of file h4x0r elf32 # wc -c merv2 848 merv2 h4x0r elf32 # 848! There is not a clear changing at the size. We will see this in a better way with details now. compiling "merv2.asm"; h4x0r elf32 # nasm -f elf merv2.asm h4x0r elf32 # gcc -Wall -s merv2.o merv2.o(.data+0x13): In function `_start': : multiple definition of `_start' /usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.5/../../../crt1.o(.text+0x0): first defined here /usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.5/../../../crt1.o(.text+0x18): In function `_start': : undefined reference to `main' collect2: ld returned 1 exit status h4x0r elf32 # The error is so interesting at the above. "/crt1.o(.text+0x0): first defined here." This error means that _start symbol is defined in "crt1.o elf32 startup script" and also we defined a _start symbol too. So these overlaps and it causes this error :)For blocking this, We are giving a command to gcc compiler to not running "startup" script when our code is compiled.We are doing it with (gcc) "-nostartfiles" option. h4x0r elf32 # gcc -Wall -s -nostartfiles merv2.o -o merv2 h4x0r elf32 # ./merv2 Segmentation fault h4x0r elf32 # UPPSSS we comiled our code but there is a (segmentation fault) memory crash! What is the problem here? Let's find! When we call _start image symbol in our assembly code ,it must be ended via _exit() call but we gave "-nostartfiles" option to it so it can not find _exit()How can we defeat it? Of course, defining the _exit as EXTERN and calling it in our code. Lets write the code again... ----------------- merv2.asm ------------------ BITS 32 section .data merv db " murderkey ownz jo !" EXTERN _exit section.text global _start _start mov eax, 4 mov ebx, 1 mov ecx, merv mov edx, 28 int 0x80 call _exit ------------------- merv2.asm ---------------------- Now, compiling again and linking... h4x0r elf32 # nasm -f elf merv2.asm h4x0r elf32 # gcc -Wall -s -nostartfiles merv2.o -o merv2 h4x0r elf32 # ./merv2 murderkey ownz jo ! WE ARE THE CHAMPION !! As you see, our function was run! Now , looking the size of our code; h4x0r elf32 # wc -c merv2 1392 merv2 h4x0r elf3 1392 <----- Now you understand well the difference of sizes. Now, we will practice a deceit with a different option. Watch here carefully! ---------------- merv3.asm--------------------- BITS 32 section .data merv db " murderkey ownz jo !" GLOBAL _start SECTION .text _start mov eax, 4 mov ebx, 1 mov ecx, merv mov edx, 28 int 0x80 mov eax, 1 mov ebx, 0 int 0x80 ------------------ merv3.asm ----------------------- Compiling and linking the code; h4x0r elf32 # nasm -f elf merv3.asm h4x0r elf32 # gcc -Wall -s -nostdlib merv3.o -o merv3 Run it; h4x0r elf32 # ./merv3 murderkey ownz jo ! So nice, we are wondering of size. h4x0r elf32 # wc -c merv3 524 merv3 h4x0r elf32 # 524, what did we do here? we gave -nostdlib option to compiler and canceled _exit(). We used this code instead of it; mov eax, 1 mov ebx, 0 int 0x80 and runned "_exit call" directly... ----------------------------------------------------------------------------- Shortly I want to say that we can cancel elf32 file headers, we can inject sections and can change size of fileshow we want.. or we can bypass anti-debug protections. That provide convenience us while developing unix worms.because any ids or any antivirus can not check elf32 file headers in this way.You can exceed every obstacle via this method. It's up to your imagination and creativity. Also I want to refer an issue here. While an elf32 executable image is being mapped to memory, it is mapped at "0x00000000080480a0" 32-bit hexadecimal address as a default in unix systems. If you dont define _start in elf32 , linker will give an error like below; ... /usr/lib/gcc-lib/i386-pc-linux-gnu/3.3.5/../../../../i386-pc-linux-gnu/bin/ld: warning: cannot find entry symbol _start; defaulting to 00000000080480a0 ... so kernel maps image to memory as default. If you run your head! , you can map this image to another place!I am changing this address and making it "0x08048000" !! Lets compile the code which is below as a bin format look its' starting place.. P.S: You should know details of elf32 file structure for this part. ------------------- lame-elf32.asm---------------------------------- BITS 32 org 0x08048000 ehdr: ; Elf32_Ehdr db 0x7F, "ELF", 1, 1, 1 ; e_ident times 9 db 0 dw 2 ; e_type dw 3 ; e_machine dd 1 ; e_version dd _start ; e_entry dd phdr - $$ ; e_phoff dd 0 ; e_shoff dd 0 ; e_flags dw ehdrsize ; e_ehsize dw phdrsize ; e_phentsize dw 1 ; e_phnum dw 0 ; e_shentsize dw 0 ; e_shnum dw 0 ; e_shstrndx ehdrsize equ $ - ehdr phdr: ; Elf32_Phdr dd 1 ; p_type dd 0 ; p_offset dd $$ ; p_vaddr dd $$ ; p_paddr dd filesize ; p_filesz dd filesize ; p_memsz dd 5 ; p_flags dd 0x1000 ; p_align phdrsize equ $ - phdr section .data merv db "murderkey own jo!" _start: mov eax, 4 mov ebx, 1 mov ecx, merv mov edx, 28 int 0x80 ; exit() call mov eax, 1 mov ebx, 0 int 0x80 filesize equ $ - $$ ----------------------------lame-elf32.asm------------------------------- Now lets link our code in bin format and run it.. h4x0r elf32 # nasm -f bin lame-elf32.asm -o lame-elf32 h4x0r elf32 # chmod +x lame-elf32 h4x0r elf32 # ./lame-elf32 murderkey own jo! --[ 0x3 - Last Wordz I want to finish my paper now. After learning basic things in paper, we can play with elf32 headers how we want..you can distribute elf32 worm to systems via bypassing all IDS with this oh-day technique! Thats up to only your creativity.You should have deep assembly and elf32 file system knowledge to do that.. This paper has been written to be a basic for this bypassing methods etc.. Used linux source codes and elf headers as references in this paper.. /usr/include/linux/elf.h <--------- this header gives us all details about elf structure. --[ 0x4 - Greetz karak0rsan, l4m3r, n00b (dont forget about misdirection lol'd), GOBBLES, PHC and all blackhat community...hey man, you should contact me because someone is watchin' u, i know you hate "contributors" and still im waiting you ! someone offered me money to give information about you but i didn't accept coz im not like the others...dont forget ! © Offensive Security 2010
  3. Nasol examen. Nu stiam nimic legat de basm. Nu stiam nici de cine e scris, si credeam ca e "Harap Alb si merele de aur", credeam ca e si cu zmeu si cu span. Dar mi-am adus aminte cateva lucruri... Noroc cu fata care a fost in fata mea, super de treaba, orice o intrebam ma ajuta, si am copiat de la ea de pe foaie. Noua ne-au zis din start ca ne lasa sa vorbim dar nu ne lasa sa copiem. Si cineva statea la catedra si cineva in spate si se plimbau cam mereu prin banci. Nici nu aveam basmul pe foi, nu ma gandeam ca pica porcaria asta. La alte clase am inteles ca i-a prins cu foi, dar le-au luat foile si nu i-au dat afara. Si nu ma oftic ca nu am facut, ma enerveaza ca am stat sa citesc 10 rezumate si comentarii + 2 nuvele... La mate sa vedem ce va fi. Daca imi da cineva trebuie sa imi dea exercitiul cap-coada, degeaba imi zice ideea de rezolvare sau alte prostii. Plm, ce o fi o fi.
  4. Mda, am citit si eu Moara cu noroc, Alexandru Lapusneanul si 150 de pagini din Ion pentru bac, dar a picat basmul
  5. Usor ca se supara keylogger-ulutul pe voi
  6. Asta se va da maine, garantat!
  7. L-am inceput in urma cu mult timp in urma, dar nu am stat de el. Voia sa aiba multe... Suporta multiple conexiuni, sper ca fara probleme. Nu merge sa trimita Print Screen-ul. Nici nu mai stiu exact ce mai are pe acolo, vedeti voi. Serverul e sub forma de control ActiveX pentru a nu fi detectabil. Dupa ce se compileaza, se pune in fisierul de resurse al serverului care la initializare il copiaza in syste32 si il inregistreaza. Apoi serverul apeleaza functiile din controlul ActiveX. Download: http://rapidshare.com/files/403316383/Digital_Keylogger_v4.0.zip.html http://www.speedyshare.com/files/23155427/Digital_Keylogger_v4.0.zip http://www.2shared.com/file/gk-cd7YW/Digital_Keylogger_v40.html http://www.megaupload.com/?d=YNW0OKCA http://www.uploads.ws/NRMbYC Nu ma astept sa continuati proiectul, dar poate veti gasi ceva interesant si care sa va ajute pe acolo. Voiam sa ii pun multe prostii de optiuni...
  8. Mi-a placut cum a jucat azi Germania. Nu am vazut tot meciul. In schimb nu mi-a placut meciul Braziliei in care a fost eliminat Kaka... Cred ca Germania va castiga. Va trece si de Argentina.
  9. Sa fie! Eu nu prea imi fac griji. De un 7 tot fac si fara sa copiez.
  10. Nu au ce face, decat bruteforce...
  11. Eu pun foile pe banca, am sub forma de coloane mici si lungi, capsate pentru fiecare opera in parte. Daca trec printre banci le bag sib foaie sau pun mana peste ele, vad eu ce fac. Cele mai posibile, dupa parerea mea: Baltagul, Moara cu noroc sau un alt roman.
  12. Cica e posibil sa pice Baltagul
  13. Am citit 8 comentarii chiar, in 2 zile. Si facui azi fituici si am si memorand din acela... La mate e problema la mine...
  14. Mie mi-e ca iau nota mica sau nu iau si sar cu banurile pe voi
  15. Repostez: Ymsgr shits. Nu stiu ce fac si nu ma intereseaza. Nu stiu ce parametrii necesita si nu imi pasa. Incercati si voi prefs importcontacts insider publisher video call act aud from directory +type callto message locale acall callphone showvm callpc getrt getskin openui getplugin displayimage tabdata openurl logintosms enablelog customstatus addfriend sendfile im sendim p f pic u r tab
  16. Nytro

    Java power !!!!!!!

    Mi-a placut la nebunie porcaria asta
  17. Eu mi-am luat o sticla de Alexander (vodka cu lamaie, slaba: 28 de grade, 500 de ml). Nu stiu cat de buna e, era 20 de RON sticla, dar am mai baut una si mi-a placut. Daca pic bacul ii dau sec. Daca il iau probabil fac la fel
  18. yceman_yceman: Pack de 3 carticele, fiecare cu cate un subiect, de fapt subiectul II are si primele 40 de variante din subiectul III, fiecare costa 6 RON, toate 3 - 18 RON. LA fel am luat si la mate, desi nu ma vor ajuta cam deloc. Mie nu imi trebuie media, vreau sa iau peste 6 doar. Dar ceva imi spune ca voi lua peste 8. Cea mai mica medie de anul trecut la liceul meu a fost de 8. S-a copiat mult. Sper sa se poata si anul asta, daca nu vin profesori de la liceul "adversar"... Da, ar trebui sa dea toata lumea M1. Sa nu mai zica: "De ce iti e frica la romana?", sa le zicem si noi: "De ce iti e frica la mate?" Mie imi pare rau ca nu se mai da sport. Acolo luam si eu sigur 10, si chiar nu aveam nici o grija. Si ridica si media, impreuna cu oralul de la romana si ce se mai dadea. Asa, cu tampenile astea de competente am niste diplome de 2 lei pe care tot eu le-am platit... A, ma gandeam eu aseara... Daca ma da unul afara din bac ii dau pumn in gura . Macar sa ies si putin fericit de acolo. Daca e femeie nu fac nimic...
  19. E lista printr-un post de pe aici, dati si voi Search, am pus mai multe, unele au si parametrii.
  20. Nu am inteles ce vrei sa spui.
  21. Au inceput pe rand, mai intai cobein, apoi cabron. Intr-adevar, erau multi baieti pe care ii ducea capul pe acolo: Karcrack, cobein, cabr0n, Syntax_err, steve1xx00, Slayer616 si destui altii. Cred ca le-am cam pocit numele, dar ideea conteaza. Ar fi bine sa revina, am invatat cate ceva de pe acolo.
  22. Nici eu nu vreau sa fac 35 de posturi ca sa descarc o baza de date. In plus, dupa cateva posturi as putea primi ban pentru spam si m-am chinuit degeaba. A, si mie imi place mai mult aici.
  23. La romana daca citit rezumatele, daca pica roman sau nuvela o pagina o aveti asigurata, din capul vostru. Si daca va duce capul, din rezumat faceti singuri un comentariu. Bine, nu e ca cel copiat, dar daca nu veti putea copia, sau riscati foarte mult... Eu stiu 6 comentarii, nu le-am invatat, dar le-am citit si imi aduc aminte. Nu stiu deloc poeziile. Si mi-am facut profil pe telefon, ca silentios: "Examen" ca sa nu vibreze si nici sa nu se aprinda luminitele daca ma suna cineva. O sa fac poze la comentarii, le organizez bine... Si mai am carticele mici cu comentarii, le tin in buzunar si le pun pe banca. Si daca pot copia, o fac la nesimtire, cuvant cu cuvant, in functie de cat de greu pot copia. Daca ne lasa, mai bag si vrajeala de la mine. Sfatul meu e sa aveti chestii mici pe care sa le puneti direct pe banca. Rugati-va sa nu fiti in prima banca. A, baaaa! Vedeti ca in prima jumatate de ora probabil, va veni cineva, directorul liceului probabil sa stampileze foile. Nu copiati pana nu vin, sa nu va prinda ala, poate va face el scandal si va da afara.
  24. )) Porcaria asta e facuta de mine cu mii de ani in urma! Baaaan! Asta nu pentru ca ai hexat, ci pentru ca ai hexat porcaria aia
  25. Lasati romana, la mate e problema. Am niste carticele cu toate formulele, dar mie imi trebuie rezolvari cap-coada...
×
×
  • Create New...