권장 : ASP 구성 요소가없는 페이징 구현 아이디어 및 코드 구성 요소가없는 페이지 매김은 믿어지지 않습니다. 이 기사의 효과를 살펴보면 알게 될 것입니다. 아래 구현을 공유해 봅시다. 관심있는 친구들이 그것을 언급 할 수 있습니다.
제목 : ASP EWEBEDITOR v3.8 열 디렉토리 취약점 (기타 버전은 테스트입니다)
취약성 파일 : ASP/Browse.asp
취약성이 발생합니다.
Sub Initparam ()
stype = ucase (trim (request.querystring (type))) sstylename = trim (request.querystring (style)) scusdir = trim (request.querystring (cusdir)) dim i, Astyleconfig, bvalidstylebvalidstyle = 1 to ubound (astyle) attyleconfig = astyle (astyle) (i). lcase (sstylename) = lcase (astyleconfig (0)) thenbvalidstyle = trueexit forend ifnextif bvalidstyle = false whenoutscript (alert ( 'invalid style.')) end ifsbaseurl = astyleconfig (19) nallowbrowse = clng (43)). clng (astyleconfig (61)) nallowbrowse <> 1 thenoutscript ( 'browser!')가 ncusdirflag <> 1 thencusdir = elsescusdir = replace (scusdir, /, /) 왼쪽 (scusdir, 1) = /left (scusdir, 1). 또는 오른쪽 (Scusdir, 1) =. 또는 악기 (Scusdir, ./)> 0 또는 Instr (Scusdir, /.)> 0 또는 Instr (Scusdir, //)> 0 Thenscusdir = elseif right (scusdir, 1) <> /Thenscusdir = scusdir = scusdir = ifend ifsuploaddir = astyleconfig (3) if, 1) < /thens, 1). ../ & suploadDirend ifSelect case sbaseUrlcase 0ScontentPath = AstyLeconFig (23) case 1ScontentPath = relativePath2RootPath (suploaddir) case 2ScontentPath = rootpath2Domainpath (RelativePath2ROOTPATH (SUPLOADDIR)) 끝 SELECTSUPLOATPPATH = SUPLOADDIR & scUSCONTERT 및 SCUSCONTERT 및 SCUSCONTERTOPH & SCUSCONTETPOTH = SUPLOADDIR & scusDirSelect CASE stypecase fileslowext = case mediasallowext = rm | mp3 | mid | midi | ra | avi | mpg | mpeg | asf | asx | wma | movcase flashsallowext = swfcase elsesallowext = bmp | jpg | jpeg | png | gifend selects (gifend selects) dir = ../'2를 가정하십시오. dir = ... // '3을 가정합니다. dir = ... // sdir = replace (sdir,/,/) '필터 1sdir = replace (sdir, ../)'필터 2'1을 가정합니다. 여기서 필터링됩니다. sdir = replace (sdir, ./,) '필터 3'2도 여기에 전원이 켜집니다.'3은 여기 .../. 더 흥미 롭습니다! 많은 CM이 이와 같이 필터링 된 것 같습니다. [ /color] sdir <> ghef checkvaliddir (server.mappath (suploaddir & sdir)) = true thenscurrdir = suploaddir & sdir & /elsessdir = end ifend ifend sub공유 : ASP의 실제 IP 주소를 얻는 방법 클라이언트의 IP 주소를 얻으려면 ASP의 requevariables (remote_addr)를 사용하지만 클라이언트가 프록시 서버를 사용하여 액세스하는 경우 실제 클라이언트 IP 주소가 아닌 프록시 서버의 IP 주소가 얻어집니다. 프록시 서버를 통해 클라이언트의 실제 IP 주소를 얻으려면 request.servervaribles (H