늘모자란, 개발 :: [webhacking.kr] Challenge 34

늘모자란, 개발



34번에 들어오면 정겨운 메세지가 반겨준다. 뭘 잘못했다는지..

소스를 보면 아주 가관인 소스들이 반겨준다

<script>l1l=document.all;var naa=true;ll1=document.layers;lll=window.sidebar;naa=(!(l1l&&ll1)&&!(!l1l&&!ll1&&!lll));l11=navigator.userAgent.toLowerCase();function lI1(l1I){return l11.indexOf(l1I)>0?true:false};lII=lI1('kht')|lI1('per');naa|=lII;O0O0=new Array();O0O0[0]='<script>l1l=document.all;var naa=true;~1~~\r~~~layers~%~=win~w.sideb~;~~(!(~l&&~&)~J~F!~H~N~&~R~))~%1~\'~vigator.us~0Ag~+.~`Low~0Ca~e(~Wfunction lI1~G1I){retur~|~1.~7~>xOf}}>0?~!~#:f~~e}~%II=~~}za\'kht\')|}$(\'p~0}*~B~|}#}!;O00O=new Arr~.~s}8}:O[0]=\'<script>}Wf(do}Sumen}[.URL}r}_}p}e}nxO~    \\\'\'}8O}9}M~u||    };}MuYYvGUsPrTgKgtmIoOvIPKXjBJLVpjRT|\r|+}M~w~y~{ __\'+\'|9(|:|<}9}|\r};0}M%76%61|H2%20l%3|O3D\\167i|KEd|Y57w|PEo}0|Y6|O|L|TF|T|M3A|T0|TB|K6u|a|J63~y|a7|^|P|R|T3|P8|KC|T4|P9|H|v6{    35|TD|P|n7A|Y4|M2Fg|u{|T|J|W|Y2|}|N|K9n{2Efro|K{4{68~|Y0{5F|`14{2{3|t2{\r3B|a{3{JD|S{K|e|i2{5|i0{I{1ce{{I|T{@C{N|J{E|u|i|{1r{{N{za{$156{S|i{za|Q%{|N}Dy{{|P{`|T{B{5';O00O='fu';OO0O='OWkhHnBHDQcdCEOiTtMpvSOQsnnl';O00O+='nction __'+'__(_'+'O0){';O0OO='\166%61r%20l%32%3Dwi\156dow%2E\157p%65%72\141%3F%31%3A%30%3B%66unct\151%6F\156%20l%33%28l%34%29%7Bl%35%3D%2Fza%2Fg%3B\154%36%3DS%74r\151\156g%2Ef\162omChar%43%6Fd%65%28%30%29%3B%6C%34%3D\154%34%2E%72\145p%6C%61\143e%28l%35%2C%6C%36%29%3B\166\141%72%20l%37%3D\156\145%77%20Array%28%29%2C%6C%38%3D%5F%31%3Dl%34%2E\154ength%2Cl%39%2C%6C\111%2C%69l%3D%31%36%32%35%36%2C%5F%31%3D%30%2C%49%3D%30%2Cl\151%3D%27%27%3Bdo%7Bl%39%3D\154%34%2E%63%68a\162%43o%64\145%41\164%28%5F%31%29%3B\154\111%3Dl%34%2E%63\150a%72C\157\144%65\101\164%28%2B%2B%5F%31%29%3B%6C%37%5B\111%2B%2B%5D%3D\154\111%2B\151\154%2D%28\154%39%3C%3C%37%29%7Dw\150ile%28%5F%31%2B%2B%3Cl%38%29%3Bv\141r%20\154%31%3D%6E\145\167';O0O0[0]+='|n3|p{M{\n{P{m{65n{7|i4h{{{!3{\r2C{]4z{    69{N{z{"|T|V{3{b{    zza|o{|s{{Iz){Cz{|az|P{r{kB~{{N{F|Xzz{-|K3|a|t|l7{R1{:o{4{pzF|M7{{A%z\'z{c{G{Iz,{l5{JzOEz?z|LrCo{={?{91z{y2|vzizQz{{FB{jzQBz,zkzk5z{MztBi{]2{zP{|T{F{{{r{\r7Dwh|]yz    {yzR{zj|v3{|3{zT{H|Z{f{h|Q{Nz}>|H7|D};}J]|3}N0lDzy)}lB}_2|}N)!=-1y8{y*~a}q}X}g}p}sh}U}m}`y;y6PyG}QyWw|1}9y\'e~y[}<\'FZcXBu~dy~xRnnGtwnQpYWDoMCqHSyxjkPYy[0y\'l(~ves\'    xx    |<ca}0|?|B)}|y^~xx(|    |B}G}:}MVbOolLdFvrFXhHrDOXxBeCIQFh}CqvW}x mqtkNOVEjx}M|Dy\\|G|Q|rzD{(zCzyz{]z.|Wz{>5|dxS}C{X|HxX{zz{tzz-|p|V{Bz6|{z|t5zs{!zwz)5{zN|N~7|K{r{.{0{2{t3h{X{h{4|K{<{[{AI|S{cyy!|K8il{Szhzz;~Yz}zo|Y~Yzzxl{}{dz<zxtz*xw|Ww{mz{Nxs{yzrw\'{zw/x[z;zY|T{zaw&z.w(|vzzazz({G~yzBz&zw7{Jx{e|zztzz~wAy|[wz1wKyFx[zz<z\'wBsy!itcw{zqw&w?zQzx:{Nzm|T|rz.w^wd|L|i{5{@|twqwx{w$w.xi{]w({yw<w5w\\zw>{\'';O00O+='eva';OOOO='bZbJgXimpgJiRythFtjyLqqcUrROoOnOcGro';O00O+='l(unes'                            +'cape(_O0))}';eval                                    (O00O);OO00='kwQajkuWQqsOeyJwaOOOOPWOqVUfOOUpWyvcVmbXgrOOR';O00O='';O0OO+='%20\101\162r\141%79%28%29%2Cl%30%3D%6E%65w%20%41%72ra%79%28%29%2C\111%6C%3D%31%32%38%3B%64\157%7B%6C%30%5B%49\154%5D%3D%53%74rin%67%2Ef\162o%6D\103\150%61rCo\144\145%28\111\154%29%7Dw\150%69le%28%2D%2D\111l%29%3BIl%3D%31%32%38%3B\154%31%5B%30%5D%3Dli%3Dl%30%5B\154%37%5B%30%5D%5D%3B%6Cl%3D\154%37%5B%30%5D%3B%5Fl%3D%31%3B%76a%72%20%6C%5F%3D\154%37%2Elength%2D%31%3B%77\150i%6Ce%28%5Fl%3Cl%5F%29%7B%73%77%69\164%63%68%28\154%37%5B%5Fl%5D%3CIl%3F%31%3A%30%29%7Bc%61%73e%20%30%20%3A\154%30%5BIl%5D%3Dl%30%5Bll%5D%2B%53\164r%69n\147%28%6C%30%5Bl%6C%5D%29%2Esu%62\163t\162%28%30%2C%31%29%3B\154%31%5B%5Fl%5D%3Dl%30%5B\111\154%5D%3Bif%28%6C%32%29%7Bl%69%2B%3D\154%30%5B\111l%5D%7D%3B\142%72\145\141';OOO0='l';O0O0[0]+='zD~7{,8x[w.{]yxw{c{-wuubwu~!{ywq{zn|uyw1wivzaw-zrz,vw4z1f{\\w$|Ow^{Ww+|PywHw\'zs|Sxww{G|KzE|jea|1x#\'ly#}I}Ky\'y)}w}w}e}e}s}ZyYyY|;}yPy+}R}nyCyHy+}n}V}\\}cvNW}U~6g~)~N}O/~~~}]xPx}Mk{ 6z{66a|Hvzw[vxwoz|Mwh|nv%{v"xtwgw>Fv4w3vw9v({Ax[v+yw/|]zk|Wxrw1vw:uwuv6w/v2v$z&zxu    zpuv/zQ|}rwV6Evv\ruw0uu*vzEwu|i{T{>2svzPvz(yv|Z|k5v}6|vu"wzfz<zuyu#vz3uzlu { wiuQ|Hw4{){{byuOw8|U{z7uL2{[zNu<|N|zwfuDu:{m2zHv.u0zhz4xgyD{[{~e{{Q}v~|Nn{{|]wuMyv}xU{sy4wGz3tzU{>|{{v+w|]ux\\{9wVy{tzwx|tt|el~zzzAuuyufzpw{rv0z{zPt$x\\};zru/{\ru8u]|uz|t{~Ct.|KzJ{m7cu<|au={?~|ew{QwVzNw8lOufw4y#0 t[t\\}MlJ~7Eyg|||||||||!|#|%|\'|)|+|-|/wycyeygyiykymyoyqysyuW||9|9t\\ x|E~W|vt\'gMbLfyNyvpLHa|    sjDE|    hImUePWluiSxIMSw_CcHpJNQHcJkZUIOUKZeRRDmSkxPtOwx4SPJOZsRmsoCGWnoBLGfwSiFxlVOsdTMTuKsOObYtMElXOqswkwUdVGdE~pMOQUq|</~~~>';O0OO+='\153%3Bd\145%66a\165lt%3A%6C%31%5B%5Fl%5D%3Dl%30%5B\154%37%5B%5F%6C%5D%5D%3B\151f%28\154%32%29%7Bl%69%2B%3D%6C%30%5Bl%37%5B%5Fl%5D%5D%7D%3B\154%30%5BIl%5D%3D\154%30%5B\154%6C%5D%2B\123%74ri\156\147%28\154%30%5B%6C%37%5B%5F\154%5D%5D%29%2Es%75%62\163tr%28%30%2C%31%29%3Bb\162\145%61k%7D%3BI\154%2B%2B%3Bll%3Dl%37%5B%5Fl%5D%3B%5F%6C%2B%2B%7D%3Bi\146%28%21l%32%29%7Br\145%74%75\162n%28l%31%2Ej%6Fin%28%27%27%29%29%7D%65%6Cs\145%7B\162et%75\162n%20li%7D%7D%3Bva%72%20l\117%3D%27%27%3B%66\157r%28\151%69%3D%30%3Bii%3C\117%30\117%30%2El\145\156%67\164\150%3B%69\151%2B%2B%29%7B%6C\117%2B%3D%6C%33%28O%30\117%30%5B\151%69%5D%29%7D%3Bi%66%28\156a\141%29%7Bd%6Fc\165%6De%6Et%2E\167ri\164e%28\154O%29%7D%3B';OO00      ='RoxNlIkMOmOOWkhHnBHDQcdCEOiTtMpvSOQsnnlrbZbJgXimpgJiRythFtjyLqq';____    (O0OO);OOO0+='iDyZqTZVcfvUWakfMOsPeOSvGHFKsltOjiCGJyOldSwBXwDSOtKufLdbImGpuYuIBVSlKfOYexPgYdEwOaLbhqeOYZXOvEMnDCTXORmFveQTjPUdaNOxxOgtZpYsNjOOThVnOho';</script>


난독화랍시고 이렇게 해놔도 되는걸까?
뭐 .. 너무 쉽게 푼 감이 있고 블로그에 글을 적으면서 툴소개 비슷하게 되버리는것 같다만
나는 난독화를 풀려고 Firefox 애드온중 Javascript deobfuscator 를 사용하였다.

일전에도 사용한적이 있는데..
이건 너무 뜬금없게 다나오니 할말이 없다. 어쨌든 이 툴을 쓰면 아주 간단히 ... (보이는게 다가 아닐정도로 간단하다)
해결된다...


2016/04/01 16:46 2016/04/01 16:46