03.10.2016 Views

Investigation of Linux.Mirai Trojan family

u97CXm

u97CXm

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

15<br />

15<br />

.text:0804B3C1 call ___libc_write<br />

.text:0804B3C6 add esp, 0Ch<br />

.text:0804B3C9 push 1 ; int<br />

.text:0804B3CB push <strong>of</strong>fset newline ; int<br />

.text:0804B3D0 push 1 ; fd<br />

.text:0804B3D2 call ___libc_write<br />

Then the <strong>Trojan</strong> removes its name to hide itself:<br />

.text:0804B3D8 mov ebp, [esi] ; esi = argv[0]<br />

.text:0804B3DA push ebp ; a1<br />

.text:0804B3DB call strlen<br />

.text:0804B3E0 add esp, 10h<br />

.text:0804B3E3 mov ecx, eax<br />

.text:0804B3E5 test eax, eax<br />

.text:0804B3E7 jle short loc_804B3F6<br />

.text:0804B3E9 xor edx, edx<br />

.text:0804B3EB<br />

.text:0804B3EB loc_804B3EB:<br />

; CODE XREF: main<br />

+94j<br />

.text:0804B3EB mov eax, [esi]<br />

.text:0804B3ED mov byte ptr [eax+edx], 0<br />

.text:0804B3F1 inc edx<br />

.text:0804B3F2 cmp ecx, edx<br />

.text:0804B3F4 jnz short loc_804B3EB<br />

The child processes are subsequently launched (the code is simplified and contains no requests to the<br />

configuration):<br />

//here is parent<br />

pid_t child = fork();<br />

(child > 0){<br />

}<br />

waitpid(child, &status, 0); //waiting until child die<br />

exit();<br />

if(!child){ //child executing this<br />

}<br />

pid_t child2 = fork();<br />

if(child2 > 0){//we spawn children—time to die<br />

}<br />

exit(); //after this exit() grandpa will die too<br />

pid_t child3 = fork();

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!