목록2024/04/23 (2)
의미없는 블로그
[ASP.NET/C#] XSS 필터링 (HttpUtility.HtmlEncode / RemoveHtmlTag / RemoveScriptTag)
HttpUtility.HtmlEncode 로 입력값 필터링 " 이런거 필터링 됨( ) 는 안됨 Index.aspx.csRequest["ReturnUrl"] 로 입력값 받고HttpUtility.UrlEncode(ReturnUrl) 로 필터링 걸음Index.aspx위에서 받은 ReturnUrl 출력하고 있음/Index.aspx?ReturnUrl=스크립트 넣어보면 URL 인코딩 돼서 출력됨 RemoveHtmlTag, RemoveScriptTag 로 입력값 필터링이건 정규표현식으로 구현해서 쓰는건가 보다 MySellerInfo.aspx.cs[WebMethod] SetSellerMinishopInfo 는 /MySellerInfo.aspx/SetSellerMinishopInfo 요렇게 쓴다는 뜻임 파라미터에 Re..
# 나/source Code
2024. 4. 23. 11:20
[ASP.NET/C#] Reflected XSS 취약점
요런 느낌Spring 프레임워크 > Java 언어로 구현ASP.NET 프레임워크 > C# 언어로 구현 닷넷 왜케 복잡하냐요런식으로 연결 되어있다.aspx.cs → .aspx.ascx.cs → .ascx .csRequest["root_path"];.aspxroot_pathRequest.Params["cmpl_lng"];cmpl_lngRequest.QueryString["example_url"];example_url Request["textarea"] 출력할 때 로 하면 양호 (Html 인코딩) " 넣었을 때 에러나는 이유는 전처리 때문에 (https://saltlee.tistory.com/417)
# 나/source Code
2024. 4. 23. 11:05