* Refactor of bflt to guess arch & fix m68k code * Fix endianness issues * Always cleanup at the end on travis ci
713 lines
12 KiB
Text
713 lines
12 KiB
Text
NAME=CC-*
|
|
FILE=bins/mach0/FileDP
|
|
CMDS=<<EOF
|
|
C~?
|
|
CCl~?
|
|
CC-*
|
|
CCl~?
|
|
C~?
|
|
EOF
|
|
EXPECT=<<EOF
|
|
43
|
|
13
|
|
0
|
|
30
|
|
EOF
|
|
RUN
|
|
|
|
NAME=CCf-*
|
|
FILE=bins/mach0/FileDP
|
|
CMDS=<<EOF
|
|
af
|
|
CCf-*~?
|
|
CC hello
|
|
CC world @ $$+32
|
|
CCf~?
|
|
CCf-*
|
|
CCf~?
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0
|
|
2
|
|
0
|
|
EOF
|
|
RUN
|
|
|
|
NAME=Cs
|
|
FILE=malloc://1024
|
|
CMDS=<<EOF
|
|
w hello world
|
|
Cs @ $$
|
|
C~[1]
|
|
EOF
|
|
EXPECT=<<EOF
|
|
ascii[12]
|
|
EOF
|
|
RUN
|
|
|
|
NAME=Cs 5
|
|
FILE=malloc://1024
|
|
CMDS=<<EOF
|
|
w hello world
|
|
Cs 5
|
|
C~[1]
|
|
EOF
|
|
EXPECT=<<EOF
|
|
ascii[5]
|
|
EOF
|
|
RUN
|
|
|
|
NAME=Cd : data
|
|
FILE=malloc://1024
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e asm.bytes=true
|
|
e asm.bits=32
|
|
w 909090
|
|
Cd 3
|
|
pd 2
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x00000000 hex length=3 delta=0
|
|
0x00000000 3930 39 909
|
|
|
|
0x00000003 3039 xor byte [ecx], bh
|
|
EOF
|
|
RUN
|
|
|
|
NAME=Cd : data + align
|
|
FILE=malloc://1024
|
|
BROKEN=1
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e asm.bits=32
|
|
w 909090
|
|
Cd 3
|
|
s 1
|
|
pd 2
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x00000001 hex length=3 delta=1
|
|
0x00000001 30 39 09
|
|
|
|
0x00000003 3039 xor byte [ecx], bh
|
|
EOF
|
|
RUN
|
|
|
|
NAME=Cs : convert to string
|
|
FILE=malloc://1024
|
|
CMDS=<<EOF
|
|
w hello
|
|
Cs 6
|
|
pd 1
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x00000000 .string "hello" ; len=6
|
|
EOF
|
|
RUN
|
|
|
|
NAME=Cs : concatenated strings bug
|
|
FILE=malloc://1024
|
|
CMDS=<<EOF
|
|
w hello\x00world
|
|
Cs 6
|
|
Cs 6@ 6
|
|
pd 2
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x00000000 .string "hello" ; len=6
|
|
0x00000006 .string "world" ; len=6
|
|
EOF
|
|
RUN
|
|
|
|
NAME=Cs : string count bug
|
|
FILE=malloc://128
|
|
CMDS=<<EOF
|
|
w hello
|
|
Cs 6
|
|
C~?
|
|
EOF
|
|
EXPECT=<<EOF
|
|
1
|
|
EOF
|
|
RUN
|
|
|
|
NAME=Ch : hide bytes in pd
|
|
FILE=malloc://128
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
e asm.bytes=true
|
|
e asm.bits=64
|
|
e scr.color=false
|
|
wx 554889e54883c768
|
|
Ch 2
|
|
pd 2
|
|
Ch-
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x00000000 (2 bytes hidden)
|
|
0x00000002 89e5 mov ebp, esp
|
|
EOF
|
|
RUN
|
|
|
|
NAME=Ch : add/del hide bytes
|
|
FILE=malloc://1024
|
|
CMDS=<<EOF
|
|
e scr.color=false
|
|
wx 554889e54883c768
|
|
Ch 2@ 0x100
|
|
C~?
|
|
Ch-@ 0x100
|
|
C~?
|
|
EOF
|
|
EXPECT=<<EOF
|
|
1
|
|
0
|
|
EOF
|
|
RUN
|
|
|
|
NAME=Cf should be silent
|
|
FILE==
|
|
CMDS=Cf 32 2xx
|
|
EXPECT=
|
|
RUN
|
|
|
|
NAME=format memory metadata
|
|
FILE==
|
|
CMDS=<<EOF
|
|
e asm.arch=x86
|
|
wx 41424344
|
|
Cf 4 x
|
|
pd 1
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x00000000 pf x # size=4
|
|
0x00000000 = 0x44434241
|
|
EOF
|
|
RUN
|
|
|
|
NAME=arm1.bin dword pointers with Cd
|
|
FILE=bins/elf/arm1.bin
|
|
CMDS=<<EOF
|
|
s 0xdb98
|
|
Cd 4 3
|
|
pd 3
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x0000db98 .dword 0x00085038 ; obj.main_arena
|
|
0x0000db9c .dword 0x000844ac ; obj.check_action
|
|
0x0000dba0 .dword 0x000663c4 ; str.free__:_invalid_pointer
|
|
EOF
|
|
RUN
|
|
|
|
NAME=arm1.bin dword pointers with Cd and ahi 1
|
|
FILE=bins/elf/arm1.bin
|
|
CMDS=<<EOF
|
|
s 0xdb98
|
|
Cd 4 3
|
|
ahi 1
|
|
pd 3
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x0000db98 .int32 00111000010100000000100000000000b ; obj.main_arena
|
|
0x0000db9c .dword 0x000844ac ; obj.check_action
|
|
0x0000dba0 .dword 0x000663c4 ; str.free__:_invalid_pointer
|
|
EOF
|
|
RUN
|
|
|
|
NAME=arm1.bin dword pointers with Cd and ahi 8
|
|
FILE=bins/elf/arm1.bin
|
|
CMDS=<<EOF
|
|
s 0xdb98
|
|
Cd 4 3
|
|
ahi 8
|
|
pd 3
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x0000db98 .int32 2050070o ; obj.main_arena
|
|
0x0000db9c .dword 0x000844ac ; obj.check_action
|
|
0x0000dba0 .dword 0x000663c4 ; str.free__:_invalid_pointer
|
|
EOF
|
|
RUN
|
|
|
|
NAME=arm1.bin dword pointers with Cd and ahi 10
|
|
FILE=bins/elf/arm1.bin
|
|
CMDS=<<EOF
|
|
s 0xdb98
|
|
Cd 4 3
|
|
ahi 10
|
|
pd 3
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x0000db98 .int32 544824 ; obj.main_arena
|
|
0x0000db9c .dword 0x000844ac ; obj.check_action
|
|
0x0000dba0 .dword 0x000663c4 ; str.free__:_invalid_pointer
|
|
EOF
|
|
RUN
|
|
|
|
NAME=arm1.bin dword pointers with Cd and ahi 16
|
|
FILE=bins/elf/arm1.bin
|
|
CMDS=<<EOF
|
|
s 0xdb98
|
|
Cd 4 4
|
|
ahi 16
|
|
pd 3
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x0000db98 .dword 0x00085038 ; obj.main_arena
|
|
0x0000db9c .dword 0x000844ac ; obj.check_action
|
|
0x0000dba0 .dword 0x000663c4 ; str.free__:_invalid_pointer
|
|
EOF
|
|
RUN
|
|
|
|
NAME=Ch and CCu on instr with potential LEA cmt
|
|
FILE=bins/pe/ConsoleApplication1.exe
|
|
CMDS=<<EOF
|
|
Ch 6 @ 0x004010fa
|
|
CCu get error @ 0x004010fa
|
|
pd 1 @ 0x004010fa
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x004010fa (6 bytes hidden) ; get error
|
|
EOF
|
|
RUN
|
|
|
|
NAME=C[Chsdmf][*j] without arguments
|
|
FILE=malloc://1024
|
|
CMDS=<<EOF
|
|
k analysis/meta/range.0x5=0x5120
|
|
w hello world
|
|
Cs @ $$
|
|
s 0x100
|
|
e asm.arch=x86
|
|
e asm.bits=32
|
|
w 909090
|
|
Cd 3
|
|
s 0x200
|
|
wx 554889e54883c768
|
|
Ch 2
|
|
s 0x300
|
|
wx 41424344
|
|
Cf 4 x
|
|
s 0x0
|
|
CCu Hello!
|
|
s 0x380
|
|
wx cafebabe00000032
|
|
Cm 8 wwww
|
|
Csl
|
|
echo ----
|
|
Cdl
|
|
echo ----
|
|
Chl
|
|
echo ----
|
|
Cfl
|
|
echo ----
|
|
CCl
|
|
echo ----
|
|
Cml
|
|
echo ----
|
|
C
|
|
echo ----
|
|
Cslj
|
|
echo ----
|
|
Cdlj
|
|
echo ----
|
|
Chlj
|
|
echo ----
|
|
Cflj
|
|
echo ----
|
|
CClj
|
|
echo ----
|
|
Cmlj
|
|
echo ----
|
|
Cj
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x00000000 ascii[12] "hello world"
|
|
----
|
|
0x00000100 data Cd 3
|
|
----
|
|
0x00000200 hidden Ch 2
|
|
----
|
|
0x00000300 format 4 x
|
|
----
|
|
0x00000000 CCu "Hello!"
|
|
----
|
|
0x00000380 magic 8 wwww
|
|
----
|
|
0x00000000 ascii[12] "hello world"
|
|
0x00000000 CCu "Hello!"
|
|
0x00000100 data Cd 3
|
|
0x00000200 hidden Ch 2
|
|
0x00000300 format 4 x
|
|
0x00000380 magic 8 wwww
|
|
----
|
|
[{"offset":0,"type":"Cs","name":"aGVsbG8gd29ybGQ=","enc":"ascii","ascii":true}]
|
|
----
|
|
[{"offset":256,"type":"Cd","name":"3","size":3}]
|
|
----
|
|
[{"offset":512,"type":"Ch","name":"2"}]
|
|
----
|
|
[{"offset":768,"type":"Cf","name":"x"}]
|
|
----
|
|
[{"offset":0,"type":"CCu","name":"Hello!"}]
|
|
----
|
|
[{"offset":896,"type":"Cm","name":"wwww"}]
|
|
----
|
|
[{"offset":0,"type":"Cs","name":"aGVsbG8gd29ybGQ=","enc":"ascii","ascii":true},{"offset":0,"type":"CCu","name":"Hello!"},{"offset":256,"type":"Cd","name":"3","size":3},{"offset":512,"type":"Ch","name":"2"},{"offset":768,"type":"Cf","name":"x"},{"offset":896,"type":"Cm","name":"wwww"}]
|
|
EOF
|
|
RUN
|
|
|
|
NAME=Cs ascii/8bit
|
|
FILE=bins/pe/testapp-msvc64.exe
|
|
CMDS=<<EOF
|
|
Csb @ 0x1400160a0
|
|
Csl~gate
|
|
Csl~ANSI
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x1400160a0 8bit[18] "latin1 gate: \xce\xbb\xab\xce"
|
|
0x1400160b8 ascii[50] " -- in ConEmu, run `chcp 28591` to see the gate."
|
|
0x140016000 ascii[19] "\tANSI\esc: \e[33m\r\n"
|
|
EOF
|
|
RUN
|
|
|
|
NAME=Cslj ascii/8bit
|
|
FILE=bins/pe/testapp-msvc64.exe
|
|
ARGS=-z
|
|
CMDS=<<EOF
|
|
Csb @ 0x1400160a0
|
|
Csb @ 0x1400160b8
|
|
Cslj
|
|
EOF
|
|
EXPECT=<<EOF
|
|
[{"offset":5368799392,"type":"Cs","name":"bGF0aW4xIGdhdGU6IM67q84=","enc":"ascii","ascii":false},{"offset":5368799416,"type":"Cs","name":"ICAtLSBpbiBDb25FbXUsIHJ1biBgY2hjcCAyODU5MWAgdG8gc2VlIHRoZSBnYXRlLg==","enc":"ascii","ascii":true}]
|
|
EOF
|
|
RUN
|
|
|
|
NAME=Csb, Cs. and Cs.l
|
|
FILE=bins/pe/testapp-msvc64.exe
|
|
CMDS=<<EOF
|
|
e str.escbslash=true
|
|
s 0x140016018
|
|
Csb
|
|
Csl~`spad`
|
|
Cs.q
|
|
Cs.
|
|
Cs.l
|
|
pd 1
|
|
Cs-
|
|
Csw
|
|
Csl~`spad`
|
|
Cs.q
|
|
Cs.
|
|
Cs.l
|
|
pd 1
|
|
Cs-
|
|
Csb 4
|
|
Cs.l
|
|
Cs.l @ 0x14001601c # should print nothing
|
|
Csb 4
|
|
Cs.l
|
|
Cs.l @ 0x14001601c # should print nothing
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x140016018 ascii[2] "\t"
|
|
"\t"
|
|
ascii[2] "\t"
|
|
0x140016018 ascii[2] "\t"
|
|
;-- str.wide_esc:___0m:
|
|
0x140016018 .string "\t" ; len=2
|
|
0x140016018 utf16le[38] "\twide\\esc: \e[0m¡\r\n"
|
|
"\twide\\esc: \e[0m¡\r\n"
|
|
utf16le[38] "\twide\\esc: \e[0m¡\r\n"
|
|
0x140016018 utf16le[38] "\twide\\esc: \e[0m¡\r\n"
|
|
;-- str.wide_esc:___0m:
|
|
0x140016018 .string "\twide\\esc: \e[0m\xc2\xa1\r\n" ; len=38
|
|
0x140016018 ascii[4] "\t"
|
|
0x140016018 ascii[4] "\t"
|
|
EOF
|
|
RUN
|
|
|
|
NAME=Csb, Csw, Cs and Cslj
|
|
FILE=bins/pe/testapp-msvc64.exe
|
|
ARGS=-e bin.str.purge=all,!0x140016018
|
|
CMDS=<<EOF
|
|
s 0x140016018
|
|
Cslj
|
|
Cs-
|
|
Csb
|
|
Cslj
|
|
Cs-
|
|
Csw
|
|
Cslj
|
|
Cs-
|
|
Cs
|
|
Cslj
|
|
EOF
|
|
EXPECT=<<EOF
|
|
[{"offset":5368799256,"type":"Cs","name":"CXdpZGVcZXNjOiAbWzBtwqENCg==","enc":"utf16le","ascii":false}]
|
|
[{"offset":5368799256,"type":"Cs","name":"CQ==","enc":"ascii","ascii":true}]
|
|
[{"offset":5368799256,"type":"Cs","name":"CXdpZGVcZXNjOiAbWzBtwqENCg==","enc":"utf16le","ascii":false}]
|
|
[{"offset":5368799256,"type":"Cs","name":"CXdpZGVcZXNjOiAbWzBtwqENCg==","enc":"utf16le","ascii":false}]
|
|
EOF
|
|
RUN
|
|
|
|
NAME=Cs8
|
|
FILE=bins/elf/strenc
|
|
ARGS=-e search.str.check_ascii_freq=false
|
|
CMDS=<<EOF
|
|
e str.escbslash=true
|
|
s 0x004021ff
|
|
Csl~`spad`
|
|
Cs.q
|
|
Cs.
|
|
Cs.l
|
|
pd 1
|
|
Cs8
|
|
Csl~`spad`
|
|
Cs.q
|
|
Cs.
|
|
Cs.l
|
|
pd 1
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x004021ff utf8[61] "utf8> \\u00a2\\u20ac\\U00010348 in yellow:\e[33m ¢€𐍈 \e[0m\n"
|
|
"utf8> \\u00a2\\u20ac\\U00010348 in yellow:\e[33m ¢€𐍈 \e[0m\n"
|
|
utf8[61] "utf8> \\u00a2\\u20ac\\U00010348 in yellow:\e[33m ¢€𐍈 \e[0m\n"
|
|
0x004021ff utf8[61] "utf8> \\u00a2\\u20ac\\U00010348 in yellow:\e[33m ¢€𐍈 \e[0m\n"
|
|
;-- str.utf8___u00a2_u20ac_U00010348_in_yellow:__33m_____________0m:
|
|
0x004021ff .string "utf8> \\u00a2\\u20ac\\U00010348 in yellow:\e[33m ¢€𐍈 \e[0m\n" ; len=61
|
|
0x004021ff utf8[61] "utf8> \\u00a2\\u20ac\\U00010348 in yellow:\e[33m ¢€𐍈 \e[0m\n"
|
|
"utf8> \\u00a2\\u20ac\\U00010348 in yellow:\e[33m ¢€𐍈 \e[0m\n"
|
|
utf8[61] "utf8> \\u00a2\\u20ac\\U00010348 in yellow:\e[33m ¢€𐍈 \e[0m\n"
|
|
0x004021ff utf8[61] "utf8> \\u00a2\\u20ac\\U00010348 in yellow:\e[33m ¢€𐍈 \e[0m\n"
|
|
;-- str.utf8___u00a2_u20ac_U00010348_in_yellow:__33m_____________0m:
|
|
0x004021ff .string "utf8> \\u00a2\\u20ac\\U00010348 in yellow:\e[33m ¢€𐍈 \e[0m\n" ; len=61
|
|
EOF
|
|
RUN
|
|
|
|
NAME=Cs8 and Cslj
|
|
FILE=bins/elf/strenc
|
|
ARGS=-e bin.str.purge=all,!0x004021ff -e search.str.check_ascii_freq=false
|
|
CMDS=<<EOF
|
|
s 0x004021ff
|
|
Csl
|
|
Cslj
|
|
Cs-
|
|
Cs8
|
|
Csl
|
|
Cslj
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x004021ff utf8[61] "utf8> \u00a2\u20ac\U00010348 in yellow:\e[33m ¢€𐍈 \e[0m\n"
|
|
[{"offset":4203007,"type":"Cs","name":"dXRmOD4gXHUwMGEyXHUyMGFjXFUwMDAxMDM0OCBpbiB5ZWxsb3c6G1szM20gwqLigqzwkI2IIBtbMG0K","enc":"utf8","ascii":false}]
|
|
0x004021ff utf8[61] "utf8> \u00a2\u20ac\U00010348 in yellow:\e[33m ¢€𐍈 \e[0m\n"
|
|
[{"offset":4203007,"type":"Cs","name":"dXRmOD4gXHUwMGEyXHUyMGFjXFUwMDAxMDM0OCBpbiB5ZWxsb3c6G1szM20gwqLigqzwkI2IIBtbMG0K","enc":"utf8","ascii":false}]
|
|
EOF
|
|
RUN
|
|
|
|
NAME=str.escbslash and Cs
|
|
FILE=bins/pe/testapp-msvc64.exe
|
|
CMDS=<<EOF
|
|
s 0x140016000
|
|
Csb
|
|
e str.escbslash=true
|
|
Cs.q
|
|
Cs.
|
|
Cs.l
|
|
pd 1
|
|
e str.escbslash=false
|
|
Cs.q
|
|
Cs.
|
|
Cs.l
|
|
pd 1
|
|
EOF
|
|
EXPECT=<<EOF
|
|
"\tANSI\\esc: \e[33m\r\n"
|
|
ascii[19] "\tANSI\\esc: \e[33m\r\n"
|
|
0x140016000 ascii[19] "\tANSI\\esc: \e[33m\r\n"
|
|
;-- str.ANSI_esc:___33m:
|
|
;-- section..data:
|
|
0x140016000 .string "\tANSI\\esc: \e[33m\r\n" ; len=19 ; [02] -rw- section size 8192 named .data
|
|
"\tANSI\esc: \e[33m\r\n"
|
|
ascii[19] "\tANSI\esc: \e[33m\r\n"
|
|
0x140016000 ascii[19] "\tANSI\esc: \e[33m\r\n"
|
|
;-- str.ANSI_esc:___33m:
|
|
;-- section..data:
|
|
0x140016000 .string "\tANSI\esc: \e[33m\r\n" ; len=19 ; [02] -rw- section size 8192 named .data
|
|
EOF
|
|
RUN
|
|
|
|
NAME=Cd- <size> <repeat>
|
|
FILE==
|
|
CMDS=<<EOF
|
|
s 0x100
|
|
Cd 4 5
|
|
Cdl
|
|
echo ----
|
|
Cd- 4 3
|
|
Cdl
|
|
echo ----
|
|
s 0x10c
|
|
Cd- 0 2
|
|
Cdl
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x00000100 data Cd 4
|
|
0x00000104 data Cd 4
|
|
0x00000108 data Cd 4
|
|
0x0000010c data Cd 4
|
|
0x00000110 data Cd 4
|
|
----
|
|
0x0000010c data Cd 4
|
|
0x00000110 data Cd 4
|
|
----
|
|
0x0000010c data Cd 4
|
|
0x00000110 data Cd 4
|
|
EOF
|
|
RUN
|
|
|
|
NAME=delete specific type of metadata from addr
|
|
FILE==
|
|
CMDS=<<EOF
|
|
s 0x100
|
|
w abcd
|
|
Csb 4
|
|
Cf 8 xx
|
|
C
|
|
echo ----
|
|
Cs-
|
|
C
|
|
echo ----
|
|
Cf-
|
|
C
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x00000100 ascii[4] "abcd"
|
|
0x00000100 format 8 xx
|
|
----
|
|
0x00000100 format 8 xx
|
|
----
|
|
EOF
|
|
RUN
|
|
|
|
NAME=C-
|
|
FILE==
|
|
CMDS=<<EOF
|
|
s 0x100
|
|
w abcd
|
|
Csb 4
|
|
Cf 8 xx
|
|
CCu a string
|
|
C
|
|
echo ----
|
|
C-
|
|
C
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x00000100 ascii[4] "abcd"
|
|
0x00000100 format 8 xx
|
|
0x00000100 CCu "a string"
|
|
----
|
|
EOF
|
|
RUN
|
|
|
|
NAME=Cd- and C- in issue #8648
|
|
FILE==
|
|
CMDS=<<EOF
|
|
s 0x100
|
|
Cd 4 1
|
|
C~Cd
|
|
echo --1--
|
|
Cd 4 1
|
|
Cd-
|
|
C~Cd
|
|
echo --2--
|
|
Cd 4 1
|
|
C-
|
|
C~Cd
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x00000100 data Cd 4
|
|
--1--
|
|
--2--
|
|
EOF
|
|
RUN
|
|
|
|
NAME=Cd. (#10856)
|
|
FILE==
|
|
CMDS=<<EOF
|
|
s 0x50
|
|
Cd 4 2
|
|
Cd.
|
|
s 0x100
|
|
Cd. @ 0x50
|
|
EOF
|
|
EXPECT=<<EOF
|
|
4
|
|
4
|
|
EOF
|
|
RUN
|
|
|
|
NAME=C.
|
|
FILE=bins/elf/arm1.bin
|
|
CMDS=<<EOF
|
|
s 0x0007a23c
|
|
C.
|
|
s 0x00083fc4
|
|
C.
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x0007a23c ascii[13] "match_symbol"
|
|
0x00083fc4 CCu "[13] -rw- section size 4 named .init_array"
|
|
0x00083fc4 data Cd 4
|
|
EOF
|
|
RUN
|
|
|
|
NAME=Csp
|
|
FILE==
|
|
CMDS=<<EOF
|
|
wx 0f54686520737562737472696e672022;sd +16
|
|
wx 0000000000000000122220697320696e;sd +16
|
|
wx 20746865207465787420220000000000;sd +16
|
|
wx 12206174206279746520706f73697469;sd +16
|
|
wx 6f6e2000000000001a20616e64206120;sd +16
|
|
wx 636f6465706f696e7420706f73697469;sd +16
|
|
wx 6f6e2000;sd +4
|
|
Csp @ 0x0
|
|
Csl
|
|
Cs-*
|
|
Csp @ 0x18
|
|
Csl
|
|
Cs-*
|
|
Csp @ 0x30
|
|
Csl
|
|
Cs-*
|
|
Csp @ 0x48
|
|
Csl
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x00000001 utf8[15] "The substring ""
|
|
0x00000019 utf8[18] "" is in the text ""
|
|
0x00000031 utf8[18] " at byte position "
|
|
0x00000049 utf8[26] " and a codepoint position "
|
|
EOF
|
|
RUN
|
|
|
|
NAME=Csl
|
|
FILE=bins/arm/crackme.arm32.bin
|
|
ARGS=-A -a arm -b 32 -m 0x8000000
|
|
CMDS=<<EOF
|
|
Csl
|
|
EOF
|
|
EXPECT=<<EOF
|
|
0x08002364 ascii[23] "Bare_Metal_Crackme_01"
|
|
0x0800237c ascii[59] "Enter_the_correct_combination_of_signals_and_press_button."
|
|
0x080023b8 ascii[19] "__________________"
|
|
0x080023cc ascii[19] "Success"
|
|
0x080023e0 ascii[33] "The_flag_is:_XXXXXXXXXXXXXXXXXX"
|
|
0x08002404 ascii[36] "Unlock_criteria_not_met._Try_again"
|
|
EOF
|
|
RUN
|
|
|