Foro de elhacker.net

Seguridad Informática => Nivel Web => Mensaje iniciado por: Mr.Blue en 29 Mayo 2010, 04:59 am



Título: Probable bug en mi web
Publicado por: Mr.Blue en 29 Mayo 2010, 04:59 am
Citar
JSP 2.0 expression Language - Implicit Objects
This example illustrates some of the implicit objects available in the expression Lanaguage. The following implicit objects are available (not all illustrated here):

    * pageContext - the PageContext object
    * pageScope - a Map that maps page-scoped attribute names to their values
    * requestScope - a Map that maps request-scoped attribute names to their values
    * sessionScope - a Map that maps session-scoped attribute names to their values
    * applicationScope - a Map that maps application-scoped attribute names to their values
    * param - a Map that maps parameter names to a single String parameter value
    * paramValues - a Map that maps parameter names to a String[] of all values for that parameter
    * header - a Map that maps header names to a single String header value
    * headerValues - a Map that maps header names to a String[] of all values for that header
    * initParam - a Map that maps context initialization parameter names to their String parameter value
    * cookie - a Map that maps cookie names to a single Cookie object.

    Change Parameter
    foo =

    EL expression    Result ${param.foo}    <script>alert()</script></A>
    ${param["foo"]}    <script>alert()</script></A>
    ${header["host"]}     x-sons.com.ar:8080
    ${header["accept"]}    text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    ${header["user-agent"]}    Mozilla/5.0 (Windows; U; Windows NT 6.0; es-ES; rv:1.9.1.9) Gecko/20100315 Firefox/3.5.9 (.NET CLR 3.5.30729)

Bueno les comento tengo una web donde me salio un bug. atraves de esto que muestro aca que podria hacer?  
de que manera se puede dejar desabilidada mi web?
o que datos podria obtener de la misma?
-------------------------------------------------------------------------------------------------

Por otro lado. que medidas deberia tomar para evitar o arreglar este bug


Vale aclarar que si no me equivoco el bug es por medio de xss (cross-site scripting)
de antemano gracias!


Título: Re: Probable bug en mi web
Publicado por: Darioxhcx en 29 Mayo 2010, 05:18 am
http://www.webmasters.org.mx/forosweb/index.php?s=40994abd0b700820cbc41da328af870a&showtopic=41&pid=201&st=0&#entry201

http://www.cert.org/archive/pdf/cross_site_scripting.pdf

ataques xxs
http://foro.elhacker.net/index.php/topic,67032.0.html

[::Tutorial::] - Ataques XSS
http://foro.elhacker.net/index.php/topic,32042.0.html

Cross Site Scripting
http://www.conocimientosweb.net/dcmt/ficha5310.html

FAQ XSS (Site Cross Scripting), XSS-Ataques
http://www.elhacker.net/Textos1.htm

Lei algo sobre Ataques xsss, pero... tengo una duda...
http://foro.elhacker.net/index.php/topic,66599.0.html

Generate Xss Exploit
http://www.sosvulnerable.net/xss/index.html

hai un buscador para usuarios registrados :-X


Título: Re: Probable bug en mi web
Publicado por: Shell Root en 29 Mayo 2010, 05:19 am
Bueno si es un XSS, entonces podrías controlarlo así.

En PHP es así.
Código
  1. echo htmlentities($strCadena, ENT_QUOTES);

Asi que en JSP sería así.
Código
  1. content = content.replace("&", "&amp;");
  2. content = content.replace("<", "&lt;");
  3. content = content.replace(">", "&gt;");
  4. content = content.replace("\"", "&quot;");
  5. content = content.replace("'", "&apos;");