Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up
for free
5文字で書くJavaScript/ Shibuya.XSS techtalk #10
Masato Kinugawa
December 13, 2017
Technology
35
17k
5文字で書くJavaScript/ Shibuya.XSS techtalk #10
Shibuya.XSS techtalk #10 の発表資料です。
Masato Kinugawa
December 13, 2017
Tweet
Share
More Decks by Masato Kinugawa
See All by Masato Kinugawa
masatokinugawa
21
4.9k
masatokinugawa
5
67k
masatokinugawa
9
10k
masatokinugawa
17
10k
masatokinugawa
2
1.4k
masatokinugawa
20
20k
masatokinugawa
4
2.2k
masatokinugawa
7
2.1k
masatokinugawa
8
15k
Other Decks in Technology
See All in Technology
greymd
0
620
toshinoritakai
1
210
texmeijin
1
180
stakaya
12
7.8k
helayoty
0
130
ymas0315
0
170
shomaekawa
3
1.2k
ray_30cm_ns
0
280
ocise
0
150
iqbocchi
0
540
takuros
3
440
clustervr
0
140
Featured
See All Featured
marcelosomers
220
15k
paulrobertlloyd
71
3.6k
chrislema
173
14k
tammielis
237
23k
keavy
106
14k
orderedlist
PRO
329
35k
shlominoach
176
7.4k
62gerente
587
200k
vanstee
116
4.8k
jcasabona
7
520
keathley
18
640
reverentgeek
27
1.9k
Transcript
|>|>|>|>|>|>|>|>|>|>|>|>|>|>|>|>|>|> >|>|>|>|>|>|>|>|>|>|>|>|>|>|>|>|>|> |>|>|>|>|>|>|>|>|>|>|> |>|>|>|>|>|>|>|>|>|>|>
• • •
None
None
• • http://utf-8.jp/public/jjencode.html
• •
• • 0 1 2 3 4 5 6 7
8 9 a b c d e f g h i j k l m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
None
None
BANG!
|>
https://github.com/tc39/proposal-pipeline-operator The pipeline operator is essentially a useful syntactic sugar
on a function call with a single argument. |>
alert(1)
1 |> alert
• []()!+|> 8-2=6
• [] !+|> 6-1=5
• []+|> 5
• • •
None
• •
> Function("alert(1)") < ƒ anonymous() {alert(1)}
> Function("alert(1)")() OK
> [].constructor
> []["constructor"]
> []["constructor"] === Array < true > []["constructor"]["constructor"] === Function
< true
> []["constructor"]["constructor"]("alert(1)")() OK
> []["constructor"]["constructor"]("CODE")()
> []["constructor"]["constructor"]("CODE")()
> "CODE"|>[]["constructor"]["constructor"] > []["constructor"]["constructor"]("CODE")
> []|>"CODE"|>[]["constructor"]["constructor"] > []["constructor"]["constructor"]("CODE")()
exclaim(capitalize(doubleSay("hello"))); "hello" |> doubleSay |> capitalize |> exclaim;
> ("CODE"|>[]["constructor"]["constructor"])()
> ["CODE"|>[]["constructor"]["constructor"]][0]() ( Expression ) [ Expression ][0]
> []|>["CODE"|>[]["constructor"]["constructor"]][0]
> []|>["CODE"|>[]["constructor"]["constructor"]][0]
//JSFuckの基本型 []["constructor"]["constructor"]("CODE")() //5文字JSの基本型 []|>["CODE"|>[]["constructor"]["constructor"]][0]
None
> +[] < 0
> []>[] < false > [0]>[] < true
> [][[]] < undefined
> +[true][0] < 1 > +[true][0]+[true][0] < 2 > +[true][0]+[true][0]+[true][0]
< 3 > ...
> [true][0]+[] < "true" > [false][0]+[] < "false" > [undefined][0]+[]
< "undefined"
> ["true"][0][0] < "t" > ["true"][0][1] < "r" > ["true"][0][2]
< "u"
> []|>["CODE"|>[]["constructor"]["constructor"]][0]
> []["fill"]+[] < "function fill() { [native code] }"
None
[[][[[[]>[]]+[]][+[]][+[]]+[[[[]>[]]+[]][+[]]+[][[]]][+[]][+[[+[]]>[]][+[]]+[+[]]]+[[[]>[]]+[]][+[]][+[ [+[]]>[]][+[]]+[[+[]]>[]][+[]]]+[[[]>[]]+[]][+[]][+[[+[]]>[]][+[]]+[[+[]]>[]][+[]]]]+[]][+[]][+[[+[]] >[]][+[]]+[[+[]]>[]][+[]]+[[+[]]>[]][+[]]]+[[][[[[]>[]]+[]][+[]][+[]]+[[[[]>[]]+[]][+[]]+[][[]]][+[]][+ [[+[]]>[]][+[]]+[+[]]]+[[[]>[]]+[]][+[]][+[[+[]]>[]][+[]]+[[+[]]>[]][+[]]]+[[[]>[]]+[]][+[]][+[[+[]]> []][+[]]+[[+[]]>[]][+[]]]]+[]][+[]][+[[+[]]>[]][+[]]+[[+[]]>[]][+[]]+[[+[]]>[]][+[]]+[[+[]]>[]][+[]]+ [[+[]]>[]][+[]]+[[+[]]>[]][+[]]]+[[][[]]+[]][+[]][+[[+[]]>[]][+[]]]+[[[]>[]]+[]][+[]][+[[+[]]>[]][+[]] +[[+[]]>[]][+[]]+[[+[]]>[]][+[]]]+[[[+[]]>[]]+[]][+[]][+[]]+[[[+[]]>[]]+[]][+[]][+[[+[]]>[]][+[]]]+[[ [+[]]>[]]+[]][+[]][+[[+[]]>[]][+[]]+[[+[]]>[]][+[]]]+[[][[[[]>[]]+[]][+[]][+[]]+[[[[]>[]]+[]][+[]]+[][[ ]]][+[]][+[[+[]]>[]][+[]]+[+[]]]+[[[]>[]]+[]][+[]][+[[+[]]>[]][+[]]+[[+[]]>[]][+[]]]+[[[]>[]]+[]][+[]] [+[[+[]]>[]][+[]]+[[+[]]>[]][+[]]]]+[]][+[]][+[[+[]]>[]][+[]]+[[+[]]>[]][+[]]+[[+[]]>[]][+[]]]+[[[+[]
]>[]]+[]][+[]][+[]]+[[][[[[]>[]]+[]][+[]][+[]]+[[[[]>[]]+[]][+[]]+[][[]]][+[]][+[[+[]]>[]][+[]]+[+[]]]+ [[[]>[]]+[]][+[]][+[[+[]]>[]][+[]]+[[+[]]>[]][+[]]]+[[[]>[]]+[]][+[]][+[[+[]]>[]][+[]]+[[+[]]>[]][+[]] ]]+[]][+[]][+[[+[]]>[]][+[]]+[[+[]]>[]][+[]]+[[+[]]>[]][+[]]+[[+[]]>[]][+[]]+[[+[]]>[]][+[]]+[[+[]]>[ ]][+[]]]+[[[+[]]>[]]+[]][+[]][+[[+[]]>[]][+[]]]
> []|>["alert(1)"|>[]["constructor"]["constructor"]][0]
[]|>[[[[]>[]]+[]][+[]][+[[+[]]>[]][+[]]]+[[[]>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[]][+[]][+[[+[]]>[]][+[]]+[[+[]]>[]][+[]]+[[+[]]>[]][+[]]]+[[[+[]]>[]]+[]][+[]] [+[]]+[[][[[[]>[]]+[]][+[]][+[]]+[[[[]>[]]+[]][+[]]+[][[]]][+[]][+[[+[]]>[]][+[]]+[+[]]]+[[[]>[]]+[]][+[]][ +[[+[]]>[]][+[]]+[[+[]]>[]][+[]]]+[[[]>[]]+[]][+[]][+[[+[]]>[]][+[]]+[[+[]]>[]][+[]]]]+[]][+[]][+[[+[]]>[]] [+[]]+[[+[]]>[]][+[]]+[[+[]]>[]][+[]]+[[+[]]>[]][+[]]+[[+[]]>[]][+[]]+[[+[]]>[]][+[]]]+[[[+[]]>[]]+[]][+[]] [+[[+[]]>[]][+[]]]]][+[]] OK
unescape("%u0051")
https://syllab.fr/projets/experiments/xcharsjs/5chars.pipeline. html https://babeljs.io/repl/build/5099/#?babili=false&browsers=& build=&builtIns=false&code_lz=IwHwfAhgNgpgTgFyA&debug=f alse&circleciRepo=&evaluate=true&lineWrap=false&presets=st age-0&prettier=false&targets=&version=7.0.0- beta.2%2Bpr.6335
• •
|>|>|>|>|>|>|>|>|>|>|>|>|>|>|>|>|>|> >|>|>|>|>|>|>|>|>|>|>|>|>|>|>|>|>|>