Tags: misc javascript 

Rating:

The challenge hint says: it use eval and want from us to print " bcactf " to a console:

_____________________

This is the Payload :

`$={}+!1;$[2]+$[5]+$[16]+$[5]+$[6]+$[15];`

_____________________

"**$**" Variable Contain "**{}**" and "**!1**" concatenated, and will translated on Javascript to:

`{} ` // ----> "[object Object]"

`!1` // ----> "false"

_____________________

Combine them to use it as a variable with indexing []:

`$={}+!1;` // we define "**$**" variable with content : **[object Object]false**
+
`$[2] ` //b is secend index on [object Object]false
+
`$[5] ` //c
+
`$[16] ` //a
+
`$[5] ` //c
+
`$[6]` //t
+
`$[15] ` //f

_____________________

PoC:

-

└─ nc misc.bcactf.com 49156
Get the flag by making the calculator output "bcactf"!

`> $={}+!1;$[2]+$[5]+$[16]+$[5]+$[6]+$[15];`

Result: bcactf
Congrats! The flag is bcactf{G00D_EV4LUAT1ON}

_____________________

> Saudi Team